summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-10-19 11:06:41 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-10-19 11:06:41 -0500
commit1843b7fa0cdf55d92595a6011bcc655f06a888d3 (patch)
tree0008abf15a020d40225f65389ff7d74be2d4e758
parentf14ef51ead823103d55923ca8003c4a533c4191e (diff)
parent4f7f8a7e95aa344ba31ffab4da4be52952cf50d1 (diff)
Merge "chan_sip: Support nat=auto_comedia or nat=force_rport,auto_comedia."
-rw-r--r--channels/chan_sip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 780168181..40ef6409a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -30477,9 +30477,10 @@ static struct ast_channel *sip_request_call(const char *type, struct ast_format_
if (p->relatedpeer) {
if (!ast_strlen_zero(p->relatedpeer->fullcontact) && !p->natdetected &&
- (ast_test_flag(&p->flags[2], SIP_PAGE3_NAT_AUTO_RPORT) && !ast_test_flag(&p->flags[0], SIP_NAT_FORCE_RPORT))) {
+ ((ast_test_flag(&p->flags[2], SIP_PAGE3_NAT_AUTO_RPORT) && !ast_test_flag(&p->flags[0], SIP_NAT_FORCE_RPORT)) ||
+ (ast_test_flag(&p->flags[2], SIP_PAGE3_NAT_AUTO_COMEDIA) && !ast_test_flag(&p->flags[1], SIP_PAGE2_SYMMETRICRTP)))) {
/* We need to make an attempt to determine if a peer is behind NAT
- if the peer has the auto_force_rport flag set. */
+ if the peer has the flags auto_force_rport or auto_comedia set. */
struct ast_sockaddr tmpaddr;
__set_address_from_contact(p->relatedpeer->fullcontact, &tmpaddr, 0);