[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] [Code Review] 3154: CDRs: fix a variety of dial status problems, h/hangup handler
From:       "Matt Jordan" <reviewboard () asterisk ! org>
Date:       2014-01-31 23:40:29
Message-ID: 20140131234029.32488.81084 () sonic ! digium ! api
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

(Updated Jan. 31, 2014, 5:40 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Bugs: ASTERISK-23164
    https://issues.asterisk.org/jira/browse/ASTERISK-23164


Repository: Asterisk


Description
-------

This patch fixes a number of small-ish problems that were noticed when witnessing the \
records that the FreePBX dialplan produces. (1) Mid-call events (as well as privacy \
options) have the ability to change the overall state of the Dial operation after the \
called party answers. This means that publishing the DialEnd event when the called \
party is premature; we have to wait for the execution of these subroutines to \
complete before we can signal the overall status of the DialEnd. This patch moves \
that publication and adds handlers for the mid-call events. (2) This patch fixes a \
bug with the F option, where specifying only a priority would be skipped as no '^' \
character is needed or present. This bug fix will be merged in 1.8+. (3) The \
AST_FLAG_OUTGOING channel flag is cleared if an after bridge goto datastore is \
detected. This flag was preventing CDRs from being recorded for all outbound channels \
that had a 'continue' option enabled on them by the Dial application. (4) The CDR \
engine now locks the 'Dial' application as being the CDR application if it detects \
that the current CDR has entered that app. This is similar to the logic that is done \
for Parking. In general, if we entered into Dial, then we want that CDR to record the \
application as such - this prevent pre-dial handlers, mid-call handlers, and other \
shenaniganry from changing the application value. (5) The CDR engine now checks for \
both the AST_FLAG_DEAD and the AST_SOFTHANGUP_HANGUP_EXEC to determine if the channel \
is in hangup logic or dead. In either case, we don't want to record changes in the \
channel. (6) Finally, because we now have the ability to synchronize on the messages \
published to the CDR topic, on shutdown the CDR engine will now synchronize to the \
messages currently in flight. This helps to ensure that all in-flight CDRs are \
written before shutting down.


Diffs
-----

  /branches/12/main/pbx.c 406293 
  /branches/12/main/manager_channels.c 406293 
  /branches/12/main/cdr.c 406293 
  /branches/12/main/bridge_after.c 406293 
  /branches/12/apps/app_dial.c 406293 

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


Testing
-------

See review https://reviewboard.asterisk.org/r/3153/


Thanks,

Matt Jordan


[Attachment #5 (text/html)]

<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/3154/">https://reviewboard.asterisk.org/r/3154/</a>
  </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;">  <tr>
  <td>
   <h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
marked as submitted.</h1>  </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.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Matt Jordan.</div>


<p style="color: grey;"><i>Updated Jan. 31, 2014, 5:40 p.m.</i></p>







<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/ASTERISK-23164">ASTERISK-23164</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 fixes a number of small-ish problems that were noticed when \
witnessing the records that the FreePBX dialplan produces. (1) Mid-call events (as \
well as privacy options) have the ability to change the overall state of the Dial \
operation after the called party answers. This means that publishing the DialEnd \
event when the called party is premature; we have to wait for the execution of these \
subroutines to complete before we can signal the overall status of the DialEnd. This \
patch moves that publication and adds handlers for the mid-call events. (2) This \
patch fixes a bug with the F option, where specifying only a priority would be \
skipped as no &#39;^&#39; character is needed or present. This bug fix will be merged \
in 1.8+. (3) The AST_FLAG_OUTGOING channel flag is cleared if an after bridge goto \
datastore is detected. This flag was preventing CDRs from being recorded for all \
outbound channels that had a &#39;continue&#39; option enabled on them by the Dial \
application. (4) The CDR engine now locks the &#39;Dial&#39; application as being the \
CDR application if it detects that the current CDR has entered that app. This is \
similar to the logic that is done for Parking. In general, if we entered into Dial, \
then we want that CDR to record the application as such - this prevent pre-dial \
handlers, mid-call handlers, and other shenaniganry from changing the application \
value. (5) The CDR engine now checks for both the AST_FLAG_DEAD and the \
AST_SOFTHANGUP_HANGUP_EXEC to determine if the channel is in hangup logic or dead. In \
either case, we don&#39;t want to record changes in the channel. (6) Finally, because \
we now have the ability to synchronize on the messages published to the CDR topic, on \
shutdown the CDR engine will now synchronize to the messages currently in flight. \
This helps to ensure that all in-flight CDRs are written before shutting down.</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;">See review https://reviewboard.asterisk.org/r/3153/</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>/branches/12/main/pbx.c <span style="color: grey">(406293)</span></li>

 <li>/branches/12/main/manager_channels.c <span style="color: \
grey">(406293)</span></li>

 <li>/branches/12/main/cdr.c <span style="color: grey">(406293)</span></li>

 <li>/branches/12/main/bridge_after.c <span style="color: grey">(406293)</span></li>

 <li>/branches/12/apps/app_dial.c <span style="color: grey">(406293)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/3154/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic