On Wed, Dec 22, 2010 at 2:01 AM, Jeroen Eeuwes <[email protected]> wrote:
> Hi Stephen,
>
>> _NXXNXXXXXX
>> _NXXXXXX
>> _011.
>> _911
>
> Of course it can, but it depends on what you want to do when those
> numbers are called...
>
> I didn't know about the setvar in the sip.conf and actually I think it
> is a much "cleaner" solution. Since you are already using it I would
> suggest to not only use it for CallerID but also for the
> @vitel-outbound like this:
>
> exten => _1NXXNXXXXXX,1,Set(CALLERID(all)=${EXTERNAL_CALLERID})
> exten => _1NXXNXXXXXX,n,Dial(SIP/${ext...@${outbound})
> exten => _1NXXNXXXXXX,n,Goto(h,1)
>
> Of course you'll need to set setvar=Outbound=vitel-outbound or
> setvar=Outbound=vitel-outbound2 in sip.conf.
>
> What do you want to do with the other numbers? If you want to do the
> same as with _1NXXNXXXXXX you can just add things like this in your
> extensions.conf:
>
> exten => _NXXNXXXXXX,1,Goto(_1NXXNXXXXXX,1)
> exten => 911,1,Goto(_1NXXNXXXXXX,1)
>
> Or you can do different things if you want that like this:
>
> exten => _NXXXXXX,1,Set(CALLERID(all)="No one cares" <0>)
> exten => _NXXXXXX,n,Dial(SIP/${ext...@abcdefgh)
> exten => _NXXXXXX,n,Goto(h,1)
>
> Best regards,
> Jeroen Eeuwes
Jeroen, I'm trying to avoid rewriting the outgoing block for the
patterns mentioned above. I've placed a pseudo dial-plan below. The
plan needs to dial the 1 and/or also the area code depending on the
pattern they enter. Any tips, thanks.
exten => _1NXXNXXXXXX,1,Set(Outgoing=${CUT(CHANNEL,/,2)})
exten => _1NXXNXXXXXX,n,Set(Outgoing=${CUT(Outgoing,-,1)})
exten => _1NXXNXXXXXX,n,GotoIf($["${Outgoing}" = "201"]?20:10)
exten => _1NXXNXXXXXX,10,Set(CALLERID(all)=${EXTERNAL_CALLERID})
exten => _NXXNXXXXXX,10,Set(CALLERID(all)=${EXTERNAL_CALLERID})
exten => _NXXXXXX,10,Set(CALLERID(all)=${EXTERNAL_CALLERID})
exten => _1NXXNXXXXXX,n,Dial(SIP/${ext...@vitel-outbound)
exten => _NXXNXXXXXX,n,Dial(SIP/${ext...@vitel-outbound)
exten => _NXXXXXX,n,Dial(SIP/${ext...@vitel-outbound)
exten => _1NXXNXXXXXX,n,Goto(h,1)
exten => _NXXNXXXXXX,n,Goto(h,1)
exten => _NXXXXXX,n,Goto(h,1)
exten => _1NXXNXXXXXX,20,Set(CALLERID(all)=${EXTERNAL_CALLERID})
exten => _1NXXNXXXXXX,n,Dial(SIP/${ext...@vitel-outbound2)
exten => _1NXXNXXXXXX,n,Goto(h,1)
--
_____________________________________________________________________
-- 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