297 } |
297 } |
298 + |
298 + |
299 /* Create the folder if it don't exist */ |
299 /* Create the folder if it don't exist */ |
300 imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ |
300 imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ |
301 ast_debug(5, "Checking if folder exists: %s\n", mailbox); |
301 ast_debug(5, "Checking if folder exists: %s\n", mailbox); |
302 @@ -10517,6 +10533,10 @@ |
302 @@ -7290,7 +7306,11 @@ |
|
303 int oldmsgs; |
|
304 int newmsgs; |
|
305 int capacity; |
|
306 - if (inboxcount(s, &newmsgs, &oldmsgs)) { |
|
307 + char *msgcnt = 0; |
|
308 + msgcnt = ast_strdupa(s); /* inboxcount needs username copy */ |
|
309 + strcat(msgcnt, "@"); /* because internally it inspects */ |
|
310 + strcat(msgcnt, context); /* the context which is not in 's' */ |
|
311 + if (inboxcount(msgcnt, &newmsgs, &oldmsgs)) { |
|
312 ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", s); |
|
313 /* Shouldn't happen, but allow trying another extension if it does */ |
|
314 res = ast_play_and_wait(chan, "pbx-invalid"); |
|
315 @@ -10281,7 +10301,7 @@ |
|
316 |
|
317 case '5': /* Leave VoiceMail */ |
|
318 if (ast_test_flag(vmu, VM_SVMAIL)) { |
|
319 - cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain, 0); |
|
320 + cmd = forward_message(chan, vmu->context, &vms, vmu, vmfmts, 1, record_gain, 0); |
|
321 if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) { |
|
322 res = cmd; |
|
323 goto out; |
|
324 @@ -10464,7 +10484,7 @@ |
|
325 |
|
326 case '8': /* Forward the current message */ |
|
327 if (vms.lastmsg > -1) { |
|
328 - cmd = forward_message(chan, context, &vms, vmu, vmfmts, 0, record_gain, in_urgent); |
|
329 + cmd = forward_message(chan, vmu->context, &vms, vmu, vmfmts, 0, record_gain, in_urgent); |
|
330 if (cmd == ERROR_LOCK_PATH) { |
|
331 res = cmd; |
|
332 goto out; |
|
333 @@ -10517,6 +10537,10 @@ |
303 #ifndef IMAP_STORAGE |
334 #ifndef IMAP_STORAGE |
304 } else if (!cmd) { |
335 } else if (!cmd) { |
305 vms.deleted[vms.curmsg] = 1; |
336 vms.deleted[vms.curmsg] = 1; |
306 +#else |
337 +#else |
307 + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) { |
338 + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) { |
308 + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */ |
339 + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */ |
309 + deleted = 1; /* successful copy op */ |
340 + deleted = 1; /* successful copy op */ |
310 #endif |
341 #endif |
311 } else { |
342 } else { |
312 vms.deleted[vms.curmsg] = 0; |
343 vms.deleted[vms.curmsg] = 0; |
313 @@ -12046,6 +12066,15 @@ |
344 @@ -12046,6 +12070,15 @@ |
314 } else { |
345 } else { |
315 ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); |
346 ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); |
316 } |
347 } |
317 + /* IMAP saved (sub)folder location policy */ |
348 + /* IMAP saved (sub)folder location policy */ |
318 + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) { |
349 + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) { |
752 endif |
783 endif |
753 Index: channels/chan_sip.c |
784 Index: channels/chan_sip.c |
754 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c |
785 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c |
755 --- channels/chan_sip.c.orig 2012-02-28 18:53:34.000000000 +0100 |
786 --- channels/chan_sip.c.orig 2012-02-28 18:53:34.000000000 +0100 |
756 +++ channels/chan_sip.c 2012-03-18 17:47:07.898462166 +0100 |
787 +++ channels/chan_sip.c 2012-03-18 17:47:07.898462166 +0100 |
757 @@ -12104,7 +12104,16 @@ |
788 @@ -12150,7 +12150,16 @@ |
758 } else { |
789 } else { |
759 if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { |
790 if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { |
760 /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ |
791 /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ |
761 - snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag); |
792 - snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag); |
762 + if (strncasecmp(p->uri, "sip:", strlen("sip:"))) |
793 + if (strncasecmp(p->uri, "sip:", strlen("sip:"))) |
889 /* |
920 /* |
890 Index: main/features.c |
921 Index: main/features.c |
891 diff -Nau main/features.c.orig main/features.c |
922 diff -Nau main/features.c.orig main/features.c |
892 --- main/features.c.orig 2012-01-23 21:30:21.000000000 +0100 |
923 --- main/features.c.orig 2012-01-23 21:30:21.000000000 +0100 |
893 +++ main/features.c 2012-03-18 17:47:07.898462166 +0100 |
924 +++ main/features.c 2012-03-18 17:47:07.898462166 +0100 |
894 @@ -2127,6 +2127,10 @@ |
925 @@ -2158,6 +2158,10 @@ |
895 snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); |
926 snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); |
896 } |
927 } |
897 |
928 |
898 + for(x = 0; x < strlen(touch_filename); x++) { |
929 + for(x = 0; x < strlen(touch_filename); x++) { |
899 + if (args[x] == '/') |
930 + if (args[x] == '/') |
900 + args[x] = '-'; |
931 + args[x] = '-'; |
901 + } |
932 + } |
902 for(x = 0; x < strlen(args); x++) { |
933 for(x = 0; x < strlen(args); x++) { |
903 if (args[x] == '/') |
934 if (args[x] == '/') |
904 args[x] = '-'; |
935 args[x] = '-'; |
905 @@ -2239,6 +2243,10 @@ |
936 @@ -2270,6 +2274,10 @@ |
906 snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); |
937 snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); |
907 } |
938 } |
908 |
939 |
909 + for( x = 0; x < strlen(touch_filename); x++) { |
940 + for( x = 0; x < strlen(touch_filename); x++) { |
910 + if (args[x] == '/') |
941 + if (args[x] == '/') |