I make a table in asterisk db with some destination but

Hello, i make a table in asterisk db with a lot of destinations codes and i need to make some change in extensions.conf to check if the number dialed exist on this table an make the call only if exist in this. I think i need a script to use with extensions.conf but i don´t know how can i do this. Any sugestion or example is important to my.

Thanks in advance

which database your talking Mysql db or anything else?
if Mysql then there is 3 way to use Mysql cmd application who collect & extarct frok table
Its easy so plz find data from Voip-info.org


I would use a phpagi script for this task, see phpagi.sourceforge.net/ .


Marco Bruni

I use a db in mysql called asterisk, this db contains a table called cdr and this one contains 17 fields that use to make the cdr information of the calls. Then i make a server for billing with consult all asterisk db´s and manage de info by a lot of way. But now i make a new table in this db called mexico with 1 field called telecel, this contains all destination mexico mobile telecel. I need some clients to send only calls for mexico mobile telecel an this company have arround of 10000 codes… you think that mysql cmd i the way i need to go? well im going to read this, but in the past one friend make this by a simple way. He make an script wich extensions.conf consult this and look in db is exist this codes for this company… if exist then passtrough the call… if don´t exist drop them.

If any have another way to make this solution let me know, my friend is out for vacations :open_mouth: