diff -r e5faec28ec63 -r bf4f2bc90467 asterisk/asterisk.patch --- a/asterisk/asterisk.patch Thu Oct 04 20:08:55 2012 +0200 +++ b/asterisk/asterisk.patch Thu Oct 04 20:24:28 2012 +0200 @@ -299,7 +299,38 @@ /* Create the folder if it don't exist */ imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ ast_debug(5, "Checking if folder exists: %s\n", mailbox); -@@ -10517,6 +10533,10 @@ +@@ -7290,7 +7306,11 @@ + int oldmsgs; + int newmsgs; + int capacity; +- if (inboxcount(s, &newmsgs, &oldmsgs)) { ++ char *msgcnt = 0; ++ msgcnt = ast_strdupa(s); /* inboxcount needs username copy */ ++ strcat(msgcnt, "@"); /* because internally it inspects */ ++ strcat(msgcnt, context); /* the context which is not in 's' */ ++ if (inboxcount(msgcnt, &newmsgs, &oldmsgs)) { + ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", s); + /* Shouldn't happen, but allow trying another extension if it does */ + res = ast_play_and_wait(chan, "pbx-invalid"); +@@ -10281,7 +10301,7 @@ + + case '5': /* Leave VoiceMail */ + if (ast_test_flag(vmu, VM_SVMAIL)) { +- cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain, 0); ++ cmd = forward_message(chan, vmu->context, &vms, vmu, vmfmts, 1, record_gain, 0); + if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) { + res = cmd; + goto out; +@@ -10464,7 +10484,7 @@ + + case '8': /* Forward the current message */ + if (vms.lastmsg > -1) { +- cmd = forward_message(chan, context, &vms, vmu, vmfmts, 0, record_gain, in_urgent); ++ cmd = forward_message(chan, vmu->context, &vms, vmu, vmfmts, 0, record_gain, in_urgent); + if (cmd == ERROR_LOCK_PATH) { + res = cmd; + goto out; +@@ -10517,6 +10537,10 @@ #ifndef IMAP_STORAGE } else if (!cmd) { vms.deleted[vms.curmsg] = 1; @@ -310,7 +341,7 @@ #endif } else { vms.deleted[vms.curmsg] = 0; -@@ -12046,6 +12066,15 @@ +@@ -12046,6 +12070,15 @@ } else { ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); } @@ -754,7 +785,7 @@ diff -Nau channels/chan_sip.c.orig channels/chan_sip.c --- channels/chan_sip.c.orig 2012-02-28 18:53:34.000000000 +0100 +++ channels/chan_sip.c 2012-03-18 17:47:07.898462166 +0100 -@@ -12104,7 +12104,16 @@ +@@ -12150,7 +12150,16 @@ } else { if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ @@ -891,7 +922,7 @@ diff -Nau main/features.c.orig main/features.c --- main/features.c.orig 2012-01-23 21:30:21.000000000 +0100 +++ main/features.c 2012-03-18 17:47:07.898462166 +0100 -@@ -2127,6 +2127,10 @@ +@@ -2158,6 +2158,10 @@ snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); } @@ -902,7 +933,7 @@ for(x = 0; x < strlen(args); x++) { if (args[x] == '/') args[x] = '-'; -@@ -2239,6 +2243,10 @@ +@@ -2270,6 +2274,10 @@ snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); }