[asterisk-users] Logical AND

2008-05-25 Thread Adrian Marsh
Hi All, I'm trying to figure out why in the below code, the PSTN_NUM variable is always amended exten = s,n,NoOp(${PSTN_NUM}) exten = s,n,ExecIf( $[ ${PSTN_NUM:0:1} != 0 ] $[ ${LEN(${PSTN_NUM})} = 10 ]|Set|PSTN_NUM=001${PSTN_NUM}) exten = s,n,NoOp(${PSTN_NUM}) -- Executing [EMAIL

[asterisk-users] Logical AND (resent due to bounces)

2008-05-25 Thread Adrian Marsh
Hi All, I'm trying to figure out why in the below code, the PSTN_NUM variable is always amended exten = s,n,NoOp(${PSTN_NUM}) exten = s,n,ExecIf( $[ ${PSTN_NUM:0:1} != 0 ] $[ ${LEN(${PSTN_NUM})} = 10 ]|Set|PSTN_NUM=001${PSTN_NUM}) exten = s,n,NoOp(${PSTN_NUM}) -- Executing [EMAIL

Re: [asterisk-users] Logical AND

2008-05-25 Thread Stefan Schmidt
Adrian Marsh schrieb: Hi All, I'm trying to figure out why in the below code, the PSTN_NUM variable is always amended exten = s,n,NoOp(${PSTN_NUM}) exten = s,n,ExecIf( $[ ${PSTN_NUM:0:1} != 0 ] $[ ${LEN(${PSTN_NUM})} = 10 ]|Set|PSTN_NUM=001${PSTN_NUM}) exten = s,n,NoOp(${PSTN_NUM})

Re: [asterisk-users] Logical AND

2008-05-25 Thread Adrian Marsh
Hi Steve, I can see what yours does, but I still get the same end result (even though theres only a single 0 result now) : exten = s,n,ExecIf( $[ $[ ${PSTN_NUM:0:1} != 0 ] $[ ${LEN(${PSTN_NUM})} = 10 ] ] |Set|PSTN_NUM=001${PSTN_NUM}) -- Executing [EMAIL PROTECTED]:8]

Re: [asterisk-users] Logical AND

2008-05-25 Thread Tilghman Lesher
On Sunday 25 May 2008 07:10:22 Adrian Marsh wrote: exten = s,n,ExecIf( $[ $[ ${PSTN_NUM:0:1} != 0 ] $[ ${LEN(${PSTN_NUM})} = 10 ] ] |Set|PSTN_NUM=001${PSTN_NUM}) -- Executing [EMAIL PROTECTED]:8] NoOp(SIP/427-b7d9a9a0, 0123456789) in new stack -- Executing [EMAIL PROTECTED]:9]

Re: [asterisk-users] Logical AND

2008-05-25 Thread Adrian Marsh
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tilghman Lesher Sent: 25 May 2008 15:07 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Logical AND On Sunday 25 May 2008 07:10:22 Adrian Marsh wrote: exten = s,n,ExecIf( $[ $[ ${PSTN_NUM:0

Re: [asterisk-users] Logical AND

2008-05-25 Thread Tilghman Lesher
On Sunday 25 May 2008 09:38:28 Adrian Marsh wrote: I did wonder where the extra spaces were coming from, but I thought that was where the quotes were supposed to come into play... Well that got it working so thanks guys.. The quotes generally aren't supposed to take care of spaces; they are