linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Set call duration!


From: Sylvain Berfini
Subject: Re: [Linphone-developers] Set call duration!
Date: Tue, 27 Oct 2015 15:28:02 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Hi Bilal,

In coreapi/linphonecall.c, in the method linphone_call_set_state, you'll see a call->log->connected_date_time = ms_time(NULL) for the state LinphoneCallConnected.
If you move/copy this statement into the LinphoneCallStreamsRunning, the getDuration() method will return the time since the call has really started.
Beware that a single call can go multiple times through the state LinphoneCallStreamsRunning!

If you don't want to touch the source code, you can always store somewhere the time difference between the first time your call went into LinphoneCallStreamsRunning state and the getDuration() value at this time, and then always substract this value to the getDuration() result...

Cheers.
Sylvain Berfini
Software Engineer @ Belledonne Communications
Le 27/10/2015 15:10, bilal khan a écrit :
Hi

My name is Bilal, software engineer by profession. I am using Linphone to learn about VOIP technology. 

When SIP call is made, linphone starts counting time even call is not picked yet. I have gone through core lib files and found getDuration() method. Is there any api to set call duration. Actually I want linphone to start count seconds when call is picked excluding the waiting time. 

Any help or way to stairs would highly be appreciated. Thanks

 
Bilal Baloch 
Software Engineer
+46-760-604756
!DSPAM:562f86be17972129964501!

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


!DSPAM:562f86be17972129964501!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]