Just as a better example of how to use accountcode for this ... maybe we could add areacode= to sip.conf and pull that into a var instead of wasting the accountcode for this.... hrm...
[1234567] username=whatever secret=whatever context=phones accountcode=920
then in extensions.conf
[outbound] exten => NXXXXXX,1,goto(1${ACCOUNTCODE}${EXTEN},1)
[phones] include => outbound
Actually, this gives me an interesting idea. Why can't we just set variables on SIP (and other?) channels on the inbound side, just like we do with spooled calls?
Here's what would seem to be an obvious usage case from sip.conf:
[2221] type=friend secret=b3edowo32AA host=dynamic [EMAIL PROTECTED] context=intern canreinvite=no nat=1 setvar=salesmanager="Bill Smith" setvar=secretary=1233 setvar=secretaryname="Smithers" setvar=clublikeaseal="yes"
All of those variables would be "pre-set" upon delivery of the call into the extension logic. Anyone up to take this one? It sounds pretty easy, and would possibly be a lot more sane than creating different contexts for every entry that had different values. It's also easily extended across all channel types.
JT _______________________________________________ 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