Asterisk Outbound Call From AMI

illusivefingers used Ask the Experts™
I am having trouble originating an outbound call with Asterisk AMI, with Asterisk 1.8.  To preface this, I can originate a call with absolutely no trouble using call files.  Here's an example of a call file that works, where 903XXXXXXX is the number I'm trying to dial out:

Channel: SIP/nextiva/903XXXXXXX
Context: sample-context
Extension: 1
Priority: 1

Open in new window

However, when I connect to the AMI (and I receive notification of a successful connection), and perform the following action, I only get a "Response: Success" message and the call is not placed:

Action: Originate\r\n
Channel: SIP/nextiva/903XXXXXXX\r\n
Exten: 1\r\n
Priority: 1\r\n
Context: sample-context\r\n
Async: yes\r\n\r\n

Open in new window

There seems to be no verbose message within the Asterisk CLI to indicate that any activity is happening.  Am I doing something wrong here, or perhaps is there a way to log/output the details from the action from the AMI?  Any help is greatly appreciated!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
By trying to originate the call on the voip provider channel  you are more or less trying to place a call on a channel to itself.  

You need to set channel to the channel you want to make the call from and the extension is the phone number you dial

Action: Originate
Channel: <whatever the channel is you want to dial out from>
Context: samplecontext
Exten: 903XXXXXXX
Priority: 1

What should happen is your ip phone will ring (the one that the channel is) and then when you pick up the phone it will dial the exten 903XXXXXXX.  Functionally the the dial plan will execute the same as if you picked up the phone and dialed the number manually.

You can turn on AMI events,

or set it in the manager.conf,


This seems to be the correct solution, though I had to solve the problem of connection to the AMI, as the socket interface I was using through PHP was broken, and a few new problems stemmed from this one, which I'll post in a new thread.  Thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial