[asterisk-commits] branch 1.2-netsec - r8046 in /branches/1.2-netsec: ./ apps/ channels/ configs...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jan 12 21:52:49 CST 2006


Author: kpfleming
Date: Thu Jan 12 21:52:45 2006
New Revision: 8046

URL: http://svn.digium.com/view/asterisk?rev=8046&view=rev
Log:
updating to current 1.2

Modified:
    branches/1.2-netsec/   (props changed)
    branches/1.2-netsec/app.c
    branches/1.2-netsec/apps/app_dial.c
    branches/1.2-netsec/apps/app_voicemail.c
    branches/1.2-netsec/channel.c
    branches/1.2-netsec/channels/chan_agent.c
    branches/1.2-netsec/channels/chan_sip.c
    branches/1.2-netsec/configs/voicemail.conf.sample
    branches/1.2-netsec/doc/README.cdr
    branches/1.2-netsec/pbx.c
    branches/1.2-netsec/translate.c

Propchange: branches/1.2-netsec/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan 12 21:52:45 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7924
+/branches/1.2:1-8045

Modified: branches/1.2-netsec/app.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/app.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/app.c (original)
+++ branches/1.2-netsec/app.c Thu Jan 12 21:52:45 2006
@@ -316,8 +316,12 @@
 				}
 			}
 		}
-		if (peer)
-			res = ast_autoservice_stop(peer);
+		if (peer) {
+			/* Stop autoservice on the peer channel, but don't overwrite any error condition 
+			   that has occurred previously while acting on the primary channel */	
+			if (ast_autoservice_stop(peer) && !res)
+				res = -1;
+		}
 	}
 	return res;
 }

Modified: branches/1.2-netsec/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/apps/app_dial.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/apps/app_dial.c (original)
+++ branches/1.2-netsec/apps/app_dial.c Thu Jan 12 21:52:45 2006
@@ -161,7 +161,7 @@
 "    S(x) - Hang up the call after 'x' seconds *after* the called party has\n"
 "           answered the call.\n"  	
 "    t    - Allow the called party to transfer the calling party by sending the\n"
-"           DTMF sequence defiend in features.conf.\n"
+"           DTMF sequence defined in features.conf.\n"
 "    T    - Allow the calling party to transfer the called party by sending the\n"
 "           DTMF sequence defined in features.conf.\n"
 "    w    - Allow the called party to enable recording of the call by sending\n"

Modified: branches/1.2-netsec/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/apps/app_voicemail.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/apps/app_voicemail.c (original)
+++ branches/1.2-netsec/apps/app_voicemail.c Thu Jan 12 21:52:45 2006
@@ -445,7 +445,7 @@
 		ast_copy_string(vmu->language, value, sizeof(vmu->language));
 	} else if (!strcasecmp(var, "tz")) {
 		ast_copy_string(vmu->zonetag, value, sizeof(vmu->zonetag));
-	} else if (!strcasecmp(var, "delete")) {
+	} else if (!strcasecmp(var, "delete") || !strcasecmp(var, "deletevoicemail")) {
 		ast_set2_flag(vmu, ast_true(value), VM_DELETE);	
 	} else if (!strcasecmp(var, "saycid")){
 		ast_set2_flag(vmu, ast_true(value), VM_SAYCID);	
@@ -2613,8 +2613,8 @@
 				}
 			}
 			if (ast_fileexists(fn, NULL, NULL)) {
+				STORE(dir, vmu->mailbox, vmu->context, msgnum);
 				notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
-				STORE(dir, vmu->mailbox, vmu->context, msgnum);
 				DISPOSE(dir, msgnum);
 			}
 			pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
@@ -4764,13 +4764,14 @@
 	while((cmd >= 0) && (cmd != 't')) {
 		if (cmd)
 			retries = 0;
+		RETRIEVE(prefile, -1);
 		if (ast_fileexists(prefile, NULL, NULL) > 0) {
 			switch (cmd) {
 			case '1':
 				cmd = play_record_review(chan,"vm-rec-temp",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain);
 				break;
 			case '2':
-				ast_filedelete(prefile, NULL);
+				DELETE(prefile, -1, prefile);
 				ast_play_and_wait(chan,"vm-tempremoved");
 				cmd = 't';	
 				break;
@@ -4794,6 +4795,7 @@
 			play_record_review(chan,"vm-rec-temp",prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain);
 			cmd = 't';	
 		}
+		DISPOSE(prefile, -1);
 	}
 	if (cmd == 't')
 		cmd = 0;
@@ -5645,10 +5647,10 @@
 static int vmauthenticate(struct ast_channel *chan, void *data)
 {
 	struct localuser *u;
-	char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION];
+	char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION] = "";
 	struct ast_vm_user vmus;
 	char *options = NULL;
-	int silent = 0;
+	int silent = 0, skipuser = 0;
 	int res = -1;
 
 	LOCAL_USER_ADD(u);
@@ -5665,6 +5667,9 @@
 			s = user;
 			user = strsep(&s, "@");
 			context = strsep(&s, "");
+			if (!ast_strlen_zero(user))
+				skipuser++;
+			ast_copy_string(mailbox, user, sizeof(mailbox));
 		}
 	}
 
@@ -5672,9 +5677,10 @@
 		silent = (strchr(options, 's')) != NULL;
 	}
 
-	if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, 0, 3, silent)) {
+	if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, skipuser, 3, silent)) {
 		pbx_builtin_setvar_helper(chan, "AUTH_MAILBOX", mailbox);
 		pbx_builtin_setvar_helper(chan, "AUTH_CONTEXT", vmus.context);
+		ast_play_and_wait(chan, "auth-thankyou");
 		res = 0;
 	}
 

Modified: branches/1.2-netsec/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/channel.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/channel.c (original)
+++ branches/1.2-netsec/channel.c Thu Jan 12 21:52:45 2006
@@ -576,7 +576,7 @@
 	tmp->fds[AST_MAX_FDS-1] = tmp->alertpipe[0];
 	/* And timing pipe */
 	tmp->fds[AST_MAX_FDS-2] = tmp->timingfd;
-	strcpy(tmp->name, "**Unkown**");
+	strcpy(tmp->name, "**Unknown**");
 	/* Initial state */
 	tmp->_state = AST_STATE_DOWN;
 	tmp->streamid = -1;

Modified: branches/1.2-netsec/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/channels/chan_agent.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/channels/chan_agent.c (original)
+++ branches/1.2-netsec/channels/chan_agent.c Thu Jan 12 21:52:45 2006
@@ -1695,6 +1695,7 @@
 	char agent_goodbye[AST_MAX_FILENAME_LEN];
 	int update_cdr = updatecdr;
 	char *filename = "agent-loginok";
+	char tmpchan[AST_MAX_BUF] = "";
 
 	LOCAL_USER_ADD(u);
 
@@ -1825,7 +1826,6 @@
 					snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
 
 					if (callbackmode) {
-						char tmpchan[AST_MAX_BUF] = "";
 						int pos = 0;
 						/* Retrieve login chan */
 						for (;;) {

Modified: branches/1.2-netsec/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/channels/chan_sip.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/channels/chan_sip.c (original)
+++ branches/1.2-netsec/channels/chan_sip.c Thu Jan 12 21:52:45 2006
@@ -13315,7 +13315,6 @@
 				ast_softhangup(p->owner, AST_SOFTHANGUP_APPUNLOAD);
 			p = p->next;
 		}
-		iflist = NULL;
 		ast_mutex_unlock(&iflock);
 	} else {
 		ast_log(LOG_WARNING, "Unable to lock the interface list\n");

Modified: branches/1.2-netsec/configs/voicemail.conf.sample
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/configs/voicemail.conf.sample?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/configs/voicemail.conf.sample (original)
+++ branches/1.2-netsec/configs/voicemail.conf.sample Thu Jan 12 21:52:45 2006
@@ -172,6 +172,7 @@
 			;     This does NOT affect option 3,3 from the advanced options menu
 ; delete=yes		; After notification, the voicemail is deleted from the server. [per-mailbox only]
 			;     This is intended for use with users who wish to receive their voicemail ONLY by email.
+			;     Note:  deletevoicemail is provided as an equivalent option for Realtime configuration.
 ; nextaftercmd=yes	; Skips to the next message after hitting 7 or 9 to delete/save current message.
 			;     [global option only at this time] 
 ; forcename=yes		; Forces a new user to record their name.  A new user is

Modified: branches/1.2-netsec/doc/README.cdr
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/doc/README.cdr?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/doc/README.cdr (original)
+++ branches/1.2-netsec/doc/README.cdr Thu Jan 12 21:52:45 2006
@@ -11,6 +11,8 @@
      for an updated list of supported databases, from MySQL to MsSQL
      and text files.
    * cdr_tds supports FreeTDS databases (Among them MS SQL)
+	NOTE: Please read README.tds for information on possible
+	problems with the FreeTDS driver
    * cdr_sqlite supports SQlite
    * cdr_pgsql supports PostgreSQL
 
@@ -39,28 +41,28 @@
 Fields of the CDR in Asterisk
 -----------------------------
 
-   1. accountcode: What account number to use, (string, 20 characters)
-   2. src: Caller*ID number (string, 80 characters)
-   3. dst: Destination extension (string, 80 characters)
-   4. dcontext: Destination context (string, 80 characters)
-   5. clid: Caller*ID with text (80 characters)
-   6. channel: Channel used (80 characters)
-   7. dstchannel: Destination channel if appropriate (80 characters)
-   8. lastapp: Last application if appropriate (80 characters)
-   9. lastdata: Last application data (arguments) (80 characters)
-  10. start: Start of call (date/time)
-  11. answer: Answer of call (date/time)
-  12. end: End of call (date/time)
-  13. duration: Total time in system, in seconds (integer), from dial to hangup
-  14. billsec: Total time call is up, in seconds (integer), from answer to hangup
-  15. disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY
-  16. amaflags: What flags to use: DOCUMENTATION, BILL, IGNORE etc, 
-      specified on a per channel basis like accountcode.
-  17. user field: A user-defined field, maximum 255 characters 
+   1. accountcode:	What account number to use, (string, 20 characters)
+   2. src:		Caller*ID number (string, 80 characters)
+   3. dst:		Destination extension (string, 80 characters)
+   4. dcontext:		Destination context (string, 80 characters)
+   5. clid:		Caller*ID with text (80 characters)
+   6. channel:		Channel used (80 characters)
+   7. dstchannel:	Destination channel if appropriate (80 characters)
+   8. lastapp:		Last application if appropriate (80 characters)
+   9. lastdata:		Last application data (arguments) (80 characters)
+  10. start:		Start of call (date/time)
+  11. answer:		Answer of call (date/time)
+  12. end:		End of call (date/time)
+  13. duration:		Total time in system, in seconds (integer), from dial to hangup
+  14. billsec:		Total time call is up, in seconds (integer), from answer to hangup
+  15. disposition:	What happened to the call: ANSWERED, NO ANSWER, BUSY
+  16. amaflags:		What flags to use: DOCUMENTATION, BILL, IGNORE etc, 
+      			specified on a per channel basis like accountcode.
+  17. user field:	A user-defined field, maximum 255 characters 
 
 In some cases, uniqueid is appended:
 
-    * uniqueid: Unique Channel Identifier (32 characters) 
+    * uniqueid:		Unique Channel Identifier (32 characters) 
       This needs to be enabled in the source code at compile time
 
 

Modified: branches/1.2-netsec/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/pbx.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/pbx.c (original)
+++ branches/1.2-netsec/pbx.c Thu Jan 12 21:52:45 2006
@@ -2029,7 +2029,7 @@
 	    		cblist = cblist->next;
 		}
 
-		ast_mutex_lock(&hintlock);
+		ast_mutex_unlock(&hintlock);
 		return -1;
 	}
 

Modified: branches/1.2-netsec/translate.c
URL: http://svn.digium.com/view/asterisk/branches/1.2-netsec/translate.c?rev=8046&r1=8045&r2=8046&view=diff
==============================================================================
--- branches/1.2-netsec/translate.c (original)
+++ branches/1.2-netsec/translate.c Thu Jan 12 21:52:45 2006
@@ -331,6 +331,7 @@
 	if (argc > 4) 
 		return RESULT_SHOWUSAGE;
 
+	ast_mutex_lock(&list_lock);
 	if (argv[2] && !strcasecmp(argv[2],"recalc")) {
 		z = argv[3] ? atoi(argv[3]) : 1;
 
@@ -349,7 +350,6 @@
 
 	ast_cli(fd, "         Translation times between formats (in milliseconds)\n");
 	ast_cli(fd, "          Source Format (Rows) Destination Format(Columns)\n\n");
-	ast_mutex_lock(&list_lock);
 	for (x = -1; x < SHOW_TRANS; x++) {
 		/* next 2 lines run faster than using strcpy() */
 		line[0] = ' ';



More information about the asterisk-commits mailing list