<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 4, 2013 at 12:24 AM, James B. Byrne <span dir="ltr"><<a href="mailto:byrnejb@harte-lyne.ca" target="_blank">byrnejb@harte-lyne.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have this code in a dial plan:<br>
<br>
exten => _417XX,n,GotoIf($["${CALLERID(num)}" ><br>
"SIP/41799"]?notfromlocal)<br>
exten => _417XX,n,GotoIf($["${CALLERID(num)}" <<br>
"SIP/41700"]?notfromlocal)<br>
<br>
The value of "${CALLERID(num)}" appears to be "SIP/41712-00000181"<br>
<br>
-- Executing [41720@from-internal:5] GotoIf("SIP/41712-00000181",<br>
"0?notfromlocal") in new stack<br>
-- Executing [41720@from-internal:6] GotoIf("SIP/41712-00000181",<br>
"1?notfromlocal") in new stack<br>
-- Goto (from-internal,41720,8<br>
<br>
This value is evidently comparing to be less than "SIP/41799" as<br>
expected but also is considered less than "SIP/41700" as well, which<br>
is not expected (by me). What am I doing wrong here?<br>
<br>
What I am attempting to accomplish is to detect calls originally made<br>
from internal extension numbers in the range 41700..41799 inclusive.<br>
What is the correct method to accomplish this?<br>
<br>
James B. Byrne <br></blockquote></div><br>${CALLERID(num)} should give you only number and not technology i.e. 41712.<br><br></div><div class="gmail_extra">Give this a shot,<br><br>exten => _417XX,n,Noop(CALLERIDNUM=${CALLERID(num)})<br>
exten => _417XX,n,GotoIf($[$["${CALLERID(num)}" > "41799"] | $["${CALLERID(num)}" < "41700"]]?notfromlocal:)<br><br></div><div class="gmail_extra">--Satish Barot<br></div><div class="gmail_extra">
Ahmedabad, India<br></div></div>