<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=379234310-25052008><FONT face=Arial size=2>Hi
All,</FONT></SPAN></DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial size=2>I'm trying to figure
out why in the below code, the PSTN_NUM variable is always
amended</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>exten => s,n,NoOp(${PSTN_NUM})<BR>exten =>
s,n,ExecIf( $[ "${PSTN_NUM:0:1}" != "0" ] & $[ ${LEN(${PSTN_NUM})} = 10
]|Set|PSTN_NUM=001${PSTN_NUM})<BR>exten =>
s,n,NoOp(${PSTN_NUM})<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-- Executing [s@macro-setpstncli:8]
NoOp("SIP/427-b7d0f518", "0123456789") in new stack<BR> --
Executing [s@macro-setpstncli:9] ExecIf("SIP/427-b7d0f518", " 0 &
1|Set|PSTN_NUM=0010123456789") in new stack<BR> -- Executing
[s@macro-setpstncli:10] NoOp("SIP/427-b7d0f518", "0010123456789") in new
stack<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial size=2>It should
evaluate PSTN_NUM and add a 001 only if: PSTN_NUM is 10 digits long and doesn't
start with a 0.</FONT></SPAN></DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial size=2>However, from the
debug it's being changed, even though the first test operator logically is
0. If seems as though the "&" isnt being applied.</FONT></SPAN></DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial size=2>Any
ideas?</FONT></SPAN></DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=379234310-25052008><FONT face=Arial
size=2>Adrian</FONT></SPAN></DIV></BODY></HTML>