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 :