Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intuity Internet Messaging

Status
Not open for further replies.

tcomprojmgr

IS-IT--Management
Sep 20, 2003
25
US
Has anyone successfully set up Internet Messaging on the Intuity server(s)? We're trying to get Intuity to send an email notification to the email address administered on in the subscriber forms when a new message arrives.

I've got POP3 set up, the mail gateway is administered, all of the tests work correctly, and the mail send test works fine too. However, the Intuity server just never seems to automatically send the notifications, although it says that Internet Messaging is running. We've set up the trusted servers and the IMAPI password as well. Is there something that we haven't done? I have been through all of the help documentation and I can't get any help from Avaya or Avaya Business Partners without paying a ridiculous sum.

Any help is greatly appreciated!
 
Remove the mail gateway.

The Intuity will not send out anything. It acts like an e-mail server, and it relies on e-mail clients to access the mail that is stored on it.

So in Outlook, you need to set up a POP3 account to access the Intuity to retrieve the voicemail messages. The login is the extension number and the password is the mailboxes password.
 
I have set this up WITH a gateway, but our company uses a smpt gateway, but you do not really need it as the other person indicated...just think of the Definity as a pop3 server... outlook polls the server for new mail (messages) at the interval you set up via outlook.

I can help you if needed via phone...let me know :)

 
Thanks for the responses.....

I guess we were hoping that the Intuity would actually "send" an outbound message (like a notification) to the email address specified on the subscriber form. However, the more research that we have done, it seems like this email address is used to identify the subscriber to the mail gateway for validation.

Is this your experience?
Thanks!!
 
We use two ways to check for messages in a customer service mailbox. First, one of our NOC stations runs Message Manager. Second, as I mentioned in another thread, we run a Perl script on a separate Linux server that polls the mailbox via POP3 and sends SMS messages to cellphones. (script available upon request - the author has cleared it).
 
m4ilm4n -

Thanks for the reply. Yeah, we're probably going to use your solution to check the mailbox as a POP3, but before we did that we wanted to see if it was possible for Intuity to "push" the messages instead of "pulling" via POP3.
 
I looked thru my system's setup for what you'd like to do, and short of having command-line root access to the Audix box I don't think that "push" can be done with an Intuity.

At any rate, here's the script (vm_check.pl - thanks Chris T.!) I mentioned. I've tried to clean out any stuff customized for us and add comments where needed.

Please make sure you read ALL the comments because there's lots of places it needs to be customized for your setup. For example, replace "[enter vm box here]" with "4001" if 4001 is the mailbox you're monitoring - only the quotes stay, replace everything else.

Once you have the script in place, just do a "perl vm_check.pl". The script will spawn itself as a child process and run in the background. Oh - you need to run this on a system that has both perl 5 and a functioning mailer, e.g. a Linux box with sendmail.

Code:
#!/usr/local/bin/perl

use IO::Socket;
use POSIX;


$die = 0;

# handle signals
$SIG{INT} = $SIG{TERM} = $SIG{HUP} = \&signal_handler;
$SIG{PIPE} = 'IGNORE';


# config settings
$USER = "[enter vm box here]";					# pop3 account
$PASSWORD = "[enter vm password here]";				# password
$SERVER = "[enter name or ip address of audix server here]";	# pop3 server
$ALERT_ADDRESS = "[enter e-mail address of dest phone here]"; 	# use a "\" before the "@"
$QUERY_INTERVAL = 360;						# how long to sleep between checks
$LOGFILE = "/tmp/vm_check_log";					# path to and name of logfile
								# leave "" if none desired

# start a child
$pid = fork;

# kill the parent
exit if $pid;
die "Couldn't fork: $!" unless defined($pid);

# disinherit the child (posthumously)
POSIX::setsid()
	or die "Can't start a new session: $!";

# check the mail count at start-up
$old_count = 0;
$response = check_mail_count();
$old_count = (split(/\s+/,$response))[1];

# log if desired
log_message("Start count: $old_count");

# start infinite loop, $die only sets on SIGINT, SIGHUP, SIGTERM
until ($die)
	{
	# get mail count
	$response = check_mail_count();

	# if it returns 0, somthing bad happened
	next unless $response;

	# otherwise get the count
	$count_now = (split(/\s+/,$response))[1];

	# if the count has gone up...
	if ($count_now > $old_count)
		{
		# send an email
		send_warning($count_now - $old_count);
		}
	# once the warning is sent, or if the total went down, the new total is set
	$old_count = $count_now;

	# sleep for the specified duration
	sleep $QUERY_INTERVAL;
	}
# only get here on SIGHUP/INT/TERM
exit;

# subroutine to communicate with the pop3 server--not at all robust
sub check_mail_count
	{
	# open a connection
	$conn = open_socket(110) or log_message("ERROR Could not open socket to server");
	return 0 unless $conn;

	# await banner, bail if not OK
	$resp = <$conn>;
	unless ($resp =~ /^\+OK/)
		{
		log_message("ERROR Bad response from server: $resp");
		close($conn);
		return 0;
		}

	# send username
	print $conn "USER $USER\n";

	# await response, bail if not OK
	$resp = <$conn>;
	unless ($resp =~ /^\+OK/)
		{
		log_message("ERROR Bad response from server: $resp");
		close($conn);
		return 0;
		}

	# send password
	print $conn "PASS $PASSWORD\n";
	
	# await response, bail if not OK
	$resp = <$conn>;
	unless ($resp =~ /^\+OK/)
		{
		log_message("ERROR Bad response from server: $resp");
		$resp = 0;
		}
	close($conn);

	# the last response should have the number of messages, so return it
	return($resp);
	}

################################################################################
# subroutine to email a warning message when new messages arrive
# argument is the number of new messages
sub send_warning
	{
	# get the number of new messages
	$count = shift;

	# set the appropriate subject/verb agreements
	$msg = $count == 1 ? "message" : "messages";
	$is = $count == 1 ? "is" : "are";

	# build a message body
	$string = "There $is $count new $msg "; 
	$string .= "in the $USER voicemail.";

	# log the message
	log_message($string);

	# send the message
	open(MAIL, "| /usr/lib/sendmail -t");			# -t tells SM to look for "To" line
	print MAIL "From: [enter source e-mail address]\n";	# sending address - use "\" before "@"
	print MAIL "To: $ALERT_ADDRESS\n";			# set above
	print MAIL "Subject: New mail received\n\n";		# note the double newline
	print MAIL "$string\n.\n";				# note the "\n.\n"
	close MAIL;

	return 1;
	}
	
	

# signal handler to break the infinite loop
sub signal_handler
	{
	$die = 1;
	}

##################################################################################
#
# open_socket()
#
# subroutine to open a socket on the remote host. takes a port # as an arg
sub open_socket
        {
	# open a socket
        $remote = IO::Socket::INET->new(
                                Proto => "tcp",
                                PeerAddr => $SERVER,
                                PeerPort => $_[0],
                                Reuse => 1
                                );
	# return the handle or zero
        return $remote ? $remote : 0;
        }

# subroutine to log a message to logfile
# argument is the message to be logged
sub log_message
	{
	# if there is no $LOGFILE, logging is off
	return 1 unless $LOGFILE;

	# grab the message
	$msg = shift;

	# open the log, or turn off logging if that fails
	open(LOG,">>$LOGFILE") or $LOGFILE = ""; 

	# set up a timestamp
	($sc, $mn, $hr, $dy, $mo, $yr) = (gmtime)[0..5];
	$mo++;
	$yr += 1900;
	$sc = "0".$sc if $sc < 10;
	$mn = "0".$mn if $mn < 10;

	# log the message
	print LOG "$yr/$mo/$dy $hr:$mn:$sc $msg\n";
	close LOG
	}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top