Realtime Not Storing Voicemail Password Changes

Home » Asterisk Users » Realtime Not Storing Voicemail Password Changes
Asterisk Users 1 Comment

Hi All

I am trying to get voicemail switched over to ARA on version 13 and notice that the password is not stored in the db when it is changed.

A little hair pulling and playing around and I think the problem is in the function ast_update2_realtime in main/config.c.

Issued source is ==>

int ast_update2_realtime(const char *family, …)
{
RAII_VAR(struct ast_variable *, lookup_fields, NULL, ast_variables_destroy);
RAII_VAR(struct ast_variable *, update_fields, NULL, ast_variables_destroy);
va_list ap;

va_start(ap, family);
/* XXX: If we wanted to pass no lookup fields (select all), we’d be
* out of luck. realtime_arguments_to_fields expects at least one key
* value pair. */
realtime_arguments_to_fields(ap, &lookup_fields);
va_end(ap);

va_start(ap, family);
realtime_arguments_to_fields2(ap, 1, &lookup_fields);
va_end(ap);

if (!lookup_fields || !update_fields) {
return -1;
}

return ast_update2_realtime_fields(family, lookup_fields, update_fields);
}

I believe line 3314 of the file main/config.c should be

realtime_arguments_to_fields2(ap, 1, &update_fields);

I have changed it and it works for me – but –

1) I don’t know what else this may effect
2) I dont know how to pass this on to the development team

Paddy

One thought on - Realtime Not Storing Voicemail Password Changes

  • That looks right to me. Otherwise, we never extract the variable list arguments passed in to the ast_variable list update_fields. Yikes.

    Please file a bug on issues.asterisk.org.