I have a PHP script running on a box with Asterisk 11 and FreePBX that works like this:
When a person clicks a button on a special (internal) webpage, the PBX dials the user’s extension; then when they pick up, it dials the number from the phone list that they selected on the web page.
All works fine, except I need the calls to be recorded. I’ve got all the recording checkboxes checked for the extension, but still Asterisk is not recording the call. If I just dial out normally with the phone, it records fine.
My script opens a socket to Asterisk, and sends the following (example):
Thanks for the reply! So do I use your example text in the "Channel: " line?
You mention that I should have a small timeout. What would be an example? Usually the first part, picking up the call on the person’s phone, is like a couple seconds.
freepbx*CLI> manager show command Originate
*snip*
Timeout
How long to wait for call to be answered (in ms.).
If your user doesn’t answer the call, voicemail will, and the AMI will happily bridge the external call to voicemail. Use the Timeout param to prevent that.
Ok, progress! So changing the Channel as you mentioned worked, BUT the recording shows up on the wrong CDR line. There are two entries in the CDR database: the call from the PBX to the Phone, and the call out to the final destination. The recording shows up in the call from the PBX to the station, instead of the call to the destination person.