Asterisk originate response says successfully queued but nothing more

前端 未结 2 1225
执念已碎
执念已碎 2021-01-21 21:55

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 ne

2条回答
  •  深忆病人
    2021-01-21 22:32

    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!

提交回复
热议问题