Edit system recording in another language via feature code

Hi,
is there a way to edit system recording in another language via feature code. I get
ast_openstream_full: File fr/custom/ does not exist in any format.

My recording is in english and the sound language is set by default in french.
I can edit french recording without problem but i cannot edit my custom recording in english.

Thanks.

Should i put a symbolic link between in /var/lib/asterisk/sounds/custom/fr/ tom /var/lib/asterisk/sounds/en/custom/test-rec.wav or can you change the language dynamically in the feature code of the system recording ?

One of our frankophiles may be able to move accurately answer, but I believe that all you really need to do is create the custom directory (and make it writable and readable by Asterisk) in the language file directory.

I don’t think symlinking the file is going to work the way you want it to. I’m pretty sure you need to have separate files. @dicko has done a lot of work with language customization.

There’s a “search order” to the language files that the system follows - I don’t remember what it is right off the top of my head, but it seems to me that it tries the currently defined language and looks in the …/sounds/ directory for files of the desired name.

I don’t have any experience with multi-language support, especially the “front end” stuff (getting the files built and added), but it seems like it’s kind of a deliberate pain.

ok thanks file are playing well, but the problem is when i use the star feature code to edit the recording, freepbx seem to look in the default sound language but the recording in question is not in the default sound language. The default sound language is fr for french and the system recording i’m trying to edit is in english in directory en.

Thanks.

https://wiki.asterisk.org/wiki/display/AST/Sound+Prompt+Searching+based+on+Channel+Language

You can set the language in the dialplan, with

Set(CHANNEL(language)=<lang>)

At the point that the callers desire have been determined

I’m not aware of a setting that allows you to specify the language of the files you want to edit. For example, when using the star feature code, I’m pretty sure your extension’s default language will be referenced. Since (I’m guessing) your extension is set to ‘fr’, it’s going to bang on the French sound file directory. Have you tried setting your extension’s default language to ‘en’ and see if that helps.

The logs will tell you how the system is processing the file selection. Perhaps a log extract of that bit of the process could help us understand what’s happening and perhaps send you on your way to a solution.

The newer system (13 and above) handles multi-language support way better than older systems, but there may still be room for improvement. If you can’t get this knocked out, it might be time for a feature request?

Yes if i change the language of the phone it’s working … But then i will not be able to edit french recording.

-- Executing [*29378@from-internal:1] Macro("SIP/235-000015f9", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/235-000015f9", "TOUCH_MONITOR=1528209603.92649") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/235-000015f9", "AMPUSER=235") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/235-000015f9", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/235-000015f9", "1?Set(REALCALLERIDNUM=235)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/235-000015f9", "AMPUSER=235") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/235-000015f9", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/235-000015f9", "AMPUSERCIDNAME=Philippe Bolduc") in new stack
-- Executing [s@macro-user-callerid:8] ExecIf("SIP/235-000015f9", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:9] GotoIf("SIP/235-000015f9", "0?report") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/235-000015f9", "AMPUSERCID=235") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/235-000015f9", "__DIAL_OPTIONS=trwW") in new stack
-- Executing [s@macro-user-callerid:12] Set("SIP/235-000015f9", "CALLERID(all)="Philippe Bolduc" <235>") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("SIP/235-000015f9", "0?limit") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("SIP/235-000015f9", "0?Set(GROUP(concurrency_limit)=235)") in new stack
-- Executing [s@macro-user-callerid:15] ExecIf("SIP/235-000015f9", "1?Set(CHANNEL(language)=fr)") in new stack
-- Executing [s@macro-user-callerid:16] NoOp("SIP/235-000015f9", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("SIP/235-000015f9", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,18)
-- Executing [s@macro-user-callerid:18] GotoIf("SIP/235-000015f9", "0?continue") in new stack
-- Executing [s@macro-user-callerid:19] ExecIf("SIP/235-000015f9", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
-- Executing [s@macro-user-callerid:20] Set("SIP/235-000015f9", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:21] GotoIf("SIP/235-000015f9", "1?continue") in new stack
-- Goto (macro-user-callerid,s,37)
-- Executing [s@macro-user-callerid:37] Set("SIP/235-000015f9", "CALLERID(number)=235") in new stack
-- Executing [s@macro-user-callerid:38] Set("SIP/235-000015f9", "CALLERID(name)=Philippe Bolduc") in new stack
-- Executing [s@macro-user-callerid:39] GotoIf("SIP/235-000015f9", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:40] Set("SIP/235-000015f9", "CDR(cnam)=Philippe Bolduc") in new stack
-- Executing [s@macro-user-callerid:41] Set("SIP/235-000015f9", "CDR(cnum)=235") in new stack
-- Executing [s@macro-user-callerid:42] Set("SIP/235-000015f9", "CHANNEL(language)=fr") in new stack
-- Executing [*29378@from-internal:2] Wait("SIP/235-000015f9", "2") in new stack
-- Executing [*29378@from-internal:3] Macro("SIP/235-000015f9", "systemrecording,docheck,custom/test-rec-,1234") in new stack
-- Executing [s@macro-systemrecording:1] GotoIf("SIP/235-000015f9", "0?invalid") in new stack
-- Executing [s@macro-systemrecording:2] Set("SIP/235-000015f9", "TMPLANG=fr") in new stack
-- Executing [s@macro-systemrecording:3] Set("SIP/235-000015f9", "RECFILE=fr/custom/test-rec-") in new stack
-- Executing [s@macro-systemrecording:4] Set("SIP/235-000015f9", "LISTEN=docheck") in new stack
-- Executing [s@macro-systemrecording:5] ExecIf("SIP/235-000015f9", "1?Authenticate(1234)") in new stack
-- <SIP/235-000015f9> Playing 'agent-pass.g722' (language 'fr')
-- Remote UNIX connection
-- Remote UNIX connection disconnected
-- <SIP/235-000015f9> Playing 'auth-thankyou.g722' (language 'fr')
-- Executing [s@macro-systemrecording:6] Goto("SIP/235-000015f9", "docheck,1") in new stack
-- Goto (macro-systemrecording,docheck,1)
-- Executing [docheck@macro-systemrecording:1] Playback("SIP/235-000015f9", "beep") in new stack
-- <SIP/235-000015f9> Playing 'beep.g722' (language 'fr')
-- Executing [docheck@macro-systemrecording:2] BackGround("SIP/235-000015f9", "fr/custom/test-rec-,m,fr,macro-systemrecording") in new stack

[2018-06-05 10:40:08] WARNING[41314][C-00000e7d]: file.c:774 ast_openstream_full: File fr/custom/test-rec- does not exist in any format
[2018-06-05 10:40:08] WARNING[41314][C-00000e7d]: file.c:774 ast_openstream_full: File fr/custom/test-rec- does not exist in any format
[2018-06-05 10:40:08] WARNING[41314][C-00000e7d]: file.c:1247 ast_streamfile: Unable to open fr/custom/test-rec- (format (g722)): No such file or directory
[2018-06-05 10:40:08] WARNING[41314][C-00000e7d]: file.c:1247 ast_streamfile: Unable to open fr/custom/test-rec- (format (g722)): No such file or directory
[2018-06-05 10:40:08] WARNING[41314][C-00000e7d]: pbx_builtins.c:1100 pbx_builtin_background: ast_streamfile failed on SIP/235-000015f9 for fr/custom/test-rec-,m,fr,macro-systemrecording
[2018-06-05 10:40:08] WARNING[41314][C-00000e7d]: pbx_builtins.c:1100 pbx_builtin_background: ast_streamfile failed on SIP/235-000015f9 for fr/custom/test-rec-,m,fr,macro-systemrecording
– Executing [docheck@macro-systemrecording:3] Wait(“SIP/235-000015f9”, “1”) in new stack
– Executing [docheck@macro-systemrecording:4] Goto(“SIP/235-000015f9”, “confmenu,1”) in new stack
– Goto (macro-systemrecording,confmenu,1)
– Executing [confmenu@macro-systemrecording:1] BackGround(“SIP/235-000015f9”, “to-listen-to-it&press-1&to-accept-recording&press-2&to-rerecord-it&press-star&language&press-3,m,fr,macro-systemrecording”) in new stack
– <SIP/235-000015f9> Playing ‘to-listen-to-it.g722’ (language ‘fr’)
– <SIP/235-000015f9> Playing ‘press-1.g722’ (language ‘fr’)
== Spawn extension (macro-systemrecording, confmenu, 1) exited non-zero on ‘SIP/235-000015f9’ in macro ‘systemrecording’
== Spawn extension (from-internal, *29378, 3) exited non-zero on ‘SIP/235-000015f9’
– Executing [h@from-internal:1] Macro(“SIP/235-000015f9”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/235-000015f9”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“SIP/235-000015f9”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“SIP/235-000015f9”, " monior file= ") in new stack
– Executing [s@macro-hangupcall:5] AGI(“SIP/235-000015f9”, “attendedtransfer-rec-restart.php,”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
– <SIP/235-000015f9>AGI Script attendedtransfer-rec-restart.php completed, returning 0
– Executing [s@macro-hangupcall:6] Hangup(“SIP/235-000015f9”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/235-000015f9’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/235-000015f9’

This is an unusual request, but there are a couple of things you could try:

  1. Set up a special context that sets your channel language variable to one or the other based on a key-press.
  2. Submit a feature request that asks for the same thing.

I’d lean toward 2.

For now, your workaround would be to either change your extension’s language when you want to work in a different language, or set up a second phone (or line on your phone) so that the language for that extension is the “other” language you want to work with.

That workaround might actually be a good idea anyway. That way, you can test your system in both languages without having to change the system or just through a lot of hoops to get what you need set up.

That would also be my recommendation for an immediate answer. Just have a second ext on your phone. It is super easy to know what you are working with at that point.

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