Разобрался как чего, работает. Остался один вопрос. Сейчас диалплан выглядит так:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
Код: Выделить всё
[ Context '__func_periodic_hook_context__' created by 'func_periodic_hook' ]
'beep' (CID match '') => 1. Answer() [func_periodic_hook]
2. Playback(beep) [func_periodic_hook]
'hook' (CID match '') => 1. Set(EncodedChannel=${CUT(HOOK_CHANNEL,-,1-2)}) [func_periodic_hook]
2. Set(GROUP_NAME=${EncodedChannel}${HOOK_ID}) [func_periodic_hook]
3. Set(GROUP(periodic-hook)=${GROUP_NAME}) [func_periodic_hook]
4. ExecIf($[${GROUP_COUNT(${GROUP_NAME}@periodic-hook)} > 1]?Hangup()) [func_periodic_hook]
5. Set(ChannelToSpy=${URIDECODE(${EncodedChannel})}) [func_periodic_hook]
6. ChanSpy(${ChannelToSpy},qEB) [func_periodic_hook]
[ Context 'from-cisco' created by 'pbx_config' ]
'_XXXXX' => 1. Dial(SIP/${EXTEN}) [extensions.conf:21]
[ Context 'call-out' created by 'pbx_config' ]
'_XXXXX' => 1. ChanIsAvail(SIP/${EXTEN}&SIP/CISCO_GW/${EXTEN}) [extensions.conf:11]
2. NoOp(TEST: ${AVAILCHAN}) [extensions.conf:12]
3. Set(theChannel=${CUT(AVAILCHAN,,1)}) [extensions.conf:14]
4. NoOp(TEST: ${theChannel}) [extensions.conf:15]
5. Dial(${theChannel}/${EXTEN},,t) [extensions.conf:16]
Include => 'handup-sip' [pbx_config]
[ Context 'handup-sip' created by 'pbx_config' ]
'_X!' => 1. HangUp() [extensions.conf:8]
[ Context 'default' created by 'pbx_config' ]
-= 5 extensions (15 priorities) in 5 contexts. =-