I am not sure of the complexity of your issue. There are only 4 toll free NPAs. 800, 888, 877, 866. Any thing starting with them is toll free. So, filtering them is not a major task, it would take only 4 statements at most and could be done with 2.
I don't program on a daily basis... so this is a pseudo programming example. Set a variable: NPA = CalledNum[1-3] Then parse it with If (NPA = "800" | NPA = "866" | NPA = "877" | NPA = "888"), then dowhatyouwannado Where the "|" is an "or". Now make that real asterisk code and you can filter the toll free calls. We use similar code to allow local calls to Overlaid NPAs like 713, 282 and 832. Cary Fitch -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of sean darcy Sent: Thursday, March 12, 2009 7:45 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] an easy way to deal with/without leading "1" ? I posted this before, but it didn't show up. So if it's a dup... I'm setting up dialplans to deal with 800 dialing through a different channel than regular long distance in the US. The regular long distance is set up so users can but don't have to dial one. That's pretty easy, just one more exten statement. But it's a pain dealing with all the 8xx area codes that are toll free. I tried exten=>exten => _!877NXXXXXX,2,Dial(${pstnline}/ww1${EXTEN:-10}) but that matches everything. I'd hoped it would only match strings that had zero or more characters, followed by the 877 pattern. sean _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
