Issues with default Language Code extension setting in FPBX15 (turns out my mistake)


#1

I happened to notice that one of my FPBX 15 boxes has problems when I dial the speaking clock destination(*60) while the others do not. All PBX are using the same version of FPBX.

Basically the “good ones” say the time (3:59:02 PM) like:
3 59 and 2 seconds PM
while the “bad” one starts to say it like:
3 o’clock 50 and then the call drops
the log shows and error about a missing sound file such as:
file.c: File digits/2-and does not exist in any format

Looking at the logs to compare the good vs bad, the only difference before it starts playing is that the “good” ones have language set differently:
pbx.c: Executing [s@macro-user-callerid:22] ExecIf(“PJSIP/XXXX-YYYY”, “0?Set(CHANNEL(language)=)”) in new stack
pbx.c: Executing [s@macro-user-callerid:49] Set(“PJSIP/XXXX-YYYY”, “CHANNEL(language)=en”) in new stack

while the “bad one” has those lines as:
pbx.c: Executing [s@macro-user-callerid:22] ExecIf(“PJSIP/XXXX-YYYY”, “1?Set(CHANNEL(language)=Default)”) in new stack
pbx.c: Executing [s@macro-user-callerid:49] Set(“PJSIP/XXXX-YYYY”, “CHANNEL(language)=Default”) in new stack

The ‘en’ or ‘Default’ then gets passed into the sub-hr12format function that calls SayUnixTime.
The audio playback log lines show “language ‘en’” on the good ones and “language ‘Default’” on the bad one.

I’ve found no other differences in the logs so I’m assuming that this ‘Default’ language setting is causing the different behaviour. The line 22 is in extensions_addition.conf:
exten => s,n,ExecIf($["${DB(AMPUSER/${AMPUSER}/language)}" != “”]?Set(CHANNEL(language)=${DB(AMPUSER/${AMPUSER}/language)}))

Checking the AMPUSER entries for the extensions, looks like the good PBX have the language for the extension set to nothing while the “bad” PBX has it set to ‘Default’
Looking at all AMPUSER language entries, both systems have a mix of ones with about 2/3rds set to Default. So that seems odd as well. Not sure how the AMPUSER language entry gets set for a given extension…

On both PBX, the usermanager entry for the extension has ‘Language’ set to ‘Inherit’
(If I set to English on the “bad” PBX, behaviour does not change")
The userman directory group has Language set to “Use System Language” on both PBX

Checking the extension settings, the Language code is set to ‘Default’ on the extensions.

Anyone have any ideas? It could be that this language setting is not involved at all but that is the only difference I see in the logs.


#2

OK, tried one more thing, I set the extension’s Language Code from ‘Default’ to ‘English’ on the “bad” PBX, and now the clock works for this extension.

But this means will still not work for extensions that are not set to ‘English’.
I’d rather not go and update all the extensions on all PBX from Default to English.

So - anyone know why is the AMPUSER language setting not consistently set to ‘Default’ on all extensions since that is what the FPBX console shows the Language Code is set to? (At least on all the ones I’ve spot checked)

Next I’ll test on the “good” PBX if the same problem happens on an extension that has the AMPUSER language setting set to ‘Default’ to confirm this is the actual issue… But that is for tomorrow…


#3

Also, so the reason it works if AMPUSER/xxx/language is not set, is that the dialplan defaults to ‘en’ if the AMPUSER/xxx/language is not set (at least I think that is what this code is doing lol):

[sub-hr12format]
include => sub-hr12format-custom
exten => s,1,GotoIf($[${DIALPLAN_EXISTS(sub-hr12format,${CHANNEL(language)},1)}]?sub-hr12format,${CHANNEL(language)},1:sub-hr12format,en,1)
exten => s,n,GotoIf($[${DIALPLAN_EXISTS(sub-hr12format,${CHANNEL(language)},1)}]?${CHANNEL(language)},1:en,1)


#4

So I then went to the extension and changed the Language Code back to default and applied changes. AMPUSER/xxx/language went from ‘en’ to not being set.
So looks like the issue is that it should never have been ‘Default’ but not clear how that happened on many of the extensions.


#5

OK, I believe it came in during use of the bulk importer. Looks like the languages_language column was mistakenly set to Default rather than empty - I must have been under the impression that was the correct setting at the time.
closing this…


#6

LoL no way to close this myself I guess?


(Greg Snover) #7

Just click the little Check Box at the bottom of one of your posts to solve the post.