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

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


Author: file
Date: Tue Feb  5 13:14:24 2013
New Revision: 380897

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380897
Log:
Add support for RTP using IPv6.

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/include/asterisk/res_sip_session.h
    team/file/pimp_sip_media/res/res_sip/sip_configuration.c
    team/file/pimp_sip_media/res/res_sip_sdp_audio.c
    team/file/pimp_sip_media/res/res_sip_session.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=380897&r1=380896&r2=380897
==============================================================================
--- 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:14:24 2013
@@ -18,4 +18,5 @@
 ;timers=yes               ; Enable or disable session timers support - valid options are: yes, no, required, forced
 ;timers_min_se=90         ; Minimum session timers expiration period, in seconds
 ;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
+;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

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=380897&r1=380896&r2=380897
==============================================================================
--- 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:14:24 2013
@@ -198,12 +198,14 @@
 	struct ast_format_cap *codecs;
 	/*! DTMF mode to use with this endpoint */
 	enum ast_sip_dtmf_mode dtmf;
+	/*! Whether IPv6 RTP is enabled or not */
+	unsigned int rtp_ipv6;
 	/*! Enabled SIP extensions */
 	unsigned int extensions;
 	/*! Minimum session expiration period, in seconds */
-	unsigned min_se;
+	unsigned int min_se;
 	/*! Session expiration period, in seconds */
-	unsigned sess_expires;
+	unsigned int sess_expires;
 	/*! List of outbound registrations */
 	AST_LIST_HEAD_NOLOCK(, ast_sip_registration) registrations;
 	/*! Frequency to send OPTIONS requests to endpoint. 0 is disabled. */

Modified: team/file/pimp_sip_media/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/include/asterisk/res_sip_session.h?view=diff&rev=380897&r1=380896&r2=380897
==============================================================================
--- team/file/pimp_sip_media/include/asterisk/res_sip_session.h (original)
+++ team/file/pimp_sip_media/include/asterisk/res_sip_session.h Tue Feb  5 13:14:24 2013
@@ -84,6 +84,8 @@
 	struct ast_sip_session_media media[AST_SIP_MEDIA_SIZE];
 	/* Workspace for tasks relating to this SIP session */
 	struct ast_sip_work *work;
+	/* Whether IPv6 RTP support is in use or not */
+	unsigned int rtp_ipv6:1;
 };
 
 /*!

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=380897&r1=380896&r2=380897
==============================================================================
--- 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:14:24 2013
@@ -227,6 +227,7 @@
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "qualify_frequency", 0, OPT_UINT_T, PARSE_IN_RANGE, FLDSET(struct ast_sip_endpoint, qualify_frequency), 0, 86400);
 	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", "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=380897&r1=380896&r2=380897
==============================================================================
--- 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:14:24 2013
@@ -73,7 +73,7 @@
 	char hostip[PJ_INET6_ADDRSTRLEN+2];
 	struct ast_sockaddr tmp;
 
-	if (pj_gethostip(pj_AF_INET(), &addr) != PJ_SUCCESS) {
+	if (pj_gethostip(session->rtp_ipv6 ? pj_AF_INET6() : pj_AF_INET(), &addr) != PJ_SUCCESS) {
 		return -1;
 	}
 

Modified: team/file/pimp_sip_media/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/res/res_sip_session.c?view=diff&rev=380897&r1=380896&r2=380897
==============================================================================
--- team/file/pimp_sip_media/res/res_sip_session.c (original)
+++ team/file/pimp_sip_media/res/res_sip_session.c Tue Feb  5 13:14:24 2013
@@ -496,6 +496,7 @@
 	session->work = ast_sip_create_work();
 	session->endpoint = endpoint;
 	session->inv_session = inv_session;
+	session->rtp_ipv6 = endpoint->rtp_ipv6;
 	if (add_supplements(session)) {
 		return NULL;
 	}




More information about the asterisk-commits mailing list