Voicemail Variables On Email Subject

Home » Asterisk Users » Voicemail Variables On Email Subject
Asterisk Users 10 Comments


I have a problem w/ voicemail, the subject message is corruption when used voicemail variables, e.g. :
voicemail.conf emailsubject=${VM_MAILBOX}|${VM_MSGNUM}|${VM_CALLERID}|${VM_DUR}

Subject: =?utf-8?Q?1504|12|”Teste_-_Rafael”_<1570>|0:16?
Subject: 1504|12|”Teste – Rafael” <1570>|16


*Rafael dos Santos Saraiva*
Tel: (51) 8174-7956
*Digium Certified Asterisk Administrator (dCCA)*
http://www.astdocs.com |

10 thoughts on - Voicemail Variables On Email Subject

  • I tried with utf-8, iso8859-1 and us-ascii.

    I used the Sendmail client, but now testing with “mailcmd

  • If I read your mailcmd correctly you are not really mailing but just dumping the data. Is the display correct when you use the default setting “/usr/sbin/sendmail -t”? You could send the mail to a local account and open it with mutt.


  • Some time ago I had a similar problem but it turned out to be a display problem of the email client (Outlook Express on an old XP machine).


  • I checked the raw text of my voicemail messages today and I saw pretty much the same escape sequences for UTF-8 like you did, but I do not have any display problem. You could save the message locally and hand edit it (starting with uppercase UTF instead of lowercase utf).


  • I checked your original message, and I guess the expected string was a little bit different:
    1504|12|”Teste – Rafael” <1570>|0:16
    I can’t see anything wrong with quoted printable decoding. My best guess is still the email client and its settings.


  • That looks about sane for a subject line in UTF-8 encoding (I haven’t studied it too closely). What mail client have you been using to retrieve the e-mail?
    Is it UTF-8 aware?

  • RdSS> emailsubject=${VM_MAILBOX}|${VM_MSGNUM}|${VM_CALLERID}|${VM_DUR}

    RdSS> Return:
    RdSS> Subject: =?utf-8?Q?1504|12|”Teste_-_Rafael”_<1570>|0:16?
    That is a proper encoding for an SMTP mail header which is in utf8.

    RdSS> Expected:
    RdSS> Subject: 1504|12|”Teste – Rafael” <1570>|16

    The sent header decodes to this string:

    Subect: 1504|12|”Teste_-_Rafael”_<1570>|0:16

    Note the colon from $VM_DUR (minutes:seconds).

    MUAs are supposed to decode that.