Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Allright, here's my problem:

A contact in kyocera told that ITAPI interface is not supported by this device.
I'm trying the following code in a Kyocera KX7 (Topaz) to retrieve the phone number.

AECHAR *buffer;
int result = -1, size = -1;

result = ISHELL_GetDeviceInfoEx(m_pIShell, AEE_DEVICEITEM_MOBILE_ID, NULL, &size);

if (size > 0){
buffer = (AECHAR *)MALLOC((size+1)*sizeof(AECHAR));
result = ISHELL_GetDeviceInfoEx(m_pIShell, AEE_DEVICEITEM_MOBILE_ID, buffer, &size);
}

The first ISHELL_GetDeviceInfoEx having NULL as a parameter is to return de size required by AEE_DEVICEITEM_MOBILE_ID. (Just like the API reference explains)

It happens that size is never bigger than zero.

Any words on what am I doing wrong?

Thanks in advance

GetDeviceMannerMode()
{
uint32 mode = 0;
int size = sizeof(mode);
int res=ISHELL_GetDeviceInfoEx(m_pIShell,
AEE_DEVICEITEM_MANNER_MODE, &mode, &size);
return mode;
:)
use this function.

GetDeviceMannerMode()
{
uint32 mode = 0;
int size = sizeof(mode);
int res=ISHELL_GetDeviceInfoEx(m_pIShell,
AEE_DEVICEITEM_MANNER_MODE, &mode, &size);
return mode;
:)
use this function.

vbandrade wrote:A contact in kyocera told that ITAPI interface is not supported by this device.
Who told you that this handset don't support ITAPI Interface???
It does support.
All the below three will work.....
Quote:
ITAPI *pITapi;
TAPIStatus tapiStatus;
int size;
char mobileID[32];
char mobileMIN[32];
char mobileMDN[32];
if(ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TAPI,(void **)&pITapi) != SUCCESS)
{
pITapi=NULL;
}
if(pITapi)
{
ITAPI_GetStatus(pITapi, &tapiStatus);
STRLCPY(mobileID,tapiStatus.szMobileID,32);
}
ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell,AEE_DEVICEITEM_SID,(void*)mobileMIN,&size);
ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell,AEE_DEVICEITEM_MDN,(void*)mobileMDN,&size);

vbandrade wrote:A contact in kyocera told that ITAPI interface is not supported by this device.
Who told you that this handset don't support ITAPI Interface???
It does support.
All the below three will work.....
Quote:
ITAPI *pITapi;
TAPIStatus tapiStatus;
int size;
char mobileID[32];
char mobileMIN[32];
char mobileMDN[32];
if(ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TAPI,(void **)&pITapi) != SUCCESS)
{
pITapi=NULL;
}
if(pITapi)
{
ITAPI_GetStatus(pITapi, &tapiStatus);
STRLCPY(mobileID,tapiStatus.szMobileID,32);
}
ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell,AEE_DEVICEITEM_SID,(void*)mobileMIN,&size);
ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell,AEE_DEVICEITEM_MDN,(void*)mobileMDN,&size);

Yes this ISHELL_DeviceInfoEx should work on topaz kx7 as it is 2.1.3 device rather this api has problem below 2.0.1 or so.
If you have problem with this then you can use the ITAPI to get the MIN number then parse it if different than MDN but in some of the cases both comes out to be the same.
Thanks
Deepak

Yes this ISHELL_DeviceInfoEx should work on topaz kx7 as it is 2.1.3 device rather this api has problem below 2.0.1 or so.
If you have problem with this then you can use the ITAPI to get the MIN number then parse it if different than MDN but in some of the cases both comes out to be the same.
Thanks
Deepak