aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-11 05:19:39 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-11 05:19:39 +0000
commitfd5a84c61bba5c8931772f10fd87417786e0a09f (patch)
treee2a6c72cf5e370914340c6536c45e860aed031e2 /channels/chan_sip.c
parent754d083c48e80cb412d850cd451d469e74fcef62 (diff)
Add support to see whether NAT was detected (yay symmetric RTP) and also add a check in chan_sip so that if NAT has been detected and the reinvite behind nat option has been turned off, then just do partial bridge. (issue #8655 reported by mnicholson)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50466 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 937796406..be0228d39 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -16656,7 +16656,9 @@ static enum ast_rtp_get_result sip_get_rtp_peer(struct ast_channel *chan, struct
*rtp = p->rtp;
- if (ast_test_flag(&p->flags[0], SIP_CAN_REINVITE))
+ if (ast_rtp_getnat(*rtp) && !ast_test_flag(&p->flags[0], SIP_CAN_REINVITE_NAT))
+ res = AST_RTP_TRY_PARTIAL;
+ else if (ast_test_flag(&p->flags[0], SIP_CAN_REINVITE))
res = AST_RTP_TRY_NATIVE;
else if (ast_test_flag(&global_jbconf, AST_JB_FORCED))
res = AST_RTP_GET_FAILED;