[asterisk-commits] simon.perreault: trunk r280745 - in /trunk: channels/ configs/ contrib/realti...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 3 14:05:54 CDT 2010


Author: simon.perreault
Date: Tue Aug  3 14:05:50 2010
New Revision: 280745

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=280745
Log:
Reverted r280706 and r280707. Will commit in branch 1.8 and merge to trunk properly.

Modified:
    trunk/channels/chan_sip.c
    trunk/configs/sip.conf.sample
    trunk/contrib/realtime/mysql/iaxfriends.sql   (props changed)
    trunk/contrib/realtime/mysql/meetme.sql   (props changed)
    trunk/contrib/realtime/mysql/sipfriends.sql   (props changed)
    trunk/contrib/realtime/mysql/voicemail.sql   (props changed)
    trunk/contrib/realtime/postgresql/realtime.sql   (props changed)

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=280745&r1=280744&r2=280745
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Aug  3 14:05:50 2010
@@ -9875,22 +9875,12 @@
 		from = NULL;
 
 	if (from) {
-		int bracket = 0;
-
 		/* Strip any params or options from user */
 		if ((a = strchr(from, ';')))
 			*a = '\0';
 		/* Strip port from domain if present */
-		for (a = from; *a != '\0'; ++a) {
-			if (*a == ':' && bracket == 0) {
-				*a = '\0';
-				break;
-			} else if (*a == '[') {
-				++bracket;
-			} else if (*a == ']') {
-				--bracket;
-			}
-		}
+		if ((a = strchr(from, ':')))
+			*a = '\0';
 		if ((a = strchr(from, '@'))) {
 			*a = '\0';
 			ast_copy_string(domain, a + 1, len);
@@ -14486,27 +14476,17 @@
 	
 	if ((ptr = strchr(refer_to, '@'))) {	/* Separate domain */
 		char *urioption = NULL, *domain;
-		int bracket = 0;
 		*ptr++ = '\0';
 
 		if ((urioption = strchr(ptr, ';'))) { /* Separate urioptions */
 			*urioption++ = '\0';
 		}
-
+		
 		domain = ptr;
-
-		/* Remove :port */
-		for (; *ptr != '\0'; ++ptr) {
-			if (*ptr == ':' && bracket == 0) {
-				*ptr = '\0';
-				break;
-			} else if (*ptr == '[') {
-				++bracket;
-			} else if (*ptr == ']') {
-				--bracket;
-			}
-		}
-
+		if ((ptr = strchr(domain, ':'))) {	/* Remove :port */
+			*ptr = '\0';
+		}
+		
 		SIP_PEDANTIC_DECODE(domain);
 		SIP_PEDANTIC_DECODE(urioption);
 
@@ -27093,12 +27073,10 @@
 
 		/* First our default IP address */
 		if (!ast_sockaddr_isnull(&bindaddr)) {
-			add_sip_domain(ast_sockaddr_stringify_addr(&bindaddr),
-				       SIP_DOMAIN_AUTO, NULL);
+			add_sip_domain(ast_sockaddr_stringify(&bindaddr), SIP_DOMAIN_AUTO, NULL);
 		} else if (!ast_sockaddr_isnull(&internip)) {
 		/* Our internal IP address, if configured */
-			add_sip_domain(ast_sockaddr_stringify_addr(&internip),
-				       SIP_DOMAIN_AUTO, NULL);
+			add_sip_domain(ast_sockaddr_stringify(&internip), SIP_DOMAIN_AUTO, NULL);
 		} else {
 			ast_log(LOG_NOTICE, "Can't add wildcard IP address to domain list, please add IP address to domain manually.\n");
 		}
@@ -27106,7 +27084,7 @@
 		/* If TCP is running on a different IP than UDP, then add it too */
 		if (!ast_sockaddr_isnull(&sip_tcp_desc.local_address) &&
 		    !ast_sockaddr_cmp(&bindaddr, &sip_tcp_desc.local_address)) {
-			add_sip_domain(ast_sockaddr_stringify_addr(&sip_tcp_desc.local_address),
+			add_sip_domain(ast_sockaddr_stringify(&sip_tcp_desc.local_address),
 				       SIP_DOMAIN_AUTO, NULL);
 		}
 
@@ -27115,14 +27093,14 @@
 		    !ast_sockaddr_cmp(&bindaddr, &sip_tls_desc.local_address) &&
 		    !ast_sockaddr_cmp(&sip_tcp_desc.local_address,
 				      &sip_tls_desc.local_address)) {
-			add_sip_domain(ast_sockaddr_stringify_addr(&sip_tcp_desc.local_address),
+			add_sip_domain(ast_sockaddr_stringify(&sip_tcp_desc.local_address),
 				       SIP_DOMAIN_AUTO, NULL);
 		}
 
 		/* Our extern IP address, if configured */
 		if (!ast_sockaddr_isnull(&externaddr)) {
-			add_sip_domain(ast_sockaddr_stringify_addr(&externaddr),
-				       SIP_DOMAIN_AUTO, NULL);
+			add_sip_domain(ast_sockaddr_stringify(&externaddr), SIP_DOMAIN_AUTO,
+				       NULL);
 		}
 
 		/* Extern host name (NAT traversal support) */

Modified: trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=280745&r1=280744&r2=280745
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Tue Aug  3 14:05:50 2010
@@ -136,28 +136,6 @@
                                 ; In this case Realm will be based on request 'From'/'To' header
                                 ; and should match one of domain names.
                                 ; Otherwise default 'realm=...' will be used.
-
-; With the current situation, you can do one of four things:
-;  a) Listen on a specific IPv4 address.      Example: bindaddr=192.0.2.1
-;  b) Listen on a specific IPv6 address.      Example: bindaddr=2001:db8::1
-;  c) Listen on the IPv4 wildcard.            Example: bindaddr=0.0.0.0
-;  d) Listen on the IPv4 and IPv6 wildcards.  Example: bindaddr=::
-; (You can choose independently for UDP, TCP, and TLS, by specifying different values for
-; "udpbindaddr", "tcpbindaddr", and "tlsbindaddr".)
-;
-; You may optionally add a port number. (The default is port 5060 for UDP and TCP, 5061
-; for TLS).
-;   IPv4 example: bindaddr=0.0.0.0:5062
-;   IPv6 example: bindaddr=[::]:5062
-;
-; The address family of the bound UDP address is used to determine how Asterisk performs
-; DNS lookups. In cases a) and c) above, only A records are considered. In case b), only
-; AAAA records are considered. In case d), both A and AAAA records are considered. Note,
-; however, that Asterisk ignores all records except the first one. In case d), when both A
-; and AAAA records are available, either an A or AAAA record will be first, and which one
-; depends on the operating system. On systems using glibc, AAAA records are given
-; priority.
-
 udpbindaddr=0.0.0.0             ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
                                 ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
 
@@ -728,8 +706,6 @@
 ;
 ;        stunaddr = foo.stun.com:3478
 ;        externrefresh = 15
-;
-;      NOTE: STUN is only implemented for IPv4.
 ;
 ;   Note that at the moment all these mechanism work only for the SIP socket.
 ;   The IP address discovered with externaddr/externhost/STUN is reused for

Propchange: trunk/contrib/realtime/mysql/iaxfriends.sql
            ('svn:mergeinfo' removed)

Propchange: trunk/contrib/realtime/mysql/meetme.sql
            ('svn:mergeinfo' removed)

Propchange: trunk/contrib/realtime/mysql/sipfriends.sql
            ('svn:mergeinfo' removed)

Propchange: trunk/contrib/realtime/mysql/voicemail.sql
            ('svn:mergeinfo' removed)

Propchange: trunk/contrib/realtime/postgresql/realtime.sql
            ('svn:mergeinfo' removed)




More information about the asterisk-commits mailing list