<div dir="ltr">Hello asterisk users,<br><br>I need to convert the CLI received according to national/international format:<br><br>55-555-5555 to 055-555-5555 (add 0 in the beginning)<br>+55-55-555-5555 to +55-55-555-5555 (remains unchanged)<br>
<br>I put the following line in my dial plan:<br>exten =&gt; _X., n, Set(CALLERID(num)=${IF($[ ${CALLERID(num):0:1} = &quot;+&quot;]?${CALLERID(num)}:0${CALLERID(num)})})<br><br>But I get these error messages:<br>[May  2 17:05:43] WARNING[1494]: ast_expr2.fl:468 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected &#39;+&#39;, expecting $end; Input:<br>
 + = &quot;+&quot;<br> ^<br>[May  2 17:05:43] WARNING[1494]: ast_expr2.fl:472 ast_yyerror: If you have questions, please refer to <a href="https://wiki.asterisk.org/wiki/display/AST/Channel+Variables">https://wiki.asterisk.org/wiki/display/AST/Channel+Variables</a><br>
[May  2 17:05:43] WARNING[1494]: func_logic.c:192 acf_if: Syntax IF(&lt;expr&gt;?[&lt;true&gt;][:&lt;false&gt;])  (expr must be non-null, and either &lt;true&gt; or &lt;false&gt; must be non-null)<br>[May  2 17:05:43] WARNING[1494]: func_logic.c:193 acf_if:       In this case, &lt;expr&gt;=&#39;&#39;, &lt;true&gt;=&#39;+55555555555&#39;, and &lt;false&gt;=&#39;0+55555555555&#39;<br>
<br>Can anyone suggest the proper syntax? I tried the + with no quotes, single quotes &#39;+&#39; and double quotes&quot;+&quot; and nothing worked.<br><br>Thanks<br></div>