Questions tagged [phone-number]

A telephone number or phone number is a sequence of digits used to call from one telephone line to another in a public switched telephone network(PSTN). When telephone numbers were invented, they were short — as few as one, two or three digits — and were given orally to a switchboard operator. As phone systems have grown and interconnected to encompass the world, telephone numbers have become longer.

A telephone number or phone number is a sequence of digits used to call from one telephone line to another in a public switched telephone network. When telephone numbers were invented, they were short — as few as one, two or three digits — and were given orally to a switchboard operator. As phone systems have grown and interconnected to encompass the world, telephone numbers have become longer. In addition to telephones, they now access other devices, such as computers and fax machines.

Telephone numbers must not be stored using numerical data types.

The format of telephone numbers internationally follows ITU-T Recommendation E.164, described here.

This is a useful reference for people creating software to handle telephone numbers: Falsehoods Programmers Believe About Phone Numbers.

1228 questions
18
votes
12 answers

Web based API that can tell me if a number is a landline or cell phone?

My application sends SMS messages to people, but the numbers entered in as their cell phone are sometimes land lines (this is user error or the user not really knowing if the contact number they have is a cell phone or landline.) I found a few…
MikeN
  • 45,039
  • 49
  • 151
  • 227
18
votes
18 answers

Searching for phone numbers in mysql

I have a table which is full of arbitrarily formatted phone numbers, like this 027 123 5644 021 393-5593 (07) 123 456 042123456 I need to search for a phone number in a similarly arbitrary format ( e.g. 07123456 should find the entry (07) 123…
Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
17
votes
6 answers

Phone number format and validation library

This question asking for a phone number format API in Java got me wondering why such an API doesn't seem to exist. Given the number of validation classes available under Apache Commons, I would have thought such an API would be included. My…
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
16
votes
8 answers

Format EditText view for phone numbers

I have an EditText view and I want it to format the user's input into the phone number format. For example, when the user types in 1234567890, the EditText view should dynamically show it as "(123) 456-7890" as soon as the first 3 numbers are…
thedeepfield
  • 6,138
  • 25
  • 72
  • 107
15
votes
4 answers

Get iPhone phone number label from Address Book

So I have a method to get all the contact phone numbers from the address book on the iPhone, but is there a way to get the phone number label? For example you can do this: And I'd be looking to modify my method to print out the label (such as…
ingh.am
  • 25,981
  • 43
  • 130
  • 177
15
votes
5 answers

How to remove non numeric characters from phone number in objective-c?

This is my first attempt to make an ios app. I'm using people picker to ask the user for a phone number, but when it retrieves with the code below, my NSString *phone apears like (0) 111192222-2222. I'm from Brazil and here the correct mask for…
Fernando Crespo
  • 484
  • 6
  • 17
15
votes
3 answers

MSISDN : Is it a SIM Card Data? Why all The Provided Function (from Blackberry and Android) to fetch MSISDN not reliable?

I have several question about MSISDNs. I understand: MSISDN is the basically the phone number It is not IMSI What i need to know further are: Is MSISDN number burnt (stored) in SIM Card? If it is yes, are all providers make sure that there is…
Maria Hientono
  • 193
  • 1
  • 2
  • 9
14
votes
1 answer

How to get phone number in J2ME?

How to get the phone number (not contact numbers,etc) in J2ME application ? The phone number that belongs to sim card in the phone.
user818117
  • 420
  • 1
  • 5
  • 15
14
votes
6 answers

Is there a gem that normalizes and format US phone numbers in ruby?

I was using phony to format phone numbers (meaning, if I put in xxx-xxx-xxxx it would convert to a string, and also tell if there is a (1) before to remove it). But it really doesn't work for us phone number, it's designed for international…
Satchel
  • 16,414
  • 23
  • 106
  • 192
14
votes
2 answers

Formatting Phone Number Input In Angular

I have seen many solutions to formatting a phone number input field in Angularjs, but I cannot find anything on Angular 7. What I essentially want is for the user to type the following in the textfield: 123456789 and for the textfield to format…
Gabe
  • 5,643
  • 3
  • 26
  • 54
14
votes
6 answers

android: how do I format number as phone with parentheses

I have a number that I need to format as a telephone number. If I do PhoneNumberUtils.formatNumber(numStr); Then I get 888-555-1234 But what I need to get is (888) 555-1234 How do I get the second one? Is there a standard android way?
user3093402
  • 1,419
  • 4
  • 20
  • 28
14
votes
1 answer

iOS 7: How to get own number via private API?

Old ways don't work any more: // way 1 void *lib = dlopen("/Symbols/System/Library/Framework/CoreTelephony.framework/CoreTelephony", RTLD_LAZY); NSString* (*getPhoneNumber)() = dlsym(lib, "CTSettingCopyMyPhoneNumber"); if (getPhoneNumber == nil) { …
0x8BADF00D
  • 7,138
  • 2
  • 41
  • 34
14
votes
12 answers

String to Phone Number format on iOS

In my app, I have a string like: "3022513240" I want to convert this like: (302)-251-3240 How can I solve this?
user1673099
  • 3,293
  • 7
  • 26
  • 57
14
votes
2 answers

How do I use AsYouTypeFormatter TextWatcher in Android App?

I am trying to use the AsYouTypeFormatter from Google's libphonenumber with TextWatcher and am not sure if it's possible. I have been able to format the text as typed from an EditText field and output it in another EditText but not able to change…
sugarwaffle
  • 551
  • 1
  • 5
  • 13
14
votes
1 answer

How to construct a telephone number link on Android that includes an extension

On a web page I have a link to a telephone number with extension like this: call now When I tap this link in an iPhone browser, the iPhone will dial 011234404 and then when the call is answered it will dial the…
Farthest Shore
  • 279
  • 4
  • 12