Click here for the API Reference documentation.
To initiate a call, create a new call object with a destination telephone number calling the le_mcc_profile_CreateCall()
function.
le_mcc_call_Start()
must still initiate the call when ready.
The le_mcc_call_Start() function initiates a call attempt (it's asynchronous because it can take time for a call to connect).
It's essential to register a handler function to get the call events. Use le_mcc_profile_AddCallEventHandler()
API to install that handler function. As the call attempt proceeds, the profile's registered call event handler will receive events.
The le_mcc_profile_RemoveCallEventHandler() API uninstalls the handler function.
The following APIs can be used to manage incoming or outgoing calls:
le_mcc_call_GetTerminationReason()
- termination reason.le_mcc_call_IsConnected()
- connection status.le_mcc_call_GetRemoteTel()
- displays remote party telephone number associated with the call.le_mcc_call_GetRxAudioStream()
must be called to receive audio stream for this call. Audio received from the other end of the call uses this stream.le_mcc_call_GetTxAudioStream()
must be called to transmit audio stream this call. Audio generated on this end is sent on this stream.le_mcc_call_HangUp()
will disconnect this call.When finished with the call object, call le_mcc_call_Delete() to free all the allocated resources associated with the object. This will frees the reference, but remains active if other holders are using it.
This code example uses CallAndPlay()
to dial a phone number, and if successful, play a sound file. Once the file has played, the call hangs up.
Receiving calls is similar sending calls. Add a handler through le_mcc_profile_AddCallEventHandler()
to be notified of incoming calls.
To answer, call le_mcc_call_Answer()
. To reject it, call le_mcc_call_Delete()
.
This code example uses InstallAutomaticAnswer()
to install a call event handler that automatically answers incoming calls. The handler function verifies the incoming call is permitted (through a predefined list), and then decides whether to answer or terminate it. If a call is already active, it can add the new incoming call creating a conference call.
A special function can be used to hang-up all the ongoing calls: le_mcc_call_HangUpAll()
. This function can be used to hang-up any calls that have been initiated through another client like AT commands.
Copyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.