есть такая конструкция, она работает
Код: Выделить всё
[voice_menu]
exten => 1,1,Dial(SIP/103,15,t)
exten => 1,2,Goto(106-${DIALSTATUS},1) ;
exten => 106-CHANUNAVAIL,1,Dial(SIP/${EXTEN:0:3},15,t)
exten => 106-BUSY,1,Dial(SIP/${EXTEN:0:3},15,t)
exten => 106-NOANSWER,1,Dial(SIP/${EXTEN:0:3},15,t)
Код: Выделить всё
[vioce_menu]
exten => 1,1,Dial(SIP/103,15,t) ;
exten => 1,2,Goto(106-${DIALSTATUS},1) ;
exten => _XXX-CHANUNAVAIL,1,Dial(SIP/${EXTEN:0:3},15,t)
exten => _XXX-BUSY,1,Dial(SIP/${EXTEN:0:3},15,t)
exten => _XXX-NOANSWER,1,Dial(SIP/${EXTEN:0:3},15,t)
Код: Выделить всё
Called SIP/103
-- SIP/103-00000022 is ringing
-- Nobody picked up in 15000 ms
-- Executing [1@voice_menu:2] Goto("SIP/101-00000021", "106-NOANSWER,1") in new stack
-- Goto (voice_menu,106-NOANSWER,1)
-- Channel 'SIP/101-00000021' sent to invalid extension: context,exten,priority=voice_menu,106-NOANSWER,1
-- Executing [i@voice_menu:1] Hangup("SIP/101-00000021", "") in new stack
Код: Выделить всё
dialplan show 106-BUSY@voice_menu
[ Context 'voice_menu' created by 'pbx_config' ]
'_XXX-BUSY' => 1. Dial(SIP/${EXTEN:0:3},15,t) [pbx_config]
-= 1 extension (1 priority) in 1 context. =-
dialplan show 106-NOANSWER@voice_menu
There is no existence of 106-NOANSWER@voice_menu extension
Command 'dialplan show 106-NOANSWER@voice_menu' failed.
dialplan show 106-CHANUNAVAIL@voice_menu
There is no existence of 106-CHANUNAVAIL@voice_menu extension
Command 'dialplan show 106-CHANUNAVAIL@voice_menu' failed.