Subject: [Simple] Adding a telephone number to a basic PIDF document

From: "Tim Rang" <[email-masked]>
Date: Thu, 6 Oct 2005 15:33:12 -0700

My apologies if I have addressed this to the wrong alias, but I am
having a PIDF problem which I need help with.  My goal is to add a user
specified phone number to an existing PIDF document format.  I do not
wish to make a SIP endpoint available for A/V calls, just to tell people
how to dial my PSTN number.  My starting point is a basic PIDF document
like the following-

<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:ep="urn:ietf:params:xml:ns:pidf:status:rpid-status"
xmlns:et="urn:ietf:params:xml:ns:pidf:rpid-tuple" 

xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid" entity="sip:[email-masked]">

  <tuple id="0">

    <status>

      <basic>open</basic>

      <ep:activities>

        <ep:activity>away</ep:activity>

      </ep:activities>

    </status>

  </tuple>

  <ci:display-name>Foo Bar</ci:display-name>

</presence>

Excluding the option of vcard, I assume that I need to add this phone as
a device.  So I add a device tuple.  Since I have nothing more reliable
to use than the telephone number, it is used in both the id attribute
and the deviceID element.  Draft-ietf-simple-presence-data-model-05
doesn't state explicitly as far as I can tell, but reading between the
lines I don't think I can have a device without an associated deviceID
element pointing to it from a service.  I also assume that the 'note'
element for device is interpreted differently from a note for person or
under the 'presence' root so that the note is merely a descriptor of the
device.  I only assume this because I don't see a better candidate for
describing the device.  Assuming that, my original document is modified
as follows-

<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:ep="urn:ietf:params:xml:ns:pidf:status:rpid-status"
xmlns:et="urn:ietf:params:xml:ns:pidf:rpid-tuple" 

xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
entity="sip:[email-masked]">

  <tuple id="0">

    <status>

      <basic>open</basic>

      <ep:activities>

        <ep:activity>away</ep:activity>

      </ep:activities>

    </status>

  <dm:deviceID>tel:+4255551234</dm:deviceID>
 </tuple>

  <ci:display-name>Foo Bar</ci:display-name>

 <dm:device id="4255551234">
   <dm:deviceID>urn:tel:+4255551234</dm:deviceID>
   <dm:note>Home Phone</dm:note>
 </dm:device>

</presence>

Is this how other folks are implementing this?

Thanks for your feedback,

Tim Rang

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Paul Kyzivat <[email-masked]>
Date: Thu, 06 Oct 2005 19:26:10 -0400

Tim,

I wouldn't do it the way you propose.

I would simply add an extra <tuple> with a <contact> containing the 
telephone number as a tel: uri. You can also identify it as a different 
device if you wish. I believe you may do that as a deviceID in the tuple 
*without* also including <device>.

But I am confused about your intent. It looks like you intend to have 
one tuple even without the phone number. (Since you are from MS I am 
pretty sure you must plan to have a PC in here.) But then I am confused 
because your tuple is open but has no contact - so it isn't *very* open.

If my assumption is right, I would expect something like:

xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid" 
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" entity="sip:[email-masked]">
   <tuple id="0">
     <status>
       <basic>closed</basic>
       <ep:activities>
         <ep:activity>away</ep:activity>
       </ep:activities>
     </status>
     <dm:deviceID>your-pc</dm:deviceID>
   </tuple>
   <tuple id="1">
     <status>
       <basic>open</basic>
       <ep:activities>
         <ep:activity>away</ep:activity>
       </ep:activities>
     </status>
     <contact>tel:+4255551234</contact>
     <dm:deviceID>tel:+4255551234</dm:deviceID>
   </tuple>
</presence>

You could of course put in <device> as well if you want, but I don't see 
any need here.

	Paul

Tim Rang wrote:
> doesn’t state explicitly as far as I can tell, but reading between the 
> lines I don’t think I can have a device without an associated deviceID 
> element pointing to it from a service.  I also assume that the ‘note’ 
> under the ‘presence’ root so that the note is merely a descriptor of the 
> device.  I only assume this because I don’t see a better candidate for 
> xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid" *xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"* entity="sip:[email-masked]">
> 
>   <tuple id="0">
> 
>     <status>
> 
>       <basic>open</basic>
> 
>       <ep:activities>
> 
> *  <dm:deviceID>tel:+4255551234</dm:deviceID>*
> 
>  </tuple>**
> 
>  *<dm:device id="4255551234">*
> 
> *   <dm:deviceID>urn:tel:+4255551234</dm:deviceID>*
> 
> *   <dm:note>Home Phone</dm:note>*
> 
> * </dm:device>*
> 
> </presence>
> 
>  
> 
> ------------------------------------------------------------------------
>

---

From: "Tim Rang" <[email-masked]>
Date: Thu, 6 Oct 2005 18:35:35 -0700

Thanks Paul.  Would it be fair to say that devices are generally only used when multiple services need to be represented together?  
 
Back to your question regarding the missing contact element, it looks like I have something else I need to clear up.  The schema in RFC 3863 makes contact an optional element for tuple.  I figured that if the contact is omitted, then it should be simply derived from either the subscription request URI, or the entity attribute.  If that is not the case, and the contact element really is optional, then what does it mean to have a tuple with no contact? 

Tim

________________________________

From: Paul Kyzivat [mailto:[email-masked]]
Sent: Thu 10/6/2005 4:26 PM
To: Tim Rang
Cc: Simple WG
Subject: Re: [Simple] Adding a telephone number to a basic PIDF document

Tim,

        Paul

---

From: Jonathan Rosenberg <[email-masked]>
Date: Fri, 07 Oct 2005 00:13:58 -0400

Firstly, I agree with Paul, that if you want to have a way to tell a 
watcher, "here is a phone number to call me on the telephone", this is 
represented by a service in the data model, whose contact is a tel URI.

More below.

Tim Rang wrote:
> Thanks Paul.  Would it be fair to say that devices are generally only
> used when multiple services need to be represented together?

Devices serve many roles, one of which is as a correlator for services. 
They also serve to convey attributes which are, in fact, attributes of a 
physical device - geo-location, for example.

> 
> Back to your question regarding the missing contact element, it looks
> like I have something else I need to clear up.  The schema in RFC
> 3863 makes contact an optional element for tuple.  I figured that if
> the contact is omitted, then it should be simply derived from either
> the subscription request URI, or the entity attribute.  If that is
> not the case, and the contact element really is optional, then what
> does it mean to have a tuple with no contact?

No. If contact is not present, it means that the presentity wishes to 
indicate that the service is available, but a contact for reaching it is 
not being provided.

-Jonathan R.
-- 
Jonathan D. Rosenberg, Ph.D.                   600 Lanidex Plaza
Director, Service Provider VoIP Architecture   Parsippany, NJ 07054-2711
Cisco Systems
[email-masked]                              FAX:   (973) 952-5050
http://www.jdrosen.net                         PHONE: (973) 952-5000
http://www.cisco.com

---

From: Paul Kyzivat <[email-masked]>
Date: Fri, 07 Oct 2005 09:01:38 -0400

> Thanks Paul.  Would it be fair to say that devices are generally only used when multiple services need to be represented together?  

Well, I'm still trying to understand all the implications of the 
<device> element, but here is my opinion. It was split off so that info 
that is inherently and necessarily common to all services sharing a 
device is represented once. But having done that, if you have such 
information, then you need the <device> element to represent it even if 
there is only one service using the device.

But, if you have no properties for the device, then you don't need the 
<device> element, even if there are multiple services sharing the device 
- it is enough to name the device(s) each service uses.

> Back to your question regarding the missing contact element, it looks like I have something else I need to clear up.  The schema in RFC 3863 makes contact an optional element for tuple.  I figured…

Well, my understanding is that the <contact> element is the thing that 
tells you how to establish communication with the service. IMO nothing 
else serves that purpose. It is optional for the case when the the 
service is not reachable and/or you don't want to tell the watcher how 
to reach it. So I wouldn't be surprised to see it missing when the 
status is closed, but I do find it a little bit surprising when the 
status is open.

	Paul