简体   繁体   English

如何通过预言从外部应用程序通过星号中继拨打电话号码?

[英]How to call telephone number through asterisk trunk from external application talking through prophecy?

Wow, that title was a mouthful... 哇,这个头衔真是令人...目结舌...

I'm sure that sounds very confusing at first glance. 我相信乍一看听起来很令人困惑。 This is the basis of what I've got going on: 这是我要做的事情的基础:

I have: 我有:
-a server set up with Asterisk and Voxeo Prophecy running on it. -设置了运行Asterisk和Voxeo Prophecy的服务器。
-Prophecy set up as extension for Asterisk. -预言设置为星号的扩展名。
-another server running an external application. -运行外部应用程序的另一台服务器。

The external application generates some two XMLs: one ccxml and one vxml file, for Voxeo to read and execute, which then initiates a call to (up until today) an asterisk extension. 外部应用程序生成约两种XML:一个ccxml和一个vxml文件,供Voxeo读取和执行,然后启动对星号扩展名的调用(直到今天)。

The project is moving along, though, and yesterday I got a SIP Trunk and a DID number in hopes to turn this application into something that can call real people. 但是,该项目正在进行中,昨天我得到了一个SIP Trunk和一个DID号码,希望将这个应用程序转变成可以称呼真人的东西。

The trunk is working on Asterisk, and I've been able to initiate calls through a softphone (X-lite) to my cell phone number. 中继线正在使用Asterisk,并且我已经能够通过软件电话(X-lite)向我的手机号码发起呼叫。 That works just fine. 那很好。

However, when I try to initiate calls from the external application, it does not go through. 但是,当我尝试从外部应用程序发起调用时,它没有通过。 I've tried numerous things to try to fix it but it's just not working. 我已经尝试了很多方法来修复它,但是它没有用。

Prior to the trunk/DID business, the working code to call an asterisk extension was as follows: 在干线/ DID业务之前,调用星号扩展名的工作代码如下:

 <createcall>dest="'sip:*Extension here*@*IP Address here*'" 
 connectionid="myOutBoundConnectionID" timeout="'45s'" callerid="'*Extension here*
 @*IP Address here*'"</createcall>

My first thought was that I might need to have a trunk specified for Prophecy as well as for Asterisk, but I'm probably way off base. 我首先想到的是,我可能需要为Prophecy和Asterisk指定一个主干,但是我可能离基准线很远。

The reformatted code that I thought would work was as follows: 我认为可以重新格式化的代码如下:

<createcall>dest="'tel:*Phone Number here*'" connectionid=
"myOutBoundConnectionID" timeout="'45s'" callerid="'*Phone Number here*
'"</createcall>

...but this does not work at all. ...但是这根本不起作用。

The log files say things like this when I call from my softphone: 当我从网络电话拨打电话时,日志文件中会显示以下内容:

-- Executing [*My phone number*@from-internal:1] Macro("SIP/1001-0000007d", "user-
callerid,LIMIT,") in new stack

but when I call from the external application, things are a little different: 但是当我从外部应用程序调用时,情况有所不同:

-- Executing [*My phone number*@from-sip-external:1] NoOp("SIP/*IP Address:5080-0000007c", 
"Received incoming SIP connection from unknown peer to *phone number*") in new stack

Can anyone shed some light on what is happening here? 任何人都可以对这里发生的事情有所了解吗? Thanks in advance! 提前致谢!

You should make your reformatted create call look something like this: 您应该使重新格式化的create调用看起来像这样:

<createcall>dest="'tel:*Phone Number here*@*IP Address of Asterisk*'" connectionid= "myOutBoundConnectionID" timeout="'45s'" callerid= "'*Prophecy's Asterisk Extension'"</createcall>

Make sure your Asterisk server has an outbound rule to hit 10-digit phone number via your SIP trunk (I assume it does if your softphone calls work. 确保您的Asterisk服务器有一个出站规则,可以通过您的SIP中继线拨打10位电话号码(如果您的软件电话通话正常,我认为可以。)

Depending on your SIP provider, this may result in your outbound calls appearing to come from the Extension number, not whatever external number you want to present. 根据您的SIP提供商,这可能会导致您的出站呼叫似乎来自分机号码,而不是您要提供的任何外部号码。 If you wish to present another number, you probably need to get prophecy to register the SIP station it uses, if you haven't already (in Prophecy's config.xml ), in fact you may need/have to do this anyway before this will work. 如果您希望提供另一个号码,则可能需要获得预言以注册其使用的SIP站,如果尚未注册(在Prophecy的config.xml ),那么实际上,您可能需要/必须这样做。工作。

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

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