Claudio, thanks for your support through this process. This AT&T-US
plugin is my first contribution to open source software. All in all,
the plugin development process is really simple thanks to a great
plugin architecture. I spotted my last error within a few minutes of
turning on debug mode. The snags I encountered were all of the
missing-semi-colon variety.
It is functional for sending a text to myself. WebSMS has all the
pieces of the puzzle, then AT&T's service let me down. While I
originally thought this would allow me, as an AT&T subscriber, to send
texts to anyone, I didn't realize the AT&T web page only allows texts
to other AT&T subscribers.
I can't imagine another login error aside from the two I've seen. The
only message I've seen for a failed text is when the receiving number
is not an AT&T subscriber (aside from JavaScript checks for things
like the correct number of digits in a number). I wanted to add a
catch-all by regexing the phrase that preceded that message since it
would likely precede any error message ("Your message could not be
delivered because of the following problems..."). Is it the case that
if more than one "check" regex is satisfied, that general error is
issued? That is the behavior I saw when I had two in the "check" list
and both were satisfied.
check: [
{
match: /not a valid AT&T wireless number/,
reason: "Receiver must be an AT&T wireless subscriber."
},
{
match: /Your message could not be delivered because of the following
problems/,
reason: "WebSMS does not recognize this AT&T error."
} ]
Second, given that AT&T provides the error warning, "Your message
could not be delivered because of the following problems.", I wanted
to regex the next sentence out and simply relay it to the user. I
don't see this possible within the "check" list, and trying to set a
"vars" name then use it in the "check" list also results in the
general "Error: Sending Failure!".
vars: [
{
match: /Your message could not be delivered because of the following
problems.<br><br>\s+(.+)<br>/,
name: "ATT_US_ERROR_MSG"
} ],
check: [
{
match: /Your message could not be delivered because of the following
problems.<br><br>\s+.+<br>/,
reason: "%ATT_US_ERROR_MSG%"
} ]
So I have just one error check that catches a non-AT&T receiver number.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "WebSMS" group.
To post to this group, send email to websms-/***@public.gmane.org
To unsubscribe from this group, send email to websms-unsubscribe-/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/websms?hl=en
-~----------~----~----~----~------~----~------~--~---