Dial Plan Syntax Problem

Hi All

I have this in my dial plan:
[macro-outbound-callerid-custom]
exten => s,22,NoOp(RDNIS is ${CALLERID(rdnis)} with length ${LEN(${CALLERID(rdnis)})})
exten => s,23,ExecIf($[${LEN(${CALLERID(rdnis)})} != 0]?Set(CALLERID(all)=${CALLERID(rdnis)})

And am getting this in the output:
Executing [[email protected]:22] NoOp(“Local/[email protected];2”, “RDNIS is 0872219229 with length 10”) in new stack
– Executing [[email protected]:23] ExecIf(“Local/[email protected];2”, “1?Set(CALLERID(all)=0872219229”) in new stack
[2017-01-27 10:55:57] WARNING[50449][C-0000002f]: pbx_variables.c:1096 pbx_builtin_setvar: Set requires an ‘=’ to be a valid assignment.

I can’t find the syntax error here.

Can anyone give me some guidance?

You’re missing a parentheses

Yep - that was it!

After staring at it for long enough it all meshes into one big parentheses.

1 Like