[Freeswitch-users] How to get the answered call live duration?

Avi Marcus avi at avimarcus.net
Wed Jan 6 19:26:46 MSK 2016


"duration" is the entire call, and "billsec" is just the connected time,
without the ring. This is probably what you want.

-Avi Marcus
BestFone

On Wed, Jan 6, 2016 at 5:40 PM, ankitdoshi <ankit_doshi2011 at yahoo.com>
wrote:

> Hello,
>
> How can I get the answered call live duration ?
>
> Let me give an example what i want to ask,
> let's say user A dialed a call to B and B receives it after 10 seconds,
> they
> talked for 20 seconds so now i am getting 30 seconds in cdr, i want it
> exact
> 20 seconds
>
> Now let me explain what I did so far that I am getting this o/p
> I am doing current time - created_epoch but its giving total duration of
> ringing + answered duration (as per exp, 30 secs)
>
> Let me provide you the 'show calls' info while call ringing,
>
>
> 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
> bce09d00-6**1-4**7-baa1-803f633b57cd,inbound,2016-01-06
> 19:30:26,14520***26,sofia/default/48******81@
> *.*.*.*,CS_EXECUTE,48******81,48******81,*.*.*.*,12345678,48******81@
> *.*.*.*,,RINGING,,,,,server,,,,,,,,,,,,,,,,,,,,,
> 97e47575-5**4-4**6-91cb-b6e75fea713e,outbound,2016-01-06
>
> 19:30:26,14520***26,sofia/default/12345678,CS_CONSUME_MEDIA,48******81,48******81,*.*.*.*,12345678,,,RINGING,Outbound
>
> Call,12345678,,bce09d00-6**1-4**7-baa1-803f633b57cd,server,,,,,,,,,,,,,,,,,,,,,
>
> And also 'show detailed_bridged_calls' info while call is on going
>
>
> 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
> bce09d00-6**1-4**7-baa1-803f633b57cd,inbound,2016-01-06
> 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
>
> 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
> Call,12345678,,bce09d00-6**1-4**7-baa1-803f633b57cd,,,1452088836
>
> Here, everywhere i am getting same time '2016-01-06 19:30:26' as
> created_epoch
> so is there any variable like 'answered_epoch' or 'bridged_epoch' which
> provide the exact time of answered call duration (as per exp, 20 secs) ?
> and
> not provide the ringing + answered duration (as per exp, 30 secs)?
>
> Any insights would be helpful.
> Thanks.
>
>
>
> -----
> Thanks
> Ankit Doshi
> --
> View this message in context:
> http://freeswitch-users.2379917.n2.nabble.com/How-to-get-the-answered-call-live-duration-tp7596197.html
> Sent from the freeswitch-users mailing list archive at Nabble.com.
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160106/4f37890a/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list