1

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?

Community
  • 1
  • 1
yahoopoeisis
  • 11
  • 1
  • 5

2 Answers2

0

Use

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

or use Answer action via ami.

http://www.voip-info.org/wiki/view/Asterisk+manager+API

You need listen event, when see agi-async event issue Answer on same channel. For example you can do playback command with answer.

Very likly you need start with AGI interface, which is much more simpler for understanding. Not use agi:async, it require understanding of asterisk internals.

arheops
  • 15,544
  • 1
  • 21
  • 27
  • Thanks for your response. I tried your suggested dialplan but had the same outcome. Not sure what you mean by 'Answer Action via ami.', I couldn't find that in the link provided. I tried calling a custom extension that plays a radio station stream and it worked, I thought I might be able to get it to work with a regular SIP extension though. – yahoopoeisis Aug 18 '14 at 06:07
  • In link provided you can see Command. Which can execute any asterisk dialplan command including Answer. I think you need read asterisk's book or hire expert – arheops Aug 18 '14 at 06:21
  • The command parameter issues Asterisk CLI commands. There isn't any CLI command for answer. – yahoopoeisis Aug 18 '14 at 07:13
0

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.

yahoopoeisis
  • 11
  • 1
  • 5