I’d like to have Asterisk wait for calls on the FXO port (without answering: The remote end just rings Asterisk a couple of times so Asterisk can pick up CID), hangup/wait, then call the user back through the FXO port.
Has someone successfully built a callback feature in Asterisk? If it’s just not possible, I was thinking of adding an “at” job + “asterisk -rx originate”, but it’s bit of a kludge.
Because you have no incoming channel on which to run the Dial application.
Basically, you use AMI Originate. If you search ianplain’s postings, you will see more details on this, e.g. tricks for getting the dialplan to start the AMI application.
Basicly the stages are.
1 get the cli of the incoming call (without answering)
2 Pass this to an external script
3 Hangup the call
4 The script by now will be running and will originate a call via (or call file) to the number passed to it
5 make the calls.
The script can be simple or as complicated as you want, Ours is complicated as we have the option to tweet, email people, also all calls are stored in a mysql database as is the internal destination.
Thanks David. According to this thread, Ian’s solution involves 1) an AGI script to 2) call Asterisk through the AMI and use the “originate” command that was introduced in 1.6. Unfortunately, I’m stuck with a 1.4
Sorry about this. That page says “Originate: Originate Call (privilege: call,all) NOTE: starting from 1.6: originate,all”, so I thought it meant I was out of luck with a 1.4.
As I already said, the party A channel has hungup, so cannot initiate a dial. In any case, what would you expect the party B channel to be connected to?
You are the second person with this same misunderstanding, recently.
Bottom line: Once a channel leads us to the dialplan, we simply cannot reuse it with Dial() from within the dialplan, even by calling Hangup() and/or jumping to another context through a local channel. Hence the need to make the callback from an outside script. It looked simple on paper.