[Asterisk-Users] Possible bug with GotoIfTime

Bill Michaelson bill at cosi.com
Sat Jan 7 16:42:05 MST 2006


Running a fairly recent subversion release of Asterisk, I'm running into 
a problem using labels (as opposed to priorities) with this application.

Here is the dialplan segment:

; isolate gotoiftime bug with labels
;exten => 806,1,GotoIfTime(8:00-20:00,*,*,*?2:4)
exten => 806,1,GotoIfTime(8:00-20:00,*,*,*?light:dark)
exten => 806,n(light),noop(light)
exten => 806,n,hangup
exten => 806,n(dark),noop(dark)
exten => 806,n,hangup

As coded, this is what happens when it executes:

    -- Executing GotoIfTime("IAX2/hack-2", 
"8:00-20:00|*|*|*?light:dark") in new stack
Jan  7 18:38:09 NOTICE[28137]: pbx.c:1705 pbx_extension_helper: No such 
label 'light:dark' in extension '806' in context 'default'
Jan  7 18:38:09 WARNING[28137]: pbx.c:6312 ast_parseable_goto: Priority 
'light:dark' must be a number > 0, or valid label
  == Spawn extension (default, 806, 1) exited non-zero on 'IAX2/hack-2'
    -- Hungup 'IAX2/hack-2'

But if I disable the second exten line instead of the first, it works 
properly.

Beware.





More information about the asterisk-users mailing list