[asterisk-commits] file: trunk r50467 - in /trunk: ./ channels/
include/asterisk/ main/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 10 22:21:03 MST 2007
Author: file
Date: Wed Jan 10 23:21:03 2007
New Revision: 50467
URL: http://svn.digium.com/view/asterisk?view=rev&rev=50467
Log:
Merged revisions 50466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r50466 | file | 2007-01-11 00:19:39 -0500 (Thu, 11 Jan 2007) | 2 lines
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)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
trunk/include/asterisk/rtp.h
trunk/main/rtp.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=50467&r1=50466&r2=50467
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jan 10 23:21:03 2007
@@ -16894,7 +16894,9 @@
*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;
Modified: trunk/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/rtp.h?view=diff&rev=50467&r1=50466&r2=50467
==============================================================================
--- trunk/include/asterisk/rtp.h (original)
+++ trunk/include/asterisk/rtp.h Wed Jan 10 23:21:03 2007
@@ -185,6 +185,8 @@
const int isAstFormat, enum ast_rtp_options options);
void ast_rtp_setnat(struct ast_rtp *rtp, int nat);
+
+int ast_rtp_getnat(struct ast_rtp *rtp);
/*! \brief Indicate whether this RTP session is carrying DTMF or not */
void ast_rtp_setdtmf(struct ast_rtp *rtp, int dtmf);
Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?view=diff&rev=50467&r1=50466&r2=50467
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Wed Jan 10 23:21:03 2007
@@ -589,6 +589,11 @@
void ast_rtp_setnat(struct ast_rtp *rtp, int nat)
{
rtp->nat = nat;
+}
+
+int ast_rtp_getnat(struct ast_rtp *rtp)
+{
+ return ast_test_flag(rtp, FLAG_NAT_ACTIVE);
}
void ast_rtp_setdtmf(struct ast_rtp *rtp, int dtmf)
More information about the asterisk-commits
mailing list