diff options
author | Joshua Colp <jcolp@digium.com> | 2014-10-10 12:10:53 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-10-10 12:10:53 +0000 |
commit | 0ef680cff0d1bd1ccc69119cc45be895824eb266 (patch) | |
tree | 092c940e4fbce7c2a735ef4868831f9a628e9008 /res/res_pjsip_nat.c | |
parent | d3f525fd8f81acf21dd91604d1d55517cee22ed5 (diff) |
res_pjsip_nat: Place source port into rport of responses if 'force_rport' is on.
When the 'force_rport' option is enabled the behavior should be the same
as if the remote side placed rport into the message themselves. Therefore
any responses we send should include the source port of the request in the
rport of the Via header.
#SIPit31
ASTERISK-24387 #close
Reported by: Matt Jordan
........
Merged revisions 425131 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425132 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_nat.c')
-rw-r--r-- | res/res_pjsip_nat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip_nat.c b/res/res_pjsip_nat.c index 4ba56ab4c..654e51ba8 100644 --- a/res/res_pjsip_nat.c +++ b/res/res_pjsip_nat.c @@ -62,7 +62,7 @@ static pj_bool_t handle_rx_message(struct ast_sip_endpoint *endpoint, pjsip_rx_d } if (endpoint->nat.force_rport) { - rdata->msg_info.via->rport_param = 0; + rdata->msg_info.via->rport_param = rdata->pkt_info.src_port; } return PJ_FALSE; |