Eddie Mikell
2010-May-27 21:17 UTC
[asterisk-users] Pattern matching - how to ignore numbers after 10 digits
All:
Yesterday I discovered something interesting. I dialed 1800ANCESTRY
from the asterisk system I am testing and got the number doesn't exist
message. I then dialed the same number from our old system and it went
through.
I realized that the "Y" in ancestry made the number too long, and went
back to my dialplan.
How do I ignore numbers that are too long? Obviously, I've done
something wrong in my pattern matching.
outgoing part of extensions.conf
exten => _91XXXXXXXXXX!,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net) ; long distance
exten => _9765XXXXXXX,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net) ; local
exten => _9XXXXXXX,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net) ; local
exten => _9011XXXXXXX!,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net) ; international
exten => _911,1,DIAL(SIP/${EXTEN}@ia.ntelos.net) ; emergency
Thanks!
Eddie Mikell
Alyed
2010-May-27 21:33 UTC
[asterisk-users] Pattern matching - how to ignore numbers after 10 digits
I guess it's the "!", sometimes it has a funny behaviour.
try changing ("." instead of "!" and an "X" less)
exten => _91XXXXXXXXXX!,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net<EXTEN%3A1%7D
at ia.ntelos.net>)
; long distance
to
exten => _91XXXXXXXXX.,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net<EXTEN%3A1%7D at
ia.ntelos.net>)
; long distance
I always use "." and never had a problem.
Alyed
2010/5/27 Eddie Mikell <eddie at rimmkaufman.com>
> All:
>
> Yesterday I discovered something interesting. I dialed 1800ANCESTRY
> from the asterisk system I am testing and got the number doesn't exist
> message. I then dialed the same number from our old system and it went
> through.
>
> I realized that the "Y" in ancestry made the number too long, and
went
> back to my dialplan.
>
> How do I ignore numbers that are too long? Obviously, I've done
> something wrong in my pattern matching.
>
> outgoing part of extensions.conf
>
> exten =>
_91XXXXXXXXXX!,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net<EXTEN%3A1%7D at
ia.ntelos.net>)
> ; long distance
> exten =>
_9765XXXXXXX,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net<EXTEN%3A1%7D at
ia.ntelos.net>)
> ; local
> exten => _9XXXXXXX,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net<EXTEN%3A1%7D
at ia.ntelos.net>)
> ; local
> exten =>
_9011XXXXXXX!,1,DIAL(SIP/${EXTEN:1}@ia.ntelos.net<EXTEN%3A1%7D at
ia.ntelos.net>)
> ; international
> exten => _911,1,DIAL(SIP/${EXTEN}@ia.ntelos.net <EXTEN%7D at
ia.ntelos.net>)
> ; emergency
>
> Thanks!
>
> Eddie Mikell
>
>
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100527/a930bbf2/attachment.htm
Steve Edwards
2010-May-27 21:51 UTC
[asterisk-users] Pattern matching - how to ignore numbers after 10 digits
On Thu, 27 May 2010, Eddie Mikell wrote:> exten => _911,1,DIAL(SIP/${EXTEN}@ia.ntelos.net) ; emergencyUnrelated to your question, but "911" doesn't need an underscore. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000