Ticket #3286 (closed Bugs: worksforme)

Opened 2 years ago

Last modified 2 years ago

The directory introduction (dir-intro) is always played in english even if another language has been set

Reported by: jfturcot Assigned to:
Priority: minor Milestone: 2.5
Component: Languages / Translation Version: 2.4.0
Keywords: Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: Asterisk 1.4.x Backend Engine Version:

Description

I am using the language module to make the system use the french sounds after pressing 1 at the IVR, all the sounds are working perfectly but I have found one that is still played in english even if the french one is available and the permissions are ok.

That sound file is dir-intro, it is played when the caller access the directory. dir-intro is played in english but all the following sounds in the directory are played in french like they are supposed to.

Change History

10/17/08 07:50:28 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to worksforme.

The directory plays one of:

  • dir-intro-fn-oper
  • dir-intro-fn
  • dir-intro-fnln-oper
  • dir-intro-oper
  • dir-intro

depending on the mode. Take a look at your CLI to see which it is playing, if languages are working for you then either you don't have the sound file or you have permission problems, codec problems or file corruption problems.

01/12/09 22:38:56 changed by flewid

Hello,

I'd just like to note I am also having this issue.

We have three IVR's setup. One which has the options 1 and 2. 1 goes to English, 2 goes to french. Within both of those IVR's the user has the option to dial "9" which will hit the Directory AGI that's included with FreePBX.

If you hit the directory on the english side, all is well and good. If you hit the directory from the french side, the instructions are always played in english, but all the other messages (press 1 to dial this user, hang up now, etc) are played in french.

We even attempted created a new language (french-directory) that the destination was to the regular directory to ensure the channel language was 'fr' but that didn't seem to make a difference.

Notes:

- French sound files in /var/lib/asterisk/sounds/fr/
- Permissions are correct (asterisk:asterisk) and rw-r--r--
- That languageprefix = yes is turned on in asterisk.conf
- AGI Debug shows that it's indeed being set to 'fr' where appropriate
- Asterisk CLI Debug shows that it's set to 'fr' then resets itself to english (instructions only)

The debug log shows this:


-- Executing [3@app-languages:1] NoOp("DAHDI/1-1", "Changing Channel to language: fr (French-Directory)") in new stack

-- Executing [3@app-languages:2] Set("DAHDI/1-1", "CHANNEL(language)=fr") in new stack
-- <DAHDI/1-1> Playing 'dir-intro-oper' (language 'fr')
directory|default|from-did-direct|lo: -- Playing 'dir-instr' (language 'en')

So, even though it shows it's playing the instructions in french initially, it's still playing them as english. As I mentioned, all other prompts are heard properly in french. So it looks like the "dir-instr" or "dir-instr-oper" or "dir-instr-fnlv" are all hard-coded somewhere in the directory agi. We tried prefixing all of these with "fr/" but that also didn't play the french instructions.

We are currently working around this by using the internal directory application that comes with Asterisk, by adding a custom destination, and then calling this from extensions_custom.conf

[from-internal-custom]
exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Set(LANGUAGE()=fr)
;exten => s,n,AGI(directory,${DIR-CONTEXT},from-did-direct,${DIRECTORY:0:1}${DIRECTORY_OPTS}o)
exten => s,n,Directory(default|from-did-direct|lo)
exten => s,n,Playback(vm-goodbye)
exten => s,n,Hangup()
exten => o,1,Goto(from-internal,${OPERATOR_XTN},1)

This one does work :)

Any help would be appreciated on this guys.

Thanks, Matt

01/12/09 22:44:19 changed by flewid

More Complete Call Log

-- Goto (app-languages,1,1)
    -- Executing [1@app-languages:1] NoOp("DAHDI/1-1", "Changing Channel to language: fr (French)") in new stack
    -- Executing [1@app-languages:2] Set("DAHDI/1-1", "CHANNEL(language)=fr") in new stack
    -- Executing [1@app-languages:3] Goto("DAHDI/1-1", "ivr-7|s|1") in new stack
    -- Goto (ivr-7,s,1)
    -- Executing [s@ivr-7:1] Set("DAHDI/1-1", "MSG=custom/main-fr-dc") in new stack
    -- Executing [s@ivr-7:2] Set("DAHDI/1-1", "LOOPCOUNT=0") in new stack
    -- Executing [s@ivr-7:3] Set("DAHDI/1-1", "__DIR-CONTEXT=default") in new stack
    -- Executing [s@ivr-7:4] Set("DAHDI/1-1", "_IVR_CONTEXT_ivr-7=ivr-3") in new stack
    -- Executing [s@ivr-7:5] Set("DAHDI/1-1", "_IVR_CONTEXT=ivr-7") in new stack
    -- Executing [s@ivr-7:6] GotoIf("DAHDI/1-1", "1?begin") in new stack
    -- Goto (ivr-7,s,9)
    -- Executing [s@ivr-7:9] Set("DAHDI/1-1", "TIMEOUT(digit)=3") in new stack
    -- Digit timeout set to 3
    -- Executing [s@ivr-7:10] Set("DAHDI/1-1", "TIMEOUT(response)=10") in new stack
    -- Response timeout set to 10
    -- Executing [s@ivr-7:11] Set("DAHDI/1-1", "__IVR_RETVM=") in new stack
    -- Executing [s@ivr-7:12] ExecIf("DAHDI/1-1", "1|Background|custom/main-fr-dc") in new stack
    -- <DAHDI/1-1> Playing 'custom/main-fr-dc' (language 'fr')
  == CDR updated on DAHDI/1-1
    -- Executing [9@ivr-7:1] DBdel("DAHDI/1-1", "") in new stack
    -- Executing [9@ivr-7:2] Set("DAHDI/1-1", "__NODEST=") in new stack
    -- Executing [9@ivr-7:3] Goto("DAHDI/1-1", "ext-miscdests|2|1") in new stack
    -- Goto (ext-miscdests,2,1)
    -- Executing [2@ext-miscdests:1] NoOp("DAHDI/1-1", "MiscDest: Directory") in new stack
    -- Executing [2@ext-miscdests:2] Goto("DAHDI/1-1", "from-internal|#|1") in new stack
    -- Goto (from-internal,#,1)
    -- Executing [#@from-internal:1] Answer("DAHDI/1-1", "") in new stack
    -- Executing [#@from-internal:2] Wait("DAHDI/1-1", "1") in new stack
    -- Executing [#@from-internal:3] AGI("DAHDI/1-1", "directory|default|from-did-direct|lo") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/directory
AGI Tx >> agi_request: directory
AGI Tx >> agi_channel: DAHDI/1-1
AGI Tx >> agi_language: fr
AGI Tx >> agi_type: DAHDI
AGI Tx >> agi_uniqueid: 1231825347.1
AGI Tx >> agi_callerid: 555555555
AGI Tx >> agi_calleridname: name
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: from-internal
AGI Tx >> agi_extension: #
AGI Tx >> agi_priority: 3
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << GET VARIABLE ASTETCDIR
AGI Tx >> 200 result=1 (/etc/asterisk)
AGI Rx << GET VARIABLE ASTSPOOLDIR
AGI Tx >> 200 result=1 (/var/spool/asterisk)
AGI Rx << GET VARIABLE ASTLOGDIR
AGI Tx >> 200 result=1 (/var/log/asterisk)
AGI Rx << GET DATA fr/dir-intro-oper 4000 3
    -- <DAHDI/1-1> Playing 'dir-intro-oper' (language 'fr')

AGI Tx >> 200 result=-1
AGI Rx << STREAM FILE dir-nomatch "" 0
    -- Playing 'dir-nomatch' (escape_digits=) (sample_offset 0)
AGI Tx >> 200 result=-1 endpos=21288
    -- Executing [h@from-internal:1] Macro("DAHDI/1-1", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("DAHDI/1-1", "w") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("DAHDI/1-1", "") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("DAHDI/1-1", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s@macro-hangupcall:6] GotoIf("DAHDI/1-1", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] GotoIf("DAHDI/1-1", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s@macro-hangupcall:11] Hangup("DAHDI/1-1", "") in new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'DAHDI/1-1'
    -- Hungup 'DAHDI/1-1'