diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index d0bc3962d..fd3a4b5ab 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2154,6 +2154,10 @@ const LinphoneAddress * linphone_call_get_remote_address(const LinphoneCall *cal return call->dir==LinphoneCallIncoming ? call->log->from : call->log->to; } +const LinphoneAddress * linphone_call_get_to_address(const LinphoneCall *call){ + return (const LinphoneAddress *)sal_op_get_to_address(call->op); +} + char *linphone_call_get_remote_address_as_string(const LinphoneCall *call){ return linphone_address_as_string(linphone_call_get_remote_address(call)); } diff --git a/include/linphone/call.h b/include/linphone/call.h index 7653cec2f..c7749e536 100644 --- a/include/linphone/call.h +++ b/include/linphone/call.h @@ -91,6 +91,11 @@ LINPHONE_PUBLIC bool_t linphone_call_asked_to_autoanswer(LinphoneCall *call); **/ LINPHONE_PUBLIC const LinphoneAddress * linphone_call_get_remote_address(const LinphoneCall *call); +/** + * Returns the to address with its headers associated to this call +**/ +LINPHONE_PUBLIC const LinphoneAddress * linphone_call_get_to_address(const LinphoneCall * call); + /** * Returns the remote address associated to this call as a string. * The result string must be freed by user using ms_free().