I need to add a name to a Telephone number which appears on the sceen on the phone in replace of the phone number any suggestions?

Reverend Jim commented: I need to do something with something else. Any suggestions. -3

Dani AI

Generated

Short answer: a tel: link cannot force a phone’s dialer to show a custom name. The tel: URI carries the number and a few parameters only; any display name shown while dialing comes from the device (contact matching) or the carrier’s caller-name databases (CNAM), not from the web page itself. (rfc-editor.org)

Practical page-side approach: render the person’s name as the link label (and add an accessible label) so the site shows the name while the device receives only the number. Use an international/E.164 form in the href (plus sign + country code) so devices and services match the number reliably. Example:

<a href="tel:+14155552671" aria-label="Call John Doe">Call John Doe</a>

For why E.164 matters and the tel: syntax, see the standards. (itu.int)

If the goal is to control what the callee sees when receiving the call (the caller name shown on their phone), that must be handled by the telephone/carrier side (CNAM) or by a telephony provider — not by an HTML link. CNAM registration and propagation are provider- and country-dependent (and often limited in scope), so expect delays and carrier differences. (twilio.com)

Useful advanced options: follow and render names from a database for the webpage UI; offer a downloadable vCard or “add contact” flow so the user’s phone will show the saved name; and, where appropriate, use the Contact Picker API to let users select a contact before initiating a call. Note that ’s point that a tel: link cannot carry a display name is correct, and ’s emphasis on proper international formatting is directly relevant to matching contacts and lookups. (developer.mozilla.org)

Recommended Answers

All 3 Replies

That sounds like the old "look in a database and show what your wnat on screen" that is something web sites do all the time. So that's not new and I bet examples and tutorials are out there. But you would have to tailor it to your web site and server which is what you'll be working on for a few weeks.

If I am understanding (or assuming) correctly, it is not possible to pass name via the tel: links.

And hence it is not possible to change what use will see as name on their phone on clicking these links

When dialing a number within the country you are in, you still need to dial the national trunk number before the rest of the number. For example, in Australia one would dial:
0 - trunk prefix
2 - Area code for New South Wales
6555 - STD code for a specific telephone exchange
1234 - Telephone Exchange specific extension.
For a mobile phone this becomes

0 - trunk prefix
4 - Area code for a mobile telephone
1234 5678 - Mobile telephone number
Now, when I want to dial via the international trunk, you need to drop the trunk prefix and replace it with the international dialing prefix

    • Short hand for the country trunk number
      61 - Country code for Australia
      4 - Area code for a mobile telephone
      1234 5678 - Mobile telephone number
      This is why you often find that the first digit of a telephone number is dropped when dialling internationally, even when using international prefixing to dial within the same country.

So as per the trunk prefix for Germany drop the 0 and add the +49 for Germany's international calling code (for example) giving:

<a href="tel:+496170961709" class="Blondie">
Call me, call me any, anytime
<b>Call me (call me) I'll arrive</b>
When you're ready we can share the wine!
</a>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.