Tizen Native API  7.0

The Call API provides functions to check the state of voice and video calls.

Required Header

#include <telephony.h>

Overview

The Telephony Call API allows you to get the voice and videos call states. You can use this information about call related actions.

Related Features

This API is related with the following feature:

  • http://tizen.org/feature/network.telephony

It is recommended to design feature related codes in your application for reliability.

You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.

To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.

More details on featuring your application can be found from Feature Element.

Functions

int telephony_call_get_preferred_voice_subscription (telephony_h handle, telephony_call_preferred_voice_subs_e *call_sub)
 Gets the current value for the preferred voice call subscription.
int telephony_call_get_call_list (telephony_h handle, unsigned int *count, telephony_call_h **call_list)
 Gets the list of the current call.
int telephony_call_release_call_list (unsigned int count, telephony_call_h **call_list)
 Releases the list allocated from telephony_call_get_call_list().
int telephony_call_get_handle_id (telephony_call_h call_handle, unsigned int *handle_id)
 Gets the call handle ID.
int telephony_call_get_number (telephony_call_h call_handle, char **number)
 Gets the call number.
int telephony_call_get_type (telephony_call_h call_handle, telephony_call_type_e *type)
 Gets the call type.
int telephony_call_get_status (telephony_call_h call_handle, telephony_call_status_e *status)
 Gets the call status.
int telephony_call_get_direction (telephony_call_h call_handle, telephony_call_direction_e *direction)
 Gets whether the call is MO(Mobile Originated) call or MT(Mobile Terminated).
int telephony_call_get_conference_status (telephony_call_h call_handle, bool *conference_status)
 Gets whether the call is conference call or not.

Typedefs

typedef struct
telephony_call_info_s * 
telephony_call_h
 The call handle.

Typedef Documentation

typedef struct telephony_call_info_s* telephony_call_h

The call handle.

Since :
3.0

Enumeration Type Documentation

Enumeration for the call direction.

Since :
3.0
Enumerator:
TELEPHONY_CALL_DIRECTION_MO 

MO(Mobile Originated) call

TELEPHONY_CALL_DIRECTION_MT 

MT(Mobile Terminated) call

Enumeration for the preferred voice call subscription.

Since :
3.0
Enumerator:
TELEPHONY_CALL_PREFERRED_VOICE_SUBS_UNKNOWN 

Unknown status

TELEPHONY_CALL_PREFERRED_VOICE_SUBS_CURRENT_NETWORK 

Current network

TELEPHONY_CALL_PREFERRED_VOICE_SUBS_ASK_ALWAYS 

ASK Always

TELEPHONY_CALL_PREFERRED_VOICE_SUBS_SIM1 

SIM 1

TELEPHONY_CALL_PREFERRED_VOICE_SUBS_SIM2 

SIM 2

Enumeration for the call status.

Since :
3.0
Enumerator:
TELEPHONY_CALL_STATUS_IDLE 

Idle status

TELEPHONY_CALL_STATUS_ACTIVE 

Active status

TELEPHONY_CALL_STATUS_HELD 

Held status

TELEPHONY_CALL_STATUS_DIALING 

Dialing status

TELEPHONY_CALL_STATUS_ALERTING 

Alerting status

TELEPHONY_CALL_STATUS_INCOMING 

Incoming status

Enumeration for the call type.

Since :
3.0
Enumerator:
TELEPHONY_CALL_TYPE_VOICE 

Voice call

TELEPHONY_CALL_TYPE_VIDEO 

Video call

TELEPHONY_CALL_TYPE_E911 

Emergency call


Function Documentation

int telephony_call_get_call_list ( telephony_h  handle,
unsigned int *  count,
telephony_call_h **  call_list 
)

Gets the list of the current call.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/telephony
Remarks:
You must release call_list using telephony_call_release_call_list().
Parameters:
[in]handleThe handle from telephony_init()
[out]countCount of the existing calls
[out]call_listList of call information for existing calls
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_PERMISSION_DENIEDPermission denied
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
TELEPHONY_ERROR_OPERATION_FAILEDOperation failed
int telephony_call_get_conference_status ( telephony_call_h  call_handle,
bool *  conference_status 
)

Gets whether the call is conference call or not.

Since :
3.0
Parameters:
[in]call_handleThe handle from telephony_call_get_call_list()
[out]conference_statusThe value whether the call is conference call or not (true: Conference call, false: Single call)
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The call handle should be obtained from telephony_call_get_call_list().
Postcondition:
The call list should be released by using telephony_call_release_call_list().

Gets whether the call is MO(Mobile Originated) call or MT(Mobile Terminated).

Since :
3.0
Parameters:
[in]call_handleThe handle from telephony_call_get_call_list()
[out]directionThe direction of the call (telephony_call_direction_e)
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The call handle should be obtained from telephony_call_get_call_list().
Postcondition:
The call list should be released by using telephony_call_release_call_list().
int telephony_call_get_handle_id ( telephony_call_h  call_handle,
unsigned int *  handle_id 
)

Gets the call handle ID.

Since :
3.0
Parameters:
[in]call_handleThe handle from telephony_call_get_call_list()
[out]handle_idThe ID of the call handle
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The call handle should be obtained from telephony_call_get_call_list().
Postcondition:
The call list should be released by using telephony_call_release_call_list().
int telephony_call_get_number ( telephony_call_h  call_handle,
char **  number 
)

Gets the call number.

Since :
3.0
Remarks:
You must release number using free() on success case.
Parameters:
[in]call_handleThe handle from telephony_call_get_call_list()
[out]numberThe number of the call
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The call handle should be obtained from telephony_call_get_call_list().
Postcondition:
The call list should be released by using telephony_call_release_call_list().

Gets the current value for the preferred voice call subscription.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/telephony
Parameters:
[in]handleThe handle from telephony_init()
[out]call_subThe currently set preferred call subscription value. (telephony_call_preferred_voice_subs_e)
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_PERMISSION_DENIEDPermission denied
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
TELEPHONY_ERROR_OPERATION_FAILEDOperation failed

Gets the call status.

Since :
3.0
Parameters:
[in]call_handleThe handle from telephony_call_get_call_list()
[out]statusThe status of the call (telephony_call_status_e)
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The call handle should be obtained from telephony_call_get_call_list().
Postcondition:
The call list should be released by using telephony_call_release_call_list().

Gets the call type.

Since :
3.0
Parameters:
[in]call_handleThe handle from telephony_call_get_call_list()
[out]typeThe type of the call (telephony_call_type_e)
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The call handle should be obtained from telephony_call_get_call_list().
Postcondition:
The call list should be released by using telephony_call_release_call_list().
int telephony_call_release_call_list ( unsigned int  count,
telephony_call_h **  call_list 
)

Releases the list allocated from telephony_call_get_call_list().

Since :
3.0
Parameters:
[in]countThe count of the calls from telephony_call_get_call_list()
[in]call_listThe handle from telephony_call_get_call_list()
Returns:
0 on success, otherwise a negative error value
Return values:
TELEPHONY_ERROR_NONESuccessful
TELEPHONY_ERROR_INVALID_PARAMETERInvalid parameter
TELEPHONY_ERROR_NOT_SUPPORTEDNot supported
Precondition:
The call list should be validated from telephony_call_get_call_list().