[asterisk-commits] file: branch 11 r376130 - in /branches/11: channels/ configs/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Nov 11 11:09:04 CST 2012
Author: file
Date: Sun Nov 11 11:08:58 2012
New Revision: 376130
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376130
Log:
Remove a fixed size limitation for producing SDP and change how ICE support is disabled by default.
With ICE support enabled in chan_sip and a large number of interfaces on the system it was
possible for the produced SDP to be truncated due to some fixed size buffers. These buffers
have now been changed so they will dynamically grow as needed.
ICE support is now also enabled by default in res_rtp_asterisk to provide a smoother experience
for chan_motif users where it is required. To maintain the previous behavior in chan_sip it is
no longer enabled by default there.
(closes issue ASTERISK-20643)
Reported by: coopvr
Modified:
branches/11/channels/chan_sip.c
branches/11/configs/sip.conf.sample
branches/11/res/res_rtp_asterisk.c
Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=376130&r1=376129&r2=376130
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Sun Nov 11 11:08:58 2012
@@ -12876,9 +12876,9 @@
struct ast_str *m_video = ast_str_alloca(256); /* Media declaration line for video */
struct ast_str *m_text = ast_str_alloca(256); /* Media declaration line for text */
struct ast_str *m_modem = ast_str_alloca(256); /* Media declaration line for modem */
- struct ast_str *a_audio = ast_str_alloca(1024); /* Attributes for audio */
- struct ast_str *a_video = ast_str_alloca(1024); /* Attributes for video */
- struct ast_str *a_text = ast_str_alloca(1024); /* Attributes for text */
+ struct ast_str *a_audio = ast_str_create(256); /* Attributes for audio */
+ struct ast_str *a_video = ast_str_create(256); /* Attributes for video */
+ struct ast_str *a_text = ast_str_create(256); /* Attributes for text */
struct ast_str *a_modem = ast_str_alloca(1024); /* Attributes for modem */
const char *a_crypto = NULL;
const char *v_a_crypto = NULL;
@@ -13142,11 +13142,6 @@
add_dtls_to_sdp(p->rtp, &a_audio);
}
-
- if (m_audio->len - m_audio->used < 2 || m_video->len - m_video->used < 2 ||
- m_text->len - m_text->used < 2 || a_text->len - a_text->used < 2 ||
- a_audio->len - a_audio->used < 2 || a_video->len - a_video->used < 2)
- ast_log(LOG_WARNING, "SIP SDP may be truncated due to undersized buffer!!\n");
}
if (add_t38) {
@@ -13325,6 +13320,9 @@
ast_debug(3, "Done building SDP. Settling with this capability: %s\n", ast_getformatname_multiple(buf, SIPBUFSIZE, tmpcap));
add_sdp_cleanup:
+ ast_free(a_text);
+ ast_free(a_video);
+ ast_free(a_audio);
alreadysent = ast_format_cap_destroy(alreadysent);
tmpcap = ast_format_cap_destroy(tmpcap);
@@ -31059,7 +31057,6 @@
ast_set_flag(&global_flags[0], SIP_DTMF_RFC2833); /*!< Default DTMF setting: RFC2833 */
ast_set_flag(&global_flags[0], SIP_DIRECT_MEDIA); /*!< Allow re-invites */
ast_set_flag(&global_flags[2], SIP_PAGE3_NAT_AUTO_RPORT); /*!< Default to nat=auto_force_rport */
- ast_set_flag(&global_flags[2], SIP_PAGE3_ICE_SUPPORT); /*!< Default to enabling ICE support */
ast_copy_string(default_engine, DEFAULT_ENGINE, sizeof(default_engine));
ast_copy_string(default_parkinglot, DEFAULT_PARKINGLOT, sizeof(default_parkinglot));
Modified: branches/11/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/branches/11/configs/sip.conf.sample?view=diff&rev=376130&r1=376129&r2=376130
==============================================================================
--- branches/11/configs/sip.conf.sample (original)
+++ branches/11/configs/sip.conf.sample Sun Nov 11 11:08:58 2012
@@ -919,10 +919,11 @@
;
; subscribe_network_change_event = yes ; on by default
;
-; ICE/STUN/TURN usage can be disabled globally or on a per-peer basis using the icesupport
+; ICE/STUN/TURN usage can be enabled globally or on a per-peer basis using the icesupport
; configuration option. When set to yes ICE support is enabled. When set to no it is disabled.
-;
-; icesupport = no
+; It is disabled by default.
+;
+; icesupport = yes
;----------------------------------- MEDIA HANDLING --------------------------------
; By default, Asterisk tries to re-invite media streams to an optimal path. If there's
Modified: branches/11/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_rtp_asterisk.c?view=diff&rev=376130&r1=376129&r2=376130
==============================================================================
--- branches/11/res/res_rtp_asterisk.c (original)
+++ branches/11/res/res_rtp_asterisk.c Sun Nov 11 11:08:58 2012
@@ -111,7 +111,7 @@
};
#define DEFAULT_STRICT_RTP STRICT_RTP_CLOSED
-#define DEFAULT_ICESUPPORT 0
+#define DEFAULT_ICESUPPORT 1
extern struct ast_srtp_res *res_srtp;
extern struct ast_srtp_policy_res *res_srtp_policy;
More information about the asterisk-commits
mailing list