[asterisk-commits] branch oej/test-this-branch r15425 - in /team/oej/test-this-branch: ./ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 27 17:11:40 MST 2006


Author: oej
Date: Mon Mar 27 18:11:39 2006
New Revision: 15425

URL: http://svn.digium.com/view/asterisk?rev=15425&view=rev
Log:
Resolve, move forward with our life

Modified:
    team/oej/test-this-branch/   (props changed)
    team/oej/test-this-branch/channels/chan_sip.c

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Mar 27 18:11:39 2006
@@ -1,1 +1,1 @@
-/trunk:1-15357
+/trunk:1-15424

Modified: team/oej/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=15425&r1=15424&r2=15425&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Mon Mar 27 18:11:39 2006
@@ -6213,6 +6213,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->flags[0], 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 */
@@ -7404,6 +7406,7 @@
 	char tmpf[256], *from;
 	struct sip_request *req;
 	int localdomain = TRUE;
+	char *colon;
 	
 	req = oreq;
 	if (!req)
@@ -7435,20 +7438,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];
@@ -12528,6 +12538,7 @@
 static int sip_poke_peer(struct sip_peer *peer)
 {
 	struct sip_pvt *p;
+
 	if (!peer->maxms || !peer->addr.sin_addr.s_addr) {
 		/* IF we have no IP, or this isn't to be monitored, return
 		  imeediately after clearing things out */
@@ -12548,8 +12559,10 @@
 	
 	memcpy(&p->sa, &peer->addr, sizeof(p->sa));
 	memcpy(&p->recv, &peer->addr, sizeof(p->sa));
-
-	/* Send options to peer's fullcontact */
+	ast_copy_flags(&peer->flags[0], &global_flags[0], SIP_FLAGS_TO_COPY);
+	ast_copy_flags(&peer->flags[1], &global_flags[1], SIP_PAGE2_FLAGS_TO_COPY);
+
+	/* Send OPTIONs to peer's fullcontact */
 	if (!ast_strlen_zero(peer->fullcontact))
 		ast_string_field_set(p, fullcontact, peer->fullcontact);
 



More information about the asterisk-commits mailing list