Voice Mail to eMail formatting

Discussion in 'General' started by Kalama Sutra, Apr 2, 2010.

  1. Kalama Sutra

    Joined:
    Apr 15, 2009
    Messages:
    95
    Likes Received:
    0
    Hi,

    This is for All us new people who've been scratching our heads ... And smart 'nuff to look around the formums ...

    Situation = You've set up your users / extensions, enabled the voice mail option, have the voice mail forwarded to a valid eMail account << and that's working OK >> <<< got mine to work - don't ask me how :silly: >>> AND the voice mail is getting to the email ( not discussing auto delete; in fact until trouble shot, my amateur :blush: recommendation would be to not set this at the moment ) ....

    Now, your user ( yourself for the testing ) gets this email .... message is there and it's Kool. Except there's the line that says :

    "Dial *98 to access your voicemail by phone. Visit http://AMPWEBADDRESS/recordings/index.php to check your voicemail with a web browser."

    And you're going, 'Hakowee !

    Two parts next :

    Part One from your text editor, you're going to this file /etc/asterisk/vm_email.inc
    That's the issuing file for that formatted eMail.

    ( NOTE : when viewing this, there are a bunch of "n's" & "t's" Those are ALL backslash n's & t's ... jsut doen't show here quite right ... somebody could give a long answer )

    Part Two It is this Line

    emailbody=${VM_NAME},\n\nThere is a new voicemail in mailbox ${VM_MAILBOX}:\n\n\tFrom:\t${VM_CALLERID}\n\tLength:\t${VM_DUR} seconds\n\tDate:\t${VM_DATE}\n\nDial *98 to access your voicemail by phone.\nVisit http://AMPWEBADDRESS/recordings/index.php to check your voicemail with a web browser.\n

    Now, for me, I did a copy of the line ( probably more proper to do the file.old and and work fresh, And the real coders out here will correct me on that ) :angry: (( hehehe )) and pasted a new line, then put a semi-colon in front of this default line.


    Now, in my new line ..... the "AMPWEBADDRESS" is replaced with my server IP << I just do internal access here at 192.168.xxx.xxx>> and saved .... restart askerisk server to set it first run through ....

    Now my email click/link takes me to recordings .... But it still looks like poop !

    Now, as messing around, that worked; so I copied that line, semi-coloned it, pasted it, and experimented / lesson learned it.


    Gee Whiz, backslash"n " gives me a new line - and backslash "t " gives me a tab <<< OK Guys, I'm an old Mac-er and never did this stuff before >>> :woohoo:


    So, what I set up for my self / my users is the following :


    emailbody=${VM_NAME},\n\nThere is a new voicemail in mailbox ${VM_MAILBOX}:\n\n\tFrom:\t${VM_CALLERID}\n\tLength:\t${VM_DUR} seconds\n\tDate:\t${VM_DATE}\n\nDial *98 to access your voicemail by phone.\n\n\nVisit (click here) http://192.168.xxx.xxx/recordings/index.php to check AND manage your voicemail with a web browser.\n\nThe web access has many options for management. Please DO NOT set the "Remember Password" option at this time. Thank you. \n\nAlso, you can play this voicemail message from here if there is a slider bar below.\n\n\n\n

    {{{ this is all one line - I snagged it for here from my OpenOffice file in my notebook }}}

    with saving and restarting, etc.

    And it works out pretty neat ! With a whole bunch of backslash n's . There's better spacing IMHO ! With a play it slider on the email, there's some line feeds so it's not so cramped.


    Hope this helps you other Head Scratchers out there, :blink:

    Jim


    ++++++++++

    Pages 114 - 115 in Elastix Without Tears has a discussion, also ;)
     

Share This Page