| name | israeli-phone-numbers |
| description | Classify Israeli phone numbers before saving them — star (*XXXX) numbers, 1-800 toll-free, 1-700/1-599 business toll where the caller pays, premium 19XX, short codes, extensions and E.164 forms — and work out which of them will not connect from outside Israel or from a foreign SIM. Use when adding numbers to a contact, when a number does not connect, or when tidying imported numbers. |
Israeli phone numbers
The question worth answering before saving a number is not whether it is well
formed but whether it will connect, and from where. In Israel those two things
come apart more than in most countries, and the failure is silent: the number
looks fine in the contact and simply does not ring.
Run the classifier rather than reasoning about the format:
python3 scripts/il_phone.py classify '*3450' '1-800-22-1000' '02-629-4666'
python3 scripts/il_phone.py classify --json '+972 54 123 4567'
It returns the kind, the form to dial inside Israel, an E.164 form or an
explicit statement that none exists, whether it works from abroad, the cost
class, and a Dial Notes value for the whole set. reference/numbering-plan.md
has the prefix table and its sourcing.
The three traps
1-800 does not travel. Toll-free 1-800 and business-toll 1-700 are
unreachable from most countries outside Israel. This bites an oleh in both
directions — the number on the agency's website fails from a foreign SIM still
in the handset, and fails again when calling from abroad to sort something out
before arriving. Whenever the main number is 1-800, 1-700, 1-599, 19XX
or a star number, look for a geographic 0X fallback and save it as a second
phone with role abroad. If none exists, record that in Dial Notes —
knowing there is no way through is itself worth storing.
Star numbers are not phone numbers. *XXXX is a speed-dial service with no
E.164 form, resolving only on Israeli networks. Store it exactly as written,
asterisk included. Never let a tidy-up pass strip the asterisk or wrap it in
+972; if a star number comes back from a sync or an import without its
asterisk, that is the round trip corrupting it, not a typo to fix.
1-800 and 1-700 look alike and cost differently. 180X is free to the
caller; 1700 and 1599 are business toll — the caller pays, and from a mobile
plan without a package it is not always cheap. Agency websites list them
interchangeably. Record which one the source actually printed and do not
paraphrase one as the other.
Extensions
Keep the extension out of the number. The classifier extracts it from ext 4,
שלוחה 4, ,,4 and /4, and by default returns the base number with the
extension held separately — it belongs in the phone's label or in Dial Notes.
The reason is that the pause character a dialler needs before extension digits
differs by platform, and a value with embedded pause commas has been seen to
come back from Google Contacts sync in a form that no longer dials. If a
specific handset is known to handle it, --ext-style pause produces
03-555-5555,,4 and --ext-style rfc3966 produces +97235555555;ext=4.
Formatting
Store numbers as they are dialled inside Israel: 02-629-4666, 054-123-4567.
That is what the user will compare against a sign or a website.
Do not regroup a printed 1-800 or 1-700 number. 1-800-22-1000 and
1-800-221-000 are the same number, and the grouping an agency prints is how
its customers recognise it. The classifier preserves the source's grouping and
normalises only the separators; keep that behaviour if editing by hand.
Short codes
100 police, 101 ambulance, 102 fire, 104 Home Front Command, and the
municipal call centre — 106 in most cities, but 107, 108 or 109 in
some. If you are saving a city hall contact, record the actual short code for
that municipality rather than assuming 106.
Generally these are not worth saving as contacts: three digits, and every
Israeli handset reaches them without a phonebook. The exception is the
municipal one, precisely because it varies.