On Tue, 2004-05-18 at 23:46, Eric Wieling wrote: > On Tue, 2004-05-18 at 23:26, Randy Bush wrote: > > i have extensions in locations across a number of telco area codes. > > when someone in seattle picks up and dials 91234567, it would be > > nice to transform it to 92061234567. i would prefer not to have > > an extension context per area code. it would be cool to be able > > to set a variable in the sip.conf bit for each phone with it's > > geographic default area code. > > I assume that each SIP phone will have Caller*ID that includes their > area code? If so it would be pretty trivial to use an AGI script to > extract the area code from the Caller*ID of the phone making the call > and use app_goto to jump to $AreaCode . $Exten or something like that.
Or you could actually do it simpler by doing something line exten => NXXXXXX,1,GoTo(${CALLERIDNUN:-7)${EXTEN},1) but see README.variables for the correct syntax of chopping off the last 7 digits of a variable. -- Eric Wieling * BTEL Consulting * 504-899-1387 x2111 "In a related story, the IRS has recently ruled that the cost of Windows upgrades can NOT be deducted as a gambling loss." _______________________________________________ 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