[asterisk-commits] dvossel: branch dvossel/iax2immediate_trunk r173769 - in /team/dvossel/iax2im...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 5 16:36:35 CST 2009


Author: dvossel
Date: Thu Feb  5 16:36:35 2009
New Revision: 173769

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173769
Log:
forgot to set auto merge tools so missed a update, adding it by hand

Modified:
    team/dvossel/iax2immediate_trunk/   (props changed)
    team/dvossel/iax2immediate_trunk/apps/app_queue.c
    team/dvossel/iax2immediate_trunk/apps/app_voicemail.c

Propchange: team/dvossel/iax2immediate_trunk/
            ('automerge' removed)

Propchange: team/dvossel/iax2immediate_trunk/
            ('automerge-email' removed)

Propchange: team/dvossel/iax2immediate_trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/dvossel/iax2immediate_trunk/
            ('svnmerge-integrated' removed)

Modified: team/dvossel/iax2immediate_trunk/apps/app_queue.c
URL: http://svn.digium.com/svn-view/asterisk/team/dvossel/iax2immediate_trunk/apps/app_queue.c?view=diff&rev=173769&r1=173768&r2=173769
==============================================================================
--- team/dvossel/iax2immediate_trunk/apps/app_queue.c (original)
+++ team/dvossel/iax2immediate_trunk/apps/app_queue.c Thu Feb  5 16:36:35 2009
@@ -2664,7 +2664,7 @@
 }
 
 /*! \brief RNA == Ring No Answer. Common code that is executed when we try a queue member and they don't answer. */
-static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername)
+static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername, int pause)
 {
 	ast_verb(3, "Nobody picked up in %d ms\n", rnatime);
 	if (qe->parent->eventwhencalled) {
@@ -2687,7 +2687,7 @@
 						qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 	}
 	ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
-	if (qe->parent->autopause) {
+	if (qe->parent->autopause && pause) {
 		if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {
 			ast_verb(3, "Auto-Pausing Queue Member %s in queue %s since they failed to answer.\n", interface, qe->parent->name);
 		} else {
@@ -2866,7 +2866,7 @@
 							do_hang(o);
 							endtime = (long) time(NULL);
 							endtime -= starttime;
-							rna(endtime*1000, qe, on, membername);
+							rna(endtime * 1000, qe, on, membername, 0);
 							if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
 								if (qe->parent->timeoutrestart)
 									*to = orig;
@@ -2880,7 +2880,7 @@
 								ast_cdr_busy(in->cdr);
 							endtime = (long) time(NULL);
 							endtime -= starttime;
-							rna(endtime*1000, qe, on, membername);
+							rna(endtime * 1000, qe, on, membername, 0);
 							do_hang(o);
 							if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
 								if (qe->parent->timeoutrestart)
@@ -2902,7 +2902,7 @@
 					ast_frfree(f);
 				} else {
 					endtime = (long) time(NULL) - starttime;
-					rna(endtime * 1000, qe, on, membername);
+					rna(endtime * 1000, qe, on, membername, 1);
 					do_hang(o);
 					if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
 						if (qe->parent->timeoutrestart)
@@ -2942,7 +2942,7 @@
 		}
 		if (!*to) {
 			for (o = start; o; o = o->call_next)
-				rna(orig, qe, o->interface, o->member->membername);
+				rna(orig, qe, o->interface, o->member->membername, 1);
 		}
 	}
 

Modified: team/dvossel/iax2immediate_trunk/apps/app_voicemail.c
URL: http://svn.digium.com/svn-view/asterisk/team/dvossel/iax2immediate_trunk/apps/app_voicemail.c?view=diff&rev=173769&r1=173768&r2=173769
==============================================================================
--- team/dvossel/iax2immediate_trunk/apps/app_voicemail.c (original)
+++ team/dvossel/iax2immediate_trunk/apps/app_voicemail.c Thu Feb  5 16:36:35 2009
@@ -574,6 +574,7 @@
 #ifdef IMAP_STORAGE
 	char imapuser[80];               /*!< IMAP server login */
 	char imappassword[80];           /*!< IMAP server password if authpassword not defined */
+	char imapvmshareid[80];          /*!< Shared mailbox ID to use rather than the dialed one */
 #endif
 	double volgain;                  /*!< Volume gain for voicemails sent via email */
 	AST_LIST_ENTRY(ast_vm_user) list;
@@ -882,6 +883,8 @@
 		ast_copy_string(vmu->imapuser, value, sizeof(vmu->imapuser));
 	} else if (!strcasecmp(var, "imappassword") || !strcasecmp(var, "imapsecret")) {
 		ast_copy_string(vmu->imappassword, value, sizeof(vmu->imappassword));
+	} else if (!strcasecmp(var, "imapvmshareid")) {
+		ast_copy_string(vmu->imapvmshareid, value, sizeof(vmu->imapvmshareid));
 #endif
 	} else if (!strcasecmp(var, "delete") || !strcasecmp(var, "deletevoicemail")) {
 		ast_set2_flag(vmu, ast_true(value), VM_DELETE);	
@@ -1114,6 +1117,8 @@
 			ast_copy_string(retval->imapuser, var->value, sizeof(retval->imapuser));
 		} else if (!strcasecmp(var->name, "imappassword") || !strcasecmp(var->name, "imapsecret")) {
 			ast_copy_string(retval->imappassword, var->value, sizeof(retval->imappassword));
+		} else if (!strcasecmp(tmp->name, "imapvmshareid")) {
+			ast_copy_string(retval->imapvmshareid, tmp->value, sizeof(retval->imapvmshareid));
 #endif
 		} else
 			apply_option(retval, var->name, var->value);
@@ -1775,7 +1780,7 @@
 	if (ret == 0) {
 		ast_mutex_lock(&vms_p->lock);
 		pgm = mail_newsearchpgm ();
-		hdr = mail_newsearchheader ("X-Asterisk-VM-Extension", (char *)mailbox);
+		hdr = mail_newsearchheader ("X-Asterisk-VM-Extension", (char *)(!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid : mailbox));
 		pgm->header = hdr;
 		if (fold != 1) {
 			pgm->unseen = 1;
@@ -2222,7 +2227,7 @@
 	pgm = mail_newsearchpgm();
 
 	/* Check IMAP folder for Asterisk messages only... */
-	hdr = mail_newsearchheader("X-Asterisk-VM-Extension", vmu->mailbox);
+	hdr = mail_newsearchheader("X-Asterisk-VM-Extension", (!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid : vmu->mailbox));
 	pgm->header = hdr;
 	pgm->deleted = 0;
 	pgm->undeleted = 1;
@@ -4104,8 +4109,12 @@
 		/* fprintf(p, "X-Asterisk-VM-Orig-Mailbox: %s" ENDL, ext); */
 		fprintf(p, "X-Asterisk-VM-Server-Name: %s" ENDL, fromstring);
 		fprintf(p, "X-Asterisk-VM-Context: %s" ENDL, context);
+#ifdef IMAP_STORAGE
+		fprintf(p, "X-Asterisk-VM-Extension: %s" ENDL, (!ast_strlen_zero(vmu->imapvmshareid) ? vmu->imapvmshareid : mailbox));
+#else
 		fprintf(p, "X-Asterisk-VM-Extension: %s" ENDL, mailbox);
-                /* flag added for Urgent */
+#endif
+		/* flag added for Urgent */
 		fprintf(p, "X-Asterisk-VM-Flag: %s" ENDL, flag);
 		fprintf(p, "X-Asterisk-VM-Priority: %d" ENDL, chan->priority);
 		fprintf(p, "X-Asterisk-VM-Caller-channel: %s" ENDL, chan->name);




More information about the asterisk-commits mailing list