4.3.4 Creation of dndState Category
In this example, state category instances of xsi:type userState are published into containers 2 and 3.
SERVICE sip:bob@contoso.com SIP/2.0 Via: SIP/2.0/TLS 172.24.32.214:52777 Max-Forwards: 70 From: <sip:bob@contoso.com>;tag=c9a99869ef;epid=3b09add8bc To: <sip:bob@contoso.com> Call-ID: 9d28ef15c5314a4f8ce09c44aa0d574c CSeq: 1 SERVICE Contact: <sip:bob@contoso.com;opaque=user:epid:Q_zZt9cZEVOeAMbFsdgb-wAA;gruu> User-Agent: UCCAPI/4.0.7254.0 OC/4.0.7254.0 (Microsoft Communicator 2010 (Beta)) Proxy-Authorization: TLS-DSK qop="auth", realm="SIP Communications Service", opaque="9742C9CC", targetname="Server.contoso.com", crand="6f8cafb1", cnum="468", response="a8e9cfe8f49d872d611670bac6b6408d16ab0a06" Content-Type: application/msrtc-category-publish+xml Content-Length: … <publish xmlns="http://schemas.microsoft.com/2006/09/sip/rich-presence"> <publications uri="sip:bob@contoso.com"> <publication categoryName="state" instance="536870912" container="3" version="0" expireType="static" expires="0" /> <publication categoryName="state" instance="536870912" container="2" version="0" expireType="static" expires="0" /> <publication categoryName="state" instance="603979776" container="3" version="0" expireType="time" expires="86400"> <state manual="true" xsi:type="userState" xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <availability>6900</availability> <activity token="urgent-interruptions-only" minAvailability="6900" maxAvailability="8999" /> </state> </publication> <publication categoryName="state" instance="603979776" container="2" version="0" expireType="time" expires="86400"> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" manual="true"
-
-
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="userState">
-
-
<availability>9000</availability> </state> </publication> </publications> </publish>
In the next example, the server sends a 200 OK response that contains the dndState and state category instances. The computing function in the server creates and publishes dndState category instances based on the userState instance of the state category.
-
SIP/2.0 200 OK Authentication-Info: TLS-DSK qop="auth", opaque="9742C9CC", srand="E87BD197", snum="599", rspauth="148204fdaeee167c532fe061d3ecfe02b52efe86", targetname="Server.contoso.com", realm="SIP Communications Service", version=4 Content-Length: 9757 From: "Bob"<sip:bob@contoso.com>;tag=c9a99869ef;epid=3b09add8bc To: <sip:bob@contoso.com>;tag=97C972C4F65C13BB1CEE363598650D9A Call-ID: 9d28ef15c5314a4f8ce09c44aa0d574c CSeq: 1 SERVICE Via: SIP/2.0/TLS 172.24.32.214:52777;received=157.54.78.92;ms-received-port=52777;ms-received-cid=FB6DE00 Content-Type: application/vnd-microsoft-roaming-self+xml <roamingData xmlns="http://schemas.microsoft.com/2006/09/sip/roaming-self" xmlns:cat="http://schemas.microsoft.com/2006/09/sip/categories" xmlns:con="http://schemas.microsoft.com/2006/09/sip/containers" xmlns:sub="http://schemas.microsoft.com/2006/09/sip/presence-subscribers" xmlns:del="http://schemas.microsoft.com/2007/09/sip/delegates"> <categories xmlns="http://schemas.microsoft.com/2006/09/sip/categories" uri="sip:bob@contoso.com"> <category name="dndState" instance="0" publishTime="2010-02-13T09:01:58.740" container="0" version="6" expireType="static"> <state xsi:type="userState" manual="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9500</availability> </state> </category> <category name="state" instance="1" publishTime="2010-02-13T09:01:58.740" container="2" version="559" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9000</availability> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> </state> </category> <category name="state" instance="268435456" publishTime="2010-02-13T08:40:58.693" container="2" version="513" expireType="user"> <state xsi:type="aggregateMachineState" endpointId="b7d9fc43-19d7-5311-9e00-c6c5b1d81bfb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>3500</availability> </state> </category> <category name="state" instance="816379399" publishTime="2010-02-13T00:04:03.067" container="2" version="102" expireType="endpoint" endpointId="5D4FEF3F-71C1-5562-A3D9-56746B756BCB"> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manual="false" xsi:type="machineState"> <availability>15500</availability> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </delimiter> <timeZoneBias>480</timeZoneBias> <timeZoneName>Pacific Standard Time</timeZoneName> <device>deskphone</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </end> </state> </category> <category name="state" instance="1043521063" publishTime="2010-02-13T08:40:58.693" container="2" version="30" expireType="endpoint" endpointId="B7D9FC43-19D7-5311-9E00-C6C5B1D81BFB"> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manual="false" xsi:type="machineState"> <availability>3500</availability> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </delimiter> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </end> </state> </category> <category name="state" instance="603979776" publishTime="2010-02-13T09:01:58.740" container="2" version="1" expireType="time" expires="86402"> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manual="true" xsi:type="userState"> <availability>9000</availability> </state> </category> <category name="dndState" instance="0" publishTime="2010-02-13T09:01:58.740" container="2" version="6" expireType="static"> <state xsi:type="userState" manual="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9500</availability> </state> </category> <category name="state" instance="1" publishTime="2010-02-13T09:01:58.740" container="3" version="559" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>6900</availability> <activity token="urgent-interruptions-only" /> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> </state> </category> <category name="state" instance="816379399" publishTime="2010-02-13T00:04:03.067" container="3" version="102" expireType="endpoint" endpointId="5D4FEF3F-71C1-5562-A3D9-56746B756BCB"> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manual="false" xsi:type="machineState"> <availability>15500</availability> <delimiter xmlns:auto-ns1="http://schemas.microsoft.com/2006/09/sip/state" xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </delimiter> <timeZoneBias>480</timeZoneBias> <timeZoneName>Pacific Standard Time</timeZoneName> <device>deskphone</device> <end xmlns:auto-ns1="http://schemas.microsoft.com/2006/09/sip/state" xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </end> </state> </category> <category name="state" instance="1043521063" publishTime="2010-02-13T08:40:58.693" container="3" version="30" expireType="endpoint" endpointId="B7D9FC43-19D7-5311-9E00-C6C5B1D81BFB"> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manual="false" xsi:type="machineState"> <availability>3500</availability> <delimiter xmlns:auto-ns1="http://schemas.microsoft.com/2006/09/sip/state" xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </delimiter> <device>computer</device> <end xmlns:auto-ns1="http://schemas.microsoft.com/2006/09/sip/state" xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"> </end> </state> </category> <category name="state" instance="603979776" publishTime="2010-02-13T09:01:58.740" container="3" version="1" expireType="time" expires="86402"> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manual="true" xsi:type="userState"> <availability>6900</availability> <activity token="urgent-interruptions-only" minAvailability="6900" maxAvailability="8999"> </activity> </state> </category> <category name="state" instance="1" publishTime="2010-02-13T09:01:58.740" container="100" version="559" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9000</availability> </state> </category> <category name="legacyInterop" instance="1" publishTime="2010-02-13T09:01:58.740" container="100" version="559" expireType="user"> <legacyInterop availability="9000" /> </category> <category name="dndState" instance="0" publishTime="2010-02-13T09:01:58.740" container="100" version="6" expireType="static"> <state xsi:type="userState" manual="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9500</availability> </state> </category> <category name="state" instance="1" publishTime="2010-02-13T09:01:58.740" container="200" version="559" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9000</availability> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> </state> </category> <category name="legacyInterop" instance="1" publishTime="2010-02-13T09:01:58.740" container="200" version="559" expireType="user"> <legacyInterop availability="9000" /> </category> <category name="dndState" instance="0" publishTime="2010-02-13T09:01:58.740" container="200" version="6" expireType="static"> <state xsi:type="userState" manual="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9500</availability> </state> </category> <category name="state" instance="1" publishTime="2010-02-13T09:01:58.740" container="300" version="559" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>6900</availability> <activity token="urgent-interruptions-only" /> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> </state> </category> <category name="legacyInterop" instance="1" publishTime="2010-02-13T09:01:58.740" container="300" version="559" expireType="user"> <legacyInterop availability="6900" token="urgent-interruptions-only" /> </category> <category name="state" instance="1" publishTime="2010-02-13T09:01:58.740" container="400" version="559" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9000</availability> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes" /> </state> </category> <category name="legacyInterop" instance="1" publishTime="2010-02-13T09:01:58.740" container="400" version="559" expireType="user"> <legacyInterop availability="9000" /> </category> <category name="dndState" instance="0" publishTime="2010-02-13T09:01:58.740" container="400" version="6" expireType="static"> <state xsi:type="userState" manual="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9500</availability> </state> </category> </categories> </roamingData>