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 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845
  
     | 
    
      <pre>Internet Engineering Task Force (IETF)                        S. Okumura
Request for Comments: 6337                                     Softfront
Category: Informational                                        T. Sawada
ISSN: 2070-1721                                         KDDI Corporation
                                                              P. Kyzivat
                                                             August 2011
   <span class="h1">Session Initiation Protocol (SIP) Usage of the Offer/Answer Model</span>
Abstract
   The Session Initiation Protocol (SIP) utilizes the offer/answer model
   to establish and update multimedia sessions using the Session
   Description Protocol (SDP).  The description of the offer/answer
   model in SIP is dispersed across multiple RFCs.  This document
   summarizes all the current usages of the offer/answer model in SIP
   communication.
Status of This Memo
   This document is not an Internet Standards Track specification; it is
   published for informational purposes.
   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Not all documents
   approved by the IESG are a candidate for any level of Internet
   Standard; see <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   <a href="http://www.rfc-editor.org/info/rfc6337">http://www.rfc-editor.org/info/rfc6337</a>.
Copyright Notice
   Copyright (c) 2011 IETF Trust and the persons identified as the
   document authors.  All rights reserved.
   This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
<span class="grey">Okumura, et al.               Informational                     [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.
Table of Contents
   <a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
   <a href="#section-2">2</a>. Summary of SIP Usage of the Offer/Answer Model ..................<a href="#page-3">3</a>
      <a href="#section-2.1">2.1</a>. Terminology ................................................<a href="#page-3">3</a>
      <a href="#section-2.2">2.2</a>. Offer/Answer Exchange Pairs in SIP Messages ................<a href="#page-4">4</a>
      <a href="#section-2.3">2.3</a>. Rejection of an Offer ......................................<a href="#page-5">5</a>
      <a href="#section-2.4">2.4</a>. Session Description That Is Not an Offer or an Answer ......<a href="#page-7">7</a>
   <a href="#section-3">3</a>. Detailed Discussion of the Offer/Answer Model for SIP ...........<a href="#page-8">8</a>
      <a href="#section-3.1">3.1</a>. Offer/Answer for the INVITE method with 100rel Extension ...<a href="#page-8">8</a>
           <a href="#section-3.1.1">3.1.1</a>. INVITE Request with SDP .............................<a href="#page-8">8</a>
           <a href="#section-3.1.2">3.1.2</a>. INVITE Request without SDP .........................<a href="#page-11">11</a>
      <a href="#section-3.2">3.2</a>. Offer/Answer Exchange in Early Dialog .....................<a href="#page-12">12</a>
      <a href="#section-3.3">3.3</a>. Offer/Answer Exchange in an Established Dialog ............<a href="#page-12">12</a>
      <a href="#section-3.4">3.4</a>. Recovering from a Failed Re-INVITE ........................<a href="#page-13">13</a>
   <a href="#section-4">4</a>. Exceptional Case Handling ......................................<a href="#page-13">13</a>
      <a href="#section-4.1">4.1</a>. Message Crossing Case Handling ............................<a href="#page-13">13</a>
      <a href="#section-4.2">4.2</a>. Glare Case Handling .......................................<a href="#page-18">18</a>
      <a href="#section-4.3">4.3</a>. Interworking of UPDATE and Re-INVITE ......................<a href="#page-21">21</a>
   <a href="#section-5">5</a>. Content of Offers and Answers ..................................<a href="#page-25">25</a>
      <a href="#section-5.1">5.1</a>. General Principle for Constructing Offers and Answers .....<a href="#page-26">26</a>
      <a href="#section-5.2">5.2</a>. Choice of Media Types and Formats to Include and Exclude ..26
           <a href="#section-5.2.1">5.2.1</a>. Sending an Initial INVITE with Offer ...............<a href="#page-26">26</a>
           5.2.2. Responding with an Offer When the Initial
                  INVITE Has No Offer ................................<a href="#page-27">27</a>
           <a href="#section-5.2.3">5.2.3</a>. Answering an Initial INVITE with Offer .............<a href="#page-27">27</a>
           <a href="#section-5.2.4">5.2.4</a>. Answering When the Initial INVITE Had No Offer .....<a href="#page-28">28</a>
           <a href="#section-5.2.5">5.2.5</a>. Subsequent Offers and Answers ......................<a href="#page-28">28</a>
      <a href="#section-5.3">5.3</a>. Hold and Resume of Media ..................................<a href="#page-29">29</a>
      <a href="#section-5.4">5.4</a>. Behavior on Receiving SDP with c=0.0.0.0 ..................<a href="#page-31">31</a>
   <a href="#section-6">6</a>. Security Considerations ........................................<a href="#page-31">31</a>
   <a href="#section-7">7</a>. Acknowledgements ...............................................<a href="#page-31">31</a>
   <a href="#section-8">8</a>. References .....................................................<a href="#page-32">32</a>
      <a href="#section-8.1">8.1</a>. Normative References ......................................<a href="#page-32">32</a>
      <a href="#section-8.2">8.2</a>. Informative References ....................................<a href="#page-33">33</a>
<span class="grey">Okumura, et al.               Informational                     [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>.  Introduction</span>
   SIP utilizes the offer/answer model to establish and update sessions.
   The rules that govern the offer/answer behaviors in SIP are described
   in several RFCs: [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>], [<a href="./rfc3262" title=""Reliability of Provisional Responses in Session Initiation Protocol (SIP)"">RFC3262</a>], [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>], [<a href="./rfc3311" title=""The Session Initiation Protocol (SIP) UPDATE Method"">RFC3311</a>], and
   [<a href="./rfc6141" title=""Re-INVITE and Target-Refresh Request Handling in the Session Initiation Protocol (SIP)"">RFC6141</a>].
   The primary purpose of this document is to describe all forms of SIP
   usage of the offer/answer model in one document to help the readers
   to fully understand it.  Also, this document tries to incorporate the
   results of the discussions on the controversial issues to avoid
   repeating the same discussions later.
   This document describes ambiguities in the current specifications and
   the authors' understanding of the correct interpretation of these
   specifications.  This document is not intended to make any changes to
   those specifications, but rather is intended to provide a reference
   for future standards development work on the SIP offer/answer model
   and to developers looking for advice on how to implement in
   compliance with the standards.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>.  Summary of SIP Usage of the Offer/Answer Model</span>
   The offer/answer model itself is independent from the higher layer
   application protocols that utilize it.  SIP is one of the
   applications using the offer/answer model.  [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>] defines the
   offer/answer model, but does not specify which SIP messages should
   convey an offer or an answer.  This should be defined in the SIP core
   and extension RFCs.
   In theory, any SIP message can include a session description in its
   body.  But a session description in a SIP message is not necessarily
   an offer or an answer.  Only certain session description usages that
   conform to the rules described in Standards-Track RFCs can be
   interpreted as an offer or an answer.  The rules for how to handle
   the offer/answer model are defined in several RFCs.
   The offer/answer model defines a mechanism for update of sessions.
   In SIP, a dialog is used to associate an offer/answer exchange with
   the session that it is to update.  In other words, only the offer/
   answer exchange in the SIP dialog can update the session that is
   managed by that dialog.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>.  Terminology</span>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="grey">Okumura, et al.               Informational                     [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   The following abbreviations are used in this document.
   UA:  User Agent.
   UAC: User Agent Client.
   UAS: User Agent Server.
   SDP: Session Description Protocol [<a href="./rfc4566" title=""SDP: Session Description Protocol"">RFC4566</a>].
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>.  Offer/Answer Exchange Pairs in SIP Messages</span>
   Currently, the rules on the offer/answer model are defined in
   [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>], [<a href="./rfc3262" title=""Reliability of Provisional Responses in Session Initiation Protocol (SIP)"">RFC3262</a>], [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>], [<a href="./rfc3311" title=""The Session Initiation Protocol (SIP) UPDATE Method"">RFC3311</a>], and [<a href="./rfc6141" title=""Re-INVITE and Target-Refresh Request Handling in the Session Initiation Protocol (SIP)"">RFC6141</a>].  In these
   RFCs, only the six patterns shown in Table 1 are defined for
   exchanging an offer and an answer with SIP messages.
   Note that an offer/answer exchange initiated by an INVITE request
   must follow exactly one of the Patterns 1, 2, 3, 4.  When an initial
   INVITE causes multiple dialogs due to forking, an offer/answer
   exchange is carried out independently in each distinct dialog.  When
   an INVITE request contains no offer, only Pattern 2 or Pattern 4
   apply.  According to <a href="./rfc3261#section-13.2.1">Section 13.2.1 of [RFC3261]</a>, 'The first reliable
   non-failure message' must have an offer if there is no offer in the
   INVITE request.  This means that the User Agent (UA) that receives
   the INVITE request without an offer must include an offer in the
   first reliable response with 100rel extension.  If no reliable
   provisional response has been sent, the User Agent Server (UAS) must
   include an offer when sending 2xx response.
   In Pattern 3, the first reliable provisional response may or may not
   have an answer.  When a reliable provisional response contains a
   session description, and is the first to do so, then that session
   description is the answer to the offer in the INVITE request.  The
   answer cannot be updated, and a new offer cannot be sent in a
   subsequent reliable response for the same INVITE transaction.
   In Pattern 5, a Provisional Response ACKnowledgement (PRACK) request
   can contain an offer only if the reliable response that it
   acknowledges contains an answer to the previous offer/answer
   exchange.
      NOTE: It is legal to have UPDATE/2xx exchanges without offer/
      answer exchanges (Pattern 6).  However, when re-INVITEs are sent
      for non-offer/answer purposes, an offer/answer exchange is
      required.  In that case, the prior SDP will typically be repeated.
<span class="grey">Okumura, et al.               Informational                     [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   There may be ONLY ONE offer/answer negotiation in progress for a
   single dialog at any point in time.  <a href="#section-4">Section 4</a> explains how to ensure
   this.  When an INVITE results in multiple dialogs, each has a
   separate offer/answer negotiation.
      NOTE: This is when using a Content-Disposition of "session".
      There may be a second offer/answer negotiation in progress using a
      Content-Disposition of "early-session" [<a href="./rfc3959" title=""The Early Session Disposition Type for the Session Initiation Protocol (SIP)"">RFC3959</a>].  That is not
      addressed by this document.
            Offer                Answer             RFC    Ini Est Early
     -------------------------------------------------------------------
     1. INVITE Req.          2xx INVITE Resp.     <a href="./rfc3261">RFC 3261</a>  Y   Y    N
     2. 2xx INVITE Resp.     ACK Req.             <a href="./rfc3261">RFC 3261</a>  Y   Y    N
     3. INVITE Req.          1xx-rel INVITE Resp. <a href="./rfc3262">RFC 3262</a>  Y   Y    N
     4. 1xx-rel INVITE Resp. PRACK Req.           <a href="./rfc3262">RFC 3262</a>  Y   Y    N
     5. PRACK Req.           200 PRACK Resp.      <a href="./rfc3262">RFC 3262</a>  N   Y    Y
     6. UPDATE Req.          2xx UPDATE Resp.     <a href="./rfc3311">RFC 3311</a>  N   Y    Y
          Table 1: Summary of SIP Usage of the Offer/Answer Model
   In Table 1, '1xx-rel' corresponds to the reliable provisional
   response that contains the 100rel option defined in [<a href="./rfc3262" title=""Reliability of Provisional Responses in Session Initiation Protocol (SIP)"">RFC3262</a>].
   The 'Ini' column shows the ability to exchange the offer/answer to
   initiate the session.  'Y' indicates that the pattern can be used in
   the initial offer/answer exchange, while 'N' indicates that it
   cannot.  Only the initial INVITE transaction can be used to exchange
   the offer/answer to establish a multimedia session.
   The 'Est' column shows the ability to update the established session.
   The 'Early' column indicates which patterns may be used to modify the
   established session in an early dialog.  There are two ways to
   exchange a subsequent offer/answer in an early dialog.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>.  Rejection of an Offer</span>
   It is not always clear how to reject an offer when it is
   unacceptable, and some methods do not allow explicit rejection of an
   offer.  For each of the patterns in Table 1, Table 2 shows how to
   reject an offer.
   When a UA receives an INVITE request with an unacceptable offer, it
   should respond with a 488 response, preferably with Warning header
   field indicating the reason of the rejection, unless another response
   code is more appropriate to reject it (Pattern 1 and Pattern 3).
<span class="grey">Okumura, et al.               Informational                     [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   If this is a re-INVITE, extra care must be taken, as detailed in
   [<a href="./rfc6141" title=""Re-INVITE and Target-Refresh Request Handling in the Session Initiation Protocol (SIP)"">RFC6141</a>].  Specifically, if the offer contains any changes or
   additions to media stream properties, and those have already been
   used to transmit/receive media before the final response is sent,
   then a 2xx response should be sent, with a syntactically correct
   session description.  This may optionally be followed by an UPDATE
   request to rearrange the session parameters if both ends support the
   UPDATE method.  Alternatively, the UA may send an error response to
   the (re-)INVITE request to terminate the dialog or to roll back the
   offer/answer status before sending re-INVITE request.  In this case,
   the UAS should not continue to retransmit the unacknowledged reliable
   provisional response; the User Agent Client (UAC) should not continue
   to retransmit a PRACK request.
   When a UA receives an UPDATE request with an offer that it cannot
   accept, it should respond with a 488 response, preferably with
   Warning header field indicating the reason of the rejection, unless
   another response code is more appropriate to reject it (Pattern 6).
   When a UA receives a PRACK request with an offer that it cannot
   accept, it may respond with a 200 response with a syntactically
   correct session description.  Optionally, this may be followed by an
   UPDATE request to rearrange the session parameters if both ends
   support the UPDATE method.  Alternatively, the UA may terminate the
   dialog and send an error response to the INVITE request (Pattern 5).
   In addition, there is a possibility for UAC to receive a 488 response
   for an PRACK request.  In that case, UAC may send again a PRACK
   request without an offer or send a CANCEL request to terminate the
   INVITE transaction.
      NOTE: In [<a href="./rfc3262" title=""Reliability of Provisional Responses in Session Initiation Protocol (SIP)"">RFC3262</a>], the following restriction is defined with
      regard to responding to a PRACK request.
      "If the PRACK does match an unacknowledged reliable provisional
      response, it MUST be responded to with a 2xx response."
      This restriction is not clear.  There are cases where it is
      unacceptable to send a 2xx response.  For example, the UAS may
      need to send an authentication challenge in a 401 response.  This
      is an open issue and out of scope for this document.
   When a UA receives a response with an offer that it cannot accept,
   the UA does not have a way to reject it explicitly.  Therefore, a UA
   should respond to the offer with the correct session description and
   rearrange the session parameters by initiating a new offer/answer
<span class="grey">Okumura, et al.               Informational                     [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   exchange, or alternatively terminate the session (Pattern 2 and
   Pattern 4).  When initiating a new offer/answer, a UA should take
   care not to cause an infinite offer/answer loop.
   <a href="./rfc3261#section-14.2">Section 14.2 of [RFC3261]</a>, "UAS Behavior", states:
      The UAS MUST ensure that the session description overlaps with its
      previous session description in media formats, transports, or
      other parameters that require support from the peer.  This is to
      avoid the need for the peer to reject the session description.
   This is a rule for an offer within 2xx response to a re-INVITE.  This
   rule should be applied to an offer within a reliable provisional
   response and a PRACK request.
        Offer                Rejection
     ------------------------------------------------------------------
     1. INVITE Req. (*)      488 INVITE Response
     2. 2xx INVITE Resp.     Answer in ACK Req. followed by new offer
                             OR termination of dialog
     3. INVITE Req.          488 INVITE Response (same as Pattern 1)
     4. 1xx-rel INVITE Resp. Answer in PRACK Req. followed by new offer
     5. PRACK Req. (**)      200 PRACK Resp. followed by new offer
                             OR termination of dialog
     6. UPDATE Req.          488 UPDATE Response
   (*) If this was a re-INVITE, a failure response should not be sent if
   media has already been exchanged using the new offer.
   (**) A UA should only use PRACK to send an offer when it has strong
   reasons to expect the receiver will accept the offer.
                      Table 2: Rejection of an Offer
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>.  Session Description That Is Not an Offer or an Answer</span>
   As previously stated, a session description in a SIP message is not
   necessarily an offer or an answer.  For example, SIP can use a
   session description to describe capabilities apart from offer/answer
   exchange.  Examples of this are a 200 OK response for OPTIONS and a
   488 response for INVITE.
<span class="grey">Okumura, et al.               Informational                     [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>.  Detailed Discussion of the Offer/Answer Model for SIP</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>.  Offer/Answer for the INVITE method with 100rel Extension</span>
   The INVITE method provides the basic procedure for offer/answer
   exchange in SIP.  Without the 100rel option, the rules are simple as
   described in [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>].  If an INVITE request includes a session
   description, Pattern 1 is applied and if an INVITE request does not
   include a session description, Pattern 2 is applied.
   With 100rel, Patterns 3, 4, and 5 are added and this complicates the
   rules.  An INVITE request may cause multiple responses.  Note that
   even if both UAs support the 100rel extension, not all the
   provisional responses may be sent reliably.
<span class="h4"><a class="selflink" id="section-3.1.1" href="#section-3.1.1">3.1.1</a>.  INVITE Request with SDP</span>
   When a UAC includes an SDP body in the INVITE request as an offer,
   only the first SDP in a reliable non-failure response to the INVITE
   request is the real answer.  No other offer/answer exchanges can
   occur within the messages (other responses and ACK) of the INVITE
   transaction.
   In [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] there are some descriptions about an offer/answer
   exchange, but those cause a little confusion.  We interpret those
   descriptions as follows,
   UAC behavior:
      1.  If the first SDP that the UAC received is included in an
          unreliable provisional response to the INVITE request,
          [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] (<a href="#section-13.2.1">Section 13.2.1</a>, second bullet) requires that this
          be treated as an answer.  However, because that same section
          states that the answer has to be in a reliable non-failure
          message, this SDP is not the true answer and therefore the
          offer/answer exchange is not yet completed.
      2.  After the UAC has received the answer in a reliable
          provisional response to the INVITE, [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] requires that
          any SDP in subsequent responses be ignored.
      3.  If the second and subsequent SDP (including a real answer) is
          different from the first SDP, the UAC should consider that the
          SDP is equal to the first SDP.  Therefore, the UAC should not
          switch to the new SDP.
<span class="grey">Okumura, et al.               Informational                     [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   UAS behavior:
      1.  [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] requires all SDP in the responses to the INVITE
          request to be identical.
      2.  After the UAS has sent the answer in a reliable provisional
          response to the INVITE, the UAS should not include any SDPs in
          subsequent responses to the INVITE.
      3.  [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] permits the UAS to send any provisional response
          without SDP regardless of the transmission of the answer.
   A session description in an unreliable response that precedes a
   reliable response can be considered a "preview" of the answer that
   will be coming.
      NOTE: This "preview" session description rule applies to a single
      offer/answer exchange.  In parallel offer/answer exchanges (caused
      by forking), a UA may obviously receive a different "preview" of
      an answer in each dialog.  UAs are expected to deal with this.
   Although [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] says a UA should accept media once an INVITE with
   an offer has been sent, in many cases, an answer (or, at least a
   preview of it) is required in order for media to be accepted.  Two
   examples of why this might be required are as follows:
   o  To avoid receiving media from undesired sources, some User Agents
      assume symmetric RTP will be used, ignore all incoming media
      packets until an address/port has been received from the other
      end, and then use that address/port to filter incoming media
      packets.
   o  In some networks, an intermediate node must authorize a media
      stream before it can flow and requires a confirming answer to the
      offer before doing so.
   Therefore, a UAS should send an SDP answer reliably (if possible)
   before it starts sending media.  And, if neither the UAC nor the UAS
   support 100rel, the UAS should send a preview of the answer before it
   starts sending media.
<span class="grey">Okumura, et al.               Informational                     [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
     UAC                   UAS
      | F1  INVITE (SDP)    | <- The offer in the offer/answer model.
      |-------------------->|
      | F2     1xx (SDP)    | <- The offer/answer exchange is not
      |<--------------------|    closed yet, but UAC acts as if it
      |                     | ^  receives the answer.
      | F3 1xx-rel (no SDP) | |<- a 1xx-rel may be sent without answer
      |<--------------------| |   SDP.
      | F4   PRACK (no SDP) | |
      |-------------------->| | The UAC must not send a new offer.
      | F5 2xx PRA (no SDP) | |
      |<--------------------| v
      |                     |
      | F6 1xx-rel (SDP)    | <- The answer in the offer/ answer model.
      |<--------------------| -
      | F7   PRACK          | | The UAC can send a new offer in a PRACK
      |-------------------->| | request to acknowledge F6.
      | F8 2xx PRA          | | After F7, the UAC and UAS can send a new
      |<--------------------| v offer in an UPDATE request.
      |                     |
      | F9 1xx-rel          | <- SDP should not be included in the
      |<--------------------|    subsequent 1xx-rel once offer/answer
      | F10  PRACK          |    has been completed.
      |-------------------->|
      | F11 2xx PRA         |
      |<--------------------|
      |                     |
      | F12 2xx INV         | <- SDP should not be included in the
      |<--------------------|    final response once offer/answer has
      | F13    ACK          |    been completed.
      |-------------------->|
        Figure 1: Example of Offer/Answer with 100rel Extension (1)
   For example, in Figure 1, only the SDP in F6 is the answer.  The SDP
   in the non-reliable response (F2) is the preview of the answer and
   must be the same as the answer in F6.  Receiving F2, the UAC should
   act as if it receives the answer.  However, offer/answer exchange is
   not completed yet and the UAC must not send a new offer until it
   receives the same SDP in a reliable non-failure response, which is
   the real answer.  After sending the SDP in F6, the UAS must prepare
   to receive a new offer from the UAC in a PRACK request or in an
   UPDATE request if the UAS supports UPDATE.
   The UAS does not include SDP in responses F9 and F12.  However, the
   UAC should prepare to receive SDP bodies in F9 and/or F12, and just
   ignore them, to handle a peer that does not conform to the
   recommended implementation.
<span class="grey">Okumura, et al.               Informational                    [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
<span class="h4"><a class="selflink" id="section-3.1.2" href="#section-3.1.2">3.1.2</a>.  INVITE Request without SDP</span>
   When a UAC does not include an SDP body in the INVITE request,
   [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] (<a href="#section-13.2.1">Section 13.2.1</a>, first bullet) requires that the UAS
   include an offer in the first reliable non-failure response.
   However, a UAC might not expect an SDP in the other responses to the
   INVITE request because <a href="./rfc3261">RFC 3261</a> simply does not anticipate the
   possibility.  Therefore, the UAS ought not include any SDP in the
   other responses to the INVITE request.
      NOTE: In Figure 2, the UAS should not include SDP in the responses
      F6 and F9.  However, the UAC should prepare to receive SDP bodies
      in F6 and/or F9, and just ignore them to handle a peer that does
      not conform to the recommended implementation.
    UAC                   UAS
     | F1  INVITE (no SDP) |
     |-------------------->|
     | F2     1xx          |
     |<--------------------|
     |                     |
     | F3 1xx-rel (SDP)    | <- The first 1xx-rel must contain SDP
     |<--------------------|    as the offer.
     | F4   PRACK (SDP)    | <- A PRACK request to the first 1xx-rel
     |-------------------->|    must contain SDP as the answer.
     | F5 2xx PRA (no SDP) | -
     |<--------------------| |
     |                     | |
     | F6 1xx-rel (no SDP) | <- The subsequent 1xx-rel should not
     |<--------------------| |  contain SDP.
     | F7   PRACK          | |
     |-------------------->| | The UAC can send a new offer in an UPDATE
     | F8 2xx PRA          | | request after F4.
     |<--------------------| v
     |                     |
     | F9 2xx INV (no SDP) | <- The final response should not
     |<--------------------|    contain SDP.
     | F10    ACK          |
     |-------------------->|
        Figure 2: Example of Offer/Answer with 100rel Extension (2)
   Note that in the case that the UAC needs to prompt the user to accept
   or reject the offer, the reliable provisional response with SDP as an
   offer (Pattern 4) can result in the retransmission until the PRACK
   request can be sent.  The UAC should take care to avoid this
   situation when it sends the INVITE request without SDP.
<span class="grey">Okumura, et al.               Informational                    [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>.  Offer/Answer Exchange in Early Dialog</span>
   When both UAs support the 100rel extension, they can update the
   session in the early dialog once the first offer/answer exchange has
   been completed.
   From a UA sending an INVITE request:
   A UA can send an UPDATE request with a new offer if both ends support
   the UPDATE method.  Note that if the UAS needs to prompt the user to
   accept or reject the offer, the delay can result in retransmission of
   the UPDATE request.
   A UA can send a PRACK request with a new offer only when
   acknowledging the reliable provisional response carrying the answer
   to an offer in the INVITE request.  Compared to using the UPDATE
   method, using PRACK can reduce the number of messages exchanged
   between the UAs.  However, to avoid problems or delays caused by
   PRACK offer rejection, the UA is recommended to send a PRACK request
   only when it has strong reasons to expect the receiver will accept
   it.  For example, the procedure used in precondition extension
   [<a href="./rfc3312" title=""Integration of Resource Management and Session Initiation Protocol (SIP)"">RFC3312</a>] is a case where a PRACK request should be used for updating
   the session status in an early dialog.  Note also that if a UAS needs
   to prompt the user to accept or reject the offer, the delay can
   result in retransmission of the PRACK request.
   From a UA receiving an INVITE request:
   A UA can send an UPDATE request with a new offer if both ends support
   the UPDATE method.  A UAS cannot send a new offer in the reliable
   provisional response, so the UPDATE method is the only method for a
   UAS to update an early session.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>.  Offer/Answer Exchange in an Established Dialog</span>
   Both the re-INVITE and UPDATE methods can be used in an established
   dialog to update the session.
   The UPDATE method is simpler and can save at least one message
   compared with the INVITE method.  But both ends must support the
   UPDATE method for it to be used.
   The INVITE method needs at least three messages to complete but no
   extensions are needed.  Additionally, the INVITE method allows the
   peer to take time to decide whether or not it will accept a session
   update by sending provisional responses.  That is, re-INVITE allows
   the UAS to interact with the user at the peer, while UPDATE needs to
   be answered automatically by the UAS.  It is noted that re-INVITE
<span class="grey">Okumura, et al.               Informational                    [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   should be answered immediately unless such a user interaction is
   needed.  Otherwise, some Third Party Call Control (3PCC) [<a href="./rfc3725" title=""Best Current Practices for Third Party Call Control (3pcc) in the Session Initiation Protocol (SIP)"">RFC3725</a>]
   flows will break.
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>.  Recovering from a Failed Re-INVITE</span>
   <a href="./rfc3261#section-14.1">Section 14.1 of [RFC3261]</a> requires that the session parameters in
   effect prior to a re-INVITE remain unchanged if the re-INVITE fails,
   as if no re-INVITE had been issued.  This remains the case even if
   multiple offer/answer exchanges have occurred between the sending of
   the re-INVITE and its failure, and even if media has been exchanged
   using the proposed changes in the session.  Because this can be
   difficult to achieve in practice, a newer specification [<a href="./rfc6141" title=""Re-INVITE and Target-Refresh Request Handling in the Session Initiation Protocol (SIP)"">RFC6141</a>]
   recommends the UAS to send a 2xx response to a re-INVITE in cases
   where rolling back changes would be problematic.
   Nevertheless, a UAC may receive a failure response to a re-INVITE
   after proposed changes that must be rolled back have already been
   used.  In such a case, the UAC should send an UPDATE offering the SDP
   that has been reinstated.  (See [<a href="./rfc6141" title=""Re-INVITE and Target-Refresh Request Handling in the Session Initiation Protocol (SIP)"">RFC6141</a>] for details.)
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>.  Exceptional Case Handling</span>
   In [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>], the following restrictions are defined with regard to
   sending a new offer.
      At any time, either agent MAY generate a new offer that updates
      the session.  However, it MUST NOT generate a new offer if it has
      received an offer which it has not yet answered or rejected.
      Furthermore, it MUST NOT generate a new offer if it has generated
      a prior offer for which it has not yet received an answer or a
      rejection.
   Assuming that the above rules are guaranteed, there seem to be two
   possible 'exceptional' cases to be considered in SIP offer/answer
   usage: the 'message crossing' case and the 'glare' case.  One of the
   reasons why the usage of SIP methods to exchange offer/answer needs
   to be carefully restricted in the RFCs is to ensure that the UA can
   detect and handle appropriately the 'exceptional' cases to avoid
   incompatible behavior.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>.  Message Crossing Case Handling</span>
   When message packets cross in the transport network, an offer may be
   received before the answer for the previous offer/answer exchange, as
   shown in Figure 3.  In such a case, UA A must detect that the session
   description SDP-2 is not the answer to offer1.
<span class="grey">Okumura, et al.               Informational                    [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
                            A                  B
                            |SDP-1     (offer1)|
                         M1 |----------------->|
                            |SDP-2    (answer1)|
                         M2 |<------\  /-------|
                            |        \/        |
                            |SDP-3   /\(offer2)|
                         M3 |<------/  \-------|
                      Figure 3: Message Crossing Case
   Because of the restrictions on placement of offers and answers
   (summarized in Table 1), there are a limited number of valid
   exchanges of messages that may lead to this message crossing case.
   These are enumerated in Table 3.  (This table only shows messages
   containing offers or answers.  There could be other messages, without
   session descriptions, which are not shown.)
   When a response to an UPDATE request crosses a reliable response to
   an INVITE request, there are variants shown in Figures 4 and 5, which
   are dependent on an INVITE (Mx) that contains no offer.  These are
   also included in Table 3.
                   A                               B
                   |                               |
                   |UPDATE(offer1)                 |
                M1 |==============================>|
                   |re-INVITE(no offer)            |
                Mx |------------------------------>| --+
                   |               2xx-UPD(answer1)|   |
                M2 |<===========\  /===============|   | first reliable
                   |             \/ 1xx-rel/2xx-INV|   | response
                   |             /\        (offer2)|   |
                M3 |<===========/  \===============| <-+
                   |PRACK/ACK(answer2)             |
                My |------------------------------>|
                   |                               |
                Figure 4: Avoidable Message Crossing Cases
   To avoid the message crossing condition shown in Figure 4, UA A
   should not send this re-INVITE request until an UPDATE transaction
   has been completed.  If UA B encounters this message crossing
   condition, it should reject this re-INVITE request with a 500
   response.
<span class="grey">Okumura, et al.               Informational                    [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
                   A                               B
                   |                               |
                   |re-INVITE(no offer)            |
                Mx |------------------------------>| --+
                   |UPDATE(offer1)                 |   |
                M1 |==============================>|   |
                   |               2xx-UPD(answer1)|   |
                M2 |<===========\  /===============|   | first reliable
                   |             \/ 1xx-rel/2xx-INV|   | response
                   |             /\        (offer2)|   |
                M3 |<===========/  \===============| <-+
                   |PRACK/ACK(answer2)             |
                My |------------------------------>|
                   |                               |
                Figure 5: Avoidable Message Crossing Cases
   To avoid the message crossing condition shown in Figure 5, UA A
   should not send this UPDATE request until an ACK or a PRACK
   transaction associated with an offer/answer has been completed.  If
   UA B encounters this message crossing condition, it should reject
   this UPDATE request with a 500 response.
   The situation when a PRACK request crosses UPDATE request is shown in
   Figure 6.
                   A                               B
                   |                               |
                   |           re-INVITE (no offer)|
   1st reliable+-- |<------------------------------|
   response    | M1|1xx-rel(offer1)                |
               +-> |==============================>| --+
                   |                 PRACK(answer1)| M3| Acknowledge
                   |<===========\  /===============| <-+
                   |             \/                |
                   |             /\  UPDATE(offer2)|
                   |<===========/  \===============| M2
                   |500-UPD                        |
                   |------------------------------>|
                   |2xx-PRA                        |
                   |------------------------------>|
                   |                               |
                Figure 6: Avoidable Message Crossing Cases
<span class="grey">Okumura, et al.               Informational                    [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   To avoid the message crossing condition shown in Figure 6, UA B
   should not send this UPDATE request until a PRACK transaction
   associated with an offer/answer has been completed.  If UA A
   encounters this message crossing condition, it should reject this
   UPDATE request with a 500 response.
   The situation when a reliable provisional response to an INVITE
   request crosses UPDATE request is shown in Figure 7.
                   A                               B
                   |                               |
                   |re-INVITE(offer1)              |
                M1 |==============================>|
                   |               1xx-rel(answer1)|
                   |<===========\  /===============| M3
                   |             \/                |
                   |             /\  UPDATE(offer2)|
               +-- |<===========/  \===============| M2
               |   |491-UPD                        |
   Acknowledge |   |------------------------------>|
               |   |PRACK                          |
               +-> |------------------------------>|
                   |                               |
                Figure 7: Avoidable Message Crossing Cases
   To avoid the message crossing condition shown in Figure 7, UA B
   should not send this UPDATE request until a PRACK transaction
   associated with an offer/answer has been completed.  If UA A
   encounters this message crossing condition, it should reject this
   UPDATE request with a 491 response.
   The situation when a 2xx response to an INVITE request crosses UPDATE
   request is shown in Figure 8.
<span class="grey">Okumura, et al.               Informational                    [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
                   A                               B
                   |                               |
                   |re-INVITE(offer1)              |
                   |==============================>|
                   |               2xx-INV(answer1)|
                   |<===========\  /===============|
                   |             \/                |
                   |             /\  UPDATE(offer2)|
               +-- |<===========/  \===============|
               |   |491-UPD                        |
   Acknowledge |   |------------------------------>|
               |   |ACK                            |
               +-> |------------------------------>|
                   |                               |
                Figure 8: Avoidable Message Crossing Cases
   This is a true glare.  To avoid the message crossing condition shown
   in Figure 8, UA B should not send the UPDATE request until it has
   received an ACK request.  But there is no problem even if UA B sends
   it.  If UA A encounters this message crossing condition, it should
   reject this UPDATE request with a 491 response.
   The situation when a response to an UPDATE request crosses a PRACK
   request is shown in Figure 9.
                   A                               B
                   |                               |
                   |              re-INVITE(offer0)|
                   |<------------------------------|
                   |1xx-rel(answer0)               |
                   |------------------------------>| --+
                   |UPDATE(offer1)                 |   |
                M1 |==============================>|   |
                   |               2xx-UPD(answer1)|   | Acknowledge
                   |<===========\  /===============| M3|
                   |             \/                |   |
                   |             /\   PRACK(offer2)| M2|
                   |<===========/  \===============| <-+
                   |                               |
                 Figure 9: Avoidable Message Crossing Case
   To avoid the message crossing condition shown in Figure 9, UA A
   should not send this UPDATE request until a PRACK transaction
   associated with an offer/answer has been completed.  If UA B
   encounters this message crossing condition, it should reject this
   UPDATE request with a 491 response.
<span class="grey">Okumura, et al.               Informational                    [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   Table 3 summarizes this section.  Each action is described in
   <a href="#section-4.3">Section 4.3</a>.
        | M1     | M3       | M2        |Action |Action |Figure|
        |(offer1)|(answer1) |(offer2)   | of A  | of B  |      |
        +--------+----------+-----------+-------+-------+------+
        | UPDATE | 2xx-UPD  | UPDATE    |UAS-UcU|       |      |
        |        |          +-----------+-------+ -     |      |
        |        |          | INVITE    |UAS-UcI|       |      |
        |        |          +-----------+-------+-------+------+
        |        |          | 1xx-INV   |       |       |      |
        |        |          +-----------+UAC-UI,|UAS-UsI| 4,5  |
        |        |          | 2xx-INV   |UAC-IU |UAS-IsU|      |
        |        |          +-----------+-------+-------+------+
        |        |          | PRACK  (*)|UAC-IU |UAS-IcU|  9   |
        +--------+----------+-----------+-------+-------+------+
        | PRACK  | 2xx-PRA  | UPDATE    |UAS-IcU|       |      |
        +--------+----------+-----------+-------+       |      |
        | 2xx-INV| ACK      | UPDATE    |UAS-IsU| -     |      |
        |        |          +-----------+-------+       |      |
        |        |          | INVITE    |UAS-IsI|       |      |
        +--------+----------+-----------+-------+-------+------+
        | 1xx-rel| PRACK    | UPDATE    |UAS-IsU|       |  6   |
        +--------+----------+-----------+-------+UAC-IU +------+
        | INVITE | 1xx-rel  | UPDATE (*)|       |       |  7   |
        |        +----------+-----------+UAS-IcU+-------+------+
        |        | 2xx-INV  | UPDATE (*)|       | -     |  8   |
        +--------+----------+-----------+-------+-------+------+
        (*) invalid sequences if INVITE request is an initial one
             Table 3: Offer/Answer Crossing Message Sequences
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>.  Glare Case Handling</span>
   When both ends in a dialog send a new offer at nearly the same time,
   as described in Figure 10, a UA may receive a new offer before it
   receives the answer to the offer it sent.  This case is usually
   called a 'glare' case.
                            A                  B
                            |offer1      offer2|
                         M1 |-------\  /-------| M2
                            |        \/        |
                            |        /\        |
                            |<------/  \------>|
                           Figure 10: Glare Case
<span class="grey">Okumura, et al.               Informational                    [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   When offer2 is in an UPDATE request or (re-)INVITE request, it must
   be rejected with a 491 or 500 response.
   There is a variant of Figure 7.  When offer2 is in a PRACK request
   (within the current rules, only possible if offer1 is in an UPDATE
   request), as shown in Figure 11, UA A has a dilemma.
                   A                               B
                   |                               |
                   |              re-INVITE(offer0)|
                   |<------------------------------|
                   |1xx-rel(answer0)               |
                   |------------------------------>| --+
                   |UPDATE(offer1)    PRACK(offer2)| M2| Acknowledge
                M1 |============\  /===============| <-+
                   |             \/                |
                   |             /\                |
                   |<===========/  \==============>|
                   |                        491-UPD|
                   |<------------------------------|
                   |                               |
                      Figure 11: Avoidable Glare Case
   All PRACKs are supposed to be accepted with a 200 response, yet there
   is no way to indicate the problem with a 200 response.  At best, it
   could proceed on the assumption that the UPDATE will be rejected with
   a 491.  To avoid the glare condition shown in Figure 11, UA A should
   not send this UPDATE request until a PRACK transaction associated
   with an offer/answer has been completed.  If UA B encounters this
   glare condition, it should reject this UPDATE request with a 491
   response.
   Glare can also occur when offer2 is in a 1xx or 2xx response.  This
   is a variant of Figure 5, as shown in Figure 12.
<span class="grey">Okumura, et al.               Informational                    [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
                   A                               B
                   |                               |
                   |re-INVITE(no offer)            |
                   |------------------------------>| --+
                   |                1xx-rel/2xx-INV|   | 1st reliable
                   |UPDATE(offer1)         (offer2)| M2| response
                M1 |============\  /===============| <-+
                   |             \/                |
                   |             /\                |
                   |<===========/  \==============>|
                   |                        500-UPD|
                   |<------------------------------|
                   |                               |
                      Figure 12: Avoidable Glare Case
   To avoid the glare condition shown in Figure 12, UA A should not send
   this UPDATE request until an ACK or a PRACK transaction associated
   with an offer/answer has been completed.  If UA B encounters this
   glare condition, it should reject this UPDATE request with a 500
   response.
   There is a variant of Figure 4, as shown in Figure 13.
                   A                               B
                   |                               |
                   |UPDATE(offer1)                 |
                   |==========\                    |
                   |re-INVITE  \  (no offer)       |
                   |------------\----------------->| --+
                   |             \  1xx-rel/2xx-INV|   | 1st reliable
                   |              \        (offer2)|   | response
                   |<==============\===============| <-+
                   |                \              |
                   |                 \============>|
                   |                        500-UPD|
                   |<------------------------------|
                   |                               |
                      Figure 13: Avoidable Glare Case
   To avoid the glare condition shown in Figure 13, UA A should not send
   this re-INVITE request until an UPDATE transaction has been
   completed.  If UA B encounters this glare condition, it should reject
   this UPDATE request with a 500 response.
<span class="grey">Okumura, et al.               Informational                    [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   Table 4 summarizes this section.  Each action is described in
   <a href="#section-4.3">Section 4.3</a>.
       | offer1    | offer2    |Action |Action |Figure|
       |  M1       |  M2       | of A  | of B  |      |
       +-----------+-----------+-------+-------+------+
       |           | re-INVITE |UAS-IcI|UAS-IcI|      |
       | re-INVITE +-----------+-------+-------+      |
       |           | UPDATE    |UAS-IcU|UAS-UcI|      |
       +-----------+-----------+-------+-------+      |
       |           | UPDATE    |UAS-UcU|UAS-UcU|      |
       |           +-----------+-------+-------+------+
       |           | 1xx-rel   |       |       |      |
       | UPDATE    +-----------+UAC-IU,|UAS-IsU|12,13 |
       |           | 2xx-INV   |UAC-UI |       |      |
       |           +-----------+-------+-------+------+
       |           | PRACK (*) |UAC-IU |UAS-IcU|  11  |
       +-----------+-----------+-------+-------+------+
        (*) invalid sequences if INVITE request is an initial one
               Table 4: Offer/Answer Glare Message Sequences
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>.  Interworking of UPDATE and Re-INVITE</span>
   Almost all exceptional cases are caused by an interworking of UPDATE
   and re-INVITE.  The interworking is described in <a href="./rfc3311#section-5">Section 5 of
   [RFC3311]</a>.  And UAC behavior sending an UPDATE is described in
   <a href="./rfc3311#section-5.1">Section 5.1 of [RFC3311]</a>.  There are two concerns in this section:
   1.  It seems to describe different rules for each of initial INVITE
       and re-INVITE.  But there is no particular reason why the rules
       are separated.  The lack of restrictions for sending a re-INVITE
       request cause a lot of problems shown in <a href="#section-4.1">Section 4.1</a>.
   2.  It seems to describe that a UA may send an UPDATE request after
       sending or receiving a PRACK request.  But it should be "after
       PRACK transaction is completed by 2xx response", because it
       causes the message-crossing case shown in Figure 6.
   Since it is assumed that the language in this section itself is non-
   normative and is justified as a corollary of [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>], we interpret
   it as follows:
   UAC-II:   While an INVITE transaction is incomplete or ACK
             transaction associated with an offer/answer is incomplete,
             a UA must not send another INVITE request.
<span class="grey">Okumura, et al.               Informational                    [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   UAC-UU:   While an UPDATE transaction is incomplete, a UA must not
             send another UPDATE request.
   UAC-UI:   While an UPDATE transaction is incomplete, a UA should not
             send a re-INVITE request.
   UAC-IU:   While an INVITE transaction is incomplete, and an ACK or a
             PRACK transaction associated with an offer/answer is
             incomplete, a UA should not send an UPDATE request.
   When a 2xx response to an INVITE includes an offer, the ACK
   transaction is considered to be associated with an offer/answer.
   When a reliable provisional response to an INVITE includes an offer
   or an answer, the PRACK transaction is considered to be associated
   with an offer/answer.
   UAS behavior receiving an UPDATE is described in <a href="./rfc3311#section-5.2">Section 5.2 of
   [RFC3311]</a>.  There are two concerns in this section:
   1.  There is no description about the interworking of an UPDATE
       request and an INVITE request without an offer.
   2.  There is no description about the interworking of an UPDATE
       request and reliable response to an INVITE with an offer.
   We interpret this section as follows:
   UAS-IcI:  While an INVITE client transaction is incomplete or ACK
             transaction associated with an offer/answer is incomplete,
             a UA must reject another INVITE request with a 491
             response.
   UAS-IsI:  While an INVITE server transaction is incomplete or ACK
             transaction associated with an offer/answer is incomplete,
             a UA must reject another INVITE request with a 500
             response.
   UAS-UcU:  While an UPDATE client transaction is incomplete, a UA must
             reject another UPDATE request with a 491 response.
   UAS-UsU:  While an UPDATE server transaction is incomplete, a UA must
             reject another UPDATE request with a 500 response.
   UAS-UcI:  While an UPDATE client transaction is incomplete, a UA
             should reject a re-INVITE request with a 491 response.
<span class="grey">Okumura, et al.               Informational                    [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   UAS-UsI:  While an UPDATE server transaction is incomplete, a UA
             should reject a re-INVITE request with a 500 response.
   UAS-IcU:  While an INVITE client transaction is incomplete, and an
             ACK or a PRACK transaction associated with an offer/answer
             is incomplete, a UA should reject an UPDATE request with a
             491 response.
   UAS-IsU:  While an INVITE server transaction is incomplete, and an
             ACK or a PRACK transaction associated with an offer/answer
             is incomplete, a UA should reject an UPDATE request with a
             500 response.
   These rules are shown in following figures.
               A                               B
               |                               |
               |                         UPDATE|
               |<------------------------------|
               |UPDATE                         |
               |==============================>|
               |                            491|
               |<==============================|
               |                               |
            Figure 14: Example of UAC-UU and UAS-UcU
               A                               B
               |                               |
               |UPDATE CSeq:m                  |
               |------------------------------>|
               |UPDATE CSeq:n(>m)              |
               |==============================>|
               |            500 (UPDATE CSeq:n)|
               |<==============================|
               |                               |
            Figure 15: Example of UAC-UU and UAS-UsU
<span class="grey">Okumura, et al.               Informational                    [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
               A                               B
               |                               |
               |                 UPDATE(offer1)|
               |<------------------------------|
               |reINVITE(no offer)             |
               |==============================>|
               |                   491 (INVITE)|
               |<==============================|
               |                               |
            Figure 16: Example of UAC-UI and UAS-UcI
               A                               B
               |                               |
               |UPDATE(offer1)                 |
               |------------------------------>|
               |reINVITE(no offer)             |
               |==============================>|
               |                   500 (INVITE)|
               |<==============================|
               |                               |
            Figure 17: Example of UAC-UU and UAS-UsI
               A                               B
               |                               |
               |             reINVITE(no offer)|
               |<------------------------------|
               |1xx-rel(offer0)                |
               |------------------------------>|
               |UPDATE(offer1)                 |
               |==============================>|
               |                   491 (UPDATE)|
               |<==============================|
               |                               |
            Figure 18: Example of UAC-IU and UAS-IcU
<span class="grey">Okumura, et al.               Informational                    [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
               A                               B
               |                               |
               |reINVITE(no offer)             |
               |------------------------------>|
               |                1xx-rel(offer0)|
               |<------------------------------|
               |UPDATE(offer1)                 |
               |==============================>|
               |                   500 (UPDATE)|
               |<==============================|
               |                               |
            Figure 19: Example of UAC-IU and UAS-IsU
   In addition, it is assumed that the UPDATE request in this section
   includes an offer.  The interworking of a re-INVITE and an UPDATE
   without an offer is out of scope for this document.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>.  Content of Offers and Answers</span>
   While [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>] and [<a href="./rfc3312" title=""Integration of Resource Management and Session Initiation Protocol (SIP)"">RFC3312</a>] give some guidance, questions remain
   about exactly what should be included in an offer or answer.  This is
   especially a problem when the common "hold" feature has been
   activated, and when there is the potential for a multimedia call.
   Details of behavior depend on the capabilities and state of the User
   Agent.  The kinds of recommendations that can be made are limited by
   the model of device capabilities and state that is presumed to exist.
   This section focuses on a few key aspects of offers and answers that
   have been identified as troublesome, and will consider other aspects
   to be out of scope.  This section considers:
   o  choice of supported media types and formats to include and exclude
   o  hold and resume of media
   The following are out of scope for this document:
   o  NAT traversal and Interactive Connectivity Establishment (ICE)
   o  specific codecs and their parameters
   o  the negotiation of secure media streams
   o  grouping of media streams
   o  preconditions
<span class="grey">Okumura, et al.               Informational                    [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>.  General Principle for Constructing Offers and Answers</span>
   A UA should send an offer that indicates what it, and its user, are
   interested in using/doing at that time, without regard for what the
   other party in the call may have indicated previously.  This is the
   case even when the offer is sent in response to an INVITE or re-
   INVITE that contains no offer.  (However, in the case of re-INVITE,
   the constraints of [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>] and [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>] must be observed.)
   A UA should send an answer that includes as close an approximation to
   what the UA and its user are interested in doing at that time, while
   remaining consistent with the offer/answer rules of [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>] and
   other RFCs.
      NOTE: "at that time" is important.  The device may permit the user
      to configure which supported media are to be used by default.
   In some cases, a UA may not have direct knowledge of what it is
   interested in doing at a particular time.  If it is an intermediary,
   it may be able to delegate the decision.  In the worst case, it may
   apply a default, such as assuming it wants to use all of its
   capabilities.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>.  Choice of Media Types and Formats to Include and Exclude</span>
<span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a>.  Sending an Initial INVITE with Offer</span>
   When a UAC sends an initial INVITE with an offer, it has complete
   freedom to choose which media type(s) and media format(s) (payload
   types in the case of RTP) it should include in the offer.
   The media types may be all or a subset of the media the UAC is
   capable of supporting, with the particular subset being determined by
   the design and configuration (e.g., via [<a href="./rfc6080" title=""A Framework for Session Initiation Protocol User Agent Profile Delivery"">RFC6080</a>]) of the UAC
   combined with input from the user interface of the UAC.
   The media formats may be all or a subset of the media formats the UAC
   is capable of supporting for the corresponding media type, with the
   particular subset being determined by the design and configuration of
   the UAC combined with input from the user interface of the UAC.
   Including all supported media formats will maximize the possibility
   that the other party will have a supported format in common.  But
   including many can result in an unacceptably large SDP body.
<span class="grey">Okumura, et al.               Informational                    [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
<span class="h4"><a class="selflink" id="section-5.2.2" href="#section-5.2.2">5.2.2</a>.  Responding with an Offer When the Initial INVITE Has No Offer</span>
   When a UAS has received an initial INVITE without an offer, it must
   include an offer in the first reliable response to the INVITE.  It
   has largely the same options as when sending an initial INVITE with
   an offer, but there are some differences.  The choice may be governed
   by both static (default) selections of media types as well as dynamic
   selections made by a user via interaction with the device while it is
   alerting.
      NOTE: The offer may be sent in a reliable provisional response,
      before the user of the device has been alerted and had an
      opportunity to select media options for the call.  In this case,
      the UAS cannot include any call-specific options from the user of
      the device.  If there is a possibility that the user of the device
      will wish to change what is offered before answering the call,
      then special care should be taken.  If PRACK and UPDATE are
      supported by caller and callee then an initial offer can be sent
      reliably, and changed with an UPDATE if the user desires a change.
      If PRACK and UPDATE are not supported, then the initial offer
      cannot be changed until the call is fully established.  In that
      case, the offer in a 200 response for the initial INVITE should
      include only the media types and formats believed to be acceptable
      to the user.
<span class="h4"><a class="selflink" id="section-5.2.3" href="#section-5.2.3">5.2.3</a>.  Answering an Initial INVITE with Offer</span>
   When a UAS receives an initial INVITE with an offer, what media lines
   the answer may contain is constrained by [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>].  The answer must
   contain the same number of "m=" lines as the offer, and they must
   contain the same media types.  Each media line may be accepted, by
   including a non-zero port number, or rejected by including a zero
   port number in the answer.  The media lines that are accepted should
   typically be those with types and formats the UAS would have included
   if it were the offerer.
   The media formats the answer may contain are constrained by
   [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>].  For each accepted "m=" line in the answer, there must be
   at least one media format in common with the corresponding "m=" line
   of the offer.  The UAS may also include other media formats it is
   able to support at this time.  Doing so establishes an asymmetric
   media format situation, where these "other" media formats may only be
   sent from the offerer to the answerer.  This asymmetric media
   situation is also limited because it cannot be sustained if there is
   a subsequent offer/answer exchange in the opposite direction.  Also,
   there is limited value in including these other media formats because
   there is no assurance that the offerer will be able to use them.
<span class="grey">Okumura, et al.               Informational                    [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   If the UAS does not wish to indicate support for any of the media
   types in a particular media line of the offer it must reject the
   corresponding media line, by setting the port number to zero.
   When the UAS wishes to reject all of the media lines in the offer, it
   may send a 488 failure response.  Alternatively, it may send a
   reliable non-failure response including all media lines with port
   numbers set to zero.
<span class="h4"><a class="selflink" id="section-5.2.4" href="#section-5.2.4">5.2.4</a>.  Answering When the Initial INVITE Had No Offer</span>
   When a UAC has sent an initial INVITE without an offer, and then
   receives a response with the first offer, it should answer in the
   same way as a UAS receiving an initial INVITE with an offer.
   Because the offer arrives in a response to the INVITE, the UAC cannot
   reject the message containing the offer.  If the UAC wishes to reject
   the entire offer, it must send a PRACK or ACK request including all
   the media lines with ports set to zero.  Then, if it does not wish to
   continue the session, it may send a CANCEL or BYE request to
   terminate the dialog.
<span class="h4"><a class="selflink" id="section-5.2.5" href="#section-5.2.5">5.2.5</a>.  Subsequent Offers and Answers</span>
   The guidelines above (Sections <a href="#section-5.1">5.1</a> and <a href="#section-5.2.1">5.2.1</a> through <a href="#section-5.2.4">Section 5.2.4</a>)
   apply, but constraints in [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>] must also be followed.  The
   following are of particular note because they have proven
   troublesome:
   o  The number of "m=" lines may not be reduced in a subsequent offer.
      Previously rejected media streams must remain, or be reused to
      offer the same or a different stream.  (<a href="./rfc3264#section-6">Section 6 of [RFC3264]</a>.)
   o  In the "o=" line, only the version number may change, and if it
      changes, it must increment by one from the one previously sent as
      an offer or answer.  (<a href="./rfc3264#section-8">Section 8 of [RFC3264]</a>.)  If it doesn't
      change, then the entire SDP body must be identical to what was
      previously sent as an offer or answer.  Changing the "o=" line,
      except version number value, during the session is an error case.
      The behavior when receiving such a non-compliant offer/answer SDP
      body is implementation dependent.  If a UA needs to negotiate a
      'new' SDP session, it should use the INVITE/Replaces method.
   o  In the case of RTP, the mapping from a particular dynamic payload
      type number to a particular codec within that media stream ("m="
      line) must not change for the duration of the session.  (<a href="./rfc3264#section-8.3.2">Section</a>
      <a href="./rfc3264#section-8.3.2">8.3.2 of [RFC3264]</a>.)
<span class="grey">Okumura, et al.               Informational                    [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
         NOTE: This may be impossible for a back-to-back user agent
         (B2BUA) to follow in some cases (e.g., 3PCC transfer) if it
         does not terminate media.
   When the new offer is sent in response to an offerless (re-)INVITE,
   it should be constructed according to the General Principle for
   Constructing Offers and Answers (<a href="#section-5.1">Section 5.1</a> ): all codecs the UA is
   currently willing and able to use should be included, not just the
   ones that were negotiated by previous offer/answer exchanges.  The
   same is true for media types -- so if UA A initially offered audio
   and video to UA B, and they end up with only audio, and UA B sends an
   offerless (re-)INVITE to UA A, A's resulting offer should most likely
   re-attempt video, by reusing the zeroed "m=" line used previously.
      NOTE: The behavior above is recommended, but it is not always
      achievable, for example, in some interworking scenarios.  Or, the
      offerer may simply not have enough resources to offer "everything"
      at that point.  Even if the UAS is not able to offer any other SDP
      that the one currently being used, it should not reject the re-
      INVITE.  Instead, it should generate an offer with the currently
      used SDP with "o=" line unchanged.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>.  Hold and Resume of Media</span>
   [<a id="ref-RFC3264">RFC3264</a>] specifies (using non-normative language) that "hold" should
   be indicated in an established session by sending a new offer
   containing "a=sendonly" attribute for each media stream to be held.
   An answerer is then to respond with "a=recvonly" attribute to
   acknowledge that the hold request has been understood.
   Note that the use of sendonly/recvonly is not limited to hold.  These
   may be used for other reasons, such as devices that are only capable
   of sending or receiving.  So receiving an offer with "a=sendonly"
   attribute must not be treated as a certain indication that the
   offerer has placed the media stream on hold.
   This model is based on an assumption that the UA initiating the hold
   will want to play Music on Hold, which is not always the case.  A UA
   may, if desired, initiate hold by offering "a=inactive" attribute if
   it does not intend to transmit any media while in hold status.
   The rules of [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>] constrain what may be in an answer when the
   offer contains "sendonly", "recvonly", or "inactive" in an "a=" line.
   But they do not constrain what must be in a subsequent offer.  The
   "General Principle for Constructing Offers and Answers" (<a href="#section-5.1">Section 5.1</a>)
   is important here.  The initiation of "hold" is a local action.  It
   should reflect the desired state of the UA.  It then affects what the
   UA includes in offers and answers until the local state is reset.
<span class="grey">Okumura, et al.               Informational                    [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   The receipt of an offer containing "a=sendonly" attribute or
   "a=inactive" attribute and the sending of a compatible answer should
   not change the desired state of the recipient.  However, a UA that
   has been "placed on hold" may itself desire to initiate its own hold
   status, based on local input.
   If UA2 has previously been "placed on hold" by UA1, via receipt of
   "a=sendonly" attribute, then it may initiate its own hold by sending
   a new offer containing "a=sendonly" attribute to UA1.  Upon receipt
   of that, UA1 will answer with "a=inactive" attribute because that is
   the only valid answer that reflects its desire not to receive media.
      NOTE: <a href="./rfc3264#section-8.4">Section 8.4 of [RFC3264]</a> contains a conflicting
      recommendation that the offer contain "a=inactive" attribute in
      this case.  We interpret that recommendation to be non-normative.
      The use of "a=sendonly" attribute in this case will never produce
      a worse outcome, and can produce a better outcome in useful cases.
   Once in this state, to resume a two-way exchange of media, each side
   must reset its local hold status.  If UA1 is first to go off hold, it
   will then send an offer with "a=sendrecv" attribute.  The UA2 will
   respond with its desired state of "a=sendonly" attribute because that
   is a permitted response.  When UA2 desires to also resume, it will
   send an offer with "a=sendrecv" attribute.  In this case, because UA1
   has the same desire it will respond with "a=sendrecv" attribute.  In
   the same case, when UA2 receives the offer with "a=sendrecv"
   attribute, if it has decided it wants to reset its local hold but has
   not yet signaled the intent, it may send "a=sendrecv" attribute in
   the answer.
   If UA2 has been "placed on hold" by UA1 via receipt of "a=inactive"
   attribute, and subsequently wants to initiate its own hold, also
   using "a=inactive" attribute, it need not send a new offer, since the
   only valid response is "a=inactive" attribute and that is already in
   effect.  However, its local desired state will now be either
   "inactive" or "a=sendonly" attribute.  This affects what it will send
   in future offers and answers.
   If a UA has occasion to send another offer in the session, without
   any desire to change the hold status (e.g., in response to a re-
   INVITE without an offer, or when sending a re-INVITE to refresh the
   session timer), it should follow the "General Principle for
   Constructing Offers and Answers" (<a href="#section-5.1">Section 5.1</a>).  If it previously
   initiated a "hold" by sending "a=sendonly" attribute or "a=inactive"
   attribute, then it should offer that again.  If it had not previously
   initiated "hold", then it should offer "a=sendrecv" attribute, even
<span class="grey">Okumura, et al.               Informational                    [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
   if it had previously been forced to answer something else.  Without
   this behavior it is possible to get "stuck on hold" in some cases,
   especially when a 3pcc is involved.
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>.  Behavior on Receiving SDP with c=0.0.0.0</span>
   [<a id="ref-RFC3264">RFC3264</a>] requires that an agent be capable of receiving SDP with a
   connection address of 0.0.0.0, in which case it means that neither
   RTP nor RTCP should be sent to the peer.
   If a UA generates an answer to the offer received with "c=IN IP4
   0.0.0.0", the direction attribute of the accepted media stream in the
   answer must still be based on direction attribute of the offered
   stream and rules specified in [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>] to form the direction "a="
   line in the answer.  There is no clear rule about the use of "c=IN
   IP4 0.0.0.0" in the answer; it may be used or "c=" line with a valid
   IP address may be used.  RTP/RTCP will not be sent toward an address
   of 0.0.0.0 because it is an invalid address.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>.  Security Considerations</span>
   This document clarifies ambiguities in the intended behavior of the
   two SIP User Agents engaged in a dialog.  The primary specification
   of offer/answer behavior that is being clarified resides in [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>]
   and [<a href="./rfc3264" title=""An Offer/Answer Model with Session Description Protocol (SDP)"">RFC3264</a>], with extensions in [<a href="./rfc3311" title=""The Session Initiation Protocol (SIP) UPDATE Method"">RFC3311</a>], [<a href="./rfc3312" title=""Integration of Resource Management and Session Initiation Protocol (SIP)"">RFC3312</a>], and
   [<a href="./rfc6141" title=""Re-INVITE and Target-Refresh Request Handling in the Session Initiation Protocol (SIP)"">RFC6141</a>].  The focus of this document is on cases where ambiguities
   can result failed or degraded calls when there is no attacker.  The
   clarifications exclude call flows that lead to difficulties, without
   legitimizing any formerly invalid call flows.  Thus, the security
   considerations of the above mentioned documents continue to apply and
   need not be extended to handle any additional cases.
   The offer/answer process can be disrupted in numerous ways by an
   attacker.  SIP provides mechanisms to protect the offer/answer
   exchange from tampering by third parties.  Of note is "Enhancements
   for Authenticated  Identity Management in the Session Initiation
   Protocol (SIP)" [<a href="./rfc4474" title=""Enhancements for Authenticated Identity Management in the Session Initiation Protocol (SIP)"">RFC4474</a>], as well as <a href="#section-26.3.2">Section 26.3.2</a>, "Security
   Solutions", of [<a href="./rfc3261" title=""SIP: Session Initiation Protocol"">RFC3261</a>].
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>.  Acknowledgements</span>
   The authors would like to thank Christer Holmberg, Rajeev Seth,
   Nataraju A B, Byron Campen, Jonathan Rosenberg, Gonzalo Camarillo,
   and Gao Yang for their thorough reviews and comments.  Many of their
   suggestions and ideas have been incorporated in this document.
<span class="grey">Okumura, et al.               Informational                    [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</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-RFC2119">RFC2119</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-RFC3261">RFC3261</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-RFC3262">RFC3262</a>]  Rosenberg, J. and H. Schulzrinne, "Reliability of
              Provisional Responses in Session Initiation Protocol
              (SIP)", <a href="./rfc3262">RFC 3262</a>, June 2002.
   [<a id="ref-RFC3264">RFC3264</a>]  Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model
              with Session Description Protocol (SDP)", <a href="./rfc3264">RFC 3264</a>,
              June 2002.
   [<a id="ref-RFC3311">RFC3311</a>]  Rosenberg, J., "The Session Initiation Protocol (SIP)
              UPDATE Method", <a href="./rfc3311">RFC 3311</a>, October 2002.
   [<a id="ref-RFC3312">RFC3312</a>]  Camarillo, G., Marshall, W., and J. Rosenberg,
              "Integration of Resource Management and Session Initiation
              Protocol (SIP)", <a href="./rfc3312">RFC 3312</a>, October 2002.
   [<a id="ref-RFC4566">RFC4566</a>]  Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
              Description Protocol", <a href="./rfc4566">RFC 4566</a>, July 2006.
   [<a id="ref-RFC6141">RFC6141</a>]  Camarillo, G., Holmberg, C., and Y. Gao, "Re-INVITE and
              Target-Refresh Request Handling in the Session Initiation
              Protocol (SIP)", <a href="./rfc6141">RFC 6141</a>, March 2011.
<span class="grey">Okumura, et al.               Informational                    [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc6337">RFC 6337</a>           SIP Usage of the Offer/Answer Model       August 2011</span>
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>.  Informative References</span>
   [<a id="ref-RFC3725">RFC3725</a>]  Rosenberg, J., Peterson, J., Schulzrinne, H., and G.
              Camarillo, "Best Current Practices for Third Party Call
              Control (3pcc) in the Session Initiation Protocol (SIP)",
              <a href="https://www.rfc-editor.org/bcp/bcp85">BCP 85</a>, <a href="./rfc3725">RFC 3725</a>, April 2004.
   [<a id="ref-RFC3959">RFC3959</a>]  Camarillo, G., "The Early Session Disposition Type for the
              Session Initiation Protocol (SIP)", <a href="./rfc3959">RFC 3959</a>,
              December 2004.
   [<a id="ref-RFC4474">RFC4474</a>]  Peterson, J. and C. Jennings, "Enhancements for
              Authenticated Identity Management in the Session
              Initiation Protocol (SIP)", <a href="./rfc4474">RFC 4474</a>, August 2006.
   [<a id="ref-RFC6080">RFC6080</a>]  Petrie, D. and S. Channabasappa, "A Framework for Session
              Initiation Protocol User Agent Profile Delivery",
              <a href="./rfc6080">RFC 6080</a>, March 2011.
Authors' Addresses
   OKUMURA Shinji
   Softfront
   28-196, Noth9, West15, Chuo-ku
   Sapporo, Hokkaido  060-0009
   Japan
   EMail: shinji.okumura@softfront.jp
   Takuya Sawada
   KDDI Corporation
   3-10-10, Iidabashi, Chiyoda-ku
   Tokyo
   Japan
   EMail: tu-sawada@kddi.com
   Paul H. Kyzivat
   Hudson, MA  01749
   USA
   EMail: pkyzivat@alum.mit.edu
Okumura, et al.               Informational                    [Page 33]
</pre>
 
     |