4

What is the proper way to format a tel: link with a phone extension? I've seen a few different suggestions, but I'm unclear on which one is the definitive approach.

<a href="tel:5555555,555">555-5555 ext. 555</a>

Using an android 2.3.4, I have been unable to make a call via a link that dials the phone extension.

RFC3966 indicates that this is the correct format:

extension = ";ext=" 1*phonedigit

But I'm not clear on what the 1* is for, nor have I been able to make that format work either.

Community
  • 1
  • 1
Force Flow
  • 714
  • 2
  • 14
  • 34
  • See [Sending pause to dialer](http://stackoverflow.com/q/5750773/687315). This doesn't appear to be possible. – quietmint Sep 27 '12 at 14:15

4 Answers4

3

The 1* is for the ABNF generative grammar used by RFC3966 and means 1 or more digits make up the extension field.

See http://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_Form for the ABNF used.

Jimbo
  • 31
  • 2
3

You can try <a href="tel:5555555p555">555-5555 ext. 555</a> the p is for 1 sec pause

Raja Hafify
  • 29
  • 1
  • 2
2

The syntax is written in ABNF notation which is described in RFC2234.

The syntax for a tel URI is (abbreviated):

telephone-uri        = "tel:" telephone-subscriber
telephone-subscriber = global-number / local-number
global-number        = global-number-digits *par
local-number         = local-number-digits *par context *par
par                  = parameter / extension / isdn-subaddress
extension            = ";ext=" 1*phonedigit

The "tel:" and ";ext=" tokens are literal strings.
The 1*phonedigit notation means one or more of the following productions (eg. phonedigit).

From what I can tell, the telephone number should be marked up as:

<a href="tel:5555555;ext=555">555-5555 ext. 555</a>

Disclaimer: I have never used phone number URIs and I don't know what the browser support is like. I'm not even sure this is the appropriate use of the ext parameter.

Note also that RFC3966 states that:

Local numbers MUST have a phone-context parameter that identifies the scope of their validity.

Community
  • 1
  • 1
Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
-3

This should work:

<a href="tel:+18881234567">Make a call</a>

It is generally easier using the + at the beginning (requires you have a country code, but guarantees the phone identifies the number right).

Femi
  • 64,273
  • 8
  • 118
  • 148