[Home]

Summary:ASTERISK-16393: [patch] When using Local/ as members, language is not inherited
Reporter:Karsten Schmidt (guggemand)Labels:
Date Opened:2010-07-19 16:51:02Date Closed:2010-09-16 13:05:37
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) queue-language.patch
Description:When using Local/xxx@xxx/n as queue members, the callee gets announcements in the default language, instead of their own language.

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

As far as i can tell the language of the Local...;1 channel is used by app_queue to play the announcements. And that can not be set from the dialplan.

A similar issue has been fixed in followme (https://issues.asterisk.org/view.php?id=15372)


   -- Executing [s@AppQueue:11] Set("SIP/test_402-000009f5", "CHANNEL(language)=da") in new stack
   -- Executing [s@AppQueue:12] Queue("SIP/test_402-000009f5", "test_1001,,,,300") in new stack
   -- Started music on hold, class 'test_test', on SIP/test_402-000009f5
   -- Executing [queue:401@frominternal:1] Set("Local/queue:401@frominternal-d553;2", "CHANNEL(language)=da") in new stack
   -- Executing [queue:401@frominternal:2] Dial("Local/queue:401@frominternal-d553;2", "SIP/test_401") in new stack
 == Using SIP RTP CoS mark 5
   -- Called test_401
   -- SIP/test_401-000009f6 is ringing
   -- Local/queue:401@frominternal-d553;1 is ringing
   -- SIP/test_401-000009f6 is ringing
   -- SIP/test_401-000009f6 is ringing
   -- SIP/test_401-000009f6 answered Local/queue:401@frominternal-d553;2
   -- Local/queue:401@frominternal-d553;1 answered SIP/test_402-000009f5
   -- <Local/queue:401@frominternal-d553;1> Playing 'queue-reporthold.gsm' (language 'en')
   -- <Local/queue:401@frominternal-d553;1> Playing 'digits/0.gsm' (language 'en')
   -- <Local/queue:401@frominternal-d553;1> Playing 'queue-minutes.gsm' (language 'en')
   -- <Local/queue:401@frominternal-d553;1> Playing 'digits/4.gsm' (language 'en')
   -- <Local/queue:401@frominternal-d553;1> Playing 'queue-seconds.gsm' (language 'en')
   -- Stopped music on hold on SIP/test_402-000009f5

> core show channel Local/queue:401@frominternal-d553;1
-- General --
          Name: Local/queue:401@frominternal-d553;1
          Type: Local
      UniqueID: ast1-1279571420.3238
     Caller ID: 402
Caller ID Name: (queue2) 402
   DNID Digits: (N/A)
      Language: en
         State: Up (6)
         Rings: 0


> core show channel Local/queue:401@frominternal-d553;2
-- General --
          Name: Local/queue:401@frominternal-d553;2
          Type: Local
      UniqueID: ast1-1279571420.3239
     Caller ID: 402
Caller ID Name: (queue2) 402
   DNID Digits: (N/A)
      Language: da
         State: Up (6)
         Rings: 0


Comments:By: Karsten Schmidt (guggemand) 2010-07-19 16:52:07

The attached patch inherits the language from the caller.

By: Tilghman Lesher (tilghman) 2010-08-20 12:24:13

I don't think that's the right behavior.  What you want is to retrieve the language from the channel bridged to Local/...;2.  The languages of the caller and the callee can differ, and substituting one for the other is simply the wrong behavior.

By: Karsten Schmidt (guggemand) 2010-08-24 11:11:46

I agree.

When using Local/xxx/n as a queue member it would be nice to have a way to set the language of the dialed Local channel, but no such option exists as far as i can tell.

The attached patch is just a workaround working in my specific case, but in a case where caller and cellee is not the same language, its not so great.

Even though i would hope caller and callee at least have one langauge in common :)

By: Tilghman Lesher (tilghman) 2010-08-25 01:34:26

What happens when you pass the 'b' flag to the Local channel, i.e. Local/queue:401@frominternal/bn ?

By: Philippe Bolduc (philippebolduc) 2010-09-02 07:23:02

It's does not change anything with the 'b' flag.

Are you aware that this problem is also affecting asterisk 1.6.2, asterisk 1.6.0 and asterisk 1.4 ?


Thanks

By: Terry Wilson (twilson) 2010-09-03 09:10:58

There is a patch attached to the reviewboard at https://reviewboard.asterisk.org/r/903/ for 1.4 that should fix this.

By: Digium Subversion (svnbot) 2010-09-10 14:25:09

Repository: asterisk
Revision: 286059

U   branches/1.4/channels/chan_local.c
U   branches/1.4/funcs/func_channel.c
U   branches/1.4/include/asterisk/channel.h
U   branches/1.4/include/asterisk/frame.h
U   branches/1.4/include/asterisk/pbx.h

------------------------------------------------------------------------
r286059 | twilson | 2010-09-10 14:25:09 -0500 (Fri, 10 Sep 2010) | 16 lines

Inherit CHANNEL() writes to both sides of a Local channel

Having Local (/n) channels as queue members and setting the language in the
extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
channel. Hold time report playbacks happen on the Local/...,1 channel and
therefor do not play in the specified language.

This patch modifies func_channel_write to call the setoption callback and pass
the CHANNEL() write info to the callback. chan_local uses this information to
look up the other side of the channel and apply the same changes to it.

(closes issue ASTERISK-16393)
Reported by: Guggemand

Review: https://reviewboard.asterisk.org/r/903/

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

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

By: Digium Subversion (svnbot) 2010-09-10 15:35:25

Repository: asterisk
Revision: 286115

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_local.c
U   branches/1.6.2/funcs/func_channel.c
U   branches/1.6.2/include/asterisk/channel.h
U   branches/1.6.2/include/asterisk/frame.h
U   branches/1.6.2/include/asterisk/pbx.h

------------------------------------------------------------------------
r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines

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

........
 r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines
 
 Inherit CHANNEL() writes to both sides of a Local channel
 
 Having Local (/n) channels as queue members and setting the language in the
 extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
 channel. Hold time report playbacks happen on the Local/...,1 channel and
 therefor do not play in the specified language.
 
 This patch modifies func_channel_write to call the setoption callback and pass
 the CHANNEL() write info to the callback. chan_local uses this information to
 look up the other side of the channel and apply the same changes to it.
 
 (closes issue ASTERISK-16393)
 Reported by: Guggemand
 
 Review: https://reviewboard.asterisk.org/r/903/
........

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

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

By: Digium Subversion (svnbot) 2010-09-10 17:04:54

Repository: asterisk
Revision: 286189

U   branches/1.8/channels/chan_local.c
U   branches/1.8/funcs/func_channel.c
U   branches/1.8/include/asterisk/channel.h
U   branches/1.8/include/asterisk/frame.h
U   branches/1.8/include/asterisk/pbx.h

------------------------------------------------------------------------
r286189 | twilson | 2010-09-10 17:04:54 -0500 (Fri, 10 Sep 2010) | 30 lines

Merged revisions 286115 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
 r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines
 
 Merged revisions 286059 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines
   
   Inherit CHANNEL() writes to both sides of a Local channel
   
   Having Local (/n) channels as queue members and setting the language in the
   extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
   channel. Hold time report playbacks happen on the Local/...,1 channel and
   therefor do not play in the specified language.
   
   This patch modifies func_channel_write to call the setoption callback and pass
   the CHANNEL() write info to the callback. chan_local uses this information to
   look up the other side of the channel and apply the same changes to it.
   
   (closes issue ASTERISK-16393)
   Reported by: Guggemand
   
   Review: https://reviewboard.asterisk.org/r/903/
 ........
................

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

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

By: Digium Subversion (svnbot) 2010-09-10 17:15:48

Repository: asterisk
Revision: 286190

_U  trunk/
U   trunk/channels/chan_local.c
U   trunk/funcs/func_channel.c
U   trunk/include/asterisk/channel.h
U   trunk/include/asterisk/frame.h
U   trunk/include/asterisk/pbx.h

------------------------------------------------------------------------
r286190 | twilson | 2010-09-10 17:15:48 -0500 (Fri, 10 Sep 2010) | 37 lines

Merged revisions 286189 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r286189 | twilson | 2010-09-10 17:04:53 -0500 (Fri, 10 Sep 2010) | 30 lines
 
 Merged revisions 286115 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ................
   r286115 | twilson | 2010-09-10 15:35:25 -0500 (Fri, 10 Sep 2010) | 23 lines
   
   Merged revisions 286059 via svnmerge from
   https://origsvn.digium.com/svn/asterisk/branches/1.4
   
   ........
     r286059 | twilson | 2010-09-10 14:25:08 -0500 (Fri, 10 Sep 2010) | 16 lines
     
     Inherit CHANNEL() writes to both sides of a Local channel
     
     Having Local (/n) channels as queue members and setting the language in the
     extension with Set(CHANNEL(language)=fr) sets the language on the Local/...,2
     channel. Hold time report playbacks happen on the Local/...,1 channel and
     therefor do not play in the specified language.
     
     This patch modifies func_channel_write to call the setoption callback and pass
     the CHANNEL() write info to the callback. chan_local uses this information to
     look up the other side of the channel and apply the same changes to it.
     
     (closes issue ASTERISK-16393)
     Reported by: Guggemand
     
     Review: https://reviewboard.asterisk.org/r/903/
   ........
 ................
................

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

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