[asterisk-users] Lookup ${EXTEN} in database, update context/route if found... AGI?

Tim Nelson tnelson at rockbochs.com
Tue May 11 13:25:30 CDT 2010


Greetings all-

I have a handful of Asterisk 1.4.x installations where users dial 'outbound calls' to the PSTN even though the destination is on the same Asterisk box or on another Asterisk box on the same network. Instead of paying twice for the call to go out to the PSTN on one channel and back in on another channel, I'd like the ability to lookup the destination number in a MySQL database and if found, change the way the call is routed. The call routing update could be as simple as issuing a Goto() to change contexts or priorities in the current context.

I think AGI is what I need, specifically PHP-AGI. Maybe I'm overthinking and AGI isn't needed. Can someone give thoughts on this or any pointers or examples?

--Tim



More information about the asterisk-users mailing list