Custom voice (audio) prompts in A2Billing

Recently I had the chance to change a standard Voice Prompt in A2billing into a custom Voice Prompt. The message in question was “please enter the number you wish to call followed by the # key”.

This is how to do it:

First you need to record your new Voice Prompt into a WAV file. We are going to call this file “message.wav”. Then you need to save this file into your Asterisk server. We are changing a prompt in the English language, so we will save the file under /var/lib/asterisk/sounds/en and you can use WinSCP to do that.

Find out what the original file is. SSH into the server, get into Asterisk CLI, with asterisk -rv, switch on debug and verbosity with commands:

core set verbose 20
core set debug 20

Call your A2billing access number and follow the prompts until you hear the message that you want to change. You will see the name of that file coming up on screen in the Asterisk CLI. It may be hard to find as Asterisk will produce a lot of messages, but it is there.

Now you can stop the debugging and verbosity with commands:

core set debug 0
core set verbose 0

Now that you know what file needs changing, in our case it is “prepaid-enter-dest.gsm”, we can exit Asterisk CLI and, still in SSH, go to the directory:

cd /var/lib/asterisk/sounds/en

Run the following command to convert the file that we uploaded into a format that Asterisk can use (remember to substitute “message” with your own file name, and also “prepaid-enter-dest” with the file that you need to change):

sox message.wav -t raw -r 8000 -s -w -c 1 message.sln

Make a backup copy by renaming the original voice prompt with command:

mv prepaid-enter-dest.gsm prepaid-enter-dest.gsm.orig

Then create a link to the converted file with command:

ln -s message.sln prepaid-enter-dest.sln

All done. You can test your new voice prompt by calling your A2billing access number again. You should now hear your new voice prompt.

The same procedure applies to a different language, just work on the appropriate folder instead of /en.

I hope this helps,

Paolo

2 thoughts on “Custom voice (audio) prompts in A2Billing

  1. VOIP Newbee

    sox message.wav -t raw -r 8000 -s -w -c 1 message.sln didn’t recognise, but I just linked .wav file and it worked for me. I used correct file name instead of message.wav. I converted

    Freepbx+Asterisk+a2billing system

    this is great, thank you for this valuable post.

  2. matt

    Thanks for the feedback. Yes, you will be fine if the sound file is in a format Asterisk understands already.

    Matt

Comments are closed.