<div dir="ltr">Use the CHANNEL_HANGUP_COMPLETE event for this purpose.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 5:34 PM, Bruce Lefko <span dir="ltr">&lt;<a href="mailto:blefko5361@gmail.com" target="_blank">blefko5361@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi there.<div><br></div><div>I&#39;m trying to get the call duration in seconds using ESL, but it looks like the channel variables are not being set correctly.</div><div><br></div><div>In CHANNEL_HANGUP events, I see the following variables:</div><div><br></div><div><div>  &#39;Caller-Profile-Created-Time&#39; =&gt; &#39;1420586926995761&#39;,</div><div>  &#39;Caller-Channel-Created-Time&#39; =&gt; &#39;1420586926995761&#39;,</div><div>  &#39;Caller-Channel-Answered-Time&#39; =&gt; &#39;1420586929503733&#39;,</div><div>  &#39;Caller-Channel-Progress-Time&#39; =&gt; &#39;0&#39;,</div><div>  &#39;Caller-Channel-Progress-Media-Time&#39; =&gt; &#39;1420586929203735&#39;,</div><div>  &#39;Caller-Channel-Hangup-Time&#39; =&gt; &#39;0&#39;,</div></div><div><br></div><div>I would expect to generate the duration of the call by subtracting Caller-Channel-Answered-Time from Caller-Channel-Hangup-Time, but the hangup time is 0.  The actual call in this case was 45 seconds long.</div><div><br></div><div>What can I do use Freeswitch events to compute call duration?</div><div><br></div><div>Thanks!</div><div><br></div><div><br></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" 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.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">







<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span></font></p>
<p><font size="1" face="courier new, monospace"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font face="courier new, monospace"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p>
<p><font face="courier new, monospace"><b>T:</b>+19184209001 | <b>F:</b>+19184209002 | <b>M:</b>+1918424WEST (9378)<br><b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</font></p></div></div>
</div>