Email notifications for missed calls in Asterisk

View: New views
13 Messages — Rating Filter:   Alert me  

Email notifications for missed calls in Asterisk

by gaojian858 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to set up "Email notifications for missed calls in
Asterisk" follow this link:
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/

Right now,my slug works fine and VM to email is working with esmtp.

But I couldn't make the missing call notice work. I am stuck at the
sendmail, I guess.

What is the shell command line to send out email?

I tried "sendmail mymail@... blah blah" and it doesn't work.

Please help.

Thanks and happy new year.

Jian


Re: Email notifications for missed calls in Asterisk

by CORNELIU DOBAN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nice feature. I will add it to my asterisk, but I'm not using  esmtp
(on the Openslug).

Have you tried to put the full path of the email command in the script:

MAILCMD="/opt/sbin/sendmail"

Check the syntax supported by the esmtp and modify the script accordingly.

Good luck,
Corneliu

--- In nslu2-asterisk@..., "gaojian858" <gaojian858@...>
wrote:
>
> I am trying to set up "Email notifications for missed calls in
> Asterisk" follow this link:
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/

>
> Right now,my slug works fine and VM to email is working with esmtp.
>
> But I couldn't make the missing call notice work. I am stuck at the
> sendmail, I guess.
>
> What is the shell command line to send out email?
>
> I tried "sendmail mymail@... blah blah" and it doesn't work.
>
> Please help.
>
> Thanks and happy new year.
>
> Jian
>



Re: Email notifications for missed calls in Asterisk

by CORNELIU DOBAN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After some modification the script wors fine for me:
http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification

Regards,
Corneliu


--- In nslu2-asterisk@..., "Corneliu Doban"
<corneliu_doban@...> wrote:
>
> Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> (on the Openslug).
>
> Have you tried to put the full path of the email command in the script:
>
> MAILCMD="/opt/sbin/sendmail"
>
> Check the syntax supported by the esmtp and modify the script
accordingly.

>
> Good luck,
> Corneliu
>
> --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> wrote:
> >
> > I am trying to set up "Email notifications for missed calls in
> > Asterisk" follow this link:
> >
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/

> >
> > Right now,my slug works fine and VM to email is working with esmtp.
> >
> > But I couldn't make the missing call notice work. I am stuck at the
> > sendmail, I guess.
> >
> > What is the shell command line to send out email?
> >
> > I tried "sendmail mymail@ blah blah" and it doesn't work.
> >
> > Please help.
> >
> > Thanks and happy new year.
> >
> > Jian
> >
>



Re: Email notifications for missed calls in Asterisk

by gaojian858 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I am still have trouble to get the email out.

I use unSlung 6.8 and Asterisk 1.2. So far, Asterisk made the System()
works. Script is also running. I turn on the debug in the script,
checked the log file, and the outputs are normal. But no email send out.

As I mentioned before, I use esmtp as describled in the NSLU2 wiki
site. The Voicemail to Email feature works fine, which means my slug
do send out email as it should do.

When run, CLI shows:
 -- Executing System("SIP/6042885555-0016bc60",
"/opt/etc/asterisk/emailnotice.sh "7783228888@..." "6042739158"
"Gao Jian" "CANCEL" """) in new stack

Script log file:
7783228888@... 6042739158 "Gao Jian" CANCEL
To: 7783228888@... Subject: [PBX] Incoming call Gao Jian
(6042739158) hung up.


I made a mail.txt file then
/opt/sbin/sendmail -t < mail.txt
And this works.

I think the problem is the line in the script:
$EMAILCMD <<INLINE

I am good at shell script and I don't kow how to make this script works.

Please help. Thanks.

Jian




 



--- In nslu2-asterisk@..., "Corneliu Doban"
<corneliu_doban@...> wrote:
>
> After some modification the script wors fine for me:
>
http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification

>
> Regards,
> Corneliu
>
>
> --- In nslu2-asterisk@..., "Corneliu Doban"
> <corneliu_doban@> wrote:
> >
> > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > (on the Openslug).
> >
> > Have you tried to put the full path of the email command in the
script:

> >
> > MAILCMD="/opt/sbin/sendmail"
> >
> > Check the syntax supported by the esmtp and modify the script
> accordingly.
> >
> > Good luck,
> > Corneliu
> >
> > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > wrote:
> > >
> > > I am trying to set up "Email notifications for missed calls in
> > > Asterisk" follow this link:
> > >
> >
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/

> > >
> > > Right now,my slug works fine and VM to email is working with esmtp.
> > >
> > > But I couldn't make the missing call notice work. I am stuck at the
> > > sendmail, I guess.
> > >
> > > What is the shell command line to send out email?
> > >
> > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > >
> > > Please help.
> > >
> > > Thanks and happy new year.
> > >
> > > Jian
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by gaojian858 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry for the typo in my previous post.

I am NOT good at shell script and I don't know how to make this script
works.

Please help. Thanks.

Jian

--- In nslu2-asterisk@..., "gaojian858" <gaojian858@...>
wrote:

>
> Hello,
> I am still have trouble to get the email out.
>
> I use unSlung 6.8 and Asterisk 1.2. So far, Asterisk made the System()
> works. Script is also running. I turn on the debug in the script,
> checked the log file, and the outputs are normal. But no email send out.
>
> As I mentioned before, I use esmtp as describled in the NSLU2 wiki
> site. The Voicemail to Email feature works fine, which means my slug
> do send out email as it should do.
>
> When run, CLI shows:
>  -- Executing System("SIP/6042885555-0016bc60",
> "/opt/etc/asterisk/emailnotice.sh "7783228888@..." "6042739158"
> "Gao Jian" "CANCEL" """) in new stack
>
> Script log file:
> 7783228888@... 6042739158 "Gao Jian" CANCEL
> To: 7783228888@... Subject: [PBX] Incoming call Gao Jian
> (6042739158) hung up.
>
>
> I made a mail.txt file then
> /opt/sbin/sendmail -t < mail.txt
> And this works.
>
> I think the problem is the line in the script:
> $EMAILCMD <<INLINE
>
> I am good at shell script and I don't kow how to make this script works.
>
> Please help. Thanks.
>
> Jian
>
>
>
>
>  
>
>
>
> --- In nslu2-asterisk@..., "Corneliu Doban"
> <corneliu_doban@> wrote:
> >
> > After some modification the script wors fine for me:
> >
>
http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification

> >
> > Regards,
> > Corneliu
> >
> >
> > --- In nslu2-asterisk@..., "Corneliu Doban"
> > <corneliu_doban@> wrote:
> > >
> > > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > > (on the Openslug).
> > >
> > > Have you tried to put the full path of the email command in the
> script:
> > >
> > > MAILCMD="/opt/sbin/sendmail"
> > >
> > > Check the syntax supported by the esmtp and modify the script
> > accordingly.
> > >
> > > Good luck,
> > > Corneliu
> > >
> > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > wrote:
> > > >
> > > > I am trying to set up "Email notifications for missed calls in
> > > > Asterisk" follow this link:
> > > >
> > >
> >
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/
> > > >
> > > > Right now,my slug works fine and VM to email is working with
esmtp.
> > > >
> > > > But I couldn't make the missing call notice work. I am stuck
at the

> > > > sendmail, I guess.
> > > >
> > > > What is the shell command line to send out email?
> > > >
> > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > >
> > > > Please help.
> > > >
> > > > Thanks and happy new year.
> > > >
> > > > Jian
> > > >
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by gaojian858 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just tried to send an email in command line:

# /opt/sbin/sendmail -t<<INLINE
> to: 7783221232@...
> subject: shell cmd
> body:
> hello,there.
> INLINE
Failed to parse headers

I think this maybe the problem.

But I don't know how to fix it.

Jian




--- In nslu2-asterisk@..., "gaojian858" <gaojian858@...>
wrote:

>
> Sorry for the typo in my previous post.
>
> I am NOT good at shell script and I don't know how to make this script
> works.
>
> Please help. Thanks.
>
> Jian
>
> --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> wrote:
> >
> > Hello,
> > I am still have trouble to get the email out.
> >
> > I use unSlung 6.8 and Asterisk 1.2. So far, Asterisk made the System()
> > works. Script is also running. I turn on the debug in the script,
> > checked the log file, and the outputs are normal. But no email
send out.

> >
> > As I mentioned before, I use esmtp as describled in the NSLU2 wiki
> > site. The Voicemail to Email feature works fine, which means my slug
> > do send out email as it should do.
> >
> > When run, CLI shows:
> >  -- Executing System("SIP/6042885555-0016bc60",
> > "/opt/etc/asterisk/emailnotice.sh "7783228888@" "6042739158"
> > "Gao Jian" "CANCEL" """) in new stack
> >
> > Script log file:
> > 7783228888@ 6042739158 "Gao Jian" CANCEL
> > To: 7783228888@ Subject: [PBX] Incoming call Gao Jian
> > (6042739158) hung up.
> >
> >
> > I made a mail.txt file then
> > /opt/sbin/sendmail -t < mail.txt
> > And this works.
> >
> > I think the problem is the line in the script:
> > $EMAILCMD <<INLINE
> >
> > I am good at shell script and I don't kow how to make this script
works.

> >
> > Please help. Thanks.
> >
> > Jian
> >
> >
> >
> >
> >  
> >
> >
> >
> > --- In nslu2-asterisk@..., "Corneliu Doban"
> > <corneliu_doban@> wrote:
> > >
> > > After some modification the script wors fine for me:
> > >
> >
>
http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification
> > >
> > > Regards,
> > > Corneliu
> > >
> > >
> > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > <corneliu_doban@> wrote:
> > > >
> > > > Nice feature. I will add it to my asterisk, but I'm not using
 esmtp

> > > > (on the Openslug).
> > > >
> > > > Have you tried to put the full path of the email command in the
> > script:
> > > >
> > > > MAILCMD="/opt/sbin/sendmail"
> > > >
> > > > Check the syntax supported by the esmtp and modify the script
> > > accordingly.
> > > >
> > > > Good luck,
> > > > Corneliu
> > > >
> > > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > > wrote:
> > > > >
> > > > > I am trying to set up "Email notifications for missed calls in
> > > > > Asterisk" follow this link:
> > > > >
> > > >
> > >
> >
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/

> > > > >
> > > > > Right now,my slug works fine and VM to email is working with
> esmtp.
> > > > >
> > > > > But I couldn't make the missing call notice work. I am stuck
> at the
> > > > > sendmail, I guess.
> > > > >
> > > > > What is the shell command line to send out email?
> > > > >
> > > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > > >
> > > > > Please help.
> > > > >
> > > > > Thanks and happy new year.
> > > > >
> > > > > Jian
> > > > >
> > > >
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by gaojian858 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Corneliu,

Finally I managed make your script works. The problem is in your
script, when send email, it has to add "From: pbx@..." line
after the "$MAILCMD <<INLINE". After I figure this out, everythig
works just fine.

Jian

--- In nslu2-asterisk@..., "Corneliu Doban"
<corneliu_doban@...> wrote:
>
> After some modification the script wors fine for me:
>
http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification

>
> Regards,
> Corneliu
>
>
> --- In nslu2-asterisk@..., "Corneliu Doban"
> <corneliu_doban@> wrote:
> >
> > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > (on the Openslug).
> >
> > Have you tried to put the full path of the email command in the
script:

> >
> > MAILCMD="/opt/sbin/sendmail"
> >
> > Check the syntax supported by the esmtp and modify the script
> accordingly.
> >
> > Good luck,
> > Corneliu
> >
> > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > wrote:
> > >
> > > I am trying to set up "Email notifications for missed calls in
> > > Asterisk" follow this link:
> > >
> >
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/

> > >
> > > Right now,my slug works fine and VM to email is working with esmtp.
> > >
> > > But I couldn't make the missing call notice work. I am stuck at the
> > > sendmail, I guess.
> > >
> > > What is the shell command line to send out email?
> > >
> > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > >
> > > Please help.
> > >
> > > Thanks and happy new year.
> > >
> > > Jian
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by CORNELIU DOBAN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think that it depends on the ISP (email). Mine does work without the
"From:" line.

Glad that you have it working.

Corneliu

--- In nslu2-asterisk@..., "gaojian858" <gaojian858@...>
wrote:

>
> Corneliu,
>
> Finally I managed make your script works. The problem is in your
> script, when send email, it has to add "From: pbx@..." line
> after the "$MAILCMD <<INLINE". After I figure this out, everythig
> works just fine.
>
> Jian
>
> --- In nslu2-asterisk@..., "Corneliu Doban"
> <corneliu_doban@> wrote:
> >
> > After some modification the script wors fine for me:
> >
>
http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification

> >
> > Regards,
> > Corneliu
> >
> >
> > --- In nslu2-asterisk@..., "Corneliu Doban"
> > <corneliu_doban@> wrote:
> > >
> > > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > > (on the Openslug).
> > >
> > > Have you tried to put the full path of the email command in the
> script:
> > >
> > > MAILCMD="/opt/sbin/sendmail"
> > >
> > > Check the syntax supported by the esmtp and modify the script
> > accordingly.
> > >
> > > Good luck,
> > > Corneliu
> > >
> > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > wrote:
> > > >
> > > > I am trying to set up "Email notifications for missed calls in
> > > > Asterisk" follow this link:
> > > >
> > >
> >
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/
> > > >
> > > > Right now,my slug works fine and VM to email is working with
esmtp.
> > > >
> > > > But I couldn't make the missing call notice work. I am stuck
at the

> > > > sendmail, I guess.
> > > >
> > > > What is the shell command line to send out email?
> > > >
> > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > >
> > > > Please help.
> > > >
> > > > Thanks and happy new year.
> > > >
> > > > Jian
> > > >
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by CORNELIU DOBAN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It depends on the email client. Looks that ssmtp (available on
OpenSlug) works without the "From:" line, but esmtp (available on
Unslung) needs it.

I'll update the posted sript (as most people are using Unslung).

Corneliu


--- In nslu2-asterisk@..., "gaojian858" <gaojian858@...>
wrote:

>
> Corneliu,
>
> Finally I managed make your script works. The problem is in your
> script, when send email, it has to add "From: pbx@..." line
> after the "$MAILCMD <<INLINE". After I figure this out, everythig
> works just fine.
>
> Jian
>
> --- In nslu2-asterisk@..., "Corneliu Doban"
> <corneliu_doban@> wrote:
> >
> > After some modification the script wors fine for me:
> >
>
http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification

> >
> > Regards,
> > Corneliu
> >
> >
> > --- In nslu2-asterisk@..., "Corneliu Doban"
> > <corneliu_doban@> wrote:
> > >
> > > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > > (on the Openslug).
> > >
> > > Have you tried to put the full path of the email command in the
> script:
> > >
> > > MAILCMD="/opt/sbin/sendmail"
> > >
> > > Check the syntax supported by the esmtp and modify the script
> > accordingly.
> > >
> > > Good luck,
> > > Corneliu
> > >
> > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > wrote:
> > > >
> > > > I am trying to set up "Email notifications for missed calls in
> > > > Asterisk" follow this link:
> > > >
> > >
> >
>
http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/
> > > >
> > > > Right now,my slug works fine and VM to email is working with
esmtp.
> > > >
> > > > But I couldn't make the missing call notice work. I am stuck
at the

> > > > sendmail, I guess.
> > > >
> > > > What is the shell command line to send out email?
> > > >
> > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > >
> > > > Please help.
> > > >
> > > > Thanks and happy new year.
> > > >
> > > > Jian
> > > >
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by Chibunna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Followed this thread to the end but I still cant seem to get this to work. What I find strange is that it doesnt even log anything . What could I be doing wrong?



--- In nslu2-asterisk@..., "Corneliu Doban" <corneliu_doban@...> wrote:

>
> It depends on the email client. Looks that ssmtp (available on
> OpenSlug) works without the "From:" line, but esmtp (available on
> Unslung) needs it.
>
> I'll update the posted sript (as most people are using Unslung).
>
> Corneliu
>
>
> --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> wrote:
> >
> > Corneliu,
> >
> > Finally I managed make your script works. The problem is in your
> > script, when send email, it has to add "From: pbx@" line
> > after the "$MAILCMD <<INLINE". After I figure this out, everythig
> > works just fine.
> >
> > Jian
> >
> > --- In nslu2-asterisk@..., "Corneliu Doban"
> > <corneliu_doban@> wrote:
> > >
> > > After some modification the script wors fine for me:
> > >
> >
> http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification
> > >
> > > Regards,
> > > Corneliu
> > >
> > >
> > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > <corneliu_doban@> wrote:
> > > >
> > > > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > > > (on the Openslug).
> > > >
> > > > Have you tried to put the full path of the email command in the
> > script:
> > > >
> > > > MAILCMD="/opt/sbin/sendmail"
> > > >
> > > > Check the syntax supported by the esmtp and modify the script
> > > accordingly.
> > > >
> > > > Good luck,
> > > > Corneliu
> > > >
> > > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > > wrote:
> > > > >
> > > > > I am trying to set up "Email notifications for missed calls in
> > > > > Asterisk" follow this link:
> > > > >
> > > >
> > >
> >
> http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/
> > > > >
> > > > > Right now,my slug works fine and VM to email is working with
> esmtp.
> > > > >
> > > > > But I couldn't make the missing call notice work. I am stuck
> at the
> > > > > sendmail, I guess.
> > > > >
> > > > > What is the shell command line to send out email?
> > > > >
> > > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > > >
> > > > > Please help.
> > > > >
> > > > > Thanks and happy new year.
> > > > >
> > > > > Jian
> > > > >
> > > >
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by Chibunna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Whenever I try to send a command directly via command line I keep getting Failed to Parse error. Not sure what's going on as the syntax is correct and  I can send emails from my voicemail

/opt/sbin/sendmail -t <<INLINE
To:chib@...
From=EvilSlug@...
Subject:XCN
sssddddd
INLINE

Failed to parse headers



--- In nslu2-asterisk@..., "Chibunna" <chibunna@...> wrote:

>
> Followed this thread to the end but I still cant seem to get this to work. What I find strange is that it doesnt even log anything . What could I be doing wrong?
>
>
>
> --- In nslu2-asterisk@..., "Corneliu Doban" <corneliu_doban@> wrote:
> >
> > It depends on the email client. Looks that ssmtp (available on
> > OpenSlug) works without the "From:" line, but esmtp (available on
> > Unslung) needs it.
> >
> > I'll update the posted sript (as most people are using Unslung).
> >
> > Corneliu
> >
> >
> > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > wrote:
> > >
> > > Corneliu,
> > >
> > > Finally I managed make your script works. The problem is in your
> > > script, when send email, it has to add "From: pbx@" line
> > > after the "$MAILCMD <<INLINE". After I figure this out, everythig
> > > works just fine.
> > >
> > > Jian
> > >
> > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > <corneliu_doban@> wrote:
> > > >
> > > > After some modification the script wors fine for me:
> > > >
> > >
> > http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification
> > > >
> > > > Regards,
> > > > Corneliu
> > > >
> > > >
> > > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > > <corneliu_doban@> wrote:
> > > > >
> > > > > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > > > > (on the Openslug).
> > > > >
> > > > > Have you tried to put the full path of the email command in the
> > > script:
> > > > >
> > > > > MAILCMD="/opt/sbin/sendmail"
> > > > >
> > > > > Check the syntax supported by the esmtp and modify the script
> > > > accordingly.
> > > > >
> > > > > Good luck,
> > > > > Corneliu
> > > > >
> > > > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > > > wrote:
> > > > > >
> > > > > > I am trying to set up "Email notifications for missed calls in
> > > > > > Asterisk" follow this link:
> > > > > >
> > > > >
> > > >
> > >
> > http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/
> > > > > >
> > > > > > Right now,my slug works fine and VM to email is working with
> > esmtp.
> > > > > >
> > > > > > But I couldn't make the missing call notice work. I am stuck
> > at the
> > > > > > sendmail, I guess.
> > > > > >
> > > > > > What is the shell command line to send out email?
> > > > > >
> > > > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > > > >
> > > > > > Please help.
> > > > > >
> > > > > > Thanks and happy new year.
> > > > > >
> > > > > > Jian
> > > > > >
> > > > >
> > > >
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by CORNELIU DOBAN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think empty lines around the body are required.
Also, "From" needs ':' instead of '='.
Try with space after To, From and Subject.

Try this:

/opt/sbin/sendmail -t <<INLINE
To: chib@...
From: EvilSlug@...
Subject: XCN

sssddddd

INLINE


--- In nslu2-asterisk@..., "Chibunna" <chibunna@...> wrote:

>
> Whenever I try to send a command directly via command line I keep getting Failed to Parse error. Not sure what's going on as the syntax is correct and  I can send emails from my voicemail
>
> /opt/sbin/sendmail -t <<INLINE
> To:chib@...
> From=EvilSlug@...
> Subject:XCN
> sssddddd
> INLINE
>
> Failed to parse headers
>
>
>
> --- In nslu2-asterisk@..., "Chibunna" <chibunna@> wrote:
> >
> > Followed this thread to the end but I still cant seem to get this to work. What I find strange is that it doesnt even log anything . What could I be doing wrong?
> >
> >
> >
> > --- In nslu2-asterisk@..., "Corneliu Doban" <corneliu_doban@> wrote:
> > >
> > > It depends on the email client. Looks that ssmtp (available on
> > > OpenSlug) works without the "From:" line, but esmtp (available on
> > > Unslung) needs it.
> > >
> > > I'll update the posted sript (as most people are using Unslung).
> > >
> > > Corneliu
> > >
> > >
> > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > wrote:
> > > >
> > > > Corneliu,
> > > >
> > > > Finally I managed make your script works. The problem is in your
> > > > script, when send email, it has to add "From: pbx@" line
> > > > after the "$MAILCMD <<INLINE". After I figure this out, everythig
> > > > works just fine.
> > > >
> > > > Jian
> > > >
> > > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > > <corneliu_doban@> wrote:
> > > > >
> > > > > After some modification the script wors fine for me:
> > > > >
> > > >
> > > http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification
> > > > >
> > > > > Regards,
> > > > > Corneliu
> > > > >
> > > > >
> > > > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > > > <corneliu_doban@> wrote:
> > > > > >
> > > > > > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > > > > > (on the Openslug).
> > > > > >
> > > > > > Have you tried to put the full path of the email command in the
> > > > script:
> > > > > >
> > > > > > MAILCMD="/opt/sbin/sendmail"
> > > > > >
> > > > > > Check the syntax supported by the esmtp and modify the script
> > > > > accordingly.
> > > > > >
> > > > > > Good luck,
> > > > > > Corneliu
> > > > > >
> > > > > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > > > > wrote:
> > > > > > >
> > > > > > > I am trying to set up "Email notifications for missed calls in
> > > > > > > Asterisk" follow this link:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/
> > > > > > >
> > > > > > > Right now,my slug works fine and VM to email is working with
> > > esmtp.
> > > > > > >
> > > > > > > But I couldn't make the missing call notice work. I am stuck
> > > at the
> > > > > > > sendmail, I guess.
> > > > > > >
> > > > > > > What is the shell command line to send out email?
> > > > > > >
> > > > > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > > > > >
> > > > > > > Please help.
> > > > > > >
> > > > > > > Thanks and happy new year.
> > > > > > >
> > > > > > > Jian
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>



Re: Email notifications for missed calls in Asterisk

by Chibunna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Tried this format and it worked.

> /opt/sbin/sendmail -t <<INLINE
> To: chib@
> From: EvilSlug@
> Subject: XCN
>
> sssddddd
>
> INLINE

Thank you . I've just fixed my system and it works. Can't believe I made such a silly mistake earlier.

Chib

--- In nslu2-asterisk@..., "Corneliu Doban" <corneliu_doban@...> wrote:

>
> I think empty lines around the body are required.
> Also, "From" needs ':' instead of '='.
> Try with space after To, From and Subject.
>
> Try this:
>
> /opt/sbin/sendmail -t <<INLINE
> To: chib@
> From: EvilSlug@
> Subject: XCN
>
> sssddddd
>
> INLINE
>
>
> --- In nslu2-asterisk@..., "Chibunna" <chibunna@> wrote:
> >
> > Whenever I try to send a command directly via command line I keep getting Failed to Parse error. Not sure what's going on as the syntax is correct and  I can send emails from my voicemail
> >
> > /opt/sbin/sendmail -t <<INLINE
> > To:chib@
> > From=EvilSlug@
> > Subject:XCN
> > sssddddd
> > INLINE
> >
> > Failed to parse headers
> >
> >
> >
> > --- In nslu2-asterisk@..., "Chibunna" <chibunna@> wrote:
> > >
> > > Followed this thread to the end but I still cant seem to get this to work. What I find strange is that it doesnt even log anything . What could I be doing wrong?
> > >
> > >
> > >
> > > --- In nslu2-asterisk@..., "Corneliu Doban" <corneliu_doban@> wrote:
> > > >
> > > > It depends on the email client. Looks that ssmtp (available on
> > > > OpenSlug) works without the "From:" line, but esmtp (available on
> > > > Unslung) needs it.
> > > >
> > > > I'll update the posted sript (as most people are using Unslung).
> > > >
> > > > Corneliu
> > > >
> > > >
> > > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > > wrote:
> > > > >
> > > > > Corneliu,
> > > > >
> > > > > Finally I managed make your script works. The problem is in your
> > > > > script, when send email, it has to add "From: pbx@" line
> > > > > after the "$MAILCMD <<INLINE". After I figure this out, everythig
> > > > > works just fine.
> > > > >
> > > > > Jian
> > > > >
> > > > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > > > <corneliu_doban@> wrote:
> > > > > >
> > > > > > After some modification the script wors fine for me:
> > > > > >
> > > > >
> > > > http://www.nslu2-linux.org/wiki/Optware/AsteriskMissedCallEmailNotification
> > > > > >
> > > > > > Regards,
> > > > > > Corneliu
> > > > > >
> > > > > >
> > > > > > --- In nslu2-asterisk@..., "Corneliu Doban"
> > > > > > <corneliu_doban@> wrote:
> > > > > > >
> > > > > > > Nice feature. I will add it to my asterisk, but I'm not using  esmtp
> > > > > > > (on the Openslug).
> > > > > > >
> > > > > > > Have you tried to put the full path of the email command in the
> > > > > script:
> > > > > > >
> > > > > > > MAILCMD="/opt/sbin/sendmail"
> > > > > > >
> > > > > > > Check the syntax supported by the esmtp and modify the script
> > > > > > accordingly.
> > > > > > >
> > > > > > > Good luck,
> > > > > > > Corneliu
> > > > > > >
> > > > > > > --- In nslu2-asterisk@..., "gaojian858" <gaojian858@>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > I am trying to set up "Email notifications for missed calls in
> > > > > > > > Asterisk" follow this link:
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/
> > > > > > > >
> > > > > > > > Right now,my slug works fine and VM to email is working with
> > > > esmtp.
> > > > > > > >
> > > > > > > > But I couldn't make the missing call notice work. I am stuck
> > > > at the
> > > > > > > > sendmail, I guess.
> > > > > > > >
> > > > > > > > What is the shell command line to send out email?
> > > > > > > >
> > > > > > > > I tried "sendmail mymail@ blah blah" and it doesn't work.
> > > > > > > >
> > > > > > > > Please help.
> > > > > > > >
> > > > > > > > Thanks and happy new year.
> > > > > > > >
> > > > > > > > Jian
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>