dmtelf has asked for the wisdom of the Perl Monks concerning the following question:

I'd like to add notification of events via fax or SMS from Perl to some existing applications.

The telephone numbers, user names etc are stored in a CSV file in the format of user id, user password, name, email address,notify. I can write code to parse/munge this CSV file easily. If notify = 2 notification is by fax. notify = 1 is by SMS. notify = 0 means no notification at all.

The end user can change how they wish to be notified by email or the Web. All this does is toggle the notify bit for that user if the user knows their own user number and password.

What I'm not so sure about is how to add fax/SMS notification functionality. Does anyone have easily modifiable scripts to enable something like this:

&sendfax(user_name,user_number,msg); &sendsms(user_name,user_number,msg);
I understand there are fax/sms gateways - how do you find out which are suitable for occasional use (free) or how to set up one yourself inside a company network?

Any and all advice gratefully received!

Thanks!

dmtelf

Replies are listed 'Best First'.
Re: Sending SMSes (in UK) & faxes from Perl
by SuperCruncher (Pilgrim) on Jul 06, 2000 at 21:23 UTC
    C-era, I have the script for you (SMS, that is). I use breathe.com to send SMS to UK networks: it delivers fast, the only problem has been its very slow interface. So I created a Fast SMS script. You can check it out online, and download the source (GPL) from that URL. There's info about it on that page, and a shameless plug on my home node.

    It is currently designed to run as a CGI prog, but can be modified with ease to work in a way like:

    send_sms($number, $message);

    The script is very well commented as well.

    The only problem is that Breathe's servers are quite often busy: so I have now started using the free SMS service at Lycos UK, however this would be harder to automate. Nevertheless, my Fast SMS script is still very useful, IMHO.

    If you actually have access to the phone that you're going to be sending the message to, you can sign up with BT Cellnet Genie (available to all networks, not just Cellnet). This gives you an e-mail address where all received messages are sent to your phone.

    Hope this helps.

      That sounds like a handy utility. Have you considered uploading it to CPAN? There's a special area for scripts, you know.

      *Woof*

      First, I am not the poster of the question.
      Second, when I saw sms I was think Microsoft SMS, I haven't heard of sms used in relation to phones before (I live in the US not the UK), so I was thinking of somthing else.
      PS Using system or open2 will still work for either one (but use perl if you can).
RE: Sending SMSes (in UK) & faxes from Perl
by ncw (Friar) on Jul 07, 2000 at 00:46 UTC
    If you want something which can speak direct to vodafone/cellnet/orange/etc message centre then download sms_client from http://www.styx.demon.co.uk/ . (Unix program).

    You'll need a modem attached to the server. I've used this extensively and it works very well. I wrote a script which takes an email message and turns it into an SMS message.

    This of course costs more than using someone else's SMS gateway but perhaps it is more reliable?

Re: Sending SMSes (in UK) & faxes from Perl
by c-era (Curate) on Jul 06, 2000 at 19:46 UTC
    If you are using NT you can use system("net send $user_name $user_number $msg\n"); You can also try a system call or open2 to run sms or a fax program. I do not know of any free fax proxy.