MT#61440 sipwise_vm_find_user_by_alias: don't crash if odbc fails

> #1  0x00007fb757f99af9 in find_user_realtime_by_alias (ivm=ivm@entry=0x7fb794f21a20, context=context@entry=0x7fb757fb26c8 "default", alias=alias@entry=0x5585a7c58e18 "11d949a1-051c-40cc-b44e-18ce10976318")
>     at apps/app_voicemail.c:4254
> 4254    apps/app_voicemail.c: No such file or directory.
> (gdb) p obj
> $1 = (struct odbc_obj *) 0x0

Change-Id: I8fb13d5e53d534bf2324c3324ebc99667b8c06c8
mr13.1.1
Victor Seva 6 months ago
parent 940a1ffde3
commit d21e211457

@ -7,7 +7,7 @@ Subject: sipwise_vm_add_actions_wmi
1 file changed, 277 insertions(+), 19 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c3cdb58..77575c5 100644
index c98cefa..afee86d 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1043,6 +1043,52 @@ static int adsiver = 1;
@ -74,7 +74,7 @@ index c3cdb58..77575c5 100644
/*!
@@ -4447,9 +4494,11 @@ static void copy_file(char *sdir, int smsg, char *ddir, int dmsg, char *dmailbox
@@ -4451,9 +4498,11 @@ static void copy_file(char *sdir, int smsg, char *ddir, int dmsg, char *dmailbox
char msgnums[20];
char msgnumd[20];
char msg_id[MSG_ID_LEN];
@ -88,7 +88,7 @@ index c3cdb58..77575c5 100644
generate_msg_id(msg_id);
delete_file(ddir, dmsg);
@@ -4461,7 +4510,10 @@ static void copy_file(char *sdir, int smsg, char *ddir, int dmsg, char *dmailbox
@@ -4465,7 +4514,10 @@ static void copy_file(char *sdir, int smsg, char *ddir, int dmsg, char *dmailbox
snprintf(msgnums, sizeof(msgnums), "%d", smsg);
snprintf(msgnumd, sizeof(msgnumd), "%d", dmsg);
@ -100,7 +100,7 @@ index c3cdb58..77575c5 100644
stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
if (!stmt)
ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s] (You probably don't have MySQL 4.1 or later installed)\n\n", sql);
@@ -6281,8 +6333,9 @@ static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
@@ -6285,8 +6337,9 @@ static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
return res;
}
@ -111,7 +111,7 @@ index c3cdb58..77575c5 100644
char arguments[2048];
char date[256];
struct ast_tm tm;
@@ -6325,14 +6378,39 @@ static void run_externnotify(const char *context, const char *extension, const c
@@ -6329,14 +6382,39 @@ static void run_externnotify(const char *context, const char *extension, const c
} else if (ast_strlen_zero(number) || !strcmp(extension, number)) {
ast_log(AST_LOG_WARNING, "Missing user number to run externnotify on context '%s'\n", ext_context);
} else {
@ -156,7 +156,7 @@ index c3cdb58..77575c5 100644
} else { // original short notify + extension
snprintf(arguments, sizeof(arguments), "%s %s %s %s %d %d %d &",
externnotify, S_OR(context, "\"\""),
@@ -6418,6 +6496,9 @@ static int msg_create_from_file(struct ast_vm_recording_data *recdata)
@@ -6422,6 +6500,9 @@ static int msg_create_from_file(struct ast_vm_recording_data *recdata)
const char *category = NULL; /* pointless for now */
char msg_id[MSG_ID_LEN];
@ -166,7 +166,7 @@ index c3cdb58..77575c5 100644
/* Start by checking to see if the file actually exists... */
if (!(ast_fileexists(recdata->recording_file, recdata->recording_ext, NULL))) {
ast_log(LOG_ERROR, "File: %s not found.\n", recdata->recording_file);
@@ -6674,7 +6755,9 @@ static int msg_create_from_file(struct ast_vm_recording_data *recdata)
@@ -6678,7 +6759,9 @@ static int msg_create_from_file(struct ast_vm_recording_data *recdata)
if (send_email) { /* We tried and failed. */
ast_log(LOG_WARNING, "Failed to allocate dummy channel, email will not be sent\n");
}
@ -177,7 +177,7 @@ index c3cdb58..77575c5 100644
}
}
@@ -8164,6 +8247,74 @@ static void load_vmu_timezone(struct ast_vm_user *vmu)
@@ -8168,6 +8251,74 @@ static void load_vmu_timezone(struct ast_vm_user *vmu)
return;
}
@ -252,7 +252,7 @@ index c3cdb58..77575c5 100644
/*!
* \brief Sends email notification that a user has a new voicemail waiting for them.
* \param chan
@@ -8187,6 +8338,9 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
@@ -8191,6 +8342,9 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
struct timeval msg_time = ast_tvnow();
struct vm_zone *tz = get_vmu_timezone(vmu);
@ -262,7 +262,7 @@ index c3cdb58..77575c5 100644
ast_channel_lock(chan);
if ((category = pbx_builtin_getvar_helper(chan, "VM_CATEGORY"))) {
category = ast_strdupa(category);
@@ -8254,7 +8408,9 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
@@ -8258,7 +8412,9 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
ast_app_inboxcount2(ext_context, &urgentmsgs, &newmsgs, &oldmsgs);
queue_mwi_event(ast_channel_uniqueid(chan), ext_context, urgentmsgs, newmsgs, oldmsgs);
@ -273,7 +273,7 @@ index c3cdb58..77575c5 100644
#ifdef IMAP_STORAGE
vm_delete(fn); /* Delete the file, but not the IMAP message */
@@ -11420,6 +11576,9 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11424,6 +11580,9 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
#ifdef IMAP_STORAGE
int deleted = 0;
#endif
@ -283,7 +283,7 @@ index c3cdb58..77575c5 100644
/* Add the vm_state to the active list and keep it active */
vms.curmsg = -1;
@@ -11610,6 +11769,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11614,6 +11773,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
if (vms.lastmsg == -1) {
in_urgent = 0;
cmd = vm_browse_messages(chan, &vms, vmu);
@ -295,7 +295,7 @@ index c3cdb58..77575c5 100644
res = 0;
goto out;
}
@@ -11685,6 +11849,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11689,6 +11853,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
case '5': /* Play current message */
ast_test_suite_event_notify("BROWSE", "Message: browsing message %d\r\nVoicemail: %d", vms.curmsg, vms.curmsg);
cmd = vm_browse_messages(chan, &vms, vmu);
@ -307,7 +307,7 @@ index c3cdb58..77575c5 100644
break;
case '2': /* Change folders */
folder_change = 1;
@@ -11775,6 +11944,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11779,6 +11948,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
if (vms.curmsg > 0) {
vms.curmsg--;
cmd = play_message(chan, vmu, &vms);
@ -319,7 +319,7 @@ index c3cdb58..77575c5 100644
} else {
/* Check if we were listening to new
messages. If so, go to Urgent messages
@@ -11797,6 +11971,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11801,6 +11975,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
} else if (ast_test_flag(vmu, VM_MESSAGEWRAP) && vms.lastmsg > 0) {
vms.curmsg = vms.lastmsg;
cmd = play_message(chan, vmu, &vms);
@ -331,7 +331,7 @@ index c3cdb58..77575c5 100644
} else {
cmd = ast_play_and_wait(chan, "vm-nomore");
}
@@ -11807,6 +11986,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11811,6 +11990,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
if (vms.curmsg < vms.lastmsg) {
vms.curmsg++;
cmd = play_message(chan, vmu, &vms);
@ -343,7 +343,7 @@ index c3cdb58..77575c5 100644
} else {
if (in_urgent && vms.newmessages > 0) {
/* Check if we were listening to urgent
@@ -11828,6 +12012,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11832,6 +12016,11 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
} else if (ast_test_flag(vmu, VM_MESSAGEWRAP) && vms.lastmsg > 0) {
vms.curmsg = 0;
cmd = play_message(chan, vmu, &vms);
@ -355,7 +355,7 @@ index c3cdb58..77575c5 100644
} else {
cmd = ast_play_and_wait(chan, "vm-nomore");
}
@@ -11849,6 +12038,9 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11853,6 +12042,9 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
else if (play_folder == 1)
vms.oldmessages--;
cmd = ast_play_and_wait(chan, "vm-deleted");
@ -365,7 +365,7 @@ index c3cdb58..77575c5 100644
} else {
if (play_folder == 0) {
if (in_urgent) {
@@ -11860,14 +12052,27 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11864,14 +12056,27 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
else if (play_folder == 1)
vms.oldmessages++;
cmd = ast_play_and_wait(chan, "vm-undeleted");
@ -393,7 +393,7 @@ index c3cdb58..77575c5 100644
} else {
/* Check if we were listening to urgent
messages. If so, go to regular new messages
@@ -11918,6 +12123,29 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11922,6 +12127,29 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
} else if (cmd > 0) {
box = cmd = cmd - '0';
cmd = save_to_folder(vmu, &vms, vms.curmsg, cmd, NULL, 0);
@ -423,7 +423,7 @@ index c3cdb58..77575c5 100644
if (cmd == ERROR_LOCK_PATH) {
res = cmd;
goto out;
@@ -11949,9 +12177,19 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11953,9 +12181,19 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
if (vms.curmsg < vms.lastmsg) {
vms.curmsg++;
cmd = play_message(chan, vmu, &vms);
@ -443,7 +443,7 @@ index c3cdb58..77575c5 100644
} else {
/* Check if we were listening to urgent
messages. If so, go to regular new messages
@@ -12068,7 +12306,7 @@ out:
@@ -12072,7 +12310,7 @@ out:
int new = 0, old = 0, urgent = 0;
snprintf(ext_context, sizeof(ext_context), "%s@%s", vms.username, vmu->context);
/* Urgent flag not passwd to externnotify here */
@ -452,7 +452,7 @@ index c3cdb58..77575c5 100644
ast_app_inboxcount2(ext_context, &urgent, &new, &old);
queue_mwi_event(ast_channel_uniqueid(chan), ext_context, urgent, new, old);
}
@@ -15989,13 +16227,13 @@ done:
@@ -15993,13 +16231,13 @@ done:
return res;
}
@ -468,7 +468,7 @@ index c3cdb58..77575c5 100644
ast_app_inboxcount2(ext_context, &urgent, &new, &old);
queue_mwi_event(NULL, ext_context, urgent, new, old);
}
@@ -16022,6 +16260,9 @@ static int vm_msg_forward(const char *from_mailbox,
@@ -16026,6 +16264,9 @@ static int vm_msg_forward(const char *from_mailbox,
int i;
int *msg_nums;
@ -478,7 +478,7 @@ index c3cdb58..77575c5 100644
if (ast_strlen_zero(from_mailbox) || ast_strlen_zero(to_mailbox)) {
ast_log(LOG_WARNING, "Cannot forward message because either the from or to mailbox was not specified\n");
return -1;
@@ -16135,7 +16376,9 @@ vm_forward_cleanup:
@@ -16139,7 +16380,9 @@ vm_forward_cleanup:
#endif
if (!res) {
@ -489,7 +489,7 @@ index c3cdb58..77575c5 100644
}
free_user(vmu);
@@ -16159,6 +16402,9 @@ static int vm_msg_move(const char *mailbox,
@@ -16163,6 +16406,9 @@ static int vm_msg_move(const char *mailbox,
int i;
int *old_msg_nums;
@ -499,7 +499,7 @@ index c3cdb58..77575c5 100644
if (ast_strlen_zero(mailbox)) {
ast_log(LOG_WARNING, "Cannot move message because no mailbox was specified\n");
return -1;
@@ -16240,7 +16486,9 @@ vm_move_cleanup:
@@ -16244,7 +16490,9 @@ vm_move_cleanup:
#endif
if (!res) {
@ -510,7 +510,7 @@ index c3cdb58..77575c5 100644
}
free_user(vmu);
@@ -16261,6 +16509,9 @@ static int vm_msg_remove(const char *mailbox,
@@ -16265,6 +16513,9 @@ static int vm_msg_remove(const char *mailbox,
int i;
int *msg_nums;
@ -520,7 +520,7 @@ index c3cdb58..77575c5 100644
if (ast_strlen_zero(mailbox)) {
ast_log(LOG_WARNING, "Cannot remove message because no mailbox was specified\n");
return -1;
@@ -16338,7 +16589,9 @@ vm_remove_cleanup:
@@ -16342,7 +16593,9 @@ vm_remove_cleanup:
#endif
if (!res) {
@ -531,7 +531,7 @@ index c3cdb58..77575c5 100644
}
free_user(vmu);
@@ -16363,6 +16616,9 @@ static int vm_msg_play(struct ast_channel *chan,
@@ -16367,6 +16620,9 @@ static int vm_msg_play(struct ast_channel *chan,
int duration = 0;
const char *value;
@ -541,7 +541,7 @@ index c3cdb58..77575c5 100644
if (ast_strlen_zero(mailbox)) {
ast_log(LOG_WARNING, "Cannot play message because no mailbox was specified\n");
return -1;
@@ -16452,7 +16708,9 @@ play2_msg_cleanup:
@@ -16456,7 +16712,9 @@ play2_msg_cleanup:
#endif
if (!res) {

@ -7,10 +7,10 @@ Subject: sipwise_vm_add_arabic_support
1 file changed, 93 insertions(+), 2 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 1a3c14c..50ca24e 100644
index 3064599..8373605 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8507,8 +8507,9 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
@@ -8511,8 +8511,9 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg);
adsi_message(chan, vms);
@ -22,7 +22,7 @@ index 1a3c14c..50ca24e 100644
} else {
if (!vms->curmsg) {
res = wait_file2(chan, vms, "vm-first"); /* "First" */
@@ -8557,6 +8558,18 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
@@ -8561,6 +8562,18 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
}
if (!res)
res = wait_file2(chan, vms, "vm-message");
@ -41,7 +41,7 @@ index 1a3c14c..50ca24e 100644
/* HEBREW syntax */
} else if (!strncasecmp(ast_channel_language(chan), "he", 2)) {
if (!vms->curmsg) {
@@ -8999,6 +9012,8 @@ static int vm_play_folder_name(struct ast_channel *chan, char *box)
@@ -9003,6 +9016,8 @@ static int vm_play_folder_name(struct ast_channel *chan, char *box)
return cmd ? cmd : ast_play_and_wait(chan, box);
} else if (!strncasecmp(ast_channel_language(chan), "gr", 2)) {
return vm_play_folder_name_gr(chan, box);
@ -50,7 +50,7 @@ index 1a3c14c..50ca24e 100644
} else if (!strncasecmp(ast_channel_language(chan), "he", 2)) { /* Hebrew syntax */
return ast_play_and_wait(chan, box);
} else if (!strncasecmp(ast_channel_language(chan), "ja", 2)) { /* Japanese syntax */
@@ -9160,6 +9175,59 @@ static int vm_intro_multilang(struct ast_channel *chan, struct vm_state *vms, co
@@ -9164,6 +9179,59 @@ static int vm_intro_multilang(struct ast_channel *chan, struct vm_state *vms, co
return res;
}
@ -110,7 +110,7 @@ index 1a3c14c..50ca24e 100644
/* Default Hebrew syntax */
static int vm_intro_he(struct ast_channel *chan, struct vm_state *vms)
{
@@ -10145,6 +10213,8 @@ static int vm_intro(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm
@@ -10149,6 +10217,8 @@ static int vm_intro(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm
return vm_intro_fr(chan, vms);
} else if (!strncasecmp(ast_channel_language(chan), "gr", 2)) { /* GREEK syntax */
return vm_intro_gr(chan, vms);
@ -119,7 +119,7 @@ index 1a3c14c..50ca24e 100644
} else if (!strncasecmp(ast_channel_language(chan), "he", 2)) { /* HEBREW syntax */
return vm_intro_he(chan, vms);
} else if (!strncasecmp(ast_channel_language(chan), "is", 2)) { /* ICELANDIC syntax */
@@ -10741,6 +10811,23 @@ static int vm_browse_messages_gr(struct ast_channel *chan, struct vm_state *vms,
@@ -10745,6 +10815,23 @@ static int vm_browse_messages_gr(struct ast_channel *chan, struct vm_state *vms,
return cmd;
}
@ -143,7 +143,7 @@ index 1a3c14c..50ca24e 100644
/* Hebrew Syntax */
static int vm_browse_messages_he(struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu)
{
@@ -10979,6 +11066,8 @@ static int vm_browse_messages(struct ast_channel *chan, struct vm_state *vms, st
@@ -10983,6 +11070,8 @@ static int vm_browse_messages(struct ast_channel *chan, struct vm_state *vms, st
return vm_browse_messages_es(chan, vms, vmu);
} else if (!strncasecmp(ast_channel_language(chan), "gr", 2)) { /* GREEK */
return vm_browse_messages_gr(chan, vms, vmu);
@ -152,7 +152,7 @@ index 1a3c14c..50ca24e 100644
} else if (!strncasecmp(ast_channel_language(chan), "he", 2)) { /* HEBREW */
return vm_browse_messages_he(chan, vms, vmu);
} else if (!strncasecmp(ast_channel_language(chan), "it", 2)) { /* ITALIAN */
@@ -11934,6 +12023,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11938,6 +12027,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
if (folder_change && vms.lastmsg == -1) {
if(!strcasecmp(ast_channel_language(chan), "ro")) {
ast_play_and_wait(chan, "vm-dir-empty");

@ -7,7 +7,7 @@ Subject: sipwise_vm_add_callid
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 4d21ebd..2510889 100644
index f9a9d1d..a3d1687 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -858,7 +858,7 @@ static char odbc_database[80] = "asterisk";
@ -19,7 +19,7 @@ index 4d21ebd..2510889 100644
#define EXISTS(a,b,c,d) (message_exists(a,b))
#define RENAME(a,b,c,d,e,f,g,h) (rename_file(a,b,c,d,e,f))
#define COPY(a,b,c,d,e,f,g,h) (copy_file(a,b,c,d,e,f))
@@ -4476,6 +4476,7 @@ struct insert_data {
@@ -4480,6 +4480,7 @@ struct insert_data {
const char *category;
const char *flag;
const char *msg_id;
@ -27,7 +27,7 @@ index 4d21ebd..2510889 100644
};
static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
@@ -4504,6 +4505,9 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
@@ -4508,6 +4509,9 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
SQLBindParameter(stmt, 12, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->msg_id), 0, (void *) data->msg_id, 0, NULL);
if (!ast_strlen_zero(data->category)) {
SQLBindParameter(stmt, 13, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->category), 0, (void *) data->category, 0, NULL);
@ -37,7 +37,7 @@ index 4d21ebd..2510889 100644
}
res = ast_odbc_execute_sql(obj, stmt, data->sql);
if (!SQL_SUCCEEDED(res)) {
@@ -4528,7 +4532,7 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
@@ -4532,7 +4536,7 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
*
* \return the zero on success -1 on error.
*/
@ -46,7 +46,7 @@ index 4d21ebd..2510889 100644
{
int res = 0;
int fd = -1;
@@ -4543,8 +4547,9 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail
@@ -4547,8 +4551,9 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail
char *c;
struct ast_config *cfg = NULL;
struct odbc_obj *obj;
@ -57,7 +57,7 @@ index 4d21ebd..2510889 100644
struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
delete_file(dir, msgnum);
@@ -4617,10 +4622,15 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail
@@ -4621,10 +4626,15 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail
idata.data = fdm;
idata.datalen = idata.indlen = fdlen;
@ -75,7 +75,7 @@ index 4d21ebd..2510889 100644
if (ast_strlen_zero(idata.origtime)) {
idata.origtime = "0";
@@ -6853,7 +6863,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
@@ -6857,7 +6867,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
if (success == -1) {
/* We couldn't retrieve the file from the database, but we found it on the file system. Let's put it in the database. */
ast_debug(1, "Greeting not retrieved from database, but found in file storage. Inserting into database\n");

@ -33,7 +33,7 @@ index 9ee80e1..69eccd0 100644
all: _all
@echo " +-------- app_voicemail Build Complete --------+"
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9eca747..c0a9aee 100644
index d863f12..7833ae1 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -112,6 +112,9 @@
@ -190,7 +190,7 @@ index 9eca747..c0a9aee 100644
/*!
* \brief Strips control and non 7-bit clean characters from input string.
*
@@ -10793,6 +10926,10 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
@@ -10797,6 +10930,10 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
int useadsi = 0, valid = 0, logretries = 0;
char password[AST_MAX_EXTENSION], *passptr = NULL;
struct ast_vm_user vmus, *vmu = NULL;
@ -201,7 +201,7 @@ index 9eca747..c0a9aee 100644
/* If ADSI is supported, setup login screen */
adsi_begin(chan, &useadsi);
@@ -10803,6 +10940,17 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
@@ -10807,6 +10944,17 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
return -1;
}
@ -219,7 +219,7 @@ index 9eca747..c0a9aee 100644
/* Authenticate them and get their mailbox/password */
while (!valid && (logretries < max_logins)) {
@@ -10832,6 +10980,18 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
@@ -10836,6 +10984,18 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
if (useadsi)
adsi_password(chan);
@ -238,7 +238,7 @@ index 9eca747..c0a9aee 100644
if (!ast_strlen_zero(prefix)) {
char fullusername[80];
@@ -13167,6 +13327,8 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
@@ -13171,6 +13331,8 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
char secretfn[PATH_MAX] = "";
long tps_queue_low;
long tps_queue_high;
@ -247,7 +247,7 @@ index 9eca747..c0a9aee 100644
#ifdef IMAP_STORAGE
ast_copy_string(imapparentfolder, "\0", sizeof(imapparentfolder));
@@ -13231,6 +13393,19 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
@@ -13235,6 +13397,19 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
ast_copy_string(odbc_table, val, sizeof(odbc_table));
}
#endif

@ -7,7 +7,7 @@ Subject: sipwise_vm_ast_load_realtime_use_uuid
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 2510889..3a1bf19 100644
index a3d1687..606079c 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1772,7 +1772,7 @@ static int is_valid_dtmf(const char *key)
@ -54,7 +54,7 @@ index 2510889..3a1bf19 100644
SQLHSTMT stmt = NULL;
obj = ast_odbc_request_obj(odbc_database, 0);
@@ -4167,6 +4174,8 @@ static struct ast_vm_user *find_user_realtime_by_alias(struct ast_vm_user *ivm,
@@ -4171,6 +4178,8 @@ static struct ast_vm_user *find_user_realtime_by_alias(struct ast_vm_user *ivm,
ast_log(LOG_NOTICE, "Failed to fetch mailbox for uuid '%s', falling back to alias search\n", alias);
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
@ -63,7 +63,7 @@ index 2510889..3a1bf19 100644
stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
if (!stmt) {
ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
@@ -4193,7 +4202,11 @@ static struct ast_vm_user *find_user_realtime_by_alias(struct ast_vm_user *ivm,
@@ -4197,7 +4206,11 @@ static struct ast_vm_user *find_user_realtime_by_alias(struct ast_vm_user *ivm,
ast_odbc_release_obj(obj);
ast_log(LOG_NOTICE, "Found mailbox '%s' for alias '%s'\n", mailbox, alias);

@ -7,7 +7,7 @@ Subject: sipwise_vm_change_password_use_customer_id
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c2d74df..53e8471 100644
index a73b16e..3142c99 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1639,7 +1639,7 @@ static int change_password_realtime(struct ast_vm_user *vmu, const char *passwor

@ -9,7 +9,7 @@ and currently ignored per user
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index e6fc1f0..6f864bf 100644
index 5070326..14c3922 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1455,8 +1455,6 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
@ -21,7 +21,7 @@ index e6fc1f0..6f864bf 100644
} else if (!strcasecmp(var, "moveheard")){
ast_set2_flag(vmu, ast_true(value), VM_MOVEHEARD);
} else if (!strcasecmp(var, "sayduration")){
@@ -15007,7 +15005,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
@@ -15011,7 +15009,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
context = ast_variable_retrieve(msg_cfg, "message", "macrocontext");
switch (option) {
case 3: /* Play message envelope */

@ -7,7 +7,7 @@ Subject: sipwise_vm_ext_timezone
1 file changed, 67 insertions(+)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 2830900..4d21ebd 100644
index f26bbfa..f9a9d1d 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -948,6 +948,8 @@ static int passwordlocation;
@ -36,7 +36,7 @@ index 2830900..4d21ebd 100644
#ifdef IMAP_STORAGE
} else if (!strcasecmp(var->name, "imapuser")) {
ast_copy_string(retval->imapuser, var->value, sizeof(retval->imapuser));
@@ -8072,6 +8077,58 @@ static struct vm_zone * get_vmu_timezone(struct ast_vm_user *vmu)
@@ -8076,6 +8081,58 @@ static struct vm_zone * get_vmu_timezone(struct ast_vm_user *vmu)
return tz;
}
@ -95,7 +95,7 @@ index 2830900..4d21ebd 100644
/*!
* \brief Sends email notification that a user has a new voicemail waiting for them.
* \param chan
@@ -13320,6 +13377,9 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
@@ -13324,6 +13381,9 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
long tps_queue_high;
const char *ast_sw_normalize_user_match = NULL;
const char *ast_sw_normalize_user_replace = NULL;
@ -105,7 +105,7 @@ index 2830900..4d21ebd 100644
#ifdef IMAP_STORAGE
ast_copy_string(imapparentfolder, "\0", sizeof(imapparentfolder));
@@ -13397,6 +13457,13 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
@@ -13401,6 +13461,13 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
sw_normalize_user_replace[0] = '\0';
}

@ -3,11 +3,11 @@ Date: Mon, 21 Feb 2022 14:17:23 +0100
Subject: sipwise_vm_find_user_by_alias
---
apps/app_voicemail.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
apps/app_voicemail.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 446bb5d..9eca747 100644
index 446bb5d..d863f12 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1036,6 +1036,9 @@ static char emaildateformat[32] = "%A, %B %d, %Y at %r";
@ -33,7 +33,7 @@ index 446bb5d..9eca747 100644
}
if (!vmu && !ast_strlen_zero(aliasescontext)) {
struct alias_mailbox_mapping *mapping;
@@ -3991,6 +3999,65 @@ bail:
@@ -3991,6 +3999,69 @@ bail:
return x - 1;
}
@ -55,6 +55,10 @@ index 446bb5d..9eca747 100644
+ SQLHSTMT stmt = NULL;
+
+ obj = ast_odbc_request_obj(odbc_database, 0);
+ if (!obj) {
+ ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+ return NULL;
+ }
+ stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps_uuid);
+ if (!stmt) {
+ ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql_uuid);

@ -7,10 +7,10 @@ Subject: sipwise_vm_fix_double_menu
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 77575c5..6a25280 100644
index afee86d..5664ced 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -12232,16 +12232,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -12236,16 +12236,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
if (!cmd)
cmd = vm_instructions(chan, vmu, &vms, 1, in_urgent, nodelete);
break;

@ -7,10 +7,10 @@ Subject: sipwise_vm_fix_prev_message
1 file changed, 1 insertion(+)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 50ca24e..c3cdb58 100644
index 8373605..c98cefa 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11422,6 +11422,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11426,6 +11426,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
#endif
/* Add the vm_state to the active list and keep it active */

@ -7,10 +7,10 @@ Subject: sipwise_vm_hebrew_language_fixups
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index d9a0637..1a3c14c 100644
index 97f1f54..3064599 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8506,10 +8506,15 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
@@ -8510,10 +8510,15 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
vms->starting = 0;
make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg);
adsi_message(chan, vms);

@ -7,10 +7,10 @@ Subject: sipwise_vm_play_anonymous
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 53e8471..e6fc1f0 100644
index 3142c99..5070326 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8314,7 +8314,7 @@ static int play_message_callerid(struct ast_channel *chan, struct vm_state *vms,
@@ -8318,7 +8318,7 @@ static int play_message_callerid(struct ast_channel *chan, struct vm_state *vms,
/* Strip off caller ID number from name */
ast_debug(1, "VM-CID: composite caller ID received: %s, context: %s\n", cid, context);
ast_callerid_parse(cid, &name, &callerid);

@ -7,10 +7,10 @@ Subject: sipwise_vm_play_prompt_on_change_to_empty_folder
1 file changed, 12 insertions(+)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c0a9aee..c2d74df 100644
index 7833ae1..a73b16e 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11246,6 +11246,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11250,6 +11250,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
signed char record_gain = 0;
int play_auto = 0;
int play_folder = 0;
@ -18,7 +18,7 @@ index c0a9aee..c2d74df 100644
int in_urgent = 0;
int nodelete = 0;
#ifdef IMAP_STORAGE
@@ -11515,6 +11516,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11519,6 +11520,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
cmd = vm_browse_messages(chan, &vms, vmu);
break;
case '2': /* Change folders */
@ -26,7 +26,7 @@ index c0a9aee..c2d74df 100644
ast_test_suite_event_notify("CHANGEFOLDER", "Message: browsing to a different folder");
if (useadsi)
adsi_folders(chan, 0, "Change to folder...");
@@ -11848,6 +11850,16 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11852,6 +11854,16 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
vms.starting = 1;
break;
default: /* Nothing */

@ -7,10 +7,10 @@ Subject: sipwise_vm_pointers_malloc
1 file changed, 2 insertions(+)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 631e9d3..d9a0637 100644
index 48724c4..97f1f54 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11329,6 +11329,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
@@ -11333,6 +11333,8 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
/* Add the vm_state to the active list and keep it active */
vms.lastmsg = -1;

@ -7,7 +7,7 @@ Subject: sipwise_vm_sms_notify
1 file changed, 48 insertions(+), 125 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 6f864bf..30b5536 100644
index 14c3922..33dc99c 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -934,6 +934,7 @@ static int silencethreshold = 128;
@ -18,7 +18,7 @@ index 6f864bf..30b5536 100644
static struct ast_smdi_interface *smdi_iface = NULL;
static char vmfmts[80] = "wav";
static double volgain;
@@ -4965,6 +4966,15 @@ static int vm_delete(char *file)
@@ -4969,6 +4970,15 @@ static int vm_delete(char *file)
return ast_filedelete(file, NULL);
}
@ -34,7 +34,7 @@ index 6f864bf..30b5536 100644
static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu, int msgnum, char *context, char *mailbox, const char *fromfolder, char *cidnum, char *cidname, char *dur, char *date, const char *category, const char *flag)
{
char callerid[256];
@@ -5642,150 +5652,56 @@ static int sendmail(char *srcemail,
@@ -5646,150 +5656,56 @@ static int sendmail(char *srcemail,
return 0;
}
@ -215,7 +215,7 @@ index 6f864bf..30b5536 100644
}
/*!
@@ -8159,7 +8075,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
@@ -8163,7 +8079,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
}
if (!ast_strlen_zero(vmu->pager)) {
@ -224,7 +224,7 @@ index 6f864bf..30b5536 100644
}
if (ast_test_flag(vmu, VM_DELETE))
@@ -13586,6 +13502,13 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
@@ -13590,6 +13506,13 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
externnotify[0] = '\0';
}

@ -7,10 +7,10 @@ Subject: sipwise_vm_store_message_add_diag_info
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 3a1bf19..631e9d3 100644
index 606079c..48724c4 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4498,6 +4498,10 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
@@ -4502,6 +4502,10 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
int res;
SQLHSTMT stmt;
@ -21,7 +21,7 @@ index 3a1bf19..631e9d3 100644
res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
if (!SQL_SUCCEEDED(res)) {
ast_log(AST_LOG_WARNING, "SQL Alloc Handle failed!\n");
@@ -4524,7 +4528,8 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
@@ -4528,7 +4532,8 @@ static SQLHSTMT insert_data_cb(struct odbc_obj *obj, void *vdata)
}
res = ast_odbc_execute_sql(obj, stmt, data->sql);
if (!SQL_SUCCEEDED(res)) {
@ -31,7 +31,7 @@ index 3a1bf19..631e9d3 100644
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
return NULL;
}
@@ -4657,6 +4662,13 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail
@@ -4661,6 +4666,13 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} else {
ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);

@ -7,7 +7,7 @@ Subject: sipwise_vm_vmnotify_ext_format
1 file changed, 97 insertions(+), 36 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ef7e47e..2830900 100644
index 70478fa..f26bbfa 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1091,6 +1091,8 @@ static int vm_msg_move(const char *mailbox, const char *context, size_t num_msgs
@ -19,7 +19,7 @@ index ef7e47e..2830900 100644
#ifdef TEST_FRAMEWORK
static int vm_test_destroy_user(const char *context, const char *mailbox);
static int vm_test_create_user(const char *context, const char *mailbox);
@@ -5652,7 +5654,7 @@ static int sendmail(char *srcemail,
@@ -5656,7 +5658,7 @@ static int sendmail(char *srcemail,
return 0;
}
@ -28,7 +28,7 @@ index ef7e47e..2830900 100644
{
char arguments[2048];
char date[256];
@@ -5661,6 +5663,7 @@ static void run_externpager(char *pager, char *dialed_num, char *cidnum, int dur
@@ -5665,6 +5667,7 @@ static void run_externpager(char *pager, char *dialed_num, char *cidnum, int dur
char dur[PATH_MAX];
struct ast_tm tm;
struct ast_str *str1 = ast_str_create(16);
@ -36,7 +36,7 @@ index ef7e47e..2830900 100644
if (!str1) {
return;
@@ -5676,8 +5679,14 @@ static void run_externpager(char *pager, char *dialed_num, char *cidnum, int dur
@@ -5680,8 +5683,14 @@ static void run_externpager(char *pager, char *dialed_num, char *cidnum, int dur
snprintf(dur, sizeof(dur), "%d:%02d", duration / 60, duration % 60);
@ -53,7 +53,7 @@ index ef7e47e..2830900 100644
if (pagerbody) {
struct ast_channel *ast;
@@ -6232,9 +6241,11 @@ static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
@@ -6236,9 +6245,11 @@ static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
return res;
}
@ -67,7 +67,7 @@ index ef7e47e..2830900 100644
char ext_context[256] = "";
char number[256] = "";
int newvoicemails = 0, oldvoicemails = 0, urgentvoicemails = 0;
@@ -6274,10 +6285,20 @@ static void run_externnotify(const char *context, const char *extension, const c
@@ -6278,10 +6289,20 @@ static void run_externnotify(const char *context, const char *extension, const c
} else if (ast_strlen_zero(number) || !strcmp(extension, number)) {
ast_log(AST_LOG_WARNING, "Missing user number to run externnotify on context '%s'\n", ext_context);
} else {
@ -92,7 +92,7 @@ index ef7e47e..2830900 100644
ast_debug(1, "Executing %s\n", arguments);
ast_safe_system(arguments);
}
@@ -7998,6 +8019,59 @@ static void queue_mwi_event(const char *channel_id, const char *box, int urgent,
@@ -8002,6 +8023,59 @@ static void queue_mwi_event(const char *channel_id, const char *box, int urgent,
}
}
@ -152,7 +152,7 @@ index ef7e47e..2830900 100644
/*!
* \brief Sends email notification that a user has a new voicemail waiting for them.
* \param chan
@@ -8018,6 +8092,8 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
@@ -8022,6 +8096,8 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
int newmsgs = 0, oldmsgs = 0, urgentmsgs = 0;
const char *category;
char *myserveremail = serveremail;
@ -161,7 +161,7 @@ index ef7e47e..2830900 100644
ast_channel_lock(chan);
if ((category = pbx_builtin_getvar_helper(chan, "VM_CATEGORY"))) {
@@ -8075,7 +8151,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
@@ -8079,7 +8155,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
}
if (!ast_strlen_zero(vmu->pager)) {
@ -170,7 +170,7 @@ index ef7e47e..2830900 100644
}
if (ast_test_flag(vmu, VM_DELETE))
@@ -8086,7 +8162,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
@@ -8090,7 +8166,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
ast_app_inboxcount2(ext_context, &urgentmsgs, &newmsgs, &oldmsgs);
queue_mwi_event(ast_channel_uniqueid(chan), ext_context, urgentmsgs, newmsgs, oldmsgs);
@ -179,7 +179,7 @@ index ef7e47e..2830900 100644
#ifdef IMAP_STORAGE
vm_delete(fn); /* Delete the file, but not the IMAP message */
@@ -8131,35 +8207,20 @@ static int play_message_category(struct ast_channel *chan, const char *category)
@@ -8135,35 +8211,20 @@ static int play_message_category(struct ast_channel *chan, const char *category)
static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *vmu, const char *origtime, const char *filename)
{
int res = 0;
@ -221,7 +221,7 @@ index ef7e47e..2830900 100644
/* No internal variable parsing for now, so we'll comment it out for the time being */
#if 0
/* Set the DIFF_* variables */
@@ -8176,8 +8237,8 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
@@ -8180,8 +8241,8 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
/* Can't think of how other diffs might be helpful, but I'm sure somebody will think of something. */
#endif
@ -232,7 +232,7 @@ index ef7e47e..2830900 100644
} else if (!strncasecmp(ast_channel_language(chan), "de", 2)) { /* GERMAN syntax */
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, ast_channel_language(chan), "'vm-received' Q 'digits/at' HM", NULL);
} else if (!strncasecmp(ast_channel_language(chan), "gr", 2)) { /* GREEK syntax */
@@ -11816,7 +11877,7 @@ out:
@@ -11820,7 +11881,7 @@ out:
int new = 0, old = 0, urgent = 0;
snprintf(ext_context, sizeof(ext_context), "%s@%s", vms.username, vmu->context);
/* Urgent flag not passwd to externnotify here */
@ -241,7 +241,7 @@ index ef7e47e..2830900 100644
ast_app_inboxcount2(ext_context, &urgent, &new, &old);
queue_mwi_event(ast_channel_uniqueid(chan), ext_context, urgent, new, old);
}
@@ -15733,7 +15794,7 @@ static void notify_new_state(struct ast_vm_user *vmu)
@@ -15737,7 +15798,7 @@ static void notify_new_state(struct ast_vm_user *vmu)
char ext_context[1024];
snprintf(ext_context, sizeof(ext_context), "%s@%s", vmu->mailbox, vmu->context);

@ -7,10 +7,10 @@ Subject: sipwise_vm_zonemessages
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 30b5536..ef7e47e 100644
index 33dc99c..70478fa 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8131,7 +8131,7 @@ static int play_message_category(struct ast_channel *chan, const char *category)
@@ -8135,7 +8135,7 @@ static int play_message_category(struct ast_channel *chan, const char *category)
static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *vmu, const char *origtime, const char *filename)
{
int res = 0;
@ -19,7 +19,7 @@ index 30b5536..ef7e47e 100644
time_t t;
if (ast_get_time_t(origtime, &t, 0, NULL)) {
@@ -8146,13 +8146,20 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
@@ -8150,13 +8150,20 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
AST_LIST_LOCK(&zones);
AST_LIST_TRAVERSE(&zones, z, list) {
if (!strcmp(z->name, vmu->zonetag)) {
@ -41,7 +41,7 @@ index 30b5536..ef7e47e 100644
/* No internal variable parsing for now, so we'll comment it out for the time being */
#if 0
/* Set the DIFF_* variables */
@@ -8169,8 +8176,8 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
@@ -8173,8 +8180,8 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
/* Can't think of how other diffs might be helpful, but I'm sure somebody will think of something. */
#endif
@ -52,7 +52,7 @@ index 30b5536..ef7e47e 100644
} else if (!strncasecmp(ast_channel_language(chan), "de", 2)) { /* GERMAN syntax */
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, ast_channel_language(chan), "'vm-received' Q 'digits/at' HM", NULL);
} else if (!strncasecmp(ast_channel_language(chan), "gr", 2)) { /* GREEK syntax */
@@ -13206,17 +13213,14 @@ static void load_zonemessages(struct ast_config *cfg)
@@ -13210,17 +13217,14 @@ static void load_zonemessages(struct ast_config *cfg)
strcpy(storage, var->value); /* safe */
msg_format = storage;
tzone = strsep(&msg_format, "|,");

Loading…
Cancel
Save