<div dir="ltr">Dmann, you are right,<br><br>thank you <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 21, 2016 at 7:14 PM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">maybe check out billsec ?  there are quite a number of values available depending on what exactly you need, try checking the cdr for what values you actually want and what format they are in.<br>
<span class=""><br>
&gt; On Jan 21, 2016, at 11:02 AM, ik &lt;<a href="mailto:idokan@gmail.com">idokan@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; I require to calculate on hangup the duration of a call regardless of the CDR, and do some logic if it&#39;s above a range.<br>
&gt;<br>
&gt; I&#39;m placing at the api_hangup_hook a cli parameters that one of them is answered_time.<br>
&gt;<br>
&gt; I need the data in minutes unit, and the data seems to be a timestamp in microseconds, but converting it to seconds (e.g. answered_time / 1000000) provides me a very low range of number, sometimes even less then a millisecond.<br>
&gt;<br>
&gt; I can&#39;t seems to find at the documentation what is the unit for the answered_time in order to properly convert it to my requirements.<br>
&gt;<br>
&gt; I&#39;m also missing the place at the source code where the data is set to the variable (here is the grep result (at the src directory):<br>
&gt;<br>
&gt; grep  answered_time ./* -R<br>
&gt; ./mod/event_handlers/mod_cdr_mongodb/mod_cdr_mongodb.c:                 bson_append_long(&amp;cdr, &quot;answered_time&quot;, caller_profile-&gt;times-&gt;answered);<br>
&gt; ./mod/languages/mod_managed/managed/ChannelVariables.cs:            const string answered_time = &quot;answered_time&quot;;<br>
&gt; ./mod/languages/mod_managed/managed/ChannelVariables.cs:                get { return readUsecsDateTime(answered_time); }<br>
&gt; ./switch_caller.c:      if (!strcasecmp(name, &quot;answered_time&quot;)) {<br>
&gt; ./switch_core_session.c:                                                } else if (!strcmp(tag3-&gt;name, &quot;answered_time&quot;)) {<br>
&gt; ./switch_ivr.c:                 if (!(time_tag = switch_xml_add_child_d(x_times, &quot;answered_time&quot;, t_off++))) {<br>
&gt; ./switch_ivr.c:                 cJSON_AddItemToObject(j_times, &quot;answered_time&quot;, cJSON_CreateString(tmp));<br>
<br>
<br>
</span>_________________________________________________________________________<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.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.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.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/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>