Search code examples
asteriskasteriskamiagi

Asterisk ami/agi - not able to answer call


I have followed the instructions in this thread: Asterisk AMI - pickup call. However, I am still unable to answer calls via AMI. I can make the call to the extension, but corresponding phone for that extension doesn't ring. I can then run the AMI command to answer that call, it does answer, but obviously there isn't any actual response.

Dialplan (testing with extension 116):

exten => 116,1,AGI(agi:async)

Any ideas what I am doing wrong here?


Solution

  • Found the Answer. For those wanting to answer with API Manager you can use the following -

    http://ip-address:port/asterisk/rawman?action=Originate&Channel=Local/(exten you want to answer with)@(context)&Application=Exec&Data=Pickup((exten you want to answer with)@PICKUPMARK)
    

    I am of course using http to send my requests, if you are using something else you will need to change the format.

    Or you can use the bridge command. Two channels will be created when you make a call from one extension to the other, bridge those channels and you will have better overall functionality than pickup.