Howto Copy A Voicemail Message To Another Machine ?

Home » Asterisk Users » Howto Copy A Voicemail Message To Another Machine ?
Asterisk Users 6 Comments

My asterisk server is in the cloud. Figuring out how to send an email is too much brain damage. So i can’t use the email feature that’s built into voicemail.

What I want to do is execute a remote command with the voicemail as an argument. The remote machine command would email the message.

I’m thinking of:

same =>n,VoiceMail(vm,u)
same =>n,System(ssh myserver “emailVM ‘_THE_VOICEMAIL_MESSAGE_'”)

What variables can I use for _THE_VOICEMAIL_MESSAGE_

Or is this better done with externcmd in voicemail.conf ?:

externcmd => ssh myserver “emailVM ‘_THE_VOICEMAIL_MESSAGE_'”

But same question. And can externcmd take arguments ?

sean

6 thoughts on - Howto Copy A Voicemail Message To Another Machine ?

  • Really? That was one of the first things I did when I learned Asterisk. It was dead simple. Rather than creating some sort of Rube Goldberg machine to send email why don’t you explain what you tried and where you ran into problems?

    In case it helps, here are my general settings in voicemail.conf:

    [general]
    attach=yes maxsilence
    serveremail=NULL@Vex.Net format=wav49
    fromstring=Vex.Net Voice Mail nextaftercmd=yes forcename=yes pollmailboxes=yes pollfreq=5

    And for each extension I have this (sanitized):

    1000 => 1234,D’Arcy,darcy@example.com

    That’s the extension, PIN, name and email address.

  • Check out the “externnotify” parameter in voicemail.conf. What it does is run an external program whenever a caller leaves a voicemail message for a user. The way it works is basically any time that somebody leaves a voicemail on the system (regardless of mailbox number), the command specified for externnotify is run with the arguments (in this order):
    context, extension, new voicemails, old voicemails and urgent voicemails. These arguments are passed to the program that you set in the externnotify parameter. Regards;
    John

    —–Original Message—

  • Why? If you can ssh between them, you should also be able to route mail between them. Be that using a custom sendmail command which uses ssh in it.

    rsync the whole mailbox. Should be quick enough.

  • There’s no problem setting up vm on *. I can’t use email off the instance, since the assigned ip address doesn’t have a PTR.

    It looks too much like spam. The mail relays drop it.

    sean

  • This is a very common problem that is usually solved by configuring your asterisk server to send all mail through a valid email server (known as smarthost in postfix or sendmail). You can even configure your server with valid credentials to log in in case they are needed. Just google
    “smarthost (your mail daemon)” and you will get plenty of help. This is much easier than trying to run external scripts to copy the voicemail.

    Of course if you want to do it the hard way you can always configure voicemail to use a database backend and then simply sync the database to another server.


    Telecomunicaciones Abiertas de México S.A. de C.V. Carlos Chávez dCAP #1349
    +52 (55)9116-91161