Call control

## Functions

int | linphone_core_invite (LinphoneCore *lc, const char *url)
int | linphone_core_invite_address (LinphoneCore *lc, const LinphoneAddress *real_parsed_url)
bool_t | linphone_core_inc_invite_pending (LinphoneCore *lc)
int | linphone_core_accept_call (LinphoneCore *lc, const char *url)
int | linphone_core_terminate_call (LinphoneCore *lc, const char *url)
bool_t | linphone_core_in_call (const LinphoneCore *lc)
struct _LinphoneCall * | linphone_core_get_current_call (LinphoneCore *lc)
void | linphone_core_set_inc_timeout (LinphoneCore *lc, int seconds)
int | linphone_core_get_inc_timeout (LinphoneCore *lc)

## Detailed Description

The application can initiate outgoing calls with linphone_core_invite(). It is notified of incoming call thanks to the inv_recv callback of the LinphoneCoreVTable structure that is passed at creation of the LinphoneCore object. It can then answer calls with linphone_core_accept_call(). Calls can be terminated or declined with linphone_core_terminate_call(). The application is notified when the remote party hangups thanks to bye_recv callback of the LinphoneCoreVTable.

## Function Documentation

int linphone_core_invite | ( | LinphoneCore * | lc,
|  | const char * | url
| ) |  |

Initiates an outgoing call

Parameters

  lc | the LinphoneCore object
  url | the destination of the call (sip address, or phone number).

int linphone_core_invite_address | ( | LinphoneCore * | lc,
|  | const LinphoneAddress * | real_parsed_url
| ) |  |

Initiates an outgoing call given a destination LinphoneAddress

Parameters

  lc | the LinphoneCore object
  url | the destination of the call (sip address).

bool_t linphone_core_inc_invite_pending | ( | LinphoneCore * | lc | ) |

Returns true if in incoming call is pending, ie waiting for being answered or declined.

int linphone_core_accept_call | ( | LinphoneCore * | lc,
|  | const char * | url
| ) |  |

Accept an incoming call.

Basically the application is notified of incoming calls within the invite_recv callback of the LinphoneCoreVTable structure. The application can later respond positively to the call using this method.

Parameters

  lc | the LinphoneCore object
  url | the SIP address of the originator of the call, or NULL. This argument is useful for managing multiple calls simulatenously, however this feature is not supported yet. Using NULL will accept the unique incoming call in progress.

int linphone_core_terminate_call | ( | LinphoneCore * | lc,
|  | const char * | url
| ) |  |

Terminates a call.

Parameters

  lc | The LinphoneCore
  url | the destination of the call to be terminated, use NULL if there is only one call (which is case in this version of liblinphone).

bool_t linphone_core_in_call | ( | const LinphoneCore * | lc | ) |

Returns TRUE if there is a call running or pending.

struct _LinphoneCall* linphone_core_get_current_call | ( | LinphoneCore * | lc | ) |

Returns The _LinphoneCall struct of the current call if one is in call

void linphone_core_set_inc_timeout | ( | LinphoneCore * | lc,
|  | int | seconds
| ) |  |

Set the incoming call timeout in seconds.

If an incoming call isn't answered for this timeout period, it is automatically declined.

int linphone_core_get_inc_timeout | ( | LinphoneCore * | lc | ) |

Returns the incoming call timeout

See linphone_core_set_inc_timeout() for details.