diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-27 13:06:45 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-27 13:06:45 +0000 |
commit | a973661efac4371dde0d48922e4fdc8bedac225a (patch) | |
tree | eb9cb5e910700bea60628d751a6693bce4ebc35b /channels | |
parent | 0ea15ad0fa8c75fe88823ff66172cec738193713 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@184565 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0e987e4ec..0db0776dc 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) { |