Update to new vendor version and correct context handling in voicemail.

Thu, 04 Oct 2012 20:24:28 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 04 Oct 2012 20:24:28 +0200
changeset 712
bf4f2bc90467
parent 711
e5faec28ec63
child 713
940f3eb5d5e6

Update to new vendor version and correct context handling in voicemail.
Context correction is needed to enable leaving a voicemail at the
VoicemailMain prompt (press 5) when not specifying a 'default' context
in the voicemail configuration.

asterisk/asterisk.patch file | annotate | diff | comparison | revisions
asterisk/asterisk.spec file | annotate | diff | comparison | revisions
     1.1 --- a/asterisk/asterisk.patch	Thu Oct 04 20:08:55 2012 +0200
     1.2 +++ b/asterisk/asterisk.patch	Thu Oct 04 20:24:28 2012 +0200
     1.3 @@ -299,7 +299,38 @@
     1.4   	/* Create the folder if it don't exist */
     1.5   	imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */
     1.6   	ast_debug(5, "Checking if folder exists: %s\n", mailbox);
     1.7 -@@ -10517,6 +10533,10 @@
     1.8 +@@ -7290,7 +7306,11 @@
     1.9 + 				int oldmsgs;
    1.10 + 				int newmsgs;
    1.11 + 				int capacity;
    1.12 +-				if (inboxcount(s, &newmsgs, &oldmsgs)) {
    1.13 ++				char *msgcnt = 0;
    1.14 ++				msgcnt = ast_strdupa(s);  /* inboxcount needs username copy */
    1.15 ++				strcat(msgcnt, "@");      /* because internally it inspects */
    1.16 ++				strcat(msgcnt, context);  /* the context which is not in 's' */
    1.17 ++				if (inboxcount(msgcnt, &newmsgs, &oldmsgs)) {
    1.18 + 					ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", s);
    1.19 + 					/* Shouldn't happen, but allow trying another extension if it does */
    1.20 + 					res = ast_play_and_wait(chan, "pbx-invalid");
    1.21 +@@ -10281,7 +10301,7 @@
    1.22 + 
    1.23 + 				case '5': /* Leave VoiceMail */
    1.24 + 					if (ast_test_flag(vmu, VM_SVMAIL)) {
    1.25 +-						cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain, 0);
    1.26 ++						cmd = forward_message(chan, vmu->context, &vms, vmu, vmfmts, 1, record_gain, 0);
    1.27 + 						if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) {
    1.28 + 							res = cmd;
    1.29 + 							goto out;
    1.30 +@@ -10464,7 +10484,7 @@
    1.31 + 	
    1.32 + 		case '8': /* Forward the current message */
    1.33 + 			if (vms.lastmsg > -1) {
    1.34 +-				cmd = forward_message(chan, context, &vms, vmu, vmfmts, 0, record_gain, in_urgent);
    1.35 ++				cmd = forward_message(chan, vmu->context, &vms, vmu, vmfmts, 0, record_gain, in_urgent);
    1.36 + 				if (cmd == ERROR_LOCK_PATH) {
    1.37 + 					res = cmd;
    1.38 + 					goto out;
    1.39 +@@ -10517,6 +10537,10 @@
    1.40   #ifndef IMAP_STORAGE
    1.41   				} else if (!cmd) {
    1.42   					vms.deleted[vms.curmsg] = 1;
    1.43 @@ -310,7 +341,7 @@
    1.44   #endif
    1.45   				} else {
    1.46   					vms.deleted[vms.curmsg] = 0;
    1.47 -@@ -12046,6 +12066,15 @@
    1.48 +@@ -12046,6 +12070,15 @@
    1.49   		} else {
    1.50   			ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder));
    1.51   		}
    1.52 @@ -754,7 +785,7 @@
    1.53  diff -Nau channels/chan_sip.c.orig channels/chan_sip.c
    1.54  --- channels/chan_sip.c.orig	2012-02-28 18:53:34.000000000 +0100
    1.55  +++ channels/chan_sip.c	2012-03-18 17:47:07.898462166 +0100
    1.56 -@@ -12104,7 +12104,16 @@
    1.57 +@@ -12150,7 +12150,16 @@
    1.58    	} else {
    1.59    		if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
    1.60    			/* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
    1.61 @@ -891,7 +922,7 @@
    1.62  diff -Nau main/features.c.orig main/features.c
    1.63  --- main/features.c.orig	2012-01-23 21:30:21.000000000 +0100
    1.64  +++ main/features.c	2012-03-18 17:47:07.898462166 +0100
    1.65 -@@ -2127,6 +2127,10 @@
    1.66 +@@ -2158,6 +2158,10 @@
    1.67   		snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
    1.68   	}
    1.69   
    1.70 @@ -902,7 +933,7 @@
    1.71   	for(x = 0; x < strlen(args); x++) {
    1.72   		if (args[x] == '/')
    1.73   			args[x] = '-';
    1.74 -@@ -2239,6 +2243,10 @@
    1.75 +@@ -2270,6 +2274,10 @@
    1.76   		snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
    1.77   	}
    1.78   
     2.1 --- a/asterisk/asterisk.spec	Thu Oct 04 20:08:55 2012 +0200
     2.2 +++ b/asterisk/asterisk.spec	Thu Oct 04 20:24:28 2012 +0200
     2.3 @@ -22,8 +22,8 @@
     2.4  ##
     2.5  
     2.6  #   package version
     2.7 -%define       V_opkg                     1.8.15.1
     2.8 -%define       V_asterisk                 1.8.15.1
     2.9 +%define       V_opkg                     1.8.16.0
    2.10 +%define       V_asterisk                 1.8.16.0
    2.11  %define       V_asterisk_fax_subdir      1.8.4
    2.12  %define       V_asterisk_fax_digium      1.8.4_1.3.1
    2.13  %define       V_asterisk_sounds_core     1.4.22

mercurial