[asterisk-users] Better info on call failure

Kevin Larsen kevin.larsen at pioneerballoon.com
Wed Aug 13 08:40:28 CDT 2014

asterisk-users-bounces at lists.digium.com wrote on 08/13/2014 08:31:01 AM:

> From: "Nick Olsen" <nick at flhsi.com>
> To: <asterisk-users at lists.digium.com>, 
> Date: 08/13/2014 08:31 AM
> Subject: [asterisk-users] Better info on call failure
> Sent by: asterisk-users-bounces at lists.digium.com
> Hey everyone,
> Currently, I've got a PBX that is emailing me on call failures to an
> international SIP provider of ours.
> I'm doing this with exten => 1,1,System(mail -s "Call from $
> {CALLERID(num)} to ${DNID} Failed with DialStatus ${DIALSTATUS}" 
> nick at flhsi.com < /dev/null)
> This works fine, However it's a little lacking. For Instance,
> Our INTL SIP provider will bounce back SIP status messages if the 
> call is rejected. 503 Service unavailable. 6XX over rate limit. 6XX 
> blocked destination..etc. Anyone have any ideas about how I might 
> capture that and include it in my email. Right now they just all 
> bounce CHANUNAVAIL which is expected.
> Thanks!

You could write a shell script that handles the actual mailing and pass in 
the information as arguments when calling the shell script.

exten => 1,1,System(/opt/scripts/asterisk/send-error-email.sh 

In this fashion you could also have a body in your message that contains 
all the extra information. This would work for basically any variable you 
wanted to pull in from Asterisk.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140813/18047e29/attachment.html>

More information about the asterisk-users mailing list