简体   繁体   English

星号ConfBridge在Dialplan中共享频道变量

[英]Asterisk ConfBridge sharing Channel Variables in dialplan

Am trying to create an inbound calling application where in a caller calls Asterisk , the caller channel identifies an extension to dial from an DB , then Asterisk originates a call to that extension and which inturn creates a conference and the caller is looped into the conference. 我试图创建一个入站呼叫应用程序,其中呼叫者调用Asterisk,呼叫者通道标识要从数据库拨打的分机,然后Asterisk发起对该分机的呼叫,这反过来又创建了一个会议,而该呼叫者被循环到会议中。 Am using the Originate application and the ConfBridge. 我正在使用Originate应用程序和ConfBridge。 The challenge I am facing is: 1)the variable identified in the caller channel is not inherited to the calle(extension) channel ,inspite of using the __ prefix to my variable. 我面临的挑战是:1)尽管在变量中使用了__前缀,但在调用者通道中标识的变量不会继承到calle(extension)通道。 2)I then decided to use the Asterisk DB. 2)然后我决定使用Asterisk DB。 By using the ${UNIQUEID} as the key to store my values and thereby retrieve the variables in different channels. 通过使用$ {UNIQUEID}作为存储我的值的键,从而在不同的通道中检索变量。 This proved futile since - upon using the Originate application for my second channel , the UNIQUEID also varies. 这被证明是徒劳的,因为-在将Originate应用程序用于第二个频道后,UNIQUEID也有所不同。

Below is a simplied version of my application(Approach1): 以下是我的应用程序(Approach1)的简化版本:

    [local]
exten = main,1,Answer()
exten = main,n,Set(__operator=201005)
exten = main,n,GoSub(operator,logintoconf,1)
exten = main,n,GoSub(caller,logintoconf,1)


[caller]
exten = logintoconf,1,ConfBridge(${operator},escalationbridge,caller)
exten = logintoconf,n,Return()

[operator]
exten = logintoconf,1,Originate(SIP/201005,exten,handler-callee,callee,1)
exten = logintoconf,n,NoOp("Call complete" ${DIALSTATUS} )
exten = logintoconf,n,Return()


[handler-callee]
exten = callee,1,Set(CHANNEL(hangup_handler_push)=hangup-callee,s,1)
exten = callee,n,NoOp(handler-callee................)
exten = callee,n,ConfBridge(${operator},escalationbridge,operator)

[hangup-caller]
exten = s,1,NoOp("Hangup caller" ${CHANNEL} )
exten = s,n,Hangup
exten = s,n,Return()

[hangup-callee]
exten = s,1,NoOp("Calleee Hangup " ${CHANNEL} )
exten = s,n,Hangup
exten = s,n,Return()

in the above the __operator , does n't inherit the values to the operator channel. 在上面的__operator中,不会将值继承到操作员通道。

Appreciate any inputs that can help me share the variables using the Dialplan. 感谢所有可以帮助我使用Dialplan共享变量的输入。

Thanks. 谢谢。

You can inherit only in inherited channels. 您只能在继承的通道中继承。 Since you are originating new channels, they can't inherit. 由于您是在发起新频道,因此它们无法继承。

You can send to second,third etc channel global variable name or use SHARED function. 您可以将第二,第三等通道全局变量名称发送到第二个或第三个通道,或使用SHARED函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM