No account yet? Create one
Forgot your Username or Password?

Welcome to the Voxilla VoIP Forum.

Voxilla has been a trusted source for accurate, up-to-date information on the IP Communications industry since 2002. A dedicated staff of reporters and engineers produce feature articles and product reviews to keep industry watchers abreast of the people, companies, and trends driving a fast moving market.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.





Closed Thread
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old March 3rd, 2005, 08:46 AM
_Belial _Belial is offline
Junior Member
 
Join Date: Feb 2005
Posts: 16
_Belial
Default notification of missed calls and changing unavailable messag

Hi there,

I've got a question for all the aterisk experts here

Firstly, i'd like to setup something to email me when I miss a call, I dont want all calls mailed, just ones that I miss and do not go to voicemail (because i've got it working fine when it emails me voicemail messages). Can anyone point me the right direction to get this working?

Also Is there a way to stop the announcement of extension number for the unavailable message? At the moment the voice says "the person at extensions blah is not available", I'd like to change it so that it doesnt announce the extension number. I knowi can replace the voice files for the rest of it but there must be some script somewhere that generates that sequence, where is it and is it possible to not call the extension number?


Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2 (permalink)  
Old March 3rd, 2005, 11:17 AM
muppetmaster muppetmaster is offline
Senior Member
 
Join Date: Apr 2004
Location: Amsterdam, Netherlands
Posts: 345
muppetmaster
Default RE: notification of missed calls and changing unavailable me

Best way is to write an AGI script, if you use this it is fairly straightforward:

http://phpagi.sourceforge.net (I also posted an example below that uses the SMTP class in PHP).

Having said this there may be a few issues in doing this. Most variables dissappear by the time you get to executing an 'h' extension, which is actually lame. So the best way to do it is to use the 'g' flag in your dial command:

Quote:
Originally Posted by Wiki
g: When the called party hangs up, exit to execute more commands in the current context.
http://www.voip-info.org/tiki-index....0Dial#comments

This will let you pop out when the caller hangs up and call the AGI, hopefully the variables stick around (I think they do).

Good luck!

Quote:
Originally Posted by Example Email Script -
#!/usr/bin/php -q
<?php

// Include database connection details
include("ast_db_connects.php");

// Invoke Asterisk PHP Library
require("phpagi.php");

$agi = new AGI($cfgfile="/etc/asterisk/phpagi.conf");

// Class for sending via Sendmail

require("class.phpmailer.php");

$vmail_ext = $agi->get_var("VMAIL_EXT");

// Initialize database
$db_query="SELECT * FROM short_dials WHERE dial_code='$vmail_ext'";

$db_link = mysql_connect($db_host,$db_user,$db_pass);

if (!db_link) {
die('Could not connect: ' . mysql_error());
}

@mysql_select_db($db_name) or die("Unable to select database");

//Fetch the email address and name of the person

$db_result=mysql_query($db_query);
$db_rows=mysql_numrows($db_result);

echo "".$db_rows."\n\n";

if ($db_rows > 0) {
$email_address=mysql_result($db_result,0,"email");
$email_name=mysql_result($db_result,0,"name");

//Convert audio file from wav to mp3
exec("lame -h /tmp/asterisk/voicemail.wav /tmp/asterisk/voicemail.mp3");

// Send email
$mail = new PHPMailer();
$mail->From = "joe@blow.net";
$mail->FromName = "Joe Blow";
$mail->AddAddress("$email_address","$email_name");
$mail->AddReplyTo("joe@blow.net","Joe Blow");

$mail->AddAttachment("/tmp/asterisk/voicemail.mp3");

$mail->Subject = "MP3 Voicemail from Mr Blow";
$mail->Body = "Hello,\n\nAttached is a voicemail from me! Should play in your RealPlayer or Windows Media Player.\n\nRegards,\n\nJoe";

if(!$mail->Send()) {
echo "mess up\n";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
} else {
echo "Success\n";
}
}

mysql_close($db_link);

exit;
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3 (permalink)  
Old March 3rd, 2005, 07:27 PM
_Belial _Belial is offline
Junior Member
 
Join Date: Feb 2005
Posts: 16
_Belial
Default RE: notification of missed calls and changing unavailable me

Thanks MM, that worked a treat, got it emailing me calls that I miss now, yey

Now if only I could change the unavailable message sequence
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4 (permalink)  
Old March 5th, 2005, 09:31 AM
rjwellsted's Avatar
rjwellsted rjwellsted is offline
Junior Member
 
Join Date: Jan 2005
Posts: 7
rjwellsted
Default

call your voicemail (Exten 8500 on distribution). Login to your mailbox, select option 0, the 1 for the unavailable message, 2 for busy, 3 for your name.

HTH
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:



Similar Threads for: notification of missed calls and changing unavailable messag
Thread Thread Starter Forum Replies Last Post
GXP-2000 How do I turn off the "Missed Calls" Msg jonnylbluejeans Grandstream Support Forum 1 September 18th, 2006 01:28 PM
sipura missed call asterix not hanging up akash Linksys (Sipura) VoIP Support Forum 0 July 28th, 2005 06:11 PM
Missed calls register on SPA-841 KernelSlap Linksys (Sipura) VoIP Support Forum 1 June 1st, 2005 02:41 PM
Message Notification? ldimegli BroadVoice Support Forum 3 January 4th, 2005 12:30 AM
Click-to-dial at home and missed call SPA3000-de Linksys (Sipura) VoIP Support Forum 3 August 3rd, 2004 02:35 PM


Advertise Here

All times are GMT. The time now is 09:12 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc. Logos and trademarks are the property of Voxilla or their respective owner. All other content © 2003-2007 by Voxilla, Inc.