Modem Call Control

API Reference


The Modem Call Control (mcc) API functions of this API are provided by the modemService service.

IPC interfaces binding

Here's a code sample binding to modem services:

bindings:
{
   clientExe.clientComponent.le_mcc -> modemService.le_mcc
}

Starting a Call

To initiate a call, create a new call object with a destination telephone number calling the le_mcc_Create() function.

le_mcc_Start() must still initiate the call when ready.

The le_mcc_Start() function initiates a call attempt (it's asynchronous because it can take time for a call to connect). If function failed, the le_mcc_GetTerminationReason() API can be used to retrieve the terminal reason.

It's essential to register a handler function to get the call events. Use le_mcc_AddCallEventHandler() API to install that handler function. The handler will be called for all calls' events (incoming and outgoing).

The le_mcc_RemoveCallEventHandler() API uninstalls the handler function.

The following APIs can be used to manage incoming or outgoing calls:

When finished with the call object, call le_mcc_Delete() to free all the allocated resources associated with the object.

Multi-threading/multi-application behaviour: the callRef is linked to a specific client (i.e. connection with the mcc service). Each client will have its own callRef for a same call. That is, if a call event handler is registered by one thread but le_mcc_Create() is called by another thread, they will each get different call references for the same call. So, when multiple threads are being used to work with the same call, a comparison of the call references themselves can't be used to tell whether or not they refer to the same call. The callRefs of the thread will be deleted when the thread is disconnected from the mcc service.

The Adaptive Multi Rate (AMR) is an audio compression format optimized for speech coding and used during a voice call. Two AMRs are supported: An AMR Narrowband that encodes a bandwidth of 200--3400 Hz signals at variable bitrates ranging from 4.75 to 12.2 kbit/s and an AMR Wideband that encodes a wider bandwidth of 50--7000 Hz and thus improves the speech quality.

le_mcc_SetAmrWbCapability() function enables or disables the AMR Wideband supported capability. le_mcc_GetAmrWbCapability() function returns the AMR Wideband capability status.

Answering a call

Receiving calls is similar sending calls. Add a handler through le_mcc_AddCallEventHandler() to be notified of incoming calls.

To answer, call le_mcc_Answer(). To reject it, call le_mcc_HangUp().

Ending all calls

A special function can be used to hang-up all the ongoing calls: le_mcc_HangUpAll(). This function can be used to hang-up any calls that have been initiated through another client like AT commands.

Supplementary service

Calling Line Identification Restriction (CLIR) can be activated or deactivated by le_mcc_SetCallerIdRestrict() API. The status is independent for each call object reference. Status can be read with the le_mcc_GetCallerIdRestrict() API. If the status is not set, le_mcc_GetCallerIdRestrict() API returns LE_UNAVAILABLE. By default the CLIR status is not set.

Call waiting supplementary service can be activated or deactivated by le_mcc_SetCallWaitingService(). Its status can be given by le_mcc_GetCallWaitingService(). A call waiting can be answered using le_mcc_ActivateCall() API. This API is also used to activate an on hold call (current call is then placed on hold). An activated, waiting or on hold call can be released using le_mcc_HangUp() function. See 3GPP TS 02.83 / 22.083 for any details concerning call waiting / call hold supplementary services.

Sample codes

A sample code that implements a dialing call can be found in le_mccTest.c file (please refer to Sample code of Modem Call control page).