Force Flow
Force Flow

Reputation: 724

Using tel: to initiate a call with a phone extension

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.

Upvotes: 4

Views: 6335

Answers (4)

Nisse Engstr&#246;m
Nisse Engstr&#246;m

Reputation: 4752

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.

Upvotes: 2

Raja Hafify
Raja Hafify

Reputation: 29

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

Upvotes: 3

Jimbo
Jimbo

Reputation: 31

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.

Upvotes: 3

Femi
Femi

Reputation: 64700

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).

Upvotes: -3

Related Questions