Page 1 of 1

Need help with call recording filename

PostPosted: Thu May 28, 2020 12:16 am
by pendesarapen
Hello guys,

Good day! I have set campaign recording to "allforce" and my goal is when an inbound call is answered by an agent, i have to get the generated recording filename and pass it into a PHP Script. is there any way i can achieve this? looking forward to any help on this. :|

Thank you in advance,

Asterisk version: Asterisk 13.29.2-vici
Vicidial Version: ViciBox v.9.0.2 200415-1712

Re: Need help with call recording filename

PostPosted: Thu May 28, 2020 7:58 pm
by ambiorixg12
Use the Dispo Call URL option to add your php script and the rec name using the recording_filename variable

Re: Need help with call recording filename

PostPosted: Thu May 28, 2020 10:28 pm
by pendesarapen
ambiorixg12 wrote:Use the Dispo Call URL option to add your php script and the rec name using the recording_filename variable


Hi ambiorixg12,

Thank you for your idea. However, i am a total noob on vicidial and i don't know how to start. Can you give me example on how to do it? currently i execute my php script inside the dialplan (extensions.conf) because i am getting the $callerID value also but i have no idea how to do that using the Start Call URL or Dispo Call URL.

Re: Need help with call recording filename

PostPosted: Fri May 29, 2020 12:51 am
by pendesarapen
I got it working now. Since Vicidial executes "agi-VDAD_ALL_inbound.agi" when inbound call is answered by an agent, I've added a line of code somewhere in agi script to get the CallerID and Campaign_rec_filename and pass it to my php script. Maybe on other future requirements i can make use of the Start Call URL or Dispo Call URL.

Thank you!

Re: Need help with call recording filename

PostPosted: Fri May 29, 2020 3:26 pm
by williamconley
When a call ends, the dispo_call_url script is fired off by the server. If you do look at the instructions for the use (and paramaters) of the dispo_call_url, you will find that you can place a php script in that location and that script will be given the call information and the script will fire at the moment the agent pushes the "submit" button to indicate the outcome of the call. If you do not provide parameters, it will supply ALL information available. If you dump the $_GET in the php page, you'll find that there is a great deal of information available, including credentials. This same data set is available in start and end call as well as no-agent call urls, with slight adjustments for "information that does not yet exist" (such as "disposition/status" when the status has not yet been chosen).

This removes the need to edit any scripts in the system and allows upgrade without loss of function. While "upgrade-proof" may not seem like a big deal today, trust me when I say you really do want to keep track of every alteration in every file for when you upgrade. Vicidial has new features and bug fixes weekly (sometimes even daily), and upgrading is pretty easy. But if you have altered any files ...

Re: Need help with call recording filename

PostPosted: Mon Jun 01, 2020 2:55 am
by pendesarapen
williamconley wrote:When a call ends, the dispo_call_url script is fired off by the server. If you do look at the instructions for the use (and paramaters) of the dispo_call_url, you will find that you can place a php script in that location and that script will be given the call information and the script will fire at the moment the agent pushes the "submit" button to indicate the outcome of the call. If you do not provide parameters, it will supply ALL information available. If you dump the $_GET in the php page, you'll find that there is a great deal of information available, including credentials. This same data set is available in start and end call as well as no-agent call urls, with slight adjustments for "information that does not yet exist" (such as "disposition/status" when the status has not yet been chosen).

This removes the need to edit any scripts in the system and allows upgrade without loss of function. While "upgrade-proof" may not seem like a big deal today, trust me when I say you really do want to keep track of every alteration in every file for when you upgrade. Vicidial has new features and bug fixes weekly (sometimes even daily), and upgrading is pretty easy. But if you have altered any files ...


Hello william,

First of all, thank you very much for making it clear how it works. I understood now how to use this and i managed to get the variables available and pass it to my php script using dispo call url. I removed my previously added code inside the AGI script. I also used this documentation as reference - http://vicidial.org/docs/CALL_URL_FEATURES.txt

Again thank you :)