Откуда: Москва
Сообщений: 3421
|
BLINDTRANSFER на Zap каналах
Всем привет! Использую 1.4, и следующий хак для возврата звонка при безусловном переводе:
[macro-stdexten];
exten => s,1,Set(__BLINDTRANSFER=${BLINDTRANSFER})
exten => s,n,Dial(${ARG1}/${ARG2},${INDIAL_TIMEOUT},${INDIAL_OPTS})
exten => s,n,ExecIf($["${BLINDTRANSFER}" != ""]|Dial|${CUT(BLINDTRANSFER,-,1)}|${INDIAL_TIMEOUT}|${INDIAL_OPTS})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(${ARG2},ju)
exten => s-NOANSWER,102,Playback(vm-nobodyavail)
exten => s-NOANSWER,103,Hangup
exten => s-BUSY,1,Voicemail(${ARG2},bj)
exten => s-BUSY,102,Answer exten => s-BUSY,103,Playtones(busy)
exten => s-BUSY,104,Wait(5)
exten => s-BUSY,105,Hangup
exten => s-CHANUNAVAIL,1,Answer
exten => s-CHANUNAVAIL,n,Playback(user)
exten => s-CHANUNAVAIL,n,Playback(has-been-disconnected)
exten => s-CHANUNAVAIL,n,Hangup
exten => _s-.,1,Goto(s-NOANSWER,1)
Это позволяет получать перевод как в обычной атс.
Вот только ложка дегтя как обычно есть :-)
[[root@pbx channels]# grep "BLINDTRANSFER" *.*
chan_iax2.c: /* Set BLINDTRANSFER channel variables */
chan_iax2.c: pbx_builtin_setvar_helper(iaxs[fr->callno]->owner, "BLINDTRANSFER", ast_bridged_channel(iaxs[fr->callno]->owner)->name);
chan_iax2.c: pbx_builtin_setvar_helper(ast_bridged_channel(iaxs[fr->callno]->owner), "BLINDTRANSFER", iaxs[fr->callno]->owner->name);
chan_sip.c: pbx_builtin_setvar_helper(current.chan1, "BLINDTRANSFER", current.chan2->name);
chan_sip.c: pbx_builtin_setvar_helper(current.chan2, "BLINDTRANSFER", current.chan1->name);
res/res_features.c: pbx_builtin_setvar_helper(peer, "BLINDTRANSFER", transferee->name);
res/res_features.c: pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", peer->name);
res/res_features.c: ast_cdr_setapp(transferer->cdr, "BLINDTRANSFER","");
res/res_features.c: pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", NULL);
Будем патчить chan_zap?
|