[asterisk-users] What is my syntax error here?
Shanavaz E A
shanavazea at yahoo.com
Thu Jul 25 09:47:32 CDT 2013
Have you tried without the double quotes ?
as :
exten => _417XX,n,GotoIf($[$[${CallerIDNum} > 41799] | $[${CallerIDNum} < 41700]]?notfromlocal:)
________________________________
From: James B. Byrne <byrnejb at harte-lyne.ca>
To: asterisk-users at lists.digium.com
Sent: Wednesday, July 24, 2013 10:14 PM
Subject: Re: [asterisk-users] What is my syntax error here?
On Wed, July 24, 2013 10:33, James B. Byrne wrote:
> Additional data:
>
> Arch = x86_64
> OS = CentOS-6.4 (freepbx)
> Asterisk = 11.4
> FreePBX = 2.11.0.4
. . .
>
> So my question is simple. What error in syntax have I committed here?
> I expect that CallerIDNum == 41712 in the check:
>
> exten => _417XX,n,GotoIf(
> $[$["${CallerIDNum}" > "41799"] |
> $["${CallerIDNum}" < "41700"]]?notfromlocal:)
>
> But I am getting a message say there is no variable to check. So what
> I have done that is wrong?
>
As suggested I made these additions to the dial plan:
; Line 8
exten => _417XX,n,NoOp($["${CallerIDNum}" > "41799"])
; Line 9
exten => _417XX,n,NoOp($["${CallerIDNum}" < "41700"])
; Line 10
exten => _417XX,n,NoOp($["${CallerIDNum}" > "41799"] |
$["${CallerIDNum}" < "41700"])
; Line 11
exten => _417XX,n,NoOp($["${CallerIDNum}" > "41799"] |
$["${CallerIDNum}" < "41700"])
; Line 12
exten => _417XX,n,NoOp($[$["${CallerIDNum}" > "41799"] ||
$["${CallerIDNum}" < "41700"]])
; Line 13
exten => _417XX,n,NoOp($[$["${CallerIDNum}" > "41799"] ||
$["${CallerIDNum}" < "41700"]])
; Line 14 - original
exten => _417XX,n,GotoIf(
$[$["${CallerIDNum}" > "41799"] ||
$["${CallerIDNum}" < "41700"]]?notfromlocal:)
Which changed nothing but the results did provide a clue. Taking the
earlier suggestion I ensured that my original line did not contain
line breaks, which I cannot reproduce in this email because of its
length. However, putting everything on one line caused the missing
variable error to disappear.
exten => _417XX,n,GotoIf($[$["${CallerIDNum}" > "41799"] ||
$["${CallerIDNum}" < "41700"]]?notfromlocal:)
Thank you both for the help. I much appreciate it.
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130725/b04951f0/attachment.htm>
More information about the asterisk-users
mailing list