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.
Model: S-Series IPPBX, P-Series IPPBX
Firmware: Not required
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
In first trace, the audio file path is in /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en.
in second trace, the audio file path is in /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en/record.
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. If you have more files to be replaced, add more lines that started with 'cp' command.
cp /ysdisk/support/tmp/ls_builtin_2min_record-custom.g729 /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en/record
cp /ysdisk/support/tmp/vm-incorrect.gsm /ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/en
4. Assgin execution permission for the custom script file.
support@IPPBX:~$ chmod +x /ysdisk/support/tmp/prompt.sh
5. Create rc_app.sh in /ysdisk/support and input below content.
support@IPPBX:~$ vi rc_app.sh
#this script will be execd before syscore boot command
6. Reboot pbx to make it take effect.
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.