OK,
I figured it out after far too many hours!
Here are the details incase anyone else has the same issues. First the issue is I wanted to automate voice broadcast campaigns where we could contact people by taking numbers from our database and dialing them, playing information, and then after it was completed give them the option if they wanted to speak to someone press 1 and then put it in a queue.
my setup is Freepbx and asterisk 10.
First things first, is I needed to setup the dial plan and context. This was a big issue since it DID NOT work by specifying an extension. It would just hang up, so what I did instead was use “s”
here is the actual dial plan, and I put it in extensions_custom.conf:
[call-file-test]
exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(hello-world)
exten => s,n,Wait(1)
exten => s,n(dest-ext),Goto(ivr-2,s,1)
exten => s,n,Hangup()
WHat this does is answer the call, play HELLO-WORD, wait then transfer to the ivr.
The ivr was found by opening up the extensions_additional.conf and finding what freepbx labled it as [ivr-2] ;campaign ivr .
Then reload the dialplan by typing
asterisk -rx “dialplan reload”
and last but not least here is the command I send to AMI
Action: Originate
Channel: SIP/16305555555@flowroute
Context: call-file-test
Extension: s
Priority: 1
CallerID: 6305755555
async: yes
this now dials 6305555555 plays hello world, then goes to and plays the IVR I setup where the end user on the outside world can be connected into our QUEUE by pressing 1.
The biggest issue I had was for some reason I could not use an EXTENSION #, I needed to use “s”, but everything works!
Hope this saves someone else some time! Now I simply have a .net program on my front end that I can query my database and send each call to ami.