Привет!
Дайте, пожалуйста наводку, как лучше сделать перевод звонка в трехстороннюю конференцию
вот статья на базе Voipinfo
https://voxlink.ru/kb/asterisk-configuration/call_asterisk_confbridge/[sub-nway-ok]
exten => s,1,ChannelRedirect(${BRIDGEPEER},nway-conf,${CONFNO},1)
[nway-invite]
exten => s,1,Read(NEW_CALLEE,dial,20,i)
; Add dynamic features for n-way invite
same => n,Set(DYNAMIC_FEATURES=${DYNAMIC_FEATURES_NWAYINV})
; Determine dialing context and dial
same => n,ExecIf($[${REGEX("H" ${DIAL_OPTIONS})} = 0]?Set(_DIAL_OPTIONS=${DIAL_OPTIONS}H))
same => n,Set(CALLER=${CALLERID(num)})
;same => n,Set(DIALOUT_CONTEXT=${SIPPEER(${CALLER},context)})
same => n,Set(DIALOUT_CONTEXT="to_internal")
same => n,ExecIf($["${DIALOUT_CONTEXT}" = ""]?Set(DIALOUT_CONTEXT=from-internal))
same => n,Dial(Local/${NEW_CALLEE}@from-internal,,gH)
same => n,Set(DYNAMIC_FEATURES=${DYNAMIC_FEATURES_NWAY})
same => n,ChannelRedirect(${CHANNEL(name)},nway-conf,${CONFNO},1)
[nway-conf]
exten => _X.,1,Answer
same => n,Set(__CONFNO=${EXTEN})
same => n,Set(DYNAMIC_FEATURES=${DYNAMIC_FEATURES_NWAY})
same => n,Set(CONFBRIDGE(bridge,language)=${CHANNEL(language)})
same => n,Set(CONFBRIDGE(user,announce_user_count)=no)
same => n,Set(CONFBRIDGE(user,announce_join_leave)=no)
same => n,Set(CONFBRIDGE(user,announce_only_user)=no)
same => n,Set(CONFBRIDGE(user,music_on_hold_when_empty)=yes)
same => n,ConfBridge(${CONFNO},,,nway_menu)
same => n,Goto(nway-invite,s,1)
[sub-nway-start]
exten => s,1,Set(__CONFNO=${UNIQUEID})
same => n,ChannelRedirect(${BRIDGEPEER},nway-conf,${CONFNO},1)
same => n,Read(NEW_CALLEE,dial,20,i)
; Add dynamic features for n-way invite
same => n,Set(DYNAMIC_FEATURES=${DYNAMIC_FEATURES_NWAYINV})
; Determine dialing context and dial
same => n,ExecIf($[${REGEX("H" ${DIAL_OPTIONS})} = 0]?Set(_DIAL_OPTIONS=${DIAL_OPTIONS}H))
same => n,Set(CALLER=${CALLERID(num)})
;same => n,Set(DIALOUT_CONTEXT=${SIPPEER(${CALLER},context)})
same => n,Set(DIALOUT_CONTEXT=to-internal)
same => n,ExecIf($["${DIALOUT_CONTEXT}" = ""]?Set(DIALOUT_CONTEXT=from-internal))
same => n,Dial(Local/${NEW_CALLEE}@${DIALOUT_CONTEXT},,gH)
same => n,Set(DYNAMIC_FEATURES=${DYNAMIC_FEATURES_NWAY})
same => n,ChannelRedirect(${CHANNEL(name)},nway-conf,${CONFNO},1)
рушится канал, который создал конференцию:
Executing [s@sub-nway-start:11] ChannelRedirect("PJSIP/103-00000013", "PJSIP/103-00000013,nway-conf,1604671198.31,1") in new stack
[Nov 6 14:00:43] ERROR[25588][C-0000000c]: app_stack.c:1043 gosub_run: PJSIP/103-00000013 An async goto just messed up our execution location.