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.
A comma ( , ) is added to the number you are dialing. Enter the extension number, and then tap the call button. You will be connected to the mainline and then to the extension number. After dialing the main number, press and hold# to add a semicolon ( ; ).
There's no need to dial the business number in full. For external callers such as customers or suppliers, the extension numbers have to be added to the main business number. So if your company phone number is 987-6543, then a customer needs to dial 987-6543-103 to speak with Alice or 987-6543-104 to talk to Bob.
Extensions allow companies to route callers to various departments through a single phone number. Dialing an extension is simple—just call the phone number, and enter the extension when prompted.
An extension is a four-digit number that works in the same way as a phone number. The four digits are an extension of the phone number that connects to the main phone line. To continue with the street analogy, if the phone number is equivalent to a street address, the extension is the house number.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With