Missing voice call progress events


#1

Hi, all

I have a problem where sometime voice call progress events are missing. When modem gets into this situation, it has to be restarted.
Either SETUP_OK or HANGUP_OK is missing. I star calls with adlCallSetup() and finish with adl_callHangup(). APIs return OK, however no events are produced.

I traced it down to GPRS activity at the time. If GPRS is attempting to establish PDP, voice calls may get into this mode.

I produced test application and I can see that modems are not happy if voice call is being controlled when GPRS handler just received ADL_GPRS_ME_ATTACH event.
Basically mode of failure is :
subscribe to call events: adl_callSubscribe( callHandler );
subscribe to GPRS events: adl_gprsSubscribe(gprsHandler);
start GPRS (wip_bearerOpen(), wip_bearerSetOpts (APN, etc…), wip_bearer_start()).
Waiti till GPRS get event ADL_GPRS_EVENT_ME_ATTACH.
Attempt voice call and observe. Sometimes it takes 5-9 seconds to get a voice call event, sometimes there is no event, sometimes WIP BEARER also fails.
Making voice call at any other time during GPRS initialization will get call control event straight away and all is good.

You may ask why do I have both at same time. Well, our application is pretty complex. Just trust me – it has to work the way I described – GPRS may be brought up and voice call may happen in the meantime.

platform: FXT009, running 7.45

Thanks,
Rudolf


#2

Hi,

Please can you share the details on the module, version of FW, OS (or OASiS version) used.


#3

As per my post – FXT009, running 7.45 (OASiS 6.35).

Originally problem was only observed on FXT003 on all firmware versions, but this platform is no longer supported.

Seeing it on FXT009 is a great concern.

Rudolf


#4

Hi,
It would be better with the logs for this scenario.


#5

Issue reported to Sierra Wireless.

Support ticket reference: W025028-030612

All logs are included.

Rudolf


#6

I found that it is not possible to drop the voice call when ADL_GPRS_EVENT_ME_ATTACH is received. Do you accept to drop the voice call during ADL_GPRS_EVENT_SETUP_OK is received?


#7

Did you mean that you dont receive HANGUP_OK or you get error when you try to drop the call :question:


#8

I mean I don’t receive HANGUP_OK


#9

You will find that is not possible to make the call at this stage either.

What is even worse – from this moment on, internal state machine in OpenAT is usually corrupted, so it is not possible to make/break any more calls.

At this stage, we added a 10s timer that is started when call made/released. If no call events received, modem is reset.

Problem is more obvious in FXT003

Rudolf


#10

Hi,

Please can you confirm if the problem exists with the application below:

/*
 * Bearerstart.c
 *
 *  Created on:
 *      Author:
 */
#include "adl_global.h"
#include "wip.h"
const u16 wm_apmCustomStackSize =1024 ;

#define GPRS_APN      "airtelgprs.com"
#define GPRS_USER     "airtel"
#define GPRS_PASSWORD "tango"

static const ascii * START_CMD = "AT+START";

void BearHandler(wip_bearer_t Br_Id, s8 Event, void  *context)
{
   s8 close;
   switch(Event)
   {
      case WIP_BEV_CONN_FAILED:
         TRACE((1,"Bear conn failed"));
            break;
      case WIP_BEV_IP_DISCONNECTED:
         TRACE((1,"IP communication terminated"));
         break;
      case WIP_BEV_IP_CONNECTED:
         TRACE((1,"Bear ip connected"));
         break;
      case WIP_BEV_STOPPED:
         TRACE((1,"Bear close, stopped"));
         close = wip_bearerClose (Br_Id);
         switch(close){
               case WIP_BERR_BAD_STATE:
                  TRACE((1,"Bad state"));
                  break;
               case WIP_BERR_BAD_HDL:
                  TRACE((1,"bad handle"));
                  break;
            }
         break;
        case WIP_BERR_GPRS_FAILED:
           TRACE((1,"GPRS failed"));
           break;
        case WIP_BERR_PIN_NOT_READY:
           TRACE((1,"Pin error"));
           break;
        default:
           TRACE((1,"Default: error: %d", Event));
           break;
   }
}

static void open_and_start_bearer(void)
{
  wip_bearer_t Br_ID;
  TRACE((1, "wip_bearerOpen()"));

  if(wip_bearerOpen( &Br_ID, "GPRS", BearHandler, NULL) != 0)
  {
	  TRACE((1, "wip_bearerOpen() : Fail"));
  }
  else{
          TRACE((1, "wip_bearerSetOpts()"));
          if(wip_bearerSetOpts( Br_ID, WIP_BOPT_GPRS_APN, GPRS_APN,
                WIP_BOPT_LOGIN,       GPRS_USER,
                WIP_BOPT_PASSWORD,    GPRS_PASSWORD,
                WIP_BOPT_END) != 0)
          {
             TRACE((1, "wip_bearerSetOpts : Fail"));
             wip_bearerClose(Br_ID);
          }
          else
          {
             if(wip_bearerStart(Br_ID) != 0)
             {
                TRACE((1, "wip_bearerStart : Fail"));
                TRACE((1, "ERROR CODE: %d", wip_bearerStart(Br_ID)));
             }
          }
       }
}

s8 gprsHandler (u16 event, u8 cid)
{
	s8 status;

	TRACE((1, "GPRS event %d", event));
	switch (event)
	{

		case ADL_GPRS_EVENT_ACTIVATE_OK:
			TRACE ((1, "ADL_GPRS_EVENT_ACTIVATE_OK"));
			break;

		case ADL_GPRS_EVENT_SETUP_OK:
			TRACE ((1, "ADL_GPRS_EVENT_SETUP_OK"));
			break;


		case ADL_GPRS_EVENT_ME_ATTACH:
			TRACE ((1, "ADL_GPRS_EVENT_ME_ATTACH"));
			TRACE ((1, "Making call"));
			status = adl_callSetup("9900488663", ADL_CALL_MODE_VOICE);
			if (status == OK)
				TRACE ((1, "adlCallSetup returned OK"));
			else
				TRACE ((1, "adl_callSetup returned error %d", status));

			break;


	}

	return ADL_GPRS_NO_FORWARD;
}

// AT+H command handler
void HCmdHandler ( adl_atCmdPreParser_t * para )
{
    adl_callHangup ( );
}



// Call events handler
s8 MyCallHdlr ( u16 event, u32 callID )
{
    TRACE (( 1, "Call Event : %d, %d", event, callID ));
    return ADL_CALL_NO_FORWARD;
}


void cbStartCmdHandler ( adl_atCmdPreParser_t * paras )
{
  u32 uStart = 0;

  uStart = wm_atoi ( ADL_GET_PARAM ( paras, 0 ) );

  if ( uStart == 1 )
  {
	  TRACE (( 1, "Application started"));

	  open_and_start_bearer();
  }
  else
  {
	  TRACE (( 1, "Start the application"));
  }
}

static void wip_init( void)
{
   u8 wRet;
   wip_logEvents = TRUE;

   /* Command subscription to start parameters monitoring or provisioning */
   adl_atCmdSubscribe ( ( ascii * ) START_CMD, cbStartCmdHandler,
 				  ADL_CMD_TYPE_PARA | 0x11 );
   // Subscribe to H command

      adl_atCmdSubscribe ( "AT+H", HCmdHandler, ADL_CMD_TYPE_ACT );
      // Subscribe to the call service
          adl_callSubscribe ( MyCallHdlr );
   wRet = wip_netInitOpts(WIP_NET_OPT_IP_FORWARD,FALSE,WIP_NET_OPT_DEBUG_PORT, WIP_NET_DEBUG_PORT_TRACE,WIP_NET_OPT_END);

   if(wRet != 0)
   {
      TRACE (( 1, "wip_netInit error" ));
   }
   else
   {
      TRACE (( 1, "wip_netInit :)" ));
      adl_atSendResponse ( ADL_AT_UNS, "wip_eventInit :)\r\n");
      adl_gprsSubscribe(gprsHandler);

   }
}
void adl_main ( adl_InitType_e InitType )
{
	TRACE((1 ,"Main Application"));
	wip_init();
}

Steps:

  1. Modify the application to set the phone number, APN, username and password
  2. Issue AT+START=1 to start the application
  3. Answer the call
  4. Issue AT+H to hangup the call

Attach the traces if possible.

Regards,
Rex