AMI Asterisk Manager Interface Originate Action

我目前正在为Asterisk Interface Manager构建一个C#.NET包装器。

我可以做简单的事情,如转移和挂断。 我现在正在建立电话会议。 我可以设置一个n用户会议,但我必须在现有活动频道的“动作:重定向”方面这样做。

我想要做的是将现在不存在的呼叫(即“核心节目频道”中没有频道)路由到我的上下文/分机,将人们放入会议室。

但我不能让“行动:起源”为任何事情工作。 当没有频道时,起源是什么把频道作为参数呢? 你传递给频道标题的是什么? SIP /对我不起作用。

提前致谢。

究竟想做什么? 您不能使用不存在的频道桥接到会议室。 如果您正在寻找创建会议,那么让人们呼叫他们的分机(或任何号码,真的)并放入会议室,这很简单。

我假设您使用的是Asterisk.NET。 originate命令需要拨打号码(这是频道),上下文以及将呼叫连接到拨号方案的扩展(这可以是硬编码的,或者可以通过AMI创建)。

假设你在扩展300上设置了一个会议室。你的originate命令看起来像这样:

OriginateAction oc = new OriginateAction(); oc.Context = "YourDialPlanContext"; oc.Priority = 1; // Channel is however you're dialing (extensions, SIP, DAHDI, etc.) oc.Channel = "SIP/12125551212@Your-Sip-Prover-Peer-Name"; // or in the alternative // oc.Channel = "ZAP/ZapChannelName/12125551212"; oc.CallerId = "9998887777"; // This is the extension you want dialed once the call is connected // 300 in our example oc.Exten = "300"; oc.Timeout = 60000; // Our timeout in ms oc.Variable = "VAR1=ABC|VAR2=25"; // If you need to pass variables to the dialplan // Async should be set to true, unless you want your code to wait until the call // is complete oc.Async = true; // Go ahead and place the call ManagerResponse originateResponse = AsteriskManager.SendAction(oc, oc.Timeout); 

瞧! 您现在已经打电话给您想要的会议参与者,一旦回答,他们将被引导到您的会议室。