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

Developer

Forums

Forums:

is there a way to get phone number of the phone where BREW app is installed?

Try ISHELL_GetDeviceInfoEx() with AEE_DEVICEITEM_MDN.

Try ISHELL_GetDeviceInfoEx() with AEE_DEVICEITEM_MDN.

The MDN number need not necessarily the phone number. it is a number with a country code, carrier code and a unique number.
In some countries the MDN and the phone numbers might be the same but not always

The MDN number need not necessarily the phone number. it is a number with a country code, carrier code and a unique number.
In some countries the MDN and the phone numbers might be the same but not always

hEY I ALSO LOOKING FOR PHONE NUMBER I AM USING ITAPI BUT NO USE I M NLY GETTING SOME MIN NUMBER BUT NO PHONE NUMBER .
i NEED TATA DEVICE PHONENUMBER....
HOW CAN I GET IT.

hEY I ALSO LOOKING FOR PHONE NUMBER I AM USING ITAPI BUT NO USE I M NLY GETTING SOME MIN NUMBER BUT NO PHONE NUMBER .
i NEED TATA DEVICE PHONENUMBER....
HOW CAN I GET IT.

You will have to upload a servlet which will accept an MIN number and then get the phone number from the operator database and then send it back to the client.

You will have to upload a servlet which will accept an MIN number and then get the phone number from the operator database and then send it back to the client.

Hi All,
I used AEE_DEVICEITEM_MDN with ISHELL_GetDeviceInfoEx and got the Phone Number from Moto Razr and LG 6335 on TATA network.
Regards,
Sunil

Hi All,
I used AEE_DEVICEITEM_MDN with ISHELL_GetDeviceInfoEx and got the Phone Number from Moto Razr and LG 6335 on TATA network.
Regards,
Sunil

hey sunil which version did you use for this.
We are using 2.1.0 will we get the same. and wht about the other device like LG5235 and kycoera.

hey sunil which version did you use for this.
We are using 2.1.0 will we get the same. and wht about the other device like LG5235 and kycoera.

AEE_DEVICEITEM_MDN requires BREW 2.1.3+ and may not be supported on all 2.1.3 devices.

AEE_DEVICEITEM_MDN requires BREW 2.1.3+ and may not be supported on all 2.1.3 devices.

As per sunil he got phone number on Lg6335 .
But i m getting number as 21 what is wrong i m using 2.1.3 ?
Pl if u can expalin the whole procedure ?

As per sunil he got phone number on Lg6335 .
But i m getting number as 21 what is wrong i m using 2.1.3 ?
Pl if u can expalin the whole procedure ?

Quote:may not be supported on all 2.1.3 devices.
As per mohlendo it is dependent on the phone menufacture implementaion.

Quote:may not be supported on all 2.1.3 devices.
As per mohlendo it is dependent on the phone menufacture implementaion.

BUT I am also using LG6335 . I am not getting phone number whereas Sunel got it wht can be wrong on my side I.

BUT I am also using LG6335 . I am not getting phone number whereas Sunel got it wht can be wrong on my side I.

It does not matter the device model you have to check the Firmware version.

It does not matter the device model you have to check the Firmware version.

what do you men by firmware version

what do you men by firmware version

From the API reference:
AEE_DEVICEITEM_MDN
This returns the Mobile Directory Number.
AEECLSID_MDN is the required privilege level.
Be sure you added a dependency on AEECLSID_MDN in your MIF.

From the API reference:
AEE_DEVICEITEM_MDN
This returns the Mobile Directory Number.
AEECLSID_MDN is the required privilege level.
Be sure you added a dependency on AEECLSID_MDN in your MIF.

Hi,
Please, Send me the code to reterive the phone number
Thank you.

Hi,
Please, Send me the code to reterive the phone number
Thank you.

It's one line of code -- you just call ISHELL_GetDeviceInfoEx(). Read the API reference.

It's one line of code -- you just call ISHELL_GetDeviceInfoEx(). Read the API reference.

Iam using the same code but cant copy the number to string.
what can be the problem
all previlges given
my code:
void MDNGET(mdn * pMe)
{
int ret;
int rSiz;
char * phone;
char *pBuf;
char temp={0};
int i;
AECHAR * phonenumber;
short iLen;int j=0;
rSiz = 0;
ret = ISHELL_GetDeviceInfoEx (pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, NULL, &rSiz);
pBuf = MALLOC (rSiz+1);
phone= MALLOC (rSiz+1);
ret = ISHELL_GetDeviceInfoEx (pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, pBuf, &rSiz);
DBGPRINTF("-%s---------MDNGET--------%s---",pBuf,phone);
iLen=STRLEN(pBuf);
//STR_TO_WSTR(pBuf, phonenumber, sizeof(phonenumber));
/*
// for(i=iLen-10;ia.m_pIDisplay, AEE_FONT_BOLD, phonenumber, -1, 2, i+3, 0, IDF_TEXT_TRANSPARENT|IDF_ALIGN_CENTER);
FREEIF(phonenumber);
}
I have tried everything but unable to save in string

Iam using the same code but cant copy the number to string.
what can be the problem
all previlges given
my code:
void MDNGET(mdn * pMe)
{
int ret;
int rSiz;
char * phone;
char *pBuf;
char temp={0};
int i;
AECHAR * phonenumber;
short iLen;int j=0;
rSiz = 0;
ret = ISHELL_GetDeviceInfoEx (pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, NULL, &rSiz);
pBuf = MALLOC (rSiz+1);
phone= MALLOC (rSiz+1);
ret = ISHELL_GetDeviceInfoEx (pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, pBuf, &rSiz);
DBGPRINTF("-%s---------MDNGET--------%s---",pBuf,phone);
iLen=STRLEN(pBuf);
//STR_TO_WSTR(pBuf, phonenumber, sizeof(phonenumber));
/*
// for(i=iLen-10;ia.m_pIDisplay, AEE_FONT_BOLD, phonenumber, -1, 2, i+3, 0, IDF_TEXT_TRANSPARENT|IDF_ALIGN_CENTER);
FREEIF(phonenumber);
}
I have tried everything but unable to save in string

Hi,
Try the following:
size = 0;
ret = ISHELL_GetDeviceInfoEx(pEngPriv->pShell, AEE_DEVICEITEM_MDN, NULL, &size); //DN
pEngPriv->pszDN = (char *)MALLOC(size+1);
ret = ISHELL_GetDeviceInfoEx(pEngPriv->pShell, AEE_DEVICEITEM_MDN, pEngPriv->pszDN, &size);
You don't know the size of the MDN. So you can find out the size of it by passing NULL, and then you can allocate the size to the buffer. Later you can get tht using the API.
Regards,
Sunil

Hi,
Try the following:
size = 0;
ret = ISHELL_GetDeviceInfoEx(pEngPriv->pShell, AEE_DEVICEITEM_MDN, NULL, &size); //DN
pEngPriv->pszDN = (char *)MALLOC(size+1);
ret = ISHELL_GetDeviceInfoEx(pEngPriv->pShell, AEE_DEVICEITEM_MDN, pEngPriv->pszDN, &size);
You don't know the size of the MDN. So you can find out the size of it by passing NULL, and then you can allocate the size to the buffer. Later you can get tht using the API.
Regards,
Sunil

this also have been tried but no use
void GetMDN (mdn * pMe )
{
char * buffer;
int buf[10];
// AECHAR * full=NULL;
int result = -1, sizeMDN = -1 ;
int i;
result = ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, NULL, &sizeMDN);
DBGPRINTF( "****Reading buffer ****%d" , result);
if (sizeMDN > 0)
{
DBGPRINTF( "****Size greater than zero****");
buffer = (char *)MALLOC((sizeMDN + 1 ) * sizeof(char) );
result = ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, buffer, &sizeMDN);
DBGPRINTF( "****Reading buffer ****%d" , result);
if( result == SUCCESS)
{
for(i = 0; i < sizeMDN; i++)
{
// SPRINTF(level,"%d",pMe->nLevel);
buf[i]=ATOI(buffer);
DBGPRINTF( "MDN[%d]=%d-----%d" , i,buffer[i],buf[i]);
// a[i]=ATOI(buffer[i]);
// SPRINTF(full, "%s%s",buffer[i],buffer[i]);
DBGPRINTF( "****MIN Decimal****%c" , buffer[i]);
}
DBGPRINTF( "****MIN Decimal****%c" , buffer);
}
else
DBGPRINTF( "****FAIL****");
FREEIF(buffer);
buffer = NULL;
}
else
DBGPRINTF( "****Size less than zero****");
return;

this also have been tried but no use
void GetMDN (mdn * pMe )
{
char * buffer;
int buf[10];
// AECHAR * full=NULL;
int result = -1, sizeMDN = -1 ;
int i;
result = ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, NULL, &sizeMDN);
DBGPRINTF( "****Reading buffer ****%d" , result);
if (sizeMDN > 0)
{
DBGPRINTF( "****Size greater than zero****");
buffer = (char *)MALLOC((sizeMDN + 1 ) * sizeof(char) );
result = ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell, AEE_DEVICEITEM_MDN, buffer, &sizeMDN);
DBGPRINTF( "****Reading buffer ****%d" , result);
if( result == SUCCESS)
{
for(i = 0; i < sizeMDN; i++)
{
// SPRINTF(level,"%d",pMe->nLevel);
buf[i]=ATOI(buffer);
DBGPRINTF( "MDN[%d]=%d-----%d" , i,buffer[i],buf[i]);
// a[i]=ATOI(buffer[i]);
// SPRINTF(full, "%s%s",buffer[i],buffer[i]);
DBGPRINTF( "****MIN Decimal****%c" , buffer[i]);
}
DBGPRINTF( "****MIN Decimal****%c" , buffer);
}
else
DBGPRINTF( "****FAIL****");
FREEIF(buffer);
buffer = NULL;
}
else
DBGPRINTF( "****Size less than zero****");
return;

What do you get for output? Does the call to ISHELL_GetDeviceInfoEx() succeed? Are you testing on a device that supports this AEEDeviceItem?

What do you get for output? Does the call to ISHELL_GetDeviceInfoEx() succeed? Are you testing on a device that supports this AEEDeviceItem?

Yes , I am getting out put in buffer but i can print it on screen or use it in another string.
I have to print in using for loop cant print it using %s.
I am using LG6335.
DOnt knwo wht the problem is I need it urgently but i cant use it bcoz i can only see the number but not use it.

Yes , I am getting out put in buffer but i can print it on screen or use it in another string.
I have to print in using for loop cant print it using %s.
I am using LG6335.
DOnt knwo wht the problem is I need it urgently but i cant use it bcoz i can only see the number but not use it.

I don't really understand what you're saying the problem is. If it populates the buffer, why can't you use the string? Is it properly null-terminated?

I don't really understand what you're saying the problem is. If it populates the buffer, why can't you use the string? Is it properly null-terminated?

ppb_b10,
You r not moving the buffer pointer to get the next character. you are doing ATOI(buffer), but buffer is a char pointer.. and it wil b always pointing to the starting position of MDN which u get from the API. You need to increment the pointer to get the next character..
Regards,
Sunil

ppb_b10,
You r not moving the buffer pointer to get the next character. you are doing ATOI(buffer), but buffer is a char pointer.. and it wil b always pointing to the starting position of MDN which u get from the API. You need to increment the pointer to get the next character..
Regards,
Sunil

Hey,
ISHELL_GetDeviceInfoEx is not supported until Brew 2.1.x. I'm also searching for a way to get the phone number on a 2.0.x phone. Any ideas?
-Krad

Hey,
ISHELL_GetDeviceInfoEx is not supported until Brew 2.1.x. I'm also searching for a way to get the phone number on a 2.0.x phone. Any ideas?
-Krad

How can i get phone number in samsung SCH-259 for TATA......i m using ISHELL_GetDeviceInfoEx but i m not getting anything on handset...Is there any setting to be done in Mif???if yes how???
Help me its urgent............
Thanks in advance

How can i get phone number in samsung SCH-259 for TATA......i m using ISHELL_GetDeviceInfoEx but i m not getting anything on handset...Is there any setting to be done in Mif???if yes how???
Help me its urgent............
Thanks in advance

priya_du wrote:How can i get phone number in samsung SCH-259 for TATA......i m using ISHELL_GetDeviceInfoEx but i m not getting anything on handset...Is there any setting to be done in Mif???if yes how???
Help me its urgent............
Thanks in advance
1 :U can get it using ISHELL_GetDeviceInfoEx with AEE_DEVICEITEM_MDN only if it is provisioned to get(ie if the number is hardcoded in the phone)else u cant.
2 :the other way is to get the min(get it thru ITAPI_GetStatus szMobileID: ASCII string representing Mobile Identification Number (MIN).) and use this to hit the WDSAPI(thru iweb) and get the phone number as a reply.
for this u have to contact ur operator to get the ip to hit for the phone number

priya_du wrote:How can i get phone number in samsung SCH-259 for TATA......i m using ISHELL_GetDeviceInfoEx but i m not getting anything on handset...Is there any setting to be done in Mif???if yes how???
Help me its urgent............
Thanks in advance
1 :U can get it using ISHELL_GetDeviceInfoEx with AEE_DEVICEITEM_MDN only if it is provisioned to get(ie if the number is hardcoded in the phone)else u cant.
2 :the other way is to get the min(get it thru ITAPI_GetStatus szMobileID: ASCII string representing Mobile Identification Number (MIN).) and use this to hit the WDSAPI(thru iweb) and get the phone number as a reply.
for this u have to contact ur operator to get the ip to hit for the phone number

mk.manju wrote:1 :U can get it using ISHELL_GetDeviceInfoEx with AEE_DEVICEITEM_MDN only if it is provisioned to get(ie if the number is hardcoded in the phone)else u cant.
2 :the other way is to get the min(get it thru ITAPI_GetStatus szMobileID: ASCII string representing Mobile Identification Number (MIN).) and use this to hit the WDSAPI(thru iweb) and get the phone number as a reply.
for this u have to contact ur operator to get the ip to hit for the phone number
Hi Manju,
Thanks for ur quick reply.
How can i know phone number is embedded in my device??
Also is any another method to get the phone number in SCH-259 without contacting the operator ie TATA??
Thanks

mk.manju wrote:1 :U can get it using ISHELL_GetDeviceInfoEx with AEE_DEVICEITEM_MDN only if it is provisioned to get(ie if the number is hardcoded in the phone)else u cant.
2 :the other way is to get the min(get it thru ITAPI_GetStatus szMobileID: ASCII string representing Mobile Identification Number (MIN).) and use this to hit the WDSAPI(thru iweb) and get the phone number as a reply.
for this u have to contact ur operator to get the ip to hit for the phone number
Hi Manju,
Thanks for ur quick reply.
How can i know phone number is embedded in my device??
Also is any another method to get the phone number in SCH-259 without contacting the operator ie TATA??
Thanks

priya_du wrote:
How can i know phone number is embedded in my device??
use AEE_DEVICEITEM_MDN u may find it.(MDN is not necessarily phone number, it can be any other no as well!!)
priya_du wrote:
Also is any another method to get the phone number in SCH-259 without contacting the operator ie TATA??
Thanks
if ur targeting ur appl for tata,then they shuld provide u a way to get the phone number.
ie above menioned way.why dont u contact them,its prety easy to follow.

priya_du wrote:
How can i know phone number is embedded in my device??
use AEE_DEVICEITEM_MDN u may find it.(MDN is not necessarily phone number, it can be any other no as well!!)
priya_du wrote:
Also is any another method to get the phone number in SCH-259 without contacting the operator ie TATA??
Thanks
if ur targeting ur appl for tata,then they shuld provide u a way to get the phone number.
ie above menioned way.why dont u contact them,its prety easy to follow.

mk.manju wrote:use AEE_DEVICEITEM_MDN u may find it.(MDN is not necessarily phone number, it can be any other no as well!!)
if ur targeting ur appl for tata,then they shuld provide u a way to get the phone number.
ie above menioned way.why dont u contact them,its prety easy to follow.
Hi Manju,
Thanks for ur quick reply.
I have used AEE_DEVICEITEM_MDN but i m not getting anything on handet.
Here is the code plz see if there is any thing wrong???
*********************************************
char *device_no=NULL;
int tempbuf[10];
char* ptr=NULL;
int i=0;
int result;
result = ISHELL_GetDeviceInfoEx(pMe->pIShell,AEE_DEVICEITEM_MDN,NULL, &i);
DBGPRINTF( "****Reading buffer ****%d- %d" , result,i);
device_no = (char*) MALLOC (i+1);
result=ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell,AEE_DEVICEITEM_MDN,device_no,&i);
DBGPRINTF( "****Reading buffer ****%d" , result);
ptr = device_no;
MEMSET(tempbuf,0,10);
for(i=0;i<10;i++)
{
DBGPRINTF("device no is = %s",ptr);
tempbuf[i] = ATOI(ptr);
ptr++;
DBGPRINTF("temp buf is = %d",tempbuf[i]);

DBGPRINTF("temp buf value is = %d",tempbuf);
*********************************************************

mk.manju wrote:use AEE_DEVICEITEM_MDN u may find it.(MDN is not necessarily phone number, it can be any other no as well!!)
if ur targeting ur appl for tata,then they shuld provide u a way to get the phone number.
ie above menioned way.why dont u contact them,its prety easy to follow.
Hi Manju,
Thanks for ur quick reply.
I have used AEE_DEVICEITEM_MDN but i m not getting anything on handet.
Here is the code plz see if there is any thing wrong???
*********************************************
char *device_no=NULL;
int tempbuf[10];
char* ptr=NULL;
int i=0;
int result;
result = ISHELL_GetDeviceInfoEx(pMe->pIShell,AEE_DEVICEITEM_MDN,NULL, &i);
DBGPRINTF( "****Reading buffer ****%d- %d" , result,i);
device_no = (char*) MALLOC (i+1);
result=ISHELL_GetDeviceInfoEx(pMe->a.m_pIShell,AEE_DEVICEITEM_MDN,device_no,&i);
DBGPRINTF( "****Reading buffer ****%d" , result);
ptr = device_no;
MEMSET(tempbuf,0,10);
for(i=0;i<10;i++)
{
DBGPRINTF("device no is = %s",ptr);
tempbuf[i] = ATOI(ptr);
ptr++;
DBGPRINTF("temp buf is = %d",tempbuf[i]);

DBGPRINTF("temp buf value is = %d",tempbuf);
*********************************************************