In iCal format how would I specify a the contact person's phone number

866 views Asked by At

Looking at the spec here: https://www.ietf.org/rfc/rfc2445.txt
I have a contact person for the event, they have a name, email and phone number.
I see that I can add this field:
ORGANIZER;CN=John Smith:MAILTO:[email protected]
However I'm not sure where to put the phone number.

NB: I'm the producer and primary consumer of this feed, but ideally others could consume it also. And I am using DDay.iCal to generate the feed.

Suggested answer:
If I don't mind if other consumers are missing this field... can I use the X-CUSTOM-FIELD format?

Edit:
Currently I'm doing the following, which works for me, but I'm not sure about other clients?
ORGANIZER;CN=John Smith;tel=00000000000:mailto:[email protected]

Edit: In some circumstances DDay ICal is currently not formatting this field correctly when even though I use the same library to encode and decode it. Here's my encoding method:

calEvent.Organizer = new Organizer("mailto:"+detail.EventDetails.ContactEmail)
{
      CommonName = detail.EventDetails.ContactName,
      Parameters =
      {
          {"tel", detail.EventDetails.ContactPhone }
      }              
 };

And it outputs it like so: (missing spaces before :mailto...)

ORGANIZER;CN=Neque porro quisquam est qui dolorem ips & quia dolo;tel=000 0
 00 0000 or 000 000 0000 or 000 000 0000
:mailto:[email protected]
 .nz
1

There are 1 answers

2
Evert On

There is no standardized field for this. In theory you could replace the mailto: by a tel:, but I'm not sure how well clients would respond.

P.S.: Don't use rfc2445, use rfc5545, it's been out for 6 years =). As a rule of thumb, any obsoleted RFC will have a little "Obsoleted by" note at the top of the document.