[Home]

Summary:ASTERISK-11154: [patch] ast_feature_request_and_dial from res_features, used on atxfer, is not setting the channel language
Reporter:Caio Begotti (caio1982)Labels:
Date Opened:2008-01-04 20:03:12.000-0600Date Closed:2008-02-27 11:28:06.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_features
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) local_atxfer_lang2.diff
( 1) local_atxfer_lang2-1.4.diff
( 2) local_atxfer_lang3.diff
( 3) local_atxfer_lang3-1.4.diff
Description:Using blind transfer to a new extension that runs SayUnixTime (or any other localized command) will work for any other language than English, but using atxfer you end up starting a Local channel that's called directly from res_features but lacks the support for channel language.

The bug is that you simply breaks the localization and the attended transfer goes to the SayUnixTime extension and playback everything in English, instead or Brazilian Portuguese or French or Spanish, for example.

****** ADDITIONAL INFORMATION ******

You have to set language=fr or language=es in sip.conf to test it properly (tested using pt_BR with own sound set). Here's the difference before and after the attached patch.

Before:

   -- Executing [555@default:1] Dial("SIP/222-0181da00", "SIP/222,30,Tt") in new stack
   -- Called 222
   -- SIP/222-01822200 is ringing
   -- SIP/222-01822200 answered SIP/222-0181da00
   -- <SIP/222-01822200> Playing 'pbx-transfer.gsm' (language 'fr')
   -- Executing [111@default:1] SayUnixTime("Local/111@default-304e;2", "") in new stack
   -- <Local/111@default-304e;2> Playing 'digits/day-5.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/mon-0.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/h-4.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/2.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/thousand.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/8.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/at.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/11.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/40.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/3.gsm' (language 'en')
   -- <Local/111@default-304e;2> Playing 'digits/p-m.gsm' (language 'en')
   -- Auto fallthrough, channel 'Local/111@default-304e;2' status is 'UNKNOWN'


After:

   -- Executing [555@default:1] Dial("SIP/222-0181da00", "SIP/222,30,Tt") in new stack
   -- Called 222
   -- SIP/222-01822200 is ringing
   -- SIP/222-01822200 answered SIP/222-0181da00
   -- <SIP/222-01822200> Playing 'pbx-transfer.gsm' (language 'fr')
   -- Executing [111@default:1] SayUnixTime("Local/111@default-db68;2", "") in new stack
   -- <Local/111@default-db68;2> Playing 'digits/day-5.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/4.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/mon-0.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/2.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/thousand.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/8.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/at.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/11.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/oclock.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/40.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/5.gsm' (language 'fr')
   -- <Local/111@default-db68;2> Playing 'digits/p-m.gsm' (language 'fr')
   -- Auto fallthrough, channel 'Local/111@default-db68;2' status is 'UNKNOWN'
Comments:By: Caio Begotti (caio1982) 2008-01-04 20:04:25.000-0600

This also affect 1.4.

By: Victor Yure (victoryure) 2008-01-05 10:14:59.000-0600

The attached patch (local_atxfer_lang2-1.4.diff) solved my problem on asterisk-1.4.17

By: Jason Parker (jparker) 2008-01-07 15:49:40.000-0600

Do we want to use chan's language, or transferer's language?

By: Caio Begotti (caio1982) 2008-01-07 18:02:43.000-0600

We should keep the channel language, for some consistency. If someone wants the language to reflect the current speaker it can be done directly on the dialplan, I guess. Btw, I've done it using a single language statement in sip.conf (like the vast majority of users, I think). I didn't test a multi-language sip.conf with peers transferring calls for each other in a different language.



By: Caio Begotti (caio1982) 2008-01-09 13:17:11.000-0600

Qwell, anything wrong with the patch that I should change or chan->language is fine?

By: Caio Begotti (caio1982) 2008-02-17 19:19:58.000-0600

Ping?

By: Jason Parker (jparker) 2008-02-18 12:27:54.000-0600

All of the code around this is using transferer->language.  Can you test it with that, rather than chan->language?

By: Caio Begotti (caio1982) 2008-02-23 18:34:40.000-0600

You're right, it worked using transferer->language instead. Patches for trunk (after res_features moving place) and 1.4 updated :)

victoryure, would you mind testing them one more time just to make sure it's fine for you, though I've tested both already?

By: Digium Subversion (svnbot) 2008-02-27 11:23:19.000-0600

Repository: asterisk
Revision: 104598

U   branches/1.4/res/res_features.c

------------------------------------------------------------------------
r104598 | qwell | 2008-02-27 11:23:17 -0600 (Wed, 27 Feb 2008) | 8 lines

Inherit language from the transfering channel on a blind transfer.

(closes issue ASTERISK-11154)
Reported by: caio1982
Patches:
     local_atxfer_lang3-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, victoryure

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=104598

By: Digium Subversion (svnbot) 2008-02-27 11:28:06.000-0600

Repository: asterisk
Revision: 104617

_U  trunk/
U   trunk/main/features.c

------------------------------------------------------------------------
r104617 | qwell | 2008-02-27 11:28:05 -0600 (Wed, 27 Feb 2008) | 16 lines

Merged revisions 104598 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104598 | qwell | 2008-02-27 11:26:55 -0600 (Wed, 27 Feb 2008) | 8 lines

Inherit language from the transfering channel on a blind transfer.

(closes issue ASTERISK-11154)
Reported by: caio1982
Patches:
     local_atxfer_lang3-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, victoryure

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=104617