Hi,
Below i was posted the voice call code. After making the call Fastrack Supreme is restarting. Could you please tell me what exactly the problem.
/*******************************************************************************************/
bool PanicUnSohdl(adl_atUnsolicited_t *cmd)
{
TRACE((5," Button Pressed "));
//adl_atCmdCreate(Fixed_Number, FALSE, (adl_atRspHandler_t)NULL, NULL); // ATD080671275788
adl_tmrSubscribe (FALSE, 5, ADL_TMR_TYPE_100MS, DialPanic);
adl_atCmdCreate ("AT+WIOW=21,1", FALSE, (adl_atRspHandler_t) NULL,NULL);
setCallFlag=1;
return TRUE;
}
/*******************************************************************************************/
bool ReleaseCallUnSohdl(adl_atUnsolicited_t *cmd)
{
TRACE((5,"Switch OFF Speaker "));
adl_atCmdCreate ("AT+WIOW=21,0", FALSE, (adl_atRspHandler_t) NULL,NULL);
setCallFlag=0;
return TRUE;
}
/*******************************************************************************************/
void DialPanic()
{
adl_callSetup(Fixed_Number , ADL_CALL_MODE_VOICE);
}
/*******************************************************************************************/
s8 CALL_Handler( u16 Event, u32 Call_ID )
{
TRACE ((5, "Inside CALL_Handler" ));
switch (Event) {
case ADL_CALL_EVENT_BUSY:
break;
case ADL_CALL_EVENT_NO_CARRIER:
case ADL_CALL_EVENT_RELEASE_ID:
TRACE ((5, "ADL_CALL_EVENT_NO_CARRIER:" ));
TRACE ((5, "ADL_CALL_EVENT_RELEASE_ID:" ));
adl_tmrSubscribe (FALSE, 1, ADL_TMR_TYPE_100MS, ATHUnSohdl);
adl_callHangup();
break;
case ADL_CALL_EVENT_HANGUP_OK:
TRACE ((5, "ADL_CALL_EVENT_HANGUP_OK:" ));
break;
case ADL_CALL_EVENT_RING_VOICE: // voice phone call ringing
TRACE ((5, "ADL_CALL_EVENT_RING_VOICE:" ));
break;
case ADL_CALL_EVENT_SETUP_OK:
TRACE ((5, "ADL_CALL_EVENT_SETUP_OK:" ));
break;
case ADL_CALL_EVENT_NO_ANSWER:
TRACE ((5, "ADL_CALL_EVENT_NO_ANSWER:" ));
adl_tmrSubscribe (FALSE, 1, ADL_TMR_TYPE_100MS, ATHUnSohdl);
adl_callHangup();
break;
case ADL_CALL_EVENT_ANSWER_OK:
TRACE ((5, "ADL_CALL_EVENT_ANSWER_OK:" ));
break;
case ADL_CALL_EVENT_ANSWER_OK_FROM_EXT:
TRACE ((5, "ADL_CALL_EVENT_ANSWER_OK_FROM_EXT:" ));
break;
default:
break;
}
return TRUE;
}
/*******************************************************************************************/
void SimHandler(u8 Event)
{
if(Event == ADL_SIM_STATE_FULL_INIT)
{
TRACE ((5, “Sim Fully Initialsed” ));
wm_strcat(imei,"");
Boot_Config();
}
}
//
void adl_main ( adl_InitType_e InitType )
{
adl_simSubscribe (SimHandler, NULL );
adl_callSubscribe(CALL_Handler); //SUBSCRIBING FOR CALL
}
//