Gentlemen,


Thanks! Based on your suggestions, I've now got my dial plan working with "numbers" of the format: +1 (707) 324-1234 or (707) 324-1234.


Here is the finished diaplan:


[internal]

exten => _[(+0-9]!,1,Goto(internal-filtered,${FILTER(0-9\x2A,${EXTEN})},1)


[internal-filtered]

include => local_extensions

include => outbound-special

include => outbound-unlimitel-toll


[local_extensions]

exten => 201,1,Dial(SIP…)

exten => 202,1,Dial(SIP…)

...


[outbound-toll]

exten => _1NXXNXXXXXX,1,

Dial(${SIP_TRUNK}/${EXTEN:-10},100,KT)

exten => _1NXXNXXXXXX,n,Hangup()


Message: 3
Date: Thu, 27 Jun 2013 13:30:15 -0400
From: David Kerr <da...@kerr.net>
Subject: Re: [Astlinux-users] Asterisk dialplan
To: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net>
Message-ID:
<CAJJxGdFekrjfPMaAF21++gu=YZF1Qwrco+eSNsPZCLyiCnW=e...@mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"

There are of course a bunch of syntax errors in the example I used !!! I'm
sure you can figure it out.

David


On Thu, Jun 27, 2013 at 1:27 PM, David Kerr <da...@kerr.net> wrote:

> You could use the asterisk FILTER() function to remove everything except
> numbers 0-9 then either goto(FILTER(0-9,${exten})) or
> dial(${trunk}/$FILTER(0-9,${exten}),bla,bla)
>
> David
>
>
> On Thu, Jun 27, 2013 at 12:30 PM, Shamus Rask <sha...@srask.ca> wrote:
>
>> This isn't AstLinux specific, however I can no longer find any helpful,
>> active Asterisk forums. The digium ones just seem dead?
>>
>>
>> I'm currently running the latest version of AstLinux with Asterisk
>> v1.8.21. I have an existing dialplan that allows for basic NANP dialing in
>> the form of:
>>
>> exten => _1NXXNXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN},100,KT)
>>
>> and
>>
>> exten => _NXXNXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN},100,KT)
>>
>>
>> I've recently purchased a SIP phone that pulls my Gmail contacts into its
>> address book. These contacts have their phone numbers stored as (e.g.) (716)
>> 452-1234 (note parenthesis). This was not working with the existing
>> extens listed above, so I added the following:
>> exten => _(NXX)!NXX!XXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN},100,KT)
>>
>> This seems to work as expected (i.e. for example above it dials
>> 7164521234 <//7164521234>). Is there a better/safer way to do this? Does
>> anyone have any better suggestions?
>>
>> cheers,
>> Shamus
>>
>> --
>> Shamus Rask
>> sip:sha...@srask.ca
>> ISN:100*1129
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Astlinux-users mailing list
>> Astlinux-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/astlinux-users
>>
>> Donations to support AstLinux are graciously accepted via PayPal to
>> pay...@krisk.org.
>>
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

Reply via email to