Re: Paging in Perl
by kschwab (Vicar) on Sep 09, 2002 at 18:46 UTC
|
Paging providers typically provide several mechanisms
to send pages. Here's my take:
- SMTP This is the most widely supported,
but least well defined. The format of the message
is entirely up the provider and how they translate
email to a page. Also, unless you do a bit of work,
the message could sit in a local or remote mail queue.
( try a combination of Net::DNS::Resolver and
Net::SMTP if you want to connect directly
to the remote SMTP server).
- TAP (aka IXO ) This is probably the second
most widely supported method. Clunky because you
have to do it via a modem, but handy for the same reason.
( if your monitoring box notices that the network is
down, the modem could still be accessible for notification).
I've found it easiest to just have perl talk to kermit. Google around
for a script called "ckepage.ksc".
- SNPP (simple network paging protocol) Third most widely supported method. Check
out Net::SNPP. If your provider supports it,
this is probably the most straightforward way to send
pages.
- WCTP: (wireless communication transfer protocol ). This is probably the least widely supported
protocol, but is the "latest/greatest" thing. I'm not
aware of a perl implementation yet, but there general
info here.
Other links that might be helpful:
- sendpage - a pretty
comprehensive paging system that include SNPP and TAP
clients, as well as an SNPP server
- Part of the kermit faq explaining how to send a page from kermit
- Net::Pager this perl module uses Simplewire's quasi-free
paging service, which I don't like. Perhaps you will though.
I've done quite a bit of pager integration with perl,
so feel free to /msg me if you need more specific info.
Good luck !
Update:This link has fairly decent information on which paging
providers support SNPP, WCTP, etc. Also shows host
and port names for the services.
| [reply] |
|
Don't forget web interfaces, many paging companies let you send pages through a web interface like this one.
I'd be far more messy than having a nice builtin perl module, but I suspect it wouldn't be that difficult to get the format of the form submission and write a script to send requests to it.
| [reply] |
Re: Paging in Perl
by Ovid (Cardinal) on Sep 09, 2002 at 18:25 UTC
|
That's not a function of Perl, it's a function of your pagers and their service provider. Check your documentation to see how you can page them. Must you call them and enter a number? If so, you'll need to have your script talk to a modem. Many providers, however, have methods of sending pages via email. Perhaps contacting your pager service provider would be a better way to go.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
| [reply] |
|
I assumed this was the case, I was just hoping there would be a way somehow to do this.
Thanks for the reply.
d
| [reply] |
Re: Paging in Perl
by Helter (Chaplain) on Sep 09, 2002 at 18:56 UTC
|
I think you need a pager that supports e-mail paging. In my last company some people had them, and you could write scripts that would send an e-mail to the pager, and get it any-time any-place.
Here's a node that sends an e-mail to a pager when a webpage changes: Ebay, my pager and my dad
I hope I have not mis-understood your post. If in fact you were refering to paging, like sending some sort of instant message, try Net::AIM, and an example AIM Offline Messaging Bot or Power Failure Notify via AIM.
After a little more searching I found Power Failure Notify via IRC, and there he uses Net::IRC and mentions using net::msn, but I could not find it at CPAN.
Good luck!
Update: Teach me to take too long to post! | [reply] |
Re: Paging in Perl
by mjeaton (Hermit) on Sep 09, 2002 at 18:29 UTC
|
Many (if not most) pagers actually have email addresses associated with them (<pagernumber>@yourpagingservice.com). You may want to check that possibility out first.
mike | [reply] |
Re: Paging in Perl
by fglock (Vicar) on Sep 09, 2002 at 19:09 UTC
|
| [reply] |
Re: Paging in Perl
by dws (Chancellor) on Sep 10, 2002 at 00:03 UTC
|
I am looking for a way to notify/alert admins when a process is complete by paging them instead of emailing.
My cell service is through AT&T. They support SMS. I use this script to send myself an SMS message when certain interesting things happen on my server.
| [reply] |
|
Hi all,
I'm trying to send a page using Perl via the WCTP protocol. For some reason, I cannot connect to the host "wctp.att.net/WCTP" (or any host for that matter) on port 80. I figure it must be some server configuration that I need to set. I don't think it's a port problem b/c I'm able to send a page via WCTP using the same port using a stand-alone app.
Anyhow, here's the code I'm using:
sub send_wctp_old{
#my $url = "http://wctp.cingular.com:80/WCTP";
my $url = "http://wctp.att.net/WCTP";
print "TestEPaging::send_wctp_old()--Sending via WCTP to " . $url . " ";
my $body = "<?xml version=\"1.0\"?><!DOCTYPE wctp-Operation SYSTEM \"http://www.skytel.com/protocols/dtds/wctp/wctpv1-0.dtd\">";
$body = $body . "<wctp-Operation wctpVersion=\"WCTP-DTD-1.1\"><wctp-SubmitClientMessage><wctp-SubmitClientHeader>";
$body = $body . "<wctp-ClientOriginator senderID=\"";
$body = $body . $from;
$body = $body . "\"/><wctp-Recipient recipientID=\"";
$body = $body . $to;
$body = $body . "\"/></wctp-SubmitClientHeader><wctp-Payload><wctp-Alphanumeric>";
$body = $body . $message;
$body = $body . "</wctp-Alphanumeric></wctp-Payload></wctp-SubmitClientMessage></wctp-Operation>";
#my $ua = LWP::UserAgent->new;
my $ua=new LWP::UserAgent;
my $header=new HTTP::Headers;
print "TestEPaging::send_wctp_old()--Created new UserAgent ";
#my $http_response = $ua->request(POST $url, Content_Type => 'text/xml', Content => $body);
my $req = new HTTP::Request ("POST", $url, $header, Content => $body );
my $http_response=$ua->request($req);
print "TestEPaging::send_wctp_old()--Sent request ";
if ($http_response->is_success){
print "TestEPaging::send_wctp_old()--Message sent successfully to " . $to;
}
else{
print "TestEPaging::send_wctp_old()--Message failed - " . $http_response->as_string;
}
}
And here's the error output I'm seeing:
TestEpaging::main()--to=4255333734
TestEpaging::main()--from=1111111111
TestEpaging::main()--message=Hello
TestEpaging::main()--protocol=WCTP
TestEPaging::send_wctp_old()--Sending via WCTP to http://wctp.att.net/WCTP
TestEPaging::send_wctp_old()--Created new UserAgent
TestEPaging::send_wctp_old()--Sent request
TestEPaging::send_wctp_old()--Message failed - 500 Can't connect to wctp.att.net:80 (connect: Unknown error) Content-Type: text/plain Client-Date: Thu, 28 Jun 2007 16:35:30 GMT Client-Warning: Internal response 500 Can't connect to wctp.att.net:80 (connect: Unknown error)
Any advice is much appreciated.
Thanks!
Karim Varela
| [reply] |
|
| [reply] |