[asterisk-commits] branch bweschke/findme_followme r15431 - in /team/bweschke/findme_followme: ....

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 27 18:59:29 MST 2006


Author: bweschke
Date: Mon Mar 27 19:59:28 2006
New Revision: 15431

URL: http://svn.digium.com/view/asterisk?rev=15431&view=rev
Log:
Merged revisions 15375,15377,15379-15380,15382 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r15375 | oej | 2006-03-27 17:13:31 -0600 (Mon, 27 Mar 2006) | 2 lines

Issue #6409 - Make calls to URI without username go to "s" extension (imported from 1.2)

........
r15377 | oej | 2006-03-27 17:32:34 -0600 (Mon, 27 Mar 2006) | 2 lines

Issue #6597 - Show correct port in "sip show registry" - import from 1.2 branch

........
r15379 | oej | 2006-03-27 17:39:48 -0600 (Mon, 27 Mar 2006) | 2 lines

Issue #6736 - Enable NAT flags for OPTIONs requests (Thanks casper!)

........
r15380 | oej | 2006-03-27 17:41:21 -0600 (Mon, 27 Mar 2006) | 2 lines

Reverting previous patch. Ok, let's take this from 1.2 instead... :-)

........
r15382 | oej | 2006-03-27 17:49:44 -0600 (Mon, 27 Mar 2006) | 2 lines

Issue #6736 - use flags for OPTIONs messages

........

Modified:
    team/bweschke/findme_followme/   (props changed)
    team/bweschke/findme_followme/channels/chan_sip.c

Propchange: team/bweschke/findme_followme/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/bweschke/findme_followme/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Mar 27 19:59:28 2006
@@ -1,1 +1,1 @@
-/trunk:1-15326
+/trunk:1-15430

Modified: team/bweschke/findme_followme/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/findme_followme/channels/chan_sip.c?rev=15431&r1=15430&r2=15431&view=diff
==============================================================================
--- team/bweschke/findme_followme/channels/chan_sip.c (original)
+++ team/bweschke/findme_followme/channels/chan_sip.c Mon Mar 27 19:59:28 2006
@@ -5582,6 +5582,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 */
@@ -6704,6 +6706,7 @@
 	char tmp[256] = "", *uri, *a;
 	char tmpf[256], *from;
 	struct sip_request *req;
+	char *colon;
 	
 	req = oreq;
 	if (!req)
@@ -6735,20 +6738,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];
@@ -11658,6 +11668,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 */
@@ -11678,8 +11689,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