Re: [asterisk-users] Question on AEL2 string comparisons

2013-07-04 Thread Satish Barot
On Thu, Jul 4, 2013 at 12:24 AM, James B. Byrne byrn...@harte-lyne.cawrote:

 I have this code in a dial plan:

 exten = _417XX,n,GotoIf($[${CALLERID(num)} 
 SIP/41799]?notfromlocal)
 exten = _417XX,n,GotoIf($[${CALLERID(num)} 
 SIP/41700]?notfromlocal)

 The value of ${CALLERID(num)} appears to be SIP/41712-0181

 -- Executing [41720@from-internal:5] GotoIf(SIP/41712-0181,
 0?notfromlocal) in new stack
 -- Executing [41720@from-internal:6] GotoIf(SIP/41712-0181,
 1?notfromlocal) in new stack
 -- Goto (from-internal,41720,8

 This value is evidently comparing to be less than SIP/41799 as
 expected but also is considered less than SIP/41700 as well, which
 is not expected (by me).  What am I doing wrong here?

 What I am attempting to accomplish is to detect calls originally made
 from internal extension numbers in the range 41700..41799 inclusive.
 What is the correct method to accomplish this?

 James B. Byrne


${CALLERID(num)} should give you only number and not technology i.e. 41712.

Give this a shot,

exten = _417XX,n,Noop(CALLERIDNUM=${CALLERID(num)})
exten = _417XX,n,GotoIf($[$[${CALLERID(num)}  41799] |
$[${CALLERID(num)}  41700]]?notfromlocal:)

--Satish Barot
Ahmedabad, India
--
_
-- 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

Re: [asterisk-users] Question on AEL2 string comparisons

2013-07-04 Thread James B. Byrne

On Thu, July 4, 2013 02:14, Satish Barot wrote:



 ${CALLERID(num)} should give you only number and not technology i.e.
 41712.

 Give this a shot,

 exten = _417XX,n,Noop(CALLERIDNUM=${CALLERID(num)})
 exten = _417XX,n,GotoIf($[$[${CALLERID(num)}  41799] |
 $[${CALLERID(num)}  41700]]?notfromlocal:)

 --Satish Barot
 Ahmedabad, India


That works.  Thank you.
-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte  Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3


--
_
-- 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