ITAPI_SendSMS() | developer.brewmp.com ITAPI_SendSMS() | developer.brewmp.com

Developer

ITAPI_SendSMS()

Forums:

hello all,
I have a problem that in the following code sms send successfully but after sending sms control does not go to the EVT_RESUME.,it remains still show status "sending sms".

void TapiSms::SendMessage(TapiSms *m_pITapiSms)
{
ITAPI_SendSMS(m_pITapiSms->m_pITapi,"9860071051","Hello, welcome in Lambent Family ",0,SendSmsCallBack,m_pITapiSms);

}
//SMS call back
void TapiSms::SendSmsCallBack(void *pData, int status)
{

TapiSms* m_pITapiSms = (TapiSms*)pData;

// DBGPRINTF("Status = %d",status);

m_pITapiSms-> nMode= status;
//if(TapiFlag)
//ITAPI_SendSMS(m_pITapiSms->m_pITapi,"9860559619","Hello welcome in Lambent Family ",0,SendSmsCallBack,m_pITapiSms);
DBGPRINTF("Send SMS Status = %d",status);
//m_pITapiSms->SMS_ShowStatus (m_pITapiSms);

//////Show the Status
void TapiSms::SMS_ShowStatus (TapiSms *m_pITapiSms)
{
const char *cpszMessage;
AECHAR pszOutput[MODE_CHAR];

IDISPLAY_ClearScreen (m_pITapiSms-> a.m_pIDisplay);

switch (m_pITapiSms-> nMode)
{
case -5:
cpszMessage= "Error sending email in callback";
break;
case -4:
cpszMessage= "Error sending email";
break;
case -3:
cpszMessage= "Bad TAPI status";
break;
case -2:
cpszMessage= "couldn't get status";
break;
case -1:
cpszMessage= "Error initializing";
break;
case 0:
cpszMessage= "Sending sms";
break;
case 1:
cpszMessage= "email sent???";
break;

default: //cpszMessage= "Unknown!@?";
break;
}

STRTOWSTR (cpszMessage, pszOutput, sizeof (pszOutput));
IDISPLAY_DrawText (m_pITapiSms-> a.m_pIDisplay, AEE_FONT_NORMAL,pszOutput,-1,0,0,NULL,0);
IDISPLAY_Update (m_pITapiSms-> a.m_pIDisplay);

}

Hello,
This API should be executed on device since we cant get the results on Emulator.
In the Notification callback the status that we get is only SUCCESS or FAILURE..
It is not clear that how did you get the other status like (SMS sending.etc which you have handled in swithc case). Device may generate SUSPEND and RESUME events while sending the SMS..This feature is somewhat device dependent.
"The status passed to the notificaiton function can be SUCCESS or Failure. "
Regards
Satish Panpatte.

Hello,
This API should be executed on device since we cant get the results on Emulator.
In the Notification callback the status that we get is only SUCCESS or FAILURE..
It is not clear that how did you get the other status like (SMS sending.etc which you have handled in swithc case). Device may generate SUSPEND and RESUME events while sending the SMS..This feature is somewhat device dependent.
"The status passed to the notificaiton function can be SUCCESS or Failure. "
Regards
Satish Panpatte.