> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firetone.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Dialling out

> How FireTone reads the number somebody dials, and what it refuses.

A phone can dial a number in any of the forms people actually use: with a `+`,
with the country's own international prefix, in the local form, or as the full
international number without its `+`. FireTone reads each one the way the phone
network does, using the rules of the country it is dialled from.

## The country a call is dialled from

Each organisation has a **Country** (Organisations → edit). An extension can
have its own **Country** when that desk sits somewhere else. Leave it blank and
the extension uses the organisation's.

The country only matters for a number typed **without** a `+`. For example,
`0412345678` is an Australian mobile when dialled from Australia, and means
nothing from India.

## How a number is read

In this order:

1. **An extension of your organisation.** Any length: `1001`, `911003`, or a
   seven-digit extension. The exact extension always wins.
2. **An emergency number** of the country. See [below](#emergency-calls).
3. **A number with `+`** is used as it is, if it is a real number.
4. **A number in the country's own form.** This covers the country's
   international prefix and its local numbers.
5. **Your outside-line prefix, removed.** If the organisation sets an
   **Outside-line prefix** (for example `9`), a number dialled with it in front
   is read again without it.
6. **A full international number without its `+`.** `919216217231` is read as
   `+919216217231`, India, from any country.
7. **Anything else is refused.** The caller hears "The number you dialled is not
   valid", and the reason is logged.

| Dialled from | Dialled            | Goes to                           |
| ------------ | ------------------ | --------------------------------- |
| Australia    | `0412345678`       | `+61412345678`                    |
| Australia    | `0011919216217231` | `+919216217231`                   |
| Australia    | `919216217231`     | `+919216217231`                   |
| India        | `9123456789`       | `+919123456789`                   |
| India        | `01123456789`      | `+911123456789` (Delhi)           |
| India        | `0061412345678`    | `+61412345678`                    |
| USA          | `011919216217231`  | `+919216217231`                   |
| Australia    | `0412345`          | refused: too short to be a number |

Each country's international prefix comes from the country itself: `0011` in
Australia, `00` in India and the UK, `011` in North America. Dialling `00` out of
habit also works where that country uses a different prefix.

<Note>
  FireTone never adds a country code to a number that is not valid with it. It
  used to, which turned `919216217231` into `+61919216217231`: a number that
  does not exist. The call went to the carrier anyway and failed there.
</Note>

## Emergency calls

**FireTone does not carry emergency calls.** If somebody dials their country's
emergency number (000 or 112 in Australia, 112 in India, 911 in North America,
999 in the UK), the call is answered and they hear:

> Emergency calls cannot be made from this phone. Please hang up and call from a
> mobile or landline.

It is logged as a warning. If your organisation uses text-to-speech, the message
is spoken in your organisation's voice; otherwise a recorded prompt plays.

<Warning>
  Make sure everybody who uses these phones knows this, and keeps another way to
  call for help within reach.
</Warning>

## Numbers that forward

A number set to forward to an outside number (Phone numbers → destination
**External**), and a flow's **Route external** step, need a valid number to
forward to. It is checked when you save, in your organisation's country, and
stored in full international form. A number with nothing to forward to, or a
typo, is refused with the reason.

## When a call does not go through

The daemon's log carries each outgoing call's details:

* **`routing`**: what was dialled, the international number it was read as,
  the country used, and how it was read (`local`, `international`, `emergency`,
  `invalid`) and why.
* **`outbound`**: for each carrier tried, the exact number that carrier was
  sent after its own number format and prefix, and the caller ID presented.
* **`outbound call refused by the carrier`**: a warning with the carrier's SIP
  answer (`403`, `503`, …). A refusal usually means the caller ID was not
  accepted, or the number is wrong.

The call's page in the panel shows the carrier's answer under **Far end**. When
the number was dialled in another form, the page also shows it under
**Dialled as**.

A call FireTone refuses before any carrier sees it is announced with its
reason: "This service is not allowed" when no route covers the number, "Calls to
this destination are not allowed on your account" when there is no rate for it,
and "Your balance is not enough to make this call" when credit has run out. Your
operator can set a recording for each; see
[refusal announcements](/operator/organisations#refusal-announcements).

A busy line, or one nobody answers, ends the call. The next carrier is tried
only when a carrier refuses or fails the call.
