[asterisk-users] Redirect call based on CLI???
Mark Hulber
asterisk.admin at hulber.com
Thu Feb 25 11:33:48 CST 2010
Since you are using 'n' notation, you might not have your statements
aligned. You can label your statements as below:
exten => s,n,Answer
exten => s,n,GotoIf($["${CALLERID(name)}" != "UNAVAILABLE"]?ans)
exten => s,n,Set(CALLERID(name)=${CALLERID(number)})
exten => s,n(ans),NoOp
; Banned
exten => s/708857500X,ans+1,Goto(banned,1) ;
exten => s/9044898017,ans+1,Goto(banned,1) ;
exten => s/8883222785,ans+1,Goto(banned,1) ;
; Specifically routed
exten => s/9165553456,ans+1,Goto(markivr,1) ; Allowed
exten => s/19165553456,ans+1,Goto(markivr,1) ; Allowed
; Default
exten => s,ans+1,Goto(mainmenu,s,1)
On 2/25/2010 10:11 AM, Brian wrote:
> On Thu, 2010-02-25 at 03:00 -0800, Kyle Kienapfel wrote:
>
>> http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf
>> Has example
>> exten => s,1,Answer
>> exten => s/9184238080,2,Set(CALLERID(name)=EVIL BASTARD)
>> exten => s,2,Set(CALLERID(name)=Good Person)
>> exten => s,3,Dial(SIP/goodperson)
>>
>> for white list
>>
>> exten => s/123123123,1,Dial(SIP/phoneA)
>> exten => s/456456456,1,Dial(SIP/phoneA)
>> exten => s,1,Dial(SIP/phoneB)
>>
>>
>>
> Thanks Kyle.
>
> I tried the example given but I could not get this to work - basically
> if I dial it from any phone that does not match 0800800800 (for
> illustration) it hangs up the channel with an error.
>
> exten => 845/0800800800,n,Set(CALLERID(name)=EVIL BASTARD)
> -->-- Auto fallthrough, channel 'SIP/1000-00000017' status is 'UNKNOWN'
>
> I'm struggling to work out the logic here of a non-match, but this was
> not caught by i or s in error, so I'm probably missing some brain
> connection here.
>
> However, I've managed to do what I want using gotoif statements matching
> caller id - but I'd be interested to work out how the above is meant to
> branch on a non-match.
>
>
>
More information about the asterisk-users
mailing list