Language setting for incoming anonymous SIP calls

I’m running FreePBX 2.5.1.5 plus Asterisk 1.4.17 on Ubuntu Server 8.04 LTS. As we’re based in England we would like to have British sounding annoucements (hash and not pound, etc.) so as not to confuse callers too much.

I have installed the Cut Glass IVR recordings to /usr/share/asterisk/sounds/en_GB and added language=en_GB to sip_general_custom.conf. All is well when I call from one internal extension to another. Alison says “press hash” in her very British accent.

However, if I call in externally from a SIP client and wait to be transferred to the voicemail I reach the American lady saying “press pound”. I’ve played with everything I can find to fix this. I’ve even installed the languages module and explicitly set the language of every extension to en_GB.

You can see from the log extract below that when calls come in externally the language code is en but internally it is en_GB:

full:[Jun 11 10:37:15] VERBOSE[7898] logger.c:     -- <SIP/87.238.72.155-700e9720> Playing 'vm-theperson' (language 'en')
full.1:[Jun  1 08:03:49] VERBOSE[21118] logger.c:     -- <SIP/200-700e4f70> Playing 'vm-theperson' (language 'en_GB')
full.1:[Jun  3 16:25:17] VERBOSE[6021] logger.c:     -- <SIP/87.238.72.155-0084ced0> Playing 'vm-theperson' (language 'en')
full.1:[Jun  4 08:53:31] VERBOSE[11197] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'vm-theperson' (language 'en')
full.1:[Jun  4 11:04:36] VERBOSE[12123] logger.c:     -- <SIP/87.238.72.155-00847310> Playing 'vm-theperson' (language 'en')
full.1:[Jun  4 13:49:47] VERBOSE[12923] logger.c:     -- <SIP/87.238.72.155-007bc9a0> Playing 'vm-theperson' (language 'en')

Here is a log of a full call set-up and transfer to voicemail from an external IP address:

[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-sip-external:1] NoOp("SIP/87.238.72.149-700bf050", "Received incoming SIP connection from unknown peer to 01733240800") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-sip-external:2] Set("SIP/87.238.72.149-700bf050", "DID=01733240800") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-sip-external:3] Goto("SIP/87.238.72.149-700bf050", "s|1") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (from-sip-external,s,1)
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@from-sip-external:1] GotoIf("SIP/87.238.72.149-700bf050", "1?from-trunk|01733240800|1") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (from-trunk,01733240800,1)
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-trunk:1] Set("SIP/87.238.72.149-700bf050", "__FROM_DID=01733240800") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-trunk:2] Gosub("SIP/87.238.72.149-700bf050", "cidlookup|cidlookup_1|1") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [cidlookup_1@cidlookup:1] Set("SIP/87.238.72.149-700bf050", "CALLERID(name)=Ian McMichael") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [cidlookup_1@cidlookup:2] Return("SIP/87.238.72.149-700bf050", "") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-trunk:3] ExecIf("SIP/87.238.72.149-700bf050", "0 |Set|CALLERID(name)=01256808084") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-trunk:4] Set("SIP/87.238.72.149-700bf050", "__CALLINGPRES_SV=allowed_not_screened") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-trunk:5] SetCallerPres("SIP/87.238.72.149-700bf050", "allowed_not_screened") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [01733240800@from-trunk:6] Goto("SIP/87.238.72.149-700bf050", "ext-group|600|1") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (ext-group,600,1)
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:1] Macro("SIP/87.238.72.149-700bf050", "user-callerid|") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:1] Set("SIP/87.238.72.149-700bf050", "AMPUSER=01256808084") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:2] GotoIf("SIP/87.238.72.149-700bf050", "0?report") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:3] ExecIf("SIP/87.238.72.149-700bf050", "1|Set|REALCALLERIDNUM=01256808084") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: ExecIf
[May 30 16:43:21] DEBUG[9306] func_db.c: DB: DEVICE/01256808084/user not found in database.
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:4] Set("SIP/87.238.72.149-700bf050", "AMPUSER=") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:21] DEBUG[9306] func_db.c: DB: AMPUSER//cidname not found in database.
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:5] Set("SIP/87.238.72.149-700bf050", "AMPUSERCIDNAME=") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:6] GotoIf("SIP/87.238.72.149-700bf050", "1?report") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (macro-user-callerid,s,11)
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:11] GotoIf("SIP/87.238.72.149-700bf050", "0?continue") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:12] Set("SIP/87.238.72.149-700bf050", "__TTL=64") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:13] GotoIf("SIP/87.238.72.149-700bf050", "1?continue") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (macro-user-callerid,s,20)
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:20] NoOp("SIP/87.238.72.149-700bf050", "Using CallerID "Ian McMichael" <01256808084>") in new stack
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: Noop
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:2] GotoIf("SIP/87.238.72.149-700bf050", "1?skipdb") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (ext-group,600,4)
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:4] Set("SIP/87.238.72.149-700bf050", "__NODEST=") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:5] Set("SIP/87.238.72.149-700bf050", "__BLKVM_OVERRIDE=BLKVM/600/SIP/87.238.72.149-700bf050") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:6] Set("SIP/87.238.72.149-700bf050", "__BLKVM_BASE=600") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:7] Set("SIP/87.238.72.149-700bf050", "DB(BLKVM/600/SIP/87.238.72.149-700bf050)=TRUE") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:8] Set("SIP/87.238.72.149-700bf050", "RRNODEST=") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:9] Set("SIP/87.238.72.149-700bf050", "__NODEST=600") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:10] Set("SIP/87.238.72.149-700bf050", "RecordMethod=Group") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:11] Macro("SIP/87.238.72.149-700bf050", "record-enable|200-201|Group") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-record-enable:1] GotoIf("SIP/87.238.72.149-700bf050", "1?check") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (macro-record-enable,s,4)
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-record-enable:4] AGI("SIP/87.238.72.149-700bf050", "recordingcheck|20090530-164321|asterisk-13755-1243698201.650") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Launched AGI Script /usr/share/asterisk/agi-bin/recordingcheck
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- AGI Script recordingcheck completed, returning 0
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: AGI
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-record-enable:5] MacroExit("SIP/87.238.72.149-700bf050", "") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:12] Set("SIP/87.238.72.149-700bf050", "RingGroupMethod=ringall") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:13] Macro("SIP/87.238.72.149-700bf050", "dial|20|tr|200-201") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-dial:1] GotoIf("SIP/87.238.72.149-700bf050", "1?dial") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Goto (macro-dial,s,3)
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-dial:3] AGI("SIP/87.238.72.149-700bf050", "dialparties.agi") in new stack
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Launched AGI Script /usr/share/asterisk/agi-bin/dialparties.agi
[May 30 16:43:21] VERBOSE[9306] logger.c:   dialparties.agi: Starting New Dialparties.agi
[May 30 16:43:21] VERBOSE[9309] logger.c:   == Parsing '/etc/asterisk/manager.conf': [May 30 16:43:21] VERBOSE[9309] logger.c: Found
[May 30 16:43:21] VERBOSE[9309] logger.c:   == Parsing '/etc/asterisk/manager_additional.conf': [May 30 16:43:21] VERBOSE[9309] logger.c: Found
[May 30 16:43:21] VERBOSE[9309] logger.c:   == Parsing '/etc/asterisk/manager_custom.conf': [May 30 16:43:21] VERBOSE[9309] logger.c: Found
[May 30 16:43:21] VERBOSE[9309] logger.c:   == Manager 'admin' logged on from 127.0.0.1
[May 30 16:43:21] VERBOSE[9306] logger.c:   dialparties.agi: Caller ID name is 'Ian McMichael' number is '01256808084'
[May 30 16:43:21] VERBOSE[9306] logger.c:   dialparties.agi: Methodology of ring is  'ringall'
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: Added extension 200 to extension map
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: Added extension 201 to extension map
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: Extension 200 cf is disabled
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: Extension 201 cf is disabled
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: Extension 200 do not disturb is disabled
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: Extension 201 do not disturb is disabled
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: dbset CALLTRACE/200 to 01256808084
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: dbset CALLTRACE/201 to 01256808084
[May 30 16:43:21] VERBOSE[9306] logger.c:     --  dialparties.agi: Filtered ARG3: 200-201
[May 30 16:43:21] VERBOSE[9309] logger.c:   == Manager 'admin' logged off from 127.0.0.1
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- AGI Script dialparties.agi completed, returning 0
[May 30 16:43:21] DEBUG[9306] app_macro.c: Executed application: AGI
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Executing [s@macro-dial:7] Dial("SIP/87.238.72.149-700bf050", "SIP/200&SIP/201|20|trM(auto-blkvm)") in new stack
[May 30 16:43:21] WARNING[9306] app_dial.c: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- Called 201
[May 30 16:43:21] VERBOSE[9306] logger.c:     -- SIP/201-007bc9a0 is ringing
[May 30 16:43:25] VERBOSE[9310] logger.c:   == Parsing '/etc/asterisk/manager.conf': [May 30 16:43:25] VERBOSE[9310] logger.c: Found
[May 30 16:43:25] VERBOSE[9310] logger.c:   == Parsing '/etc/asterisk/manager_additional.conf': [May 30 16:43:25] VERBOSE[9310] logger.c: Found
[May 30 16:43:25] VERBOSE[9310] logger.c:   == Parsing '/etc/asterisk/manager_custom.conf': [May 30 16:43:25] VERBOSE[9310] logger.c: Found
[May 30 16:43:25] VERBOSE[9310] logger.c:   == Manager 'admin' logged on from 127.0.0.1
[May 30 16:43:26] VERBOSE[9310] logger.c:   == Manager 'admin' logged off from 127.0.0.1
[May 30 16:43:32] VERBOSE[9319] logger.c:   == Parsing '/etc/asterisk/manager.conf': [May 30 16:43:32] VERBOSE[9319] logger.c: Found
[May 30 16:43:32] VERBOSE[9319] logger.c:   == Parsing '/etc/asterisk/manager_additional.conf': [May 30 16:43:32] VERBOSE[9319] logger.c: Found
[May 30 16:43:32] VERBOSE[9319] logger.c:   == Parsing '/etc/asterisk/manager_custom.conf': [May 30 16:43:32] VERBOSE[9319] logger.c: Found
[May 30 16:43:32] VERBOSE[9319] logger.c:   == Manager 'admin' logged on from 127.0.0.1
[May 30 16:43:33] VERBOSE[9319] logger.c:   == Manager 'admin' logged off from 127.0.0.1
[May 30 16:43:39] VERBOSE[9329] logger.c:   == Parsing '/etc/asterisk/manager.conf': [May 30 16:43:39] VERBOSE[9329] logger.c: Found
[May 30 16:43:39] VERBOSE[9329] logger.c:   == Parsing '/etc/asterisk/manager_additional.conf': [May 30 16:43:39] VERBOSE[9329] logger.c: Found
[May 30 16:43:39] VERBOSE[9329] logger.c:   == Parsing '/etc/asterisk/manager_custom.conf': [May 30 16:43:39] VERBOSE[9329] logger.c: Found
[May 30 16:43:39] VERBOSE[9329] logger.c:   == Manager 'admin' logged on from 127.0.0.1
[May 30 16:43:40] VERBOSE[9330] logger.c:   == Parsing '/etc/asterisk/manager.conf': [May 30 16:43:40] VERBOSE[9330] logger.c: Found
[May 30 16:43:40] VERBOSE[9330] logger.c:   == Parsing '/etc/asterisk/manager_additional.conf': [May 30 16:43:40] VERBOSE[9330] logger.c: Found
[May 30 16:43:40] VERBOSE[9330] logger.c:   == Parsing '/etc/asterisk/manager_custom.conf': [May 30 16:43:40] VERBOSE[9330] logger.c: Found
[May 30 16:43:40] VERBOSE[9330] logger.c:   == Manager 'admin' logged on from 127.0.0.1
[May 30 16:43:41] VERBOSE[9329] logger.c:   == Manager 'admin' logged off from 127.0.0.1
[May 30 16:43:41] VERBOSE[9330] logger.c:   == Manager 'admin' logged off from 127.0.0.1
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Nobody picked up in 20000 ms
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Dial
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-dial:8] Set("SIP/87.238.72.149-700bf050", "DIALSTATUS=NOANSWER") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-dial:9] GosubIf("SIP/87.238.72.149-700bf050", "0?NOANSWER|1") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GosubIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:14] Set("SIP/87.238.72.149-700bf050", "RingGroupMethod=") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:15] GotoIf("SIP/87.238.72.149-700bf050", "0?nodest") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:16] Set("SIP/87.238.72.149-700bf050", "__NODEST=") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:17] DBdel("SIP/87.238.72.149-700bf050", "BLKVM/600/SIP/87.238.72.149-700bf050") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- DBdel: family=BLKVM, key=600/SIP/87.238.72.149-700bf050
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [600@ext-group:18] Goto("SIP/87.238.72.149-700bf050", "ext-local|vmu252|1") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Goto (ext-local,vmu252,1)
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [vmu252@ext-local:1] Macro("SIP/87.238.72.149-700bf050", "vm|252|NOANSWER|") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-vm:1] Macro("SIP/87.238.72.149-700bf050", "user-callerid|SKIPTTL") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:1] Set("SIP/87.238.72.149-700bf050", "AMPUSER=01256808084") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:2] GotoIf("SIP/87.238.72.149-700bf050", "0?report") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:3] ExecIf("SIP/87.238.72.149-700bf050", "0|Set|REALCALLERIDNUM=01256808084") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: ExecIf
[May 30 16:43:41] DEBUG[9306] func_db.c: DB: DEVICE/01256808084/user not found in database.
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:4] Set("SIP/87.238.72.149-700bf050", "AMPUSER=") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:41] DEBUG[9306] func_db.c: DB: AMPUSER//cidname not found in database.
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:5] Set("SIP/87.238.72.149-700bf050", "AMPUSERCIDNAME=") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:6] GotoIf("SIP/87.238.72.149-700bf050", "1?report") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Goto (macro-user-callerid,s,11)
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:11] GotoIf("SIP/87.238.72.149-700bf050", "1?continue") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Goto (macro-user-callerid,s,20)
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-user-callerid:20] NoOp("SIP/87.238.72.149-700bf050", "Using CallerID "Ian McMichael" <01256808084>") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Noop
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Macro
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-vm:2] Set("SIP/87.238.72.149-700bf050", "VMGAIN=""") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:41] DEBUG[9306] func_db.c: DB: BLKVM/600/SIP/87.238.72.149-700bf050 not found in database.
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-vm:3] GotoIf("SIP/87.238.72.149-700bf050", "1?vmx|1") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Goto (macro-vm,vmx,1)
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [vmx@macro-vm:1] GotoIf("SIP/87.238.72.149-700bf050", "0?s-NOANSWER|1") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [vmx@macro-vm:2] Set("SIP/87.238.72.149-700bf050", "MODE=unavail") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [vmx@macro-vm:3] GotoIf("SIP/87.238.72.149-700bf050", "1?notdirect") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Goto (macro-vm,vmx,5)
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] DEBUG[9306] func_db.c: DB: AMPUSER/252/vmx/unavail/state not found in database.
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [vmx@macro-vm:5] NoOp("SIP/87.238.72.149-700bf050", "Checking if ext 252 is enabled: ") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Noop
[May 30 16:43:41] DEBUG[9306] func_db.c: DB: AMPUSER/252/vmx/unavail/state not found in database.
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [vmx@macro-vm:6] GotoIf("SIP/87.238.72.149-700bf050", "1?s-NOANSWER|1") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Goto (macro-vm,s-NOANSWER,1)
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s-NOANSWER@macro-vm:1] Macro("SIP/87.238.72.149-700bf050", "get-vmcontext|252") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-get-vmcontext:1] Set("SIP/87.238.72.149-700bf050", "VMCONTEXT=default") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Set
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-get-vmcontext:2] GotoIf("SIP/87.238.72.149-700bf050", "0?200:300") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Goto (macro-get-vmcontext,s,300)
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: GotoIf
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s@macro-get-vmcontext:300] NoOp("SIP/87.238.72.149-700bf050", "") in new stack
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: NoOp
[May 30 16:43:41] DEBUG[9306] app_macro.c: Executed application: Macro
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- Executing [s-NOANSWER@macro-vm:2] VoiceMail("SIP/87.238.72.149-700bf050", "252@default|u") in new stack
[May 30 16:43:41] VERBOSE[9306] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'vm-theperson' (language 'en')
[May 30 16:43:43] VERBOSE[9306] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'digits/2' (language 'en')
[May 30 16:43:44] VERBOSE[9306] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'digits/5' (language 'en')
[May 30 16:43:44] VERBOSE[9306] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'digits/2' (language 'en')
[May 30 16:43:45] VERBOSE[9306] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'vm-isunavail' (language 'en')
[May 30 16:43:46] VERBOSE[9306] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'vm-intro' (language 'en')
[May 30 16:43:52] VERBOSE[9306] logger.c:     -- <SIP/87.238.72.149-700bf050> Playing 'beep' (language 'en')
[May 30 16:43:52] VERBOSE[9306] logger.c:     -- Recording the message
[May 30 16:43:52] VERBOSE[9306] logger.c:     -- x=0, open writing:  /var/spool/asterisk/voicemail/default/252/tmp/ajH6Rs format: wav49, 0x7f385400c020
[May 30 16:43:52] VERBOSE[9306] logger.c:     -- x=1, open writing:  /var/spool/asterisk/voicemail/default/252/tmp/ajH6Rs format: gsm, 0x7f385400bb10
[May 30 16:43:52] VERBOSE[9306] logger.c:     -- x=2, open writing:  /var/spool/asterisk/voicemail/default/252/tmp/ajH6Rs format: wav, 0x7f3854001010
[May 30 16:43:52] VERBOSE[9306] logger.c:     -- User hung up

Have I missed something obvious? How do I change the language of an anonymous SIP call?

Thanks in advance,

Ian.

I have also noted that and I suspect that there is a flaw in Asterisk 1.4 that don’t honor the language setting when an anonymous call is received.
You can try to edit /etc/asterisk/extensions.conf (yes, I know, do no edit this file…) so that it looks like this:

[from-sip-external]
;give external sip users congestion and hangup
; Yes. This is _really_ meant to be _. - I know asterisk whinges about it, but
; I do know what I'm doing. This is correct.
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(CHANNEL(language)=en_GB)
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)

Add the line exten => _.,n,Set(CHANNEL(language)=en_GB) to explicit set the language to en_GB.

Test that and report the outcome.

Yes, that fixes it. Now for the more difficult question… Is there anywhere I can put it that won’t be overwritten every time FreePBX regenerates the Asterisk configuration files from its database?

Thanks for the rapid response. I’ve been puzzling over this for months!

Ian.

Well, this file is not “replaced” until there is a new version of core released. You are safe until then :slight_smile: It wont be generated each time you press the Orange bar.

I will submit a feature request so that the other developers can look into it and eventually add it to FreePBX as a selection.

I can probably cope with putting it back each time the core is updated but it would be useful if there were an option in General Settings, for example, to set the default language code for the system. It could write the appropriate lines into sip.conf, iax.conf and this workaround into extensions.conf.

If you need any more information or anything testing, please let me know. I’m more than happy to assist whenever I can…

Ian.

as a stop gap you can just redefine the entire context in extensions_custom.conf. Or you can play games, you can just redefine priority 1 to set the channel in extensions_custom.conf. Then that will replace the Noop() message but the rest of the extensions.conf context will be used.

In the mean time, if someone figures out what can be done in the sip settings to get the language to be honored with 1.4, would be great. Has anyone determined if it is an asterisk issue or something we are doing wrong?

Philippe,

Does this bug look about right? If so, it appears to have been fixed in both 1.4 and 1.6. However I might be missing the point of the patch and it might fix a similar issue in another area of the Asterisk code.

Regards,

Ian.

I don’t think it is related to this as I have tested it with the latest Asterisk 1.4.

A call enters the system from our provider, as the trunk name is set to [sip-corporate.tele2.se] when the call arrives it plays the correct language:

NoOp("SIP/sip-corporate.tele2.se-b6e2c448", "Received incoming SIP connection from unknown peer
.
.
<SIP/sip-corporate.tele2.se-b6e2c448> Playing '/var/spool/asterisk/voicemail/default/2494/unavail' (language 'se')

And here it is when a call is received with an ip-address instead (ip address edited):

SIP/xxx.xxx.xxx.xxx-b6e323f8", "Received incoming SIP connection from unknown peer to
.
.
 -- <SIP/xxx.xxx.xxx.xxx-b6e323f8> Playing '/var/spool/asterisk/voicemail/default/2476/unavail' (language 'en')

I have not posted it on Asterisk as I don’t have a login.