[asterisk-commits] seanbright: branch seanbright/NoLossCDR-Redux r104090 - in /team/seanbright/N...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 25 13:06:15 CST 2008


Author: seanbright
Date: Mon Feb 25 13:06:14 2008
New Revision: 104090

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104090
Log:
Merged revisions 104081,104083,104085,104087-104089 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r104081 | file | 2008-02-25 10:12:48 -0500 (Mon, 25 Feb 2008) | 2 lines

Fix building of trunk. dbpass is always going to exist.

................
r104083 | file | 2008-02-25 10:19:58 -0500 (Mon, 25 Feb 2008) | 14 lines

Merged revisions 104082 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104082 | file | 2008-02-25 11:17:18 -0400 (Mon, 25 Feb 2008) | 6 lines

Due to recent changes tag will no longer be NULL if not present so we have to use ast_strlen_zero to see if it's actually blank.
(closes issue #12061)
Reported by: flefoll
Patches:
      chan_sip.c.br14.patch_pedantic_no_totag uploaded by flefoll (license 244)

........

................
r104085 | file | 2008-02-25 11:18:46 -0500 (Mon, 25 Feb 2008) | 14 lines

Merged revisions 104084 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104084 | file | 2008-02-25 12:16:13 -0400 (Mon, 25 Feb 2008) | 6 lines

If a resubscription comes in for a dialog we no longer know about tell the remote side that the dialog does not exist so they subscribe again using a new dialog.
(closes issue #10727)
Reported by: s0l4rb03
Patches:
      10727-2.diff uploaded by file (license 11)

........

................
r104087 | russell | 2008-02-25 13:38:51 -0500 (Mon, 25 Feb 2008) | 12 lines

Merged revisions 104086 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104086 | russell | 2008-02-25 12:38:10 -0600 (Mon, 25 Feb 2008) | 4 lines

Ensure that the channel doesn't disappear in agent_logoff().  If it does, it
could cause a crash.
(fixes the crash reported in BE-396)

........

................
r104088 | bbryant | 2008-02-25 14:00:16 -0500 (Mon, 25 Feb 2008) | 1 line

Adding more tls configuration details to sip.conf sample, with a list of valid ciphers provided in both files. .. First commit since July, woot
................
r104089 | file | 2008-02-25 14:02:33 -0500 (Mon, 25 Feb 2008) | 2 lines

Instead of outputting a verbose message every so often let's make it a debug message.

................

Modified:
    team/seanbright/NoLossCDR-Redux/   (props changed)
    team/seanbright/NoLossCDR-Redux/channels/chan_agent.c
    team/seanbright/NoLossCDR-Redux/channels/chan_iax2.c
    team/seanbright/NoLossCDR-Redux/channels/chan_sip.c
    team/seanbright/NoLossCDR-Redux/configs/sip.conf.sample
    team/seanbright/NoLossCDR-Redux/doc/siptls.txt
    team/seanbright/NoLossCDR-Redux/res/res_config_pgsql.c

Propchange: team/seanbright/NoLossCDR-Redux/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/seanbright/NoLossCDR-Redux/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb 25 13:06:14 2008
@@ -1,1 +1,1 @@
-/trunk:1-104075
+/trunk:1-104089

Modified: team/seanbright/NoLossCDR-Redux/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/NoLossCDR-Redux/channels/chan_agent.c?view=diff&rev=104090&r1=104089&r2=104090
==============================================================================
--- team/seanbright/NoLossCDR-Redux/channels/chan_agent.c (original)
+++ team/seanbright/NoLossCDR-Redux/channels/chan_agent.c Mon Feb 25 13:06:14 2008
@@ -1513,10 +1513,29 @@
 			ret = 0;
 			if (p->owner || p->chan) {
 				if (!soft) {
-					if (p->owner)
+					ast_mutex_lock(&p->lock);
+
+					while (p->owner && ast_channel_trylock(p->owner)) {
+						ast_mutex_unlock(&p->lock);
+						usleep(1);
+						ast_mutex_lock(&p->lock);
+					}
+					if (p->owner) {
 						ast_softhangup(p->owner, AST_SOFTHANGUP_EXPLICIT);
-					if (p->chan)
+						ast_channel_unlock(p->owner);
+					}
+
+					while (p->chan && ast_channel_trylock(p->chan)) {
+						ast_mutex_unlock(&p->lock);
+						usleep(1);
+						ast_mutex_lock(&p->lock);
+					}
+					if (p->chan) {
 						ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
+						ast_channel_unlock(p->chan);
+					}
+
+					ast_mutex_unlock(&p->lock);
 				} else
 					p->deferlogoff = 1;
 			} else {

Modified: team/seanbright/NoLossCDR-Redux/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/NoLossCDR-Redux/channels/chan_iax2.c?view=diff&rev=104090&r1=104089&r2=104090
==============================================================================
--- team/seanbright/NoLossCDR-Redux/channels/chan_iax2.c (original)
+++ team/seanbright/NoLossCDR-Redux/channels/chan_iax2.c Mon Feb 25 13:06:14 2008
@@ -7320,7 +7320,7 @@
 			localooo = jbinfo.frames_ooo;
 			localpackets = jbinfo.frames_in;
 		}
-		ast_verb(3, "JB STATS:%s ping=%d ljitterms=%d ljbdelayms=%d ltotlost=%d lrecentlosspct=%d ldropped=%d looo=%d lrecvd=%d rjitterms=%d rjbdelayms=%d rtotlost=%d rrecentlosspct=%d rdropped=%d rooo=%d rrecvd=%d\n",
+		ast_debug(3, "JB STATS:%s ping=%d ljitterms=%d ljbdelayms=%d ltotlost=%d lrecentlosspct=%d ldropped=%d looo=%d lrecvd=%d rjitterms=%d rjbdelayms=%d rtotlost=%d rrecentlosspct=%d rdropped=%d rooo=%d rrecvd=%d\n",
 			iaxs[callno]->owner->name,
 			iaxs[callno]->pingtime,
 			localjitter,

Modified: team/seanbright/NoLossCDR-Redux/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/NoLossCDR-Redux/channels/chan_sip.c?view=diff&rev=104090&r1=104089&r2=104090
==============================================================================
--- team/seanbright/NoLossCDR-Redux/channels/chan_sip.c (original)
+++ team/seanbright/NoLossCDR-Redux/channels/chan_sip.c Mon Feb 25 13:06:14 2008
@@ -5831,7 +5831,7 @@
 			found = (!strcmp(p->callid, callid));
 		else 
 			found = (!strcmp(p->callid, callid) && 
-			(!pedanticsipchecking || !tag || ast_strlen_zero(p->theirtag) || !strcmp(p->theirtag, tag))) ;
+			(!pedanticsipchecking || ast_strlen_zero(tag) || ast_strlen_zero(p->theirtag) || !strcmp(p->theirtag, tag))) ;
 
 		ast_debug(5, "= %s Their Call ID: %s Their Tag %s Our tag: %s\n", found ? "Found" : "No match", p->callid, p->theirtag, p->tag);
 
@@ -17392,6 +17392,18 @@
 	}
 
 	if (!req->ignore && !resubscribe) {	/* Set up dialog, new subscription */
+		const char *to = get_header(req, "To");
+		char totag[128];
+
+		/* Check to see if a tag was provided, if so this is actually a resubscription of a dialog we no longer know about */
+		if (!ast_strlen_zero(to) && gettag(req, "To", totag, sizeof(totag))) {
+			if (req->debug)
+				ast_verbose("Received resubscription for a dialog we no longer know about. Telling remote side to subscribe again.\n");
+			transmit_response(p, "481 Subscription does not exist", req);
+			p->needdestroy = 1;
+			return 0;
+		}
+
 		/* Use this as the basis */
 		if (req->debug)
 			ast_verbose("Creating new subscription\n");

Modified: team/seanbright/NoLossCDR-Redux/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/seanbright/NoLossCDR-Redux/configs/sip.conf.sample?view=diff&rev=104090&r1=104089&r2=104090
==============================================================================
--- team/seanbright/NoLossCDR-Redux/configs/sip.conf.sample (original)
+++ team/seanbright/NoLossCDR-Redux/configs/sip.conf.sample Mon Feb 25 13:06:14 2008
@@ -83,6 +83,27 @@
 
 ;tlscertfile=asterisk.pem	; Certificate file (*.pem only) to use for TLS connections 
 			 	; default is to look for "asterisk.pem" in current directory
+
+;tlscafile=</path/to/certificate>
+;	If the server your connecting to uses a self signed certificate
+;	you should have their certificate installed here so the code can 
+;	verify the authenticity of their certificate.
+
+;tlscadir=</path/to/ca/dir>
+;	A directory full of CA certificates.  The files must be named with 
+;	the CA subject name hash value. 
+;	(see man SSL_CTX_load_verify_locations for more info) 
+
+;tlsdontverifyserver=[yes|no]
+;	If set to yes, don't verify the servers certificate when acting as 
+;	a client.  If you don't have the server's CA certificate you can
+;	set this and it will connect without requiring tlscafile to be set.
+;	Default is no.
+
+;tlscipher=<SSL cipher string>
+;	A string specifying which SSL ciphers to use or not use
+;	A list of valid SSL cipher strings can be found at: 
+;		http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
 
 srvlookup=yes			; Enable DNS SRV lookups on outbound calls
 				; Note: Asterisk only uses the first host 

Modified: team/seanbright/NoLossCDR-Redux/doc/siptls.txt
URL: http://svn.digium.com/view/asterisk/team/seanbright/NoLossCDR-Redux/doc/siptls.txt?view=diff&rev=104090&r1=104089&r2=104090
==============================================================================
--- team/seanbright/NoLossCDR-Redux/doc/siptls.txt (original)
+++ team/seanbright/NoLossCDR-Redux/doc/siptls.txt Mon Feb 25 13:06:14 2008
@@ -47,6 +47,8 @@
 
 tlscipher=<SSL cipher string>
 	A string specifying which SSL ciphers to use or not use
+	A list of valid SSL cipher strings can be found at: 
+		http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
 
 
 Sample config

Modified: team/seanbright/NoLossCDR-Redux/res/res_config_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/NoLossCDR-Redux/res/res_config_pgsql.c?view=diff&rev=104090&r1=104089&r2=104090
==============================================================================
--- team/seanbright/NoLossCDR-Redux/res/res_config_pgsql.c (original)
+++ team/seanbright/NoLossCDR-Redux/res/res_config_pgsql.c Mon Feb 25 13:06:14 2008
@@ -913,7 +913,7 @@
 	}
 
 	/* DB password can legitimately be 0-length */
-	if ((!pgsqlConn) && (!ast_strlen_zero(dbhost) || !ast_strlen_zero(dbsock)) && !ast_strlen_zero(dbuser) && dbpass && !ast_strlen_zero(my_database)) {
+	if ((!pgsqlConn) && (!ast_strlen_zero(dbhost) || !ast_strlen_zero(dbsock)) && !ast_strlen_zero(dbuser) && !ast_strlen_zero(my_database)) {
 		struct ast_str *connInfo = ast_str_create(32);
 
 		ast_str_set(&connInfo, 0, "host=%s port=%d dbname=%s user=%s",




More information about the asterisk-commits mailing list