我可以通过AMI创建一个新的会议室(Asterisk ConfBridge)吗?



可以通过AMI (Asterisk Manager Interface)创建新的会议室(Asterisk ConfBridge)吗?救救我吧!

这个回应是给任何像我一样挣扎过的人的,即使第一个回应和对它的评论可能已经足够了。

所以,你可以发起一个电话会议,与行动发起和应用程序ConfBridge(据我所知,它带有Asterisk,而不是独立的)。

您可以在这里看到所有可用的字段http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate

我将抛出一个示例,没有每个字段,但那些我知道和需要在我的应用程序。

这是你在星号管理器界面扔的东西,如果你想叫某人参加会议,然后添加其他人(不带注释)

Action: Originate // The action type
ActionID: CreateConf-1 // This id will be linked to further events about the action
Channel: SIP/1001 // The sipId of the peer u wanna call
Timeout: 30000 // If he doesnt respons in 30000ms, drop it
CallerID: Asterisk // The id of the caller (will be seen on target phone)
Application: ConfBridge // The application
Async: true // (NOT SURE, MAYBE BULLSHIT) If false, i think you can no longer originate while he hasn't answered
Data: 1234 // Very important, this is like the conference id, will detail above
Action: Originate
ActionID: CreateConf
Channel: SIP/1000
Timeout: 30000
CallerID: Asterisk
Application: ConfBridge
Async: true
Data: 1234

有了这个,一次一个街区,两个人将被召集到一个会议。正如你所看到的,Data字段代表呼叫的标识符,所以如果你想给你的会议一个id,使用它。这样你就可以创建和管理不同的会议。

由于我使用NAMI (Asterisk Manager Interface的nodejs库)(https://github.com/marcelog/Nami),让我也告诉你如何感谢lib。

var namiLib = require('nami');
var namiInstance = new (namiLib.Nami)(config); // See more about config (and everything else about nami) in their docs
namiInstance.open();
var action = new namiLib.Actions.Originate();
action.channel = 'SIP/1000';
action.data = '12345'; // my conferenceId
action.timeout = 30000;
action.callerID = 'Metisse's king';
action.application = 'ConfBridge';
action.async = true;
namiInstance.send(action, function (response) {
     // deal with the response
});

显然,如果您需要使用NAMI来控制其他Asterisk,则必须做一些更通用的事情来处理发送操作并验证它们,同时还要注意错误。

您可以使用动态会议(没有房间存在)功能,并使用发起命令创建呼叫到应用程序Confbridge

No。但是,您可以使用AMI重定向将呼叫转移到一段dialplan代码,该代码将读取通道变量、数据库查找或其他机制来设置新的会议。

有关ConfBridge的AMI操作的完整列表,请参阅:https://wiki.asterisk.org/wiki/display/AST/ConfBridge+10#ConfBridge10-ConfBridgeAsteriskManagerInterface(AMI)Actions

最新更新