>> if a phone number starts with one of 50+ prefixes, >> i want to send the sip call to gateway X. if it >> is in any other prefix, i want to send it to gate >> Y. > Take a look at http://www.voip-info.org/wiki-Asterisk+app_dbodbc
too big a hammer. i finally did the agi hack. for the archive [dial-hawi] exten => s,1,NoOp("dial-hawi") exten => _.,1,SetVar(PREFIX="") exten => _.,2,AGI(agi-prefix|${EXTEN:4:3}) exten => _.,3,NoOp("agi-prefix returns ${PREFIX}") exten => _.,4,Dial(SIP/${PREFIX}${EXTEN:[EMAIL PROTECTED],60,Ttr) exten => h,1,Hangup() exten => i,1,GoTo(s,1) exten => t,1,GoTo(s,1) with the script being a brutal #!/usr/local/bin/bash if ! grep $1 /usr/local/etc/hawi-prefixes > /dev/null; then echo SET VARIABLE PREFIX "1808" fi randy _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users