ting URI Call-ID: call identifier CSeq: sequence number NTS: ssdp:byebye m=application 5060 udp sdp a=X-upnp:st search target; X-upnp:mx = seconds to delay response © 2009 by Taylor & Francis Group, LLC SIP Handbook: Services, Technologies, and Security When a device receives an INVITE message with its own UID as the search target, the device responds to the control point with an HTTP OK message in the following format. Note that an OK message contains information about the discovered device such as the URL of the device description, and software versions. HTTP/1.1 200 OK CACHE-CONTROL: max-age = seconds until advertisement expires DATE: when response was generated LOCATION: URL for UPnP description for root device SERVER: OS/version UPnP/1.0 product/version ST: search target USN: advertisement UUID A SIP OK message is sent when an actual connection with a destination device has been established and this destination device is able to communicate with the requesting device. We also extend the X SDP field to add information about the discovered device as follows: SIP/2.0 OK 200 To: requesting URI From: advertisement UUID Call-ID: call identifier CSeq: sequence number Date: when response was generated Expire: seconds until advertisement expires Location: URL for UPnP description for root device Server: OS/version UPnP/1.0 product/version St: search target Usn: advertisement UUID 7.6 Middleware Implementation We have chosen CyberLink for Java [11] to provide the APIs and libraries of UPnP. We also use JAIN-SIP, which provides the SIP functionalities [12]. Why we use these programs is because both are open source software and therefore the API specifications and Java source codes for their implementations are readily available. We have built home network middleware based on SIP called Siphnos [13], as shown in Figure 7.4. On the top of the protocol stack, we implemented class libraries with the same API specification as in Cyberlink for Java. The UPnP classes are inherited from the HTTP classes in Cyberlink for Java. 