[asterisk-users] Accessing MySQL DB to set variables in Asterisk

Jean-Marc Salsa jsalsa at gmail.com
Mon Oct 16 13:35:19 MST 2006


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


More information about the asterisk-users mailing list