From e3365011df5d5281fed91beb91fa928ac3568f60 Mon Sep 17 00:00:00 2001 From: Nicolas Follet Date: Mon, 12 Jun 2017 14:52:14 +0200 Subject: [PATCH] add getter of to address in linphoneCall which contains headers --- coreapi/linphonecall.c | 4 ++++ include/linphone/call.h | 5 +++++ 2 files changed, 9 insertions(+) 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().