[asterisk-commits] branch murf/bug_7253_trunk r36959 - in /team/murf/bug_7253_trunk: ./ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jul 4 12:59:58 MST 2006


Author: murf
Date: Tue Jul  4 14:59:57 2006
New Revision: 36959

URL: http://svn.digium.com/view/asterisk?rev=36959&view=rev
Log:
Merged revisions 36912,36941 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r36912 | oej | 2006-07-04 08:54:55 -0600 (Tue, 04 Jul 2006) | 2 lines

Specify digest algorithm for picky clients

........
r36941 | crichter | 2006-07-04 11:04:21 -0600 (Tue, 04 Jul 2006) | 1 line

removed the reloading of the ntdebug stuff, since this is a bit buggy, we only set it when loading chan_misdn for now. fixed a litle state problem when receiving RELEASE_COMPLETE. also we may only play tones to a NT when the extension does not match and such cases.
........

Modified:
    team/murf/bug_7253_trunk/   (props changed)
    team/murf/bug_7253_trunk/channels/chan_misdn.c
    team/murf/bug_7253_trunk/channels/chan_sip.c

Propchange: team/murf/bug_7253_trunk/
------------------------------------------------------------------------------
    automerge = yep

Propchange: team/murf/bug_7253_trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/murf/bug_7253_trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jul  4 14:59:57 2006
@@ -1,1 +1,1 @@
-/trunk:1-36899
+/trunk:1-36958

Modified: team/murf/bug_7253_trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7253_trunk/channels/chan_misdn.c?rev=36959&r1=36958&r2=36959&view=diff
==============================================================================
--- team/murf/bug_7253_trunk/channels/chan_misdn.c (original)
+++ team/murf/bug_7253_trunk/channels/chan_misdn.c Tue Jul  4 14:59:57 2006
@@ -743,14 +743,6 @@
 		misdn_debug[i] = cfg_debug;
 		misdn_debug_only[i] = 0;
 	}
-
-	int ntflags=0;
-	char ntfile[BUFFERSIZE+1];
-
-	misdn_cfg_get( 0, MISDN_GEN_NTDEBUGFLAGS, &ntflags, sizeof(int));
-	misdn_cfg_get( 0, MISDN_GEN_NTDEBUGFILE, &ntfile, BUFFERSIZE);
-
-	misdn_lib_nt_debug_init(ntflags,ntfile);
 }
 
 static int misdn_reload (int fd, int argc, char *argv[])
@@ -3431,7 +3423,8 @@
 			if(!ast_canmatch_extension(ch->ast, ch->context, bc->dad, 1, bc->oad)) {
 
 				chan_misdn_log(-1, bc->port, "Extension can never match, so disconnecting\n");
-				tone_indicate(ch,TONE_BUSY);
+				if (bc->nt)
+					tone_indicate(ch,TONE_BUSY);
 				ch->state=MISDN_EXTCANTMATCH;
 				bc->out_cause=1;
 
@@ -3447,7 +3440,7 @@
 				if (ast_pbx_start(ch->ast)<0) {
 
 					chan_misdn_log(-1, bc->port, "ast_pbx_start returned < 0 in INFO\n");
-					tone_indicate(ch,TONE_BUSY);
+				 	if (bc->nt) tone_indicate(ch,TONE_BUSY);
 
 					misdn_lib_send_event(bc, EVENT_DISCONNECT );
 				}
@@ -3617,7 +3610,8 @@
 			
 			chan_misdn_log(-1, bc->port, "Extension can never match, so disconnecting\n");
 
-			tone_indicate(ch,TONE_BUSY);
+			if (bc->nt)
+				tone_indicate(ch,TONE_BUSY);
 			ch->state=MISDN_EXTCANTMATCH;
 			bc->out_cause=1;
 
@@ -3644,11 +3638,11 @@
 
 				chan_misdn_log(-1, bc->port, "ast_pbx_start returned <0 in SETUP\n");
 				chan=NULL;
-				tone_indicate(ch,TONE_BUSY);
-
-				if (bc->nt)
+
+				if (bc->nt) {
+					tone_indicate(ch,TONE_BUSY);
 					misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE );
-				else
+				} else
 					misdn_lib_send_event(bc, EVENT_RELEASE);
 			}
 		} else {
@@ -3882,9 +3876,9 @@
 		break;
 	case EVENT_RELEASE_COMPLETE:
 	{
-		ch->state=MISDN_CLEANING;
 		stop_bc_tones(ch);
 		release_chan(bc);
+		ch->state=MISDN_CLEANING;
 	}
 	break;
 
@@ -4236,11 +4230,16 @@
 		
 		if (misdn_lib_init(ports, &iface, NULL))
 			chan_misdn_log(0, 0, "No te ports initialized\n");
-	}
-
-
-
-	reload_config();
+	
+		int ntflags=0;
+		char ntfile[BUFFERSIZE+1];
+
+		misdn_cfg_get( 0, MISDN_GEN_NTDEBUGFLAGS, &ntflags, sizeof(int));
+		misdn_cfg_get( 0, MISDN_GEN_NTDEBUGFILE, &ntfile, BUFFERSIZE);
+
+		misdn_lib_nt_debug_init(ntflags,ntfile);
+
+	}
 
 	{
 		if (ast_channel_register(&misdn_tech)) {

Modified: team/murf/bug_7253_trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7253_trunk/channels/chan_sip.c?rev=36959&r1=36958&r2=36959&view=diff
==============================================================================
--- team/murf/bug_7253_trunk/channels/chan_sip.c (original)
+++ team/murf/bug_7253_trunk/channels/chan_sip.c Tue Jul  4 14:59:57 2006
@@ -5497,7 +5497,7 @@
 static int transmit_response_with_auth(struct sip_pvt *p, const char *msg, const struct sip_request *req, const char *randdata, enum xmittype reliable, const char *header, int stale)
 {
 	struct sip_request resp;
-	char tmp[256];
+	char tmp[512];
 	int seqno = 0;
 
 	if (reliable && (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1)) {
@@ -5506,7 +5506,7 @@
 	}
 	/* Stale means that they sent us correct authentication, but 
 	   based it on an old challenge (nonce) */
-	snprintf(tmp, sizeof(tmp), "Digest realm=\"%s\", nonce=\"%s\"%s", global_realm, randdata, stale ? ", stale=true" : "");
+	snprintf(tmp, sizeof(tmp), "Digest algorithm=MD5, realm=\"%s\", nonce=\"%s\"%s", global_realm, randdata, stale ? ", stale=true" : "");
 	respprep(&resp, p, msg, req);
 	add_header(&resp, header, tmp);
 	add_header_contentLength(&resp, 0);



More information about the asterisk-commits mailing list