[asterisk-commits] file: branch file/pimp_sip_media r380913 - in /team/file/pimp_sip_media: conf...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 5 13:30:01 CST 2013


Author: file
Date: Tue Feb  5 13:29:58 2013
New Revision: 380913

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380913
Log:
Add support for enabling symmetric RTP support on an endpoint.

Modified:
    team/file/pimp_sip_media/configs/res_sip.conf.sample
    team/file/pimp_sip_media/include/asterisk/res_sip.h
    team/file/pimp_sip_media/res/res_sip/sip_configuration.c
    team/file/pimp_sip_media/res/res_sip_sdp_audio.c

Modified: team/file/pimp_sip_media/configs/res_sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/configs/res_sip.conf.sample?view=diff&rev=380913&r1=380912&r2=380913
==============================================================================
--- team/file/pimp_sip_media/configs/res_sip.conf.sample (original)
+++ team/file/pimp_sip_media/configs/res_sip.conf.sample Tue Feb  5 13:29:58 2013
@@ -20,3 +20,4 @@
 ;timers_sess_expires=1800 ; Session timers expiration period, in seconds
 ;mohsuggest=example	      ; What musiconhold class to suggest that the peer channel use when this endpoint places them on hold
 ;rtp_ipv6=yes             ; Use IPv6 for RTP transport
+;rtp_symmetric=yes        ; Enable symmetric RTP support

Modified: team/file/pimp_sip_media/include/asterisk/res_sip.h
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/include/asterisk/res_sip.h?view=diff&rev=380913&r1=380912&r2=380913
==============================================================================
--- team/file/pimp_sip_media/include/asterisk/res_sip.h (original)
+++ team/file/pimp_sip_media/include/asterisk/res_sip.h Tue Feb  5 13:29:58 2013
@@ -200,6 +200,8 @@
 	enum ast_sip_dtmf_mode dtmf;
 	/*! Whether IPv6 RTP is enabled or not */
 	unsigned int rtp_ipv6;
+	/*! Whether symmetric RTP is enabled or not */
+	unsigned int rtp_symmetric;
 	/*! Enabled SIP extensions */
 	unsigned int extensions;
 	/*! Minimum session expiration period, in seconds */

Modified: team/file/pimp_sip_media/res/res_sip/sip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/res/res_sip/sip_configuration.c?view=diff&rev=380913&r1=380912&r2=380913
==============================================================================
--- team/file/pimp_sip_media/res/res_sip/sip_configuration.c (original)
+++ team/file/pimp_sip_media/res/res_sip/sip_configuration.c Tue Feb  5 13:29:58 2013
@@ -228,6 +228,7 @@
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "host", "", host_handler, NULL, 0, 0);
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "dtmfmode", "rfc4733", dtmf_handler, NULL, 0, 0);
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtp_ipv6", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, rtp_ipv6));
+	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "rtp_symmetric", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, rtp_symmetric));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "transport", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, transport));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "mohsuggest", "default", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, mohsuggest));
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "100rel", "yes", prack_handler, NULL, 0, 0);

Modified: team/file/pimp_sip_media/res/res_sip_sdp_audio.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/res/res_sip_sdp_audio.c?view=diff&rev=380913&r1=380912&r2=380913
==============================================================================
--- team/file/pimp_sip_media/res/res_sip_sdp_audio.c (original)
+++ team/file/pimp_sip_media/res/res_sip_sdp_audio.c Tue Feb  5 13:29:58 2013
@@ -88,6 +88,7 @@
 	}
 
 	ast_rtp_instance_set_prop(session->media[AST_SIP_MEDIA_AUDIO].rtp, AST_RTP_PROPERTY_RTCP, 1);
+	ast_rtp_instance_set_prop(session->media[AST_SIP_MEDIA_AUDIO].rtp, AST_RTP_PROPERTY_NAT, session->endpoint->rtp_symmetric);
 
 	ast_rtp_codecs_packetization_set(ast_rtp_instance_get_codecs(session->media[AST_SIP_MEDIA_AUDIO].rtp),
 					 session->media[AST_SIP_MEDIA_AUDIO].rtp, &session->endpoint->prefs);




More information about the asterisk-commits mailing list