[Asterisk-Users] GotoIf always goes to true?

Andy Kuo akuoca at gmail.com
Fri Nov 18 16:39:22 MST 2005


Hi all,
 I recently found GotoIf not working right in my extensions.conf, so I write
a simple test and test it on my newly installed v1.2 box.
However, in all cases, GotoIf seems to always result in "true". This happens
to me in both ABE and V1.2
 my extensions.conf :
[globals]
Music=123
[default]
exten => ${Music},1,Answer
exten => ${Music},2,SetVar(t=1)
exten => ${Music},3,NoOp(${TIMESTAMP} - ${T})
exten => ${Music},4,MP3Player(/var/lib/asterisk/mohmp3/deck.mp3)
exten => ${Music},5,SetVar(t=$[${T} + 1])
exten => ${Music},6,GotoIf(${T}<3?3:7)
exten => ${Music},7,Hangup
 CLI> output :
*CLI> -- Executing Answer("SIP/100-274e", "") in new stack
-- Executing Set("SIP/100-274e", "t=1") in new stack
-- Executing NoOp("SIP/100-274e", "20051118-153136 - 1") in new stack
-- Executing MP3Player("SIP/100-274e", "/var/lib/asterisk/mohmp3/deck.mp3")
in new stack
Nov 18 15:31:39 NOTICE[5414]: app_mp3.c:108 timed_read: Poll timed
out/errored o
ut with 0
-- Executing Set("SIP/100-274e", "t=2") in new stack
-- Executing GotoIf("SIP/100-274e", "2<3?3:7") in new stack
-- Goto (default,123,3)
-- Executing NoOp("SIP/100-274e", "20051118-153139 - 2") in new stack
-- Executing MP3Player("SIP/100-274e", "/var/lib/asterisk/mohmp3/deck.mp3")
in new stack
Nov 18 15:31:42 NOTICE[5414]: app_mp3.c:108 timed_read: Poll timed
out/errored o
ut with 0
-- Executing Set("SIP/100-274e", "t=3") in new stack
-- Executing GotoIf("SIP/100-274e", "3<3?3:7") in new stack
-- Goto (default,123,3)
-- Executing NoOp("SIP/100-274e", "20051118-153142 - 3") in new stack
-- Executing MP3Player("SIP/100-274e", "/var/lib/asterisk/mohmp3/deck.mp3")
in new stack
Nov 18 15:31:45 NOTICE[5414]: app_mp3.c:108 timed_read: Poll timed
out/errored o
ut with 0
-- Executing Set("SIP/100-274e", "t=4") in new stack
-- Executing GotoIf("SIP/100-274e", "4<3?3:7") in new stack
-- Goto (default,123,3)
-- Executing NoOp("SIP/100-274e", "20051118-153145 - 4") in new stack
-- Executing MP3Player("SIP/100-274e", "/var/lib/asterisk/mohmp3/deck.mp3")
in new stack
Nov 18 15:31:48 NOTICE[5414]: app_mp3.c:108 timed_read: Poll timed
out/errored o
ut with 0
  I have been trying to figure this out for the past few days. I think it
must be some stupid mistake of mine, but just can't figure out what/where.
 Please help.
Thank you very much.
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051118/5bd994e5/attachment.htm


More information about the asterisk-users mailing list