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 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453
|
<pre>Network Working Group J. Rosenberg
Request for Comments: 3680 dynamicsoft
Category: Standards Track March 2004
<span class="h1">A Session Initiation Protocol (SIP) Event Package for Registrations</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.
Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved.
Abstract
This document defines a Session Initiation Protocol (SIP) event
package for registrations. Through its REGISTER method, SIP allows a
user agent to create, modify, and delete registrations.
Registrations can also be altered by administrators in order to
enforce policy. As a result, these registrations represent a piece
of state in the network that can change dynamically. There are many
cases where a user agent would like to be notified of changes in this
state. This event package defines a mechanism by which those user
agents can request and obtain such notifications.
Table of Contents
<a href="#section-1">1</a>. Introduction ................................................. <a href="#page-2">2</a>
<a href="#section-2">2</a>. Terminology .................................................. <a href="#page-3">3</a>
<a href="#section-3">3</a>. Usage Scenarios .............................................. <a href="#page-3">3</a>
<a href="#section-3.1">3.1</a>. Forcing Re-Authentication .............................. <a href="#page-3">3</a>
<a href="#section-3.2">3.2</a>. Composing Presence ..................................... <a href="#page-3">3</a>
<a href="#section-3.3">3.3</a>. Welcome Notices ........................................ <a href="#page-4">4</a>
<a href="#section-4">4</a>. Package Definition ........................................... <a href="#page-4">4</a>
<a href="#section-4.1">4.1</a>. Event Package Name ..................................... <a href="#page-4">4</a>
<a href="#section-4.2">4.2</a>. Event Package Parameters ............................... <a href="#page-5">5</a>
<a href="#section-4.3">4.3</a>. SUBSCRIBE Bodies ....................................... <a href="#page-5">5</a>
<a href="#section-4.4">4.4</a>. Subscription Duration .................................. <a href="#page-5">5</a>
<a href="#section-4.5">4.5</a>. NOTIFY Bodies .......................................... <a href="#page-6">6</a>
<a href="#section-4.6">4.6</a>. Notifier Processing of SUBSCRIBE Requests .............. <a href="#page-6">6</a>
<a href="#section-4.7">4.7</a>. Notifier Generation of NOTIFY Requests ................. <a href="#page-7">7</a>
<a href="#section-4.7.1">4.7.1</a>. The Registration State Machine ................. <a href="#page-7">7</a>
<span class="grey">Rosenberg Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<a href="#section-4.7.2">4.7.2</a>. Applying the state machine ..................... <a href="#page-9">9</a>
<a href="#section-4.8">4.8</a>. Subscriber Processing of NOTIFY Requests ............... <a href="#page-9">9</a>
<a href="#section-4.9">4.9</a>. Handling of Forked Requests ............................ <a href="#page-9">9</a>
<a href="#section-4.10">4.10</a>. Rate of Notifications .................................. <a href="#page-10">10</a>
<a href="#section-4.11">4.11</a>. State Agents ........................................... <a href="#page-10">10</a>
<a href="#section-5">5</a>. Registration Information ..................................... <a href="#page-10">10</a>
<a href="#section-5.1">5.1</a>. Structure of Registration Information .................. <a href="#page-10">10</a>
<a href="#section-5.2">5.2</a>. Computing Registrations from the Document .............. <a href="#page-14">14</a>
<a href="#section-5.3">5.3</a>. Example ................................................ <a href="#page-15">15</a>
<a href="#section-5.4">5.4</a>. XML Schema ............................................. <a href="#page-16">16</a>
<a href="#section-6">6</a>. Example Call Flow ............................................ <a href="#page-18">18</a>
<a href="#section-7">7</a>. Security Considerations ...................................... <a href="#page-21">21</a>
<a href="#section-8">8</a>. IANA Considerations .......................................... <a href="#page-21">21</a>
<a href="#section-8.1">8.1</a>. SIP Event Package Registration ......................... <a href="#page-21">21</a>
<a href="#section-8.2">8.2</a>. application/reginfo+xml MIME Registration .............. <a href="#page-22">22</a>
8.3. URN Sub-Namespace Registration for
urn:ietf:params:xml:ns:reginfo ......................... <a href="#page-23">23</a>
<a href="#section-9">9</a>. References ................................................... <a href="#page-23">23</a>
<a href="#section-9.1">9.1</a>. Normative References ................................... <a href="#page-23">23</a>
<a href="#section-9.2">9.2</a>. Informative References ................................. <a href="#page-24">24</a>
<a href="#section-10">10</a>. Contributors ................................................. <a href="#page-25">25</a>
<a href="#section-11">11</a>. Acknowledgements ............................................. <a href="#page-25">25</a>
<a href="#section-12">12</a>. Author's Address ............................................. <a href="#page-25">25</a>
<a href="#section-13">13</a>. Full Copyright Statement ..................................... <a href="#page-26">26</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The Session Initiation Protocol (SIP) [<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>] provides all of the
functions needed for the establishment and maintenance of
communications sessions between users. One of the functions it
provides is a registration operation. A registration is a binding
between a SIP URI, called an address-of-record, and one or more
contact URIs. These contact URIs represent additional resources that
can be contacted in order to reach the user identified by the
address-of-record. When a proxy receives a request within its domain
of administration, it uses the Request-URI as an address-of-record,
and uses the contacts bound to the address-of-record to forward (or
redirect) the request.
The SIP REGISTER method provides a way for a user agent to manipulate
registrations. Contacts can be added or removed, and the current set
of contacts can be queried. Registrations can also change as a
result of administrator policy. For example, if a user is suspected
of fraud, their registration can be deleted so that they cannot
receive any requests. Registrations also expire after some time if
not refreshed.
<span class="grey">Rosenberg Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
Registrations represent a dynamic piece of state maintained by the
network. There are many cases in which user agents would like to
know about changes to the state of registrations. The SIP Events
Framework [<a href="#ref-2" title=""Session Initiation Protocol (SIP)-Specific Event Notification"">2</a>] defines a generic framework for subscription to, and
notification of, events related to SIP systems. The framework
defines the methods SUBSCRIBE and NOTIFY, and introduces the notion
of a package. A package is a concrete application of the event
framework to a particular class of events. Packages have been
defined for user presence [<a href="#ref-9" title=""Session initiation protocol (SIP) extensions for presence"">9</a>], for example. This specification
defines a package for registration state.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology</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="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>
[<a href="#ref-3" title=""Key words for use in RFCs to indicate requirement levels"">3</a>] and indicate requirement levels for compliant implementations.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Usage Scenarios</span>
There are many applications of this event package. A few are
documented here for illustrative purposes.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Forcing Re-Authentication</span>
It is anticipated that many SIP devices will be wireless devices that
will be always-on, and therefore, continually registered to the
network. Unfortunately, history has shown that these devices can be
compromised. To deal with this, an administrator will want to
terminate or shorten a registration, and ask the device to
re-register so it can be re-authenticated. To do this, the device
subscribes to the registration event package for the
address-of-record that it is registering contacts against. When the
administrator shortens registration (for example, when fraud is
suspected) the registration server sends a notification to the
device. It can then re-register and re-authenticate itself. If it
cannot re-authenticate, the expiration will terminate shortly
thereafter.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Composing Presence</span>
An important concept to understand is the relationship between this
event package and the event package for user presence [<a href="#ref-9" title=""Session initiation protocol (SIP) extensions for presence"">9</a>]. User
presence represents the willingness and ability of a user to
communicate with other users on the network. It is composed of a set
of contact addresses that represent the various means for contacting
the user. Those contact addresses might represent the contact
address for voice, for example. Typically, the contact address
<span class="grey">Rosenberg Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
listed for voice will be an address-of-record. The status of that
contact (whether its open or closed) may depend on any number of
factors, including the state of any registrations against that
address-of-record. As a result, registration state can be viewed as
an input to the process which determines the presence state of a
user. Effectively, registration state is "raw" data, which is
combined with other information about a user to generate a document
that describes the user's presence.
In fact, this event package allows for a presence server to be
separated from a SIP registration server, yet still use registration
information to construct a presence document. When a presence server
receives a presence subscription for some user, the presence server
itself would generate a subscription to the registration server for
the registration event package. As a result, the presence server
would learn about the registration state for that user, and it could
use that information to generate presence documents.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Welcome Notices</span>
A common service in current mobile networks are "welcome notices".
When the user turns on their phone in a foreign country, they receive
a message that welcomes them to the country, and provides information
on transportation services, for example.
In order to implement this service in a SIP system, an application
server can subscribe to the registration state of the user. When the
user turns on their phone, the phone will generate a registration.
This will result in a notification being sent to the application that
the user has registered. The application can then send a SIP MESSAGE
request [<a href="#ref-10" title=""Session Initiation Protocol (SIP) Extension for Instant Messaging"">10</a>] to the device, welcoming the user and providing any
necessary information.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Package Definition</span>
This section fills in the details needed to specify an event package
as defined in Section 4.4 of [<a href="#ref-2" title=""Session Initiation Protocol (SIP)-Specific Event Notification"">2</a>].
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Event Package Name</span>
The SIP Events specification requires package definitions to specify
the name of their package or template-package.
The name of this package is "reg". As specified in [<a href="#ref-2" title=""Session Initiation Protocol (SIP)-Specific Event Notification"">2</a>], this value
appears in the Event header present in SUBSCRIBE and NOTIFY requests.
<span class="grey">Rosenberg Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
Example:
Event: reg
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Event Package Parameters</span>
The SIP Events specification requires package and template-package
definitions to specify any package specific parameters of the Event
header that are used by it.
No package specific Event header parameters are defined for this
event package.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. SUBSCRIBE Bodies</span>
The SIP Events specification requires package or template-package
definitions to define the usage, if any, of bodies in SUBSCRIBE
requests.
A SUBSCRIBE for registration events MAY contain a body. This body
would serve the purpose of filtering the subscription. The
definition of such a body is outside the scope of this specification.
A SUBSCRIBE for the registration package MAY be sent without a body.
This implies that the default registration filtering policy has been
requested. The default policy is:
o Notifications are generated every time there is any change in
the state of any of the registered contacts for the resource
being subscribed to. Those notifications only contain
information on the contacts whose state has changed.
o Notifications triggered from a SUBSCRIBE contain full state
(the list of all contacts bound to the address-of-record).
Of course, the server can apply any policy it likes to the
subscription.
<span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. Subscription Duration</span>
The SIP Events specification requires package definitions to define a
default value for subscription durations, and to discuss reasonable
choices for durations when they are explicitly specified.
Registration state changes as contacts are created through REGISTER
requests, and then time out due to lack of refresh. Their rate of
change is therefore related to the typical registration expiration.
Since the default expiration for registrations is 3600 seconds, the
<span class="grey">Rosenberg Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
default duration of subscriptions to registration state is slightly
longer, 3761 seconds. This helps avoid any potential problems with
coupling of subscription and registration refreshes. Of course,
clients MAY include an Expires header in the SUBSCRIBE request asking
for a different duration.
<span class="h3"><a class="selflink" id="section-4.5" href="#section-4.5">4.5</a>. NOTIFY Bodies</span>
The SIP Events specification requires package definitions to describe
the allowed set of body types in NOTIFY requests, and to specify the
default value to be used when there is no Accept header in the
SUBSCRIBE request.
The body of a notification of a change in registration state contains
a registration information document. This document describes some or
all of the contacts associated with a particular address-of-record.
All subscribers and notifiers MUST support the
"application/reginfo+xml" format described in <a href="#section-5">Section 5</a>. The
subscribe request MAY contain an Accept header field. If no such
header field is present, it has a default value of
"application/reginfo+xml". If the header field is present, it MUST
include "application/reginfo+xml", and MAY include any other types
capable of representing registration information.
Of course, the notifications generated by the server MUST be in one
of the formats specified in the Accept header field in the SUBSCRIBE
request.
<span class="h3"><a class="selflink" id="section-4.6" href="#section-4.6">4.6</a>. Notifier Processing of SUBSCRIBE Requests</span>
The SIP Events framework specifies that packages should define any
package-specific processing of SUBSCRIBE requests at a notifier,
specifically with regards to authentication and authorization.
Registration state can be sensitive information. Therefore, all
subscriptions to it SHOULD be authenticated and authorized before
approval. Authentication MAY be performed using any of the
techniques available through SIP, including digest, S/MIME, TLS or
other transport specific mechanisms [<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>]. Authorization policy is at
the discretion of the administrator, as always. However, a few
recommendations can be made.
It is RECOMMENDED that a user be allowed to subscribe to their own
registration state. Such subscriptions are useful when there are
many devices that represent a user, each of which needs to learn the
registration state of the other devices. We also anticipate that
applications and automata will frequently be subscribers to the
<span class="grey">Rosenberg Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
registration state. In those cases, authorization policy will
typically be provided ahead of time.
<span class="h3"><a class="selflink" id="section-4.7" href="#section-4.7">4.7</a>. Notifier Generation of NOTIFY Requests</span>
The SIP Event framework requests that packages specify the conditions
under which notifications are sent for that package, and how such
notifications are constructed.
To determine when a notifier should send notifications of changes in
registration state, we define a finite state machine (FSM) that
represents the state of a contact for a particular address-of-record.
Transitions in this state machine MAY result in the generation of
notifications. These notifications will carry information on the new
state and the event which triggered the state change. It is
important to note that this FSM is just a model of the registration
state machinery maintained by a server. An implementation would map
its own state machines to this one in an implementation-specific
manner.
<span class="h4"><a class="selflink" id="section-4.7.1" href="#section-4.7.1">4.7.1</a>. The Registration State Machine</span>
The underlying state machine for a registration is shown in Figure 1.
The machine is very simple. An instance of this machine is
associated with each address-of-record. When there are no contacts
registered to the address-of-record, the state machine is in the init
state. It is important to note that this state machine exists, and
is well-defined, for each address-of-record in the domain, even if
there are no contacts registered to it. This allows a user agent to
subscribe to an address-of-record, and learn that there are no
contacts registered to it. When the first contact is registered to
that address-of-record, the state machine moves from init to active.
<span class="grey">Rosenberg Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
+------------+
| |
| Init |
| |
+------------+
|
V
+------------+
| |
| Active |
| |
+------------+
|
V
+------------+
| |
| Terminated |
| |
+------------+
Figure 1: Registration State Machine
As long as there is at least one contact bound to the address-of-
record, the state machine remains in the active state. When the last
contact expires or is removed, the registration transitions to
terminated. From there, it immediately transitions back to the init
state. This transition is invisible, in that it MUST NOT ever be
reported to a subscriber in a NOTIFY request.
This allows for an implementation optimization whereby the
registrar can destroy the objects associated with the registration
state machine once it enters the terminated state and a NOTIFY has
been sent. Instead, the registrar can assume that, if the objects
for that state machine no longer exist, the state machine is in
the init state.
In addition to this state machine, each registration is associated
with a set of contacts, each of which is modeled with its own state
machine. Unlike the FSM for the address-of-record, which exists even
when no contacts are registered, the per-contact FSM is instantiated
when the contact is registered, and deleted when it is removed. The
diagram for the per-contact state machine is shown in Figure 2. This
FSM is identical to the registration state machine in terms of its
states, but has many more transition events.
When a new contact is added, the FSM for it is instantiated, and it
moves into the active state. Because of that, the init state here is
transient. There are two ways in which it can become active. One is
<span class="grey">Rosenberg Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
through an actual SIP REGISTER request (corresponding to the
registered event), and the other is when the contact is created
administratively, or through some non-SIP means (the created event).
+------+
| | refreshed
| | shortened
V |
+------------+ +------------+ +------------+
| | | | | |
| Init |----------->| Active |----------->| Terminated |
| | | | | |
+------------+ registered +------------+ expired +------------+
created deactivated
probation
unregistered
rejected
Figure 2: Contact State Machine
The FSM remains in the active state so long as the contact is bound
to the address-of-record. When a contact is refreshed through a
REGISTER request, the FSM stays in the same state, but a refreshed
event is generated. Likewise, when an administrator modifies the
expiration time of a binding (without deleting the binding) to
trigger the contact to re-register and possibly re-authenticate, the
FSM stays in the active state, but a shortened event is generated.
When the contact is no longer bound to the address-of-record, the FSM
moves to the terminated state, and once a NOTIFY is sent, the state
machine is destroyed. As a result, the terminated state is
effectively transient. There are several reasons this can happen.
The first is an expiration, which occurs when the contact was not
refreshed by a REGISTER request. The second reason is deactivated.
This occurs when the administrator has removed the contact as a valid
binding, but still wishes the client to attempt to re-register the
contact. In contrast, the rejected event occurs when an active
contact is removed by the administrator, but
re-registrations will not help to re-establish it. This might occur
if a user does not pay their bills, for example. The probation event
occurs when an active contact is removed by the administrator, and
the administrator wants the client to re-register, but to do so at a
later time. The unregistered event occurs when a REGISTER request
sets the expiration time of that contact to zero.
<span class="grey">Rosenberg Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<span class="h4"><a class="selflink" id="section-4.7.2" href="#section-4.7.2">4.7.2</a>. Applying the state machine</span>
The server MAY generate a notification to subscribers when any event
occurs in either the address-of-record or per-contact state machines,
except for the transition from terminated to init in the address-of-
record state machine. As noted above, a notification MUST NOT be sent
in this case. For other transitions, whether the server sends a
notification or not is policy dependent. However, several guidelines
are defined.
As a general rule, when a subscriber is authorized to receive
notifications about a set of registrations, it is RECOMMENDED that
notifications contain information about those contacts which have
changed state (and thus triggered a notification), instead of
delivering the current state of every contact in all registrations.
However, notifications triggered as a result of a fetch operation (a
SUBSCRIBE with Expires of 0) SHOULD result in the full state of all
contacts for all registrations to be present in the NOTIFY.
<span class="h3"><a class="selflink" id="section-4.8" href="#section-4.8">4.8</a>. Subscriber Processing of NOTIFY Requests</span>
The SIP Events framework expects packages to specify how a subscriber
processes NOTIFY requests in any package specific ways, and in
particular, how it uses the NOTIFY requests to construct a coherent
view of the state of the subscribed resource. Typically, the NOTIFY
will only contain information for contacts whose state has changed.
To construct a coherent view of the total state of all registrations,
the subscriber will need to combine NOTIFYs received over time. The
details of this process depend on the document format used to convey
registration state. <a href="#section-5">Section 5</a> outlines the process for the
application/reginfo+xml format.
<span class="h3"><a class="selflink" id="section-4.9" href="#section-4.9">4.9</a>. Handling of Forked Requests</span>
The SIP Events framework mandates that packages indicate whether or
not forked SUBSCRIBE requests can install multiple subscriptions.
Registration state is normally stored in some repository (whether it
be co-located with a proxy/registrar or in a separate database). As
such, there is usually a single place where the contact information
for a particular address-of-record is resident. This implies that a
subscription for this information is readily handled by a single
element with access to this repository. There is, therefore, no
compelling need for a subscription to registration information to
fork. As a result, a subscriber MUST NOT create multiple dialogs as
a result of a single subscription request. The required processing
to guarantee that only a single dialog is established is described in
<a href="#section-4.4.9">Section 4.4.9</a> of the SIP Events framework [<a href="#ref-2" title=""Session Initiation Protocol (SIP)-Specific Event Notification"">2</a>].
<span class="grey">Rosenberg Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<span class="h3"><a class="selflink" id="section-4.10" href="#section-4.10">4.10</a>. Rate of Notifications</span>
The SIP Events framework mandates that packages define a maximum rate
of notifications for their package.
For reasons of congestion control, it is important that the rate of
notifications not become excessive. As a result, it is RECOMMENDED
that the server not generate notifications for a single subscriber at
a rate faster than once every 5 seconds.
<span class="h3"><a class="selflink" id="section-4.11" href="#section-4.11">4.11</a>. State Agents</span>
The SIP Events framework asks packages to consider the role of state
agents in their design.
State agents have no role in the handling of this package.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Registration Information</span>
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Structure of Registration Information</span>
Registration information is an XML document [<a href="#ref-4" title=""Extensible markup language (xml) 1.0."">4</a>] that MUST be
well-formed and SHOULD be valid. Registration information documents
MUST be based on XML 1.0 and MUST be encoded using UTF-8. This
specification makes use of XML namespaces for identifying
registration information documents and document fragments. The
namespace URI for elements defined by this specification is a URN
[<a href="#ref-5" title=""URN Syntax"">5</a>], using the namespace identifier 'ietf' defined by [<a href="#ref-6" title=""A URN Namespace for IETF Documents"">6</a>] and
extended by [<a href="#ref-7" title=""The IETF XML Registry"">7</a>]. This URN is:
urn:ietf:params:xml:ns:reginfo
A registration information document begins with the root element tag
"reginfo". It consists of any number of "registration" sub-elements,
each of which contains the registration state for a particular
address-of-record. The registration information for a particular
address-of-record MUST be contained within a single "registration"
element; it cannot be spread across multiple "registration" elements
within a document. Other elements from different namespaces MAY be
present for the purposes of extensibility; elements or attributes
from unknown namespaces MUST be ignored. There are two attributes
associated with the "reginfo" element, both of which MUST be present:
version: This attribute allows the recipient of registration
information documents to properly order them. Versions
start at 0, and increment by one for each new document
sent to a subscriber. Versions are scoped within a
<span class="grey">Rosenberg Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
subscription. Versions MUST be representable using a
32 bit integer.
state: This attribute indicates whether the document contains
the full registration state, or whether it contains
only information on those registrations which have
changed since the previous document (partial).
Note that the document format explicitly allows for conveying
information on multiple addresses-of-record. This enables
subscriptions to groups of registrations, where such a group is
identified by some kind of URI. For example, a domain might define
sip:allusers@example.com as a subscribable resource that generates
notifications when the state of any address-of-record in the domain
changes.
The "registration" element has a list of any number of "contact"
sub-elements, each of which contains information on a single contact.
Other elements from different namespaces MAY be present for the
purposes of extensibility; elements or attributes from unknown
namespaces MUST be ignored. There are three attributes associated
with the "registration" element, all of which MUST be present:
aor: The aor attribute contains a URI which is the address-of-
record this registration refers to.
id: The id attribute identifies this registration. It MUST be
unique amongst all other id attributes present in other
registration elements conveyed to the subscriber within the
scope of their subscription. In particular, if two URI
identifying an address-of-record differ after their
canonicalization according to the procedures in step 5 of
<a href="./rfc3261#section-10.3">Section 10.3 of RFC 3261</a> [<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>], the id attributes in the
"registration" elements for those addresses-of-record MUST
differ. Furthermore, the id attribute for a "registration"
element for a particular address-of-record MUST be the same
across all notifications sent within the subscription.
state: The state attribute indicates the state of the
registration. The valid values are "init", "active" and
"terminated".
The "contact" element contains a "uri" element, an optional
"display-name" element, and an optional "unknown-param" element.
Other elements from different namespaces MAY be present for the
purposes of extensibility; elements or attributes from unknown
namespaces MUST be ignored. There are several attributes associated
with the "contact" element which MUST be present:
<span class="grey">Rosenberg Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
id: The id attribute identifies this contact. It MUST be
unique amongst all other id attributes present in other
contact elements conveyed to the subscriber within the
scope of their subscription. In particular, if the URI for
two contacts differ (based on the URI comparison rules in
<a href="./rfc3261">RFC 3261</a> [<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>]), the id attributes for those contacts MUST
differ. However, unlike the id attribute for an address-
of-record, if the URI for two contacts are the same, their
id attributes SHOULD be the same across notifications.
This requirement is at SHOULD strength, and not MUST
strength, since it is difficult to compute such an id as a
function of the URI without retaining additional state. No
hash function applied to the URI can, in fact, meet a MUST
requirement. This is because equality of the SIP URI is
not transitive. However, a hash function which includes
unknown URI parameters (that is, any not defined in <a href="./rfc3261">RFC</a>
<a href="./rfc3261">3261</a>), will always result in a value that is the different
if two URI are different, and usually the same if the URI
are equal.
state: The state attribute indicates the state of the contact.
The valid values are "active" and "terminated".
event: The event attribute indicates the event which caused the
contact state machine to go into its current state. Valid
values are registered, created, refreshed, shortened,
expired, deactivated, probation, unregistered and rejected.
If the event attribute has a value of shortened, the "expires"
attribute MUST be present. It contains an unsigned long integer
which indicates the number of seconds remaining until the binding is
due to expire. This attribute MAY be included with any event
attribute value for which the state of the contact is active.
If the event attribute has a value of probation, the "retry-after"
attribute MUST be present. It contains an unsigned long integer
which indicates the amount of seconds after which the owner of the
contact is expected to retry its registration.
The optional "duration-registered" attribute conveys the amount of
time that the contact has been bound to the address-of-record, in
seconds. The optional "q" attribute conveys the relative priority of
this contact compared to other registered contacts. The optional
"callid" attribute contains the current Call-ID carried in the
REGISTER that was last used to update this contact, and the optional
"cseq" attribute contains the last CSeq value present in a REGISTER
request that updated this contact value.
<span class="grey">Rosenberg Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
The "uri" element contains the URI associated with that contact. The
"display-name" element contains the display name for the contact.
The "display-name" element MAY contain the xml:lang attribute to
indicate the language of the display name.
The "unknown-param" element is used to convey contact header field
parameters that are not specified in <a href="./rfc3261">RFC 3261</a>. One example are the
user agent capability parameters specified in [<a href="#ref-11" title=""Session initiation protocol (SIP) caller preferences and callee capabilities"">11</a>]. Each "unknown-
param" element describes a single contact header field parameter.
The name of the parameter is contained in the mandatory name
attribute of the "unknown-param" element, and the value of the
parameter is the content of the "unknown-param" element. For contact
header field parameters that have no value, the content of the
"unknown-param" element is empty.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Computing Registrations from the Document</span>
Typically, the NOTIFY for registration information will only contain
information about those contacts whose state has changed. To
construct a coherent view of the total state of all registrations, a
subscriber will need to combine NOTIFYs received over time. The
subscriber maintains a table for each registration it receives
information for. Each registration is uniquely identified by the
"id" attribute in the "registration" element. Each table contains a
row for each contact in that registration. Each row is indexed by
the unique ID for that contact. It is conveyed in the "id" attribute
of the "contact" element. The contents of each row contain the state
of that contact as conveyed in the "contact" element. The tables are
also associated with a version number. The version number MUST be
initialized with the value of the "version" attribute from the
"reginfo" element in the first document received. Each time a new
document is received, the value of the local version number, and the
"version" attribute in the new document, are compared. If the value
in the new document is one higher than the local version number, the
local version number is increased by one, and the document is
processed. If the value in the document is more than one higher than
the local version number, the local version number is set to the
value in the new document, the document is processed, and the
subscriber SHOULD generate a refresh request to trigger a full state
notification. If the value in the document is less than the local
version, the document is discarded without processing.
The processing of the document depends on whether it contains full or
partial state. If it contains full state, indicated by the value of
the "state" attribute in the "reginfo" element, the contents of all
tables associated with this subscription are flushed. They are
re-populated from the document. A new table is created for each
"registration" element, and a new row in each table is created for
<span class="grey">Rosenberg Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
each "contact" element. If the reginfo contains partial state, as
indicated by the value of the "state" attribute in the "reginfo"
element, the document is used to update the existing tables. For
each "registration" element, the subscriber checks to see if a table
exists for that registration. This check is done by comparing the
value in the "id" attribute of the "registration" element with the ID
associated with the table. If a table doesn't exist for that
registration, one is created. For each "contact" element in the
registration, the subscriber checks to see whether a row exists for
that contact. This check is done by comparing the ID in the "id"
attribute of the "contact" element with the ID associated with the
row. If the contact doesn't exist in the table, a row is added, and
its state is set to the information from that "contact" element. If
the contact does exist, its state is updated to be the information
from that "contact" element. If a row is updated or created, such
that its state is now terminated, that entry MAY be removed from the
table at any time.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Example</span>
The following is an example registration information document:
<?xml version="1.0"?>
<reginfo xmlns="urn:ietf:params:xml:ns:reginfo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="0" state="full">
<registration aor="sip:user@example.com" id="as9"
state="active">
<contact id="76" state="active" event="registered"
duration-registered="7322"
q="0.8">
<uri>sip:user@pc887.example.com</uri>
</contact>
<contact id="77" state="terminated" event="expired"
duration-registered="3600"
q="0.5">
<uri>sip:user@university.edu</uri>
</contact>
</registration>
</reginfo>
<span class="grey">Rosenberg Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. XML Schema</span>
The following is the schema definition of the reginfo format:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:ietf:params:xml:ns:reginfo"
xmlns:tns="urn:ietf:params:xml:ns:reginfo"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- This import brings in the XML language attribute xml:lang-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
<xs:element name="reginfo">
<xs:complexType>
<xs:sequence>
<xs:element ref="tns:registration" minOccurs="0"
maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="version" type="xs:nonNegativeInteger"
use="required"/>
<xs:attribute name="state" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="full"/>
<xs:enumeration value="partial"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="registration">
<xs:complexType>
<xs:sequence>
<xs:element ref="tns:contact" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="aor" type="xs:anyURI" use="required"/>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="state" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="init"/>
<xs:enumeration value="active"/>
<xs:enumeration value="terminated"/>
</xs:restriction>
<span class="grey">Rosenberg Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="contact">
<xs:complexType>
<xs:sequence>
<xs:element name="uri" type="xs:anyURI"/>
<xs:element name="display-name" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="xml:lang" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="unknown-param" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="state" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="active"/>
<xs:enumeration value="terminated"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="event" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="registered"/>
<xs:enumeration value="created"/>
<xs:enumeration value="refreshed"/>
<xs:enumeration value="shortened"/>
<xs:enumeration value="expired"/>
<xs:enumeration value="deactivated"/>
<xs:enumeration value="probation"/>
<span class="grey">Rosenberg Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<xs:enumeration value="unregistered"/>
<xs:enumeration value="rejected"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="duration-registered" type="xs:unsignedLong"/>
<xs:attribute name="expires" type="xs:unsignedLong"/>
<xs:attribute name="retry-after" type="xs:unsignedLong"/>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="q" type="xs:string"/>
<xs:attribute name="callid" type="xs:string"/>
<xs:attribute name="cseq" type="xs:unsignedLong"/>
</xs:complexType>
</xs:element>
</xs:schema>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Example Call Flow</span>
User Registrar Application
| |(1) SUBSCRIBE |
| |Event:reg |
| |<------------------|
| |(2) 200 OK |
| |------------------>|
| |(3) NOTIFY |
| |------------------>|
| |(4) 200 OK |
| |<------------------|
|(5) REGISTER | |
|------------------>| |
|(6) 200 OK | |
|<------------------| |
| |(7) NOTIFY |
| |------------------>|
| |(8) 200 OK |
| |<------------------|
|(9) MESSAGE | |
|<--------------------------------------|
Figure 3: Example Call Flow
<span class="grey">Rosenberg Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
This section provides an example call flow, shown in Figure 3. It
shows an implementation of the welcome notice application described
in <a href="#section-3.3">Section 3.3</a>. First, the application SUBSCRIBEs to the
registration event package for the desired user (1):
SUBSCRIBE sip:joe@example.com SIP/2.0
Via: SIP/2.0/UDP app.example.com;branch=z9hG4bKnashds7
From: sip:app.example.com;tag=123aa9
To: sip:joe@example.com
Call-ID: 9987@app.example.com
CSeq: 9887 SUBSCRIBE
Contact: sip:app.example.com
Event: reg
Max-Forwards: 70
Accept: application/reginfo+xml
The registrar (which is acting as the notifier for the registration
event package) generates a 200 OK to the SUBSCRIBE:
SIP/2.0 200 OK
Via: SIP/2.0/UDP app.example.com;branch=z9hG4bKnashds7
;received=192.0.2.1
From: sip:app.example.com;tag=123aa9
To: sip:joe@example.com;tag=xyzygg
Call-ID: 9987@app.example.com
CSeq: 9987 SUBSCRIBE
Contact: sip:server19.example.com
Expires: 3600
The registrar then generates a notification (3) with the current
state. Since there is no active registration, the state of the
registration is "init":
NOTIFY sip:app.example.com SIP/2.0
Via: SIP/2.0/UDP server19.example.com;branch=z9hG4bKnasaii
From: sip:joe@example.com;tag=xyzygg
To: sip:app.example.com;tag=123aa9
Call-ID: 9987@app.example.com
CSeq: 1288 NOTIFY
Contact: sip:server19.example.com
Event: reg
Max-Forwards: 70
Content-Type: application/reginfo+xml
Content-Length: ...
<span class="grey">Rosenberg Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<?xml version="1.0"?>
<reginfo xmlns="urn:ietf:params:xml:ns:reginfo"
version="0" state="full">
<registration aor="sip:joe@example.com" id="a7" state="init" />
</reginfo>
Later on, the user registers (5):
REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/UDP pc34.example.com;branch=z9hG4bKnaaff
From: sip:joe@example.com;tag=99a8s
To: sip:joe@example.com
Call-ID: 88askjda9@pc34.example.com
CSeq: 9976 REGISTER
Contact: sip:joe@pc34.example.com
This results in a NOTIFY being generated to the application (7):
NOTIFY sip:app.example.com SIP/2.0
Via: SIP/2.0/UDP server19.example.com;branch=z9hG4bKnasaij
From: sip:joe@example.com;tag=xyzygg
To: sip:app.example.com;tag=123aa9
Call-ID: 9987@app.example.com
CSeq: 1289 NOTIFY
Contact: sip:server19.example.com
Event: reg
Max-Forwards: 70
Content-Type: application/reginfo+xml
Content-Length: ...
<?xml version="1.0"?>
<reginfo xmlns="urn:ietf:params:xml:ns:reginfo"
version="1" state="partial">
<registration aor="sip:joe@example.com" id="a7" state="active">
<contact id="76" state="active" event="registered"
duration-registered="0">
<uri>sip:joe@pc34.example.com</uri>
</contact>
</registration>
</reginfo>
<span class="grey">Rosenberg Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
The application can then send its instant message to the device (9):
MESSAGE sip:joe@pc34.example.com SIP/2.0
Via: SIP/2.0/UDP app.example.com;branch=z9hG4bKnashds8
From: sip:app.example.com;tag=123aa10
To: sip:joe@example.com
Call-ID: 9988@app.example.com
CSeq: 82779 MESSAGE
Max-Forwards: 70
Content-Type: text/plain
Content-Length: ...
Welcome to the example.com service!
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
Security considerations for SIP event packages are discussed in <a href="./rfc3265">RFC</a>
<a href="./rfc3265">3265</a> [<a href="#ref-2" title=""Session Initiation Protocol (SIP)-Specific Event Notification"">2</a>], and those considerations apply here.
Registration information is sensitive, potentially private,
information. Subscriptions to this event package SHOULD be
authenticated and authorized according to local policy. Some policy
guidelines are suggested in <a href="#section-4.6">Section 4.6</a>. In addition, notifications
SHOULD be sent in such a way to ensure confidentiality, message
integrity and verification of subscriber identity, such as sending
subscriptions and notifications using a SIPS URL or protecting the
notification bodies with S/MIME.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. IANA Considerations</span>
This document registers a new SIP Event Package, a new MIME type
(application/reginfo+xml), and a new XML namespace.
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. SIP Event Package Registration</span>
Package name: reg
Type: package
Contact: Jonathan Rosenberg, <jdrosen@jdrosen.net>
Published Specification: <a href="./rfc3680">RFC 3680</a>.
<span class="grey">Rosenberg Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. application/reginfo+xml MIME Registration</span>
MIME media type name: application
MIME subtype name: reginfo+xml
Mandatory parameters: none
Optional parameters: Same as charset parameter application/xml
as specified in <a href="./rfc3023">RFC 3023</a> [<a href="#ref-8" title=""XML media types"">8</a>].
Encoding considerations: Same as encoding considerations of
application/xml as specified in <a href="./rfc3023">RFC 3023</a> [<a href="#ref-8" title=""XML media types"">8</a>].
Security considerations: See <a href="./rfc3023#section-10">Section 10 of RFC 3023</a> [<a href="#ref-8" title=""XML media types"">8</a>] and
<a href="#section-7">Section 7</a> of this specification.
Interoperability considerations: none.
Published specification: This document.
Applications which use this media type: This document type is
being used in notifications to alert SIP user agents that
their registrations have expired and must be redone.
Additional Information:
Magic Number: None
File Extension: .rif or .xml
Macintosh file type code: "TEXT"
Personal and email address for further information: Jonathan
Rosenberg, <jdrosen@jdrosen.net>
Intended usage: COMMON
Author/Change controller: The IETF.
<span class="grey">Rosenberg Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<span class="h3"><a class="selflink" id="section-8.3" href="#section-8.3">8.3</a>. URN Sub-Namespace Registration for urn:ietf:params:xml:ns:reginfo</span>
This section registers a new XML namespace, as per the guidelines in
[<a href="#ref-7" title=""The IETF XML Registry"">7</a>].
URI: The URI for this namespace is
urn:ietf:params:xml:ns:reginfo.
Registrant Contact: IETF, SIMPLE working group,
<simple@ietf.org>, Jonathan Rosenberg
<jdrosen@jdrosen.net>.
XML:
BEGIN
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
"<a href="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd</a>">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/html;charset=iso-8859-1"/>
<title>Registration Information Namespace</title>
</head>
<body>
<h1>Namespace for Registration Information</h1>
<h2>urn:ietf:params:xml:ns:reginfo</h2>
<p>See <a href="ftp://ftp.rfc-editor.org/in-notes/rfc3680.txt">
<a href="./rfc3680">RFC3680</a></a>.</p>
</body>
</html>
END
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. Normative References</span>
[<a id="ref-1">1</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-2">2</a>] Roach, A., "Session Initiation Protocol (SIP)-Specific Event
Notification", <a href="./rfc3265">RFC 3265</a>, June 2002.
[<a id="ref-3">3</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.
<span class="grey">Rosenberg Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
[<a id="ref-4">4</a>] W. W. W. C. (W3C), "Extensible markup language (xml) 1.0." The
XML 1.0 spec can be found at
<a href="http://www.w3.org/TR/1998/REC-xml-19980210">http://www.w3.org/TR/1998/REC-xml-19980210</a>.
[<a id="ref-5">5</a>] Moats, R., "URN Syntax", <a href="./rfc2141">RFC 2141</a>, May 1997.
[<a id="ref-6">6</a>] Moats, R., "A URN Namespace for IETF Documents", <a href="./rfc2648">RFC 2648</a>,
August 1999.
[<a id="ref-7">7</a>] Mealling, M., "The IETF XML Registry", <a href="https://www.rfc-editor.org/bcp/bcp81">BCP 81</a>, <a href="./rfc3688">RFC 3688</a>, January
2004.
[<a id="ref-8">8</a>] Murata, M., St. Laurent, S. and D. Kohn, "XML media types", <a href="./rfc3023">RFC</a>
<a href="./rfc3023">3023</a>, January 2001.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Informative References</span>
[<a id="ref-9">9</a>] Rosenberg, J., "Session initiation protocol (SIP) extensions for
presence", Work In Progress.
[<a id="ref-10">10</a>] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C. and D.
Gurle, "Session Initiation Protocol (SIP) Extension for Instant
Messaging", <a href="./rfc3428">RFC 3428</a>, December 2002.
[<a id="ref-11">11</a>] Schulzrinne, H. and J. Rosenberg, "Session initiation protocol
(SIP) caller preferences and callee capabilities", Work In
Progress.
[<a id="ref-12">12</a>] Mayer, G. and M. Beckmann, "Registration event package", Work In
Progress.
<span class="grey">Rosenberg Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Contributors</span>
This document is based heavily on the registration event package
originally proposed by Beckmann and Mayer in [<a href="#ref-12" title=""Registration event package"">12</a>]. They can be
contacted at:
Georg Mayer
Siemens AG
Hoffmannstr. 51
Munich 81359
Germany
EMail: Georg.Mayer@icn.siemens.de
Mark Beckmann
Siemens AG
P.O. Box 100702
Salzgitter 38207
Germany
EMail: Mark.Beckmann@siemens.com
Rohan Mahy provided editorial work in order to progress this
specification. His contact address is:
Rohan Mahy
Cisco Systems
170 West Tasman Dr, MS: SJC-21/3/3
Phone: +1 408 526 8570
EMail: rohan@cisco.com
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Acknowledgements</span>
We would like to thank Dean Willis for his support.
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. Author's Address</span>
Jonathan Rosenberg
dynamicsoft
600 Lanidex Plaza
Parsippany, NJ 07054
EMail: jdrosen@dynamicsoft.com
<span class="grey">Rosenberg Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc3680">RFC 3680</a> SIP Registrations Event March 2004</span>
<span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. Full Copyright Statement</span>
Copyright (C) The Internet Society (2004). 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 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.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Rosenberg Standards Track [Page 26]
</pre>
|