le_voicecall_interface.h File Reference
#include "legato.h"
#include "le_mdmDefs_interface.h"
#include "le_audio_interface.h"

Go to the source code of this file.

Typedefs

typedef struct le_voicecall_Call * le_voicecall_CallRef_t
 
typedef struct le_voicecall_StateHandler * le_voicecall_StateHandlerRef_t
 
typedef void(* le_voicecall_StateHandlerFunc_t) (le_voicecall_CallRef_t reference, const char *identifier, le_voicecall_Event_t event, void *contextPtr)
 

Enumerations

enum  le_voicecall_Event_t {
  LE_VOICECALL_EVENT_ALERTING, LE_VOICECALL_EVENT_CONNECTED, LE_VOICECALL_EVENT_TERMINATED, LE_VOICECALL_EVENT_OFFLINE,
  LE_VOICECALL_EVENT_BUSY, LE_VOICECALL_EVENT_RESOURCE_BUSY, LE_VOICECALL_EVENT_INCOMING
}
 
enum  le_voicecall_TerminationReason_t {
  LE_VOICECALL_TERM_NETWORK_FAIL, LE_VOICECALL_TERM_BAD_ADDRESS, LE_VOICECALL_TERM_BUSY, LE_VOICECALL_TERM_LOCAL_ENDED,
  LE_VOICECALL_TERM_REMOTE_ENDED, LE_VOICECALL_TERM_UNDEFINED
}
 

Functions

void le_voicecall_ConnectService (void)
 
void le_voicecall_DisconnectService (void)
 
le_voicecall_StateHandlerRef_t le_voicecall_AddStateHandler (le_voicecall_StateHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_voicecall_RemoveStateHandler (le_voicecall_StateHandlerRef_t addHandlerRef)
 
le_voicecall_CallRef_t le_voicecall_Start (const char *DestinationID)
 
le_result_t le_voicecall_End (le_voicecall_CallRef_t reference)
 
le_result_t le_voicecall_Delete (le_voicecall_CallRef_t reference)
 
le_result_t le_voicecall_Answer (le_voicecall_CallRef_t reference)
 
le_result_t le_voicecall_GetTerminationReason (le_voicecall_CallRef_t reference, le_voicecall_TerminationReason_t *reasonPtr)
 
le_audio_StreamRef_t le_voicecall_GetTxAudioStream (le_voicecall_CallRef_t reference)
 
le_audio_StreamRef_t le_voicecall_GetRxAudioStream (le_voicecall_CallRef_t reference)
 

Detailed Description

Legato Voice Call Service include file.

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.

Typedef Documentation

typedef struct le_voicecall_Call* le_voicecall_CallRef_t

Reference returned by Start function and used by End function

typedef void(* le_voicecall_StateHandlerFunc_t) (le_voicecall_CallRef_t reference, const char *identifier, le_voicecall_Event_t event, void *contextPtr)

Handler for voice call state changes.

Parameters
referenceEvent voice call object reference.
identifierIdentifier of the remote party
eventVoice call event.
contextPtr
typedef struct le_voicecall_StateHandler* le_voicecall_StateHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_voicecall_State'

Enumeration Type Documentation

Voice call establishment states.

Enumerator
LE_VOICECALL_EVENT_ALERTING 

Voice call establishment in progress. Far end is now alerting its user (outgoing call).

LE_VOICECALL_EVENT_CONNECTED 

Call has been established, and is media is active.

LE_VOICECALL_EVENT_TERMINATED 

Call has terminated.

LE_VOICECALL_EVENT_OFFLINE 

NO Service available to try establish a voice call.

LE_VOICECALL_EVENT_BUSY 

Remote party (callee) is busy.

LE_VOICECALL_EVENT_RESOURCE_BUSY 

All local connection resources (lines/channels) are in use.

LE_VOICECALL_EVENT_INCOMING 

Incoming voice call in progress.

Voice call termination reason.

Enumerator
LE_VOICECALL_TERM_NETWORK_FAIL 

Network could not complete the call.

LE_VOICECALL_TERM_BAD_ADDRESS 

Remote address could not be resolved.

LE_VOICECALL_TERM_BUSY 

Caller is currently busy and cannot take the call.

LE_VOICECALL_TERM_LOCAL_ENDED 

Local party ended the call.

LE_VOICECALL_TERM_REMOTE_ENDED 

Remote party ended the call.

LE_VOICECALL_TERM_UNDEFINED 

Undefined reason.

Function Documentation

le_voicecall_StateHandlerRef_t le_voicecall_AddStateHandler ( le_voicecall_StateHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_voicecall_State'

This event provides information on voice call state changes

Parameters
[in]handlerPtr
[in]contextPtr
le_result_t le_voicecall_Answer ( le_voicecall_CallRef_t  reference)

Answer to incoming voice call.

Returns
  • LE_OK if the incoming voice call can be answered
  • LE_NOT_FOUND if the incoming voice call object reference is not found.
Parameters
[in]referenceIncoming voice call object reference to answer.
void le_voicecall_ConnectService ( void  )

Connect the client to the service

le_result_t le_voicecall_Delete ( le_voicecall_CallRef_t  reference)

Delete voice call object reference create by le_voicecall_Start() or an incoming voice call.

Returns
  • LE_OK if the delete of voice call can be processed.
  • LE_NOT_FOUND if the voice call object reference is not found.
Parameters
[in]referenceVoice call object reference to delete.
void le_voicecall_DisconnectService ( void  )

Disconnect the client from the service

le_result_t le_voicecall_End ( le_voicecall_CallRef_t  reference)

Release a voice call.

Returns
  • LE_OK if the end of voice call can be processed.
  • LE_NOT_FOUND if the voice call object reference is not found.
Parameters
[in]referenceVoice call object reference to hang-up.
le_audio_StreamRef_t le_voicecall_GetRxAudioStream ( le_voicecall_CallRef_t  reference)

Called to get the received audio stream. All audio received from the other end of the call is received on this stream.

Returns
Received audio stream reference.
Parameters
[in]referenceVoice call object reference to read from.
le_result_t le_voicecall_GetTerminationReason ( le_voicecall_CallRef_t  reference,
le_voicecall_TerminationReason_t reasonPtr 
)

Get the termination reason of a voice call reference.

Returns
  • LE_OK if the termination reason is got
  • LE_NOT_FOUND if the incoming voice call object reference is not found.
  • LE_FAULT if the voice call is not terminated.
Parameters
[in]referenceVoice call object reference to read from.
[out]reasonPtrTermination reason of the voice call.
le_audio_StreamRef_t le_voicecall_GetTxAudioStream ( le_voicecall_CallRef_t  reference)

Called to get the transmitted audio stream. All audio generated on this end of the call is sent on this stream.

Returns
Transmitted audio stream reference.
Parameters
[in]referenceVoice call object reference to read from.
void le_voicecall_RemoveStateHandler ( le_voicecall_StateHandlerRef_t  addHandlerRef)

Remove handler function for EVENT 'le_voicecall_State'

Parameters
[in]addHandlerRef
le_voicecall_CallRef_t le_voicecall_Start ( const char *  DestinationID)

Start a voice call.

Returns
  • Reference to the voice call (to be used later for releasing the voice call)
  • NULL if the voice call could not be processed
Parameters
[in]DestinationIDDestination identifier for the voice