<div class="gmail_quote">Or, alternatively using the 's' priority...</div><div class="gmail_quote"><br></div><div class="gmail_quote">exten => 845,1,Verbose(3, Incoming call from ${CALLERID(all)}) ; this will be priority 1</div>
<div class="gmail_quote">exten => 845/12345678,n,Goto(blacklist) ; the n will make this priority 2</div><div class="gmail_quote">exten => 845/23456789,s,Goto(blacklist) ; the s will make this also priority 2</div><div class="gmail_quote">
exten => 845/34567890,s,Goto(blacklist) ; again, priority 2</div><div class="gmail_quote">exten => 845/09876543,s,Goto(whitelist) ; and again</div><div class="gmail_quote">exten => 845/98765432,s,Goto(whitelist) ; and again</div>
<div class="gmail_quote">exten => 845/87654321,s,Goto(whitelist) ; and again</div><div class="gmail_quote">exten => 845,s,Verbose(3, CLI (${CALLERID(num)}) is neither blacklisted or whitelisted) ; last s, so last priority 2, this time with no pattern</div>
<div class="gmail_quote">exten => 845,n,Dial(SIP/somewhere,180) ; this will be priority 3</div><div class="gmail_quote">exten => 845,n,Hangup() ; priority 4</div><div class="gmail_quote">exten => 845,n(blacklist),Verbose(3, CLI (${CALLERID(num)}) is blacklisted) ; priority 5</div>
<div class="gmail_quote">exten => 845,n,Hangup(21) ; priority 6, cause code 21 = rejected</div><div class="gmail_quote">exten => 845,n(whitelist),Verbose(3, CLI (${CALLERID(num)}) is whitelisted) ; priority 7</div><div class="gmail_quote">
exten => 845,n,Dial(SIP/somewhereelse,180) ; priority 8</div><div class="gmail_quote">exten => 845,n,Hangup() ; priority 9</div><div class="gmail_quote"><br></div><div class="gmail_quote">You can see the priorities from the asterisk cli by doing a 'dialplan show <context>' </div>
<div class="gmail_quote"><br></div><div class="gmail_quote">d</div><div class="gmail_quote"><br></div><div class="gmail_quote">On 26 February 2010 01:33, Mark Hulber <span dir="ltr"><<a href="mailto:asterisk.admin@hulber.com">asterisk.admin@hulber.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Since you are using 'n' notation, you might not have your statements<br>
aligned. You can label your statements as below:<br>
<br>
exten => s,n,Answer<br>
exten => s,n,GotoIf($["${CALLERID(name)}" != "UNAVAILABLE"]?ans)<br>
exten => s,n,Set(CALLERID(name)=${CALLERID(number)})<br>
exten => s,n(ans),NoOp<br>
<br>
<br>
; Banned<br>
exten => s/708857500X,ans+1,Goto(banned,1) ;<br>
exten => s/9044898017,ans+1,Goto(banned,1) ;<br>
exten => s/8883222785,ans+1,Goto(banned,1) ;<br>
<br>
; Specifically routed<br>
<br>
exten => s/9165553456,ans+1,Goto(markivr,1) ; Allowed<br>
exten => s/19165553456,ans+1,Goto(markivr,1) ; Allowed<br>
<br>
; Default<br>
exten => s,ans+1,Goto(mainmenu,s,1)<br>
<div><div></div><div class="h5"><br>
On 2/25/2010 10:11 AM, Brian wrote:<br>
> On Thu, 2010-02-25 at 03:00 -0800, Kyle Kienapfel wrote:<br>
><br>
>> <a href="http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf" target="_blank">http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf</a><br>
>> Has example<br>
>> exten => s,1,Answer<br>
>> exten => s/9184238080,2,Set(CALLERID(name)=EVIL BASTARD)<br>
>> exten => s,2,Set(CALLERID(name)=Good Person)<br>
>> exten => s,3,Dial(SIP/goodperson)<br>
>><br>
>> for white list<br>
>><br>
>> exten => s/123123123,1,Dial(SIP/phoneA)<br>
>> exten => s/456456456,1,Dial(SIP/phoneA)<br>
>> exten => s,1,Dial(SIP/phoneB)<br>
>><br>
>><br>
>><br>
> Thanks Kyle.<br>
><br>
> I tried the example given but I could not get this to work - basically<br>
> if I dial it from any phone that does not match 0800800800 (for<br>
> illustration) it hangs up the channel with an error.<br>
><br>
> exten => 845/0800800800,n,Set(CALLERID(name)=EVIL BASTARD)<br>
> -->-- Auto fallthrough, channel 'SIP/1000-00000017' status is 'UNKNOWN'<br>
><br>
> I'm struggling to work out the logic here of a non-match, but this was<br>
> not caught by i or s in error, so I'm probably missing some brain<br>
> connection here.<br>
><br>
> However, I've managed to do what I want using gotoif statements matching<br>
> caller id - but I'd be interested to work out how the above is meant to<br>
> branch on a non-match.<br>
><br>
><br>
><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>