From: Joshua Colp Date: Fri, 27 Mar 2009 13:06:45 +0000 (+0000) Subject: Fix an issue where nat=yes would not always take effect for the RTP session on outgoi... X-Git-Tag: 1.4.25-rc1~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f37862a87a8930d1843059ba6d2332319091a1f;p=thirdparty%2Fasterisk.git Fix an issue where nat=yes would not always take effect for the RTP session on outgoing calls. If calls were placed using an IP address or hostname the global nat setting was copied over but was not set on the RTP session itself. This caused the RTP stack to not perform symmetric RTP actions. (closes issue #14546) Reported by: acunningham git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@184565 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0e987e4ecf..0db0776dcc 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2947,7 +2947,9 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer, struct sockadd ASTOBJ_UNREF(p, sip_destroy_peer); return res; } - + + do_setnat(dialog, ast_test_flag(&dialog->flags[0], SIP_NAT) & SIP_NAT_ROUTE); + ast_string_field_set(dialog, tohost, peer); if (sin) {