Discussion:
USA area codes
Michael Pederson
2008-06-08 21:59:35 UTC
Permalink
Howdy,

I am working on a plugin for AT&T in the USA. USA phone numbers have
a three-digit area code before a 3+4 prefix+number. The AT&T form has
separate variables for the destination area code, prefix, and number.
Is it correct that %TO_INT_PREFIX% maps to the area code? But that
variable is not implemented as stated in example.conf.js? Perhaps
someone could point me to the proper location where it could be
implemented and I could take a look at it.

Thanks,
Michael Pederson
Claudio Procida
2008-06-09 07:39:17 UTC
Permalink
Post by Michael Pederson
Howdy,
I am working on a plugin for AT&T in the USA. USA phone numbers have
a three-digit area code before a 3+4 prefix+number. The AT&T form has
separate variables for the destination area code, prefix, and number.
Is it correct that %TO_INT_PREFIX% maps to the area code? But that
variable is not implemented as stated in example.conf.js? Perhaps
someone could point me to the proper location where it could be
implemented and I could take a look at it.
Thanks,
Michael Pederson
Hi Michael,

great news, that would be a killer addition to WebSMS!

Actually the example.conf.js is a bit misleading on that, since the
variable TO_INT_PREFIX is not implemented.

You should use the TO_PREFIX variable, which is set to the first three
numbers of the recipient's number, illustrated as follows:

Recipient's number +1 555 1234567

TO => 5551234567
TO_CCODE => 1
TO_PREFIX => 555
TO_NUMBER => 1234567

Dashes and spaces are automatically stripped from the numbers so you
shouldn't worry about what you get from the Address Book.
In case you need more specialized variables, please request them on this
list.

Good luck,
--
Claudio Procida
Emeraldion Lodge
http://www.emeraldion.it
Claudio Procida
2008-06-09 10:08:07 UTC
Permalink
On Sun, Jun 8, 2008 at 11:59 PM, Michael Pederson
Post by Michael Pederson
Howdy,
I am working on a plugin for AT&T in the USA. USA phone numbers have
a three-digit area code before a 3+4 prefix+number. The AT&T form has
separate variables for the destination area code, prefix, and number.
Is it correct that %TO_INT_PREFIX% maps to the area code? But that
variable is not implemented as stated in example.conf.js? Perhaps
someone could point me to the proper location where it could be
implemented and I could take a look at it.
Thanks,
Michael Pederson
Michael,

following your request, I have added new variables for US phone numbers:

TO_US_AREACODE (first 3 cyphers after country code, same as TO_PREFIX)
TO_US_PREFIX (next 3 cyphers after area code)
TO_US_NUMBER (remaining cyphers after area code and prefix)

They have already been included in the source code repository, and
will be available from the next version of WebSMS (2.9.10).

Please write back when your plugin is ready so I can include it in the
mainstream distribution.

Best regards,
--
Claudio Procida
claudio.procida-***@public.gmane.org
Loading...