How to replace particular system prompt with personalized message

Description

In most firmwares, we had integrated all function-related system prompts in various country languages and packaged them into a cloud voice server. With the gradual enrichment of pbx functions, more and more new prompt tones are involved for new features, it is not an easy job to record new prompts in each new release, so we always implement English as default prompts for new features.

This document mainly introduces how to replace some particular English prompts with custom prompt through ftp and ssh in case English prompt doesn't meet your requirement, while firstly you have to record the prompt with required language by yourself.

 

Applicable Device

Model: S-Series IPPBX, P-Series IPPBX.

Firmware: Not required

 

Steps

1. Check trace from system log what the audio file is playing for the call flow and remember the audio file name which you will replace. In general you should find similar output like below two traces.

 -- <PJSIP/5678-00000067> Playing 'vm-incorrect.gsm' (language 'en')
 -- Executing [s@remote_ivr_record:9] Playback("PJSIP/5684-00000066", "record/ls_builtin_2min_record") in new stack

For first trace, the audio file path is in /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en.

For second trace, the audio file path is in /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en/record.

Considering English is default system prompt.

 

2. For appliance devices, access FTP and go to path /support/tmp/,  upload the personalized voice with same audio file name. For cloud pbx, access ssh and go to same path /support/tmp/, download the personalized voice with same audio file name with such as wget command.

 

3. Create custom script file in /ysdisk/support/tmp/prompt.sh and input below demo commands, remember to upload personalized message first, change audio file name and the path accordingly, replace en with it,gr,cz according to your default systemp prompt. If you have more files to be replaced, add more lines that started with 'cp' command.

#!/bin/sh
sleep 60
cp /ysdisk/support/tmp/demo1.wav /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en/record
cp /ysdisk/support/tmp/demo2.mp3 /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en

4. Set executable permission for prompt.sh(Only applicable for P-Series model).

support@IPPBX:~$ chmod +x /ysdisk/support/tmp/prompt.sh

5.1 Create add.sh in /ysdisk/support and input below script(Only applicable for P-Series model).

support@IPPBX:~$ vi add.sh
#!/bin/sh
#this script will be execd before syscore boot command
/ysdisk/support/tmp/prompt.sh &

5.2 Create rc_app.sh in /ysdisk/support and input below script(Only applicable for S-Series model).

support@IPPBX:~$ vi rc_app.sh
#!/bin/sh
#this script will be execd before syscore boot command
chmod +x /ysdisk/support/tmp/prompt.sh
/ysdisk/support/tmp/prompt.sh &

6. Restart pbx to make it take effect(For P-Cloud Model, restart from web interface).

support@IPPBX:~$ reboot

 

Attention

1. If you see in the call trace 'record/ls_builtin_2min_record' is playing, the original audio file should be ls_builtin_2min_record.wav or ls_builtin_2min_record.gsm, check exactly in FTP or SSH.

2. Pay attention to the audio name for appliance and cloud, both might have same file name but different file suffix, audio file mostly ends with .g729 suffix on cloud pbx.

3. Firmware update will not restore the replacement, while if you download system prompt in pbx by mistake, you need to restart pbx to make the replacement work again.

4. In case it doesn't play custom message after all steps implemented, try to convert custom message to standard asterisk request by this guide and upload to pbx again.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.