Phrases not working

Status
Not open for further replies.

Craig Fox

New Member
Mar 21, 2018
26
3
3
53
It does not seem that the Phrases function is working. When initiating a Phrase through the IVR there is no playback. This is a simple, single wav file, test of the Phrases functionality and to leverage it for more complex tasks. As both the Phrase and the system recording the phrase call is available in the IVR, I did test both options and am able to play the wav file directly.

Here is a snippet from FreeSwitch when the Phrase is called by the IVR

Code:
2019-03-07 18:00:23.805059 [DEBUG] switch_ivr_play_say.c:70 No language specified - Using [en]
2019-03-07 18:00:23.825055 [ERR] switch_ivr_play_say.c:145 Can't find macro 393fa6b6-b2d6-4849-844e-348307c0b10d.

My testbed happens to be on a multi-tenant server so I'm not sure where the problems lies. Obviously, it can't find the phrase macro. I'm not sure if its a language issue, multi-tenant issue, or a general app/feature issue.

I have played with the language configuration of the phrase; trying en, en-us, and en-us callie (matching the language of the IVR). If I try nothing, FusionPBX asks for one and prevents the change. I've not had a need to utilize any of the language functionality before and don't know if this is creating the issue.

It is a multi-tenant system, so I would expect to see the domain uuid in addition to the macro uuid. It's obviously not there, but that may not have any bearing on the database call to find the recording. There is no place in the interface to select the domain or global option, but I did check to see of the phrases where domain specific... they are.

Lastly, FusionPBX is an awesome tool with and incredible amount of functionality. My experience is that some of the functions are not fully implemented or need some tweeking out of the box. Phrases my be one of those features.

Any guidance would appreciated.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
Just look in the docs, there was an error, I had exactly the same problem but now the docs are fixed.
 

krakastan

New Member
Oct 17, 2018
1
0
1
23
Same issue here - and agree with the other comments :)
The individual sound files work ok, but when not when in a phrase.
I have worked through the docs for this multi tenant install and get the same silence and output as the OP above

Any guidance would be appreciated
 

Jason Komar

New Member
May 24, 2019
1
0
1
Calgary, Alberta
In case anyone else is looking for help, I ran into this issue yesterday as well where my phrases were not working. I looked back through the commit history on the docs at GitHub. It looks like the fix in the docs mentioned in a previous post was to a screenshot that used to show en-us as the language setting in a phrase. This was changed to show using en as the setting.

After I changed my phrase setting to en, I had to go to Status >> Sip Status and hit the Flush Cache button for it to start working.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
In case anyone else is looking for help, I ran into this issue yesterday as well where my phrases were not working. I looked back through the commit history on the docs at GitHub. It looks like the fix in the docs mentioned in a previous post was to a screenshot that used to show en-us as the language setting in a phrase. This was changed to show using en as the setting.

After I changed my phrase setting to en, I had to go to Status >> Sip Status and hit the Flush Cache button for it to start working.

Thanks, that's exactly what it was, I couldn't remember. I was only debugging for someone else on here.
 

racitup

New Member
Mar 13, 2020
1
0
1
UK
Yeah I had the same problem, except in my opinion the whole language support in fusionpbx is broken. "en" whilst being a language is not sufficient to specify exactly what sound files are played. As you probably know, "en" then refers FreeSwitch to the language xml files in /etc/freeswitch or those built dynamically in /var/cache\memcache, which then in turn refers to the hard-coded en/us/callie path.

The phrase language should actually refer directly to the triple: language, dialect, voice, as should the XML files. This would allow full multi-lingual and even multi-voice support: en-us-callie, en-us-mark, en-ca-june, en-au-bruce, en-gb-john, etc and also allow phrases to be defined for multiple languages in the same domain, rather than relying on a fixed default_language, for multi-lingual ivrs for example. In your dialplan you can define the 'language' variable as en-ca-june for example and freeswitch will play the files from that language (if installed), provided there is a language xml file with a matching name defined internally.
No language specified - Using [en] refers to FreeSwitch not finding the language variable and falling back on the default_language variable set globally.

It just so happens I've fixed this in my fork (racitup), works quite well, and no more Can't find macro 393fa6b6-b2d6-4849-844e-348307c0b10d which was actually a bug in the sql lookup: it was looking up both the phrase UUID AND the language to build the cached phrase xml. So if the db phrase language string didn't exactly match the default_language, you got the error because the cached file had no content.

I'm hoping my PR's will be integrated for the long-awaited next release.
 
Last edited:

francois

New Member
Oct 3, 2019
26
9
3
56
In case someone faces the same language issue with the phrases, I have been able to find a way to make it runnung for the say and execute functions. In my case in en and fr.

1- In phrase_edit;
Use the two letters language name "en", "fr", etc.
The clear cache script has a bug; replace
$cache->delete("languages:".$phrase_language);
by
$cache->delete("languages:".$phrase_language.":".$phrase_uuid);

2- In the dialplan; Set the language variable with the corresponding two letters language name (en or fr).

3- In freeswitch app/xml_handler/resources/scripts/languages/languages.lua; replace the hardcoded "/us/callie" path with the path that correspond to the language you have installed.
 
  • Like
Reactions: Adrian Fretwell

gideon3363

New Member
Nov 29, 2021
1
0
1
33
Hi @DigitalDaz Hope you are well.

We are busy setting up our own PBX and we need to have a greeting that plays when someone calls in.

I added this under my ring group under Greeting.

I also need to play an audio file that says all agents are busy and then continue the call, and play this audio file every 30 sec or so.

I assumed I could do a phrase for this but when calling it does not start the phrase.

Is there another way you would recomend?

Regards,
Gideon
 
Status
Not open for further replies.