<div dir="ltr">Hello David,<div><br></div><div>Also, you may have a try setting the session_in_hangup_hook variable to true (JS example here: <a href="https://freeswitch.org/confluence/display/FREESWITCH/JavaScript+Example+-+Session+in+Hangup+Hook">https://freeswitch.org/confluence/display/FREESWITCH/JavaScript+Example+-+Session+in+Hangup+Hook</a>, see the old wiki for more info <a href="https://wiki.freeswitch.org/wiki/Variable_session_in_hangup_hook">https://wiki.freeswitch.org/wiki/Variable_session_in_hangup_hook</a>)</div><div><br></div><div>Florent</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-15 15:48 GMT+02:00 Ken Rice <span dir="ltr">&lt;<a href="mailto:krice@freeswitch.org" target="_blank">krice@freeswitch.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">Why not just use mod_xml_cdr for this… it’ll post a full CDR that you can parse and will have all the information you are looking at and will not potentially leave a session open<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-<wbr>bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>David Ponzone<br><b>Sent:</b> Thursday, September 15, 2016 8:37 AM<br><b>To:</b> FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>&gt;<br><b>Subject:</b> [Freeswitch-users] api_reporting_hook and session_in_hangup_hook issue<u></u><u></u></span></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I am trying to run mod_curl after hangup, in order to sens some channel variables to a HTTP server:<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">    &lt;extension name=&quot;from_SIP_account_to_US_<wbr>TollFree&quot;&gt;<u></u><u></u></p></div><div><p class="MsoNormal">       &lt;condition field=&quot;destination_number&quot; expression=&quot;^00(1800\d+)$&quot;&gt;<u></u><u></u></p></div><div><p class="MsoNormal">         &lt;action application=&quot;set&quot; data=&quot;api_reporting_hook=curl <a href="http://server/script.php?orig=$%7bsip_from_user%7d&amp;dest=$%7bdestination_number%7d&amp;callstart=$%7banswered_time%7d&amp;callend=$%7bhangup_time%7d" target="_blank">http://server/script.php?orig=<wbr>${sip_from_user}&amp;dest=${<wbr>destination_number}&amp;callstart=<wbr>${answered_time}&amp;callend=${<wbr>hangup_time}</a> headers get&quot;/&gt;<u></u><u></u></p></div><div><p class="MsoNormal">         &lt;action application=&quot;set&quot; data=&quot;session_in_hangup_hook=<wbr>true&quot;/&gt;<u></u><u></u></p></div><div><p class="MsoNormal">         &lt;action application=&quot;bridge&quot; data=&quot;{sip_cid_type=none}<wbr>sofia/gateway/trunk.out/+$1&quot;/&gt;<u></u><u></u></p></div><div><p class="MsoNormal">       &lt;/condition&gt;<u></u><u></u></p></div><div><p class="MsoNormal">     &lt;/extension&gt;<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">When I hangup, only sip_from_user and destination_number are correct.<u></u><u></u></p></div><div><p class="MsoNormal">answered_time contains 0 and hangup_time is empty<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Am I missing something ?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thank you<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><div><p class="MsoNormal"><span><span style="font-family:&quot;Helvetica Neue&quot;,serif;color:#1c00ff">David Ponzone</span></span><span><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#1c00ff"> </span></span><span><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#1c00ff"> </span></span><span><span style="font-family:&quot;Helvetica Neue&quot;,serif;color:black">Direction Technique</span></span><span style="font-family:&quot;Helvetica&quot;,sans-serif;color:black"><u></u><u></u></span></p></div><div><div><p class="MsoNormal"><span><span>email: <a href="mailto:david.ponzone@ipeva.fr" target="_blank">david.ponzone@ipeva.fr</a></span></span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif"><u></u><u></u></span></p></div><div><p class="MsoNormal"><span><span>tel:      01 74 03 18 97</span></span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif"><u></u><u></u></span></p></div><div><p class="MsoNormal"><span><span>gsm:   06 66 98 76 34</span></span><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif"><u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#0022f3"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span>Service Client </span><span>IP</span><span>eva</span><span style="font-family:&quot;Helvetica&quot;,sans-serif;color:#0022f3"><u></u><u></u></span></p></div><div><div><p class="MsoNormal"><span><span>tel:      0811 46 26 26</span></span><span style="font-size:7.5pt;font-family:&quot;Helvetica&quot;,sans-serif;color:black"><u></u><u></u></span></p></div><div><div><p class="MsoNormal"><u><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#0022f3"><a>www.ipeva.fr</a></span></u><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#656895">  -   </span><u><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#0022f3"><a>www.ipeva-studio.com</a></span></u><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#0022f3"><u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#0022f3"><u></u> <u></u></span></p></div><div><p class="MsoNormal" style="text-align:justify"><i><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:silver">Ce message et toutes les pièces jointes sont confidentiels et établis à l&#39;intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d&#39;altération. <b>IPeva</b> décline toute responsabilité au titre de ce message s&#39;il a été altéré, déformé ou falsifié. Si vous n&#39;êtes pas destinataire de ce message, merci de le détruire immédiatement et d&#39;avertir l&#39;expéditeur.</span></i><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:silver"><u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#0022f3"><u></u> <u></u></span></p></div></div></div></div></div></div><p class="MsoNormal"><span style="font-family:&quot;Helvetica&quot;,sans-serif"><br><br></span><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>