[asterisk-dev] [Code Review] app_queue log membername when state_interface is set for ADDMEMBER and REMOVEMEMBER events.

jamuel reviewboard at asterisk.org
Thu Jun 30 21:51:39 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1286/
-----------------------------------------------------------

(Updated June 30, 2011, 9:51 p.m.)


Review request for Asterisk Developers, leifmadsen and opticron.


Changes
-------

Re-spun patch for 1.6.2.18 -- looks like the original patch had 2 munged chunks.

Compile tested with clean 1.6.2.18 source for apps/app_queue.c and configs/queues.conf.sample:

% patch -p0 < asterisk-1.6.2.18-app_queue-membername_logging-v3.patch 
patching file apps/app_queue.c
patching file configs/queues.conf.sample

% make all
[SNIP]

   [CC] app_queue.c -> app_queue.o
   [LD] app_queue.o -> app_queue.so

[SNIP]

Sorry for the first-time reviewboard patch-itis :)


Summary
-------

app_queue logs the events ADDMEMBER and REMOVEMEMBER with the agent field set to the interface value rather than the membername value when a member is added with a state_interface value set.  However all other member related queue events are logged with the membername when a state_interface is set. It would seem that these ADD/REMOVE MEMBER events should log the agent field in the same manner. 

This patch addresses the original issue reported in https://issues.asterisk.org/jira/browse/ASTERISK-14769 by providing a queues.conf general configuration option log-member-as-agent. Setting log-member-as-agent = yes will cause the membername to be logged in the agent field for ADDMEMBER and REMOVEMEMBER queue events if a state_interface has been set.

The default value (log-member-as-agent = no) does not alter the existing logging for the ADDMEMBER and REMOVEMEMBER events to maintain existing (buggy) behavior for the sake of backwards compatibility. 


This addresses bug https://issues.asterisk.org/jira/browse/ASTERISK-14769.
    https://issues.asterisk.org/jira/browse/https://issues.asterisk.org/jira/browse/ASTERISK-14769


Diffs (updated)
-----

  http://svn.asterisk.org/svn/asterisk/tags/1.6.2.18/apps/app_queue.c 325993 
  http://svn.asterisk.org/svn/asterisk/tags/1.6.2.18/configs/queues.conf.sample 325993 

Diff: https://reviewboard.asterisk.org/r/1286/diff


Testing
-------

Tested add, remove, pause, unpause via AMI and CLI and see the correct log output to queue_log.  Also tested with log-member-as-agent omitted to insure backward compatibility for those queues.conf that might not be updated for this new option. 


Thanks,

jamuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110701/b37c74b0/attachment.htm>


More information about the asterisk-dev mailing list