Jean-Marc Salsa
2006-Oct-16 13:30 UTC
[asterisk-users] Accessing MySQL DB to set variables in Asterisk
Hi, I have set up a fax to email capability on our Asterisk Server (which is used for voicemail, and fax2email only), and would like to improve it ! Everytime Asterisk receives a fax, I would like it to go and search in a DB if the Extension is defined. If it is, then it will set the Email address where to send the fax. And actually, it would be the same for voicemail, Our users have different extensions. And we want them to have only one Mailbox. Thus we can configure the primary extension as the main voicemail number, but we need to have all the secondaries extension to be sent to the primary one. Thus I would like to seach into a DB, if such a secondary extension exists, it sends back the primary extension, so we can route the call to the appropriate mailbox ( primary ) I would like to use Asterisk + MySQL Realtime. I have set up in "res_mysql.conf" the way to access MySQL I have set up in "extconfig.conf" : fax2email => mysql,asteriskrealtime,fax2email And hen in my DB : DB Name = asteriskrealtime Table Name = fax2email -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061016/2636be0d/attachment.htm
Jean-Marc Salsa
2006-Oct-16 13:35 UTC
[asterisk-users] Accessing MySQL DB to set variables in Asterisk
Hi, ( Sorry for previous post, it was incomplete :o( I have set up a fax to email capability on our Asterisk Server (which is used for voicemail, and fax2email only), and would like to improve it ! Everytime Asterisk receives a fax, I would like it to go and search in a DB if the Extension is defined. If it is, then it will set the Email address where to send the fax. I do not want to use extension.conf ... And actually, it would be the same for voicemail, Our users have different extensions. And we want them to have only one Mailbox. Thus we can configure the primary extension as the main voicemail number, but we need to have all the secondaries extension to be sent to the primary one. Thus I would like to seach into a DB, if such a secondary extension exists, it sends back the primary extension, so we can route the call to the appropriate mailbox ( primary ) I would like to use Asterisk + MySQL Realtime. I have set up in "res_mysql.conf" the way to access MySQL I have set up in "extconfig.conf" : fax2email => mysql,asteriskrealtime,fax2email And then in my DB : DB Name = asteriskrealtime Table Name = fax2email Table fax2email: Field EXT which contains extension numbers Field email which contains the email where to send the fax If I use DBGet, how to specify that I want to retrieve the email address from fax2email table, which matches the extension in Asterisk ? Thanks for your help guys ! Yours, Jean-Marc ( can cannot send more than 10 lines in one email :o) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061016/2fcd57da/attachment.htm
Andrea Spadaccini
2006-Oct-16 14:11 UTC
[asterisk-users] Accessing MySQL DB to set variables in Asterisk
Ciao Jean-Marc,> Everytime Asterisk receives a fax, I would like it to go and search > in a DB if the Extension is defined. > If it is, then it will set the Email address where to send the fax.You can use app_addon_mysql for your purposes. See: http://www.voip-info.org/wiki/view/Asterisk+cmd+MYSQL . HTH, -- Andrea Spadaccini Multimedia Technologies Institute s.r.l.