<div dir="ltr">"duration" is the entire call, and "billsec" is just the connected time, without the ring. This is probably what you want.<div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">-Avi Marcus</div><div>BestFone</div></div></div>
<br><div class="gmail_quote">On Wed, Jan 6, 2016 at 5:40 PM, ankitdoshi <span dir="ltr"><<a href="mailto:ankit_doshi2011@yahoo.com" target="_blank">ankit_doshi2011@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
How can I get the answered call live duration ?<br>
<br>
Let me give an example what i want to ask,<br>
let's say user A dialed a call to B and B receives it after 10 seconds, they<br>
talked for 20 seconds so now i am getting 30 seconds in cdr, i want it exact<br>
20 seconds<br>
<br>
Now let me explain what I did so far that I am getting this o/p<br>
I am doing current time - created_epoch but its giving total duration of<br>
ringing + answered duration (as per exp, 30 secs)<br>
<br>
Let me provide you the 'show calls' info while call ringing,<br>
<br>
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid,hostname,sent_callee_name,sent_callee_num,b_uuid,b_direction,b_created,b_created_epoch,b_name,b_state,b_cid_name,b_cid_num,b_ip_addr,b_dest,b_presence_id,b_presence_data,b_callstate,b_callee_name,b_callee_num,b_callee_direction,b_sent_callee_name,b_sent_callee_num,call_created_epoch<br>
bce09d00-6**1-4**7-baa1-803f633b57cd,inbound,2016-01-06<br>
19:30:26,14520***26,sofia/default/48******81@*.*.*.*,CS_EXECUTE,48******81,48******81,*.*.*.*,12345678,48******81@*.*.*.*,,RINGING,,,,,server,,,,,,,,,,,,,,,,,,,,,<br>
97e47575-5**4-4**6-91cb-b6e75fea713e,outbound,2016-01-06<br>
19:30:26,14520***26,sofia/default/12345678,CS_CONSUME_MEDIA,48******81,48******81,*.*.*.*,12345678,,,RINGING,Outbound<br>
Call,12345678,,bce09d00-6**1-4**7-baa1-803f633b57cd,server,,,,,,,,,,,,,,,,,,,,,<br>
<br>
And also 'show detailed_bridged_calls' info while call is on going<br>
<br>
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,read_bit_rate,write_codec,write_rate,write_bit_rate,secure,hostname,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid,sent_callee_name,sent_callee_num,b_uuid,b_direction,b_created,b_created_epoch,b_name,b_state,b_cid_name,b_cid_num,b_ip_addr,b_dest,b_application,b_application_data,b_dialplan,b_context,b_read_codec,b_read_rate,b_read_bit_rate,b_write_codec,b_write_rate,b_write_bit_rate,b_secure,b_hostname,b_presence_id,b_presence_data,b_callstate,b_callee_name,b_callee_num,b_callee_direction,b_call_uuid,b_sent_callee_name,b_sent_callee_num,call_created_epoch<br>
bce09d00-6**1-4**7-baa1-803f633b57cd,inbound,2016-01-06<br>
19:30:26,14520***26,sofia/default/48******81@*.*.*.*,CS_EXECUTE,48******81,48******81,*.*.*.*,12345678,,,XML,default,PCMA,8000,64000,PCMA,8000,64000,,servertwo,48******81@*.*.*.*,,HELD,,,,bce09d00-6**1-4**7-baa1-803f633b57cd,,,97e47575-5**4-4**6-91cb-b6e75fea713e,outbound,2016-01-06<br>
19:30:26,14520***26,sofia/default/12345678,CS_EXCHANGE_MEDIA,48******81,48******81,*.*.*.*,12345678,playback,local_stream://moh,XML,default,PCMA,8000,64000,PCMA,8000,64000,,servertwo,,,ACTIVE,Outbound<br>
Call,12345678,,bce09d00-6**1-4**7-baa1-803f633b57cd,,,1452088836<br>
<br>
Here, everywhere i am getting same time '2016-01-06 19:30:26' as<br>
created_epoch<br>
so is there any variable like 'answered_epoch' or 'bridged_epoch' which<br>
provide the exact time of answered call duration (as per exp, 20 secs) ? and<br>
not provide the ringing + answered duration (as per exp, 30 secs)?<br>
<br>
Any insights would be helpful.<br>
Thanks.<br>
<br>
<br>
<br>
-----<br>
Thanks<br>
Ankit Doshi<br>
--<br>
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/How-to-get-the-answered-call-live-duration-tp7596197.html" rel="noreferrer" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/How-to-get-the-answered-call-live-duration-tp7596197.html</a><br>
Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
<br>
_________________________________________________________________________<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></div>