How do I query a Windows Phone 7 phone number via API? - windows

Quick question that I can't find an answer to...
How do you find what the number of the phone running Windows Phone 7 is?
For example, in the UK the number would start with 447*. I need this information to send to our server so it can send the user a text message when something has happened.

As far as I know, phone number is not available via the API.

Do you mean the phone's actual number or the country code? +44 is the UK international code. If you mean the phone number, I don't think this is possible. In Mango, you can get the Mobile Operator. Mobile operators tend to have their own first few digits, so you could store a table of those and check it against the operator returned. It may not be wholly accurate, but might be useful if you can get a list of numbers of prefix major operators.

It is not available with the API, nor any private methods.
This is also not in the Mango release as far as I am aware.

Its not available directly; but if you definitely need the phone number and you are providing a useful service that the user is interested in, then just ask the user to provide their phone number.
You can validate if the user has entered the number along with country code by looking at the location and determining the country code from a lookup table/ web service.

Related

In CRM Design, should it be mandatory to update a phone number whenever an address change is requested?

should it be mandatory to update a phone number whenever an address change is requested.
Thank you
Depends. On a lot of factors.
For eg, in India, if the phone type is a landline and the address changed to a different city, the area code of the phone number will be different. Hence, allowing the user to update the phone number also while updating the address makes a lot of sense.
With mobile phones, there is number portability (in most jurisdictions). However, a user could choose to not port their mobile number (rare, but can happen for a number of reasons such as provider coverage in the new area being poor or unavailable). In this case also, it makes sense to update the phone number while updating the address.
So, there is a business case for simplifying the user experience with one single update screen instead of having to update address and phone separately upon change of address, IMHO.

Bardcode to contain transaction sum information

Is it possible to make the POS include the transaction amount in the barcode?
I need to create (i'm a developer) a system where the merchant can print giftcards on the receipt itself and then, when the buyer scans the barcode to his proprietory mobile app, his account will be credited with the amount on receipt.
Do you know if its "doable" using standard cash register operations / plugins?
Thanks a lot!
Yes, you're looking for a price embedded barcode which is possible. If I remember correctly embedded barcodes tend to begin with "2" or "02", a search can bring up more information on them I'm sure.
However this isn't a good idea, as if someone works out that this is the method in which you're crediting accounts, it wouldn't be difficult to spoof a barcode and give yourself some free money.

What is the correct phone number format to send an SMS to Mexico on Twilio?

I am trying to send an SMS to Mexico via Twilio. The Mexican country code is 52 and the area code I am sending to is 667.
I have tried the following
+521667xxxxxxx - which I believe to be correct based on http://en.wikipedia.org/wiki/Telephone_numbers_in_Mexico#Dialing_a_cell_phone_in_Mexico_from_abroad
+011521667xxxxxxx
+001521667xxxxxxx
+52667xxxxxxx
I get the following error from twilio - "is not a mobile number"
This question is old, but people might still wonder about this, so here it goes:
+521667xxxxxxx used to be correct up until August 3rd, 2019. The correct format is +52667xxxxxxx since then. Even now you may have varying degrees of success using the former format since telecom companies are still allowing it, but you should use the new one to avoid problems in the future.
You can confirm this information here: https://www.mexperience.com/mexico-simplifies-telephone-dialing-rules/ (one of the few sources in English I could find)
With respect to the specific number you were trying, it really might not be a mobile number.
According to the twilio docs it would be +53667xxxxxxx. You may also have to enable international messaging
Twilio International Numbers
Enabled International Dialing Permissions

10 digit phone number validation

I'm using cform to capture internet leads on my website. I need a code so that people have to provide full 10 digit phone number or else it wont let them submit the request. Thank you.
Just get the length of what the user provides. check if they are all numbers, and if they are, assume that it is a number.

How do you store cell phone numbers in a database?

With the age of text messages and things like that, what's a good way to store phone numbers in a database?
In the USA, text messages are handled by phone numbers but in other countries I hear they use email addresses so I guess there needs to be a way to differentiate between countries that use cell phone numbers as their address.
Addition:
For example, people in the USA might use 432-342-3333 or 1-432-342-3333 while in the UK they might use +44 800 400000 or they might even leave out the 44. The 44 and the 1 makes a difference when automatically sending out SMS. However, checking the phone number for each country can get tedious. In this case, would you split the country code or would you merge it into a single column and deal it with it there?
I would primarily use a text field, or a series of text fields, even if you are using a numerical phone number for the following reasons.
Phone numbers have a great range of values, including extension numbers which may result in numerical columns losing precision.
Losing precision in a phone number is rather bad.
There is no logical reason to want to perform math ( addition/multiplication ) on a phone number.
Additionally, you may want to specify how you are using this data. If you are planning an automated messaging service, you're going to need a series of relaying agents to broadcast via, so you may as well add an identifier that pertains to the relay the information pertains to. Then all you have to worry about is that the relaying agent can understand the content in the text fields.
Generally as text, you don't need all the fancy formatting, unless you need it to parse numbers from different countries that you can't distinguish otherwise. You can always add the formatting later on.
Not as a number!!! Leading zeros may be problematic.
I don't know if you have read these two questions, but they might help you a little.
Phone Number Columns in a Database
Is there a standard for storing normalized phone numbers in a database?
Perhaps it would be wise to store the type of number (landline, cell, fax) and/or the messages that can be received on it (voice, text, email). Note that in the US, it is also possible to send text messages to a phone via email, but I believe that is dependent on the carrier.

Resources