6

I'm writing an iPhone application which needs to have an option to call our office. However, the phone number that needs to be dialed has a 5 digit extension.

I know that to call a regular phone number we can use openURL using something like:

[[UIApplication sharedApplication] 
    openURL:[NSURL URLWithString:@"tel:1-800-555-5555"]];

Can I get this to work with an extension? If so, how?

The Apple docs link to RFC 2806, which describes the URL scheme for tel: and it seems as though extensions are supported, but I can't figure out the syntax from the RFC.

Cœur's user avatar

Cœur

39.1k25 gold badges207 silver badges283 bronze badges

asked Dec 9, 2009 at 16:04

Ben S's user avatar

1

9

Not 100% sure if this is the answer, but from the RFC you linked on page 14:

tel:+358-555-1234567;postd=pp22

The above URL instructs the local entity to place a voice call to +358-555-1234567, then wait for an implementation-dependent time (for example, two seconds) and emit two DTMF dialing tones "2" on the line (for example, to choose a particular extension number, or to invoke a particular service).

Hope this helps.

answered Dec 9, 2009 at 16:09

Topher Fangio's user avatar

2 Comments

I tried it and didn't need the postd. I just put the phone number @"800-555-5555;pp1" and it worked like a charm. Thanks Topher!

I just tried and it wouldn't work with the semicolon! @"+1-800-555-5555p1" worked for me though.

2

If it is a phone system where you dial the main number, hear a prompt and then enter the extension number then you can include a pause in your number to allow for the call to be picked up. Per the RFC 2806 that you linked to this is done using a "p" pause character for each 1 second pause.

answered Dec 9, 2009 at 16:10

mikej's user avatar

mikej

66.6k18 gold badges157 silver badges131 bronze badges

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.