diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-10-19 11:23:16 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-10-19 11:23:16 -0500 |
commit | e2cf981a1cd707861adac644e6bd609375560623 (patch) | |
tree | 16ba53bd11441a6de0699d2ba6415cd8d4dc98dd /channels/chan_sip.c | |
parent | 0abc71dfd69d7a649460435da7ea72c00daea120 (diff) | |
parent | ca1b1977657ad3ecd3bdabc6c8065859dab5c6d5 (diff) |
Merge "chan_sip: Support nat=auto_comedia or nat=force_rport,auto_comedia." into 14
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 247f7dbe3..ab9984a8f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -30469,9 +30469,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); |