1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893
|
<pre>Network Working Group M. Lonnfors
Request for Comments: 5263 J. Costa-Requena
Category: Standards Track E. Leppanen
Nokia
H. Khartabil
Ericsson
September 2008
<span class="h1">Session Initiation Protocol (SIP) Extension for</span>
<span class="h1">Partial Notification of Presence Information</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
By default, presence delivered using the presence event package for
the Session Initiation Protocol (SIP) is represented in the Presence
Information Data Format (PIDF). A PIDF document contains a set of
elements, each representing a different aspect of the presence being
reported. When any subset of the elements change, even just a single
element, a new document containing the full set of elements is
delivered. This memo defines an extension allowing delivery of only
the presence data that has actually changed.
<span class="grey">Lonnfors, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. Introduction to the Partial Notification Mechanism . . . . . . <a href="#page-3">3</a>
<a href="#section-3.1">3.1</a>. Basic Presence Agent Operation . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3.2">3.2</a>. Operation with Partial Notification . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4">4</a>. Client and Server Operations . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4.1">4.1</a>. Content-Type for Partial Notifications . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4.2">4.2</a>. Watcher Generation of SUBSCRIBE Requests . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4.3">4.3</a>. Presence Agent Processing of SUBSCRIBE Requests . . . . . <a href="#page-4">4</a>
<a href="#section-4.4">4.4</a>. Presence Agent Generation of Partial Notifications . . . . <a href="#page-5">5</a>
<a href="#section-4.5">4.5</a>. Watcher Processing of NOTIFY Requests . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-5">5</a>. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-6">6</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#section-7">7</a>. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#section-8">8</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-8.1">8.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-8.2">8.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
A presence event package for Session Initiation Protocol (SIP) [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>]
allows users ('watchers') to subscribe to other users'
('presentities') presence information. The presence information is
composed of multiple pieces of data that are delivered to the
watcher. The size of the presence information document can be large
(i.e., the presence document can contain an arbitrary number of
elements called presence tuples that convey data). As specified in
<a href="./rfc2778">RFC 2778</a> [<a href="#ref-9" title=""A Model for Presence and Instant Messaging"">9</a>] and the presence event package for SIP [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>], a Presence
Agent (PA) always delivers in presence notifications all the presence
data that has been authorized for a certain watcher. This is done
regardless of what presence data has changed compared to last
notification. It may not be reasonable to send the complete presence
information over low bandwidth and high latency links when only part
of the presence information has actually changed. This may end up
degrading the presence service and causing bad perception at the
watcher side.
This document defines a partial notification approach where the
presence server delivers to the watchers only those parts of the
presence information that have changed compared to the presence
information sent in the previous notifications. This reduces the
amount of data that is transported over the network.
This mechanism utilizes the presence event package for SIP [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>] and a
new MIME type for carrying partial Presence Information Data Format
documents [<a href="#ref-2" title=""Presence Information Data Format (PIDF) Extension for Partial Presence"">2</a>].
<span class="grey">Lonnfors, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Conventions</span>
In this document, the key words "MUST", "MUST NOT", "REQUIRED",
"SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
and "OPTIONAL" are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="#ref-1" title=""Key words for use in RFCs to Indicate Requirement Levels"">1</a>] and
indicate requirement levels for compliant implementations.
This document makes use of the vocabulary defined in <a href="./rfc2778">RFC 2778</a> [<a href="#ref-9" title=""A Model for Presence and Instant Messaging"">9</a>],
<a href="./rfc3265">RFC 3265</a> [<a href="#ref-6" title=""SIP-Specific Event Notification"">6</a>], the presence event package for SIP [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>], and the PIDF
extension for Partial Presence [<a href="#ref-2" title=""Presence Information Data Format (PIDF) Extension for Partial Presence"">2</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Introduction to the Partial Notification Mechanism</span>
This chapter briefly introduces the regular functionality of the
presence service, and gives an overview of the partial notification
solution. This section is informational in nature. It does not
contain any normative statements.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Basic Presence Agent Operation</span>
The presence service normally operates so that a watcher sends a SIP
SUBSCRIBE request targeted to the presentity. The request is routed
to the presence agent where the presentity's presence information is
stored. The SUBSCRIBE request can include an Accept header field
that indicates the supported content types.
The presence agent receives the SUBSCRIBE request and if there is no
Accept header indicating the supported content types or the Accept
header contains the default PIDF content type, the PA will generate
presence notifications using the default PIDF format [<a href="#ref-5" title=""Presence Information Data Format (PIDF)"">5</a>]. The PIDF
document can contain one or multiple XML elements. The PIDF document
includes a set of elements defined in <a href="./rfc2778">RFC 2778</a> [<a href="#ref-9" title=""A Model for Presence and Instant Messaging"">9</a>], and its
extensions for representing the presence information. This PIDF
document will be carried in the body of a NOTIFY request constructed
as per <a href="./rfc3265">RFC 3265</a> [<a href="#ref-6" title=""SIP-Specific Event Notification"">6</a>]. During basic operation, the presence document
always contains the full state corresponding to the presence status
of the presentity, as determined by the PA local policy and
authorization rules.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Operation with Partial Notification</span>
The partial notification mechanism allows a watcher to request that,
whenever possible, notifications contain only presence information
that has actually changed. A watcher that wants to receive partial
notifications according to this document, creates a SIP SUBSCRIBE
request similar to that of a regular presence subscription. However,
the SIP SUBSCRIBE request contains an Accept header field whose value
<span class="grey">Lonnfors, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
contains the "application/pidf-diff+xml" tag as well as the
"application/pidf+xml" tag.
When the presence agent receives the subscription, it examines the
Accept header field value and if the "application/pidf-diff+xml"
value is present, it can decide to use the partial notifications
mechanism specified in this memo. The presence agent builds NOTIFY
requests that contain the Content-Type header field set to
"application/pidf-diff+xml". The first NOTIFY request that contains
presence information will contain a full presence document.
Subsequent NOTIFY requests can contain partial presence documents.
This behavior is described in detail in <a href="#section-4">Section 4</a>.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Client and Server Operations</span>
Unless otherwise specified in this document, the regular watcher and
presence agent behavior is applied as defined in the SIP presence
event package [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>].
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Content-Type for Partial Notifications</span>
Entities supporting the partial notification extension described in
this document MUST support the 'application/pidf-diff+xml' content
type specified in the PIDF extension for partial presence [<a href="#ref-2" title=""Presence Information Data Format (PIDF) Extension for Partial Presence"">2</a>].
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Watcher Generation of SUBSCRIBE Requests</span>
A SUBSCRIBE request can be used to negotiate the preferred content
type to be used in the notifications. The Accept header field is
used for this purpose as specified in <a href="./rfc3261">RFC 3261</a> [<a href="#ref-4" title=""SIP: Session Initiation Protocol"">4</a>]. When a watcher
wants to allow the presence agent to send partial notifications the
watcher MUST include an Accept header field in its SUBSCRIBE request.
The value of the Accept header field MUST contain 'application/
pidf-diff+xml' (in addition to 'application/pidf+xml' required by the
SIP presence event package [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>]). The watcher MAY include a "q"
parameter with each Accept value to indicate the relative preference
of that value.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Presence Agent Processing of SUBSCRIBE Requests</span>
The presence agent receives subscriptions from watchers and generates
notifications according to the SIP presence event package [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>]. If
the watcher has indicated the supported content types in the Accept
header field of the SUBSCRIBE request, the presence agent compares
the values included in the Accept header field with the supported
ones, and decides which one to use. If the watcher has indicated
preferred accept values by means of "q" parameters, the presence
<span class="grey">Lonnfors, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
agent SHOULD base the decision on those preferences, unless otherwise
indicated by the presence agent local policy.
<span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. Presence Agent Generation of Partial Notifications</span>
Once a subscription is accepted and installed, the PA MUST deliver
the full state of the presence information in the first partial
notification that contains a presence document having <pidf-full>
root element. If the presence agent decides to send notifications
that include a presence document according to this specification, the
presence agent MUST build a presence document according to the PIDF
extension for Partial Presence [<a href="#ref-2" title=""Presence Information Data Format (PIDF) Extension for Partial Presence"">2</a>] and MUST set the Content-Type
header field to the value 'application/pidf-diff+xml'.
When using the 'application/pidf-diff+xml' MIME type, the PA MUST
include a "version" attribute; for the first partial notification
(within a given subscription), the PA MUST initialize version to
value one (1). This version counter is scoped to the subscription,
and is incremented by one within each partial notification. The
version value is only reset when the given subscription is
terminated. It is not reset when the subscription is refreshed.
When the PA generates a partial presence document, the PA SHOULD
include only that presence information that has changed compared to
the previous notifications. It is up to the PA's local policy to
determine what is considered as a change to the previous state.
The PA MUST construct the partial presence document according to the
following logic:
o The PA MUST construct the presence information according to the
PIDF extension for Partial Presence [<a href="#ref-2" title=""Presence Information Data Format (PIDF) Extension for Partial Presence"">2</a>]. All the information that
has been added to the presence document is listed inside <add>
elements. All information that has been removed from the presence
document is listed inside <remove> elements, and all information
that has been changed is listed under <replace> elements.
o The PA MUST include a "version" attribute in the presence
document. The PA MUST increment the version number by one
compared to the earlier successfully sent presence document in the
PIDF extension for Partial Presence [<a href="#ref-2" title=""Presence Information Data Format (PIDF) Extension for Partial Presence"">2</a>] format to the watcher
associated with a certain subscription.
The PA MUST NOT send a new NOTIFY request that contains a partial
notification for the same Request-URI until it has received a final
response from the watcher for the previous one or the previous NOTIFY
request has timed out.
<span class="grey">Lonnfors, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
When the PA receives a SUBSCRIBE request (refresh or termination)
within the associated subscription, it SHOULD send a NOTIFY request
containing the full presence document.
If the PA has used other than the 'application/pidf-diff+xml' content
type in notifications within the existing subscription, and changes
to deliver partial notifications, the PA MUST deliver the full state
of the presence information containing a presence document having
<pidf-full> root element as the first partial notification.
<span class="h3"><a class="selflink" id="section-4.5" href="#section-4.5">4.5</a>. Watcher Processing of NOTIFY Requests</span>
Watcher processes all NOTIFY requests that contain 'application/
pidf+xml' content type as specified in <a href="./rfc3856">RFC 3856</a> [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>].
When the watcher receives the first notification containing the
'application/pidf-diff+xml' MIME body the watcher MUST initialize an
internal version counter, related to this subscription, to the value
of the "version" included in the presence document. This version
counter is scoped to the subscription. The watcher MUST also store
the received full presence document as its local copy.
When the watcher receives a subsequent 'application/pidf-diff+xml'
encoded presence document the watcher MUST compare the received
"version" attribute with the local version counter. If the watcher
receives a presence document with the "version" attribute value equal
or lower than the locally stored version number, it is considered a
PA failure, and the watcher SHOULD discard the document without
further processing. Otherwise, the watcher MUST modify its locally
stored information according to the following logic:
o If the root element of the presence document is <pidf-full>, the
watcher must replace its local copy of the presence document with
the presence document received in the 'application/pidf-diff+xml'
body and set the internal version value to the value of the
"version" attribute included in the presence document.
o If the root element of the presence document is <pidf-diff> and
the received version number is incremented by one compared with
the local version counter, the watcher MUST apply the changes to
its local copy of the full presence document indicated in the
received 'application/pidf-diff+xml' document as specified in PIDF
extension for Partial Presence [<a href="#ref-2" title=""Presence Information Data Format (PIDF) Extension for Partial Presence"">2</a>]. The watcher MUST increment
the local version counter by one.
<span class="grey">Lonnfors, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
o If the root element of the presence document is <pidf-diff> and
the received "version" value is higher by more than one compared
with the locally stored value, the watcher assumes that one or
more NOTIFYs were lost. The watcher SHOULD either refresh the
subscription in order to receive a full presence document or
terminate the subscription.
If the watcher encounters a processing error while processing the
received 'application/pidf-diff+xml' encoded presence document, look
at Section 5.1 of [<a href="#ref-8" title=""An Extensible Markup Language (XML) Patch Operations Framework Utilizing XML Path Language (XPath) Selectors"">8</a>]. In this case, the watcher SHOULD renew the
subscription. The watcher MAY also fall back to normal presence
operations by not inserting 'application/pidf-diff+xml' in a new
SUBSCRIBE request. It is hardly reasonable to signal this error to
the notifier even if the error exists in the notifier process.
If the PA changes the content type used in notifications within the
existing subscription, the watcher MUST discard all the previously
received presence information (except local version counter) from
that particular presentity and process the new content as specified
for that content type. The local version counter MUST NOT be
discarded because if the PA changes back to 'application/
pidf-diff+xml', the MIME type version counter will continue to
increase from the last version value.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Examples</span>
The following message flow shows an example applying the partial
notifications mechanism.
A watcher sends a SUBSCRIBE request declaring support for the default
presence format ('application/pidf+xml) and for the partial
notification format ('application/pidf-diff+xml') in the Accept
header field value. The watcher uses the "q" parameter to set the
preference for receiving partial notifications. The PA accepts the
subscription and, based on the "q" parameter value, selects to send
partial notifications in NOTIFY requests. The first NOTIFY request
includes the full state of presence information. The following
notifications only include information about delta of the presence
information from the previous NOTIFY requests.
<span class="grey">Lonnfors, et al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
Watcher Presence Agent PUA
| F1 SUBSCRIBE | |
|-------------------------->| |
| F2 200 OK | |
|<--------------------------| |
| F3 NOTIFY | |
|<--------------------------| |
| F4 200 OK | |
|-------------------------->| |
| | |
| | Update presence |
| |<----------------------- |
| | |
| F5 NOTIFY | |
|<--------------------------| |
| F6 200 OK | |
|-------------------------->| |
Message Details
F1 SUBSCRIBE watcher->example.com server
SUBSCRIBE sip:resource@example.com SIP/2.0
Via: SIP/2.0/TCP watcherhost.example.com;
branch=z9hG4bKnashds7
To: <sip:resource@example.com>
From: <sip:watcher@example.com> ;tag=xfg9
Call-ID: 2010@watcherhost.example.com
CSeq: 17766 SUBSCRIBE
Max-Forwards: 70
Event: presence
Accept: application/pidf+xml;q=0.3,
application/pidf-diff+xml;q=1
Contact: <sip:user@watcherhost.example.com>
Expires: 3600
Content-Length: 0
<span class="grey">Lonnfors, et al. Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
The PA accepts the subscription and generates a 200 OK response
to the SUBSCRIBE request
F2 200 OK example.com server ->watcher
SIP/2.0 200 OK
Via: SIP/2.0/TCP watcherhost.example.com;
branch=z9hG4bKnashds7
;received=192.0.2.1
To: <sip:resource@example.com>;tag=ffd2
From: <sip:watcher@example.com>;tag=xfg9
Call-ID: 2010@watcherhost.example.com
CSeq: 17766 SUBSCRIBE
Event: presence
Expires: 3600
Contact: <sip:server.example.com>
Content-Length: 0
The PA, based on the "q" parameter value in the Accept header
of the SUBSCRIBE request (F1), decides to use partial
notifications. The PA creates the first NOTIFY request that
includes the full presence document.
F3 NOTIFY example.com server -> watcher
NOTIFY sip:user@watcherhost.example.com SIP/2.0
Via: SIP/2.0/TCP server.example.com;
branch=z9hG4bKna998sk
To: <sip:watcher@example.com>;tag=xfg9
From: <sip:resource@example.com>;tag=ffd2
Call-ID: 2010@watcherhost.example.com
Event: presence
Subscription-State: active;expires=3599
Max-Forwards: 70
CSeq: 8775 NOTIFY
Contact: <sip:server.example.com>
Content-Type: application/pidf-diff+xml
Content-Length: ...
<?xml version="1.0" encoding="UTF-8"?>
<p:pidf-full xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:p="urn:ietf:params:xml:ns:pidf-diff"
xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:c="urn:ietf:params:xml:ns:pidf:caps"
xmlns:cp="urn:ietf:params:xml:ns:pidf:cipid"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
entity="sip:resource@example.com"
version="1">
<span class="grey">Lonnfors, et al. Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
<tuple id="sg89ae">
<status>
<basic>open</basic>
</status>
<c:servcaps>
<c:audio>true</c:audio>
<c:video>false</c:video>
<c:message>true</c:message>
</c:servcaps>
<r:relationship><r:assistant/></r:relationship>
<contact priority="0.8">tel:09012345678</contact>
</tuple>
<tuple id="cg231jcr">
<status>
<basic>open</basic>
</status>
<contact priority="1.0">im:res@example.com</contact>
</tuple>
<tuple id="r1230d">
<status>
<basic>closed</basic>
</status>
<cp:homepage>http://example.com/~res/</cp:homepage>
<cp:icon>http://example.com/~res/icon.gif</cp:icon>
<cp:card>http://example.com/~res/card.vcd</cp:card>
<contact priority="0.9">sip:resource@example.com</contact>
</tuple>
<note xml:lang="en">Full state presence document</note>
<dm:person id="fdkfj">
<r:activities>
<r:on-the-phone/>
<r:busy/>
</r:activities>
</dm:person>
<span class="grey">Lonnfors, et al. Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
<dm:device id="u00b40c7">
<c:devcaps>
<c:mobility>
<c:supported>
<c:mobile/>
</c:supported>
</c:mobility>
</c:devcaps>
<dm:deviceID>mac:xxx</dm:deviceID>
</dm:device>
</p:pidf-full>
F4 200 OK watcher -> example.com server
SIP/2.0 200 OK
Via: SIP/2.0/TCP server.example.com;
branch=z9hG4bKna998sk
;received=192.0.2.2
To: <sip:watcher@example.com>;tag=xfg9
From: <sip:resource@example.com>;tag=ffd2
Call-ID: 2010@watcherhost.example.com
CSeq: 8775 NOTIFY
Content-Length: 0
At a later time, the presentity's presence information
changes. The PA generates a NOTIFY request
that includes information about the changes.
F5 NOTIFY example.com server -> watcher
NOTIFY sip:user@watcherhost.example.com SIP/2.0
Via: SIP/2.0/TCP server.example.com;
branch=z9hG4bKna998sl
To: <sip:watcher@example.com>;tag=xfg9
From: <sip:resource@example.com>;tag=ffd2
Call-ID: 2010@watcherhost.example.com
CSeq: 8776 NOTIFY
Event: presence
Subscription-State: active;expires=3543
Max-Forwards: 70
Contact: <sip:server.example.com>
Content-Type: application/pidf-diff+xml
Content-Length: ...
<span class="grey">Lonnfors, et al. Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
<?xml version="1.0" encoding="UTF-8"?>
<p:pidf-diff xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:p="urn:ietf:params:xml:ns:pidf-diff"
xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
entity="sip:resource@example.com"
version="2">
<p:add sel="presence/note" pos="before"><tuple id="ert4773">
<status>
<basic>open</basic>
</status>
<contact priority="0.4">mailto:res@example.com</contact>
<note xml:lang="en">This is a new tuple inserted
between the last tuple and note element</note>
</tuple>
</p:add>
<p:replace sel="*/tuple[@id='r1230d']/status/basic/text()"
>open</p:replace>
<p:remove sel="*/dm:person/r:activities/r:busy"/>
<p:replace sel="*/tuple[@id='cg231jcr']/contact/@priority"
>0.7</p:replace>
</p:pidf-diff>
F6 200 OK watcher-> example.com server
SIP/2.0 200 OK
Via: SIP/2.0/TCP server.example.com;
branch=z9hG4bKna998sl
;received=192.0.2.2
To: <sip:watcher@example.com>;tag=xfg9
From: <sip:resource@example.com>;tag=ffd2
Call-ID: 2010@watcherhost.example.com
CSeq: 8776 NOTIFY
Content-Length: 0
<span class="grey">Lonnfors, et al. Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
This specification relies on the presence event package for SIP [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>].
Partial notifications can reveal information about what has changed
compared to the previous notification. This can make it easier for
an eavesdropper to know what kind of changes are happening in the
presentity's presence information. However, the same information can
be found if the presence event package is used with baseline PIDF
[<a href="#ref-5" title=""Presence Information Data Format (PIDF)"">5</a>].
A third party can inject a NOTIFY request with partial state that
will cause the watcher to think it has missed a partial notification
and to request a new full presence document. This is no worse than
what we have without this extension since a party that could perform
such action could also send a NOTIFY with Subscription-State:
terminated and achieve the same effect without knowing about the
extension. Partial Notification does not make the situation any
worse, and the protection mechanisms from the existing system apply
to preventing this attack against the partial notification mechanism.
Presence-related security considerations are extensively discussed in
the presence event package for SIP [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>] and all those identified
security considerations apply to this document as well. Issues
described in the presence event package for SIP [<a href="#ref-3" title=""A Presence Event Package for the Session Initiation Protocol (SIP)"">3</a>], including
confidentiality, message integrity and authenticity, outbound
authentication, replay prevention, Denial-of-Service (DoS) attacks
against thirst parties and DoS attacks against servers all apply here
without any change.
It is RECOMMENDED that TLS [<a href="#ref-7" title=""The TLS Protocol Version 1.1"">7</a>] be used between elements to provide
hop-by-hop confidentially protection. Furthermore, S/MIME MAY be
used for integrity and authenticity of SUBSCRIBE and NOTIFY requests.
This is described in <a href="./rfc3261#section-23">Section 23 of RFC 3261</a>.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Acknowledgments</span>
The authors would like to thank Jari Urpalainen, Jyrki Aarnos,
Jonathan Rosenberg, Dean Willis, Kriztian Kiss, Juha Kalliokulju,
Miguel Garcia, Anders Kristensen, Yannis Pavlidis, Ben Cambell,
Robert Sparks, and Tim Moran for their valuable comments.
<span class="grey">Lonnfors, et al. Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Normative References</span>
[<a id="ref-1">1</a>] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-2">2</a>] Lonnfors, M., Khartabil, H., Leppanen, E., and J. Urpalainen,
"Presence Information Data Format (PIDF) Extension for Partial
Presence", <a href="./rfc5262">RFC 5262</a>, August 008.
[<a id="ref-3">3</a>] Rosenberg, J., "A Presence Event Package for the Session
Initiation Protocol (SIP)", <a href="./rfc3856">RFC 3856</a>, August 2004.
[<a id="ref-4">4</a>] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A.,
Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP:
Session Initiation Protocol", <a href="./rfc3261">RFC 3261</a>, June 2002.
[<a id="ref-5">5</a>] Sugano, H., Fujimoto, S., Klyne, G., Bateman, A., Carr, W., and
J. Peterson, "Presence Information Data Format (PIDF)",
<a href="./rfc3863">RFC 3863</a>, August 2004.
[<a id="ref-6">6</a>] Roach, A., "SIP-Specific Event Notification", <a href="./rfc3265">RFC 3265</a>,
June 2002.
[<a id="ref-7">7</a>] Dierks, T. and E. Rescorla, "The TLS Protocol Version 1.1",
<a href="./rfc4346">RFC 4346</a>, April 2006.
[<a id="ref-8">8</a>] Urpalainen, J., "An Extensible Markup Language (XML) Patch
Operations Framework Utilizing XML Path Language (XPath)
Selectors", <a href="./rfc5261">RFC 5261</a>, September 2008.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Informative References</span>
[<a id="ref-9">9</a>] Day, M., Rosenberg, J., and H. Sugano, "A Model for Presence and
Instant Messaging", <a href="./rfc2778">RFC 2778</a>, February 2000.
<span class="grey">Lonnfors, et al. Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
Authors' Addresses
Mikko Lonnfors
Nokia
P.O. Box 321
Helsinki
Finland
Phone: +358 71 8008000
EMail: mikko.lonnfors@nokia.com
Jose Costa-Requena
Nokia
P.O. Box 321
Helsinki
Finland
Phone: +358 71 8008000
EMail: jose.costa-requena@nokia.com
Eva Leppanen
Nokia
Lempaala
Finland
EMail: eva.leppanen@saunalahti.fi
Hisham Khartabil
Ericsson
Melbourne
Australia
Phone: +61 416 108 890
EMail: hisham.khartabil@gmail.com
<span class="grey">Lonnfors, et al. Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc5263">RFC 5263</a> Partial Notification September 2008</span>
Full Copyright Statement
Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Lonnfors, et al. Standards Track [Page 16]
</pre>
|