Re: [asterisk-users] Correct syntax for IF()?

2007-11-30 Thread Vincent
On Fri, 30 Nov 2007 00:30:06 -0500, Jared Smith [EMAIL PROTECTED] wrote: Sounds like a perfect application for the ISNULL dialplan function. Of course, that adds a whole new set of curly braces and parentheses to watch out for. Thanks Jared for the pointer :-) exten =

Re: [asterisk-users] Correct syntax for IF()?

2007-11-29 Thread Vincent
On Mon, 26 Nov 2007 21:23:59 -0500, Adam Moffett [EMAIL PROTECTED] wrote: This method should work: ${IF($[${STAT(e,/tmp/${CALLTIME}.wav)} = 1]?${CALLTIME}.wav:)} Yes indeed :-) === [internal] exten = 888,1,Playback(leave_msg) exten = 888,n,Set(CALLTIME=${STRFTIME(${EPOCH},,%d-%b-%Y-%Hh%M)})

Re: [asterisk-users] Correct syntax for IF()?

2007-11-29 Thread Jared Smith
On Mon, 2007-11-26 at 21:23 -0500, Adam Moffett wrote: A simpler example reveals the problem: exten = 188,1,Noop(${STAT(e,/bin/ls)}) exten = 188,2,Noop(${STAT(e,/not/there)}) Try that and you'll find that STAT(e,/whatever) returns 1 if the file is found and NOTHING if the

[asterisk-users] Correct syntax for IF()?

2007-11-26 Thread Vincent
Hello I've tried a bunch of things, but still get errors/warnings when using the IF() function: == TEST #1 exten = h,n,Set(WAV_FILE=${IF($[ ${STAT(e,/tmp/${CALLTIME}.wav)} ]?${CALLTIME}.wav)}) [Nov 26 21:52:34] WARNING[5074]: func_logic.c:107 acf_if: Syntax

Re: [asterisk-users] Correct syntax for IF()?

2007-11-26 Thread Tilghman Lesher
On Monday 26 November 2007 15:51, Vincent wrote: I've tried a bunch of things, but still get errors/warnings when using the IF() function: Please upgrade to 1.4.14 and try again. -- Tilghman ___ --Bandwidth and Colocation Provided by

Re: [asterisk-users] Correct syntax for IF()?

2007-11-26 Thread Turbo Fredriksson
Quoting Vincent [EMAIL PROTECTED]: exten = h,n,Set(WAV_FILE=${IF($[ ${STAT(e,/tmp/${CALLTIME}.wav)} ]?${CALLTIME}.wav)}) ^ ^ ^ To start, to many spaces... And a missing end parenthesis... And a end parenthesis

Re: [asterisk-users] Correct syntax for IF()?

2007-11-26 Thread Vincent
On Mon, 26 Nov 2007 23:40:37 +0100, Turbo Fredriksson [EMAIL PROTECTED] wrote: What you do is you always write the beginning _and_ the end at once. Never try to do them 'later'... Thanks guys. I think I found where it goes wrong: == 1. /tmp/test.wav exists - the $[] is true: exten =

Re: [asterisk-users] Correct syntax for IF()?

2007-11-26 Thread Vincent
On Tue, 27 Nov 2007 00:20:56 +0100, Vincent [EMAIL PROTECTED] wrote: Is it a known bug, and does Asterisk 1.4.14 solve this? FWIW, upgraded from 1.4.13 to 1.4.14, same warning. I guess it's not a real issue, and I'll just go ahead and ignore it, and find a way to act on whether the file exists or

Re: [asterisk-users] Correct syntax for IF()?

2007-11-26 Thread didier
Rpgrade but are you sure a '}' is not missing in your h,n,SET... ? - Original Message - From: Vincent [EMAIL PROTECTED] To: asterisk-users@lists.digium.com Sent: Monday, November 26, 2007 9:51 PM Subject: [asterisk-users] Correct syntax for IF()? Hello I've tried a bunch

Re: [asterisk-users] Correct syntax for IF()?

2007-11-26 Thread Vincent
On Tue, 27 Nov 2007 00:05:41 +, didier [EMAIL PROTECTED] wrote: Rpgrade but are you sure a '}' is not missing in your h,n,SET... ? exten = h,n,Set(CALLTIME=test) exten = h,n,Set(WAV_FILE=${IF($[${STAT(e,/tmp/${CALLTIME}.wav)}]?${CALLTIME}.wav:'')}) I don't think so, but it could be.

Re: [asterisk-users] Correct syntax for IF()?

2007-11-26 Thread Adam Moffett
A simpler example reveals the problem: exten = 188,1,Noop(${STAT(e,/bin/ls)}) exten = 188,2,Noop(${STAT(e,/not/there)}) Try that and you'll find that STAT(e,/whatever) returns 1 if the file is found and NOTHING if the file is not found. This method should work:

RE: [asterisk-users] Correct syntax to access a shell variable?

2006-11-25 Thread Dominique Dartois
: Asterisk-users Objet : [asterisk-users] Correct syntax to access a shell variable? I would like to access my shell environment variable MYIP from within sip.conf to put in externip. I've tried some variations of syntax after reading The Future of Telephony but it's not working yet. Should

Re: [asterisk-users] Correct syntax to access a shell variable?

2006-11-25 Thread Tzafrir Cohen
On Sat, Nov 25, 2006 at 11:58:01AM +0100, Dominique Dartois wrote: The right syntax should be externip=${ENV(MYIP)} but I **think** variables are only allowed in extensions.* and not in sip.conf. Right, they are. As a workaround, use a trivial shell script (with sed -i) to rewrite the IP

[asterisk-users] Correct syntax to access a shell variable?

2006-11-24 Thread Larry Alkoff
I would like to access my shell environment variable MYIP from within sip.conf to put in externip. I've tried some variations of syntax after reading The Future of Telephony but it's not working yet. Should it be externip=${ENV{$MYIP}} or some other syntax?? Larry -- Larry Alkoff N2LA -

[asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread hugolivude
Asteris 1.2.7 Redhat 9 Hi, Is this the correct syntax for setting CALLERID: exten = _1,n,Set(CALLERID(all)=The Smiths 212-876-9345) I'm able to get the number to change but the name is always Unknown Name. I've tried numerous combinations of quotes, but just cannot get the name... Thanks, H

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread Avi Miller
hugolivude wrote: I'm able to get the number to change but the name is always Unknown Name. I've tried numerous combinations of quotes, but just cannot get the name... I use Caller Name401 Note, no space between the closing and the character. Seems to work for me and Polycom phones.

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread C F
Are you trying this for PSTN? it wont work, you can't change the name on PSTN, the last CO looks up the name for the number it gets. On 8/10/06, hugolivude [EMAIL PROTECTED] wrote: Asteris 1.2.7 Redhat 9 Hi, Is this the correct syntax for setting CALLERID: exten = _1,n,Set(CALLERID(all)=The

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread Don
, 2006 5:26 PM Subject: [asterisk-users] Correct syntax for Set(CALLERID(all)... Asteris 1.2.7 Redhat 9 Hi, Is this the correct syntax for setting CALLERID: exten = _1,n,Set(CALLERID(all)=The Smiths 212-876-9345) I'm able to get the number to change but the name is always Unknown Name. I've

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread C F
(number)=555121212) - Original Message - From: hugolivude [EMAIL PROTECTED] To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Thursday, August 10, 2006 5:26 PM Subject: [asterisk-users] Correct syntax for Set(CALLERID(all)... Asteris 1.2.7

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread Alex Robar
(CALLERID(name)=John Doe)Set(CALLERID(number)=555121212)- Original Message -From: hugolivude [EMAIL PROTECTED]To: Asterisk Users Mailing List - Non-Commercial Discussionasterisk-users@lists.digium.comSent: Thursday, August 10, 2006 5:26 PM Subject: [asterisk-users] Correct syntax for Set

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread Alex Robar
: hugolivude [EMAIL PROTECTED] To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Thursday, August 10, 2006 5:26 PM Subject: [asterisk-users] Correct syntax for Set(CALLERID(all)... Asteris 1.2.7 Redhat 9 Hi, Is this the correct syntax for setting

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread C F
] To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Thursday, August 10, 2006 5:26 PM Subject: [asterisk-users] Correct syntax for Set(CALLERID(all)... Asteris 1.2.7 Redhat 9 Hi, Is this the correct syntax for setting

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread hugolivude
asterisk-users@lists.digium.com Sent: Thursday, August 10, 2006 5:26 PM Subject: [asterisk-users] Correct syntax for Set(CALLERID(all)... Asteris 1.2.7 Redhat 9 Hi, Is this the correct syntax for setting CALLERID: exten = _1,n,Set(CALLERID(all)=The Smiths

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread Don
: C F [EMAIL PROTECTED] To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Thursday, August 10, 2006 6:15 PM Subject: Re: [asterisk-users] Correct syntax for Set(CALLERID(all)... Why is it Don that you don't know? look it up, it's in the CLI: pbx

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread Don
Thank you...someone understood...hehe - Original Message - From: Alex Robar To: Asterisk Users Mailing List - Non-Commercial Discussion Sent: Thursday, August 10, 2006 6:21 PM Subject: Re: [asterisk-users] Correct syntax for Set(CALLERID(all)... I think

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread Don
To: Asterisk Users Mailing List - Non-Commercial Discussion Sent: Thursday, August 10, 2006 6:21 PM Subject: Re: [asterisk-users] Correct syntax for Set(CALLERID(all)... I think Don's point was that he wasn't sure that "all" existed. That being the case, if the OP was

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread hugolivude
10, 2006 6:21 PM Subject: Re: [asterisk-users] Correct syntax for Set(CALLERID(all)... I think Don's point was that he wasn't sure that all existed. That being the case, if the OP was using all, it wouldn't work and he wouldn't get the desired result. It's hardly lying to say that one is unsure

Re: [asterisk-users] Correct syntax for Set(CALLERID(all)...

2006-08-10 Thread C F
Subject: [asterisk-users] Correct syntax for Set(CALLERID(all)... Asteris 1.2.7 Redhat 9 Hi, Is this the correct syntax for setting CALLERID: exten = _1,n,Set(CALLERID(all)=The Smiths 212-876-9345) I'm able to get the number to change but the name

[Asterisk-Users] Correct syntax to call using IAX and a different UDP port

2003-07-18 Thread Dan
Hi, Which is the correct syntax to call using IAX? I have two Asterisk boxes behind a NAT and one of them use the default port 5036 for IAX, the second one use 5038. To call an extension of the first one, the line in extensions.conf is: exten = _9XXX,1,Dial(IAX/user:[EMAIL PROTECTED]/${EXTEN:1})