diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-10-19 10:57:01 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-10-19 10:57:01 -0500 |
commit | ad2dde8106ab4f807885d96d45d679ba4ab95326 (patch) | |
tree | 3ff27974c08ede6ff48acd7fc3b87f30cdc4f9e5 /channels/chan_sip.c | |
parent | 1bde92f68c7db787734c637ed9b4d54c573a2813 (diff) | |
parent | a859bcb49cc2c60ff2979853aae8c54269287598 (diff) |
Merge "chan_sip: Support nat=auto_comedia or nat=force_rport,auto_comedia." into 13
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 63bfd1989..1f3a2f470 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -30388,9 +30388,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); |