Discussion:
[asterisk-users] Attaching VoiceMails on E-Mails
GNUbie
2007-07-27 00:55:01 UTC
Permalink
Hello all,

I am running Asterisk-1.4.5 on my Debian GNU/Linux Etch here and I want to
send the voicemails as attachment to e-mails and delete the voicemails from
my PBX once it has been sent. But, I don't have a running MTA here even on
the PBX itself. I just want to send the e-mails to my GMail account from my
PBX. Can I just use the mail or mailx command to send the e-mail and attach
the voicemail message?

Below are snippets of my voicemail.conf and extensions.conf configuration
files. Please advice whatever you think I need to change with my current
configurations.

Thank you in advance.

GNUbie

- - - < s n i p > - - -

# cat /etc/asterisk/voicemail.conf

[general]
format=wav49
serveremail=***@gnubie.com ; bogus e-mail address
attach=yes
delete=yes
maxmsg=50
maxmessage=180
minmessage=5
maxgreet=60
skipms=3000
maxsilence=10
silencethreshold=128
maxlogins=3
fromstring=The PBX
usedirectory=yes
emaildateformat=%A, %B %d, %Y at %r
sendvoicemail=yes
emailbody=Hi, ${VM_NAME}!\n\nYou have a new voicemail message from
${VM_CALLERID} attached to this e-mail message.\n\nHave a nice day!\n\nThe
PBX
mailcmd=/usr/bin/exim -t ; not sure about this line

[zonemessages]
eastern=America/New_York|'vm-received' Q 'digits/at' IMp

[default]
101 => 11011,GNUbie,***@gmail.com


# grep 10 /etc/asterisk/extensions.conf

exten => 101,1,Dial(Zap/1,20,rt)
exten => 101,2,VoiceMail(101,u)
exten => 100,1,VoiceMailMain(${CALLERID(num)},s)
Tzafrir Cohen
2007-07-27 01:20:31 UTC
Permalink
Post by GNUbie
Hello all,
I am running Asterisk-1.4.5 on my Debian GNU/Linux Etch here and I want to
send the voicemails as attachment to e-mails and delete the voicemails from
my PBX once it has been sent. But, I don't have a running MTA here even on
the PBX itself. I just want to send the e-mails to my GMail account from my
PBX. Can I just use the mail or mailx command to send the e-mail and attach
the voicemail message?
You need to have a package that provides /usr/sbin/sendmail . While you
can get away with using nullmailer or ssmtp (that don't spool mail
locally), I would recommend you to install postfix or exim, so a
temporary problem won't cause the message to get lost on the way.
Post by GNUbie
Below are snippets of my voicemail.conf and extensions.conf configuration
Generally the default voicemail.conf should do.
--
Tzafrir Cohen
icq#16849755 jabber:***@jabber.org
+972-50-7952406 mailto:***@xorcom.com
http://www.xorcom.com iax:***@local.xorcom.com/tzafrir
GNUbie
2007-07-27 01:51:17 UTC
Permalink
Hello Tzafrir,
Post by Tzafrir Cohen
You need to have a package that provides /usr/sbin/sendmail . While you
can get away with using nullmailer or ssmtp (that don't spool mail
locally), I would recommend you to install postfix or exim, so a
temporary problem won't cause the message to get lost on the way.
Oh, I mean, I have Exim installed here but it's not running by default.
Should I run it anyway?

Please advice.

Thank you once again.

GNUbie
Eric "ManxPower" Wieling
2007-07-27 02:25:27 UTC
Permalink
Post by GNUbie
Hello Tzafrir,
Post by Tzafrir Cohen
You need to have a package that provides /usr/sbin/sendmail . While you
can get away with using nullmailer or ssmtp (that don't spool mail
locally), I would recommend you to install postfix or exim, so a
temporary problem won't cause the message to get lost on the way.
Oh, I mean, I have Exim installed here but it's not running by default.
Should I run it anyway?
Yes. You should be able to tell Exim to only listen on the 127.0.0.1
interface. I'm sure you can tell Exim to not listen on any interface,
but don't ask me how 8-)

You might want to tell Exim to send all e-mail thru your main SMTP
server machine (the correct term in most MTA docs is "smarthost".
Marco Mouta
2007-07-27 01:44:55 UTC
Permalink
hi,

The VoiceMail<http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+voicemail2>application
uses
*/usr/sbin/sendmail* to mail voicemail messages to users. This can be any
sendmail-compatible MTA. In practice you can use
Sendmail<http://sendmail.org/>,
Postfix <http://postfix.org/>, Exim <http://www.exim.org/> or any
other MTA<http://www.voip-info.org/wiki/edit.php?page=Asterisk+voicemail+MTA>.
It is recommended to use the default one that comes with your distribution.

I would say if you just create your "own" sendmail.sh and place it
/usr/sbin/sendmail, asterisk will execute it by default, do not forget to
give permissions for asterisk user to execute it.
Post by GNUbie
Hello all,
I am running Asterisk-1.4.5 on my Debian GNU/Linux Etch here and I want to
send the voicemails as attachment to e-mails and delete the voicemails from
my PBX once it has been sent. But, I don't have a running MTA here even on
the PBX itself. I just want to send the e-mails to my GMail account from my
PBX. Can I just use the mail or mailx command to send the e-mail and attach
the voicemail message?
Below are snippets of my voicemail.conf and extensions.conf configuration
files. Please advice whatever you think I need to change with my current
configurations.
Thank you in advance.
GNUbie
- - - < s n i p > - - -
# cat /etc/asterisk/voicemail.conf
[general]
format=wav49
attach=yes
delete=yes
maxmsg=50
maxmessage=180
minmessage=5
maxgreet=60
skipms=3000
maxsilence=10
silencethreshold=128
maxlogins=3
fromstring=The PBX
usedirectory=yes
emaildateformat=%A, %B %d, %Y at %r
sendvoicemail=yes
emailbody=Hi, ${VM_NAME}!\n\nYou have a new voicemail message from
${VM_CALLERID} attached to this e-mail message.\n\nHave a nice day!\n\nThe
PBX
mailcmd=/usr/bin/exim -t ; not sure about this line
[zonemessages]
eastern=America/New_York|'vm-received' Q 'digits/at' IMp
[default]
# grep 10 /etc/asterisk/extensions.conf
exten => 101,1,Dial(Zap/1,20,rt)
exten => 101,2,VoiceMail(101,u)
exten => 100,1,VoiceMailMain(${CALLERID(num)},s)
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
--
Esta mensagem (incluindo quaisquer anexos) pode conter informação
confidencial para uso exclusivo do destinatário. Se não for o destinatário
pretendido, não deverá usar, distribuir ou copiar este e-mail. Se recebeu
esta mensagem por engano, por favor informe o emissor e elimine-a
imediatamente. Obrigado.

This e-mail message is intended only for individual(s) to whom it is
addressed and may contain information that is privileged, confidential,
proprietary, or otherwise exempt from disclosure under applicable law. If
you believe you have received this message in error, please advise the
sender by return e-mail and delete it from your mailbox. Thank you.
GNUbie
2007-07-27 02:17:08 UTC
Permalink
Hello Marco,
hi,
The VoiceMail<http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+voicemail2>application uses
*/usr/sbin/sendmail* to mail voicemail messages to users. This can be any
sendmail-compatible MTA. In practice you can use Sendmail<http://sendmail.org/>,
Postfix <http://postfix.org/>, Exim <http://www.exim.org/> or any other
MTA <http://www.voip-info.org/wiki/edit.php?page=Asterisk+voicemail+MTA>.
It is recommended to use the default one that comes with your distribution.
If shall I say I'll use Exim4 here, what do I need to do then?

I would say if you just create your "own" sendmail.sh and place it
/usr/sbin/sendmail, asterisk will execute it by default, do not forget to
give permissions for asterisk user to execute it.
If I'll create this script, what will be its contents then? Currently, the
/usr/sbin/sendmail is a symbolic link to /usr/sbin/exim4 for your
information.

Please advice.

GNUbie
Tzafrir Cohen
2007-07-27 07:30:56 UTC
Permalink
Post by GNUbie
Hello Marco,
hi,
The
VoiceMail<http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+voicemail2>application uses
*/usr/sbin/sendmail* to mail voicemail messages to users. This can be any
sendmail-compatible MTA. In practice you can use
Sendmail<http://sendmail.org/>,
Postfix <http://postfix.org/>, Exim <http://www.exim.org/> or any other
MTA <http://www.voip-info.org/wiki/edit.php?page=Asterisk+voicemail+MTA>.
It is recommended to use the default one that comes with your distribution.
If shall I say I'll use Exim4 here, what do I need to do then?
I would say if you just create your "own" sendmail.sh and place it
/usr/sbin/sendmail, asterisk will execute it by default, do not forget to
give permissions for asterisk user to execute it.
If I'll create this script, what will be its contents then? Currently, the
/usr/sbin/sendmail is a symbolic link to /usr/sbin/exim4 for your
information.
NO. YOU DON'T NEED TO.

exim already provides /usr/sbin/sendmail (this is handled through dpkg
diversions in Debian, IIRC). Any MTA package does. The next thing to do
is to see that you can send mail from the command-line, using:

mail -s test123 ***@gnubie.com </dev/nulll

If this doesn't work, you may need to configure exim. Consider
/var/log/exim/mainlog (IIRC) and dpkg-reconfigure exim4-config

This is also a Linux / Debian question and not an Asterisk one...
--
Tzafrir Cohen
icq#16849755 jabber:***@jabber.org
+972-50-7952406 mailto:***@xorcom.com
http://www.xorcom.com iax:***@local.xorcom.com/tzafrir
GNUbie
2007-07-28 03:12:20 UTC
Permalink
Hello Tzafrir,
Post by Tzafrir Cohen
NO. YOU DON'T NEED TO.
exim already provides /usr/sbin/sendmail (this is handled through dpkg
diversions in Debian, IIRC). Any MTA package does. The next thing to do
If this doesn't work, you may need to configure exim. Consider
/var/log/exim/mainlog (IIRC) and dpkg-reconfigure exim4-config
This is also a Linux / Debian question and not an Asterisk one...
Thank you for the tips. I really appreciate it.

GNUbie

Loading...