[Home]

Summary:ASTERISK-11832: error when setting user-defined variable in the dialplan
Reporter:AndrewZ (andrewz)Labels:
Date Opened:2008-04-11 09:31:31Date Closed:2011-06-07 14:07:20
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/PBX
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Error message appears while setting user-defined variable in the dialplan.

****** ADDITIONAL INFORMATION ******

in extensions.conf:

[incoming]
exten => s,1,Noop(Incoming call from ${CALLERID(num)})
exten => s,2,Set(sideA="DID")
exten => s,3,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})}
exten => s,4,Goto(default,${DB(mydest/DID-XXX-DEST)},1)
exten => t,1,Hangup
exten => i,1,Hahgup

On the console:

-- Executing [s@incoming:1] Noop("SIP/1234567890-081e6430", "Incoming call from 1234567890") in new stack
-- Executing [s@incoming:2] Set("SIP/1234567890-081e6430", "sideA="DID"") in new stack
[Apr 11 16:11:46] NOTICE[8996]: pbx.c:1642 pbx_substitute_variables_helper_full: Error in extension logic (missing '}')
[Apr 11 16:11:46] NOTICE[8996]: pbx.c:1642 pbx_substitute_variables_helper_full: Error in extension logic (missing '}')
[Apr 11 16:11:46] WARNING[8996]: pbx.c:1539 func_args: Can't find trailing parenthesis?
[Apr 11 16:11:46] WARNING[8996]: pbx.c:1539 func_args: Can't find trailing parenthesis?
Comments:By: Tilghman Lesher (tilghman) 2008-04-11 10:07:48

No, this is a configuration issue.  On the following line, you're missing the closing parenthesis (to match with the opening "Set(")

Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
NOT
Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})}