diff --git a/coreapi/private.h b/coreapi/private.h index a0fbbf550..14665b01b 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -415,8 +415,6 @@ void linphone_call_notify_info_message_received(LinphoneCall *call, const Linpho LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, const LinphoneCallParams *params, LinphoneProxyConfig *cfg); LinphoneCall * linphone_call_new_incoming(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, SalOp *op); void _linphone_call_set_new_params(LinphoneCall *call, const LinphoneCallParams *params); -LINPHONE_PUBLIC void linphone_call_set_params(LinphoneCall *call, const LinphoneCallParams *params); -LINPHONE_PUBLIC const LinphoneCallParams * linphone_call_get_params(LinphoneCall *call); void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const char *message); void linphone_call_set_contact_op(LinphoneCall* call); void linphone_call_set_compatible_incoming_call_parameters(LinphoneCall *call, SalMediaDescription *md); diff --git a/include/linphone/call.h b/include/linphone/call.h index 074bca2c7..7ef92c41a 100644 --- a/include/linphone/call.h +++ b/include/linphone/call.h @@ -873,6 +873,26 @@ LINPHONE_PUBLIC void linphone_call_remove_callbacks(LinphoneCall *call, Linphone */ LINPHONE_PUBLIC LinphoneCallCbs *linphone_call_get_current_callbacks(const LinphoneCall *call); +/** + * Set call parameters - advanced and not recommended feature - use with caution. + * Local call parameters applicable to an outgoing or incoming shall usually be passed to linphone_core_invite_address_with_params() or + * linphone_call_accept_with_params(). + * However, in some cases it might be desirable from a software design standpoint to modify local parameters outside of the application layer, typically + * in the purpose of implementing a custom logic including special headers in INVITE or 200Ok requests, driven by a call_state_changed listener method. + * This function accepts to assign a new LinphoneCallParams only in LinphoneCallOutgoingInit and LinphoneCallIncomingReceived states. + * @param call the LinphoneCall object +**/ +LINPHONE_PUBLIC void linphone_call_set_params(LinphoneCall *call, const LinphoneCallParams *params); + +/** + * Returns local parameters associated with the call. + * This is typically the parameters passed at call initiation to linphone_core_invite_address_with_params() or linphone_call_accept_with_params(), or some default + * parameters if no LinphoneCallParams was explicitely passed during call initiation. + * @param call the LinphoneCall object + * @return the call's local parameters. + **/ +LINPHONE_PUBLIC const LinphoneCallParams * linphone_call_get_params(LinphoneCall *call); + /** * @} */ diff --git a/include/linphone/core.h b/include/linphone/core.h index c7feb4398..b4085350f 100644 --- a/include/linphone/core.h +++ b/include/linphone/core.h @@ -5189,6 +5189,7 @@ LINPHONE_PUBLIC LinphonePresenceService * linphone_core_create_presence_service( /** * Notifies the upper layer that a presence status has been received by calling the appropriate * callback if one has been set. + * This method is for advanced usage, where customization of the liblinphone's internal behavior is required. * @param[in] lc the #LinphoneCore object. * @param[in] lf the #LinphoneFriend whose presence information has been received. */ @@ -5198,6 +5199,7 @@ LINPHONE_PUBLIC void linphone_core_notify_notify_presence_received(LinphoneCore /** * Notifies the upper layer that a presence model change has been received for the uri or * telephone number given as a parameter, by calling the appropriate callback if one has been set. + * This method is for advanced usage, where customization of the liblinphone's internal behavior is required. * @param[in] lc the #LinphoneCore object. * @param[in] lf the #LinphoneFriend whose presence information has been received. * @param[in] uri_or_tel telephone number or sip uri