Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asterisk 星号抢占和通道中的呼叫者_Asterisk_Voip - Fatal编程技术网

Asterisk 星号抢占和通道中的呼叫者

Asterisk 星号抢占和通道中的呼叫者,asterisk,voip,Asterisk,Voip,我想在星号中有先发制人的电话。我认为该功能不支持星号,因此我尝试按照类似于本线程中所示的simliar算法来实现它: 所以我在这一步中遇到了问题: 检查呼叫中的B是否具有较低优先级的呼叫方ASTDB或REALTIME或fastagi脚本。 我知道如何使用例如DEVICE_STATEdevice cmd来检查B是否在调用中,但我无法知道谁是另一个调用方以查看他的优先级 那么,我怎样才能知道一个用户是否在通话中,而这个通话中的另一个用户是谁呢 非常感谢。您可以使用 SHARED(varname[,c

我想在星号中有先发制人的电话。我认为该功能不支持星号,因此我尝试按照类似于本线程中所示的simliar算法来实现它:

所以我在这一步中遇到了问题:

检查呼叫中的B是否具有较低优先级的呼叫方ASTDB或REALTIME或fastagi脚本。 我知道如何使用例如DEVICE_STATEdevice cmd来检查B是否在调用中,但我无法知道谁是另一个调用方以查看他的优先级

那么,我怎样才能知道一个用户是否在通话中,而这个通话中的另一个用户是谁呢


非常感谢。

您可以使用

SHARED(varname[,channel])
  -= Info about function 'SHARED' =- 

[Synopsis]
Gets or sets the shared variable specified. 

[Description]
Implements a shared variable area, in which you may share variables between
channels.
The variables used in this space are separate from the general namespace
of the channel and thus ${SHARED(foo)} and ${foo}  represent two completely
different variables, despite sharing the same name.
Finally, realize that there is an inherent race between channels operating
at the same time, fiddling with each others' internal variables, which is
why this special variable namespace exists; it is to remind you that variables
in the SHARED namespace may change at any time, without warning.  You should
therefore take special care to ensure that when using the SHARED namespace,
you retrieve the variable and store it in a regular channel variable before
using it in a set of calculations (or you might be surprised by the
result).
确定您已经首先设置了变量。 您可以使用in call宏在变量或ASTDB中设置当前讲话频道的名称


您想要的任何解决方案的总体复杂性都高于平均水平,需要至少有1-2年丰富经验的人员*

其他选项-像FOP面板一样,只需聆听所有事件并记住即可