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
13
votes
3 answers

libphonenumber for iOS or objective-c port

My goal is to use libphonenumber, google's phone number handling library for an iPhone project I'm working on. After downloading it (and many many hours), I complied the C++ version of the library, and it built a number ".a" files and ".dylib"…
cohen72
  • 2,830
  • 29
  • 44
13
votes
3 answers

Detect an MSISDN (mobile number) with the browser

Are there any HTTP headers one can use to detect a mobile users number other than this X-header x-up-calling-line-id ? I want to detect from all browsers as much as possible to cover all platform mobiles.
kitokid
  • 3,009
  • 17
  • 65
  • 101
13
votes
1 answer

Testing calls/texts to international numbers

I have a web app that currently sends and receives SMSes in the US, and I'd like to add international support. I want to test sending texts to a few different countries (at least UK, Canada, and Mexico), but I don't have access to any phone numbers…
octern
  • 4,825
  • 21
  • 38
13
votes
1 answer

Format phone number and hide #ERROR when return is null SSRS

I'm having an issue and everything i've tried doesn't work. I have a phone number datafield that returns numbers with no formatting '3055558798' but i want it to look like this '(305)555-8798'. I can get that done with this expression: =…
Rodney Maspoch
  • 955
  • 3
  • 13
  • 19
12
votes
4 answers

Selecting a number from user with multiple numbers when using the contact picker

I'm trying to allow a user to select a phone number from a contact using the contact picker. However, right now all the examples I see online show how you can select a contact, but I am hoping to have a second screen then pop up if that contact has…
12
votes
3 answers

How to validate phone number using Yup but is not required?

I am able to validate if what is typed a phone number using this regexp but it is requiring a phone number to be entered in the input field. I am trying to make phone number optional. When I remove .matches phoneRegExp, it works without being…
Random Sog
  • 121
  • 1
  • 1
  • 4
12
votes
4 answers

Ionic2 authentication firebase

I am creating a system of authentication by number of cell phone in ionic 2, for that I use the google guide First, I believe a firebase.auth.RecaptchaVerifier (Is one of the necessary parameters) this.autVer = new…
12
votes
1 answer

isPossibleNumber vs. isValidNumber

I am using Google's libphonenumber library to validate phone numbers on the server-side and I noticed that PhoneNumberUtil has two methods for doing this: isPossibleNumber and isValidNumber. What is the difference between them and when should I be…
Lynn
  • 423
  • 4
  • 10
12
votes
5 answers

Validating US phone number with php/regex

EDIT: I've mixed and modified two of the answers given below to form the full function which now does what I had wanted and then some... So I figured I'd post it here in case anyone else comes looking for this same thing. /* * Function to analyze…
Josh
  • 233
  • 1
  • 4
  • 19
12
votes
7 answers

Allow number to start with ZERO when stored in mysql integer field

I need to store phone numbers starting with 0 but whenever i try to store this in MySql table the starting ZERO is removed because no number start with Zero actually. How to solve this issue? Do I need to change the field type from Integer to…
EzzDev
  • 9,900
  • 12
  • 35
  • 35
12
votes
6 answers

Parse Phone Number into component parts

I need a well tested Regular Expression (.net style preferred), or some other simple bit of code that will parse a USA/CA phone number into component parts, so: 3035551234122 1-303-555-1234x122 (303)555-1234-122 1 (303) 555 -1234-122 etc... all…
Tristan Havelick
  • 67,400
  • 20
  • 54
  • 64
11
votes
5 answers

RegEx for swiss phone number

I need a RegEx to do the validation (using Laravel, a php framework) for a swiss phone number which has to fit this format: +41 11 111 11 11 The "+41" part has to be exactly this way while the rest (11 111 11 11) can be any number between 1 and…
user3524209
  • 111
  • 1
  • 1
  • 3
11
votes
4 answers

Comparing phone numbers in Android

I need to compare two phone numbers to determine if they're from the same sender/receiver. The user may send a message to a contact, and that contact may reply. The reply usually comes in…
Roshnal
  • 1,284
  • 3
  • 16
  • 39
10
votes
2 answers

Automatically format phone number in EditText

In my app, the user has to enter a phone number in an EditText field using the following format: 1(515)555-5555 I don't want the user to type "(", ")", or "-" while entering the number; I want these characters to be added automatically. For…
Amit Kumar
  • 123
  • 1
  • 1
  • 8
10
votes
3 answers

New way to disable Skype phone number links on web site without breaking the number?

The old way I was disabling Skype icons / links on webpages (which I found on this site) no longer seems to work. I've tried: 1. Adding this to the head:
Terri Swiatek
  • 489
  • 2
  • 11
  • 21