[asterisk-commits] branch oej/managerstuff r15378 - in /team/oej/managerstuff: ./ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 27 16:34:53 MST 2006


Author: oej
Date: Mon Mar 27 17:34:52 2006
New Revision: 15378

URL: http://svn.digium.com/view/asterisk?rev=15378&view=rev
Log:
Resolve, reset, go!

Modified:
    team/oej/managerstuff/   (props changed)
    team/oej/managerstuff/channels/chan_sip.c

Propchange: team/oej/managerstuff/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/managerstuff/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Mar 27 17:34:52 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7496,7498-14890
+/branches/1.2:1-7496,7498-15377

Modified: team/oej/managerstuff/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/managerstuff/channels/chan_sip.c?rev=15378&r1=15377&r2=15378&view=diff
==============================================================================
--- team/oej/managerstuff/channels/chan_sip.c (original)
+++ team/oej/managerstuff/channels/chan_sip.c Mon Mar 27 17:34:52 2006
@@ -5475,6 +5475,8 @@
 		ast_string_field_set(r, callid, p->callid);
 		if (r->portno)
 			p->sa.sin_port = htons(r->portno);
+		else 	/* Set registry port to the port set from the peer definition/srv or default */
+			r->portno = p->sa.sin_port;
 		ast_set_flag(p, SIP_OUTGOING);	/* Registration is outgoing call */
 		r->call=p;			/* Save pointer to SIP packet */
 		p->registry = ASTOBJ_REF(r);	/* Add pointer to registry in packet */
@@ -6626,6 +6628,7 @@
 	char tmp[256] = "", *uri, *a;
 	char tmpf[256], *from;
 	struct sip_request *req;
+	char *colon;
 	
 	req = oreq;
 	if (!req)
@@ -6657,20 +6660,27 @@
 		ast_uri_decode(from);
 	}
 
+	/* Skip any options */
+	if ((a = strchr(uri, ';'))) {
+		*a = '\0';
+	}
+
 	/* Get the target domain */
 	if ((a = strchr(uri, '@'))) {
-		char *colon;
 		*a = '\0';
 		a++;
 		colon = strchr(a, ':'); /* Remove :port */
 		if (colon)
 			*colon = '\0';
-		ast_string_field_set(p, domain, a);
-	}
-	/* Skip any options */
-	if ((a = strchr(uri, ';'))) {
-		*a = '\0';
-	}
+	} else {	/* No username part */
+		a = uri;
+		uri = "s";	/* Set extension to "s" */
+	}
+	colon = strchr(a, ':'); /* Remove :port */
+	if (colon)
+		*colon = '\0';
+
+	ast_string_field_set(p, domain, a);
 
 	if (!AST_LIST_EMPTY(&domain_list)) {
 		char domain_context[AST_MAX_EXTENSION];



More information about the asterisk-commits mailing list