get detailed call data

Oct 7, 2013 at 9:19 AM
Hi,
after a call has finished I need to get the duration of the call. When I try try get call data I receive a byte[0] array. This is my code:

_tapiMgr.TE_CALLSTATE += new EventHandler<TapiCallStateEventArgs>(_tapiMgr_TE_CALLSTATE);

...

private void _tapiMgr_TE_CALLSTATE_Debug(object sender, TapiCallStateEventArgs e) {
cDwMsg.writeLine("_tapiMgr_TE_CALLSTATE {0} {1}", e.State, e.Cause);
 // e.State = CS_DISCONNECTED,
 // e.Cause = CEC_DISCONNECT_NORMAL
string incomingNumber = e.Call.get_CallInfo(CALLINFO_STRING.CIS_CALLERIDNUMBER);
// ok   
object u = e.Call.get_CallInfo(CALLINFO_BUFFER.CIB_USERUSERINFO);
// returns byte[0]
object o = e.Call.get_CallInfo(CALLINFO_BUFFER.CIB_CALLDATABUFFER);
// returns byte[0]
Can anybody help me?
Coordinator
Oct 7, 2013 at 12:38 PM
Those fields are device-specific and not provided by very many systems. If the TSP doesn't provide any information, then the arrays are empty. Is there some documentation you are looking at which indicates the call duration is placed there for your hardware?

mark
Oct 7, 2013 at 1:21 PM
Thanks for the info.
I want to make the program work with different TSPs, so it seems I cannot use these calls. I'll measure the time between CS_CONNECTED and CS_DISCONNECTED events as a workaround.

peter