From 8f176cf7c8af5c681b7b616500b6eb32adb28887 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Wed, 20 Jun 2012 10:39:05 +0000 Subject: Fixed #1537: Via rewrite: putting the right IP address in Via sent-by for outgoing requests git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4173 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsip-ua/sip_regc.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pjsip/include/pjsip-ua/sip_regc.h') diff --git a/pjsip/include/pjsip-ua/sip_regc.h b/pjsip/include/pjsip-ua/sip_regc.h index c2aec0c8..9e393813 100644 --- a/pjsip/include/pjsip-ua/sip_regc.h +++ b/pjsip/include/pjsip-ua/sip_regc.h @@ -190,6 +190,21 @@ PJ_DECL(pj_status_t) pjsip_regc_init(pjsip_regc *regc, const pj_str_t contact[], pj_uint32_t expires); +/** + * Set the "sent-by" field of the Via header for outgoing requests. + * + * @param regc The client registration structure. + * @param via_addr Set via_addr to use for the Via header or NULL to use + * the transport's published name. + * @param via_tp via_addr will only be used if we are using via_tp + * transport. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_regc_set_via_sent_by(pjsip_regc *regc, + pjsip_host_port *via_addr, + pjsip_transport *via_tp); + /** * Set the number of seconds to refresh the client registration before * the registration expires. -- cgit v1.2.3