add getter of to address in linphoneCall which contains headers

This commit is contained in:
Nicolas Follet 2017-06-12 14:52:14 +02:00
parent 9af74b26c9
commit e3365011df
2 changed files with 9 additions and 0 deletions

View file

@ -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));
}

View file

@ -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().