PDA

View Full Version : many RIL_NOTIFY_DISCONNECT signal received for one call made


ratannitk
2nd April 2007, 02:18 PM
Hi,
I was trying to get the notification signals for a voice call on windows mobile 5.0 smartphone so as to calculate the total call duration here is sample

// Initialize RIL library....
if (HdlRil == 0)
RIL_Initialize (1, ResultCallback, NotifyCallback, RIL_NCLASS_CALLCTRL, 0, &HdlRil);

void NotifyCallback(DWORD dwCode, HRESULT hrCmdID, const void *lpData, DWORD cbData, DWORD dwParam)
{
switch(dwCode)
{
case RIL_NOTIFY_CONNECT:
{ //debug(call connected);
dwOldTime = GetTickCount();
} break;
case RIL_NOTIFY_CONNECT: {
dwcalltime = GetTickCount()-dwOldTime;
//debug(call disconnected);}

}

Problem is when a call is made and cut after say 10 sec i get call connected debug message once thats correct but i get three or four call disconnected messages can u help me why i get those extra disconnected signals when a single disconnected signal was expected...

void ResultCallback (DWORD dwCode, HRESULT hrCmdID, const void *lpData, DWORD cbData, DWORD dwParam)
{
}
Thanks n Regards
Henry.