<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2417/">https://reviewboard.asterisk.org/r/2417/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Steve Murphy.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/https://issues.asterisk.org/jira/browse/ASTERISK-20742">https://issues.asterisk.org/jira/browse/ASTERISK-20742</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch introduces some new events in the queue_log, to track on-hold, and off-hold events,
which QueueMetrics (and anyone else) can use to measure hold times, a traditionally import
metric for Call Centers.
It uses the ast_event interface to generate the events and execute call-back funcs in app_queue.c.
The result are CALLERONHOLD and CALLEROFFHOLD events in queue_log:
1362496243|1362496237.15|300|SIP/204|CONNECT|6|1362496237.16|5
1362496247|1362496237.15|300|SIP/204|CALLERONHOLD|default
1362496249|1362496237.15|300|SIP/204|CALLEROFFHOLD|
1362496251|1362496237.15|300|SIP/204|CALLERONHOLD|default
1362496252|1362496237.15|300|SIP/204|CALLEROFFHOLD|
1362496254|1362496237.15|300|SIP/204|CALLERONHOLD|default
1362496255|1362496237.15|300|SIP/204|CALLEROFFHOLD|
1362496258|1362496237.15|300|SIP/204|COMPLETEAGENT|6|15|1
The CALLERONHOLD event also records the musicclass associated with the MOH.
By using hashtabs in app_queue, the code is optimized for the large-queue cases.
Every MOH call will generate a callback into the app_queue module; it is important
that the code quickly determine whether the MOH event is associated with a queue call.
No Linked-list searches allowed!
This code also drags a few events back into app_queue, namely the code in chan_agent that
recorded agent log-ins and log-outs.
I've tested this code on 1.8 and trunk, and because of the asynchronous nature of
the queue logging, included a few lines of code to restrict ONHOLD and OFFHOLD events
such that OFFHOLD events will only be generated after an ONHOLD event, and vice-versa.
Others have tested the code and the results are so far positive. We hope to get some
"smaller" production boxes online with this code, and see how it performs "under load".
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">On trunk, with small queues; on 1.8 (backported) in at least 2 sites so far (at least,
according to feedback.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/apps/app_queue.c <span style="color: grey">(384234)</span></li>
<li>/trunk/channels/chan_agent.c <span style="color: grey">(384234)</span></li>
<li>/trunk/include/asterisk/event_defs.h <span style="color: grey">(384234)</span></li>
<li>/trunk/res/res_musiconhold.c <span style="color: grey">(384234)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2417/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>