Using the A(x:y) parameter in dial options to have a recording play to both caller and callee

Hi there,

Total FreePBX newb here so thanks in advance for your help!

I have some elevator phones that are currently hooked up to our old Skype for Business service as I haven’t been able to get them working correctly in FreePBX. The elevator phone auto dials security if the button is pressed. What I need FreePBX to do is a play a unique message for that elevator to the caller (elevator phone) and callee (security) when the call is answered. The recording indicates the elevator number, location, and extension of the elevator issuing the call and then connects the call after the recording is played.

I have overridden the Asterisk Dial Option to the A(x:y) parameter in the advanced setting for an extension and I have uploaded a test recording name “NoAnswer” into System Recordings and am referencing that recording in the parameter with A(NoAnswer:NoAnswer).

Call logs are showing an error the audio file does not exist:

*188412 [2023-06-07 14:43:05] WARNING[4149][C-0001776a] file.c: File NoAnswer does not exist in any format *
*188413 [2023-06-07 14:43:05] WARNING[4149][C-0001776a] file.c: Unable to open NoAnswer (format (alaw)): No such file or directory *
188414 [2023-06-07 14:43:05] ERROR[4149][C-0001776a] app_dial.c: error streaming file ‘NoAnswer’ to callee

Do I need place the recordings in a different location?

Thanks for the help!

Quick follow up. It works when the recording is an already existing System recording. However custom recordings are not being located. Perhaps a syntax change in the A(x:y) parameter to reference the custom folder?

You can use a ‘fully qualified’ path to the file, i.e. starting with / , it must be readable by the asterisk user

1 Like

Beautiful! That did it. Full syntax that worked is A(/var/lib/asterisk/sounds/en/custom/recording)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.