Not playing voice prompt

I have an odd problem. It only occurs when using a loopback trunk. If the call is directed to be answer by the system which then plays an audio prompt, it plays fine when calling in from an external line but it doesnt play when calling in using my loopback trunk.

Seems to be because the system can’t find the file in the correct format required - ie alaw:

[2018-05-24 20:09:27] WARNING[1595][C-00001029]: file.c:774 ast_openstream_full: File custom/conference_greeting does not exist in any format
[2018-05-24 20:09:27] WARNING[1595][C-00001029]: file.c:1247 ast_streamfile: Unable to open custom/conference_greeting (format (alaw)): No such file or directory
[2018-05-24 20:09:27] WARNING[1595][C-00001029]: pbx_builtins.c:1100 pbx_builtin_background: ast_streamfile failed on Local/[email protected];2 for custom/conference_greeting

However the file does exist and play sucessfully on external calls:

– Executing [[email protected]:20] ExecIf(“SIP/spitfire-00000cf2”, “1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [[email protected]:21] Goto(“SIP/spitfire-00000cf2”, “conferencepro-ivr,s,1”) in new stack
– Goto (conferencepro-ivr,s,1)
– Executing [[email protected]:1] Set(“SIP/spitfire-00000cf2”, “MSG=custom/conference_greeting”) in new stack
– Executing [[email protected]:2] Set(“SIP/spitfire-00000cf2”, “LOOPCOUNT=0”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/spitfire-00000cf2”, “0?begin”) in new stack
– Executing [[email protected]:4] Answer(“SIP/spitfire-00000cf2”, “”) in new stack
– Executing [[email protected]:5] Wait(“SIP/spitfire-00000cf2”, “1”) in new stack<\code>

both wav and alaw filies are present.

Can’t work out why it won’t play the prompt.

Try to convert audio with wav 8000hz

it is possible that your channel’s ‘language’ is not ‘en_GB’ , I would copy (with the correct permissions and ownership) everything in /var/lib/asterisk/sounds/en_GB/custom into /var/lib/asterisk/sounds/custom/

It’s all a language thing, if your channel can’t find the file in it’s ‘language’ it should look recursively in /var/lib/asterisk/sounds//custom ( can be null)

1 Like

Yes you were right @dicko Copying the prompts to /var/lib/asterisk/sounds/custom did the trick.

Do you think this is a bug I should open a tracker for or do I have something set wrong on my system so that it isn’t picking the up language correctly for the loopback trunk? Otherwise I need to manually copy and maintain the prompts in both locations.

This is an upgraded system accross a few versions now - currently running and I know that en_GB wasn’t an option when I orignally installed it 4 or 5 years ago. I remember changing it in System languages module when I noticed that en_GB was now an option.

Unlikely a bug, its just how Asterisk looks for audio files, it starts at the /var/lib/asterisk/sounds/your-language/yourfile-withdirectory where your-language is that of the current channel, it will transcode if necessary and possible, then will iteratively chase up through the hierarchy to /var/lib/asterisk/sounds/en/ and ultimately to /var/lib/asterisk/sounds if nothing can be found, so if you have the recording in en_GB but the channel is not en_GB then it won’t be found.

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