• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

星号发起响应说成功排队但仅此而已

用户头像
it1352
帮助1

问题说明

我曾经使用预配置的星号拨打电话(使用 AMI).当我这样做时,来自 originate 的响应曾经有频道和唯一的 id 信息.现在我正在尝试构建一个新的 Asterisk.一切都已设置,但是当我呼叫 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

这是新的,什么都不说

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

谢谢.

正确答案

#1

您没有提供有关您发送的实际操作(其参数)的太多信息,但我会尝试一下(长?).我认为您可能正在发送异步发起操作,但您确实想要同步行为.

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.

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

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.

参见:https://wiki.asterisk.org/wiki/display/AST/ManagerAction_Originate .请注意async"参数,这就是您要查找的内容.

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

这里也有描述:http://www.voip-info.org/wiki/view/Asterisk Manager API Action Originate

希望能帮到你!

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhccjhaj
系列文章
更多 icon
同类精品
更多 icon
继续加载