[asterisk-commits] branch crichter/0.2.1 - r8052 in /team/crichter/0.2.1: ./ apps/ channels/ con...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jan 13 04:53:22 CST 2006


Author: crichter
Date: Fri Jan 13 04:53:14 2006
New Revision: 8052

URL: http://svn.digium.com/view/asterisk?rev=8052&view=rev
Log:
Merged revisions 7955,7957,7960,7963,7965,7970,7972,7976,7986,7999,8047 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7955 | tilghman | 2006-01-11 02:30:10 +0100 (Mi, 11 Jan 2006) | 2 lines

Bug 6192 - behave correctly when mailbox is specified as argument

........
r7957 | russell | 2006-01-11 04:12:44 +0100 (Mi, 11 Jan 2006) | 2 lines

fix a little typo

........
r7960 | russell | 2006-01-11 05:19:21 +0100 (Mi, 11 Jan 2006) | 2 lines

fix locking error - lock instead of unlock

........
r7963 | mogorman | 2006-01-11 05:38:07 +0100 (Mi, 11 Jan 2006) | 2 lines

Minor typo refrenced in 6191

........
r7965 | russell | 2006-01-11 05:53:24 +0100 (Mi, 11 Jan 2006) | 2 lines

lock list of translators *before* recalculating the translation matrix

........
r7970 | russell | 2006-01-11 06:26:21 +0100 (Mi, 11 Jan 2006) | 3 lines

don't override an error condition that occurred when acting on the primary channel
when stopping the autoservice on the peer channel.  (from issue #6087)

........
r7972 | russell | 2006-01-11 06:46:39 +0100 (Mi, 11 Jan 2006) | 2 lines

fix mem leak on module unload (issue #6190)

........
r7976 | russell | 2006-01-11 08:18:16 +0100 (Mi, 11 Jan 2006) | 2 lines

fix temp greetings with ODBC storage (issue #6078)

........
r7986 | russell | 2006-01-11 20:08:53 +0100 (Mi, 11 Jan 2006) | 2 lines

move variable to correct scope (issue #6197)

........
r7999 | tilghman | 2006-01-12 07:14:22 +0100 (Do, 12 Jan 2006) | 2 lines

Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime

........
r8047 | russell | 2006-01-13 07:07:39 +0100 (Fr, 13 Jan 2006) | 2 lines

fix spelling errors (issue #6227)

........

Modified:
    team/crichter/0.2.1/   (props changed)
    team/crichter/0.2.1/app.c
    team/crichter/0.2.1/apps/app_dial.c
    team/crichter/0.2.1/apps/app_voicemail.c
    team/crichter/0.2.1/channel.c
    team/crichter/0.2.1/channels/chan_agent.c
    team/crichter/0.2.1/channels/chan_sip.c
    team/crichter/0.2.1/configs/voicemail.conf.sample
    team/crichter/0.2.1/pbx.c
    team/crichter/0.2.1/translate.c

Propchange: team/crichter/0.2.1/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 13 04:53:14 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7950
+/branches/1.2:1-8051

Modified: team/crichter/0.2.1/app.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/app.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/app.c (original)
+++ team/crichter/0.2.1/app.c Fri Jan 13 04:53:14 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: team/crichter/0.2.1/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_dial.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_dial.c (original)
+++ team/crichter/0.2.1/apps/app_dial.c Fri Jan 13 04:53:14 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: team/crichter/0.2.1/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_voicemail.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_voicemail.c (original)
+++ team/crichter/0.2.1/apps/app_voicemail.c Fri Jan 13 04:53:14 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: team/crichter/0.2.1/channel.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/channel.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/channel.c (original)
+++ team/crichter/0.2.1/channel.c Fri Jan 13 04:53:14 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: team/crichter/0.2.1/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/channels/chan_agent.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/channels/chan_agent.c (original)
+++ team/crichter/0.2.1/channels/chan_agent.c Fri Jan 13 04:53:14 2006
@@ -102,7 +102,7 @@
 static const char descrip3[] =
 "  AgentMonitorOutgoing([options]):\n"
 "Tries to figure out the id of the agent who is placing outgoing call based on\n"
-"comparision of the callerid of the current interface and the global variable \n"
+"comparison of the callerid of the current interface and the global variable \n"
 "placed by the AgentCallbackLogin application. That's why it should be used only\n"
 "with the AgentCallbackLogin app. Uses the monitoring functions in chan_agent \n"
 "instead of Monitor application. That have to be configured in the agents.conf file.\n"
@@ -144,7 +144,7 @@
 
 /** Persistent Agents astdb family */
 static const char pa_family[] = "/Agents";
-/** The maximum lengh of each persistent member agent database entry */
+/** The maximum length of each persistent member agent database entry */
 #define PA_MAX_LEN 2048
 /** queues.conf [general] option */
 static int persistent_agents = 0;
@@ -1051,7 +1051,7 @@
 	urlprefix[0] = '\0';
 	savecallsin[0] = '\0';
 
-	/* Read in [general] section for persistance */
+	/* Read in [general] section for persistence */
 	if ((general_val = ast_variable_retrieve(cfg, "general", "persistentagents")))
 		persistent_agents = ast_true(general_val);
 
@@ -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);
 
@@ -1790,7 +1791,7 @@
 				gettimeofday(&p->lastdisc, NULL);
 				p->lastdisc.tv_sec++;
 
-				/* Set Channel Specific Agent Overides */
+				/* Set Channel Specific Agent Overrides */
 				if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) {
 					if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always"))
 						p->ackcall = 2;
@@ -1818,14 +1819,13 @@
 					if (option_verbose > 2)
 						ast_verbose(VERBOSE_PREFIX_3 "Saw variable AGENTWRAPUPTIME=%s, setting wrapuptime to: %d for Agent '%s'.\n",tmpoptions,p->wrapuptime,p->agent);
 				}
-				/* End Channel Specific Agent Overides */
+				/* End Channel Specific Agent Overrides */
 				if (!p->chan) {
 					char last_loginchan[80] = "";
 					long logintime;
 					snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
 
 					if (callbackmode) {
-						char tmpchan[AST_MAX_BUF] = "";
 						int pos = 0;
 						/* Retrieve login chan */
 						for (;;) {
@@ -2360,7 +2360,7 @@
 	}
 	ast_mutex_unlock(&agentlock);
 	if (db_tree) {
-		ast_log(LOG_NOTICE, "Agents sucessfully reloaded from database.\n");
+		ast_log(LOG_NOTICE, "Agents successfully reloaded from database.\n");
 		ast_db_freetree(db_tree);
 	}
 }
@@ -2417,7 +2417,7 @@
 
 /**
  * Initialize the Agents module.
- * This funcion is being called by Asterisk when loading the module. Among other thing it registers applications, cli commands and reads the cofiguration file.
+ * This function is being called by Asterisk when loading the module. Among other thing it registers applications, cli commands and reads the cofiguration file.
  *
  * @returns int Always 0.
  */

Modified: team/crichter/0.2.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/channels/chan_sip.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/channels/chan_sip.c (original)
+++ team/crichter/0.2.1/channels/chan_sip.c Fri Jan 13 04:53:14 2006
@@ -13153,7 +13153,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: team/crichter/0.2.1/configs/voicemail.conf.sample
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/configs/voicemail.conf.sample?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/configs/voicemail.conf.sample (original)
+++ team/crichter/0.2.1/configs/voicemail.conf.sample Fri Jan 13 04:53:14 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: team/crichter/0.2.1/pbx.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/pbx.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/pbx.c (original)
+++ team/crichter/0.2.1/pbx.c Fri Jan 13 04:53:14 2006
@@ -2029,7 +2029,7 @@
 	    		cblist = cblist->next;
 		}
 
-		ast_mutex_lock(&hintlock);
+		ast_mutex_unlock(&hintlock);
 		return -1;
 	}
 

Modified: team/crichter/0.2.1/translate.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/translate.c?rev=8052&r1=8051&r2=8052&view=diff
==============================================================================
--- team/crichter/0.2.1/translate.c (original)
+++ team/crichter/0.2.1/translate.c Fri Jan 13 04:53:14 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