[asterisk-users] MYSQL Query --> PAGE
Forrest Beck
jonforrest.beck at gmail.com
Tue May 8 10:47:31 MST 2007
I have all my SIP users in a realtime database. I would like to use
MySQL command to query the database and use the results from the query
to page all the phones found in the query.
The results from the MySQL query will be multiple rows of extension:
Something like:
mysql> Select extension from sip where extension like '6%'
6001
6002
6003
ex....
I need to put all the results into a variable that would equal something like:
SIP/6001&SIP/6002&SIP/6003
I have setup a couple basic MYSQL Query's for my dialplan. Mostly
just looking up a DID to Extension Mapping for setting callerid on
outbound and inbound calls.
How does asterisk handle the multiple results. Is there a way to loop
until there are no more rows?
Something like Set(devices=${devices}&${newrow_result})
I looked at the example on
http://www.voip-info.org/wiki/view/Asterisk+cmd+MYSQL but that doesn't
seem to be accurate.
Thanks all!!
--
***
Forrest Beck
IAXTEL: 17002871718
jonforrest.beck at gmail.com
More information about the asterisk-users
mailing list