Asterisk originate response says successfully queued but nothing more

前端 未结 2 1223
执念已碎
执念已碎 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:12

    I experienced the same problem regarding receiving no OriginateResponse when using Async: true and the problem turned out to be permissions for the manager user account.

    The AMI user account needs to have either write permission "all" or write permission "call" (originate is not sufficient). Something like this:

    [username]
    secret=hello
    deny=0.0.0.0/0.0.0.0
    permit=127.0.0.1/255.255.255.0
    read=orignate,call
    write=originate,command,system,call
    
    0 讨论(0)
  • 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!

    0 讨论(0)
提交回复
热议问题