mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
Allow the attachment format to be specified differently for different mailboxes (issue #6961 reported by the ever fabulous Corydon76)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -237,6 +237,7 @@ struct ast_vm_user {
|
|||||||
char dialout[80];
|
char dialout[80];
|
||||||
char uniqueid[20]; /*!< Unique integer identifier */
|
char uniqueid[20]; /*!< Unique integer identifier */
|
||||||
char exit[80];
|
char exit[80];
|
||||||
|
char attachfmt[20]; /*!< Attachment format */
|
||||||
unsigned int flags; /*!< VM_ flags */
|
unsigned int flags; /*!< VM_ flags */
|
||||||
int saydurationm;
|
int saydurationm;
|
||||||
int maxmsg; /*!< Maximum number of msgs per folder for this mailbox */
|
int maxmsg; /*!< Maximum number of msgs per folder for this mailbox */
|
||||||
@@ -451,7 +452,9 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
|
|||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
if (!strcasecmp(var, "attach")) {
|
if (!strcasecmp(var, "attach")) {
|
||||||
ast_set2_flag(vmu, ast_true(value), VM_ATTACH);
|
ast_set2_flag(vmu, ast_true(value), VM_ATTACH);
|
||||||
|
} else if (!strcasecmp(var, "attachfmt")) {
|
||||||
|
ast_copy_string(vmu->attachfmt, value, sizeof(vmu->attachfmt));
|
||||||
} else if (!strcasecmp(var, "serveremail")) {
|
} else if (!strcasecmp(var, "serveremail")) {
|
||||||
ast_copy_string(vmu->serveremail, value, sizeof(vmu->serveremail));
|
ast_copy_string(vmu->serveremail, value, sizeof(vmu->serveremail));
|
||||||
} else if (!strcasecmp(var, "language")) {
|
} else if (!strcasecmp(var, "language")) {
|
||||||
@@ -3292,6 +3295,10 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
|
|||||||
make_file(fn, sizeof(fn), todir, msgnum);
|
make_file(fn, sizeof(fn), todir, msgnum);
|
||||||
snprintf(ext_context, sizeof(ext_context), "%s@%s", vmu->mailbox, vmu->context);
|
snprintf(ext_context, sizeof(ext_context), "%s@%s", vmu->mailbox, vmu->context);
|
||||||
|
|
||||||
|
if (!ast_strlen_zero(vmu->attachfmt)) {
|
||||||
|
fmt = vmu->attachfmt;
|
||||||
|
}
|
||||||
|
|
||||||
/* Attach only the first format */
|
/* Attach only the first format */
|
||||||
if ((fmt = ast_strdupa(fmt))) {
|
if ((fmt = ast_strdupa(fmt))) {
|
||||||
stringp = fmt;
|
stringp = fmt;
|
||||||
|
@@ -162,6 +162,11 @@ european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM
|
|||||||
;
|
;
|
||||||
; tz=central ; Timezone from zonemessages above. Irrelevant if envelope=no.
|
; tz=central ; Timezone from zonemessages above. Irrelevant if envelope=no.
|
||||||
; attach=yes ; Attach the voicemail to the notification email *NOT* the pager email
|
; attach=yes ; Attach the voicemail to the notification email *NOT* the pager email
|
||||||
|
; attachfmt=wav49 ; Which format to attach to the email. Normally this is the
|
||||||
|
; first format specified in the format parameter above, but this
|
||||||
|
; option lets you customize the format sent to particular mailboxes.
|
||||||
|
; Useful if Windows users want wav49, but Linux users want gsm.
|
||||||
|
; [per-mailbox only]
|
||||||
; saycid=yes ; Say the caller id information before the message. If not described,
|
; saycid=yes ; Say the caller id information before the message. If not described,
|
||||||
; or set to no, it will be in the envelope
|
; or set to no, it will be in the envelope
|
||||||
; cidinternalcontexts=intern ; Internal Context for Name Playback instead of
|
; cidinternalcontexts=intern ; Internal Context for Name Playback instead of
|
||||||
|
Reference in New Issue
Block a user