[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sendsms 2.4, cellcom sending is broken?
[people, sorry about the spam - this is probably getting a bit too detailed
for the linux-il list...]
On Sun, Nov 25, 2001, Skliarouk Arieh wrote about "Re: sendsms 2.4, cellcom sending is broken?":
> I found the mistakes.
> 1. The script no longer checks file .cellphonerc (Where I had working
> login/password). (BTW: why?)
You were probably using Alon's sourceforge version previously, see
http://sourceforge.net/projects/ilsendsms
My version never had that .cellphonerc - you had to configure the script
itself (see the installation notes inside the script, or just get Alon's
version and continue using it).
BTW, Alon, please add a pointer to the sourceforge site in your version too
(if you don't already have it).
> 2. You should add variable "CELLCOMConfigured=YES/NO" to detect such
> persons as me and print respective message.
The next version will print a "wrong user/password" error when the cellcom
user/password are incorrectly set (or not set at all), so it will be much
clearer. This is already the case in Orange.
Here's the error-message patch that I'll add to the next version (which I'm
not releasing yet):
*** sendsms 2001/11/25 10:50:06 1.44
--- sendsms 2001/11/25 11:23:12
*************** if($phonenum =~ m/^0(5[238]|64)[0-9][0-9
*** 395,400 ****
--- 401,420 ----
}
last; # stop retrying to log in
} else {
+ # If this is a known, permanent, error (e.g., wrong password),
+ # then we exit. Otherwise we take this as a transiet error
+ # and try again.
+ if($res->code==302){
+ # http://isend.cellcom.co.il/English/Error.asp?Error=5
+ # is the text of error 5.
+ if($res->headers->{location} eq "Error.asp?Error=5"){
+ print STDERR "Failed login into Cellcom: bad user/password.\n";
+ exit 1;
+ } elsif($res->headers->{location} eq "Error.asp?Error=4"){
+ print STDERR "Failed login into Cellcom: over daily message limit.\n";
+ exit 1;
+ }
+ }
print STDERR "Error: " . $res->status_line . "\n";
# go on to try again
}
--
Nadav Har'El | Sunday, Nov 25 2001, 10 Kislev 5762
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Linux is just like a wigwam: no Windows,
http://nadav.harel.org.il |no Gates and an Apache inside.
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il