星号起源响应说成功排队,但仅此而已 [英] Asterisk originate response says successfully queued but nothing more

查看:95
本文介绍了星号起源响应说成功排队,但仅此而已的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用预配置的星号拨打电话(使用AMI).当我这样做时,来自Origin的响应曾经具有频道和唯一ID信息.现在,我正在尝试构建一个新的星号.一切都设置好了,但是当我打电话时,只有响应具有的信息是呼叫已成功排队".

是否在某处隐藏了诸如显示响应时显示更多信息"之类的选项?

您可以找到我得到的两种不同的答复.

这是旧的,其中包含一些有价值的信息.

Response: Success
ActionID: 6bf11dfb-4e6c-4eb4-85cd-6c8b8026019f
Message: Originate successfully queued

Event: Newchannel
Privilege: call,all
Channel: SIP/1030-000058aa
State: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
Uniqueid: 1339103821.22750

Event: Newcallerid
Privilege: call,all
Channel: SIP/1030-000058aa
CallerID: 05359348602
CallerIDName: <Unknown>
Uniqueid: 1339103821.22750
CID-CallingPres: 0 (Presentation Allowed, Not Screened)

Event: ExtensionStatus
Privilege: call,all
Exten: 1030
Context: ext-local
Status: 8

Event: Newstate
Privilege: call,all
Channel: SIP/1030-000058aa
State: Ringing
CallerID: 05359348602
CallerIDName: <unknown>
Uniqueid: 1339103821.22750

Event: Newstate
Privilege: call,all
Channel: SIP/1030-000058aa
State: Up
CallerID: 05359348602
CallerIDName: <unknown>
Uniqueid: 1339103821.22750

Event: ExtensionStatus
Privilege: call,all
Exten: 1030
Context: ext-local
Status: 1

这是新的,什么也没说

Response: Success
ActionID: 98518f9a-c7cb-4b63-8de4-e185f57508d8
Message: Originate successfully queued

谢谢.

解决方案

您没有提供有关要发送的实际操作(其参数)的太多信息,但我会进行(远距离拍摄).我认为您可能正在发送异步起源操作,但是您确实想要同步行为.

异步发起操作"表示星号会接受命令,但会异步发出调用,然后通过 event 通知您调用是否成功,该事件会在以后的某个时间到达

因此,在您的情况下,星号只是让您知道命令已到达,并且最终将放置呼叫 .在这种情况下,您应该侦听传入事件,该事件具有发起呼叫的操作的actionid,然后在该时间做出反应.

但是,如果您想以同步的方式知道呼叫是否真正被应答(即:在呼叫具有拨号状态之前,获取星号以不响应您的操作),请尝试设置Origin动作的async参数为假.

请参阅: https://wiki.asterisk.org/wiki/display/AST/ManagerAction_Originate .注意异步"参数,这就是您要寻找的.

此处也对此进行了描述: http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate

希望有帮助!

I once used pre-configured asterisk to make calls (using AMI). When I do that the response from originate used to have channel and unique id infos. Now I'm trying to build a new Asterisk. Everything is set but when I call originate only info that response has is "call successfully queued".

Is there any option like "Show extra info on response" hidden somewhere?

You can find the two different responses I get.

this one is the old one, includes some valuable info.

Response: Success
ActionID: 6bf11dfb-4e6c-4eb4-85cd-6c8b8026019f
Message: Originate successfully queued

Event: Newchannel
Privilege: call,all
Channel: SIP/1030-000058aa
State: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
Uniqueid: 1339103821.22750

Event: Newcallerid
Privilege: call,all
Channel: SIP/1030-000058aa
CallerID: 05359348602
CallerIDName: <Unknown>
Uniqueid: 1339103821.22750
CID-CallingPres: 0 (Presentation Allowed, Not Screened)

Event: ExtensionStatus
Privilege: call,all
Exten: 1030
Context: ext-local
Status: 8

Event: Newstate
Privilege: call,all
Channel: SIP/1030-000058aa
State: Ringing
CallerID: 05359348602
CallerIDName: <unknown>
Uniqueid: 1339103821.22750

Event: Newstate
Privilege: call,all
Channel: SIP/1030-000058aa
State: Up
CallerID: 05359348602
CallerIDName: <unknown>
Uniqueid: 1339103821.22750

Event: ExtensionStatus
Privilege: call,all
Exten: 1030
Context: ext-local
Status: 1

and this is the new one, says nothing

Response: Success
ActionID: 98518f9a-c7cb-4b63-8de4-e185f57508d8
Message: Originate successfully queued

Thanks.

解决方案

You are not giving much information about the actual action you are sending (its parameters), but I'll take a (long?) shot. I think that probably you are sending an async originate action, but you really want the sync behavior.

An "async originate action" means that asterisk will accept the command, but will place the call asynchronously, and then will let you know if it succeeded or not with an event that will arrive sometime later.

So, in your case, asterisk is just letting you know that the command arrived, and the call will be placed eventually. In this case, you should listen for incoming events that have the actionid of the action that originated the call, and react upon at that time.

But, if you want to know in a synchronous way if the call actually was answered or not (i.e: get asterisk to not respond to your action until the call has a dialstatus), try setting the async argument of the originate action to false.

See: https://wiki.asterisk.org/wiki/display/AST/ManagerAction_Originate . Notice the "async" argument, that's what you're looking for.

This is also descibed here: http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate

Hope it helps!

这篇关于星号起源响应说成功排队,但仅此而已的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆