[asterisk-users] What is my syntax error here?
James B. Byrne
byrnejb at harte-lyne.ca
Wed Jul 24 09:08:52 CDT 2013
I have thsi code in a dial plan. The purpose of which is to set
distinctive ring tones for internal and transferred calls.
exten => _.,1,Noop(CALLERID_ALL=${CALLERID(all)})
exten => _.,n,Set(CallerIDNum=${CALLERID(num)})
; This just shows a list of interesting variables and their values
; Comment it out when finished debugging
;include => macro-dumpvars
;exten => _.,n,Macro(dumpvars)
exten => _417XX,n,Set(AlertSnom=<http://www.notused.com>\;info=)
; alert-external, alert-group and alert-internal are
; Snom predefined values.
exten => _417XX,n,Set(AlertExternalCall=alert-external)
; alert_internal_call and alert_internal_transfer are
; locally customised values
exten => _417XX,n,Set(AlertInternalCall=alert_internal_call)
exten => _417XX,n,Set(AlertInternalTransfer=alert_internal_transfer)
exten => _417XX,n,Set(__ALERT_INFO=${AlertSnom}${AlertInternalTransfer})
exten => _417XX,n,GotoIf(
$[$["${CallerIDNum}" > "41799"] |
$["${CallerIDNum}" < "41700"]]?notfromlocal:)
exten => _417XX,n,Set(__ALERT_INFO=${AlertSnom}${AlertInternalCall})
This works for internal calls but not transfers and it only works at
all only because of the fall through structure. It contains this
error that I do not understand:
-- Executing [41720 at from-internal:1] NoOp("SIP/41712-00000548",
"CALLERID_ALL="James B Byrne" <41712>") in new stack
-- Executing [41720 at from-internal:2] Set("SIP/41712-00000548",
"CallerIDNum=41712") in new stack
-- Executing [41720 at from-internal:3] Set("SIP/41712-00000548",
"AlertSnom=<http://www.notused.com>;info=") in new stack
-- Executing [41720 at from-internal:4] Set("SIP/41712-00000548",
"AlertExternalCall=alert-external") in new stack
-- Executing [41720 at from-internal:5] Set("SIP/41712-00000548",
"AlertInternalCall=alert_internal_call") in new stack
-- Executing [41720 at from-internal:6] Set("SIP/41712-00000548",
"AlertInternalTransfer=alert_internal_transfer") in new stack
-- Executing [41720 at from-internal:7] Set("SIP/41712-00000548",
"__ALERT_INFO=<http://www.notused.com>;info=alert_internal_transfer")
in new stack
-- Executing [41720 at from-internal:8] GotoIf("SIP/41712-00000548",
"") in new stack
== Extension Changed 41712[ext-local] new state InUse for Notify
User 41714
[2013-07-24 09:50:42] WARNING[10630][C-00006b44]: pbx.c:11544
pbx_builtin_gotoif: Ignoring, since there is no variable to check
[2013-07-24 09:50:42] WARNING[10630][C-00006b44]: pbx.c:11544
pbx_builtin_gotoif: Ignoring, since there is no variable to check
-- Executing [41720 at from-internal:9] Set("SIP/41712-00000548",
"__ALERT_INFO=<http://www.notused.com>;info=alert_internal_call")
in new stack
-- Executing [41720 at from-internal:10] Goto("SIP/41712-00000548",
"from-internal-original-override,41720,1") in new stack
-- Goto (from-internal-original-override,41720,1)
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?
--
*** 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
More information about the asterisk-users
mailing list