[Home]

Summary:ASTERISK-14604: [patch] QUEUE_MEMBER_LIST() returns member names instead of interfaces
Reporter:Ben Winslow (rain)Labels:
Date Opened:2009-08-05 16:19:15Date Closed:2009-08-07 13:20:24
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_queue-queue_member_list.diff
Description:Although QUEUE_MEMBER_LIST() has always been documented as returning a list of interfaces associated with a queue, it has been returning member->membername since r82593.  When a queue member has an empty membername, the membername is set to the channel name, which is probably why nobody noticed.

****** STEPS TO REPRODUCE ******

- Add a queue member with a name
- Read the value of QUEUE_MEMBER_LIST() for that queue and observe the results

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

[default]
exten => 1234,1,AddQueueMember(example_queue,Local/4321@default,,,Example Member)
exten => 1234,n,Verbose(0,Queue members in example_queue: ${QUEUE_MEMBER_LIST(example_queue)})
exten => 1234,n,Hangup()
Comments:By: Tilghman Lesher (tilghman) 2009-08-07 09:25:51

Actually, it's always been membername in preference to interface name.  The interface name is copied to membername, when membername is not specified, which may be why you're used to seeing the interface name in this list.

By: Ben Winslow (rain) 2009-08-07 12:31:13

-= Info about function 'QUEUE_MEMBER_LIST' =-
[Synopsis]
Returns a list of interfaces on a queue

When QUEUE_MEMBER_LIST() first appeared (SVN r8069), queue member names were not supported by Asterisk and QUEUE_MEMBER_LIST() always returned interface names.  This behavior remained until r82593, when a commit changed the function to prefer membername; but, as both of us have said now, membername is populated with the interface name when a member name is not set.  This is why I contend that the behavior has been broken for some time but noone has noticed.

Having QUEUE_MEMBER_LIST() return the list of member names instead of interface names makes the function practically useless, since there is no way to associate the member names with anything else within the dialplan.

By: Digium Subversion (svnbot) 2009-08-07 13:16:48

Repository: asterisk
Revision: 211038

U   branches/1.4/apps/app_queue.c

------------------------------------------------------------------------
r211038 | tilghman | 2009-08-07 13:16:48 -0500 (Fri, 07 Aug 2009) | 14 lines

QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername.

This is a partial revert of revision 82590, which was an attempted cleanup,
but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended
as a method by which component interfaces could be queried from the queue.
Membername isn't useful here, because that field cannot be used to obtain
further information about the member.  See the documentation on
QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various
AMI commands which take a member argument for further justification.
(closes issue ASTERISK-14604)
Reported by: rain
Patches:
      app_queue-queue_member_list.diff uploaded by rain (license 327)

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

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

By: Digium Subversion (svnbot) 2009-08-07 13:18:01

Repository: asterisk
Revision: 211040

_U  trunk/
U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r211040 | tilghman | 2009-08-07 13:18:00 -0500 (Fri, 07 Aug 2009) | 21 lines

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

........
 r211038 | tilghman | 2009-08-07 13:16:28 -0500 (Fri, 07 Aug 2009) | 14 lines
 
 QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername.
 
 This is a partial revert of revision 82590, which was an attempted cleanup,
 but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended
 as a method by which component interfaces could be queried from the queue.
 Membername isn't useful here, because that field cannot be used to obtain
 further information about the member.  See the documentation on
 QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various
 AMI commands which take a member argument for further justification.
 (closes issue ASTERISK-14604)
  Reported by: rain
  Patches:
        app_queue-queue_member_list.diff uploaded by rain (license 327)
........

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

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

By: Digium Subversion (svnbot) 2009-08-07 13:18:48

Repository: asterisk
Revision: 211044

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_queue.c

------------------------------------------------------------------------
r211044 | tilghman | 2009-08-07 13:18:48 -0500 (Fri, 07 Aug 2009) | 28 lines

Merged revisions 211040 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r211040 | tilghman | 2009-08-07 13:17:41 -0500 (Fri, 07 Aug 2009) | 21 lines
 
 Merged revisions 211038 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r211038 | tilghman | 2009-08-07 13:16:28 -0500 (Fri, 07 Aug 2009) | 14 lines
   
   QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername.
   
   This is a partial revert of revision 82590, which was an attempted cleanup,
   but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended
   as a method by which component interfaces could be queried from the queue.
   Membername isn't useful here, because that field cannot be used to obtain
   further information about the member.  See the documentation on
   QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various
   AMI commands which take a member argument for further justification.
   (closes issue ASTERISK-14604)
    Reported by: rain
    Patches:
          app_queue-queue_member_list.diff uploaded by rain (license 327)
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-08-07 13:19:35

Repository: asterisk
Revision: 211047

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_queue.c

------------------------------------------------------------------------
r211047 | tilghman | 2009-08-07 13:19:35 -0500 (Fri, 07 Aug 2009) | 28 lines

Merged revisions 211040 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r211040 | tilghman | 2009-08-07 13:17:41 -0500 (Fri, 07 Aug 2009) | 21 lines
 
 Merged revisions 211038 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r211038 | tilghman | 2009-08-07 13:16:28 -0500 (Fri, 07 Aug 2009) | 14 lines
   
   QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername.
   
   This is a partial revert of revision 82590, which was an attempted cleanup,
   but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended
   as a method by which component interfaces could be queried from the queue.
   Membername isn't useful here, because that field cannot be used to obtain
   further information about the member.  See the documentation on
   QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various
   AMI commands which take a member argument for further justification.
   (closes issue ASTERISK-14604)
    Reported by: rain
    Patches:
          app_queue-queue_member_list.diff uploaded by rain (license 327)
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-08-07 13:20:24

Repository: asterisk
Revision: 211051

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_queue.c

------------------------------------------------------------------------
r211051 | tilghman | 2009-08-07 13:20:23 -0500 (Fri, 07 Aug 2009) | 28 lines

Merged revisions 211040 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r211040 | tilghman | 2009-08-07 13:17:41 -0500 (Fri, 07 Aug 2009) | 21 lines
 
 Merged revisions 211038 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r211038 | tilghman | 2009-08-07 13:16:28 -0500 (Fri, 07 Aug 2009) | 14 lines
   
   QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername.
   
   This is a partial revert of revision 82590, which was an attempted cleanup,
   but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended
   as a method by which component interfaces could be queried from the queue.
   Membername isn't useful here, because that field cannot be used to obtain
   further information about the member.  See the documentation on
   QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various
   AMI commands which take a member argument for further justification.
   (closes issue ASTERISK-14604)
    Reported by: rain
    Patches:
          app_queue-queue_member_list.diff uploaded by rain (license 327)
 ........
................

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

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