[Windows Mobile Software Development] bee-to-bee:
Hi there,

I have written program on Sumsung i900 (windows mobile 6.1) to monitor a voice call. I use RIL notification mechanism to capture call prograss info. The nofication callback function is as following.

Using this code, I successfully captured RIL_NOTIFY_CALLPROGRESSINFO, and RIL_CPISTAT_DISCONNECTED as dwStatus, and 0x07 as dwDisconnectCode within RILCALLINFO. My questions is, what does these dwDisconnectCode mean?

They are supposed to be defined in ril.h. But in the ril.h I'm using, what I found are: RIL_DISCINIT_LOCAL and RIL_DISCINIT_REMOTE. (0x01, 0x02). Where can I find out the meanings of the these dwDisconnectCode? Is there any newer version of ril.h available? I can't find out the version of the ril.h I'm using, but it's old and it says "Copyright (c) 1995-1999 Microsoft Corporation"

I appreciate it if anyone can help!

// The notify callback function for RIL

void CALLBACK NotifyCallback(DWORD dwCode,const void *lpData,DWORD cbData, DWORD dwParam)

{

CInfoBucket* pClass = (CInfoBucket*)dwParam;

DWORD dwClass = (dwCode & RIL_NCLASS_ALL);

TCHAR szMessage[STATUS_STRING_LEN];

StringCchCopy(szMessage, STATUS_STRING_LEN, TEXT(""));

switch(dwClass)

{

case RIL_NCLASS_NETWORK:

// case RIL_NCLASS_RADIOSTATE:

{

pClass->CallforCellInfo();

break;

}

}

switch(dwCode)

{

case RIL_NOTIFY_RING: swprintf(szMessage, TEXT("RIL_NOTIFY_RING")); break;

case RIL_NOTIFY_CONNECT: swprintf(szMessage, TEXT("RIL_NOTIFY_CONNECT")); break;

case RIL_NOTIFY_DISCONNECT: swprintf(szMessage, TEXT("RIL_NOTIFY_DISCONNECT")); break;

case RIL_NOTIFY_DATASVCNEGOTIATED: swprintf(szMessage, TEXT("RIL_NOTIFY_DATASVCNEGOTIATED")); break;

case RIL_NOTIFY_CALLSTATECHANGED: swprintf(szMessage, TEXT("RIL_NOTIFY_CALLSTATECHANGED")); break;

case RIL_NOTIFY_EMERGENCYMODEENTERED: swprintf(szMessage, TEXT("RIL_NOTIFY_EMERGENCYMODEENTERED")); break;

case RIL_NOTIFY_EMERGENCYMODEEXITED: swprintf(szMessage, TEXT("RIL_NOTIFY_EMERGENCYMODEEXITED")); break;

case RIL_NOTIFY_EMERGENCYHANGUP: swprintf(szMessage, TEXT("RIL_NOTIFY_EMERGENCYHANGUP")); break;

case RIL_NOTIFY_HSCSDPARAMSNEGOTIATED: swprintf(szMessage, TEXT("RIL_NOTIFY_HSCSDPARAMSNEGOTIATED")); break;

case RIL_NOTIFY_DIAL: swprintf(szMessage, TEXT("RIL_NOTIFY_DIAL")); break;

case RIL_NOTIFY_CURRENTLINECHANGED: swprintf(szMessage, TEXT("RIL_NOTIFY_CURRENTLINE_CHANGED")); break;

// case RIL_NOTIFY_GPRS_DISCONNECT: swprintf(szMessage, TEXT("RIL_NOTIFY_GPRS_DISCONNECT")); break;

// case RIL_NOTIFY_CALLMODIFICATIONINFO: swprintf(szMessage, TEXT("RIL_NOTIFY_CALLMODIFICATIONINFO")); break;

case RIL_NOTIFY_CALLPROGRESSINFO:

{

RILCALLINFO* pCallInfo = (RILCALLINFO*)lpData;

switch(pCallInfo->dwStatus)

{

case RIL_CPISTAT_UNKNOWN: swprintf(szMessage, TEXT("RIL_N_CP: CPI_UNKNOWN")); break;

case RIL_CPISTAT_NEW_OUTGOING: swprintf(szMessage, TEXT("RIL_N_CP: CPI_NEW_OUTGOING")); break;

case RIL_CPISTAT_NEW_INCOMING: swprintf(szMessage, TEXT("RIL_N_CP: CPI_NEW_INCOMING")); break;

case RIL_CPISTAT_CONNECTED: swprintf(szMessage, TEXT("RIL_N_CP: CPI_CONNECTED")); break;

case RIL_CPISTAT_DISCONNECTED:

{

swprintf(szMessage, TEXT("RIL_N_CP: CPI_DISCONNECTED: 0x%0x"), pCallInfo->dwDisconnectCode); //will try this field by using ril.dll from phone.

//swprintf(szMessage, TEXT("RIL_N_CP: CPI_DISCONNECTED"));

break;

}

default: swprintf(szMessage, TEXT("RIL_N_CP: Unknown Status: 0x%0x"), pCallInfo->dwStatus); break;

}

StringCchCat(szMessage, STATUS_STRING_LEN, TEXT(" "));

StringCchCat(szMessage, STATUS_STRING_LEN, pCallInfo->wszDescription);

break;

}

default: swprintf(szMessage, TEXT("Uncaptured Notification: 0x%0x"), dwCode); break;

}

pClass->UpdateLatestCallStatus(IDC_LATESTCALLSTATUS, szMessage);

}