Scripting Custom Recording Name?

Hey All,

So I have been tasked with a way to script out a custom recording name, when we dial numbers on our PBX. Currently we use a linux system that generates a .call file with the outbound number to dial, as well as the station to send the call to. After we create the file, we upload it to a shared folder that points to the PBX’s /var/spool/asterisk/outgoing folder, so the call is made. What I need to do is find someway to also put in what the recording for the call should be in that .call file so we can write it in our linux system’s data and easily find the match in the recordings folder on the PBX… So my question is:

Is this even possible, and if so what is the best way to do it?

A couple of things, it is only safe to “upload” it to outgoing if it ‘touched’ in the future.

All monitored calls are in the


directory structure, each file is uniquely named necessary info to find it but you have not said what the relationship of the call file to the dialed number is.

Here is an example of a “.call” file:

Channel: Local/202
Context: from-internal
Extension: 4404760408
CallerID: AutoDialer <4404760408>

This is created on my linux server, and then a script on the PBX grabs all .call files from the shared folder we created and puts them into the outgoing folder, which initiates a call. The agent at 202 will hear their phone ring, and as soon as they pick it up, it will make an outgoing call to the “extension” listed.

This works fine, and has been for over 5 years. I just want to know if I can add a line to this .call file to set a specific recording name, but piping in extra info from our linux system, like their ID number, project name, etc.

I don’t think there are any facilities for custom recording names, but there are a few settings that might be able to help you. The most obvious one is the “AccountID” (I think) field, which you can set and do things with all day.

On a different note, you might want to look at using ARI to initiate your calls (instead of a call file). The process is more interactive and allows you to monitor the call and gather information (like recording file name and unique ID) in real time.