summaryrefslogtreecommitdiff
path: root/doc/rfc/rfc7058.txt
blob: 12098416b1480ccd622021399d1db17276fc2544 (plain) (blame)
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
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
Internet Engineering Task Force (IETF)                       A. Amirante
Request for Comments: 7058                          University of Napoli
Category: Informational                                      T. Castaldi
ISSN: 2070-1721                                               L. Miniero
                                                                Meetecho
                                                             S P. Romano
                                                    University of Napoli
                                                           November 2013


        Media Control Channel Framework (CFW) Call Flow Examples

Abstract

   This document provides a list of typical Media Control Channel
   Framework call flows.  It aims at being a simple guide to the use of
   the interface between Application Servers and MEDIACTRL-based Media
   Servers, as well as a base reference document for both implementors
   and protocol researchers.

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 Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc7058.
















Amirante, et al.              Informational                     [Page 1]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


Copyright Notice

   Copyright (c) 2013 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) 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
   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.





































Amirante, et al.              Informational                     [Page 2]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


Table of Contents

   1. Introduction ....................................................4
   2. Conventions .....................................................5
   3. Terminology .....................................................5
   4. A Practical Approach ............................................6
      4.1. State Diagrams .............................................6
   5. Control Channel Establishment ..................................10
      5.1. COMEDIA Negotiation .......................................11
      5.2. SYNC ......................................................14
      5.3. K-ALIVE ...................................................15
      5.4. Wrong Behavior ............................................17
   6. Use-Case Scenarios and Examples ................................20
      6.1. Echo Test .................................................27
           6.1.1. Direct Echo Test ...................................28
           6.1.2. Echo Test Based on Recording .......................30
      6.2. Phone Call ................................................39
           6.2.1. Direct Connection ..................................42
           6.2.2. Conference-Based Approach ..........................44
           6.2.3. Recording a Conversation ...........................51
      6.3. Conferencing ..............................................57
           6.3.1. Simple Bridging ....................................62
           6.3.2. Rich Conference Scenario ...........................66
           6.3.3. Coaching Scenario ..................................75
           6.3.4. Sidebars ...........................................83
           6.3.5. Floor Control ......................................93
      6.4. Additional Scenarios ......................................99
           6.4.1. Voice Mail ........................................100
           6.4.2. Current Time ......................................107
           6.4.3. DTMF-Driven Conference Manipulation ...............112
   7. Media Resource Brokering ......................................126
      7.1. Publishing Interface .....................................127
      7.2. Consumer Interface .......................................136
           7.2.1. Query Mode ........................................137
           7.2.2. Inline-Aware Mode .................................140
           7.2.3. Inline-Unaware Mode ...............................155
      7.3. Handling Media Dialogs ...................................157
           7.3.1. Query and Inline-Aware Mode .......................157
           7.3.2. Inline-Unaware Mode ...............................160
           7.3.3. CFW Protocol Behavior .............................167
   8. Security Considerations .......................................170
   9. Acknowledgments ...............................................180
   10. References ...................................................180
      10.1. Normative References ....................................180
      10.2. Informative References ..................................181






Amirante, et al.              Informational                     [Page 3]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


1.  Introduction

   This document provides a list of typical MEDIACTRL Media Control
   Channel Framework [RFC6230] call flows.  The motivation for this
   comes from our implementation experience with the framework and its
   protocol.  This drove us to write a simple guide to the use of the
   several interfaces between Application Servers and MEDIACTRL-based
   Media Servers, and a base reference document for other implementors
   and protocol researchers.

   Following this spirit, this document covers several aspects of the
   interaction between Application Servers and Media Servers.  However,
   in the context of this document, the call flows almost always depict
   the interaction between a single Application Server (which, for the
   sake of conciseness, is called the AS from now on) and a single Media
   Server (MS).  In Section 7, some flows involving more entities by
   means of a Media Resource Broker compliant with [RFC6917] are
   presented.  To help readers understand all the flows (as related to
   both SIP dialogs and Media Control Channel Framework (CFW)
   transactions), the domains hosting the AS and the MS in all the
   scenarios are called 'as.example.com' and 'ms.example.net',
   respectively, per [RFC2606].  The flows will often focus more on the
   CFW [RFC6230] interaction, rather than on the other involved
   protocols, e.g., SIP [RFC3261], the Session Description Protocol
   (SDP) [RFC3264], or RTP [RFC3550].

   In the next paragraphs, a brief overview of our implementation
   approach is described, with particular focus on protocol-related
   aspects.  This involves state diagrams that depict both the client
   side (the AS) and the server side (the MS).  Of course, this section
   is not at all to be considered a mandatory approach to the
   implementation of the framework.  It is only meant to help readers
   understand how the framework works from a practical point of view.

   Once done with these preliminary considerations, in the subsequent
   sections real-life scenarios are addressed.  In this context, first
   of all, the establishment of the Control Channel is dealt with.
   After that, some use-case scenarios involving the most typical
   multimedia applications are depicted and described.

   It is worth pointing out that this document is not meant in any way
   to be a self-contained guide to implementing a MEDIACTRL-compliant
   framework.  The specifications are a mandatory read for all
   implementors, especially because this document follows their
   guidelines but does not delve into the details of every aspect of the
   protocol.





Amirante, et al.              Informational                     [Page 4]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


2.  Conventions

   Note that due to RFC formatting conventions, SIP/SDP and CFW lines
   whose content exceeds 72 characters are split across lines.  This
   line folding is marked by a backslash at the end of the first line.
   This backslash, the preceding whitespace, the following CRLF, and the
   whitespace beginning the next line would not appear in the actual
   protocol contents.  Note also that the indentation of the XML content
   is only provided for readability.  Actual messages will follow strict
   XML syntax, which allows, but does not require, indentation.  Due to
   the same limit of 72 characters per line, this document also
   sometimes splits the content of XML elements across lines.  Please be
   aware that when this happens, no whitespace is actually meant to be
   at either the beginning or the end of the element content.

   Note also that a few diagrams show arrows that go from a network
   entity to itself.  It's worth pointing out that such arrows do not
   represent any transaction message but are rather meant as an
   indication to the reader that the involved network entity made a
   decision, within its application logic, according to the input it
   previously received.

3.  Terminology

   This document uses the same terminology as [RFC6230], [RFC6231],
   [RFC6505], and [RFC6917].  The following terms are only a
   summarization of the terms most commonly used in this context and are
   mostly derived from the terminology used in the related documents:

   COMEDIA:  connection-oriented media (i.e., TCP and Transport Layer
      Security (TLS)).  Also used to signify the support in SDP for
      connection-oriented media and the RFCs that define that support
      ([RFC4145] and [RFC4572]).

   Application Server:  an entity that requests media processing and
      manipulation from a Media Server; typical examples are Back-to-
      Back User Agents (B2BUAs) and endpoints requesting manipulation of
      a third party's media stream.

   Media Server:  an entity that performs a service, such as media
      processing, on behalf of an Application Server; typical provided
      functions are mixing, announcement, tone detection and generation,
      and play and record services.

   Control Channel:  a reliable connection between an Application Server
      and a Media Server that is used to exchange framework messages.





Amirante, et al.              Informational                     [Page 5]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   VCR controls:  runtime control of aspects of an audio playback like
      speed and volume, via dual-tone multi-frequency (DTMF) signals
      sent by the user, in a manner that resembles the functions of a
      VCR (video cassette recorder) controller.

4.  A Practical Approach

   In this document, we embrace an engineering approach to the
   description of a number of interesting scenarios that can be realized
   through the careful orchestration of the Media Control Channel
   Framework entities, namely the Application Server and the Media
   Server.  We will demonstrate, through detailed call flows, how a
   variegated bouquet of services (ranging from very simple scenarios to
   much more complicated examples) can be implemented with the
   functionality currently offered, within the main MEDIACTRL framework,
   by the Control Packages that have been made available to date.  The
   document aims at being a useful guide for those interested in
   investigating the inter-operation among MEDIACTRL components, as well
   as being a base reference document for application developers willing
   to build advanced services on top of the base infrastructure made
   available by the framework.

4.1.  State Diagrams

   In this section, we present an "informal" view of the main MEDIACTRL
   protocol interactions, in the form of state diagrams.  Each diagram
   is indeed a classical representation of a Mealy automaton, comprising
   a number of possible protocol states, indicated with rectangular
   boxes.  Transitions between states are indicated through edges, with
   each edge labeled with a slash-separated pair representing a specific
   input together with the associated output (a dash in the output
   position means that, for that particular input, no output is
   generated from the automaton).  Some of the inputs are associated
   with MEDIACTRL protocol messages arriving at a MEDIACTRL component
   while it is in a certain state.  This is the case for 'CONTROL',
   'REPORT' (in its various "flavors" -- pending, terminate, etc.),
   '200', '202', and 'Error' (error messages correspond to specific
   numeric codes).  Further inputs represent triggers arriving at the
   MEDIACTRL automaton from the upper layer, namely the Application
   Programming Interface used by programmers while implementing
   MEDIACTRL-enabled services.  Such inputs have been indicated with the
   term 'API' followed by the message that the API itself is triggering
   (as an example, 'API terminate' is a request to send a 'REPORT'
   message with a status of 'terminate' to the peering component).







Amirante, et al.              Informational                     [Page 6]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   Four diagrams are provided.  Two of them (Figures 1 and 2) describe
   normal operation of the framework.  Figure 3 contains two diagrams
   describing asynchronous event notifications.  Figure 1 embraces the
   MS perspective, whereas Figure 2 shows the AS side.  The upper part
   of Figure 3 shows how events are generated, on the MS side, by
   issuing a CONTROL message addressed to the AS; events are
   acknowledged by the AS through standard 200 responses.  Hence, the
   behavior of the AS, which mirrors that of the MS, is depicted in the
   lower part of the figure.

   Coming back to Figure 1, the diagram shows that the MS activates upon
   reception of CONTROL messages coming from the AS.  The CONTROL
   messages instruct the MS regarding the execution of a specific
   command that belongs to one of the available Control Packages.  The
   execution of the received command can either be quick or require some
   time.  In the former case, right after completing its operation, the
   MS sends back to the AS a 200 message, which basically acknowledges
   correct termination of the invoked task.  In the latter case, the MS
   first sends back an interlocutory 202 message containing a 'Timeout'
   value, which lets it enter a different state ('202' sent).  While in
   the new state, the MS keeps on performing the invoked task.  If the
   task does not complete in the provided timeout, the server will
   update the AS on the other side of the Control Channel by
   periodically issuing 'REPORT update' messages; each such message has
   to be acknowledged by the AS (through a '200' response).  Eventually,
   when the MS is done with the required service, it sends to the AS a
   'REPORT terminate' message.  The transaction is concluded when the AS
   acknowledges receipt of the message.  It is worth pointing out that
   the MS may send a 202 response after it determines that the request
   does not contain any errors that cannot be reported in a later REPORT
   terminate request instead.  After the MS sends a 202 response, any
   error that it (or the API) finds in the request is reported in the
   final REPORT terminate request.  Again, the behavior of the AS, as
   depicted in Figure 2, mirrors the above-described actions undertaken
   at the MS side.  The figures also show the cases in which
   transactions cannot be successfully completed due to abnormal
   conditions; such conditions always trigger the creation and
   transmission of a specific 'Error' message that, as mentioned
   previously, is reported as a numeric error code.












Amirante, et al.              Informational                     [Page 7]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   +------------------+  CONTROL/-  +------------------+ API 202/202
   | Idle/'terminate' |------------>| CONTROL received |---------+
   +------------------+             +------------------+         |
     ^          ^   ^   API 200/200    |     |                   |
     |          |   |                  |     |                   |
     |          |   +------------------+     |                   |
     | 200/-    |      API Error/Error       |                   |
     |          +----------------------------+                   |
     |                                                           |
   +-------------+                                               |
   | Waiting for |                                               v
   |  last 200   |<------------------------+             +------------+
   +-------------+                         |             | '202' sent |
        ^                                  |             +------------+
        |                                  |               |     |
        |                                  +---------------+     |
        | API terminate/                     API terminate/      |
        | REPORT terminate                   REPORT terminate    |
        |                                                        |
      +--------------------+                                     |
      | 'update' confirmed |------+                  API update/ |
      +--------------------+      |                REPORT update |
                ^                 | API update/                  |
                |                 | REPORT update                |
                |                 v                              |
                |   200/-      +---------------+                 |
                +--------------| 'update' sent |<----------------+
                               +---------------+

                 Figure 1: Media Server CFW State Diagram





















Amirante, et al.              Informational                     [Page 8]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


                 +--------------+   202/-   +--------------+
             +-->| CONTROL sent |---------->| 202 received |
             |   +--------------+           +--------------+
             |        |       |                 |     |
             |        |       |                 |     |
API CONTROL/ |        | 200/- |                 |     |
send CONTROL |        |       |                 |     |
             |        |       | Error/          |     |
+------------------+  |       | Error           |     |
| Idle/'terminate' |<-+       |                 |     |
+------------------+<---------+                 |     |
    ^          ^                                |     |
    |          |            REPORT 'terminate'/ |     |
    |          |                       send 200 |     |
    |          +--------------------------------+     | REPORT 'update'/
    |                                                 | send 200
    | REPORT 'terminate'/                             |
    | send 200                                        |
    |                     +-----------+               |
    +---------------------| 'update ' |<--------------+
                          +-----------+
                            ^      |
                            |      | REPORT 'update'/
                            +------+ send 200

              Figure 2: Application Server CFW State Diagram

























Amirante, et al.              Informational                     [Page 9]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


                                    +--------------+
                                +-->| CONTROL sent |
                                |   +--------------+
                                |           |
                                |           |
                   API CONTROL/ |           | 200/-
                   send CONTROL |           |
                                |           |
                   +------------------+     |
                   | Idle/'terminate' |<----+
                   +------------------+

                          (Media Server perspective)



           +------------------+  CONTROL/-  +------------------+
           | Idle/'terminate' |------------>| CONTROL received |
           +------------------+             +------------------+
                        ^       API 200/200          |
                        |                            |
                        +----------------------------+

                       (Application Server perspective)

                       Figure 3: Event Notifications

5.  Control Channel Establishment

   As specified in [RFC6230], the preliminary step to any interaction
   between an AS and an MS is the establishment of a Control Channel
   between the two.  As explained in the next subsection, this is
   accomplished by means of a connection-oriented media (COMEDIA)
   [RFC4145] [RFC4572] negotiation.  This negotiation allows a reliable
   connection to be created between the AS and the MS.  It is here that
   the AS and the MS agree on the transport-level protocol to use (TCP /
   Stream Control Transmission Protocol (SCTP)) and whether any
   application-level security is needed or not (e.g., TLS).  For the
   sake of simplicity, we assume that an unencrypted TCP connection is
   negotiated between the two involved entities.  Once they have
   connected, a SYNC message sent by the AS to the MS consolidates the
   Control Channel.  An example of how a keep-alive message is triggered
   is also presented in the following paragraphs.  For the sake of
   completeness, this section also includes a couple of common mistakes
   that can occur when dealing with the Control Channel establishment.






Amirante, et al.              Informational                    [Page 10]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


               AS                              MS
               |                               |
               | INVITE (COMEDIA)              |
               |------------------------------>|
               |                  100 (Trying) |
               |<------------------------------|
               |              200 OK (COMEDIA) |
               |<------------------------------|
               | ACK                           |
               |------------------------------>|
               |                               |
               |==============================>|
               | TCP CONNECT (CTRL CHANNEL)    |
               |==============================>|
               |                               |
               | SYNC (Dialog-ID, etc.)        |
               |+++++++++++++++++++++++++++++>>|
               |                               |--+
               |                               |  | Check SYNC
               |                               |<-+
               |                        200 OK |
               |<<+++++++++++++++++++++++++++++|
               |                               |
               .                               .
               .                               .

                  Figure 4: Control Channel Establishment

5.1.  COMEDIA Negotiation

   As a first step, the AS and the MS establish a Control SIP dialog.
   This is usually originated by the AS itself.  The AS generates a SIP
   INVITE message containing in its SDP body information about the TCP
   connection it wants to establish with the MS.  In the provided
   example (see Figure 5 and the attached call flow), the AS wants to
   actively open a new TCP connection, which on its side will be bound
   to port 5757.  If the request is fine, the MS answers by
   communicating to the AS the transport address to connect to in order
   to establish the TCP connection.  In the provided example, the MS
   will listen on port 7575.  Once this negotiation is over, the AS can
   effectively connect to the MS.

   The negotiation includes additional attributes.  The 'cfw-id'
   attribute is the most important, since it specifies the Dialog-ID,
   which in turn will be subsequently referred to by both the AS and the
   MS as specified in [RFC6230].





Amirante, et al.              Informational                    [Page 11]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


                     AS                              MS
                     |                               |
                     | 1. INVITE (COMEDIA)           |
                     |------------------------------>|
                     |               2. 100 (Trying) |
                     |<------------------------------|
                     |           3. 200 OK (COMEDIA) |
                     |<------------------------------|
                     | 4. ACK                        |
                     |------------------------------>|
                     |                               |
                     |==============================>|
                     | TCP CONNECT (CTRL CHANNEL)    |
                     |==============================>|
                     |                               |
                     .                               .
                     .                               .

              Figure 5: COMEDIA Negotiation: Sequence Diagram

1. AS -> MS (SIP INVITE)
------------------------
   INVITE sip:MediaServer@ms.example.net:5060 SIP/2.0
   Via: SIP/2.0/UDP 203.0.113.1:5060;\
           branch=z9hG4bK-d8754z-9b07c8201c3aa510-1---d8754z-;rport=5060
   Max-Forwards: 70
   Contact: <sip:ApplicationServer@203.0.113.1:5060>
   To: <sip:MediaServer@ms.example.net:5060>
   From: <sip:ApplicationServer@as.example.com:5060>;tag=4354ec63
   Call-ID: MDk2YTk1MDU3YmVkZjgzYTQwYmJlNjE5NTA4ZDQ1OGY.
   CSeq: 1 INVITE
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REGISTER
   Content-Type: application/sdp
   Content-Length: 203

   v=0
   o=lminiero 2890844526 2890842807 IN IP4 as.example.com
   s=MediaCtrl
   c=IN IP4 as.example.com
   t=0 0
   m=application 5757 TCP cfw
   a=connection:new
   a=setup:active
   a=cfw-id:5feb6486792a







Amirante, et al.              Informational                    [Page 12]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


2. AS <- MS (SIP 100 Trying)
----------------------------
   SIP/2.0 100 Trying
   Via: SIP/2.0/UDP 203.0.113.1:5060; \
           branch=z9hG4bK-d8754z-9b07c8201c3aa510-1---d8754z-;rport=5060
   To: <sip:MediaServer@ms.example.net:5060>;tag=499a5b74
   From: <sip:ApplicationServer@as.example.com:5060>;tag=4354ec63
   Call-ID: MDk2YTk1MDU3YmVkZjgzYTQwYmJlNjE5NTA4ZDQ1OGY.
   CSeq: 1 INVITE
   Content-Length: 0


3. AS <- MS (SIP 200 OK)
------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 203.0.113.1:5060; \
           branch=z9hG4bK-d8754z-9b07c8201c3aa510-1---d8754z-;rport=5060
   Contact: <sip:MediaServer@ms.example.net:5060>
   To: <sip:MediaServer@ms.example.net:5060>;tag=499a5b74
   From: <sip:ApplicationServer@as.example.com:5060>;tag=4354ec63
   Call-ID: MDk2YTk1MDU3YmVkZjgzYTQwYmJlNjE5NTA4ZDQ1OGY.
   CSeq: 1 INVITE
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REGISTER
   Content-Type: application/sdp
   Content-Length: 199

   v=0
   o=lminiero 2890844526 2890842808 IN IP4 ms.example.net
   s=MediaCtrl
   c=IN IP4 ms.example.net
   t=0 0
   m=application 7575 TCP cfw
   a=connection:new
   a=setup:passive
   a=cfw-id:5feb6486792a
















Amirante, et al.              Informational                    [Page 13]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


4. AS -> MS (SIP ACK)
---------------------
   ACK sip:MediaServer@ms.example.net:5060 SIP/2.0
   Via: SIP/2.0/UDP 203.0.113.1:5060; \
                branch=z9hG4bK-d8754z-22940f5f4589701b-1---d8754z-;rport
   Max-Forwards: 70
   Contact: <sip:ApplicationServer@203.0.113.1:5060>
   To: <sip:MediaServer@ms.example.net:5060>;tag=499a5b74
   From: <sip:ApplicationServer@as.example.com:5060>;tag=4354ec63
   Call-ID: MDk2YTk1MDU3YmVkZjgzYTQwYmJlNjE5NTA4ZDQ1OGY.
   CSeq: 1 ACK
   Content-Length: 0

5.2.  SYNC

   Once the AS and the MS have successfully established a TCP
   connection, an additional step is needed before the Control Channel
   can be used.  In fact, as seen in the previous subsection, the first
   interaction between the AS and the MS happens by means of a SIP
   dialog, which in turn allows the creation of the TCP connection.
   This introduces the need for a proper correlation between the above-
   mentioned entities (SIP dialog and TCP connection), so that the MS
   can be sure that the connection came from the AS that requested it.
   This is accomplished by means of a dedicated framework message called
   a SYNC message.  This SYNC message uses a unique identifier called
   the Dialog-ID to validate the Control Channel.  This identifier, as
   introduced previously, is meant to be globally unique and as such is
   properly generated by the caller (the AS in the call flow) and added
   as an SDP media attribute (cfw-id) to the COMEDIA negotiation in
   order to make both entities aware of its value:

                       a=cfw-id:5feb6486792a
                                ^^^^^^^^^^^^
   It also offers an additional negotiation mechanism.  In fact, the AS
   uses the SYNC to not only properly correlate, as explained before,
   but also negotiate with the MS the Control Packages in which it is
   interested, as well as agree on a 'Keep-Alive' timer needed by both
   the AS and the MS so that they will know if problems on the
   connection occur.  In the provided example (see Figure 6 and the
   related call flow), the AS sends a SYNC with a Dialog-ID constructed
   as needed (using the 'cfw-id' attribute from the SIP dialog) and
   requests access to two Control Packages: specifically, the
   Interactive Voice Response (IVR) package and the Mixer package.  The
   AS also instructs the MS that a 100-second timeout is to be used for
   keep-alive messages.  The MS validates the request by matching the
   received Dialog-ID with the SIP dialog values, and, assuming that it
   supports the Control Packages the AS requested access to (and for the
   sake of this document we assume that it does), it answers with a



Amirante, et al.              Informational                    [Page 14]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   200 message.  Additionally, the MS provides the AS with a list of
   other unrequested packages it supports (in this case just a dummy
   package providing testing functionality).

             AS                              MS
             .                               .
             .                               .
             |                               |
             | 1. SYNC (Dialog-ID, etc.)     |
             |+++++++++++++++++++++++++++++>>|
             |                               |--+
             |                               |  | Check SYNC
             |                               |<-+
             |                     2. 200 OK |
             |<<+++++++++++++++++++++++++++++|
             |                               |
             .                               .
             .                               .

                     Figure 6: SYNC: Sequence Diagram

   1. AS -> MS (CFW SYNC)
   ----------------------
      CFW 6e5e86f95609 SYNC
      Dialog-ID: 5feb6486792a
      Keep-Alive: 100
      Packages: msc-ivr/1.0,msc-mixer/1.0


   2. AS <- MS (CFW 200)
   ---------------------
      CFW 6e5e86f95609 200
      Keep-Alive: 100
      Packages: msc-ivr/1.0,msc-mixer/1.0
      Supported: msc-example-pkg/1.0

   The framework-level transaction identifier is obviously the same in
   both the request and the response (6e5e86f95609), since the AS needs
   to be able to match the response to the original request.  At this
   point, the Control Channel is finally established, and it can be used
   by the AS to request services from the MS.

5.3.  K-ALIVE

   [RFC6230] provides a mechanism for implementing a keep-alive
   functionality.  Such a mechanism is especially useful whenever any
   NAT or firewall sits in the path between an AS and an MS.  In fact,
   NATs and firewalls may have timeout values for the TCP connections



Amirante, et al.              Informational                    [Page 15]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   they handle, which means that if no traffic is detected on these
   connections within a specific time they could be shut down.  This
   could be the case for a Control Channel established between an AS and
   an MS but not used for some time.  For this reason, [RFC6230]
   specifies a dedicated framework message (K-ALIVE) that the AS and MS
   can use in order to generate traffic on the TCP connection and keep
   it alive.

   As discussed in Section 5.2, the timeout value for the keep-alive
   mechanism is set by the SYNC request.  Specifically, in the example,
   the AS specified a value of 100 seconds.  In fact, the timeout value
   is not actually negotiated between the AS and MS, as it is simply
   specified by whichever endpoint takes the active role.  The
   100-second value is compliant with how NATs and firewalls are usually
   implemented, since in most cases the timeout value they use before
   shutting TCP connections down is around 2 minutes.  Such a value has
   a strong meaning within the context of this mechanism.  In fact, it
   means that the active role (the AS, in this case) has to send a
   K-ALIVE message before those 100 seconds pass; otherwise, the passive
   role (the MS) will tear down the connection, treating it like a
   timeout.  [RFC6230] suggests a more conservative approach towards
   handling this timeout value, suggesting that the K-ALIVE message be
   triggered before 80% of the negotiated time passes (80 seconds, in
   this case).  This is exactly the case presented in Figure 7.

                   AS                              MS
                   .                               .
                   .                               .
                   |                               |
     ~80 s have +--|                               |
   passed since |  |                               |
   last K-ALIVE +->|                               |
                   | 1. K-ALIVE                    |
                   |+++++++++++++++++++++++++++++>>|
                   |                               |--+ Reset the local
                   |                               |  | 'Keep-Alive'
                   |                               |<-+ timer
                   |                     2. 200 OK |
                   |<<+++++++++++++++++++++++++++++|
      Reset the +--|                               |
          local |  |                               |
   'Keep-Alive' +->|                               |
          timer    |                               |
                   .                               .
                   .                               .

                    Figure 7: K-ALIVE: Sequence Diagram




Amirante, et al.              Informational                    [Page 16]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   After the Control Channel has been established (COMEDIA+SYNC), both
   the AS and the MS start local 'Keep-Alive' timers mapped to the
   negotiated keep-alive timeout value (100 seconds).  When about
   80 seconds have passed since the start of the timer (80% of
   100 seconds), the AS sends a framework-level K-ALIVE message to the
   MS.  The message as seen in the protocol message dump is very
   lightweight, since it only includes a single line with no additional
   header.  When the MS receives the K-ALIVE message, it resets its
   local 'Keep-Alive' timer and sends a 200 message back as
   confirmation.  As soon as the AS receives the 200 message, it resets
   its local 'Keep-Alive' timer as well, and the mechanism starts over
   again.

   The actual transaction steps are presented below.

   1. AS -> MS (K-ALIVE)
   ---------------------
      CFW 518ba6047880 K-ALIVE


   2. AS <- MS (CFW 200)
   ---------------------
      CFW 518ba6047880 200

   If the timer expired in either the AS or the MS (i.e., the K-ALIVE or
   the 200 arrived after the 100 seconds), the connection and the
   associated SIP control dialog would be torn down by the entity
   detecting the timeout, thus ending the interaction between the AS and
   the MS.

5.4.  Wrong Behavior

   This section will briefly address some types of behavior that could
   represent the most common mistakes when dealing with the
   establishment of a Control Channel between an AS and an MS.  These
   scenarios are obviously of interest, since they result in the AS and
   the MS being unable to interact with each other.  Specifically, these
   simple scenarios will be described:

   1.  an AS providing the MS with a wrong Dialog-ID in the initial
       SYNC.

   2.  an AS sending a generic CONTROL message instead of SYNC as a
       first transaction.







Amirante, et al.              Informational                    [Page 17]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The first scenario is depicted in Figure 8.

             AS                              MS
             .                               .
             .                               .
             |                               |
             | 1. SYNC (Dialog-ID, etc.)     |
             |+++++++++++++++++++++++++++++>>|
             |                               |--+
             |                               |  | Check SYNC (wrong!)
             |                               |<-+
             |                        2. 481 |
             |<<+++++++++++++++++++++++++++++|
             |                               |
             |<-XX- CLOSE TCP CONNECTION -XX-|
             |                               |
             | SIP BYE                       |
             |------------------------------>|
             |                               |
             .                               .
             .                               .

           Figure 8: SYNC with Wrong Dialog-ID: Sequence Diagram

   This scenario is similar to the scenario presented in Section 5.2,
   but with a difference: instead of using the correct, expected
   Dialog-ID in the SYNC message (5feb6486792a, the one negotiated via
   COMEDIA), the AS uses a wrong value (4hrn7490012c).  This causes the
   SYNC transaction to fail.  First of all, the MS sends a framework-
   level 481 message.  This response, when given in reply to a SYNC
   message, means that the SIP dialog associated with the provided
   Dialog-ID (the wrong identifier) does not exist.  The Control Channel
   must be torn down as a consequence, and so the MS also closes the TCP
   connection it received the SYNC message from.  The AS at this point
   is supposed to tear down its SIP control dialog as well, and so it
   sends a SIP BYE to the MS.















Amirante, et al.              Informational                    [Page 18]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The actual transaction is presented below.

   1. AS -> MS (CFW SYNC with wrong Dialog-ID)
   -------------------------------------------
      CFW 2b4dd8724f27 SYNC
      Dialog-ID: 4hrn7490012c
      Keep-Alive: 100
      Packages: msc-ivr/1.0,msc-mixer/1.0


   2. AS <- MS (CFW 481)
   ---------------------
      CFW 2b4dd8724f27 481

   The second scenario is depicted in Figure 9.

             AS                              MS
             .                               .
             .                               .
             |                               |
             | 1. CONTROL                    |
             |+++++++++++++++++++++++++++++>>|
             |                               |--+ First transaction
             |                               |  | is not a SYNC
             |                               |<-+
             |                        2. 403 |
             |<<+++++++++++++++++++++++++++++|
             |                               |
             |<-XX- CLOSE TCP CONNECTION -XX-|
             |                               |
             | SIP BYE                       |
             |------------------------------>|
             |                               |
             .                               .
             .                               .

          Figure 9: Incorrect First Transaction: Sequence Diagram

   This scenario demonstrates another common mistake that could occur
   when trying to set up a Control Channel.  In fact, [RFC6230] mandates
   that the first transaction after the COMEDIA negotiation be a SYNC to
   conclude the setup.  If the AS, instead of triggering a SYNC message
   as expected, sends a different message to the MS (in the example
   below, it tries to send an <audit> message addressed to the IVR
   Control Package), the MS treats it like an error.  As a consequence,
   the MS replies with a framework-level 403 message (Forbidden) and,
   just as before, closes the TCP connection and waits for the related
   SIP control dialog to be torn down.



Amirante, et al.              Informational                    [Page 19]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The actual transaction is presented below.

   1. AS -> MS (CFW CONTROL instead of SYNC)
   -----------------------------------------
      CFW 101fbbd62c35 CONTROL
      Control-Package: msc-ivr/1.0
      Content-Type: application/msc-ivr+xml
      Content-Length: 78

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
         <audit/>
      </mscivr>


   2. AS <- MS (CFW 403 Forbidden)
   -------------------------------
      CFW 101fbbd62c35 403

6.  Use-Case Scenarios and Examples

   The following scenarios have been chosen for their common presence in
   many rich real-time multimedia applications.  Each scenario is
   depicted as a set of call flows involving both the SIP/SDP signaling
   (UACs<->AS<->MS) and the Control Channel communication (AS<->MS).



























Amirante, et al.              Informational                    [Page 20]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   All the examples assume that a Control Channel has already been
   correctly established and SYNCed between the reference AS and MS.
   Also, unless stated otherwise, the same User Agent Client (UAC)
   session is referenced in all the examples that will be presented in
   this document.  The UAC session is assumed to have been created as
   described in Figure 10:

   UAC                  AS                          MS
    |                   |                           |
    | INVITE (X)        |                           |
    |------------------>|                           |
    |     180 (Ringing) |                           |
    |<------------------|                           |
    |                   |--+                        |
    |                   |  | Handle app(X)          |
    |                   |<-+                        |
    |                   | INVITE (Y) as 3PCC        |
    |                   |-------------------------->|
    |                   |              100 (Trying) |
    |                   |<--------------------------|
    |                   |                           |--+ Negotiate media
    |                   |                           |  | with UAC; map
    |                   |                           |<-+ tags and labels
    |                   |                    200 OK |
    |                   |<--------------------------|
    |            200 OK |                           |
    |<------------------|                           |
    | ACK               |                           |
    |------------------>|                           |
    |                   | ACK                       |
    |                   |-------------------------->|
    |                   |                           |
    |<<###########################################>>|
    |         RTP Media Stream(s) flowing           |
    |<<###########################################>>|
    |                   |                           |
    .                   .                           .
    .                   .                           .

                     Figure 10: 3PCC Sequence Diagram

   Note well: This is only an example of a possible approach involving a
   Third-Party Call Control (3PCC) negotiation among the UAC, the AS,
   and the MS, and as such is not at all to be considered the mandatory
   way, nor best common practice, in the presented scenario.  [RFC3725]
   provides several different solutions and many details about how 3PCC





Amirante, et al.              Informational                    [Page 21]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   can be realized, with pros and cons.  It is also worth pointing out
   that the two INVITEs displayed in the figure are different SIP
   dialogs.

   The UAC first places a call to a SIP URI for which the AS is
   responsible.  The specific URI is not relevant to the examples, since
   the application logic behind the mapping between a URI and the
   service it provides is a matter that is important only to the AS.
   So, a generic 'sip:mediactrlDemo@as.example.com' is used in all the
   examples, whereas the service this URI is associated with in the AS
   logic is mapped scenario by scenario to the case under examination.
   The UAC INVITE is treated as envisaged in [RFC5567].  The INVITE is
   forwarded by the AS to the MS via a third party (e.g., the 3PCC
   approach), without the SDP provided by the UAC being touched, in
   order to have the session fully negotiated by the MS according to its
   description.  The MS matches the UAC's offer with its own
   capabilities and provides its answer in a 200 OK.  This answer is
   then forwarded, again without the SDP contents being touched, by the
   AS to the target UAC.  This way, while the SIP signaling from the UAC
   is terminated in the AS, all the media would start flowing directly
   between the UAC and the MS.

   As a consequence of this negotiation, one or more media connections
   are created between the MS and the UAC.  They are then addressed,
   when needed, by the AS and the MS by means of the concatenation of
   tags, as specified in [RFC6230].  How the identifiers are created and
   addressed is explained by using the sample signaling provided in the
   following lines.

1. UAC -> AS (SIP INVITE)
-------------------------
   INVITE sip:mediactrlDemo@as.example.com SIP/2.0
   Via: SIP/2.0/UDP 203.0.113.2:5063;rport;branch=z9hG4bK1396873708
   From: <sip:lminiero@users.example.com>;tag=1153573888
   To: <sip:mediactrlDemo@as.example.com>
   Call-ID: 1355333098
   CSeq: 20 INVITE
   Contact: <sip:lminiero@203.0.113.2:5063>
   Content-Type: application/sdp
   Max-Forwards: 70
   User-Agent: Linphone/2.1.1 (eXosip2/3.0.3)
   Subject: Phone call
   Expires: 120
   Content-Length: 330







Amirante, et al.              Informational                    [Page 22]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   v=0
   o=lminiero 123456 654321 IN IP4 203.0.113.2
   s=A conversation
   c=IN IP4 203.0.113.2
   t=0 0
   m=audio 7078 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000/1
   a=rtpmap:3 GSM/8000/1
   a=rtpmap:8 PCMA/8000/1
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-11
   m=video 9078 RTP/AVP 98
   a=rtpmap:98 H263-1998/90000
   a=fmtp:98 CIF=1;QCIF=1


2. UAC <- AS (SIP 180 Ringing)
------------------------------
   SIP/2.0 180 Ringing
   Via: SIP/2.0/UDP 203.0.113.2:5063;rport=5063; \
                                                branch=z9hG4bK1396873708
   Contact: <sip:mediactrlDemo@as.example.com>
   To: <sip:mediactrlDemo@as.example.com>;tag=bcd47c32
   From: <sip:lminiero@users.example.com>;tag=1153573888
   Call-ID: 1355333098
   CSeq: 20 INVITE
   Content-Length: 0


3. AS -> MS (SIP INVITE)
------------------------
   INVITE sip:MediaServer@ms.example.net:5060;transport=UDP SIP/2.0
   Via: SIP/2.0/UDP 203.0.113.1:5060; \
                branch=z9hG4bK-d8754z-8723e421ebc45f6b-1---d8754z-;rport
   Max-Forwards: 70
   Contact: <sip:ApplicationServer@203.0.113.1:5060>
   To: <sip:MediaServer@ms.example.net:5060>
   From: <sip:ApplicationServer@as.example.com:5060>;tag=10514b7f
   Call-ID: NzI0ZjQ0ZTBlMTEzMGU1ZjVhMjk5NTliMmJmZjE0NDQ.
   CSeq: 1 INVITE
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REGISTER
   Content-Type: application/sdp
   Content-Length: 330








Amirante, et al.              Informational                    [Page 23]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   v=0
   o=lminiero 123456 654321 IN IP4 203.0.113.2
   s=A conversation
   c=IN IP4 203.0.113.2
   t=0 0
   m=audio 7078 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000/1
   a=rtpmap:3 GSM/8000/1
   a=rtpmap:8 PCMA/8000/1
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-11
   m=video 9078 RTP/AVP 98
   a=rtpmap:98 H263-1998/90000
   a=fmtp:98 CIF=1;QCIF=1


4. AS <- MS (SIP 100 Trying)
----------------------------
   SIP/2.0 100 Trying
   Via: SIP/2.0/UDP 203.0.113.1:5060; \
           branch=z9hG4bK-d8754z-8723e421ebc45f6b-1---d8754z-;rport=5060
   To: <sip:MediaServer@ms.example.net:5060>;tag=6a900179
   From: <sip:ApplicationServer@as.example.com:5060>;tag=10514b7f
   Call-ID: NzI0ZjQ0ZTBlMTEzMGU1ZjVhMjk5NTliMmJmZjE0NDQ.
   CSeq: 1 INVITE
   Content-Length: 0


5. AS <- MS (SIP 200 OK)
------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 203.0.113.1:5060; \
           branch=z9hG4bK-d8754z-8723e421ebc45f6b-1---d8754z-;rport=5060
   Contact: <sip:MediaServer@ms.example.net:5060>
   To: <sip:MediaServer@ms.example.net:5060>;tag=6a900179
   From: <sip:ApplicationServer@as.example.com:5060>;tag=10514b7f
   Call-ID: NzI0ZjQ0ZTBlMTEzMGU1ZjVhMjk5NTliMmJmZjE0NDQ.
   CSeq: 1 INVITE
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REGISTER
   Content-Type: application/sdp
   Content-Length: 374

   v=0
   o=lminiero 123456 654322 IN IP4 ms.example.net
   s=MediaCtrl
   c=IN IP4 ms.example.net
   t=0 0
   m=audio 63442 RTP/AVP 0 3 8 101



Amirante, et al.              Informational                    [Page 24]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   a=rtpmap:0 PCMU/8000
   a=rtpmap:3 GSM/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=ptime:20
   a=label:7eda834
   m=video 33468 RTP/AVP 98
   a=rtpmap:98 H263-1998/90000
   a=fmtp:98 CIF=2
   a=label:0132ca2


6. UAC <- AS (SIP 200 OK)
-------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 203.0.113.2:5063;rport=5063; \
                                                branch=z9hG4bK1396873708
   Contact: <sip:mediactrlDemo@as.example.com>
   To: <sip:mediactrlDemo@as.example.com>;tag=bcd47c32
   From: <sip:lminiero@users.example.com>;tag=1153573888
   Call-ID: 1355333098
   CSeq: 20 INVITE
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REGISTER
   Content-Type: application/sdp
   Content-Length: 374

   v=0
   o=lminiero 123456 654322 IN IP4 ms.example.net
   s=MediaCtrl
   c=IN IP4 ms.example.net
   t=0 0
   m=audio 63442 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:3 GSM/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=ptime:20
   a=label:7eda834
   m=video 33468 RTP/AVP 98
   a=rtpmap:98 H263-1998/90000
   a=fmtp:98 CIF=2
   a=label:0132ca2







Amirante, et al.              Informational                    [Page 25]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


7. UAC -> AS (SIP ACK)
----------------------
   ACK sip:mediactrlDemo@as.example.com SIP/2.0
   Via: SIP/2.0/UDP 203.0.113.2:5063;rport;branch=z9hG4bK1113338059
   From: <sip:lminiero@users.example.com>;tag=1153573888
   To: <sip:mediactrlDemo@as.example.com>;tag=bcd47c32
   Call-ID: 1355333098
   CSeq: 20 ACK
   Contact: <sip:lminiero@203.0.113.2:5063>
   Max-Forwards: 70
   User-Agent: Linphone/2.1.1 (eXosip2/3.0.3)
   Content-Length: 0


8. AS -> MS (SIP ACK)
---------------------
   ACK sip:MediaServer@ms.example.net:5060;transport=UDP SIP/2.0
   Via: SIP/2.0/UDP 203.0.113.1:5060; \
                branch=z9hG4bK-d8754z-5246003419ccd662-1---d8754z-;rport
   Max-Forwards: 70
   Contact: <sip:ApplicationServer@203.0.113.1:5060>
   To: <sip:MediaServer@ms.example.net:5060;tag=6a900179
   From: <sip:ApplicationServer@as.example.com:5060>;tag=10514b7f
   Call-ID: NzI0ZjQ0ZTBlMTEzMGU1ZjVhMjk5NTliMmJmZjE0NDQ.
   CSeq: 1 ACK
   Content-Length: 0

   As a result of the 3PCC negotiation just presented, the following
   relevant information is retrieved:

   1.  The 'From' and 'To' tags (10514b7f and 6a900179, respectively) of
       the AS<->MS session:

     From: <sip:ApplicationServer@as.example.com:5060>;tag=10514b7f
                                                           ^^^^^^^^
     To: <sip:MediaServer@ms.example.net:5060>;tag=6a900179
                                                   ^^^^^^^^

   2.  The labels [RFC4574] associated with the negotiated media
       connections, in this case an audio stream (7eda834) and a video
       stream (0132ca2):

      m=audio 63442 RTP/AVP 0 3 8 101
      [..]
      a=label:7eda834
              ^^^^^^^





Amirante, et al.              Informational                    [Page 26]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


      m=video 33468 RTP/AVP 98
      [..]
      a=label:0132ca2
              ^^^^^^^
   These four identifiers allow the AS and MS to univocally and
   unambiguously address to each other the connections associated with
   the related UAC.  Specifically:

   1.  10514b7f:6a900179, the concatenation of the 'From' and 'To' tags
       through a colon (':') token, addresses all the media connections
       between the MS and the UAC.

   2.  10514b7f:6a900179 <-> 7eda834, the association of the previous
       value with the label attribute, addresses only one of the media
       connections of the UAC session (in this case, the audio stream).
       Since, as will be made clearer in the example scenarios, the
       explicit identifiers in requests can only address 'from:tag'
       connections, an additional mechanism will be required to have a
       finer control of individual media streams (i.e., by means of the
       <stream> element in package-level requests).

   The mapping that the AS makes between the UACs<->AS and the AS<->MS
   SIP dialogs is out of scope for this document.  We just assume that
   the AS knows how to address the right connection according to the
   related session it has with a UAC (e.g., to play an announcement to a
   specific UAC).  This is obviously very important, since the AS is
   responsible for all the business logic of the multimedia application
   it provides.

6.1.  Echo Test

   The echo test is the simplest example scenario that can be achieved
   by means of an MS.  It basically consists of a UAC directly or
   indirectly "talking" to itself.  A media perspective of such a
   scenario is depicted in Figure 11.

              +-------+  A (RTP)                 +--------+
              |  UAC  |=========================>| Media  |
              |   A   |<=========================| Server |
              +-------+                 A (RTP)  +--------+

                  Figure 11: Echo Test: Media Perspective

   From the framework point of view, when the UAC's leg is not attached
   to anything yet, what appears is shown in Figure 12: since there's no
   connection involving the UAC yet, the frames it might be sending are
   discarded, and nothing is sent to it (except for silence, if its
   transmission is requested).



Amirante, et al.              Informational                    [Page 27]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


                                           MS
                                        +------+
                           UAC          |      |
                            o----->>-------x   |
                            o.....<<.......x   |
                                        |      |
                                        +------+

             Figure 12: Echo Test: UAC Media Leg Not Attached

   Starting from these considerations, two different approaches to the
   Echo Test scenario are explored in this document:

   1.  a Direct Echo Test approach, where the UAC directly talks to
       itself.

   2.  a Recording-based Echo Test approach, where the UAC indirectly
       talks to itself.

6.1.1.  Direct Echo Test

   In the Direct Echo Test approach, the UAC is directly connected to
   itself.  This means that, as depicted in Figure 13, each frame the MS
   receives from the UAC is sent back to it in real time.

                                           MS
                                        +------+
                           UAC          |      |
                            o----->>-------@   |
                            o-----<<-------@   |
                                        |      |
                                        +------+

            Figure 13: Echo Test: Direct Echo (Self-Connection)

   In the framework, this can be achieved by means of the Mixer Control
   Package [RFC6505], which is in charge of joining connections and
   conferences.













Amirante, et al.              Informational                    [Page 28]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   A sequence diagram of a potential transaction is depicted in
   Figure 14:

  UAC                      AS                                 MS
   |                       |                                  |
   |                       | 1. CONTROL (join UAC to itself)  |
   |                       |++++++++++++++++++++++++++++++++>>|
   |                       |                                  |--+ self-
   |                       |                                  |  | join
   |                       |                        2. 200 OK |<-+ UAC
   |                       |<<++++++++++++++++++++++++++++++++|
   |                       |                                  |
   |<<######################################################>>|
   |         Everything is now echoed back to the UAC         |
   |<<######################################################>>|
   |                       |                                  |
   .                       .                                  .
   .                       .                                  .

             Figure 14: Self-Connection: Framework Transaction

   The transaction steps have been numbered and are explained below:

   o  The AS requests the joining of the connection to itself by sending
      to the MS a CONTROL request (1) that is specifically meant for the
      conferencing Control Package (msc-mixer/1.0).  A <join> request is
      used for this purpose, and since the connection must be attached
      to itself, both id1 and id2 attributes are set to the same value,
      i.e., the connectionid.

   o  The MS, having checked the validity of the request, enforces the
      joining of the connection to itself.  This means that all the
      frames sent by the UAC are sent back to it.  To report the result
      of the operation, the MS sends a 200 OK (2) in reply to the AS,
      thus ending the transaction.  The transaction ended successfully,
      as indicated by the body of the message (the 200 status code in
      the <response> tag).














Amirante, et al.              Informational                    [Page 29]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The complete transaction -- that is, the full bodies of the exchanged
   messages -- is provided in the following lines:

   1. AS -> MS (CFW CONTROL)
   -------------------------
      CFW 4fed9bf147e2 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 130

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="10514b7f:6a900179" id2="10514b7f:6a900179"/>
      </mscmixer>


   2. AS <- MS (CFW 200 OK)
   ------------------------
      CFW 4fed9bf147e2 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>

6.1.2.  Echo Test Based on Recording

   In the Recording-based Echo Test approach, the UAC is NOT directly
   connected to itself, but rather indirectly.  This means that, as
   depicted in Figure 15, each frame the MS receives from the UAC is
   first recorded; then, when the recording process is ended, the whole
   recorded frames are played back to the UAC as an announcement.

                                MS
                             +------+
                UAC          |      |
                 o----->>-------+~~~~~> (recording.wav) ~~+
                 o-----<<-------+   |                     |
                             |  ^   |                     v
                             +--|---+                     |
                                +~~~~~~~~~~~<<~~~~~~~~~~~~+

                 Figure 15: Echo Test: Recording Involved







Amirante, et al.              Informational                    [Page 30]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   In the framework, this can be achieved by means of the IVR Control
   Package [RFC6231], which is in charge of both the recording and the
   playout phases.  However, the whole scenario cannot be accomplished
   in a single transaction; at least two steps, in fact, need to be
   performed:

   1.  First, a recording (preceded by an announcement, if requested)
       must take place.

   2.  Then, a playout of the previously recorded media must occur.

   This means that two separate transactions need to be invoked.  A
   sequence diagram of a potential multiple transaction is depicted in
   Figure 16:





































Amirante, et al.              Informational                    [Page 31]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 UAC                      AS                                 MS
  |                       |                                  |
  |                       | A1. CONTROL (record for 10s)     |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                          A2. 202 |
  |                       |<<++++++++++++++++++++++++++++++++| prepare &
  |                       |                                  |--+ start
  |                       |                                  |  | the
  |                       |           A3. REPORT (terminate) |<-+ dialog
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | A4. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  |<<########################################################|
  |           "This is an echo test: say something"          |
  |<<########################################################|
  |                       |                                  |
  |########################################################>>|
  |          10 s of audio from the UAC are recorded         |--+ save
  |########################################################>>|  | in a
  |                       |                                  |<-+ file
  |                       |       B1. CONTROL (<recordinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |       Use recorded +--| B2. 200 OK                       |
  |       file to play |  |++++++++++++++++++++++++++++++++>>|
  |       announcement +->|                                  |
  |                       | C1. CONTROL (play recorded)      |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                          C2. 202 |
  |                       |<<++++++++++++++++++++++++++++++++| prepare &
  |                       |                                  |--+ start
  |                       |                                  |  | the
  |                       |           C3. REPORT (terminate) |<-+ dialog
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | C4. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  |<<########################################################|
  |         "Can you hear me? It's me, UAC, talking"         |
  |<<########################################################|
  |                       |                                  |
  |                       |       D1. CONTROL (<promptinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | D2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  .                       .                                  .
  .                       .                                  .



Amirante, et al.              Informational                    [Page 32]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


        Figure 16: Recording-Based Echo: Two Framework Transactions

   The first obvious difference that stands out when looking at the
   diagram is that, unlike the Direct Echo scenario, the MS does not
   reply with a 200 message to the CONTROL request originated by the AS.
   Instead, a 202 provisional message is sent first, followed by a
   REPORT message.  The 202+REPORT(s) mechanism is used whenever the MS
   wants to tell the AS that the requested operation might take more
   time than the limit specified in the definition of the Control
   Package.  So, while the <join> operation in the Direct Echo scenario
   was expected to be fulfilled in a very short time, the IVR request
   was assumed to last longer.  A 202 message provides a timeout value
   and tells the AS to wait a bit, since the preparation of the dialog
   might not happen immediately.  In this example, the preparation ends
   before the timeout, and so the transaction is concluded with a
   'REPORT terminate', which reports the end of the transaction (as did
   the 200 message in the previous example).  If the preparation took
   longer than the timeout, an additional 'REPORT update' would have
   been sent with a new timeout value, and so on, until completion by
   means of a 'REPORT terminate'.

   Note that the REPORT mechanism depicted is only shown to clarify its
   behavior.  In fact, the 202+REPORT mechanism is assumed to be
   involved only when the requested transaction is expected to take a
   long time (e.g., retrieving a large media file for a prompt from an
   external server).  In this scenario, the transaction would be
   prepared in much less time and as a consequence would very likely be
   completed within the context of a simple CONTROL+200 request/
   response.  The following scenarios will only involve 202+REPORTs when
   they are strictly necessary.

   Regarding the dialog itself, note how the AS-originated CONTROL
   transactions are terminated as soon as the requested dialogs start.
   As specified in [RFC6231], the MS uses a framework CONTROL message to
   report the result of the dialog and how it has proceeded.  The two
   transactions (the AS-generated CONTROL request and the MS-generated
   CONTROL event) are correlated by means of the associated dialog
   identifier, as explained below.  As before, the transaction steps
   have been numbered.  The two transactions are distinguished by the
   preceding letter (A,B=recording, C,D=playout).

   o  The AS, as a first transaction, invokes a recording on the UAC
      connection by means of a CONTROL request (A1).  The body is for
      the IVR package (msc-ivr/1.0) and requests the start
      (<dialogstart>) of a new recording context (<record>).  The
      recording must be preceded by an announcement (<prompt>), must not
      last longer than 10 s (maxtime), and cannot be interrupted by a
      DTMF tone (dtmfterm=false).  This is only done once (the missing



Amirante, et al.              Informational                    [Page 33]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


      repeatCount attribute is 1 by default for a <dialog>), which means
      that if the recording does not succeed the first time, the
      transaction must fail.  A video recording is requested
      (considering that the associated connection includes both audio
      and video and no restriction is enforced on streams to record),
      which is to be fed by both of the negotiated media streams.  A
      beep has to be played (beep=true) right before the recording
      starts, to notify the UAC.

   o  As seen before, the MS sends a provisional 202 response to let the
      AS know that the operation might need some time.

   o  In the meantime, the MS prepares the dialog (e.g., by retrieving
      the announcement file, for which an HTTP URL is provided, and by
      checking that the request is well formed) and if all is fine it
      starts it, notifying the AS with a new REPORT (A3) with a
      terminated status.  As explained previously, interlocutory REPORT
      messages with an update status would have been sent if the
      preparation took longer than the timeout provided in the 202
      message (e.g., if retrieving the resource via HTTP took longer
      than expected).  Once the dialog has been prepared and started,
      the UAC connection is then passed to the IVR package, which first
      plays the announcement on the connection, followed by a beep, and
      then records all the incoming frames to a buffer.  The MS also
      provides the AS with a unique dialog identifier (dialogid) that
      will be used in all subsequent event notifications concerning the
      dialog it refers to.

   o  The AS acks the latest REPORT (A4), thus terminating this
      transaction, and waits for the results.

   o  Once the recording is over, the MS prepares a notification CONTROL
      (B1).  The <event> body is prepared with an explicit reference to
      the previously provided dialog identifier, in order to make the AS
      aware of the fact that the notification is related to that
      specific dialog.  The event body is then completed with the
      recording-related information (<recordinfo>), in this case the
      path to the recorded file (here, an HTTP URL) that can be used by
      the AS for anything it needs.  The payload also contains
      information about the prompt (<promptinfo>), which is, however,
      not relevant to the scenario.

   o  The AS concludes this first recording transaction by acking the
      CONTROL event (B2).







Amirante, et al.              Informational                    [Page 34]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   Now that the first transaction has ended, the AS has the 10-s
   recording of the UAC talking and can let the UAC hear it by having
   the MS play it for the UAC as an announcement:

   o  In the second transaction, the AS invokes a playout on the UAC
      connection by means of a new CONTROL request (C1).  The body is
      once again for the IVR package (msc-ivr/1.0), but this time it
      requests the start (<dialogstart>) of a new announcement context
      (<prompt>).  The file to be played is the file that was recorded
      before (<media>).

   o  Again, the usual provisional 202 (C2) takes place.

   o  In the meantime, the MS prepares and starts the new dialog, and
      notifies the AS with a new REPORT (C3) with a terminated status.
      The connection is then passed to the IVR package, which plays the
      file on it.

   o  The AS acks the terminating REPORT (C4), now waiting for the
      announcement to end.

   o  Once the playout is over, the MS sends a CONTROL event (D1) that
      contains in its body (<promptinfo>) information about the just-
      concluded announcement.  As before, the proper dialogid is used as
      a reference to the correct dialog.

   o  The AS concludes this second and last transaction by acking the
      CONTROL event (D2).























Amirante, et al.              Informational                    [Page 35]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   As in the previous paragraph, the whole CFW interaction is provided
   for a more in-depth evaluation of the protocol interaction.

   A1. AS -> MS (CFW CONTROL, record)
   ----------------------------------
      CFW 796d83aa1ce4 CONTROL
      Control-Package: msc-ivr/1.0
      Content-Type: application/msc-ivr+xml
      Content-Length: 265

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <dialogstart connectionid="10514b7f:6a900179">
          <dialog>
            <prompt>
              <media
                loc="http://www.example.com/demo/echorecord.mpg"/>
            </prompt>
            <record beep="true" maxtime="10s"/>
          </dialog>
        </dialogstart>
      </mscivr>


   A2. AS <- MS (CFW 202)
   ----------------------
      CFW 796d83aa1ce4 202
      Timeout: 5


   A3. AS <- MS (CFW REPORT terminate)
   -----------------------------------
      CFW 796d83aa1ce4 REPORT
      Seq: 1
      Status: terminate
      Timeout: 25
      Content-Type: application/msc-ivr+xml
      Content-Length: 137

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
         <response status="200" reason="Dialog started"
                   dialogid="68d6569"/>
      </mscivr>


   A4. AS -> MS (CFW 200, ACK to 'REPORT terminate')
   -------------------------------------------------
      CFW 796d83aa1ce4 200
      Seq: 1



Amirante, et al.              Informational                    [Page 36]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   B1. AS <- MS (CFW CONTROL event)
   --------------------------------
      CFW 0eb1678c0bfc CONTROL
      Control-Package: msc-ivr/1.0
      Content-Type: application/msc-ivr+xml
      Content-Length: 403

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <event dialogid="68d6569">
          <dialogexit status="1" reason="Dialog successfully completed">
            <promptinfo duration="9987" termmode="completed"/>
            <recordinfo duration="10017" termmode="maxtime">
              <mediainfo
     loc="http://www.example.net/recordings/recording-68d6569.mpg"
     type="video/mpeg" size="591872"/>
            </recordinfo>
          </dialogexit>
        </event>
      </mscivr>


   B2. AS -> MS (CFW 200, ACK to 'CONTROL event')
   ----------------------------------------------
      CFW 0eb1678c0bfc 200


   C1. AS -> MS (CFW CONTROL, play)
   --------------------------------
      CFW 1632eead7e3b CONTROL
      Control-Package: msc-ivr/1.0
      Content-Type: application/msc-ivr+xml
      Content-Length: 241

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <dialogstart connectionid="10514b7f:6a900179">
          <dialog>
            <prompt>
              <media
     loc="http://www.example.net/recordings/recording-68d6569.mpg"/>
            </prompt>
          </dialog>
        </dialogstart>
      </mscivr>








Amirante, et al.              Informational                    [Page 37]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   C2. AS <- MS (CFW 202)
   ----------------------
      CFW 1632eead7e3b 202
      Timeout: 5


   C3. AS <- MS (CFW REPORT terminate)
   -----------------------------------
      CFW 1632eead7e3b REPORT
      Seq: 1
      Status: terminate
      Timeout: 25
      Content-Type: application/msc-ivr+xml
      Content-Length: 137

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
         <response status="200" reason="Dialog started"
                   dialogid="5f5cb45"/>
      </mscivr>


   C4. AS -> MS (CFW 200, ACK to 'REPORT terminate')
   -------------------------------------------------
      CFW 1632eead7e3b 200
      Seq: 1


   D1. AS <- MS (CFW CONTROL event)
   --------------------------------
      CFW 502a5fd83db8 CONTROL
      Control-Package: msc-ivr/1.0
      Content-Type: application/msc-ivr+xml
      Content-Length: 230

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <event dialogid="5f5cb45">
          <dialogexit status="1" reason="Dialog successfully completed">
            <promptinfo duration="10366" termmode="completed"/>
          </dialogexit>
        </event>
      </mscivr>


   D2. AS -> MS (CFW 200, ACK to 'CONTROL event')
   ----------------------------------------------
      CFW 502a5fd83db8 200





Amirante, et al.              Informational                    [Page 38]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


6.2.  Phone Call

   Another scenario that might involve the interaction between an AS and
   an MS is the classic phone call between two UACs.  In fact, even
   though the most straightforward way to achieve this would be to let
   the UACs negotiate the session and the media to be used between them,
   there are cases when the services provided by an MS might also prove
   useful for such phone calls.

   One of these cases is when the two UACs have no common supported
   codecs: having the two UACs directly negotiate the session would
   result in a session with no available media.  Involving the MS as a
   transcoder would in this case still allow the two UACs to
   communicate.  Another interesting case is when the AS (or any other
   entity on whose behalf the AS is working) is interested in
   manipulating or monitoring the media session between the UACs, e.g.,
   to record the conversation.  A similar scenario will be dealt with in
   Section 6.2.2.

   Before looking at how such a scenario might be accomplished by means
   of the Media Control Channel Framework, it is worth mentioning what
   the SIP signaling involving all the interested parties might look
   like.  In fact, in such a scenario, a 3PCC approach is absolutely
   needed.  An example is provided in Figure 17.  Again, the presented
   example is not at all to be considered best common practice when 3PCC
   is needed in a MEDIACTRL-based framework.  It is only described in
   order to help the reader more easily understand what the requirements
   are on the MS side, and as a consequence what information might be
   required.  [RFC3725] provides a much more detailed overview on 3PCC
   patterns in several use cases.  Only an explanatory sequence diagram
   is provided, without delving into the details of the exchanged SIP
   messages.



















Amirante, et al.              Informational                    [Page 39]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   UAC(1)        UAC(2)                  AS                          MS
     |             |                     |                           |
     | INVITE (offer A)                  |                           |
     | Call-Id: A  |                     |                           |
     |---------------------------------->|                           |
     |             |          100 Trying |                           |
     |             |          Call-Id: A |                           |
     |<----------------------------------|                           |
     |             |   INVITE (no offer) |                           |
     |             |   Call-Id: B        |                           |
     |             |<--------------------|                           |
     |             | 180 Ringing         |                           |
     |             | Call-Id: B          |                           |
     |             |-------------------->|                           |
     |             |         180 Ringing |                           |
     |             |          Call-Id: A |                           |
     |<----------------------------------|                           |
     |             |                     | INVITE (offer A)          |
     |             |                     | Call-Id: C                |
     |             |                     |-------------------------->|
     |             |                     |         200 OK (offer A') |
     |             |                     |         Call-Id: C        |
     |             |                     |<--------------------------|
     |             |                     | ACK                       |
     |             |                     | Call-Id: C                |
     |             |                     |-------------------------->|
     |             | 200 OK (offer B)    |                           |
     |             | Call-Id: B          |                           |
     |             |-------------------->|                           |
     |             |                     | INVITE (offer B)          |
     |             |                     | Call-Id: D                |
     |             |                     |-------------------------->|
     |             |                     |         200 OK (offer B') |
     |             |                     |         Call-Id: D        |
     |             |                     |<--------------------------|
     |             |                     | ACK                       |
     |             |                     | Call-Id: D                |
     |             |                     |-------------------------->|
     |             |      ACK (offer B') |                           |
     |             |      Call-Id: B     |                           |











Amirante, et al.              Informational                    [Page 40]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


     |             |<--------------------|                           |
     |             |   200 OK (offer A') |                           |
     |             |   Call-Id: A        |                           |
     |<----------------------------------|                           |
     | ACK         |                     |                           |
     | Call-Id: A  |                     |                           |
     |---------------------------------->|                           |
     |             |                     |                           |
     .             .                     .                           .
     .             .                     .                           .

                  Figure 17: Phone Call: Example of 3PCC

   In this example, UAC1 wants to place a phone call to UAC2.  To do so,
   it sends an INVITE to the AS with its offer A.  The AS sends an
   offerless INVITE to UAC2.  When UAC2 responds with a 180, the same
   message is forwarded by the AS to UAC1 to notify it that the callee
   is ringing.  In the meantime, the AS also adds a leg to the MS for
   UAC1, as explained at the beginning of Section 6.  To do so, it of
   course uses the offer A that UAC1 made.  Once UAC2 accepts the call
   by providing its own offer B in the 200, the AS also adds a leg for
   offer B to the MS.  At this point, the negotiation can be completed
   by providing the two UACs with the SDP answer negotiated by the MS
   with them (A' and B', respectively).

   Of course, this is only one way to deal with the signaling and shall
   not be considered an absolutely mandatory approach.

   Once the negotiation is over, the two UACs are not in communication
   yet.  In fact, it's up to the AS now to actively trigger the MS to
   somehow attach their media streams to each other, by referring to the
   connection identifiers associated with the UACs as explained
   previously.  This document presents two different approaches that
   might be followed, according to what needs to be accomplished.  A
   generic media perspective of the phone call scenario is depicted in
   Figure 18.  The MS is basically in the media path between the
   two UACs.

   +-------+  UAC1 (RTP)        +--------+  UAC1 (RTP)        +-------+
   |  UAC  |===================>| Media  |===================>|  UAC  |
   |   1   |<===================| Server |<===================|   2   |
   +-------+        UAC2 (RTP)  +--------+        UAC2 (RTP)  +-------+

                 Figure 18: Phone Call: Media Perspective







Amirante, et al.              Informational                    [Page 41]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   From the framework point of view, when the UACs' legs are not
   attached to anything yet, what appears is shown in Figure 19: since
   there are no connections involving the UACs yet, the frames they
   might be sending are discarded, and nothing is sent to them (except
   for silence, if its transmission is requested).

                                     MS
                              +--------------+
                UAC 1         |              |         UAC 2
                  o----->>-------x        x.......>>.....o
                  o.....<<.......x        x-------<<-----o
                              |              |
                              +--------------+

             Figure 19: Phone Call: UAC Media Leg Not Attached

6.2.1.  Direct Connection

   The Direct Connection approach is the easiest, and a more
   straightforward, approach to get the phone call between the two UACs
   to work.  The idea is basically the same as that of the Direct Echo
   approach.  A <join> directive is used to directly attach one UAC to
   the other, by exploiting the MS to only deal with the transcoding/
   adaption of the flowing frames, if needed.

   This approach is depicted in Figure 20.

                                     MS
                              +--------------+
                UAC 1         |              |         UAC 2
                  o----->>-------+~~~>>~~~+------->>-----o
                  o-----<<-------+~~~<<~~~+-------<<-----o
                              |              |
                              +--------------+

                 Figure 20: Phone Call: Direct Connection















Amirante, et al.              Informational                    [Page 42]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  UAC1       UAC2         AS                                   MS
   |           |          |                                    |
   |           |          | 1. CONTROL (join UAC1 to UAC2)     |
   |           |          |++++++++++++++++++++++++++++++++++>>|
   |           |          |                                    |--+ join
   |           |          |                                    |  | UAC1
   |           |          |                          2. 200 OK |<-+ UAC2
   |           |          |<<++++++++++++++++++++++++++++++++++|
   |           |          |                                    |
   |<<#######################################################>>|
   |                UAC1 can hear UAC2 talking                 |
   |<<#######################################################>>|
   |           |          |                                    |
   |           |<<###########################################>>|
   |           |          UAC2 can hear UAC1 talking           |
   |           |<<###########################################>>|
   |           |          |                                    |
   |<*talking*>|          |                                    |
   .           .          .                                    .
   .           .          .                                    .

           Figure 21: Direct Connection: Framework Transactions

   The framework transactions needed to accomplish this scenario are
   very trivial and easy to understand.  They are basically the same as
   those presented in the Direct Echo Test scenario; the only difference
   is in the provided identifiers.  In fact, this time the MS is not
   supposed to attach the UACs' media connections to themselves but has
   to join the media connections of two different UACs, i.e., UAC1 and
   UAC2.  This means that in this transaction, id1 and i2 will have to
   address the media connections of UAC1 and UAC2.  In the case of a
   successful transaction, the MS takes care of forwarding all media
   coming from UAC1 to UAC2 and vice versa, transparently taking care of
   any required transcoding steps, if necessary.

   1. AS -> MS (CFW CONTROL)
   -------------------------
      CFW 0600855d24c8 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 130

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="10514b7f:6a900179" id2="e1e1427c:1c998d22"/>
      </mscmixer>






Amirante, et al.              Informational                    [Page 43]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   2. AS <- MS (CFW 200 OK)
   ------------------------
      CFW 0600855d24c8 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>

   Such a simple approach has its drawbacks.  For instance, with such an
   approach, recording a conversation between two users might be tricky
   to accomplish.  In fact, since no mixing would be involved, only the
   single connections (UAC1<->MS and UAC2<->MS) could be recorded.  If
   the AS wants a conversation-recording service to be provided anyway,
   it needs additional business logic on its side.  An example of such a
   use case is provided in Section 6.2.3.

6.2.2.  Conference-Based Approach

   The approach described in Section 6.2.1 surely works for a basic
   phone call but, as explained previously, might have some drawbacks
   whenever more advanced features are needed.  For instance, one can't
   record the whole conversation -- only the single connections -- since
   no mixing is involved.  Additionally, even the single task of playing
   an announcement over the conversation could be complex, especially if
   the MS does not support implicit mixing over media connections.  For
   this reason, in more advanced cases a different approach might be
   taken, like the conference-based approach described in this section.

   The idea is to use a mixing entity in the MS that acts as a bridge
   between the two UACs.  The presence of this entity allows more
   customization of what needs to be done with the conversation, like
   the recording of the conversation that has been provided as an
   example.  The approach is depicted in Figure 22.  The mixing
   functionality in the MS will be described in more detail in the
   following section (which deals with many conference-related
   scenarios), so only some hints will be provided here for basic
   comprehension of the approach.











Amirante, et al.              Informational                    [Page 44]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


                                      MS
                              +---------------+
                UAC A         |               |         UAC B
                  o----->>-------+~~>{#}::>+:::::::>>:::::o
                  o:::::<<:::::::+<::{#}<~~+-------<<-----o
                              |       :       |
                              |       :       |
                              +-------:-------+
                                      :
                                      +::::> (conversation.wav)

             Figure 22: Phone Call: Conference-Based Approach

   To identify a single sample scenario, let's consider a phone call
   that the AS wants to record.

   Figure 23 shows how this could be accomplished in the Media Control
   Channel Framework.  This example, as usual, hides the previous
   interaction between the UACs and the AS and instead focuses on the
   Control Channel operations and what follows.































Amirante, et al.              Informational                    [Page 45]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 UAC1        UAC2       AS                                 MS
  |           |         |                                  |
  |           |         | A1. CONTROL (create conference)  |
  |           |         |++++++++++++++++++++++++++++++++>>|
  |           |         |                                  |--+ create
  |           |         |                                  |  | conf and
  |           |         |      A2. 200 OK (conferenceid=Y) |<-+ its ID
  |           |         |<<++++++++++++++++++++++++++++++++|
  |           |         |                                  |
  |           |         | B1. CONTROL (record for 10800 s) |
  |           |         |++++++++++++++++++++++++++++++++>>|
  |           |         |                                  |--+ start
  |           |         |                                  |  | the
  |           |         |                       B2. 200 OK |<-+ dialog
  |           |         |<<++++++++++++++++++++++++++++++++|
  |        Recording +--|                                  |
  |       of the mix |  |                                  |
  |      has started +->|                                  |
  |           |         | C1. CONTROL (join UAC1<->confY)  |
  |           |         |++++++++++++++++++++++++++++++++>>|
  |           |         |                                  |--+  join
  |           |         |                                  |  | UAC1 &
  |           |         |                       C2. 200 OK |<-+ confY
  |           |         |<<++++++++++++++++++++++++++++++++|
  |           |         |                                  |
  |<<####################################################>>|
  |           Now UAC1 is mixed in the conference          |
  |<<####################################################>>|
  |           |         |                                  |
  |           |         | D1. CONTROL (join UAC2<->confY)  |
  |           |         |++++++++++++++++++++++++++++++++>>|
  |           |         |                                  |--+  join
  |           |         |                                  |  | UAC2 &
  |           |         |                       D2. 200 OK |<-+ confY
  |           |         |<<++++++++++++++++++++++++++++++++|
  |           |         |                                  |
  |           |<<########################################>>|
  |           |            Now UAC2 is mixed too           |
  |           |<#########################################>>|
  |           |         |                                  |
  |<*talking*>|         |                                  |
  |           |         |                                  |
  .           .         .                                  .
  .           .         .                                  .

       Figure 23: Conference-Based Approach: Framework Transactions





Amirante, et al.              Informational                    [Page 46]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The AS uses two different packages to accomplish this scenario: the
   Mixer package (to create the mixing entity and join the UACs) and the
   IVR package (to record what happens in the conference).  The
   framework transaction steps can be described as follows:

   o  First of all, the AS creates a new hidden conference by means of a
      <createconference> request (A1).  This conference is properly
      configured according to the use it is assigned to.  In fact, since
      only two participants will be joined to it, both
      'reserved-talkers' and 'reserved-listeners' are set to 2, just as
      the 'n' value for the N-best audio mixing algorithm.  The video
      layout is also set accordingly (<single-view>/<dual-view>).

   o  The MS sends notification of the successful creation of the new
      conference in a 200 framework message (A2).  The identifier
      assigned to the conference, which will be used in subsequent
      requests addressed to it, is 6013f1e.

   o  The AS requests a new recording for the newly created conference.
      To do so, it places a proper request to the IVR package (B1).  The
      AS is interested in a video recording (type=video/mpeg), which
      must not last longer than 3 hours (maxtime=10800s), after which
      the recording must end.  Additionally, no beep must be played on
      the conference (beep=false), and the recording must start
      immediately whether or not any audio activity has been reported
      (vadinitial=false is the default value for <record>).

   o  The transaction is handled by the MS, and when the dialog has been
      successfully started, a 200 OK is issued to the AS (B2).  The
      message contains the dialogid associated with the dialog
      (00b29fb), which the AS must refer to for later notifications.

   o  At this point, the AS attaches both UACs to the conference with
      two separate <join> directives (C1/D1).  When the MS confirms the
      success of both operations (C2/D2), the two UACs are actually in
      contact with each other (even though indirectly, since a hidden
      conference they're unaware of is on their path), and their media
      contribution is recorded.













Amirante, et al.              Informational                    [Page 47]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


A1. AS -> MS (CFW CONTROL, createconference)
--------------------------------------------
   CFW 238e1f2946e8 CONTROL
   Control-Package: msc-mixer
   Content-Type: application/msc-mixer+xml
   Content-Length: 395

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <createconference reserved-talkers="2" reserved-listeners="2">
         <audio-mixing type="nbest" n="2"/>
         <video-layouts>
            <video-layout min-participants='1'>
               <single-view/>
            </video-layout>
            <video-layout min-participants='2'>
               <dual-view/>
            </video-layout>
         </video-layouts>
         <video-switch>
            <controller/>
         </video-switch>
      </createconference>
   </mscmixer>


A2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 238e1f2946e8 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 151

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <response status="200" reason="Conference created"
                conferenceid="6013f1e"/>
   </mscmixer>















Amirante, et al.              Informational                    [Page 48]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


B1. AS -> MS (CFW CONTROL, record)
----------------------------------
   CFW 515f007c5bd0 CONTROL
   Control-Package: msc-ivr
   Content-Type: application/msc-ivr+xml
   Content-Length: 226

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <dialogstart conferenceid="6013f1e">
         <dialog>
            <record beep="false" type="video/mpeg" maxtime="10800s"/>
         </dialog>
      </dialogstart>
   </mscivr>


B2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 515f007c5bd0 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="00b29fb"/>
   </mscivr>


C1. AS -> MS (CFW CONTROL, join)
--------------------------------
   CFW 0216231b1f16 CONTROL
   Control-Package: msc-mixer
   Content-Type: application/msc-mixer+xml
   Content-Length: 123

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <join id1="10514b7f:6a900179" id2="6013f1e"/>
   </mscmixer>













Amirante, et al.              Informational                    [Page 49]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


C2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 0216231b1f16 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 125

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <response status="200" reason="Join successful"/>
   </mscmixer>


D1. AS -> MS (CFW CONTROL, join)
--------------------------------
   CFW 140e0f763352 CONTROL
   Control-Package: msc-mixer
   Content-Type: application/msc-mixer+xml
   Content-Length: 124

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <join id1="219782951:0b9d3347" id2="6013f1e"/>
   </mscmixer>


D2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 140e0f763352 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 125

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <response status="200" reason="Join successful"/>
   </mscmixer>

   The recording of the conversation can subsequently be accessed by the
   AS by waiting for an event notification from the MS.  This event,
   which will be associated with the previously started recording
   dialog, will contain the URI of the recorded file.  Such an event may
   be triggered by either a natural completion of the dialog (e.g., the
   dialog has reached its programmed 3 hours) or any interruption of the
   dialog itself (e.g., the AS actively requests that the recording be
   interrupted, since the call between the UACs ended).








Amirante, et al.              Informational                    [Page 50]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


6.2.3.  Recording a Conversation

   The previous section described how to take advantage of the
   conferencing functionality of the Mixer package in order to allow the
   recording of phone calls in a simple way.  However, using a dedicated
   mixer just for a phone call might be considered overkill.  This
   section shows how recording a conversation and subsequently playing
   it out can be accomplished without a mixing entity involved in the
   call, i.e., by using the Direct Connection approach as described in
   Section 6.2.1.

   As explained previously, if the AS wants to record a phone call
   between two UACs, the use of just the <join> directive without a
   mixer forces the AS to just rely on separate recording commands.
   That is, the AS can only instruct the MS to separately record the
   media flowing on each media leg: a recording for all the data coming
   from UAC1, and a different recording for all the data coming from
   UAC2.  If someone subsequently wants to access the whole
   conversation, the AS may take at least two different approaches:

   1.  It may mix the two recordings itself (e.g., by delegating it to
       an offline mixing entity) in order to obtain a single file
       containing the combination of the two recordings.  This way, a
       simple playout as described in Section 6.1.2 would suffice.

   2.  Alternatively, it may take advantage of the mixing functionality
       provided by the MS itself.  One way to do this is to create a
       hidden conference on the MS, attach the UAC as a passive
       participant to it, and play the separate recordings on the
       conference as announcements.  This way, the UAC accessing
       the recording would experience both of the recordings at the
       same time.

   The second approach is considered in this section.  The framework
   transaction as described in Figure 24 assumes that a recording has
   already been requested for both UAC1 and UAC2, that the phone call
   has ended, and that the AS has successfully received the URIs to both
   of the recordings from the MS.  Such steps are not described again,
   since they would be quite similar to the steps described in
   Section 6.1.2.  As mentioned previously, the idea is to use a
   properly constructed hidden conference to mix the two separate
   recordings on the fly and present them to the UAC.  It is, of course,
   up to the AS to subsequently unjoin the user from the conference and
   destroy the conference itself once the playout of the recordings ends
   for any reason.






Amirante, et al.              Informational                    [Page 51]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 UAC3                     AS                                 MS
  |                       |                                  |
  | (UAC1 and UAC2 have previously been recorded; the AS has |
  |  the two different recordings available for playout.)    |
  |                       |                                  |
  |                       | A1. CONTROL (create conference)  |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |--+ create
  |                       |                                  |  | conf &
  |                       |      A2. 200 OK (conferenceid=Y) |<-+ its ID
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |                       | B1. CONTROL (join UAC3 & confY)  |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |--+ join
  |                       |                                  |  | UAC &
  |                       |                       B2. 200 OK |<-+ confY
  |                       |<+++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<######################################################>>|
  |   UAC3 is now a passive participant in the conference    |
  |<<######################################################>>|
  |                       |                                  |
  |                       | C1. CONTROL (play REC1 on confY) |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       | D1. CONTROL (play REC2 on confY) |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |--+ Start
  |                       |                                  |  | both
  |                       |                                  |  | of the
  |                       |                                  |  |dialogs
  |                       |                       C2. 200 OK |<-+
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                       D2. 200 OK |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<########################################################|
  |  The two recordings are mixed and played together to UAC |
  |<<########################################################|
  |                       |                                  |
  |                       |       E1. CONTROL (<promptinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | E2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |       F1. CONTROL (<promptinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|





Amirante, et al.              Informational                    [Page 52]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |                       | F2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  .                       .                                  .
  .                       .                                  .

         Figure 24: Phone Call: Playout of a Recorded Conversation

   The diagram above assumes that a recording of both of the channels
   (UAC1 and UAC2) has already taken place.  Later, when we desire to
   play the whole conversation to a new user, UAC3, the AS may take care
   of the presented transactions.  The framework transaction steps are
   only apparently more complicated than those presented so far.  The
   only difference, in fact, is that transactions C and D are
   concurrent, since the recordings must be played together.

   o  First of all, the AS creates a new conference to act as a mixing
      entity (A1).  The settings for the conference are chosen according
      to the use case, e.g., the video layout, which is fixed to
      <dual-view>, and the switching type to <controller>.  When the
      conference has been successfully created (A2), the AS takes note
      of the conference identifier.

   o  At this point, UAC3 is attached to the conference as a passive
      user (B1).  There would be no point in letting the user contribute
      to the conference mix, since he will only need to watch a
      recording.  In order to specify his passive status, both the audio
      and video streams for the user are set to 'recvonly'.  If the
      transaction succeeds, the MS notifies the AS (B2).

   o  Once the conference has been created and UAC3 has been attached to
      it, the AS can request the playout of the recordings; in order to
      do so, it requests two concurrent <prompt> directives (C1 and D1),
      addressing the recording of UAC1 (REC1) and UAC2 (REC2),
      respectively.  Both of the prompts must be played on the
      previously created conference and not to UAC3 directly, as can be
      deduced from the 'conferenceid' attribute of the <dialog> element.

   o  The transactions "live their lives" exactly as explained for
      previous <prompt> examples.  The originating transactions are
      first prepared and started (C2, D2), and then, as soon as the
      playout ends, a related CONTROL message is triggered by the MS
      (E1, F1).  This notification may contain a <promptinfo> element
      with information about how the playout proceeded (e.g., whether
      the playout completed normally or was interrupted by a DTMF
      tone, etc.).





Amirante, et al.              Informational                    [Page 53]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 A1. AS -> MS (CFW CONTROL, createconference)
 --------------------------------------------
    CFW 506e039f65bd CONTROL
    Control-Package: msc-mixer/1.0
    Content-Type: application/msc-mixer+xml
    Content-Length: 312

    <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
       <createconference reserved-talkers="0" reserved-listeners="1">
          <audio-mixing type="controller"/>
          <video-layouts>
             <video-layout min-participants='1'>
                <dual-view/>
             </video-layout>
          </video-layouts>
          <video-switch>
             <controller/>
          </video-switch>
       </createconference>
    </mscmixer>


 A2. AS <- MS (CFW 200 OK)
 -------------------------
    CFW 506e039f65bd 200
    Timeout: 10
    Content-Type: application/msc-mixer+xml
    Content-Length: 151

    <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
       <response status="200" reason="Conference created"
                 conferenceid="2625069"/>
    </mscmixer>


 B1. AS -> MS (CFW CONTROL, join)
 --------------------------------
    CFW 09202baf0c81 CONTROL
    Control-Package: msc-mixer/1.0
    Content-Type: application/msc-mixer+xml
    Content-Length: 214

    <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
       <join id1="aafaf62d:0eac5236" id2="2625069">
          <stream media="audio" direction="recvonly"/>
          <stream media="video" direction="recvonly"/>
       </join>
    </mscmixer>



Amirante, et al.              Informational                    [Page 54]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 B2. AS <- MS (CFW 200 OK)
 -------------------------
    CFW 09202baf0c81 200
    Timeout: 10
    Content-Type: application/msc-mixer+xml
    Content-Length: 125

    <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
       <response status="200" reason="Join successful"/>
    </mscmixer>


 C1. AS -> MS (CFW CONTROL, play recording from UAC1)
 ----------------------------------------------------
    CFW 3c2a08be4562 CONTROL
    Control-Package: msc-ivr/1.0
    Content-Type: application/msc-ivr+xml
    Content-Length: 229

    <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <dialogstart conferenceid="2625069">
          <dialog>
             <prompt>
                <media
   loc="http://www.example.net/recordings/recording-4ca9fc2.mpg"/>
             </prompt>
          </dialog>
       </dialogstart>
    </mscivr>


 D1. AS -> MS (CFW CONTROL, play recording from UAC2)
 ----------------------------------------------------
    CFW 1c268d810baa CONTROL
    Control-Package: msc-ivr/1.0
    Content-Type: application/msc-ivr+xml
    Content-Length: 229

    <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <dialogstart conferenceid="2625069">
          <dialog>
             <prompt>
                <media
   loc="http://www.example.net/recordings/recording-39dfef4.mpg"/>
             </prompt>
          </dialog>
       </dialogstart>
    </mscivr>



Amirante, et al.              Informational                    [Page 55]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 C2. AS <- MS (CFW 200 OK)
 -------------------------
    CFW 1c268d810baa 200
    Timeout: 10
    Content-Type: application/msc-ivr+xml
    Content-Length: 137

    <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <response status="200" reason="Dialog started"
                 dialogid="7a457cc"/>
    </mscivr>


 D2. AS <- MS (CFW 200 OK)
 -------------------------
    CFW 3c2a08be4562 200
    Timeout: 10
    Content-Type: application/msc-ivr+xml
    Content-Length: 137

    <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <response status="200" reason="Dialog started"
                 dialogid="1a0c7cf"/>
    </mscivr>


 E1. AS <- MS (CFW CONTROL event, playout of recorded UAC1 ended)
 ----------------------------------------------------------------
    CFW 77aec0735922 CONTROL
    Control-Package: msc-ivr/1.0
    Content-Type: application/msc-ivr+xml
    Content-Length: 230

    <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <event dialogid="7a457cc">
          <dialogexit status="1" reason="Dialog successfully completed">
             <promptinfo duration="10339" termmode="completed"/>
          </dialogexit>
       </event>
    </mscivr>


 E2. AS -> MS (CFW 200, ACK to 'CONTROL event')
 ----------------------------------------------
    CFW 77aec0735922 200






Amirante, et al.              Informational                    [Page 56]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 F1. AS <- MS (CFW CONTROL event, playout of recorded UAC2 ended)
 ----------------------------------------------------------------
    CFW 62726ace1660 CONTROL
    Control-Package: msc-ivr/1.0
    Content-Type: application/msc-ivr+xml
    Content-Length: 230

    <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <event dialogid="1a0c7cf">
          <dialogexit status="1" reason="Dialog successfully completed">
             <promptinfo duration="10342" termmode="completed"/>
          </dialogexit>
       </event>
    </mscivr>


 F2. AS -> MS (CFW 200, ACK to 'CONTROL event')
 ----------------------------------------------
    CFW 62726ace1660 200

6.3.  Conferencing

   One of the most important services the MS must be able to provide is
   mixing.  This involves mixing media streams from different sources
   and delivering the resulting mix(es) to each interested party, often
   according to per-user policies, settings, and encoding.  A typical
   scenario involving mixing is, of course, media conferencing.  In such
   a scenario, the media sent by each participant is mixed, and each
   participant typically receives the overall mix, excluding its own
   contribution and encoded in the format it negotiated.  This example
   points out in a quite clear way how mixing must take care of the
   profile of each involved entity.



















Amirante, et al.              Informational                    [Page 57]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   A media perspective of such a scenario is depicted in Figure 25.

                                +-------+
                                |  UAC  |
                                |   C   |
                                +-------+
                                   " ^
                           C (RTP) " "
                                   " "
                                   " " A+B (RTP)
                                   v "
   +-------+  A (RTP)           +--------+  A+C (RTP)         +-------+
   |  UAC  |===================>| Media  |===================>|  UAC  |
   |   A   |<===================| Server |<===================|   B   |
   +-------+         B+C (RTP)  +--------+           B (RTP)  +-------+

                 Figure 25: Conference: Media Perspective

   From the framework point of view, when the UACs' legs are not
   attached to anything yet, what appears is shown in Figure 26: since
   there are no connections involving the UACs yet, the frames they
   might be sending are discarded, and nothing is sent back to them
   (except for silence, if its transmission is requested).

                                     MS
                             +----------------+
               UAC A         |                |         UAC B
                 o----->>-------x          x.......>>.....o
                 o.....<<.......x          x-------<<-----o
                             |                |
                             |                |
                             |       xx       |
                             |       |.       |
                             +-------|.-------+
                                     |.
                                     ^v
                                     ^v
                                     |.
                                     oo
                                   UAC C

               Figure 26: Conference: UAC Legs Not Attached









Amirante, et al.              Informational                    [Page 58]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The next subsections will cover several typical scenarios involving
   mixing and conferencing as a whole, specifically:

   1.  Simple Bridging scenario, which is a very basic (i.e., no
       "special effects"; just mixing involved) conference involving one
       or more participants.

   2.  Rich Conference scenario, which enriches the Simple Bridging
       scenario by adding additional features typically found in
       conferencing systems (e.g., DTMF collection for PIN-based
       conference access, private and global announcements, recordings,
       and so on).

   3.  Coaching scenario, which is a more complex scenario that involves
       per-user mixing (customers, agents, and coaches don't all get the
       same mixes).

   4.  Sidebars scenario, which adds more complexity to the previous
       conferencing scenarios by involving sidebars (i.e., separate
       conference instances that only exist within the context of a
       parent conference instance) and the custom media delivery that
       follows.

   5.  Floor Control scenario, which provides some guidance on how floor
       control could be involved in a MEDIACTRL-based media conference.

   All of the above-mentioned scenarios depend on the availability of a
   mixing entity.  Such an entity is provided in the Media Control
   Channel Framework by the conferencing package.  Besides allowing for
   the interconnection of media sources as seen in the Direct Echo Test
   section, this package enables the creation of abstract connections
   that can be joined to multiple connections.  These abstract
   connections, called conferences, mix the contribution of each
   attached connection and feed them accordingly (e.g., a connection
   with a 'sendrecv' property would be able to contribute to the mix and
   listen to it, while a connection with a 'recvonly' property would
   only be able to listen to the overall mix but not actively contribute
   to it).













Amirante, et al.              Informational                    [Page 59]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   That said, each of the above-mentioned scenarios will start more or
   less in the same way: by the creation of a conference connection (or
   more than one, as needed in some cases) to be subsequently referred
   to when it comes to mixing.  A typical framework transaction to
   create a new conference instance in the Media Control Channel
   Framework is depicted in Figure 27:

                    AS                                 MS
                    |                                  |
                    | 1. CONTROL (create conference)   |
                    |++++++++++++++++++++++++++++++++>>|
                    |                                  |--+ create
                    |                                  |  | conf and
                    |       2. 200 OK (conferenceid=Y) |<-+ its ID
                    |<<++++++++++++++++++++++++++++++++|
         map URI +--|                                  |
          X with |  |                                  |
           confY +->|                                  |
                    |                                  |
                    .                                  .
                    .                                  .

               Figure 27: Conference: Framework Transactions

   The call flow is quite straightforward and can typically be
   summarized in the following steps:

   o  The AS invokes the creation of a new conference instance by means
      of a CONTROL request (1); this request is addressed to the
      conferencing package (msc-mixer/1.0) and contains in the body the
      directive (<createconference>) with all the desired settings for
      the new conference instance.  In the example below, the mixing
      policy is to mix the five ('reserved-talkers') loudest speakers
      (nbest), while ten listeners at maximum are allowed.  Video
      settings are configured, including the mechanism used to select
      active video sources (<controller>, meaning the AS will explicitly
      instruct the MS about it) and details about the video layouts to
      make available.  In this example, the AS is instructing the MS to
      use a <single-view> layout when only one video source is active,
      to pass to a <quad-view> layout when at least two video sources
      are active, and to use a <multiple-5x1> layout whenever the number
      of sources is at least five.  Finally, the AS also subscribes to
      the "active-talkers" event, which means it wants to be informed
      (at a rate of 4 seconds) whenever an active participant is
      speaking.






Amirante, et al.              Informational                    [Page 60]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   o  The MS creates the conference instance, assigns a unique
      identifier to it (6146dd5), and completes the transaction with a
      200 response (2).

   o  At this point, the requested conference instance is active and
      ready to be used by the AS.  It is then up to the AS to integrate
      the use of this identifier in its application logic.

   1. AS -> MS (CFW CONTROL)
   -------------------------
      CFW 3032e5fb79a1 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 489

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
        <createconference reserved-talkers="5" reserved-listeners="10">
           <audio-mixing type="nbest"/>
           <video-layouts>
             <video-layout min-participants='1'>
                <single-view/>
             </video-layout>
             <video-layout min-participants='2'>
                <quad-view/>
             </video-layout>
             <video-layout min-participants='5'>
                <multiple-5x1/>
             </video-layout>
           </video-layouts>
           <video-switch>
              <controller/>
           </video-switch>
           <subscribe>
              <active-talkers-sub interval="4"/>
           </subscribe>
        </createconference>
      </mscmixer>














Amirante, et al.              Informational                    [Page 61]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   2. AS <- MS (CFW 200)
   ---------------------
      CFW 3032e5fb79a1 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 151

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Conference created"
                   conferenceid="6146dd5"/>
      </mscmixer>

6.3.1.  Simple Bridging

   As mentioned previously, the simplest way that an AS can use a
   conference instance is simple bridging.  In this scenario, the
   conference instance just acts as a bridge for all the participants
   that are attached to it.  The bridge takes care of transcoding, if
   needed (in general, different participants may use different codecs
   for their streams), echo cancellation (each participant will receive
   the overall mix, excluding its own contribution) and per-participant
   mixing (each participant may receive different mixed streams,
   according to what it needs/is allowed to send/receive).  This
   assumes, of course, that each interested participant must be somehow
   joined to the bridge in order to indirectly communicate with the
   other participants.  From the media perspective, the scenario can be
   seen as depicted in Figure 28.

                                      MS
                             +-----------------+
               UAC A         |                 |         UAC B
                 o----->>-------+~~~>{##}:::>+:::::::>>:::::o
                 o:::::<<:::::::+<:::{##}<~~~+-------<<-----o
                             |        ^:       |
                             |        |v       |
                             |        ++       |
                             |        |:       |
                             +--------|:-------+
                                      |:
                                      ^v
                                      ^v
                                      |:
                                      oo
                                    UAC C

                  Figure 28: Conference: Simple Bridging





Amirante, et al.              Informational                    [Page 62]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   In the framework, the first step is obviously to create a new
   conference instance as seen in the introductory section (Figure 27).
   Assuming that a conference instance has already been created,
   bridging participants to it is quite straightforward and can be
   accomplished as seen in the Direct Echo Test scenario.  The only
   difference here is that each participant is not directly connected to
   itself (Direct Echo) or another UAC (Direct Connection) but to the
   bridge instead.  Figure 29 shows the example of two different UACs
   joining the same conference.  The example, as usual, hides the
   previous interaction between each of the two UACs and the AS, and
   instead focuses on what the AS does in order to actually join the
   participants to the bridge so that they can interact in a conference.
   Please note also that to make the diagram more readable, two
   different identifiers (UAC1 and UAC2) are used in place of the
   identifiers previously employed to introduce the scenario (UAC A,
   B, C).

 UAC1      UAC2         AS                                   MS
  |          |          |                                    |
  |          |          | A1. CONTROL (join UAC1 and confY)  |
  |          |          |++++++++++++++++++++++++++++++++++>>|
  |          |          |                                    |--+  join
  |          |          |                                    |  | UAC1 &
  |          |          |                         A2. 200 OK |<-+ confY
  |          |          |<<++++++++++++++++++++++++++++++++++|
  |          |          |                                    |
  |<<######################################################>>|
  |            Now UAC1 is mixed in the conference           |
  |<<######################################################>>|
  |          |          |                                    |
  |          |          | B1. CONTROL (join UAC2 and confY)  |
  |          |          |++++++++++++++++++++++++++++++++++>>|
  |          |          |                                    |--+  join
  |          |          |                                    |  | UAC2 &
  |          |          |                         B2. 200 OK |<-+ confY
  |          |          |<<++++++++++++++++++++++++++++++++++|
  |          |          |                                    |
  |          |<<###########################################>>|
  |          |    Now UAC2 too is mixed in the conference    |
  |          |<<###########################################>>|
  |          |          |                                    |
  .          .          .                                    .
  .          .          .                                    .

          Figure 29: Simple Bridging: Framework Transactions (1)






Amirante, et al.              Informational                    [Page 63]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The framework transaction steps are actually quite trivial and easy
   to understand, since they're very similar to some previously
   described scenarios.  The AS joins both UAC1 (id1 in A1) and UAC2
   (id1 in B1) to the conference (id2 in both transactions).  As a
   result of these two operations, both UACs are mixed in the
   conference.  Since no <stream> is explicitly provided in any of the
   transactions, all the media from the UACs (audio/video) are attached
   to the conference (as long as the conference has been properly
   configured to support both, of course).

   A1. AS -> MS (CFW CONTROL)
   --------------------------
      CFW 434a95786df8 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 120

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="e1e1427c:1c998d22" id2="6146dd5"/>
      </mscmixer>


   A2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 434a95786df8 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>


   B1. AS -> MS (CFW CONTROL)
   --------------------------
      CFW 5c0cbd372046 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 120

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="10514b7f:6a900179" id2="6146dd5"/>
      </mscmixer>







Amirante, et al.              Informational                    [Page 64]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   B2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 5c0cbd372046 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>

   Once one or more participants have been attached to the bridge, their
   connections and how their media are handled by the bridge can be
   dynamically manipulated by means of another directive, called
   <modifyjoin>.  A typical use case for this directive is the change of
   direction of an existing media (e.g., a previously speaking
   participant is muted, which means its media direction changes from
   'sendrecv' to 'recvonly').  Figure 30 shows how a framework
   transaction requesting such a directive might appear.

 UAC1      UAC2         AS                                 MS
  |          |          |                                  |
  |          |          | 1. CONTROL (modifyjoin UAC1)     |
  |          |          |++++++++++++++++++++++++++++++++>>|
  |          |          |                                  |--+ modify
  |          |          |                                  |  | join
  |          |          |                        2. 200 OK |<-+ settings
  |          |          |<<++++++++++++++++++++++++++++++++|
  |          |          |                                  |
  |<<######################################################|
  |      Now UAC1 can receive but not send (recvonly)      |
  |<<######################################################|
  |          |          |                                  |
  .          .          .                                  .
  .          .          .                                  .

          Figure 30: Simple Bridging: Framework Transactions (2)

   The directive used to modify an existing join configuration is
   <modifyjoin>, and its syntax is exactly the same as the syntax
   required in <join> instructions.  In fact, the same syntax is used
   for identifiers (id1/id2).  Whenever a <modifyjoin> is requested and
   id1 and id2 address one or more joined connections, the AS is
   requesting a change of the join configuration.  In this case, the AS
   instructs the MS to mute (<stream> media=audio, direction=recvonly)
   UAC1 (id1=UAC1) in the conference (id2) it has been attached to
   previously.  Any other connection existing between them is left
   untouched.



Amirante, et al.              Informational                    [Page 65]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   It is worth noting that the <stream> settings are enforced according
   to both the provided direction AND the id1 and id2 identifiers.  For
   instance, in this example id1 refers to UAC1, while id2 refers to the
   conference in the MS.  This means that the required modifications
   have to be applied to the stream specified in the <stream> element of
   the message, along the direction that goes from 'id1' to 'id2' (as
   specified in the <modifyjoin> element of the message).  In the
   provided example, the AS wants to mute UAC1 with respect to the
   conference.  To do so, the direction is set to 'recvonly', meaning
   that, for what affects id1, the media stream is only to be received.
   If id1 referred to the conference and id2 to UAC1, to achieve the
   same result the direction would have to be set to 'sendonly', meaning
   "id1 (the conference) can only send to id2 (UAC1), and no media
   stream must be received".  Additional settings for a <stream> (e.g.,
   audio volume, region assignments, and so on) follow the same
   approach, as discussed in subsequent sections.

   1. AS -> MS (CFW CONTROL)
   -------------------------
      CFW 57f2195875c9 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 182

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <modifyjoin id1="e1e1427c:1c998d22" id2="6146dd5">
            <stream media="audio" direction="recvonly"/>
         </modifyjoin>
      </mscmixer>


   2. AS <- MS (CFW 200 OK)
   ------------------------
      CFW 57f2195875c9 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 123

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join modified"/>
      </mscmixer>

6.3.2.  Rich Conference Scenario

   The previous scenario can be enriched with additional features often
   found in existing conferencing systems.  Typical examples include
   IVR-based menus (e.g., the DTMF collection for PIN-based conference
   access), partial and complete recordings in the conference (e.g., for



Amirante, et al.              Informational                    [Page 66]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   the "state your name" functionality and recording of the whole
   conference), private and global announcements, and so on.  All of
   this can be achieved by means of the functionality provided by the
   MS.  In fact, even if the conferencing and IVR features come from
   different packages, the AS can interact with both of them and achieve
   complex results by correlating the effects of different transactions
   in its application logic.

   From the media and framework perspective, a typical Rich Conference
   scenario can be seen as depicted in Figure 31.

                                      MS
                                       +-------- (announcement.wav)
     (conference_recording.wav) <:::::+|
                                      :|
                             +--------:|--------+
               UAC A         |        :v        |         UAC B
                 o----->>-------+~~~>{##}:::>+:::::::>>:::::o
                 o:::::<<:::::::+<:::{##}<~~~+-------<<-----o
                             |        ^:     |  |
                             |        |v     v  |
                             |        ++     * (collect DTMF, get name)
                             |        |:        |
                             +--------|:--------+
                                      |:
                                      ^v
                                      ^v
                                      |:
                                      oo
                                    UAC C

              Figure 31: Conference: Rich Conference Scenario

   To identify a single sample scenario, let's consider this sequence
   for a participant joining a conference (which again we assume has
   already been created):

   1.  The UAC as usual INVITEs a URI associated with a conference, and
       the AS follows the previously explained procedure to have the UAC
       negotiate a new media session with the MS.

   2.  The UAC is presented with an IVR menu, in which it is requested
       to input a PIN code to access the conference.

   3.  If the PIN is correct, the UAC is asked to state its name so that
       it can be recorded.





Amirante, et al.              Informational                    [Page 67]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   4.  The UAC is attached to the conference, and the previously
       recorded name is announced globally to the conference to
       advertise its arrival.

   Figure 32 shows a single UAC joining a conference.  The example, as
   usual, hides the previous interaction between the UAC and the AS, and
   instead focuses on what the AS does to actually interact with the
   participant and join it to the conference bridge.

 UAC                      AS                                 MS
  |                       |                                  |
  |                       | A1. CONTROL (request DTMF PIN)   |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |--+ start
  |                       |                                  |  | the
  |                       |                       A2. 200 OK |<-+ dialog
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<########################################################|
  |   "Please input the PIN number to join the conference"   |
  |<<########################################################|
  |                       |                                  |
  |########################################################>>|
  |                   DTMF digits are collected              |--+ get
  |########################################################>>|  | DTMF
  |                       |                                  |<-+ digits
  |                       |      B1. CONTROL (<collectinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |       Compare DTMF +--| B2. 200 OK                       |
  |        digits with |  |++++++++++++++++++++++++++++++++>>|
  |     the PIN number +->|                                  |
  |                       | C1. CONTROL (record name)        |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |--+ start
  |                       |                                  |  | the
  |                       |                       C2. 200 OK |<-+ dialog
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<########################################################|
  |          "Please state your name after the beep"         |
  |<<########################################################|
  |                       |                                  |
  |########################################################>>|
  |  Audio from the UAC is recorded (until timeout or DTMF)  |--+ save
  |########################################################>>|  | in a
  |                       |                                  |<-+ file
  |                       |       D1. CONTROL (<recordinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|



Amirante, et al.              Informational                    [Page 68]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |     Store recorded +--| D2. 200 OK                       |
  |       file to play |  |++++++++++++++++++++++++++++++++>>|
  |    announcement in +->|                                  |
  |   conference later    |                                  |
  |                       | E1. CONTROL (join UAC & confY)   |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |--+ join
  |                       |                                  |  | UAC &
  |                       |                       E2. 200 OK |<-+ confY
  |                       |<+++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<######################################################>>|
  |     UAC is now included in the mix of the conference     |
  |<<######################################################>>|
  |                       |                                  |
  |                       | F1. CONTROL (play name on confY) |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |--+ start
  |                       |                                  |  | the
  |                       |                       F2. 200 OK |<-+ dialog
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<########################################################|
  |  Global announcement: "Simon has joined the conference"  |
  |<<########################################################|
  |                       |                                  |
  |                       |       G1. CONTROL (<promptinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | G2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  .                       .                                  .
  .                       .                                  .

        Figure 32: Rich Conference Scenario: Framework Transactions

   As can be deduced from the sequence diagram above, the AS, in its
   business logic, correlates the results of different transactions,
   addressed to different packages, to implement a conferencing scenario
   more complex than the Simple Bridging scenario previously described.
   The framework transaction steps are as follows:

   o  Since this is a private conference, the UAC is to be presented
      with a request for a password, in this case a PIN number.  To do
      so, the AS instructs the MS (A1) to collect a series of DTMF
      digits from the specified UAC (connectionid=UAC).  The request
      includes both a voice message (<prompt>) and the described digit
      collection context (<collect>).  The PIN is assumed to be a



Amirante, et al.              Informational                    [Page 69]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


      4-digit number, and so the MS has to collect 4 digits maximum
      (maxdigits=4).  The DTMF digit buffer must be cleared before
      collecting (cleardigitbuffer=true), and the UAC can use the star
      key to restart the collection (escapekey=*), e.g., if the UAC is
      aware that he mistyped any of the digits and wants to start again.

   o  The transaction goes on as usual (A2), with the transaction being
      handled and notification of the dialog start being sent in a 200
      OK.  After that, the UAC is actually presented with the voice
      message and is subsequently requested to input the required PIN
      number.

   o  We assume that the UAC typed the correct PIN number (1234), which
      is reported by the MS to the AS by means of the usual MS-generated
      CONTROL event (B1).  The AS correlates this event to the
      previously started dialog by checking the referenced dialogid
      (06d1bac) and acks the event (B2).  It then extracts the
      information it needs from the event (in this case, the digits
      provided by the MS) from the <controlinfo> container (dtmf=1234)
      and verifies that it is correct.

   o  Since the PIN is correct, the AS can proceed to the next step,
      i.e., asking the UAC to state his name, in order to subsequently
      play the recording on the conference to report the new
      participant.  Again, this is done with a request to the IVR
      package (C1).  The AS instructs the MS to play a voice message
      ("state your name after the beep"), to be followed by a recording
      of only the audio from the UAC (in stream, media=audio/sendonly,
      while media=video/inactive).  A beep must be played right before
      the recording starts (beep=true), and the recording must only last
      3 seconds (maxtime=3s), since it is only needed as a brief
      announcement.

   o  Without delving again into the details of a recording-related
      transaction (C2), the AS finally gets the URI of the requested
      recording (D1, acked in D2).

   o  At this point, the AS attaches the UAC (id1) to the conference
      (id2), just as explained for the Simple Bridging scenario (E1/E2).

   o  Finally, to notify the other participants that a new participant
      has arrived, the AS requests a global announcement on the
      conference.  This is a simple <prompt> request to the IVR package
      (F1), as explained in previous sections (e.g., Section 6.1.2,
      among others), but with a slight difference: the target of the
      prompt is not a connectionid (a media connection) but the
      conference itself (conferenceid=6146dd5).  As a result of this
      transaction, the announcement would be played on all the media



Amirante, et al.              Informational                    [Page 70]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


      connections attached to the conference that are allowed to receive
      media from it.  The AS specifically requests that two media files
      be played:

      1.  the media file containing the recorded name of the new user as
          retrieved in D1 ("Simon...").

      2.  a pre-recorded media file explaining what happened ("... has
          joined the conference").

      The transaction then follows its usual flow (F2), and the event
      that sends notification regarding the end of the announcement (G1,
      acked in G2) concludes the scenario.

A1. AS -> MS (CFW CONTROL, collect)
-----------------------------------
   CFW 50e56b8d65f9 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 311

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <dialogstart connectionid="10514b7f:6a900179">
        <dialog>
          <prompt>
              <media
           loc="http://www.example.net/prompts/conf-getpin.wav"
           type="audio/x-wav"/>
          </prompt>
          <collect maxdigits="4" escapekey="*" cleardigitbuffer="true"/>
        </dialog>
     </dialogstart>
   </mscivr>


A2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 50e56b8d65f9 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="06d1bac"/>
   </mscivr>






Amirante, et al.              Informational                    [Page 71]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


B1. AS <- MS (CFW CONTROL event)
--------------------------------
   CFW 166d68a76659 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 272

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <event dialogid="06d1bac">
         <dialogexit status="1" reason="Dialog successfully completed">
            <promptinfo duration="2312" termmode="completed"/>
            <collectinfo dtmf="1234" termmode="match"/>
         </dialogexit>
      </event>
   </mscivr>


B2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 166d68a76659 200


C1. AS -> MS (CFW CONTROL, record)
----------------------------------
   CFW 61fd484f196e CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 373

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <dialogstart connectionid="10514b7f:6a900179">
         <dialog>
            <prompt>
               <media
         loc="http://www.example.net/prompts/conf-rec-name.wav"
         type="audio/x-wav"/>
            </prompt>
            <record beep="true" maxtime="3s"/>
         </dialog>
         <stream media="audio" direction="sendonly"/>
         <stream media="video" direction="inactive"/>
      </dialogstart>
   </mscivr>








Amirante, et al.              Informational                    [Page 72]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


C2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 61fd484f196e 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="1cf0549"/>
   </mscivr>


D1. AS <- MS (CFW CONTROL event)
--------------------------------
   CFW 3ec13ab96224 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 402

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <event dialogid="1cf0549">
       <dialogexit status="1" reason="Dialog successfully completed">
         <promptinfo duration="4988" termmode="completed"/>
         <recordinfo duration="3000" termmode="maxtime">
           <mediainfo
  loc="http://www.example.net/recordings/recording-1cf0549.wav"
  type="audio/x-wav" size="48044"/>
         </recordinfo>
       </dialogexit>
     </event>
   </mscivr>


D2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 3ec13ab96224 200


E1. AS -> MS (CFW CONTROL, join)
--------------------------------
   CFW 261d188b63b7 CONTROL
   Control-Package: msc-mixer/1.0
   Content-Type: application/msc-mixer+xml
   Content-Length: 120

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <join id1="10514b7f:6a900179" id2="6146dd5"/>
   </mscmixer>



Amirante, et al.              Informational                    [Page 73]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


E2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 261d188b63b7 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 125

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
      <response status="200" reason="Join successful"/>
   </mscmixer>


F1. AS -> MS (CFW CONTROL, play)
--------------------------------
   CFW 718c30836f38 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 334

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <dialogstart conferenceid="6146dd5">
       <dialog>
         <prompt>
           <media
  loc="http://www.example.net/recordings/recording-1cf0549.wav"
  type="audio/x-wav"/>
               <media
  loc="http://www.example.net/prompts/conf-hasjoin.wav"
  type="audio/x-wav"/>
         </prompt>
       </dialog>
     </dialogstart>
   </mscivr>


F2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 718c30836f38 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="5f4bc7e"/>
   </mscivr>






Amirante, et al.              Informational                    [Page 74]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


G1. AS <- MS (CFW CONTROL event)
--------------------------------
   CFW 6485194f622f CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 229

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <event dialogid="5f4bc7e">
         <dialogexit status="1" reason="Dialog successfully completed">
            <promptinfo duration="1838" termmode="completed"/>
         </dialogexit>
      </event>
   </mscivr>


G2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 6485194f622f 200

6.3.3.  Coaching Scenario

   Another typical conference-based use case is the so-called Coaching
   scenario.  In such a scenario, a customer (called "A" in the
   following example) places a call to a business call center.  An agent
   (B) is assigned to the customer.  A coach (C), who cannot be heard by
   the customer, provides the agent with whispered suggestions about
   what to say.  This scenario is also described in [RFC4597].

   As can be deduced from the scenario description, per-user policies
   for media mixing and delivery, i.e., who can hear what, are very
   important.  The MS must make sure that only the agent can hear the
   coach's suggestions.  Since this is basically a multiparty call
   (despite what the customer might be thinking), a mixing entity is
   needed in order to accomplish the scenario requirements.  To
   summarize:

   o  The customer (A) must only hear what the agent (B) says.

   o  The agent (B) must be able to hear both A and the coach (C).

   o  C must be able to hear both A and B in order to give B the right
      suggestions and also be aware of the whole conversation.








Amirante, et al.              Informational                    [Page 75]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   From the media and framework perspective, such a scenario can be seen
   as depicted in Figure 33.

    **************              +-------+
    * A=Customer *              |  UAC  |
    * B=Agent    *              |   C   |
    * C=Coach    *              +-------+
    **************                 " ^
                           C (RTP) " "
                                   " "
                                   " " A+B (RTP)
                                   v "
   +-------+  A (RTP)           +--------+  A+C (RTP)         +-------+
   |  UAC  |===================>| Media  |===================>|  UAC  |
   |   A   |<===================| Server |<===================|   B   |
   +-------+           B (RTP)  +--------+           B (RTP)  +-------+

              Figure 33: Coaching Scenario: Media Perspective

   From the framework point of view, when the previously mentioned legs
   are not attached to anything yet, what appears is shown in Figure 34.

                                    MS
                      +---------------------------+
                      |                           |
        UAC A         |                           |         UAC B
          o.....<<.......x                     x-------<<-----o
          o----->>-------x                     x.......>>.....o
                      |                           |
                      |                           |
                      |                           |
                      |                           |
                      |            xx             |
                      |            .|             +
                      +------------v^-------------+
                                   v^
                                   .|
                                   .|
                                   oo
                                  UAC C

            Figure 34: Coaching Scenario: UAC Legs Not Attached

   By contrast, what the scenario should look like is depicted in
   Figure 35.  The customer receives media directly from the agent
   ('recvonly'), while all of the three involved participants contribute
   to a hidden conference.  Of course, the customer is not allowed to




Amirante, et al.              Informational                    [Page 76]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   receive the mixed flows from the conference ('sendonly'), unlike the
   agent and the coach, who must both be aware of the whole conversation
   ('sendrecv').

                                    MS
                      +---------------------------+
                      |                           |
        UAC A         |                           |         UAC B
          o-----<<-------+----<<----+----<<----+-------<<-----o
          o----->>-------+          |          +------->>-----o
                      |  |          v          ^  |
                      |  +~~~~~~~>[##]::::>::::+  |
                      |            v^             |
                      |            ||             |
                      |            ++             |
                      |            :|             +
                      +------------v^-------------+
                                   v^
                                   :|
                                   :|
                                   oo
                                  UAC C

         Figure 35: Coaching Scenario: UAC Legs Mixed and Attached

   In the framework, this can be achieved by means of the Mixer Control
   Package, which, as demonstrated in the previous conferencing
   examples, can be exploited whenever mixing and joining entities are
   needed.  The needed steps can be summarized in the following list:

   1.  First of all, a hidden conference is created.

   2.  Then, the three participants are all attached to it, each with a
       custom mixing policy, specifically:

       *  the customer (A) as 'sendonly'.

       *  the agent (B) as 'sendrecv'.

       *  the coach (C) as 'sendrecv' and with a gain of -3 dB to halve
          the volume of its own contribution (so that the agent actually
          hears the customer at a louder volume and hears the coach
          whispering).

   3.  Finally, the customer is joined to the agent as a passive
       receiver ('recvonly').





Amirante, et al.              Informational                    [Page 77]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   A diagram of such a sequence of transactions is depicted in
   Figure 36:

  A      B      C       AS                                 MS
  |      |      |       |                                  |
  |      |      |       | A1. CONTROL (create conference)  |
  |      |      |       |++++++++++++++++++++++++++++++++>>|
  |      |      |       |                                  |--+ create
  |      |      |       |                                  |  | conf and
  |      |      |       |      A2. 200 OK (conferenceid=Y) |<-+ its ID
  |      |      |       |<<++++++++++++++++++++++++++++++++|
  |      |      |       |                                  |
  |      |      |       | B1. CONTROL (join A-->confY)     |
  |      |      |       |++++++++++++++++++++++++++++++++>>|
  |      |      |       |                                  |--+ join A
  |      |      |       |                                  |  | & confY
  |      |      |       |                       B2. 200 OK |<-+ sendonly
  |      |      |       |<<++++++++++++++++++++++++++++++++|
  |      |      |       |                                  |
  |######################################################>>|
  |   Customer (A) is mixed (sendonly) in the conference   |
  |######################################################>>|
  |      |      |       |                                  |
  |      |      |       | C1. CONTROL (join B<->confY)     |
  |      |      |       |++++++++++++++++++++++++++++++++>>|
  |      |      |       |                                  |--+ join B
  |      |      |       |                                  |  | & confY
  |      |      |       |                       C2. 200 OK |<-+ sendrecv
  |      |      |       |<<++++++++++++++++++++++++++++++++|
  |      |      |       |                                  |
  |      |<<#############################################>>|
  |      | Agent (B) is mixed (sendrecv) in the conference |
  |      |<##############################################>>|
  |      |      |       |                                  |
  |      |      |       | D1. CONTROL (join C<->confY)     |
  |      |      |       |++++++++++++++++++++++++++++++++>>|
  |      |      |       |                                  |--+ join C
  |      |      |       |                                  |  | & confY
  |      |      |       |                       D2. 200 OK |<-+ sendrecv
  |      |      |       |<<++++++++++++++++++++++++++++++++|
  |      |      |       |                                  |
  |      |      |<<######################################>>|
  |      |      |  Coach (C) is mixed (sendrecv) as well   |
  |      |      |<<######################################>>|
  |      |      |       |                                  |






Amirante, et al.              Informational                    [Page 78]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |      |      |       | E1. CONTROL (join A<--B)         |
  |      |      |       |++++++++++++++++++++++++++++++++>>|
  |      |      |       |                                  |--+ join
  |      |      |       |                                  |  | A & B
  |      |      |       |                       E2. 200 OK |<-+ recvonly
  |      |      |       |<<++++++++++++++++++++++++++++++++|
  |      |      |       |                                  |
  |<<######################################################|
  | Finally, Customer (A) is joined (recvonly) to Agent (B)|
  |<<######################################################|
  |      |      |       |                                  |
  .      .      .       .                                  .
  .      .      .       .                                  .

           Figure 36: Coaching Scenario: Framework Transactions

   o  First of all, the AS creates a new hidden conference by means of a
      <createconference> request (A1).  This conference is properly
      configured according to the use it is assigned to, i.e., to mix
      all the involved parties accordingly.  Since only three
      participants will be joined to it, 'reserved-talkers' is set to 3.
      'reserved-listeners', on the other hand, is set to 2, since only
      the agent and the coach must receive a mix, while the customer
      must be unaware of the coach.  Finally, the video layout is set to
      <dual-view> for the same reason, since only the customer and the
      agent must appear in the mix.

   o  The MS sends notification of the successful creation of the new
      conference in a 200 framework message (A2).  The identifier
      assigned to the conference, which will be used in subsequent
      requests addressed to it, is 1df080e.

   o  Now that the conference has been created, the AS joins the three
      actors to it with different policies, namely (i) the customer (A)
      is joined as 'sendonly' to the conference (B1), (ii) the agent (B)
      is joined as 'sendrecv' to the conference (C1), and (iii) the
      coach (C) is joined as 'sendrecv' (but audio only) to the
      conference and with a lower volume (D1).  The custom policies are
      enforced by means of properly constructed <stream> elements.

   o  The MS takes care of the requests and acks them (B2, C2, D2).  At
      this point, the conference will receive media from all the actors
      but only provide the agent and the coach with the resulting mix.








Amirante, et al.              Informational                    [Page 79]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   o  To complete the scenario, the AS joins A with B directly as
      'recvonly' (E1).  The aim of this request is to provide A with
      media too, namely the media contributed by B.  This way, A is
      unaware of the fact that its media are accessed by C by means of
      the hidden mixer.

   o  The MS takes care of this request too and acks it (E2), concluding
      the scenario.

   A1. AS -> MS (CFW CONTROL, createconference)
   --------------------------------------------
      CFW 238e1f2946e8 CONTROL
      Control-Package: msc-mixer
      Content-Type: application/msc-mixer+xml
      Content-Length: 329

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <createconference reserved-talkers="3" reserved-listeners="2">
            <audio-mixing type="nbest"/>
            <video-layouts>
               <video-layout min-participants='1'>
                  <dual-view/>
               </video-layout>
            </video-layouts>
            <video-switch>
               <controller/>
            </video-switch>
         </createconference>
      </mscmixer>


   A2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 238e1f2946e8 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 151

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Conference created"
                   conferenceid="1df080e"/>
      </mscmixer>









Amirante, et al.              Informational                    [Page 80]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   B1. AS -> MS (CFW CONTROL, join)
   --------------------------------
      CFW 2eb141f241b7 CONTROL
      Control-Package: msc-mixer
      Content-Type: application/msc-mixer+xml
      Content-Length: 226

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="10514b7f:6a900179" id2="1df080e">
            <stream media="audio" direction="sendonly"/>
            <stream media="video" direction="sendonly"/>
         </join>
      </mscmixer>


   B2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 2eb141f241b7 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>


   C1. AS -> MS (CFW CONTROL, join)
   --------------------------------
      CFW 515f007c5bd0 CONTROL
      Control-Package: msc-mixer
      Content-Type: application/msc-mixer+xml
      Content-Length: 122

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="756471213:c52ebf1b" id2="1df080e"/>
      </mscmixer>














Amirante, et al.              Informational                    [Page 81]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   C2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 515f007c5bd0 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>


   D1. AS -> MS (CFW CONTROL, join)
   --------------------------------
      CFW 0216231b1f16 CONTROL
      Control-Package: msc-mixer
      Content-Type: application/msc-mixer+xml
      Content-Length: 221

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="z9hG4bK19461552:1353807a" id2="1df080e">
            <stream media="audio">
               <volume controltype="setgain" value="-3"/>
            </stream>
         </join>
      </mscmixer>


   D2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 0216231b1f16 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>













Amirante, et al.              Informational                    [Page 82]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   E1. AS -> MS (CFW CONTROL, join)
   --------------------------------
      CFW 140e0f763352 CONTROL
      Control-Package: msc-mixer
      Content-Type: application/msc-mixer+xml
      Content-Length: 236

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="10514b7f:6a900179" id2="756471213:c52ebf1b">
            <stream media="audio" direction="recvonly"/>
            <stream media="video" direction="recvonly"/>
         </join>
      </mscmixer>


   E2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 140e0f763352 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>

6.3.4.  Sidebars

   Within the context of conferencing, there could be a need for
   so-called sidebars, or side conferences.  This would be the case, for
   instance, if two or more participants of a conference were willing to
   create a side conference among each other while still receiving part
   of the original conference mix in the background.  Motivations for
   such a use case can be found in both [RFC4597] and [RFC5239].  It is
   clear that in such a case the side conference is actually a separate
   conference but must also somehow be related to the original
   conference.  Although the application-level relationship is out of
   scope for this document (this "belongs" to Centralized Conferencing
   (XCON)), the media stream relationship is more relevant here, because
   there is a stronger relationship at the media level from the
   MEDIACTRL point of view.  Consequently, it is interesting to analyze
   how sidebars could be used to construct the conference mixes
   according to the MEDIACTRL specification.

   The scenario presented in this section is a conference hosting four
   different participants: A, B, C, and D.  All these participants are
   attached to the conference as active senders and receivers of the
   existing media streams.  At a certain point in time, two participants



Amirante, et al.              Informational                    [Page 83]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   (B and D) decide to create a sidebar just for them.  The sidebar they
   want to create is constructed so that only audio is involved.  The
   audio mix of the sidebar must not be made available to the main
   conference.  The mix of the conference must be attached to the
   sidebar, but with a lower volume (30%), because it is just background
   to the actual conversation.  This would allow both B and D to talk to
   each other without A and C listening to them, while B and D could
   still have an overview of what's happening in the main conference.

   From the media and framework perspective, such a scenario can be seen
   as depicted in Figure 37.

                                 +-------+
                                 |  UAC  |
                                 |   C   |
                                 +-------+
                                    " ^
                            C (RTP) " "
                                    " "
                                    " " A (RTP)
                                    v "
    +-------+  A (RTP)           +--------+  D+[a+c] (RTP)     +-------+
    |  UAC  |===================>| Media  |===================>|  UAC  |
    |   A   |<===================| Server |<===================|   B   |
    +-------+           C (RTP)  +--------+           B (RTP)  +-------+
                                    ^ "
                                    " " B+[a+c] (RTP)
                                    " "
                            D (RTP) " "
                                    " v
                                 +-------+
                                 |  UAC  |
                                 |   D   |
                                 +-------+

                  Figure 37: Sidebars: Media Perspective















Amirante, et al.              Informational                    [Page 84]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   From the framework point of view, when all the participants are
   attached to the main conference, what appears is shown in Figure 38.

                                    UAC C
                                      oo
                                      :|
                                      ^v
                                      ^v
                                      :|
                             +--------:|-------+
                             |        :|       |
                             |        ++       |
               UAC A         |        ^|       |         UAC B
                 o----->>-------+~~~>{##}:::>+:::::::>>:::::o
                 o:::::<<:::::::+<:::{##}<~~~+-------<<-----o
                             |        ^:       |
                             |        |v       |
                             |        ++       |
                             |        |:       |
                             +--------|:-------+
                                      |:
                                      ^v
                                      ^v
                                      |:
                                      oo
                                    UAC D

             Figure 38: Sidebars: UAC Legs in Main Conference

   By contrast, what the scenario should look like is depicted in
   Figure 39.  A new mixer is created to host the sidebar.  The main mix
   is then attached as 'sendonly' to the sidebar mix at a lower volume
   (in order to provide the sidebar users with a background of the main
   conference).  The two interested participants (B and D) have their
   audio leg detached from the main conference and attached to the
   sidebar.  This detachment can be achieved by either actually
   detaching the leg or just modifying the status of the leg to
   'inactive'.  Note that this only affects the audio stream: the video
   of the two users is still attached to the main conference, and what
   happens at the application level may or may not have been changed
   accordingly (e.g., XCON protocol interactions).

   Please note that the main conference is assumed to be in place and
   the involved participants (A, B, C, and D) attached ('sendrecv')
   to it.






Amirante, et al.              Informational                    [Page 85]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


                                 UAC C
                                   oo
                                   :|
                                   ^v
                                   ^v
                                   :|
                          +--------:|----------------+
                          |        :|                |
                          |        ++                |
            UAC A         |        ^|                |          UAC B
              o----->>-------+~~~>{##}:::>{##}:::>+:::::::>>:::::o
              o:::::<<:::::::+<:::{##}    {##}<~~~+-------<<-----o
                          |                ^:        |
                          |                ++        |
                          |                |v        |
                          +----------------|:--------+
                                           |:
                                           ^v
                                           ^v
                                           |:
                                           oo
                                          UAC D

             Figure 39: Sidebars: UAC Legs Mixed and Attached

   The situation may subsequently be reverted (e.g., destroying the
   sidebar conference and reattaching B and D to the main conference
   mix) in the same way.  The AS would just need to unjoin B and D from
   the hidden conference and change their connection with the main
   conference back to 'sendrecv'.  After unjoining the main mix and the
   sidebar mix, the sidebar conference could then be destroyed.  For
   brevity, and because similar transactions have already been
   presented, these steps are not described here.

   In the framework, just as in the previous section, the presented
   scenario can again be achieved by means of the Mixer Control Package.
   The needed steps can be summarized in the following list:

   1.  First of all, a hidden conference is created (the sidebar mix).

   2.  Then, the main conference mix is attached to it as 'sendonly' and
       with a gain of -5 dB to limit the volume of its own contribution
       to 30% (so that B and D can hear each other at a louder volume
       while still listening to what's happening in the main conference
       in the background).






Amirante, et al.              Informational                    [Page 86]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   3.  B and D are detached from the main mix for audio (<modifyjoin>
       with 'inactive' status).

   4.  B and D are attached to the hidden sidebar mix for audio.

   Note that for detaching B and D from the main mix, a <modifyjoin>
   with an 'inactive' status is used, instead of an <unjoin>.  The
   motivation for this is related to how a subsequent rejoining of B and
   D to the main mix could take place.  In fact, by using <modifyjoin>
   the resources created when first joining B and D to the main mix
   remain in place, even if marked as unused at the moment.  An
   <unjoin>, on the other hand, would actually free those resources,
   which in turn could be granted to other participants joining the
   conference in the meantime.  This means that when needing to reattach
   B and D to the main mix, the MS may not have the resources to do so,
   resulting in an undesired failure.

   A diagram of such a sequence of transactions (where confX is the
   identifier of the pre-existing main conference mix) is depicted in
   Figure 40:

  B         D         AS                                 MS
  |         |         |                                  |
  |         |         | A1. CONTROL (create conference)  |
  |         |         |++++++++++++++++++++++++++++++++>>|
  |         |         |                                  |--+ create
  |         |         |                                  |  | conf and
  |         |         |      A2. 200 OK (conferenceid=Y) |<-+ its ID
  |         |         |<<++++++++++++++++++++++++++++++++|
  |         |         |                                  |
  |         |         | B1. CONTROL (join confX-->confY) |
  |         |         |++++++++++++++++++++++++++++++++>>|
  |         |         |                                  |--+ join confX
  |         |         |                                  |  | & confY
  |         |         |                       B2. 200 OK |<-+ sendonly
  |         |         |<<++++++++++++++++++++++++++++++++|    (30% vol)
  |         |         |                                  |
  |         |         | C1. CONTROL (modjoin B---confX)  |
  |         |         |++++++++++++++++++++++++++++++++>>|
  |         |         |                                  |--+ modjoin B
  |         |         |                                  |  | & confX
  |         |         |                       C2. 200 OK |<-+ (inactive)
  |         |         |<<++++++++++++++++++++++++++++++++|
  |         |         |                                  |







Amirante, et al.              Informational                    [Page 87]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |         |         | D1. CONTROL (join B<-->confY)    |
  |         |         |++++++++++++++++++++++++++++++++>>|
  |         |         |                                  |--+ join B
  |         |         |                                  |  | & confY
  |         |         |                       D2. 200 OK |<-+ sendrecv
  |         |         |<<++++++++++++++++++++++++++++++++|    (audio)
  |         |         |                                  |
  |<<##################################################>>|
  |   Participant B is mixed (sendrecv) in the sidebar   |
  |     (A, C, and D can't listen to her/him anymore)    |
  |<<##################################################>>|
  |         |         |                                  |
  |         |         | E1. CONTROL (modjoin D---confX)  |
  |         |         |++++++++++++++++++++++++++++++++>>|
  |         |         |                                  |--+ modjoin D
  |         |         |                                  |  | & confX
  |         |         |                       E2. 200 OK |<-+ (inactive)
  |         |         |<<++++++++++++++++++++++++++++++++|
  |         |         |                                  |
  |         |         | F1. CONTROL (join D<-->confY)    |
  |         |         |++++++++++++++++++++++++++++++++>>|
  |         |         |                                  |--+ join D
  |         |         |                                  |  | & confY
  |         |         |                       F2. 200 OK |<-+ sendrecv
  |         |         |<<++++++++++++++++++++++++++++++++|    (audio)
  |         |         |                                  |
  |         |<<########################################>>|
  |         |  D is mixed (sendrecv) in the sidebar too  |
  |         |  (A and C can't listen to her/him anymore) |
  |         |<<########################################>>|
  |         |                                            |
  .         .                                            .
  .         .                                            .

                Figure 40: Sidebars: Framework Transactions

   o  First of all, the hidden conference mix is created (A1).  The
      request is basically the same as that presented in previous
      sections, i.e., a <createconference> request addressed to the
      Mixer package.  The request is very lightweight and asks the MS to
      only reserve two listener seats ('reserved-listeners', since only
      B and D have to hear something) and three talker seats
      ('reserved-listeners', because in addition to B and D the main mix
      is also an active contributor to the sidebar).  The mixing will be
      driven by directives from the AS (mix-type=controller).  When the
      mix is successfully created, the MS provides the AS with its
      identifier (519c1b9).




Amirante, et al.              Informational                    [Page 88]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   o  As a first transaction after that, the AS joins the audio from the
      main conference and the newly created sidebar conference mix (B1).
      Only audio needs to be joined (media=audio), with a 'sendonly'
      direction (i.e., only flowing from the main conference to the
      sidebar and not vice versa) and at 30% volume with respect to the
      original stream (setgain=-5 dB).  A successful completion of the
      transaction is reported to the AS (B2).

   o  At this point, the AS makes the connection of B (2133178233:
      18294826) and the main conference (2f5ad43) inactive by means of a
      <modifyjoin> directive (C1).  The request is taken care of by the
      MS (C2), and B is actually excluded from the mix for sending as
      well as receiving.

   o  After that, the AS (D1) joins B (2133178233:18294826) to the
      sidebar mix created previously (519c1b9).  The MS attaches the
      requested connections and sends confirmation to the AS (D2).

   o  The same transactions already done for B are done for D as well
      (id1=1264755310:2beeae5b), i.e., the <modifyjoin> to make the
      connection in the main conference inactive (E1-2) and the <join>
      to attach D to the sidebar mix (F1-2).  At the end of these
      transactions, A and C will only listen to each other, while B and
      D will listen to each other and to the conference mix as a
      comfortable background.

   A1. AS -> MS (CFW CONTROL, createconference)
   --------------------------------------------
      CFW 7fdcc2331bef CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 198

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <createconference reserved-talkers="3" reserved-listeners="2">
            <audio-mixing type="controller"/>
         </createconference>
      </mscmixer>













Amirante, et al.              Informational                    [Page 89]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   A2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 7fdcc2331bef 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 151

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Conference created"
                   conferenceid="519c1b9"/>
      </mscmixer>


   B1. AS -> MS (CFW CONTROL, join with setgain)
   ---------------------------------------------
      CFW 4e6afb6625e4 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 226

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="2f5ad43" id2="519c1b9">
            <stream media="audio" direction="sendonly">
               <volume controltype="setgain" value="-5"/>
            </stream>
         </join>
      </mscmixer>


   B2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 4e6afb6625e4 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>












Amirante, et al.              Informational                    [Page 90]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   C1. AS -> MS (CFW CONTROL, modifyjoin with 'inactive' status)
   -----------------------------------------------------------
      CFW 3f2dba317c83 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 193

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <modifyjoin id1="2133178233:18294826" id2="2f5ad43">
            <stream media="audio" direction="inactive"/>
         </modifyjoin>
      </mscmixer>


   C2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 3f2dba317c83 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 123

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join modified"/>
      </mscmixer>


   D1. AS -> MS (CFW CONTROL, join to sidebar)
   -------------------------------------------
      CFW 2443a8582d1d CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 181

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="2133178233:18294826" id2="519c1b9">
            <stream media="audio" direction="sendrecv"/>
         </join>
      </mscmixer>













Amirante, et al.              Informational                    [Page 91]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   D2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 2443a8582d1d 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>


   E1. AS -> MS (CFW CONTROL, modifyjoin with 'inactive' status)
   -----------------------------------------------------------
      CFW 436c6125628c CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 193

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <modifyjoin id1="1264755310:2beeae5b" id2="2f5ad43">
            <stream media="audio" direction="inactive"/>
         </modifyjoin>
      </mscmixer>


   E2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 436c6125628c 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 123

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join modified"/>
      </mscmixer>















Amirante, et al.              Informational                    [Page 92]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   F1. AS -> MS (CFW CONTROL, join to sidebar)
   -------------------------------------------
      CFW 7b7ed00665dd CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 181

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <join id1="1264755310:2beeae5b" id2="519c1b9">
            <stream media="audio" direction="sendrecv"/>
         </join>
      </mscmixer>


   F2. AS <- MS (CFW 200 OK)
   -------------------------
      CFW 7b7ed00665dd 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 125

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join successful"/>
      </mscmixer>

6.3.5.  Floor Control

   As described in [RFC4597], floor control is a feature typically
   needed and employed in most conference scenarios.  In fact, while not
   a mandatory feature to implement when realizing a conferencing
   application, it provides additional control of the media streams
   contributed by participants, thus allowing for moderation of the
   available resources.  The Centralized Conferencing (XCON) framework
   [RFC5239] suggests the use of the Binary Floor Control Protocol
   (BFCP) [RFC4582] to achieve the aforementioned functionality.  That
   said, a combined use of floor control functionality and the tools
   made available by the MEDIACTRL specification for conferencing would
   definitely be interesting to investigate.  [RFC5567] introduces two
   different approaches to integrating floor control with the MEDIACTRL
   architecture: (i) a topology where the floor control server is
   co-located with the AS and (ii) a topology where the floor control
   server is co-located with the MS.  The two approaches are obviously
   different with respect to the amount of information the AS and the MS
   have to deal with, especially when thinking about the logic behind
   the floor queues and automated decisions.  Nevertheless, considering
   how the Media Control Channel Framework is conceived, approach (ii)
   would need a dedicated package (be it an extension or a totally new
   package) in order to make the MS aware of floor control and allow the



Amirante, et al.              Informational                    [Page 93]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   MS to interact with the interested UAC accordingly.  At the time of
   writing, such a package doesn't exist yet, and as a consequence only
   approach (i) will be dealt with in the presented scenario.

   The scenario will then assume that the Floor Control Server (FCS) is
   co-located with the AS.  This means that all the BFCP requests will
   be sent by Floor Control Participants (FCPs) to the FCS, which will
   make the AS directly aware of the floor statuses.  For the sake of
   simplicity, the scenario assumes that the involved participants are
   already aware of all the identifiers needed in order to make BFCP
   requests for a specific conference.  Such information may have been
   carried according to the COMEDIA negotiation as specified in
   [RFC4583].  It is important to note that such information must not
   reach the MS.  This means that within the context of the 3PCC
   mechanism that may have been used in order to attach a UAC to the MS,
   all the BFCP-related information negotiated by the AS and the UAC
   must be removed before making the negotiation available to the MS,
   which may be unable to understand the specification.  A simplified
   example of how this could be achieved is presented in Figure 41.
   Please note that within the context of this example scenario,
   different identifiers may be used to address the same entity.
   Specifically, in this case the UAC (the endpoint sending and
   receiving media) is also a FCP, as it negotiates a BFCP channel too.




























Amirante, et al.              Informational                    [Page 94]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  UAC                               AS
 (FCP)                             (FCS)                              MS
  |                                 |                                 |
  | INVITE (SDP: RTP+BFCP)          |                                 |
  |-------------------------------->|                                 |
  |                                 | INVITE (SDP: RTP)               |
  |                                 |-------------------------------->|
  |                                 |          200 (SDP: RTP'+labels) |
  |                                 |<--------------------------------|
  |                        match +--|                                 |
  |                       floors |  |                                 |
  |                     & labels +->|                                 |
  |                                 |                                 |
  |    200 (SDP: RTP'+BFCP'+labels) |                                 |
  |<--------------------------------|                                 |
  | ACK                             |                                 |
  |-------------------------------->|                                 |
  |                                 | ACK                             |
  |                                 |-------------------------------->|
  |                                 |                                 |
  |<<###################### RTP MEDIA STREAMS ######################>>|
  |                                 |                                 |
  |<<******** BFCP CHANNEL *******>>|                                 |
  |                                 |                                 |
  .                                 .                                 .
  .                                 .                                 .

             Figure 41: Floor Control: Example of Negotiation























Amirante, et al.              Informational                    [Page 95]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   From the media and framework perspective, such a scenario doesn't
   differ much from the conferencing scenarios presented earlier.  It is
   more interesting to focus on the chosen topology for the scenario, as
   depicted in Figure 42.

   +-------+                    +--------+
   |  UAC  |                    |   AS   |                     +-------+
   | (FCP) |<****** BFCP ******>|  (FCS) |<****** BFCP *******>| (FCC) |
   +-------+                    +--------+                     +-------+
       ^                             ^
       |                             |
       |                         CFW |
       |                             |
       |                             v
       |                        +--------+
       +----------RTP---------->|   MS   |
                                +--------+

               Figure 42: Floor Control: Overall Perspective

   The AS, besides maintaining the already-known SIP signaling among the
   involved parties, also acts as the FCS for the participants in the
   conferences for which it is responsible.  In the scenario, two Floor
   Control Participants are involved: a basic Participant (FCP) and a
   Chair (FCC).

   As in all of the previously described conferencing examples, in the
   framework this can be achieved by means of the Mixer Control Package.
   Assuming that the conference has been created, the participant has
   been attached ('recvonly') to it, and the participant is aware of the
   involved BFCP identifiers, the needed steps can be summarized in the
   following list:

   1.  The assigned chair, FCC, sends a subscription for events related
       to the floor for which it is responsible (FloorQuery).

   2.  The FCP sends a BFCP request (FloorRequest) to access the audio
       resource ("I want to speak").

   3.  The FCS (AS) sends a provisional response to the FCP
       (FloorRequestStatus PENDING) and handles the request in its
       queue.  Since a chair is assigned to this floor, the request is
       forwarded to the FCC for a decision (FloorStatus).

   4.  The FCC makes a decision and sends it to the FCS (ChairAction
       ACCEPTED).





Amirante, et al.              Informational                    [Page 96]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   5.  The FCS takes note of the decision and updates the queue
       accordingly.  The decision is sent to the FCP (FloorRequestStatus
       ACCEPTED).  The floor has not been granted yet.

   6.  As soon as the queue allows it, the floor is actually granted to
       the FCP.  The AS, which is co-located with the FCS, understands
       in its business logic that such an event is associated with the
       audio resource being granted to the FCP.  As a consequence, a
       <modifyjoin> ('sendrecv') is sent through the Control Channel to
       the MS in order to unmute the FCP UAC in the conference.

   7.  The FCP is notified of this event (FloorRequestStatus GRANTED),
       thus ending the scenario.

   A diagram of such a sequence of transactions (also involving the BFCP
   message flow at a higher level) is depicted in Figure 43:

 UAC1      UAC2       AS
 (FCP)     (FCC)     (FCS)                               MS
  |         |         |                                  |
  |<<####################################################|
  |   UAC1 is muted (recvonly stream) in the conference  |
  |<<####################################################|
  |         |         |                                  |
  |         | FloorQuery                                 |
  |         |*******>>|                                  |
  |         |         |--+ handle                        |
  |         |         |  | subscription                  |
  |         |         |<-+                               |
  |         | FloorStatus                                |
  |         |<<*******|                                  |
  |         |         |                                  |
  | FloorRequest      |                                  |
  |*****************>>|                                  |
  |         |         |--+ handle                        |
  |         |         |  | request                       |
  |           Pending |<-+ (queue)                       |
  |<<*****************|                                  |
  |         |         |                                  |
  |         | FloorStatus                                |
  |         |<<*******|                                  |
  |         |         |                                  |
  |         | ChairAction (ACCEPT)                       |








Amirante, et al.              Informational                    [Page 97]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |         |*******>>|                                  |
  |         | ChairActionAck                             |
  |         |<<*******|                                  |
  |         |         |--+ handle                        |
  |         |         |  | decision                      |
  |         |         |<-+ (queue)                       |
  |          Accepted |                                  |
  |<<*****************|                                  |
  |         | FloorStatus                                |
  |         |<<*******|                                  |
  |         |         |                                  |
  |         |         |--+ queue                         |
  |         |         |  | grants                        |
  |         |         |<-+ floor                         |
  |         |         |                                  |
  |         |         | 1. CONTROL (modjoin UAC<->conf)  |
  |         |         |++++++++++++++++++++++++++++++++>>|
  |         |         |                                  |--+ modjoin
  |         |         |                                  |  | UAC & conf
  |         |         |                        2. 200 OK |<-+ (sendrecv)
  |         |         |<<++++++++++++++++++++++++++++++++|
  |         |         |                                  |
  |<<##################################################>>|
  |   UAC1 is now unmuted (sendrecv) in the conference   |
  |        and can speak, contributing to the mix        |
  |<<##################################################>>|
  |         |         |                                  |
  |           Granted |                                  |
  |<<*****************|                                  |
  |         | FloorStatus                                |
  |         |<<*******|                                  |
  |         |         |                                  |
  .         .                                            .
  .         .                                            .

             Figure 43: Floor Control: Framework Transactions

   As can easily be deduced from the above diagram, the complex
   interaction at the BFCP level only results in a single transaction at
   the MEDIACTRL level.  In fact, the purpose of the BFCP transactions
   is to moderate access to the audio resource, which means providing
   the event trigger to MEDIACTRL-based conference manipulation









Amirante, et al.              Informational                    [Page 98]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   transactions.  Before being granted the floor, the FCP UAC is
   excluded from the conference mix at the MEDIACTRL level ('recvonly').
   As soon as the floor has been granted, the FCP UAC is included in the
   mix.  In MEDIACTRL words:

   o  Since the FCP UAC must be included in the audio mix, a
      <modifyjoin> is sent to the MS in a CONTROL directive.  The
      <modifyjoin> has as identifiers the connectionid associated with
      the FCP UAC (e1e1427c:1c998d22) and the conferenceid of the mix
      (cf45ee2).  The <stream> element tells the MS that the audio media
      stream between the two must become bidirectional ('sendrecv'),
      changing the previous status ('recvonly').  Please note that in
      this case only audio was involved in the conference; if video were
      involved as well, and video had to be unchanged, a <stream>
      directive for video had to be placed in the request as well in
      order to maintain its current status.

   1. AS -> MS (CFW CONTROL)
   -------------------------
      CFW gh67ffg56w21 CONTROL
      Control-Package: msc-mixer/1.0
      Content-Type: application/msc-mixer+xml
      Content-Length: 182

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <modifyjoin id1="e1e1427c:1c998d22" id2="cf45ee2">
            <stream media="audio" direction="sendrecv"/>
         </modifyjoin>
      </mscmixer>


   2. AS <- MS (CFW 200 OK)
   ------------------------
      CFW gh67ffg56w21 200
      Timeout: 10
      Content-Type: application/msc-mixer+xml
      Content-Length: 123

      <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
         <response status="200" reason="Join modified"/>
      </mscmixer>

6.4.  Additional Scenarios

   This section includes additional scenarios that can be of interest
   when dealing with AS<->MS flows.  The aim of the following
   subsections is to present the use of features peculiar to the IVR
   package: specifically, variable announcements, VCR (video cassette



Amirante, et al.              Informational                    [Page 99]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   recorder) prompts, parallel playback, recurring dialogs, and custom
   grammars.  To describe how call flows involving such features might
   happen, three sample scenarios have been chosen:

   1.  Voice Mail (variable announcements for digits, VCR controls).

   2.  Current Time (variable announcements for date and time, parallel
       playback).

   3.  DTMF-driven Conference Manipulation (recurring dialogs, custom
       grammars).

6.4.1.  Voice Mail

   An application that typically uses the services an MS can provide is
   Voice Mail.  In fact, while it is clear that many of its features are
   part of the application logic (e.g., the mapping of a URI with a
   specific user's voice mailbox, the list of messages and their
   properties, and so on), the actual media work is accomplished through
   the MS.  Features needed by a Voice Mail application include the
   ability to record a stream and play it back at a later time, give
   verbose announcements regarding the status of the application,
   control the playout of recorded messages by means of VCR controls,
   and so on.  These features are all supported by the MS through the
   IVR package.

   Without delving into the details of a full Voice Mail application and
   all its possible use cases, this section will cover a specific
   scenario and try to deal with as many interactions as possible that
   may happen between the AS and the MS in such a context.  This
   scenario, depicted as a sequence diagram in Figure 44, will be as
   follows:

   1.  The UAC INVITEs a URI associated with his mailbox, and the AS
       follows the previously explained procedure to have the UAC
       negotiate a new media session with the MS.

   2.  The UAC is first prompted with an announcement giving him the
       amount of available new messages in the mailbox.  After that, the
       UAC can choose which message to access by sending a DTMF tone.

   3.  The UAC is then presented with a VCR-controlled announcement, in
       which the chosen received mail is played back to him.  VCR
       controls allow him to navigate through the prompt.

   This is a quite oversimplified scenario, considering that it doesn't
   even allow the UAC to delete old messages or organize them but just
   to choose which received message to play.  Nevertheless, it gives us



Amirante, et al.              Informational                   [Page 100]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   the chance to deal with variable announcements and VCR controls --
   two typical features that a Voice Mail application would almost
   always take advantage of.  Other features that a Voice Mail
   application would rely upon (e.g., recording streams, event-driven
   IVR menus, and so on) have been introduced in previous sections, and
   so representing them would be redundant.  This means that the
   presented call flows assume that some messages have already been
   recorded and are available at reachable locations.  The example also
   assumes that the AS has placed the recordings in its own storage
   facilities, since it is not safe to rely upon the internal MS
   storage, which is likely to be temporary.

 UAC                      AS                                 MS
  |                       |                                  |
  |                       | A1. CONTROL (play variables and  |
  |                       |      collect the user's choice)  |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  | prepare &
  |                       |                                  |--+ start
  |                       |                                  |  | the
  |                       |                       A2. 200 OK |<-+ dialog
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<########################################################|
  |                "You have five messages ..."              |
  |<<########################################################|
  |                       |                                  |
  |                       |      B1. CONTROL (<collectinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | B2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  |                       | C1. CONTROL (VCR for chosen msg) |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  | prepare &
  |                       |                                  |--+ start
  |                       |                                  |  | the
  |                       |                       C2. 200 OK |<-+ dialog
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       |                                  |
  |<<########################################################|
  |          "Hi there, I tried to call you but..."          |--+
  |<<########################################################|  | handle
  |                       |                                  |  | VCR-
  |########################################################>>|  | driven
  |        The UAC controls the playout using DTMF           |  | (DTMF)
  |########################################################>>|  |playout
  |                       |                                  |<-+



Amirante, et al.              Informational                   [Page 101]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |                       |       D1. CONTROL (<dtmfnotify>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | D2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  .                       .                                  .
  .       (other events are received in the meantime)        |
  .                       .                                  .
  |                       |      E1. CONTROL (<controlinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | E2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  .                       .                                  .
  .                       .                                  .

               Figure 44: Voice Mail: Framework Transactions

   The framework transaction steps are as follows:

   o  The first transaction (A1) is addressed to the IVR package (msc-
      ivr).  It is basically an [RFC6231] 'promptandcollect' dialog, but
      with a slight difference: some of the prompts to play are actual
      audio files, for which a URI is provided (media loc="xxx"), while
      others are so-called <variable> prompts; these <variable> prompts
      are actually constructed by the MS itself according to the
      directives provided by the AS.  In this example, the sequence of
      prompts requested by the AS is as follows:

      1.  play a wav file ("you have...").

      2.  play a digit ("five...") by building it (variable: digit=5).

      3.  play a wav file ("messages...").

      A DTMF collection is requested as well (<collect>) to be taken
      after the prompts have been played.  The AS is only interested in
      a single digit (maxdigits=1).

   o  The transaction is handled by the MS, and if everything works fine
      (i.e., the MS retrieved all the audio files and successfully built
      the variable announcements), the dialog is started; its start is
      reported, together with the associated identifier (5db01f4) to the
      AS in a terminating 200 OK message (A2).







Amirante, et al.              Informational                   [Page 102]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   o  The AS then waits for the dialog to end in order to retrieve the
      results in which it is interested (in this case, the DTMF tone the
      UAC chooses, since it will affect which message will have to be
      played subsequently).

   o  The UAC hears the prompts and chooses a message to play.  In this
      example, he wants to listen to the first message and so inputs
      "1".  The MS intercepts this tone and notifies the AS of it in a
      newly created CONTROL event message (B1); this CONTROL includes
      information about how each single requested operation ended
      (<promptinfo> and <collectinfo>).  Specifically, the event states
      that the prompt ended normally (termmode=completed) and that the
      subsequently collected tone is 1 (dtmf=1).  The AS acks the event
      (B2), since the dialogid provided in the message is the same as
      that of the previously started dialog.

   o  At this point, the AS uses the value retrieved from the event to
      proceed with its business logic.  It decides to present the UAC
      with a VCR-controllable playout of the requested message.  This is
      done with a new request to the IVR package (C1), which contains
      two operations: <prompt> to address the media file to play (an old
      recording) and <control> to instruct the MS about how the playout
      of this media file shall be controlled via DTMF tones provided by
      the UAC (in this example, different DTMF digits are associated
      with different actions, e.g., pause/resume, fast forward, rewind,
      and so on).  The AS also subscribes to DTMF events related to this
      control operation (matchmode=control), which means that the MS is
      to trigger an event any time that a DTMF associated with a control
      operation (e.g., 7=pause) is intercepted.

   o  The MS prepares the dialog and, when the playout starts, sends
      notification in a terminating 200 OK message (C2).  At this point,
      the UAC is presented with the prompt and can use DTMF digits to
      control the playback.

   o  As explained previously, any DTMF associated with a VCR operation
      is then reported to the AS, together with a timestamp stating when
      the event happened.  An example is provided (D1) in which the UAC
      pressed the fast-forward key (6) at a specific time.  Of course,
      as for any other MS-generated event, the AS acks it (D2).

   o  When the playback ends (whether because the media reached its
      termination or because any other interruption occurred), the MS
      triggers a concluding event with information about the whole
      dialog (E1).  This event, besides including information about the
      prompt itself (<promptinfo>), also includes information related to
      the VCR operations (<controlinfo>), that is, all the VCR controls




Amirante, et al.              Informational                   [Page 103]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


      the UAC used (fast forward/rewind/pause/resume in this example)
      and when it happened.  The final ack by the AS (E2) concludes the
      scenario.

A1. AS -> MS (CFW CONTROL, play and collect)
--------------------------------------------
   CFW 2f931de22820 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 429

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <dialogstart connectionid="10514b7f:6a900179">
         <dialog>
            <prompt>
               <media
            loc="http://www.example.net/prompts/vm-youhave.wav"
            type="audio/x-wav"/>
               <variable value="5" type="digits"/>
               <media
           loc="http://www.example.net/prompts/vm-messages.wav"
           type="audio/x-wav"/>
            </prompt>
            <collect maxdigits="1" escapekey="*"
                     cleardigitbuffer="true"/>
         </dialog>
      </dialogstart>
   </mscivr>


A2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 2f931de22820 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="5db01f4"/>
   </mscivr>











Amirante, et al.              Informational                   [Page 104]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


B1. AS <- MS (CFW CONTROL event)
--------------------------------
   CFW 7c97adc41b3e CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 270

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <event dialogid="5db01f4">
         <dialogexit status="1" reason="Dialog successfully completed">
            <promptinfo duration="11713" termmode="completed"/>
            <collectinfo dtmf="1" termmode="match"/>
         </dialogexit>
      </event>
   </mscivr>


B2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 7c97adc41b3e 200


C1. AS -> MS (CFW CONTROL, VCR)
-------------------------------
   CFW 3140c24614bb CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 423

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <dialogstart connectionid="10514b7f:6a900179">
         <dialog>
            <prompt bargein="false">
               <media
  loc="http://www.example.com/messages/recording-4ca9fc2.mpg"/>
            </prompt>
            <control gotostartkey="1" gotoendkey="3"
                     ffkey="6" rwkey="4" pausekey="7" resumekey="9"
                     volupkey="#" voldnkey="*"/>
            </dialog>
         <subscribe>
            <dtmfsub matchmode="control"/>
         </subscribe>
      </dialogstart>
   </mscivr>






Amirante, et al.              Informational                   [Page 105]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


C2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 3140c24614bb 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="3e936e0"/>
   </mscivr>


D1. AS <- MS (CFW CONTROL event, dtmfnotify)
--------------------------------------------
   CFW 361840da0581 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 179

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <event dialogid="3e936e0">
         <dtmfnotify matchmode="control" dtmf="6"
                     timestamp="2008-12-16T12:58:36Z"/>
      </event>
   </mscivr>


D2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 361840da0581 200


      [..] The other VCR DTMF notifications are skipped for brevity [..]


















Amirante, et al.              Informational                   [Page 106]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


E1. AS <- MS (CFW CONTROL event, dialogexit)
--------------------------------------------
   CFW 3ffab81c21e9 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 485

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <event dialogid="3e936e0">
         <dialogexit status="1" reason="Dialog successfully completed">
            <promptinfo duration="10270" termmode="completed"/>
            <controlinfo>
               <controlmatch dtmf="6" timestamp="2008-12-16T12:58:36Z"/>
               <controlmatch dtmf="4" timestamp="2008-12-16T12:58:37Z"/>
               <controlmatch dtmf="7" timestamp="2008-12-16T12:58:38Z"/>
               <controlmatch dtmf="9" timestamp="2008-12-16T12:58:40Z"/>
            </controlinfo>
         </dialogexit>
      </event>
   </mscivr>


E2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 3ffab81c21e9 200

6.4.2.  Current Time

   An interesting scenario to create with the help of features provided
   by the MS is what is typically called 'Current Time'.  A UAC calls a
   URI, which presents the caller with the current date and time.  As
   can easily be deduced by the very nature of the application, variable
   announcements play an important role in this scenario.  In fact,
   rather than having the AS build an announcement according to the
   current time using different framework messages, it is much easier to
   rely upon the "variable announcements" mechanism provided by the IVR
   package, as variable announcements provide several ways to deal with
   dates and times.













Amirante, et al.              Informational                   [Page 107]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   To make the scenario more interesting and have it cover more
   functionality, the application is also assumed to have background
   music played during the announcement.  Because most of the
   announcements will be variable, a means is needed to have more
   streams played in parallel on the same connection.  This can be
   achieved in two different ways:

   1.  two separate and different dialogs, playing the variable
       announcements and the background track, respectively.

   2.  a single dialog implementing a parallel playback.

   The first approach assumes that the available MS implements implicit
   mixing, which may or may not be supported since it's a recommended
   feature but not mandatory.  The second approach assumes that the MS
   implements support for more streams of the same media type (in this
   case audio) in the same dialog, which, exactly as for the case of
   implicit mixing, is not to be taken for granted.  Because the first
   approach is quite straightforward and easy to understand, the
   following scenario uses the second approach and assumes that the
   available MS supports parallel playback of more audio tracks within
   the context of the same dialog.

   That said, the covered scenario, depicted as a sequence diagram in
   Figure 45, will be as follows:

   1.  The UAC INVITEs a URI associated with the Current Time
       application, and the AS follows the previously explained
       procedure to have the UAC negotiate a new media session with the
       MS.

   2.  The UAC is presented with an announcement including (i) a voice
       stating the current date and time; (ii) a background music track;
       and (iii) a mute background video track.

















Amirante, et al.              Informational                   [Page 108]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 UAC                      AS                                 MS
  |                       |                                  |
  |                       | A1. CONTROL (play variables)     |
  |                       |++++++++++++++++++++++++++++++++>>| prepare
  |                       |                                  |--+ and
  |                       |                          A2. 202 |  | start
  |                       |<<++++++++++++++++++++++++++++++++|  | the
  |                       |                                  |  | dialog
  |                       |                                  |  | (takes
  |                       |           A3. REPORT (terminate) |<-+ time)
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | A4. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  |<<########################################################|
  |            "16th of december 2008, 5:31 PM..."           |
  |<<########################################################|
  |                       |                                  |
  |                       |       B1. CONTROL (<promptinfo>) |
  |                       |<<++++++++++++++++++++++++++++++++|
  |                       | B2. 200 OK                       |
  |                       |++++++++++++++++++++++++++++++++>>|
  |                       |                                  |
  .                       .                                  .
  .                       .                                  .
  .                       .                                  .

              Figure 45: Current Time: Framework Transactions

   The framework transaction steps are as follows:

   o  The first transaction (A1) is addressed to the IVR package (msc-
      ivr); it is basically an [RFC6231] 'playannouncements' dialog,
      but, unlike all the scenarios presented so far, it includes
      directives for a parallel playback, as indicated by the <par>
      element.  There are three flows to play in parallel:

      *  a sequence (<seq>) of variable and static announcements (the
         actual time and date).

      *  a music track ('media=music.wav') to be played in the
         background at a lower volume (soundLevel=50%).

      *  a mute background video track (media=clock.mpg).







Amirante, et al.              Informational                   [Page 109]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


      The global announcement ends when the longest of the three
      parallel steps ends (endsync=last).  This means that if one of the
      steps ends before the others, the step is muted for the rest of
      the playback.  In this example, the series of static and
      <variable> announcements is requested by the AS:

      *  play a wav file ("Tuesday...").

      *  play a date ("16th of december 2008...") by building it
         (variable: date with a ymd=year/month/day format).

      *  play a time ("5:31 PM...") by building it (variable: time with
         a t12=12 hour day format, am/pm).

   o  The transaction is extended by the MS (A2) with a new timeout, as
      in this case the MS needs some more time to retrieve all the
      needed media files.  Should the new timeout expire as well, the MS
      would send a further message to extend it again (a REPORT update),
      but for the sake of simplicity we assume that in this scenario it
      is not needed.  If everything went fine (i.e., the MS retrieved
      all the audio files and successfully built the variable
      announcements, and it supports parallel playback as requested),
      the dialog is started.  Its start is reported, together with the
      associated identifier (415719e), to the AS in a terminating REPORT
      message (A3).

   o  The AS acks the REPORT (A4) and waits for the dialog to end in
      order to either conclude the application or proceed to further
      steps if required by the application itself.

   o  When the last of the three parallel announcements ends, the dialog
      terminates, and an event (B1) is triggered to the AS with the
      relevant information (promptinfo).  The AS acks (B2) and
      terminates the scenario.

















Amirante, et al.              Informational                   [Page 110]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


A1. AS -> MS (CFW CONTROL, play)
--------------------------------
   CFW 0c7680191bd2 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 506

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <dialogstart connectionid="21c8e07b:055a893f">
       <dialog>
         <prompt bargein="true">
           <par endsync="last">
             <seq>
               <media loc="http://www.example.com/day-2.wav"/>
               <variable value="2008-12-16" type="date" format="ymd"/>
               <variable value="17:31" type="time" format="t12"/>
             </seq>
             <media loc="http://www.example.com/music.wav"
                    soundLevel="50%"/>
             <media loc="http://www.example.com/clock.mpg"/>
           </par>
         </prompt>
       </dialog>
     </dialogstart>
   </mscivr>


A2. AS <- MS (CFW 202)
----------------------
   CFW 0c7680191bd2 202
   Timeout: 5


A3. AS <- MS (CFW REPORT terminate)
-----------------------------------
   CFW 0c7680191bd2 REPORT
   Seq: 1
   Status: terminate
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="415719e"/>
   </mscivr>






Amirante, et al.              Informational                   [Page 111]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


A4. AS -> MS (CFW 200, ACK to 'REPORT terminate')
-------------------------------------------------
   CFW 0c7680191bd2 200
   Seq: 1


B1. AS <- MS (CFW CONTROL event)
--------------------------------
   CFW 4481ca0c4fca CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 229

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
      <event dialogid="415719e">
         <dialogexit status="1" reason="Dialog successfully completed">
            <promptinfo duration="8046" termmode="completed"/>
         </dialogexit>
      </event>
   </mscivr>


B2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 4481ca0c4fca 200

6.4.3.  DTMF-Driven Conference Manipulation

   To complete the scenarios presented in Section 6.3, this section
   deals with how the AS can use the MS to detect DTMF tones from
   conference participants and take actions on the conference
   accordingly.  A typical example is when participants in a conference
   are provided with specific codes to:

   o  mute/unmute themselves in the conference;

   o  change their volume in the conference, or the volume of the
      conference itself;

   o  change the video layout in the conference, if allowed;

   o  kick abusive users out of the conference;

   and so on.  To achieve all this, the simplest thing an AS can do is
   to prepare a recurring DTMF collection for each participant with
   specific grammars to match.  If the collected tones match the
   grammar, the MS would notify the AS of the tones and start the
   collection again.  Upon receipt of <collectinfo> events, the AS would



Amirante, et al.              Informational                   [Page 112]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   in turn originate the proper related request, e.g., a <modifyjoin> on
   the participant's stream with the conference.  This is made possible
   by three features provided by the IVR package:

   1.  the 'repeatCount' attribute.

   2.  the subscription mechanism.

   3.  the Speech Recognition Grammar Specification (SRGS) [SRGS].

   The first feature allows recurring instances of the same dialog
   without the need for additional requests upon completion of the
   dialog itself.  In fact, the 'repeatCount' attribute indicates how
   many times the dialog has to be repeated.  When the attribute has the
   value 0, it means that the dialog has to be repeated indefinitely,
   meaning that it's up to the AS to destroy it by means of a
   <dialogterminate> request when the dialog is no longer needed.  The
   second feature allows the AS to subscribe to events related to the
   IVR package without waiting for the dialog to end, e.g., matching
   DTMF collections in this case.  Finally, the last feature allows
   custom matching grammars to be specified.  This way, only a subset of
   the possible DTMF strings can be specified, so that only those
   matches in which the AS is interested are reported.  Grammars other
   than SRGS may be supported by the MS and will achieve the same
   result.  This document will only describe the use of an SRGS grammar,
   since support for SRGS is mandated in [RFC6231].

   To identify a single sample scenario, we assume that a participant
   has successfully joined a conference, e.g., as detailed in Figure 32.
   We also assume that the following codes are to be provided within the
   conference to participants in order to let them take advantage of
   advanced features:

   1.  *6 to mute/unmute themselves (on/off trigger).

   2.  *1 to lower their own volume in the conference and *3 to raise
       it.

   3.  *7 to lower the volume of the conference stream they are
       receiving and *9 to raise it.

   4.  *0 to leave the conference.









Amirante, et al.              Informational                   [Page 113]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   This means that six different codes are supported and are to be
   matched in the requested DTMF collection.  All other codes are
   collected by the MS but discarded, and no event is triggered to the
   AS.  Because all the codes have the '*' (star) DTMF code in common,
   the following is an example of an SRGS grammar that may be used in
   the request by the AS:

     <grammar mode="dtmf" version="1.0"
              xmlns="http://www.w3.org/2001/06/grammar">
       <rule id="digit">
         <one-of>
           <item>0</item>
           <item>1</item>
           <item>3</item>
           <item>6</item>
           <item>7</item>
           <item>9</item>
         </one-of>
       </rule>
       <rule id="action" scope="public">
         <item>
           *
           <item><ruleref uri="#digit"/></item>
         </item>
       </rule>
     </grammar>

   As can be deduced by looking at the grammar, the presented SRGS XML
   code specifies exactly the requirements for the collections to match.
   The rule is to match any string that has a star ('*') followed by a
   single supported digit (0, 1, 3, 6, 7, or 9).  Such grammar, as
   stated in [RFC6231], may be either provided inline in the request
   itself or referenced externally by means of the 'src' attribute.  In
   the example scenario, we'll put it inline, but an external reference
   to the same document would achieve exactly the same result.
















Amirante, et al.              Informational                   [Page 114]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   Figure 46 shows how the AS might request the recurring collection for
   a UAC.  As before, the example assumes that the UAC is already a
   participant in the conference.

 UAC                  AS                                     MS
  |                   |                                      |
  |                   | A1. CONTROL (recurring collection)   |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |--+ start
  |                   |                                      |  | the
  |                   |                           A2. 200 OK |<-+ dialog
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   |                                      |
  |########################################################>>|
  |          Recurring DTMF digit collection starts          |--+ get
  |########################################################>>|  | DTMF
  |                   |                                      |<-+ digits
  |                   |            B1. CONTROL (dtmfinfo=*1) |
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   | B2. 200 OK                           |--+ get
  |                   |++++++++++++++++++++++++++++++++++++>>|  | DTMF
  |                   |                                      |<-+ digits
  |                   | C1. CONTROL (modifyjoin UAC1-->conf) |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |--+ modify
  |                   |                                      |  | UAC
  |                   |                           C2. 200 OK |<-+ volume
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   |                                      |
  |########################################################>>|
  |          Volume of UAC in conference is lowered          |
  |########################################################>>|
  |                   |                                      |
  |                   |            D1. CONTROL (dtmfinfo=*9) |
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   | D2. 200 OK                           |--+ get
  |                   |++++++++++++++++++++++++++++++++++++>>|  | DTMF
  |                   |                                      |<-+ digits
  |                   | E1. CONTROL (modifyjoin UAC1<--conf) |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |--+ modify
  |                   |                                      |  | conf
  |                   |                           E2. 200 OK |<-+ volume
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   |                                      |
  |<<########################################################|
  |  Now UAC can hear the conference mix at a higher volume  |
  |<<########################################################|



Amirante, et al.              Informational                   [Page 115]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |                   |                                      |
  |                   |            F1. CONTROL (dtmfinfo=*6) |
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   | F2. 200 OK                           |--+ get
  |                   |++++++++++++++++++++++++++++++++++++>>|  | DTMF
  |                   |                                      |<-+ digits
  |                   | G1. CONTROL (modifyjoin UAC1-->conf) |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |--+ mute
  |                   |                                      |  | UAC in
  |                   |                           G2. 200 OK |<-+ conf
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   |                                      |
  |########################################################>>|
  |             UAC is now muted in the conference           |
  |########################################################>>|
  |                   |                                      |
  |                   |            H1. CONTROL (dtmfinfo=*0) |
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   | H2. 200 OK                           |--+ get
  |                   |++++++++++++++++++++++++++++++++++++>>|  | DTMF
  |                   |                                      |<-+ digits
  |                   | I1. CONTROL (destroy DTMF dialog)    |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |--+ delete
  |                   |                                      |  | the
  |                   |                           I2. 200 OK |<-+ dialog
  |                   |<<++++++++++++++++++++++++++++++++++++|    (DTMF
  |                   |                                      |collection
  |                   |                                      |    stops)
  |                   |             J1. CONTROL (dialogexit) |
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   | J2. 200 OK                           |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |
  |########################################################>>|
  |           No more tones from UAC are collected           |
  |########################################################>>|
  |                   |                                      |
  |                   | K1. CONTROL (unjoin UAC1<-X->conf)   |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |--+ unjoin
  |                   |                                      |  | UAC &
  |                   |                           K2. 200 OK |<-+ conf
  |                   |<<++++++++++++++++++++++++++++++++++++|
  |                   |                                      |
  |                   |          L1. CONTROL (unjoin-notify) |
  |                   |<<++++++++++++++++++++++++++++++++++++|



Amirante, et al.              Informational                   [Page 116]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  |                   | L2. 200 OK                           |
  |                   |++++++++++++++++++++++++++++++++++++>>|
  |                   |                                      |
  .                   .                                      .
  .                   .                                      .

              Figure 46: DTMF-Driven Conference Manipulation:
                          Framework Transactions

   As can be deduced from the sequence diagram above, the AS, in its
   business logic, correlates the results of different transactions,
   addressed to different packages, to implement a more complex
   conferencing scenario.  In fact, <dtmfnotify> events are used to take
   actions according to the functions of the DTMF codes.  The framework
   transaction steps are as follows:

   o  The UAC is already in the conference, and so the AS starts a
      recurring collect with a grammar to match.  This is done by
      placing a CONTROL request addressed to the IVR package (A1).  The
      operation to implement is a <collect>, and we are only interested
      in two-digit DTMF strings (maxdigits).  The AS is not interested
      in a DTMF terminator (termchar is set to a non-conventional DTMF
      character), and the DTMF escape key is set to '#' (the default is
      '*', which would conflict with the code syntax for the conference
      and so needs to be changed).  A custom SRGS grammar is provided
      inline (<grammar> with mode=dtmf).  The whole dialog is to be
      repeated indefinitely (dialog has repeatCount=0), and the AS wants
      to be notified when matching collections occur (dtmfsub with
      matchmode=collect).

   o  The request is handled by the MS (A2) and then successfully
      started (dialogid=01d1b38).  This means that the MS has started
      collecting DTMF tones from the UAC.

   o  The MS collects a matching DTMF string from the UAC (*1).  Since
      the AS subscribed to this kind of event, a CONTROL event
      notification (dtmfnotify) is triggered by the MS (B1), including
      the collected tones.  Since the dialog is recurring, the MS
      immediately restarts the collection.

   o  The AS acks the event (B2) and in its business logic understands
      that the code '*1' means that the UAC wants its own volume to be
      lowered in the conference mix.  The AS is able to associate the
      event with the right UAC by referring to the attached dialogid
      (01d1b38).  It then acts accordingly by sending a <modifyjoin>
      (C1) that does exactly this: the provided <stream> child element
      instructs the MS to modify the volume of the UAC-->conference
      audio flow (setgain=-5 dB 'sendonly').  Note that the "setgain"



Amirante, et al.              Informational                   [Page 117]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


      value is the absolute volume level.  If the user's request is to
      lower the volume level, the AS must remember the previously set
      volume level and from it calculate the new volume level.  Note how
      the request also includes directives for the inverse direction.
      This verbose approach is needed; otherwise, the MS would not only
      change the volume in the requested direction but would also
      disable the media flow in the other direction.  Having a proper
      <stream> addressing the UAC<--conf media flow as well ensures that
      this doesn't happen.

   o  The MS successfully enforces the requested operation (C2),
      changing the volume.

   o  A new matching DTMF string from the UAC is collected (*9).  As
      before, an event is triggered to the AS (D1).

   o  The AS acks the event (D2) and matches the new code ('*9') with
      its related operation (raise the volume of the conference mix for
      the UAC), taking the proper action.  A different <modifyjoin> is
      sent (E1) with the new instructions (setgain=+3 dB 'recvonly').
      The same considerations regarding how the incremental operation
      should be mapped to the command apply here as well.  Note also how
      a <stream> for the inverse direction ('sendonly') is again
      provided just as a placeholder, which basically instructs the MS
      that the settings for that direction are not to be changed,
      maintaining the previous directives of (C1).

   o  The MS successfully enforces this requested operation as well
      (E2), changing the volume in the specified direction.

   o  At this point, a further matching DTMF string from the UAC is
      collected (*6) and sent to the AS (F1).

   o  After the required ack (F2), the AS reacts by implementing the
      action associated with the new code ('*6'), by which the UAC
      requested that it be muted within the conference.  A new
      <modifyjoin> is sent (G1) with a properly constructed payload
      (setstate=mute 'sendonly'), and the MS enforces it (G2).

   o  A last (in this scenario) matching DTMF string is collected by the
      MS (*0).  As with all the previous codes, notification of this
      string is sent to the AS (H1).









Amirante, et al.              Informational                   [Page 118]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   o  The AS acks the event (H2) and understands that the UAC wants to
      leave the conference now (since the code is *0).  This means that
      a series of actions must be taken:

      *  The recurring collection is stopped, since it's no longer
         needed.

      *  The UAC is unjoined from the conference it is in.

      *  Additional operations might be considered, e.g., a global
         announcement stating that the UAC is leaving, but for the sake
         of conciseness such operations are not listed here.

      The former is accomplished by means of a <dialogterminate> request
      (I1) to the IVR package (dialogid=01d1b38) and the latter by means
      of an <unjoin> request (K1) to the Mixer package.

   o  The <dialogterminate> request is handled by the MS (I2), and the
      dialog is terminated successfully.  As soon as the dialog has
      actually been terminated, a <dialogexit> event is triggered as
      well to the AS (J1).  This event has no report of the result of
      the last iteration (since the dialog was terminated abruptly with
      an immediate=true) and is acked by the AS (J2) to finally complete
      the dialog lifetime.

   o  The <unjoin> request is immediately enforced (K2).  As a
      consequence of the unjoin operation, an <unjoin-notify> event
      notification is triggered by the MS (L1) to confirm to the AS that
      the requested entities are no longer attached to each other.  The
      status in the event is set to 0, which, as stated in the
      specification, means that the join has been terminated by an
      <unjoin> request.  The ack from the AS (L2) concludes this
      scenario.


















Amirante, et al.              Informational                   [Page 119]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


A1. AS -> MS (CFW CONTROL, recurring collect with grammar)
----------------------------------------------------------
   CFW 238e1f2946e8 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 809

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <dialogstart connectionid="14849028:37fc2523">
       <dialog repeatCount="0">
         <collect maxdigits="2" termchar="A" escapekey="#">
           <grammar>
             <grammar version="1.0" mode="dtmf"
                      xmlns="http://www.w3.org/2001/06/grammar">
               <rule id="digit">
                 <one-of>
                   <item>0</item>
                   <item>1</item>
                   <item>3</item>
                   <item>6</item>
                   <item>7</item>
                   <item>9</item>
                 </one-of>
               </rule>
               <rule id="action" scope="public">
                 <example>*3</example>
                 <one-of>
                   <item>
                     *
                     <ruleref uri="#digit"/>
                   </item>
                 </one-of>
               </rule>
             </grammar>
           </grammar>
         </collect>
       </dialog>
       <subscribe>
         <dtmfsub matchmode="collect"/>
       </subscribe>
     </dialogstart>
   </mscivr>









Amirante, et al.              Informational                   [Page 120]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


A2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 238e1f2946e8 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 137

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog started" dialogid="01d1b38"/>
   </mscivr>


B1. AS <- MS (CFW CONTROL dtmfnotify event)
-------------------------------------------
   CFW 1dd62e043c00 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 180

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <event dialogid="01d1b38">
       <dtmfnotify matchmode="collect" dtmf="*1"
                   timestamp="2008-12-17T17:20:53Z"/>
     </event>
   </mscivr>


B2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 1dd62e043c00 200


C1. AS -> MS (CFW CONTROL, modifyjoin with setgain)
---------------------------------------------------
   CFW 0216231b1f16 CONTROL
   Control-Package: msc-mixer/1.0
   Content-Type: application/msc-mixer+xml
   Content-Length: 290

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <modifyjoin id1="873975758:a5105056" id2="54b4ab3">
       <stream media="audio" direction="sendonly">
         <volume controltype="setgain" value="-5"/>
       </stream>
       <stream media="audio" direction="recvonly"/>
     </modifyjoin>
   </mscmixer>




Amirante, et al.              Informational                   [Page 121]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


C2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 0216231b1f16 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 123

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <response status="200" reason="Join modified"/>
   </mscmixer>


D1. AS <- MS (CFW CONTROL dtmfnotify event)
-------------------------------------------
   CFW 4d674b3e0862 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 180

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <event dialogid="01d1b38">
       <dtmfnotify matchmode="collect" dtmf="*9"
                   timestamp="2008-12-17T17:20:57Z"/>
     </event>
   </mscivr>


D2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 4d674b3e0862 200


E1. AS -> MS (CFW CONTROL, modifyjoin with setgain)
---------------------------------------------------
   CFW 140e0f763352 CONTROL
   Control-Package: msc-mixer/1.0
   Content-Type: application/msc-mixer+xml
   Content-Length: 292

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <modifyjoin id1="873975758:a5105056" id2="54b4ab3">
       <stream media="audio" direction="recvonly">
         <volume controltype="setgain" value="+3"/>
       </stream>
       <stream media="audio" direction="sendonly"/>
     </modifyjoin>
   </mscmixer>




Amirante, et al.              Informational                   [Page 122]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


E2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 140e0f763352 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 123

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <response status="200" reason="Join modified"/>
   </mscmixer>


F1. AS <- MS (CFW CONTROL dtmfnotify event)
-------------------------------------------
   CFW 478ed6f1775b CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 180

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <event dialogid="01d1b38">
       <dtmfnotify matchmode="collect" dtmf="*6"
                   timestamp="2008-12-17T17:21:02Z"/>
     </event>
   </mscivr>


F2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 478ed6f1775b 200


G1. AS -> MS (CFW CONTROL, modifyjoin with setstate)
----------------------------------------------------
   CFW 7fdcc2331bef CONTROL
   Control-Package: msc-mixer/1.0
   Content-Type: application/msc-mixer+xml
   Content-Length: 295

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <modifyjoin id1="873975758:a5105056" id2="54b4ab3">
       <stream media="audio" direction="sendonly">
         <volume controltype="setstate" value="mute"/>
       </stream>
       <stream media="audio" direction="recvonly"/>
     </modifyjoin>
   </mscmixer>




Amirante, et al.              Informational                   [Page 123]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


G2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 7fdcc2331bef 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 123

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <response status="200" reason="Join modified"/>
   </mscmixer>


H1. AS <- MS (CFW CONTROL dtmfnotify event)
-------------------------------------------
   CFW 750b917a5d4a CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 180

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <event dialogid="01d1b38">
       <dtmfnotify matchmode="collect" dtmf="*0"
                   timestamp="2008-12-17T17:21:05Z"/>
     </event>
   </mscivr>


H2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 750b917a5d4a 200


I1. AS -> MS (CFW CONTROL, dialogterminate)
-------------------------------------------
   CFW 515f007c5bd0 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 128

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <dialogterminate dialogid="01d1b38" immediate="true"/>
   </mscivr>









Amirante, et al.              Informational                   [Page 124]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


I2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 515f007c5bd0 200
   Timeout: 10
   Content-Type: application/msc-ivr+xml
   Content-Length: 140

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <response status="200" reason="Dialog terminated"
               dialogid="01d1b38"/>
   </mscivr>


J1. AS <- MS (CFW CONTROL dialogexit event)
-------------------------------------------
   CFW 76adc41122c1 CONTROL
   Control-Package: msc-ivr/1.0
   Content-Type: application/msc-ivr+xml
   Content-Length: 155

   <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <event dialogid="01d1b38">
       <dialogexit status="0" reason="Dialog terminated"/>
     </event>
   </mscivr>


J2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 76adc41122c1 200


K1. AS -> MS (CFW CONTROL, unjoin)
----------------------------------
   CFW 4e6afb6625e4 CONTROL
   Control-Package: msc-mixer/1.0
   Content-Type: application/msc-mixer+xml
   Content-Length: 127

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <unjoin id1="873975758:a5105056" id2="54b4ab3"/>
   </mscmixer>









Amirante, et al.              Informational                   [Page 125]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


K2. AS <- MS (CFW 200 OK)
-------------------------
   CFW 4e6afb6625e4 200
   Timeout: 10
   Content-Type: application/msc-mixer+xml
   Content-Length: 122

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <response status="200" reason="Join removed"/>
   </mscmixer>


L1. AS <- MS (CFW CONTROL unjoin-notify event)
----------------------------------------------
   CFW 577696293504 CONTROL
   Control-Package: msc-mixer/1.0
   Content-Type: application/msc-mixer+xml
   Content-Length: 157

   <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <event>
       <unjoin-notify status="0"
                      id1="873975758:a5105056" id2="54b4ab3"/>
     </event>
   </mscmixer>


L2. AS -> MS (CFW 200, ACK to 'CONTROL event')
----------------------------------------------
   CFW 577696293504 200

7.  Media Resource Brokering

   All the flows presented so far describe the interaction between a
   single AS and a single MS.  This is the simplest topology that can be
   envisaged in a MEDIACTRL-compliant architecture, but it's not the
   only topology that is allowed.  [RFC5567] presents several possible
   topologies that potentially involve several AS and several MS as
   well.  To properly allow for such topologies, an additional element
   called the Media Resource Broker (MRB) has been introduced in the
   MEDIACTRL architecture.  Such an entity, and the protocols needed to
   interact with it, has been standardized in [RFC6917].









Amirante, et al.              Informational                   [Page 126]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   An MRB is basically a locator that is aware of a pool of MS and makes
   them available to interested AS according to their requirements.  For
   this reason, two different interfaces have been introduced:

   o  the Publishing interface (Section 7.1), which allows an MRB to
      subscribe for notifications at the MS it is handling (e.g.,
      available and occupied resources, current state, etc.).

   o  the Consumer interface (Section 7.2), which allows an interested
      AS to query an MRB for an MS capable of fulfilling its
      requirements.

   The flows in the following sections will present some typical
   use-case scenarios involving an MRB and the different topologies in
   which it has been conceived to work.

   Additionally, a few considerations on the handling of media dialogs
   whenever an MRB is involved are presented in Section 7.3.

7.1.  Publishing Interface

   An MRB uses the MS's Publishing interface to acquire relevant
   information.  This Publishing interface, as specified in [RFC6917],
   is made available as a Control Package for the Media Control Channel
   Framework.  This means that in order to receive information from an
   MS, an MRB must negotiate a Control Channel as explained in
   Section 5.  This package allows an MRB to either request information
   in the form of a direct request/answer from an MS or subscribe for
   events.

   Of course, since the MRB is interested in the Publishing interface,
   the previously mentioned negotiation must be changed in order to take
   into account the need for the MRB Control Package.  The name of this
   package is 'mrb-publish/1.0', which means that the SYNC might look
   like the following:

   1. MRB -> MS (CFW SYNC)
   -----------------------
      CFW 6b8b4567327b SYNC
      Dialog-ID: z9hG4bK-4542-1-0
      Keep-Alive: 100
      Packages: msc-ivr/1.0,msc-mixer/1.0,mrb-publish/1.0









Amirante, et al.              Informational                   [Page 127]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   2. MRB <- MS (CFW 200)
   ----------------------
      CFW 6b8b4567327b 200
      Keep-Alive: 100
      Packages: msc-ivr/1.0,msc-mixer/1.0,mrb-publish/1.0
      Supported: msc-example-pkg/1.0

   The meaning of this negotiation was presented previously.  It is
   enough to point out that the MRB in this case adds a new item to the
   'Packages' it needs support for (mrb-publish/1.0).  In this case, the
   MS supports it, and in fact it is added to the negotiated packages in
   the reply:

           Packages: msc-ivr/1.0,msc-mixer/1.0,mrb-publish/1.0
                                               ^^^^^^^^^^^^^^^

   The MS as described in Section 5, on the other hand, did not have
   support for that package, since only 'msc-example-pkg/1.0' was part
   of the 'Supported' list.
































Amirante, et al.              Informational                   [Page 128]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   Figure 47 presents a ladder diagram of a typical interaction based on
   the MRB Control Package.

         MRB                                            MS
          |                                              |
          | A1. CONTROL (MRB subscription)               |
          |--------------------------------------------->|
          |                                   A2. 200 OK |
          |<---------------------------------------------|
          |                                              |--+ collect
          |                                              |  | requested
          |                                              |<-+ info
          |               B1. CONTROL (MRB notification) |
          |<---------------------------------------------|
          | B2. 200 OK                                   |
          |--------------------------------------------->|
          |                                              |
          .                                              .
          .                                              .
          |                                              |
          |                                              |--+ collect
          |                                              |  | up-to-date
          |                                              |<-+ info
          |               C1. CONTROL (MRB notification) |
          |<---------------------------------------------|
          | C2. 200 OK                                   |
          |--------------------------------------------->|
          |                                              |
          .                                              .
          .                                              .
          |                                              |
          | D1. CONTROL (Update MRB subscription)        |
          |--------------------------------------------->|
          |                                   D2. 200 OK |
          |<---------------------------------------------|
          |                                              |
          .                                              .
          .                                              .

    Figure 47: Media Resource Brokering: Subscription and Notification











Amirante, et al.              Informational                   [Page 129]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   In this example, the MRB subscribes for information at the specified
   MS, and events are triggered on a regular, negotiated basis.  All of
   these messages flow through the Control Channel, as do all of the
   messages discussed in this document.  The framework transaction steps
   are as follows:

   o  The MRB sends a new CONTROL message (A1) addressed to the MRB
      package (mrb-publish/1.0); it is a subscription for information
      (<subscription>), and the MRB is asking to be notified at least
      every 10 minutes (<minfrequency>) or, if required, every 30
      seconds at maximum.  The subscription must last 30 minutes
      (<expires>), after which no additional notifications must be sent.

   o  The MS acknowledges the request (A2) and sends notification of the
      success of the request in a 200 OK message (<mrbresponse>).

   o  The MS prepares and sends the first notification to the MRB (B1).
      As has been done with other packages, the notification has been
      sent as an MS-generated CONTROL message; it is a notification
      related to the request in the first message, because the 'id'
      (p0T65U) matches that request.  All of the information that the
      MRB subscribed for is provided in the payload.

   o  The MRB acknowledges the notification (B2) and uses the retrieved
      information to update its own information as part of its business
      logic.

   o  The previous step (the MRB acknowledges notifications and uses the
      retrieved information) repeats at the required frequency, with
      up-to-date information.

   o  After a while, the MRB updates its subscription (D1) to get more
      frequent updates (minfrequency=1, an update every second at
      least).  The MS accepts the update (D2), although it may adjust
      the frequency in the reply according to its policies (e.g., a
      lower rate, such as minfrequency=30).  The notifications continue,
      but at the newer rate; the expiration is also updated accordingly
      (600 seconds again, since the update refreshes it).













Amirante, et al.              Informational                   [Page 130]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


A1. MRB -> MS (CONTROL, publish request)
----------------------------------------
   CFW lidc30BZObiC CONTROL
   Control-Package: mrb-publish/1.0
   Content-Type: application/mrb-publish+xml
   Content-Length: 337

   <mrbpublish version="1.0" xmlns="urn:ietf:params:xml:ns:mrb-publish">
      <mrbrequest>
         <subscription action="create" seqnumber="1" id="p0T65U">
            <expires>60</expires>
            <minfrequency>600</minfrequency>
            <maxfrequency>30</maxfrequency>
         </subscription>
      </mrbrequest>
   </mrbpublish>


A2. MRB <- MS (200 to CONTROL, request accepted)
------------------------------------------------
   CFW lidc30BZObiC 200
   Timeout: 10
   Content-Type: application/mrb-publish+xml
   Content-Length: 139

   <mrbpublish version="1.0" xmlns="urn:ietf:params:xml:ns:mrb-publish">
           <mrbresponse status="200" reason="OK: Request accepted"/>
   </mrbpublish>


B1. MRB <- MS (CONTROL, event notification from MS)
---------------------------------------------------
   CFW 03fff52e7b7a CONTROL
   Control-Package: mrb-publish/1.0
   Content-Type: application/mrb-publish+xml
   Content-Length: 4157

   <mrbpublish version="1.0"
             xmlns="urn:ietf:params:xml:ns:mrb-publish">
    <mrbnotification seqnumber="1" id="p0T65U">
        <media-server-id>a1b2c3d4</media-server-id>
        <supported-packages>
            <package name="msc-ivr/1.0"/>
            <package name="msc-mixer/1.0"/>
            <package name="mrb-publish/1.0"/>
            <package name="msc-example-pkg/1.0"/>
        </supported-packages>




Amirante, et al.              Informational                   [Page 131]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


        <active-rtp-sessions>
            <rtp-codec name="audio/basic">
                <decoding>10</decoding>
                <encoding>20</encoding>
            </rtp-codec>
        </active-rtp-sessions>
        <active-mixer-sessions>
            <active-mix conferenceid="7cfgs43">
                <rtp-codec name="audio/basic">
                    <decoding>3</decoding>
                    <encoding>3</encoding>
                </rtp-codec>
            </active-mix>
        </active-mixer-sessions>
        <non-active-rtp-sessions>
            <rtp-codec name="audio/basic">
                <decoding>50</decoding>
                <encoding>40</encoding>
            </rtp-codec>
        </non-active-rtp-sessions>
        <non-active-mixer-sessions>
            <non-active-mix available="15">
                <rtp-codec name="audio/basic">
                    <decoding>15</decoding>
                    <encoding>15</encoding>
                </rtp-codec>
            </non-active-mix>
        </non-active-mixer-sessions>
        <media-server-status>active</media-server-status>
        <supported-codecs>
            <supported-codec name="audio/basic">
                <supported-codec-package name="msc-ivr/1.0">
                    <supported-action>encoding</supported-action>
                    <supported-action>decoding</supported-action>
                </supported-codec-package>
                <supported-codec-package name="msc-mixer/1.0">
                    <supported-action>encoding</supported-action>
                    <supported-action>decoding</supported-action>
                </supported-codec-package>
            </supported-codec>
        </supported-codecs>










Amirante, et al.              Informational                   [Page 132]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


        <application-data>TestbedPrototype</application-data>
        <file-formats>
            <supported-format name="audio/x-wav">
                <supported-file-package>
                    msc-ivr/1.0
                </supported-file-package>
            </supported-format>
        </file-formats>
        <max-prepared-duration>
            <max-time max-time-seconds="3600">
                <max-time-package>msc-ivr/1.0</max-time-package>
            </max-time>
        </max-prepared-duration>
        <dtmf-support>
            <detect>
                <dtmf-type package="msc-ivr/1.0" name="RFC4733"/>
                <dtmf-type package="msc-mixer/1.0" name="RFC4733"/>
            </detect>
            <generate>
                <dtmf-type package="msc-ivr/1.0" name="RFC4733"/>
                <dtmf-type package="msc-mixer/1.0" name="RFC4733"/>
            </generate>
            <passthrough>
                <dtmf-type package="msc-ivr/1.0" name="RFC4733"/>
                <dtmf-type package="msc-mixer/1.0" name="RFC4733"/>
            </passthrough>
        </dtmf-support>
        <mixing-modes>
            <audio-mixing-modes>
                <audio-mixing-mode package="msc-ivr/1.0"> \
                     nbest \
                </audio-mixing-mode>
            </audio-mixing-modes>
            <video-mixing-modes activespeakermix="true" vas="true">
                <video-mixing-mode package="msc-mixer/1.0"> \
                     single-view \
                </video-mixing-mode>
                <video-mixing-mode package="msc-mixer/1.0"> \
                     dual-view \
                </video-mixing-mode>
                <video-mixing-mode package="msc-mixer/1.0"> \
                     dual-view-crop \
                </video-mixing-mode>
                <video-mixing-mode package="msc-mixer/1.0"> \
                     dual-view-2x1 \
                </video-mixing-mode>





Amirante, et al.              Informational                   [Page 133]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


                <video-mixing-mode package="msc-mixer/1.0"> \
                     dual-view-2x1-crop \
                </video-mixing-mode>
                <video-mixing-mode package="msc-mixer/1.0"> \
                     quad-view \
                </video-mixing-mode>
                <video-mixing-mode package="msc-mixer/1.0"> \
                     multiple-5x1 \
                </video-mixing-mode>
                <video-mixing-mode package="msc-mixer/1.0"> \
                     multiple-3x3 \
                </video-mixing-mode>
                <video-mixing-mode package="msc-mixer/1.0"> \
                     multiple-4x4 \
                </video-mixing-mode>
            </video-mixing-modes>
        </mixing-modes>
        <supported-tones>
            <supported-country-codes>
                <country-code package="msc-ivr/1.0">GB</country-code>
                <country-code package="msc-ivr/1.0">IT</country-code>
                <country-code package="msc-ivr/1.0">US</country-code>
            </supported-country-codes>
            <supported-h248-codes>
                <h248-code package="msc-ivr/1.0">cg/*</h248-code>
                <h248-code package="msc-ivr/1.0">biztn/ofque</h248-code>
                <h248-code package="msc-ivr/1.0">biztn/erwt</h248-code>
                <h248-code package="msc-mixer/1.0">conftn/*</h248-code>
            </supported-h248-codes>
        </supported-tones>
        <file-transfer-modes>
            <file-transfer-mode package="msc-ivr/1.0" name="HTTP"/>
        </file-transfer-modes>
        <asr-tts-support>
            <asr-support>
                <language xml:lang="en"/>
            </asr-support>
            <tts-support>
                <language xml:lang="en"/>
            </tts-support>
        </asr-tts-support>
        <vxml-support>
            <vxml-mode package="msc-ivr/1.0" support="rfc6231"/>
        </vxml-support>







Amirante, et al.              Informational                   [Page 134]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


        <media-server-location>
            <civicAddress xml:lang="it">
                <country>IT</country>
                <A1>Campania</A1>
                <A3>Napoli</A3>
                <A6>Via Claudio</A6>
                <HNO>21</HNO>
                <LMK>University of Napoli Federico II</LMK>
                <NAM>Dipartimento di Informatica e Sistemistica</NAM>
                <PC>80210</PC>
            </civicAddress>
        </media-server-location>
        <label>TestbedPrototype-01</label>
        <media-server-address>
            sip:MediaServer@ms.example.net
        </media-server-address>
        <encryption/>
    </mrbnotification>
   </mrbpublish>


B2. MRB -> MS (200 to CONTROL)
------------------------------
   CFW 03fff52e7b7a 200


(C1 and C2 omitted for brevity)


D1. MRB -> MS (CONTROL, publish request)
----------------------------------------
CFW pyu788fc32wa CONTROL
Control-Package: mrb-publish/1.0
Content-Type: application/mrb-publish+xml
Content-Length: 342

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mrbpublish version="1.0" xmlns="urn:ietf:params:xml:ns:mrb-publish">
    <mrbrequest>
        <subscription action="update" seqnumber="2" id="p0T65U">
            <expires>600</expires>
            <minfrequency>1</minfrequency>
        </subscription>
    </mrbrequest>
</mrbpublish>






Amirante, et al.              Informational                   [Page 135]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


D2. MRB <- MS (200 to CONTROL, request accepted)
------------------------------------------------
CFW pyu788fc32wa 200
Timeout: 10
Content-Type: application/mrb-publish+xml
Content-Length: 332

<mrbpublish version="1.0" xmlns="urn:ietf:params:xml:ns:mrb-publish">
    <mrbresponse status="200" reason="OK: Request accepted">
        <subscription action="create" seqnumber="2" id="p0T65U">
            <expires>600</expires>
            <minfrequency>30</minfrequency>
        </subscription>
    </mrbresponse>
</mrbpublish>

7.2.  Consumer Interface

   Whereas the Publishing interface is used by an MS to publish its
   functionality and up-to-date information to an MRB, the Consumer
   interface is used by an interested AS to access a resource.  An AS
   can use the Consumer interface to contact an MRB and describe the
   resources it needs.  The MRB then replies with the needed
   information: specifically, the address of an MS that is capable of
   meeting the requirements.

   However, unlike the Publishing interface, the Consumer interface is
   not specified as a Control Package.  Rather, it is conceived as an
   XML-based protocol that can be transported by means of either HTTP or
   SIP, as will be shown in the following sections.

   As specified in [RFC6917], the Consumer interface can be involved in
   two topologies: Query mode and Inline mode.  In the Query mode
   (Section 7.2.1), the Consumer requests and responses are conveyed by
   means of HTTP.  Once the AS gets the answer, the usual MEDIACTRL
   interactions occur between the AS and the MS chosen by the MRB.  By
   contrast, in the Inline mode, the MRB is in the path between the AS
   and the pool of MS it is handling.  In this case, an AS can place
   Consumer requests using SIP as a transport, by means of a multipart
   payload (Section 7.2.2) containing the Consumer request itself and an
   SDP related either to the creation of a Control Channel or to a UAC
   media dialog.  This is called Inline-aware mode, since it assumes
   that the interested AS knows that an MRB is in place and knows how to
   talk to it.  The MRB is also conceived to work with AS that are
   unaware of its functionality, i.e., unaware of the Consumer
   interface.  In this kind of scenario, the Inline mode is still used,
   but with the AS thinking the MRB it is talking to is actually an MS.
   This approach is called Inline-unaware mode (Section 7.2.3).



Amirante, et al.              Informational                   [Page 136]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


7.2.1.  Query Mode

   As discussed in the previous section, in the Query mode the AS sends
   Consumer requests by means of HTTP.  Specifically, an HTTP POST is
   used to convey the request.  The MRB is assumed to send its response
   by means of an HTTP 200 OK reply.  Since a successful Consumer
   response contains information to contact a specific MS (the MS the
   MRB has deemed most capable of fulfilling the AS's requirements), an
   AS can subsequently directly contact the MS, as described in
   Section 5.  This means that in the Query mode the MRB acts purely as
   a locator, and then the AS and the MS can talk 1:1.

   Figure 48 presents a ladder diagram of a typical Consumer request in
   the Query topology:

     AS                                             MRB
      |                                              |
      | 1. HTTP POST (Consumer request)              |
      |--------------------------------------------->|
      |                                              |
      |                                              |
      |                                              |--+ Parse request
      |                                              |  | and see if any
      |                                              |<-+ MS applies
      |                                              |
      |                2. 200 OK (Consumer response) |
      |<---------------------------------------------|
      |                                              |
      |--+ Parse response and                        |
      |  | start session (SIP/COMEDIA/CFW)           |
      |<-+ with MS reported by MRB                   |
      |                                              |
      .                                              .
      .                                              .

              Figure 48: Media Resource Brokering: Query Mode

   In this example, the AS is interested in an MS meeting a defined set
   of requirements.  The MS must:

   1.  support both the IVR and Mixer packages.

   2.  provide at least 10 G.711 encoding/decoding RTP sessions for IVR
       purposes.

   3.  support HTTP-based streaming and support for the audio/x-wav file
       format in the IVR package.




Amirante, et al.              Informational                   [Page 137]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   These requirements are properly formatted according to the MRB
   Consumer syntax.  The framework transaction steps are as follows:

   o  The AS sends an HTTP POST message to the MRB (1).  The payload is,
      of course, the Consumer request, which is reflected by the
      Content-Type header (application/mrb-consumer+xml).  The Consumer
      request (<mediaResourceRequest>, uniquely identified by its 'id'
      attribute set to the random value 'n3un93wd'), includes some
      general requirements (<generalInfo>) and some IVR-specific
      requirements (<ivrInfo>).  The general part of the requests
      contains the set of required packages (<packages>).  The
      IVR-specific section contains requirements concerning the number
      of required IVR sessions (<ivr-sessions>), the file formats that
      are to be supported (<file-formats>), and the required file
      transfer capabilities (<file-transfer-modes>).

   o  The MRB gets the request and parses it.  Then, according to its
      business logic, it realizes it can't find a single MS capable of
      targeting the request and as a consequence picks two MS instances
      that can handle 60 and 40 of the requested sessions, respectively.
      It prepares a Consumer response (2) to provide the AS with the
      requested information.  The response (<mediaResourceResponse>,
      which includes the same 'id' attribute as the request) indicates
      success (status=200) and includes the relevant information
      (<response-session-info>).  Specifically, the response includes
      transaction-related information (the same session-id and seq
      provided by the AS in its request, to allow proper request/
      response matching) together with information on the duration of
      the reservation (expires=3600, i.e., after an hour the request
      will expire) and the SIP addresses of the chosen MS.

   Note how the sequence number the MRB returned is not 1.  According to
   the MRB specification, this is the starting value to increment for
   the sequence number to be used in subsequent requests.  This means
   that should the AS want to update or remove the session it should use
   10 as a value for the sequence number in the related request.
   According to Section 12 of [RFC6917], this random value for the first
   sequence number is also a way to help prevent a malicious entity from
   messing with or disrupting another AS session with the MRB.  In fact,
   sequence numbers in requests and responses have to match, and failure
   to provide the correct sequence number would result in session
   failure and a 405 error message.









Amirante, et al.              Informational                   [Page 138]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


1. AS -> MRB (HTTP POST, Consumer request)
------------------------------------------
 POST /Mrb/Consumer HTTP/1.1
 Content-Length: 893
 Content-Type: application/mrb-consumer+xml
 Host: mrb.example.com:8080
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.0.1 (java 1.5)

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <mrbconsumer version="1.0" xmlns="urn:ietf:params:xml:ns:mrb-consumer">
    <mediaResourceRequest id="n3un93wd">
        <generalInfo>
            <packages>
                <package>msc-ivr/1.0</package>
                <package>msc-mixer/1.0</package>
            </packages>
        </generalInfo>
        <ivrInfo>
            <ivr-sessions>
                <rtp-codec name="audio/basic">
                    <decoding>100</decoding>
                    <encoding>100</encoding>
                </rtp-codec>
            </ivr-sessions>
            <file-formats>
                <required-format name="audio/x-wav"/>
            </file-formats>
            <file-transfer-modes>
                <file-transfer-mode package="msc-ivr/1.0" name="HTTP"/>
            </file-transfer-modes>
        </ivrInfo>
    </mediaResourceRequest>
 </mrbconsumer>


2. AS <- MRB (200 to POST, Consumer response)
---------------------------------------------
 HTTP/1.1 200 OK
 X-Powered-By: Servlet/2.5
 Server: Sun GlassFish Communications Server 1.5
 Content-Type: application/mrb-consumer+xml;charset=ISO-8859-1
 Content-Length: 1146
 Date: Thu, 28 Jul 2011 10:34:45 GMT







Amirante, et al.              Informational                   [Page 139]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <mrbconsumer version="1.0" xmlns="urn:ietf:params:xml:ns:mrb-consumer">
    <mediaResourceResponse reason="Resource found" status="200"
                           id="n3un93wd">
        <response-session-info>
            <session-id>z603G3yaUzM8</session-id>
            <seq>9</seq>
            <expires>3600</expires>
            <media-server-address
                              uri="sip:MediaServer@ms.example.com:5080">
                <ivr-sessions>
                    <rtp-codec name="audio/basic">
                        <decoding>60</decoding>
                        <encoding>60</encoding>
                    </rtp-codec>
                </ivr-sessions>
            </media-server-address>
            <media-server-address
                       uri="sip:OtherMediaServer@pool.example.net:5080">
                <ivr-sessions>
                    <rtp-codec name="audio/basic">
                        <decoding>40</decoding>
                        <encoding>40</encoding>
                    </rtp-codec>
                </ivr-sessions>
            </media-server-address>
        </response-session-info>
    </mediaResourceResponse>
 </mrbconsumer>

   For the sake of conciseness, the subsequent steps are not presented.
   They are very trivial, since they basically consist of the AS issuing
   a COMEDIA negotiation with either of the obtained MS, as already
   presented in Section 5.  The same can be said with respect to
   attaching UAC media dialogs.  In fact, since after the Query the
   AS<->MS interaction becomes 1:1, UAC media dialogs can be redirected
   directly to the proper MS using the 3PCC approach, e.g., as shown in
   Figure 10.

7.2.2.  Inline-Aware Mode

   Unlike the Query mode, in the Inline-Aware MRB Mode (IAMM) the AS
   sends Consumer requests by means of SIP.  Of course, saying that the
   transport changes from HTTP to SIP is not as trivial as it seems.  In
   fact, HTTP and SIP behave in very different ways, and this is
   reflected in the way the Inline-aware mode is conceived.





Amirante, et al.              Informational                   [Page 140]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   An AS willing to issue a Consumer request by means of SIP has to do
   so by means of an INVITE.  As specified in [RFC6917], the payload of
   the INVITE can't contain only the Consumer request itself.  In fact,
   the Consumer request is assumed to be carried within a SIP
   transaction.  A Consumer session is not strictly associated with the
   lifetime of any SIP transaction, meaning that Consumer requests
   belonging to the same session may be transported over different SIP
   messages; therefore, a hangup on any of these SIP dialogs would not
   affect a Consumer session.

   That said, as documented in [RFC6230], [RFC6917] envisages two kinds
   of SIP dialogs over which a Consumer request may be sent: a SIP
   control dialog (a SIP dialog sent by the AS in order to set up a
   Control Channel) and a UAC media dialog (a SIP dialog sent by the AS
   in order to attach a UAC to an MS).  In both cases, the AS would
   prepare a multipart/mixed payload to achieve both ends, i.e.,
   receiving a reply to its Consumer request and effectively carrying on
   the negotiation described in the SDP payload.

   The behaviors in the two cases, which are called the CFW-based
   approach and the media dialog-based approach, respectively, are only
   slightly different, but both will be presented to clarify how they
   could be exploited.  To make things clearer for the reader, the same
   Consumer request as the Consumer request presented in the Query mode
   will be sent, in order to clarify how the behavior of the involved
   parties may differ.

7.2.2.1.  Inline-Aware Mode: CFW-Based Approach

   Figure 49 presents a ladder diagram of a typical Consumer request in
   the CFW-based Inline-aware topology:

   AS                      MRB                          MS
    |                       |                           |
    | 1. INVITE             |                           |
    | (multipart/mixed:     |                           |
    |  application/cfw,     |                           |
    |  application/mrb-consumer+xml)                    |
    |---------------------->|                           |
    |       2. 100 (Trying) |                           |
    |<----------------------|                           |
    |                       |--+ Extract SDP and        |
    |                       |  | MRB payloads; handle   |
    |                       |<-+ Consumer request to    |
    |                       |    pick MS                |
    |                       |                           |





Amirante, et al.              Informational                   [Page 141]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


    |                       | 3. INVITE                 |
    |                       | (application/cfw from 1.) |
    |                       |-------------------------->|
    |                       |           4. 100 (Trying) |
    |                       |<--------------------------|
    |                       |                           |--+ Negotiate
    |                       |                           |  | CFW Control
    |                       |                           |<-+ Channel
    |                       |                 5. 200 OK |
    |                       | (application/cfw from MS) |
    |                       |<--------------------------|
    |                       | 6. ACK                    |
    |                       |-------------------------->|
    |        Prepare new +--|                           |
    |       payload with |  |                           |
    |    SDP from MS and +->|                           |
    |     Consumer reply    |                           |
    |                       |                           |
    |             7. 200 OK |                           |
    |     (multipart/mixed: |                           |
    |      application/cfw from MS,                     |
    |      application/mrb-consumer+xml)                |
    |<----------------------|                           |
    | 8. ACK                |                           |
    |---------------------->|                           |
    |                       |                           |
    |--+ Read Consumer      |                           |
    |  | reply and use SDP  |                           |
    |<-+ to create CFW Chn. |                           |
    |                       |                           |
    |                                                   |
    |<<############## TCP CONNECTION #################>>|
    |                                                   |
    | CFW SYNC                                          |
    |++++++++++++++++++++++++++++++++++++++++++++++++++>|
    |                                                   |
    .                       .                           .
    .                       .                           .

     Figure 49: Media Resource Brokering: CFW-Based Inline-Aware Mode

   To make the scenario easier to understand, we assume that the AS is
   interested in exactly the same set of requirements as those presented
   in Section 7.2.1.  This means that the Consumer request originated by
   the AS will be the same as before, with only the transport/topology
   changing.





Amirante, et al.              Informational                   [Page 142]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   Please note that to make the protocol contents easier to read, a
   simple 'Part' is used whenever a boundary for a multipart/mixed
   payload is provided, instead of the actual boundary that would be
   inserted in the SIP messages.

   The framework transaction steps (for simplicity's sake, only the
   payloads, and not the complete SIP transactions, are reported) are as
   follows:

1. AS -> MRB (INVITE multipart/mixed)
-------------------------------------
   [..]
   Content-Type: multipart/mixed;boundary="Part"

   --Part
   Content-Type: application/sdp

   v=0
   o=- 2890844526 2890842807 IN IP4 as.example.com
   s=MediaCtrl
   c=IN IP4 as.example.com
   t=0 0
   m=application 48035 TCP cfw
   a=connection:new
   a=setup:active
   a=cfw-id:vF0zD4xzUAW9

   --Part
   Content-Type: application/mrb-consumer+xml

   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <mrbconsumer version="1.0"
                xmlns="urn:ietf:params:xml:ns:mrb-consumer">
     <mediaResourceRequest id="fr34asx1">
        <generalInfo>
            <packages>
                <package>msc-ivr/1.0</package>
                <package>msc-mixer/1.0</package>
            </packages>
        </generalInfo>
        <ivrInfo>
            <ivr-sessions>
                <rtp-codec name="audio/basic">
                    <decoding>100</decoding>
                    <encoding>100</encoding>
                </rtp-codec>
            </ivr-sessions>




Amirante, et al.              Informational                   [Page 143]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


            <file-formats>
                <required-format name="audio/x-wav"/>
            </file-formats>
            <file-transfer-modes>
                <file-transfer-mode package="msc-ivr/1.0" name="HTTP"/>
            </file-transfer-modes>
        </ivrInfo>
     </mediaResourceRequest>
   </mrbconsumer>

   --Part


3. MRB -> MS (INVITE SDP only)
------------------------------
   [..]
   Content-Type: application/sdp

   v=0
   o=- 2890844526 2890842807 IN IP4 as.example.com
   s=MediaCtrl
   c=IN IP4 as.example.com
   t=0 0
   m=application 48035 TCP cfw
   a=connection:new
   a=setup:active
   a=cfw-id:vF0zD4xzUAW9


5. MRB <- MS (200 OK SDP)
-------------------------
   [..]
   Content-Type: application/sdp

   v=0
   o=lminiero 2890844526 2890842808 IN IP4 ms.example.net
   s=MediaCtrl
   c=IN IP4 ms.example.net
   t=0 0
   m=application 7575 TCP cfw
   a=connection:new
   a=setup:passive
   a=cfw-id:vF0zD4xzUAW9








Amirante, et al.              Informational                   [Page 144]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


7. AS <- MRB (200 OK multipart/mixed)
-------------------------------------
   [..]
   Content-Type: multipart/mixed;boundary="Part"

   --Part
   Content-Type: application/sdp

   v=0
   o=lminiero 2890844526 2890842808 IN IP4 ms.example.net
   s=MediaCtrl
   c=IN IP4 ms.example.net
   t=0 0
   m=application 7575 TCP cfw
   a=connection:new
   a=setup:passive
   a=cfw-id:vF0zD4xzUAW9

   --Part
   Content-Type: application/mrb-consumer+xml

   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <mrbconsumer version="1.0"
                xmlns="urn:ietf:params:xml:ns:mrb-consumer">
     <mediaResourceResponse reason="Resource found" status="200"
                            id="fr34asx1">
        <response-session-info>
            <session-id>z603G3yaUzM8</session-id>
            <seq>9</seq>
            <expires>3600</expires>
            <media-server-address
                              uri="sip:MediaServer@ms.example.com:5080">
                <connection-id>32pbdxZ8:KQw677BF</connection-id>
                <ivr-sessions>
                    <rtp-codec name="audio/basic">
                        <decoding>60</decoding>
                        <encoding>60</encoding>
                    </rtp-codec>
                </ivr-sessions>
            </media-server-address>











Amirante, et al.              Informational                   [Page 145]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


            <media-server-address
                       uri="sip:OtherMediaServer@pool.example.net:5080">
                <ivr-sessions>
                    <rtp-codec name="audio/basic">
                        <decoding>40</decoding>
                        <encoding>40</encoding>
                    </rtp-codec>
                </ivr-sessions>
            </media-server-address>
        </response-session-info>
     </mediaResourceResponse>
   </mrbconsumer>

   --Part

   The sequence diagram and the dumps effectively show the different
   approach with respect to the Query mode.  The SIP INVITE sent by the
   AS (1.) includes both a Consumer request (the same as before) and an
   SDP to negotiate a CFW channel with an MS.  The MRB takes care of the
   request exactly as before (provisioning two MS instances) but with a
   remarkable difference: first of all, it picks one of the two MS
   instances on behalf of the AS (negotiating the Control Channel in
   steps 3 to 6) and only then replies to the AS with both the MS side
   of the SDP negotiation (with information on how to set up the Control
   Channel) and the Consumer response itself.

   The Consumer response is also slightly different in the first place.
   In fact, as can be seen in 7., there's an additional element
   (<connection-id>) that the MRB has added to the message.  This
   element contains the 'connection-id' that the AS and MS would have
   built out of the 'From' and 'To' tags as explained in Section 6, had
   the AS contacted the MS directly.  Since the MRB has actually done
   the negotiation on behalf of the AS, without this information the AS
   and MS would refer to different connectionid attributes to target the
   same dialog, thus causing the CFW protocol not to behave as expected.
   This aspect will be more carefully described in the next section (for
   the media dialog-based approach), since the 'connection-id' attribute
   is strictly related to media sessions.

   As before, for the sake of conciseness the subsequent steps of the
   previous transaction are quite trivial and therefore are not
   presented.  In fact, as shown in the flow, the SIP negotiation has
   resulted in both the AS and the chosen MS negotiating a Control
   Channel.  This means that the AS is only left to instantiate the
   Control Channel and send CFW requests according to its application
   logic.





Amirante, et al.              Informational                   [Page 146]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   It is worthwhile to highlight the fact that, as in the Query example,
   the AS gets the addresses of both of the chosen MS in this example as
   well, since a Consumer transaction has taken place.  This means that,
   just as in the Query case, any UAC media dialog can be redirected
   directly to the proper MS using the 3PCC approach, e.g., as shown in
   Figure 10, rather than again using the MRB as a Proxy/B2BUA.  Of
   course, a separate SIP control dialog would be needed before
   attempting to use the second MS instance.

7.2.2.2.  Inline-Aware Mode: Media Dialog-Based Approach

   There's a second way to take advantage of the IAMM mode, i.e.,
   exploiting SIP dialogs related to UAC media dialogs as 'vessels' for
   Consumer messages.  As will be made clearer in the following sequence
   diagram and protocol dumps, this scenario does not differ much from
   the scenario presented in Section 7.2.2.1 with respect to the
   Consumer request/response, but it may be useful to compare these two
   scenarios and show how they may differ with respect to the management
   of the media dialog itself and any CFW Control Channel that may be
   involved.

   Figure 50 presents a ladder diagram of a typical Consumer request in
   the media dialog-based Inline-aware topology:

   UAC              AS                     MRB                        MS
    |               |                       |                          |
    | 1. INVITE     |                       |                          |
    | (audio/video) |                       |                          |
    |-------------->|                       |                          |
    | 2. 100 Trying |                       |                          |
    |<--------------|                       |                          |
    |               | 3. INVITE             |                          |
    |               | (multipart/mixed:     |                          |
    |               |  audio/video from 1., |                          |
    |               |  application/mrb-consumer+xml)                   |
    |               |---------------------->|                          |
    |               |       4. 100 (Trying) |                          |
    |               |<----------------------|                          |
    |               |                       |--+ Extract SDP and       |
    |               |                       |  | MRB payloads; handle  |
    |               |                       |<-+ Consumer request to   |
    |               |                       |    pick Media Servers    |
    |               |                       |                          |
    |               |                       | 5. INVITE                |
    |               |                       | (audio/video from 3.)    |
    |               |                       |------------------------->|





Amirante, et al.              Informational                   [Page 147]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


    |               |                       |          6. 100 (Trying) |
    |               |                       |<-------------------------|
    |               |                       |                       +--|
    |               |                       |   Handle media dialog |  |
    |               |                       |       (connection-id) +->|
    |               |                       |                          |
    |               |                       |                7. 200 OK |
    |               |                       |    (audio/video from MS) |
    |               |                       |<-------------------------|
    |               |                       | 8. ACK                   |
    |               |                       |------------------------->|
    |               |        Prepare new +--|                          |
    |               |       payload with |  |                          |
    |               |    SDP from MS and +->|                          |
    |               |     Consumer reply    |                          |
    |               |                       |                          |
    |               |             9. 200 OK |                          |
    |               |     (multipart/mixed: |                          |
    |               |      audio/video from MS,                        |
    |               |      application/mrb-consumer+xml)               |
    |               |<----------------------|                          |
    |               | 10. ACK               |                          |
    |               |---------------------->|                          |
    |               |                       |                          |
    |               |--+ Read Consumer      |                          |
    |               |  | reply and send     |                          |
    |               |<-+ SDP back to UAC    |                          |
    |    11. 200 OK |                       |                          |
    |(audio/video from MS)                  |                          |
    |<--------------|                       |                          |
    | 12. ACK       |                       |                          |
    |-------------->|                       |                          |
    |               |                       |                          |
    |<<*************************** RTP ******************************>>|
    |               |                       |                          |
    |               |--+ Negotiate          |                          |
    |               |  | CFW channel        |                          |
    |               |<-+ towards MS         |                          |
    |               |    (if needed)        |                          |
    .               .                       .                          .
    .               .                       .                          .
    |               |                       |                          |
    |               |<<############## TCP CONNECTION ################>>|
    |               |                                                  |







Amirante, et al.              Informational                   [Page 148]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


    |               | CFW SYNC                                         |
    |               |+++++++++++++++++++++++++++++++++++++++++++++++++>|
    |               |                                                  |
    .               .                       .                          .
    .               .                       .                          .

          Figure 50: Media Resource Brokering: Media Dialog-Based
                             Inline-Aware Mode

   To make the scenario easier to understand, we assume that the AS is
   interested in exactly the same set of requirements as those presented
   in Section 7.2.1.  This means that the Consumer request originated by
   the AS will be the same as before, with only the transport/topology
   changing.

   Again, please note that to make the protocol contents easier to read,
   a simple 'Part' is used whenever a boundary for a multipart/mixed
   payload is provided, instead of the actual boundary that would be
   inserted in the SIP messages.

   The framework transaction steps (for simplicity's sake, only the
   relevant headers and payloads, and not the complete SIP transactions,
   are reported) are as follows:

1. UAC -> AS (INVITE with media SDP)
------------------------------------
   [..]
   From: <sip:lminiero@users.example.com>;tag=1153573888
   To: <sip:mediactrlDemo@as.example.com>
   [..]
   Content-Type: application/sdp

   v=0
   o=lminiero 123456 654321 IN IP4 203.0.113.2
   s=A conversation
   c=IN IP4 203.0.113.2
   t=0 0
   m=audio 7078 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000/1
   a=rtpmap:3 GSM/8000/1
   a=rtpmap:8 PCMA/8000/1
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-11
   m=video 9078 RTP/AVP 98







Amirante, et al.              Informational                   [Page 149]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


3. AS -> MRB (INVITE multipart/mixed)
-------------------------------------
   [..]
   From: <sip:ApplicationServer@as.example.com>;tag=fd4fush5
   To: <sip:Mrb@mrb.example.org>
   [..]
   Content-Type: multipart/mixed;boundary="Part"

   --Part
   Content-Type: application/sdp

   v=0
   o=lminiero 123456 654321 IN IP4 203.0.113.2
   s=A conversation
   c=IN IP4 203.0.113.2
   t=0 0
   m=audio 7078 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000/1
   a=rtpmap:3 GSM/8000/1
   a=rtpmap:8 PCMA/8000/1
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-11
   m=video 9078 RTP/AVP 98

   --Part
   Content-Type: application/mrb-consumer+xml

   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <mrbconsumer version="1.0"
                xmlns="urn:ietf:params:xml:ns:mrb-consumer">
    <mediaResourceRequest id="bnv3xc45">
        <generalInfo>
            <packages>
                <package>msc-ivr/1.0</package>
                <package>msc-mixer/1.0</package>
            </packages>
        </generalInfo>
        <ivrInfo>
            <ivr-sessions>
                <rtp-codec name="audio/basic">
                    <decoding>100</decoding>
                    <encoding>100</encoding>
                </rtp-codec>
            </ivr-sessions>
            <file-formats>
                <required-format name="audio/x-wav"/>
            </file-formats>




Amirante, et al.              Informational                   [Page 150]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


            <file-transfer-modes>
                <file-transfer-mode package="msc-ivr/1.0" name="HTTP"/>
            </file-transfer-modes>
        </ivrInfo>
    </mediaResourceRequest>
   </mrbconsumer>

   --Part


5. MRB -> MS (INVITE SDP only)
------------------------------
   [..]
   From: <sip:Mrb@mrb.example.org:5060>;tag=32pbdxZ8
   To: <sip:MediaServer@ms.example.com:5080>
   [..]
   Content-Type: application/sdp

   v=0
   o=lminiero 123456 654321 IN IP4 203.0.113.2
   s=A conversation
   c=IN IP4 203.0.113.2
   t=0 0
   m=audio 7078 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000/1
   a=rtpmap:3 GSM/8000/1
   a=rtpmap:8 PCMA/8000/1
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-11
   m=video 9078 RTP/AVP 98


7. MRB <- MS (200 OK SDP)
-------------------------
   [..]
   From: <sip:Mrb@mrb.example.org:5060>;tag=32pbdxZ8
   To: <sip:MediaServer@ms.example.com:5080>;tag=KQw677BF
   [..]
   Content-Type: application/sdp

   v=0
   o=lminiero 123456 654322 IN IP4 203.0.113.1
   s=MediaCtrl
   c=IN IP4 203.0.113.1
   t=0 0
   m=audio 63442 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:3 GSM/8000



Amirante, et al.              Informational                   [Page 151]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   a=rtpmap:8 PCMA/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=ptime:20
   a=label:7eda834
   m=video 33468 RTP/AVP 98
   a=rtpmap:98 H263-1998/90000
   a=fmtp:98 CIF=2
   a=label:0132ca2


9. AS <- MRB (200 OK multipart/mixed)
-------------------------------------
   [..]
   From: <sip:ApplicationServer@as.example.com>;tag=fd4fush5
   To: <sip:Mrb@mrb.example.org>;tag=117652221
   [..]
   Content-Type: multipart/mixed;boundary="Part"

   --Part
   Content-Type: application/sdp

   v=0
   o=lminiero 123456 654322 IN IP4 203.0.113.1
   s=MediaCtrl
   c=IN IP4 203.0.113.1
   t=0 0
   m=audio 63442 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:3 GSM/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=ptime:20
   a=label:7eda834
   m=video 33468 RTP/AVP 98
   a=rtpmap:98 H263-1998/90000
   a=fmtp:98 CIF=2
   a=label:0132ca2

   --Part
   Content-Type: application/mrb-consumer+xml









Amirante, et al.              Informational                   [Page 152]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <mrbconsumer version="1.0"
                xmlns="urn:ietf:params:xml:ns:mrb-consumer" >
    <mediaResourceResponse reason="Resource found" status="200"
                           id="bnv3xc45">
        <response-session-info>
            <session-id>z1skKYZQ3eFu</session-id>
            <seq>9</seq>
            <expires>3600</expires>
            <media-server-address
                              uri="sip:MediaServer@ms.example.com:5080">
                <connection-id>32pbdxZ8:KQw677BF</connection-id>
                <ivr-sessions>
                    <rtp-codec name="audio/basic">
                        <decoding>60</decoding>
                        <encoding>60</encoding>
                    </rtp-codec>
                </ivr-sessions>
            </media-server-address>
            <media-server-address
                       uri="sip:OtherMediaServer@pool.example.net:5080">
                <ivr-sessions>
                    <rtp-codec name="audio/basic">
                        <decoding>40</decoding>
                        <encoding>40</encoding>
                    </rtp-codec>
                </ivr-sessions>
            </media-server-address>
        </response-session-info>
    </mediaResourceResponse>
   </mrbconsumer>

   --Part


11. UAC <- AS (200 OK SDP)
--------------------------
   [..]
   From: <sip:lminiero@users.example.com>;tag=1153573888
   To: <sip:mediactrlDemo@as.example.com>;tag=bcd47c32
   [..]
   Content-Type: application/sdp

   v=0
   o=lminiero 123456 654322 IN IP4 203.0.113.1
   s=MediaCtrl
   c=IN IP4 203.0.113.1
   t=0 0



Amirante, et al.              Informational                   [Page 153]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   m=audio 63442 RTP/AVP 0 3 8 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:3 GSM/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=ptime:20
   a=label:7eda834
   m=video 33468 RTP/AVP 98
   a=rtpmap:98 H263-1998/90000
   a=fmtp:98 CIF=2
   a=label:0132ca2

   The first obvious difference is that the first INVITE (1.) is not
   originated by the AS itself (the AS was willing to set up a Control
   Channel in the previous example) but by an authorized UAC (e.g., to
   take advantage of a media service provided by the AS).  As such, the
   first INVITE only contains an SDP to negotiate an audio and video
   channel.  The AS in its business logic needs to attach this UAC to an
   MS according to some specific requirements (e.g., the called URI is
   associated to a specific service) and as such prepares a Consumer
   request to be sent to the MRB in order to obtain a valid MS for that
   purpose.  As before, the Consumer request is sent together with the
   SDP to the MRB (3.).  The MRB extracts the Consumer payload and takes
   care of it as usual; it picks two MS instances and attaches the UAC
   to the first MS instance (5.).  Once the MS has successfully
   negotiated the audio and video streams (7.), the MRB takes note of
   the 'connection-id' associated with this call (which will be needed
   afterwards in order to manipulate the audio and video streams for
   this user) and sends back to the AS both the SDP returned by the MS
   and the Consumer response (9.).  The AS extracts the Consumer
   response and takes note of both the MS instances it has been given
   and the connection-id information.  It then completes the scenario by
   sending back to the UAC the SDP returned by the MS (11.).

   At this point, the UAC has successfully been attached to an MS.  The
   AS only needs to set up a Control Channel to that MS, if needed.
   This step may not be required, especially if the Consumer request is
   an update to an existing session rather than the preparation of a new
   session.  Assuming that a Control Channel towards that MS doesn't
   exist yet, the AS creates it as usual by sending an INVITE directly
   to the MS for which it has an address.  Once done with that, it can
   start manipulating the audio and video streams of the UAC.  To do so,
   it refers to the <connection-id> element as reported by the MRB,
   rather than relying on the <connection-id> element that it is aware
   of.  In fact, the AS is aware of a connection-id value (fd4fush5:
   117652221, built out of the messages exchanged with the MRB), while
   the MS is aware of another (32pbdxZ8:KQw677BF, built out of the



Amirante, et al.              Informational                   [Page 154]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   MRB-MS interaction).  The right connection-id is of course the one
   the MS is aware of, and as such the AS refers to that connection-id,
   which the MRB added to the Consumer response just for that purpose.

7.2.3.  Inline-Unaware Mode

   Whereas in the Inline-aware mode the AS knows it is sending an INVITE
   to an MRB and not to an MS, and acts accordingly (using the
   multipart/mixed payload to query for an MS able to fulfill its
   requirements), in the Inline-Unaware MRB Mode (IUMM) the AS does not
   distinguish an MRB from an MS.  This means that an MRB-unaware AS
   having access to an MRB talks to it as if it were a generic MEDIACTRL
   MS: i.e., the AS negotiates a Control Channel directly with the MRB
   and attaches its media dialogs there as well.  Of course, since the
   MRB doesn't provide any MS functionality by itself, it must act as a
   Proxy/B2BUA between the AS and an MS for both the Control Channel
   dialog and the media dialogs.  According to implementation or
   deployment choices, simple redirects could also be exploited for that
   purpose.

   The problem is that without any Consumer request being placed by the
   MRB-unaware AS the MRB can't rely on AS-originated directives to pick
   one MS rather than another.  In fact, the MRB can't know what the AS
   is looking for.  The MRB is then assumed to pick one according to its
   logic, which is implementation specific.


























Amirante, et al.              Informational                   [Page 155]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   Figure 51 presents a ladder diagram of a typical Consumer request in
   the Inline-unaware topology:

   AS                      MRB                          MS
    |                       |                           |
    | 1. INVITE             |                           |
    | (application/cfw)     |                           |
    |---------------------->|                           |
    |       2. 100 (Trying) |                           |
    |<----------------------|                           |
    |                       |--+ Pick an MS             |
    |                       |  | and redirect           |
    |                       |<-+ INVITE there           |
    |                       |                           |
    |                       | 3. INVITE                 |
    |                       | (application/cfw from 1.) |
    |                       |-------------------------->|
    |                       |           4. 100 (Trying) |
    |                       |<--------------------------|
    |                       |                           |--+ Negotiate
    |                       |                           |  | CFW Control
    |                       |                           |<-+ Channel
    |                       |                 5. 200 OK |
    |                       | (application/cfw from MS) |
    |                       |<--------------------------|
    |                       | 6. ACK                    |
    |                       |-------------------------->|
    |                       |                           |
    |             7. 200 OK |                           |
    |(application/cfw from MS)                          |
    |<----------------------|                           |
    | 8. ACK                |                           |
    |---------------------->|                           |
    |                       |                           |
    |                                                   |
    |<<############## TCP CONNECTION #################>>|
    |                                                   |
    | CFW SYNC                                          |
    |++++++++++++++++++++++++++++++++++++++++++++++++++>|
    |                                                   |
    .                       .                           .
    .                       .                           .

         Figure 51: Media Resource Brokering: Inline-Unaware Mode

   As can be seen in the diagram, in this topology the MRB basically
   acts as a 3PCC between the AS and the chosen MS.




Amirante, et al.              Informational                   [Page 156]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The same can be said with respect to attaching UAC media dialogs.
   The MRB remembers the MS it has chosen for the AS, and for every UAC
   media dialog the AS tries to attach to the MRB, it makes sure that it
   is somehow actually redirected to the MS.

   No content for the presented messages is provided in this section, as
   in the IUMM mode no Consumer transaction is involved.  In this
   example, a simple [RFC6230] Control Channel negotiation occurs where
   the MRB acts as an intermediary, that is, picking an MS for the AS
   according to some logic.  In this case, in fact, the AS does not
   support the MRB specification and so just tries to set up a Control
   Channel according to its own logic.

   It is worth pointing out that the MRB may actually enforce its
   decision about the MS to grant to the AS in different ways.
   Specifically, the sentence "redirect the INVITE" that is used in
   Figure 51 does not necessarily mean that a SIP 302 message should be
   used for that purpose.  A simple way to achieve this may be
   provisioning the unaware AS with different URIs, all actually
   transparently handled by the MRB itself; this would allow the MRB to
   simply map those URIs to different MS instances.  The SIP 'Contact'
   header may also be used by the MRB in a reply to an INVITE coming
   from an AS to provide the actual URI on which the chosen MS might be
   reached.  A motivation for such a discussion, and more details on
   this topic, are provided in Section 7.3.2.

7.3.  Handling Media Dialogs

   It is worthwhile to briefly address how media dialogs would be
   managed whenever an MRB is involved in the following scenarios.  In
   fact, the presence of an MRB may introduce an additional complexity
   compared to the quite straightforward 1:1 AS-MS topology.

7.3.1.  Query and Inline-Aware Mode

   Normally, especially in the Query and IAMM case, the MRB would only
   handle Consumer requests by an AS, and after that the AS and the MS
   picked by the MRB for a specific request would talk directly to each
   other by means of SIP.  This is made possible by the fact that the AS
   gets the MS SIP URI in reply to its request.  In this case, an AS can
   simply relay media dialogs associated with that session to the right
   MS to have them handled accordingly.  Of course, in order for this to
   work it is assumed that the AS creates a Control Channel to a chosen
   MS before it has any requests to service.

   An example of such a scenario is presented in Figure 52.  Please note
   that this diagram and subsequent diagrams in this section are
   simplified with respect to the actual protocol interactions.  For



Amirante, et al.              Informational                   [Page 157]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   instance, the whole SIP transactions are not presented, and only the
   originating messages are presented in order to clarify the scenario
   in a simple way.

UAC              AS                           MRB                     MS
 |                |                            |                      |
 |                | 1. Consumer request        |                      |
 |                |--------------------------->|                      |
 |                |                            |                      |
 |                |       2. Consumer response |                      |
 |                |<---------------------------|                      |
 |                |                            |                      |
 |                | 3. COMEDIA negotiation to create CFW channel      |
 |                |-------------------------------------------------->|
 |                |                            |                      |
 |                |<<############## CFW CONNECTION #################>>|
 | 4. INVITE xyz  |                            |                      |
 |--------------->|                            |                      |
 |                | 5. Attach UAC to MS (3PCC)                        |
 |                |-------------------------------------------------->|
 |                |                            |                      |
 |<<++++++++++++++++++++++ RTP channels ++++++++++++++++++++++++++++>>|
 |                |                            |                      |
 .                .                            .                      .
 .                .                            .                      .

              Figure 52: Handling Media Dialogs in Query/IAMM

   As can be deduced from the diagram, the interactions among the
   components are quite straightforward.  The AS knows which MS it has
   been assigned to (as a consequence of the MRB Consumer request,
   whether it has been achieved by means of HTTP or SIP), and so it can
   easily attach any UAC accessing its functionality to the MS itself
   and manipulate its media connections by using the CFW Control Channel
   as usual.

   In such a scenario, the MRB is only involved as a locator.  Once the
   MRB provides the AS with the URI of the required resource, it doesn't
   interfere with subsequent interactions unless it wants to perform
   monitoring (e.g., by exploiting the Publishing information reported
   by the MS).  As a consequence, the scenario basically becomes 1:1
   between the AS and the MS again.

   Nevertheless, there are cases when having an MRB in the SIP signaling
   path as well might be a desired feature, e.g., for more control over
   the use of the resources.  Considering how the Consumer interface has
   been envisaged, this feature is easily achievable, with no change to
   the protocol required at all.  Specifically, in order to achieve such



Amirante, et al.              Informational                   [Page 158]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   functionality, the MRB may reply to a Consumer request with a URI for
   which the MRB is responsible (rather than the MS SIP URI as discussed
   previously) and map this URI to the actual MS URI in its business
   logic; this would be transparent to the AS.  This way, the AS would
   interact with the MRB as if it were the MS itself.

   Figure 53 shows how the scenario would change in this case.

 UAC              AS                           MRB                    MS
  |                |                            |                      |
  |                | 1. Consumer request        |                      |
  |                |--------------------------->|                      |
  |                |                            |                      |
  |                |       2. Consumer response |                      |
  |                |<---------------------------|                      |
  |                |                            |                      |
  |                | 3. COMEDIA negotiation     |                      |
  |                |--------------------------->|                      |
  |                |                            | 4. COMEDIA neg.      |
  |                |                            |--------------------->|
  |                |                            |                      |
  |                |<<############## CFW CONNECTION #################>>|
  | 5. INVITE xyz  |                            |                      |
  |--------------->|                            |                      |
  |                | 6. Attach UAC to MS (3PCC) |                      |
  |                |--------------------------->|                      |
  |                |                            | 7. Attach UAC (3PCC) |
  |                |                            |--------------------->|
  |                |                            |                      |
  |<<++++++++++++++++++++++ RTP channels ++++++++++++++++++++++++++++>>|
  |                |                            |                      |
  .                .                            .                      .
  .                .                            .                      .

             Figure 53: Handling Media Dialogs in Query/IAMM:
                         MRB in the Signaling Path

   This time, even though the MRB has picked a specific MS after a
   request from an AS, it replies with another SIP URI, a URI it would
   reply to itself.  The AS would contact that URI in order to negotiate
   the Control Channel, and the MRB would proxy/forward the request to
   the actual MS transparently.  Eventually, the Control Channel would
   be instantiated between the AS and the MS.  The same happens for UACs
   handled by the AS; the AS would forward the calls to the URI provided
   to it, the one handled by the MRB, which would in turn relay the call
   to the MS in order to have the proper RTP channels created between
   the UAC and the MS.




Amirante, et al.              Informational                   [Page 159]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   This scenario is not very different from the previous scenario,
   except that the MRB is now on the signaling path for both the SIP
   control dialog and the SIP media dialogs, allowing it to have more
   control of the resources (e.g., triggering a BYE if a resource has
   expired).  There are several possible approaches an MRB might take to
   allocate URIs to map to a requested MS.  For example, an MRB might
   use SIP URI parameters to generate multiple SIP URIs that are unique
   but that all route to the same host and port, e.g.,
   sip:MrbToMs@mrb.example.com:5080;p=1234567890.  Alternatively, the
   MRB might simply allocate a pool of URIs for which it would be
   responsible and manage the associations with the requested MS
   services accordingly.

7.3.2.  Inline-Unaware Mode

   As mentioned previously, in the IUMM case the AS would interact with
   the MRB as if it were the MS itself.  One might argue that this would
   make the AS act as it would in the IAMM case.  This is not the case,
   however, since the AS actually provided the MRB with information
   about the resources it required, leading to the selection of a proper
   MS, while in the IUMM case the MRB would have to pick an MS with no
   help from the AS at all.

   That said, the IUMM case is also very interesting with respect to
   media dialog management.  In fact, in the MRB-unaware mode, there
   would be no Consumer request, and an AS would actually see the MRB as
   an MS.  Unlike the previous scenarios, because there is no AS<->MRB
   interaction and as such no MS selection process, the MRB would likely
   be in the signaling path anyway, at least when the AS first shows up.
   The MRB could either redirect the AS to an MS directly or
   transparently act as a Proxy/B2BUA and contact an MS (according to
   implementation-specific policies) on behalf of the unaware AS.

   While apparently not a problem, this raises an issue when the same
   unaware AS has several sessions with different MS.  The AS would only
   see one "virtual" MS (the MRB), and so it would relay all calls
   there, making it hard for the MRB to understand where these media
   dialogs should belong: specifically, whether the UAC calling belongs
   to the AS application logic leading to MS1 or MS2, or somewhere else.












Amirante, et al.              Informational                   [Page 160]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   One possible, and very simple, approach to take care of this issue is
   to always relay the SIP dialogs from the same unaware AS to the same
   MS, as depicted in Figure 54.

UAC1  UAC2       AS                           MRB                     MS
 |     |          |                            |                      |
 |     |          | 1. COMEDIA negotiation (A) |                      |
 |     |          |--------------------------->|                      |
 |     |          |                            | 2. COMEDIA neg. (A)  |
 |     |          |                            |--------------------->|
 |     |          |                            |                      |
 |     |          |<<############## CFW CONNECTION #################>>|
 |     |          |                            |                      |
 |     |          | 3. COMEDIA negotiation (B) |                      |
 |     |          |--------------------------->|                      |
 |     |          |                            | 4. COMEDIA neg. (B)  |
 |     |          |                            |--------------------->|
 |     |          |                            |                      |
 |     |          |<<############## CFW CONNECTION #################>>|
 | 5. INVITE xyz  |                            |                      |
 |--------------->|                            |                      |
 |     |          | 6. Attach UAC1 to MS (3PCC)|                      |
 |     |          |--------------------------->|                      |
 |     |          |                            | 7. Attach UAC (3PCC) |
 |     |          |                            |--------------------->|
 |     |          |                            |                      |
 |<<++++++++++++++++++++++ RTP channels ++++++++++++++++++++++++++++>>|
 |     |          |                            |                      |
 |     | 8. INVITE|                            |                      |
 |     |    jkl   |                            |                      |
 |     |--------->|                            |                      |
 |     |          | 9. Attach UAC2 to MS (3PCC)|                      |
 |     |          |--------------------------->|                      |
 |     |          |                            | 10. Attach UAC (3PCC)|
 |     |          |                            |--------------------->|
 |     |          |                            |                      |
 |     |<<++++++++++++++++ RTP channels ++++++++++++++++++++++++++++>>|
 |     |          |                            |                      |
 .     .          .                            .                      .
 .     .          .                            .                      .

       Figure 54: Handling Media Dialogs in IUMM: Always the Same MS

   In this example, the AS creates two different Control Channel
   sessions (A and B) to address two different business logic
   implementations; e.g., the AS SIP URI 'xyz' (associated with CFW
   session A) may be an IVR pizza-ordering application, while the AS SIP
   URI 'jkl' (associated with CFW session B) may be associated with a



Amirante, et al.              Informational                   [Page 161]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   conference room.  It's quite clear, then, that if the MRB forwarded
   the two CFW sessions to two different MS, the handling of UAC media
   dialogs would prove troublesome, because the MRB would have
   difficulty figuring out whether UAC1 should be attached to the MS
   managing CFW session A or the MS managing CFW session B.  In this
   example, forwarding all CFW sessions and UAC media dialogs coming
   from the same MRB-unaware AS to the same MS would work as expected.
   The MRB would in fact leave the mapping of media dialogs and CFW
   sessions up to the AS.

   This approach, while very simple and indeed not very scalable, would
   actually help take care of the issue.  In fact, no matter how many
   separate Control Channels the AS might have with the MRB/MS (in this
   example, Control Channel A would be mapped to application xyz and
   Control Channel B to application jkl), the termination point would
   still always be the same MS, which would consequently be the
   destination for all media dialogs as well.

   To overcome the scalability limitations of such an approach, at least
   in regard to the MRB being in the SIP signaling path for all calls, a
   different approach needs to be exploited.  In fact, especially in the
   case of different applications handled by the same unaware AS, it
   makes sense to try to exploit different MS for that purpose and to
   correctly track media dialogs being forwarded accordingly.  This
   means that the MRB must find a way to somehow redirect the unaware AS
   to different MS when it predicts or realizes that a different
   application logic is involved.
























Amirante, et al.              Informational                   [Page 162]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   To do so, the MRB might use different approaches.  One approach would
   use redirection, e.g., by means of a SIP 302 message in reply to a
   Control Channel negotiation originated by an unaware AS.  Such an
   approach is depicted in Figure 55.

UAC1             AS                           MRB                     MS
 |                |                            |                      |
 |                | 1. COMEDIA negotiation     |                      |
 |                |--------------------------->|                      |
 |                |                            |                      |
 |                |          2. 302 Moved (MS) |                      |
 |                |<---------------------------|                      |
 |                |                            |                      |
 |                | 3. COMEDIA negotiation     |                      |
 |                |-------------------------------------------------->|
 |                |                            |                      |
 |                |<<############## CFW CONNECTION #################>>|
 |                |                            |                      |
 | 4. INVITE xyz  |                            |                      |
 |--------------->|                            |                      |
 |                | 5. Attach UAC1 to MS (3PCC)|                      |
 |                |-------------------------------------------------->|
 |                |                            |                      |
 |<<++++++++++++++++++++++ RTP channels ++++++++++++++++++++++++++++>>|
 |                |                            |                      |
 .                .                            .                      .
 .                .                            .                      .

          Figure 55: Handling Media Dialogs in IUMM: Redirection

   With this approach, the MRB might redirect the AS to a specific MS
   whenever a new Control Channel is to be created, and as a consequence
   the AS would redirect the related calls there.  This is similar to
   the first approach of the Query/IAMM case, with the difference that
   no Consumer request would be involved.  The scenario would again fall
   back to a 1:1 topology between the AS and the MS, making the
   interactions quite simple.

   Just as before, the MRB might be interested in being in the signaling
   path for the SIP dialogs, instead of just acting as a locator.  A
   third potential approach could be implementing the "virtual" URIs
   handled by the MRB, as described in the previous section.  Rather
   than resorting to explicit redirection or always using the same MS,








Amirante, et al.              Informational                   [Page 163]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   the MRB may redirect new SIP control dialogs to one of its own URIs,
   using the same approach previously presented in Figure 53.  Such an
   approach, as applied to the IUMM case, is depicted in Figure 56.

UAC1             AS                              MRB                  MS
 |                |                               |                   |
 |                | 1. COMEDIA negotiation (MRB)  |                   |
 |                |------------------------------>|                   |
 |                |                               |                   |
 |                |           2. 302 Moved (MRB') |                   |
 |                |<------------------------------|                   |
 |                |                               |                   |
 |                | 3. COMEDIA negotiation (MRB') |                   |
 |                |------------------------------>|                   |
 |                |                               | 4. COMEDIA neg.   |
 |                |                               |------------------>
 |                |                               |                   |
 |                |<<############## CFW CONNECTION #################>>|
 |                |                               |                   |
 | 5. INVITE xyz  |                               |                   |
 |--------------->|                               |                   |
 |                | 6. Attach UAC1 to MRB' (3PCC) |                   |
 |                |------------------------------>|                   |
 |                |                               | 7 Attach UAC (3PCC)
 |                |                               |------------------>
 |                |                               |                   |
 |<<++++++++++++++++++++++ RTP channels ++++++++++++++++++++++++++++>>|
 |                |                               |                   |
 .                .                               .                   .
 .                .                               .                   .

   Figure 56: Handling Media Dialogs in IUMM: MRB in the Signaling Path

   It is worth pointing out, though, that in both cases there are
   scenarios where there could be no assurance that the 302 sent by the
   MRB would be seen by the AS.  In fact, should a proxy be between the
   AS and the MRB, such a proxy could itself act on the 302.  To
   properly cope with such an issue, the MRB might also use the
   'Contact' header in the SIP responses to the INVITE to address the
   right MS.  Although the AS is not required to use the information in
   such a header to reach the MS, it could be reasonable to exploit it
   for that purpose, as it would take care of the proxy scenario
   mentioned above.








Amirante, et al.              Informational                   [Page 164]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   To conclude, there is a further approach an MRB might try to exploit
   to take care of the IUMM case.  Since, as explained before, the
   issues related to the IUMM case mostly relate to the fact that the
   MRB is seen as a single MS instance by the AS, a simple way to
   overcome this might be to make the MRB look like a set of different
   MS right away; this can be done by simply provisioning the unaware AS
   with a series of different URIs, all handled by the MRB itself acting
   as a pool of "virtual" MS.  This way, the AS may be designed to use
   different MS for different classes of calls, e.g., for different
   applications it is managing (two in the example presented in this
   section), and as such would contact two different provisioned URIs to
   create two distinct Control Channels towards two different MS.  Since
   both of the URIs would be handled by the MRB, the MRB can use them to
   determine to which MS each call should be directed.  Expanding on
   Figure 54 by removing the constraint to always use the same MS, this
   new scenario might look like that depicted in Figure 57.



































Amirante, et al.              Informational                   [Page 165]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


 UAC1  UAC2       AS                           MRB              MS1  MS2
  |     |          |                            |                 |    |
  |     |          | 1. COMEDIA negotiation (A) |                 |    |
  |     |          |    INVITE fake-ms1         |                 |    |
  |     |          |--------------------------->|                 |    |
  |     |          |                            | 2. COMEDIA (A)  |    |
  |     |          |                            |---------------->|    |
  |     |          |                            |                 |    |
  |     |          |<<############## CFW CONNECTION 1 ##########>>|    |
  |     |          |                            |                 |    |
  |     |          | 3. COMEDIA negotiation (B) |                 |    |
  |     |          |    INVITE fake-ms2         |                 |    |
  |     |          |--------------------------->|                 |    |
  |     |          |                            | 4. COMEDIA neg. (B)  |
  |     |          |                            |--------------------->|
  |     |          |                            |                 |    |
  |     |          |<<############## CFW CONNECTION 2 ###############>>|
  |     |          |                            |                 |    |
  | 5. INVITE xyz  |                            |                 |    |
  |--------------->|                            |                 |    |
  |     |          | 6. Attach UAC1 to fake-ms1 (3PCC)            |    |
  |     |          |--------------------------->|                 |    |
  |     |          |                            | 7. Attach UAC   |    |
  |     |          |                            |---------------->|    |
  |     |          |                            |                 |    |
  |<<++++++++++++++++++++++ RTP channels +++++++++++++++++++++++>>|    |
  |     |          |                            |                 |    |
  | 8. INVITE jkl  |                            |                 |    |
  |--------------->|                            |                 |    |
  |     |          | 9. Attach UAC2 to fake-ms2 (3PCC)            |    |
  |     |          |--------------------------->|                 |    |
  |     |          |                            | 10. Attach UAC  |    |
  |     |          |                            |--------------------->|
  |     |          |                            |                 |    |
  |<<+++++++++++++++++++++++++ RTP channels +++++++++++++++++++++++++>>|
  |     |          |                            |                 |    |
  .     .          .                            .                 .    .
  .     .          .                            .                 .    .

        Figure 57: Handling Media Dialogs in IUMM: Provisioned URIs

   In this new example, we still assume that the same unaware AS is
   handling two different applications, still associated with the same
   URIs as before.  This time, though, we also assume that the AS has
   been designed to try to use different MS instances to handle the two
   very different applications for which it is responsible.  We also
   assume that it has been configured to be able to use two different MS
   instances, reachable at SIP URI 'fake-ms1' and 'fake-ms2',



Amirante, et al.              Informational                   [Page 166]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   respectively, and both actually handled by the MRB transparently.
   This results, just as before, in two different Control Channels (A
   and B) being created, but this time towards two different MS.
   Specifically, the MRB makes sure that for this AS the Control Channel
   negotiation towards 'fake-ms1' is actually redirected to MS1.  At the
   same time, 'fake-ms2' is associated with MS2.  Once the AS has set up
   the Control Channels with both of the MS, it is ready to handle media
   dialogs.  UAC1 calls the SIP URI 'xyz' on the AS to order a pizza.
   The AS attaches the media dialog to the MS it knows is responsible
   for that branch of application logic, i.e., 'fake-ms1'.  The MRB in
   turn makes sure that it reaches the right MS instance, MS1.  Later
   on, a different user, UAC2, calls SIP URI 'jkl' to join a conference
   room.  This time, the AS attaches this new media dialog to the MS
   instance handling the conference application, i.e., 'fake-ms2'.
   Again, the MRB makes sure that it is actually MS2 that receives the
   dialog.

   Again, this diagram is only meant to describe how the MRB might
   enforce its decisions.  Just as described in the previous examples,
   the MRB may choose to either act as a Proxy/B2BUA between the AS and
   the MS instances or redirect the AS to the right MS instances when
   they're first contacted (e.g., by means of the Contact header and/or
   a SIP redirect, as explained before) and let the AS attach the media
   dialogs by itself.

7.3.3.  CFW Protocol Behavior

   As shown in the previous diagrams, no matter what the topology, the
   AS and MS usually end up with a direct connection with respect to the
   CFW Control Channel.  As such, it can be expected that the CFW
   protocol continue to work as it should, and as a consequence all the
   call flows presented in this document can easily be reproduced in
   those circumstances as well.

   Nevertheless, one aspect needs to be considered very carefully.  It's
   worthwhile to remind readers that both the AS and the MS use some
   SIP-related information to address the entities they manipulate.
   This is the case, for instance, for the <connectionid> element to
   which both the AS and the MS refer when addressing a specific UAC.
   As explained in Section 6, this 'connectionid' identifier is
   constructed by concatenating the 'From' and 'To' tags extracted from
   a SIP header: specifically, from the headers of the AS<->MS leg that
   allows a UAC to be attached to the MS.  The presence of an additional
   component in the path between the AS and the MS, the MRB, might alter
   these tags, thus causing the AS to use tags (AS<->MRB) different than
   those used by the MS (MRB<->MS).  This would result in the AS and MS
   using different 'connectionid' identifiers to address the same UAC,
   thus preventing the protocol from working as expected.  As a



Amirante, et al.              Informational                   [Page 167]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   consequence, it's very important that any MRB implementation take
   very good care to preserve the integrity of the involved SIP headers
   when proxying/forwarding SIP dialogs between the AS and MS, in order
   not to "break" the behavior of the protocol.

   Let's take, for instance, the scenario depicted in Figure 53,
   especially steps 6 and 7, which specifically address a UAC being
   attached by an AS to an MS via the MRB.  Let's assume that Figure 58
   shows what happens to the 'From' and 'To' headers in that scenario,
   when dealing with the 3PCC approach to attach a specific UAC to
   the MS.

UAC              AS                         MRB                       MS
 |                |                          |                        |
 | INVITE xyz     |                          |                        |
 |--------------->|                          |                        |
 |                | SIP [..]                 |                        |
 |                | From: <..>;tag=a1b2c3    |                        |
 |                | To: <..>;tag=d4e5f6      |                        |
 |                |<------------------------>|                        |
 |                |                          | SIP [..]               |
 |                |                          | From: <..>;tag=aaabbb  |
 |                |                          | To: <..>;tag=cccddd    |
 |                |                          |<---------------------->|
 |                |                          |                        |
 |                | 1. CONTROL (play announcement to UAC)             |
 |                |-------------------------------------------------->|
 |                |                               2. 200 (IVR Error!) |
 |                |<--------------------------------------------------|
 |                |                          |                        |
 .                .                          .                        .
 .                .                          .                        .

     Figure 58: CFW Protocol Behavior in the Case of Manipulated Tags

   In this example, once done with the 3PCC, and now that the UAC is
   attached to the MS, the AS and the MS end up with different
   interpretations of what the 'connectionid' for the UAC should be.  In
   fact, the AS builds a 'connectionid' using the tags it is aware of
   (a1b2c3:d4e5f6), while the MS builds a different identifier after
   receiving different information from the MRB (aaabbb:cccddd).

   As a consequence, when the AS tries to play an announcement to the
   UAC using the connectionid it correctly constructed, the MS just as
   correctly replies with an error, since it doesn't know that
   identifier.  This is correct protocol behavior, because in this case
   it was caused by misuse of the information needed for it to work as
   expected.



Amirante, et al.              Informational                   [Page 168]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   1. AS -> MS (CFW CONTROL, play)
   -------------------------------
      CFW ffhg45dzf123 CONTROL
      Control-Package: msc-ivr/1.0
      Content-Type: application/msc-ivr+xml
      Content-Length: 284

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <dialogstart connectionid="a1b2c3:d4e5f6">
          <dialog>
            <prompt>
              <media loc="http://www.example.net/hello.wav"/>
            </prompt>
          </dialog>
        </dialogstart>
      </mscivr>


   2. AS <- MS (CFW 200 OK)
   ------------------------
      CFW ffhg45dzf123 200
      Timeout: 10
      Content-Type: application/msc-ivr+xml
      Content-Length: 148

      <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <response status="407" reason="connectionid does not exist"
                  dialogid=""/>
      </mscivr>

   In an even worse scenario, the connectionid might actually exist but
   might be mapped to a different UAC.  In such a case, the transaction
   would succeed, but a completely different UAC would be involved, thus
   causing a silent failure that neither the AS nor the MS would be
   aware of.

   That said, proper management of these sensitive pieces of information
   by the MRB would prevent such failure scenarios from happening.  How
   this issue is taken care of in the IAMM case (both CFW-based and
   media dialog-based) has already been described.  Addressing this
   issue for the IUMM case is not documented in [RFC6917] as explicitly
   out of scope and as such may be implementation specific.

   The same applies to SDP fields as well.  In fact, the AS and MS use
   ad hoc SDP attributes to instantiate a Control Channel, as they use
   SDP labels to address specific media connections of a UAC media
   dialog when a fine-grained approach is needed.  As a consequence, any




Amirante, et al.              Informational                   [Page 169]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   MRB implementation should limit any SDP manipulation as much as
   possible or at least take very good care not to cause changes that
   could "break" the expected behavior of the CFW protocol.

8.  Security Considerations

   All the MEDIACTRL documents have strong statements regarding security
   considerations within the context of the interactions occurring at
   all levels among the involved parties.  Considering the sensitive
   nature of the interaction between AS and MS, particular efforts have
   been devoted to providing guidance on how to secure what flows
   through a Control Channel.  In fact, transactions concerning dialogs,
   connections, and mixes are quite strongly related to resources
   actually being deployed and used in the MS.  This means that it is in
   the interest of both AS and MS that resources created and handled by
   an entity are not manipulated by a potentially malicious third party
   if permission was not granted.

   Because strong statements are provided in the aforementioned
   documents and these documents provide good guidance to implementors
   with respect to these issues, this section will only provide the
   reader with some MEDIACTRL call flows that show how a single secured
   MS is assumed to reply to different AS when receiving requests that
   may cross the bounds within which each AS is constrained.  This would
   be the case, for instance, for generic auditing requests, or explicit
   conference manipulation requests where the involved identifiers are
   not part of the context of the originating AS.

   To address a very specific scenario, let's assume that two different
   AS, AS1 and AS2, have established a Control Channel with the same MS.
   Considering the SYNC transaction that an AS and an MS use to set up a
   Control Channel, the MS is able to discern the requests coming from
   AS1 from the requests coming from AS2.  In fact, as explained in
   Sections 5.1 and 5.2, an AS and an MS negotiate a cfw-id attribute in
   the SDP, and the same value is subsequently used in the SYNC message
   on the Control Channel that is created after the negotiation, thus
   reassuring both the AS and the MS that the Control Channel they share
   is in fact the channel they negotiated in the first place.













Amirante, et al.              Informational                   [Page 170]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   Let's also assume that AS1 has created a conference mix
   (confid=74b6d62) to which it has attached some participants within
   the context of its business logic, while AS2 has created a currently
   active IVR dialog (dialogid=dfg3252) with a user agent it is handling
   (237430727:a338e95f).  AS2 has also joined two connections to each
   other (1:75d4dd0d and 1:b9e6a659).  Clearly, it is highly desirable
   that AS1 not be aware of what AS2 is doing with the MS and vice
   versa, and that they not be allowed to manipulate each other's
   resources.  The following transactions will occur:

   1.  AS1 places a generic audit request to both the Mixer and IVR
       packages.

   2.  AS2 places a generic audit request to both the Mixer and IVR
       packages.

   3.  AS1 tries to terminate the dialog created by AS2 (6791fee).

   4.  AS2 tries to join a user agent it handles (1:272e9c05) to the
       conference mix created by AS1 (74b6d62).































Amirante, et al.              Informational                   [Page 171]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   A sequence diagram of the above-mentioned transactions is depicted in
   Figure 59, which shows how the MS is assumed to reply in all cases,
   in order to avoid security issues:

      AS1                     AS2                                 MS
       |                       |                                  |
       | A1. CONTROL (IVR audit)                                  |
       |++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>|
       |                       |                       A2. 200 OK |
       |<<++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
       |                       |                                  |
       | B1. CONTROL (Mixer audit)                                |
       |++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>|
       |                       |                       B2. 200 OK |
       |<<++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
       |                       |                                  |
       |                       | C1. CONTROL (IVR audit)          |
       |                       |++++++++++++++++++++++++++++++++>>|
       |                       |                       C2. 200 OK |
       |                       |<<++++++++++++++++++++++++++++++++|
       |                       |                                  |
       |                       | D1. CONTROL (Mixer audit)        |
       |                       |++++++++++++++++++++++++++++++++>>|
       |                       |                       D2. 200 OK |
       |                       |<<++++++++++++++++++++++++++++++++|
       |                       |                                  |
       | E1. CONTROL (dialogterminate)                            |
       |++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>|
       |                       |                E2. 403 Forbidden |
       |<<++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
       |                       |                                  |
       |                       | F1. CONTROL (join UAC&conf[AS1]) |
       |                       |++++++++++++++++++++++++++++++++>>|
       |                       |                F2. 403 Forbidden |
       |                       |<<++++++++++++++++++++++++++++++++|
       |                       |                                  |
       .                       .                                  .
       .                       .                                  .

         Figure 59: Security Considerations: Framework Transaction











Amirante, et al.              Informational                   [Page 172]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   The expected outcome of the transaction is that the MS partially
   "lies" to both AS1 and AS2 when replying to the audit requests (not
   all of the identifiers are reported, but only those identifiers with
   which each AS is directly involved), and the MS denies the requests
   for the unauthorized operations (403).  Looking at each transaction
   separately:

   o  In the first transaction (A1), AS1 places a generic <audit>
      request to the IVR package.  The request is generic, since no
      attributes are passed as part of the request, meaning that AS1 is
      interested in the MS capabilities as well as all of the dialogs
      that the MS is currently handling.  As can be seen in the reply
      (A2), the MS only reports in the <auditresponse> the package
      capabilities, while the <dialogs> element is empty; this is
      because the only dialog the MS is handling has actually been
      created by AS2, which causes the MS not to report the related
      identifier (6791fee) to AS1.  In fact, AS1 could use that
      identifier to manipulate the dialog, e.g., by tearing it down and
      thus causing the service to be interrupted without AS2's
      intervention.

   o  In the second transaction (B1), AS1 places an identical <audit>
      request to the Mixer package.  The request is again generic,
      meaning that AS1 is interested in the package capabilities as well
      as all the mixers and connections that the package is handling at
      the moment.  This time, the MS reports not only capabilities (B2)
      but information about mixers and connections as well.  However,
      this information is not complete; in fact, only information about
      mixers and connections originated by AS1 is reported (mixer
      74b6d62 and its participants), while the information originated by
      AS2 is omitted in the report.  The motivation is the same as
      before.

   o  In the third and fourth transactions (C1 and D1), it's AS2 that
      places an <audit> request to both the IVR and Mixer packages.  As
      with the previous transactions, the audit requests are generic.
      Looking at the replies (C2 and D2), it's obvious that the
      capabilities section is identical to the replies given to AS1.  In
      fact, the MS has no reason to "lie" about what it can do.  The
      <dialogs> and <mixers> sections are totally different.  AS2 in
      fact receives information about its own IVR dialog (6791fee),
      which was omitted in the reply to AS1, while it only receives
      information about the only connection it created (1:75d4dd0d and
      1:b9e6a659) without any details related to the mixers and
      connections originated by AS1.






Amirante, et al.              Informational                   [Page 173]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   o  In the fifth transaction (E1), AS1, instead of just auditing the
      packages, tries to terminate (<dialogterminate>) the dialog
      created by AS2 (6791fee).  Since the identifier has not been
      reported by the MS in the reply to the previous audit request, we
      assume that AS1 accessed it via a different out-of-band mechanism.
      This is assumed to be an unauthorized operation, because the
      above-mentioned dialog is outside the bounds of AS1; therefore,
      the MS, instead of handling the syntactically correct request,
      replies (E2) with a framework-level 403 message (Forbidden),
      leaving the dialog untouched.

   o  Similarly, in the sixth and last transaction (F1), AS2 tries to
      attach (<join>) one of the UACs it is handling to the conference
      mix created by AS1 (74b6d62).  Just as in the previous
      transaction, the identifier is assumed to have been accessed by
      AS2 via some out-of-band mechanism, since the MS didn't report it
      in the reply to the previous audit request.  While one of the
      identifiers (the UAC) is actually handled by AS2, the other (the
      conference mix) is not; therefore, as with the fifth transaction,
      this last transaction is regarded by the MS as outside the bounds
      of AS2.  For the same reason as before, the MS replies (F2) with a
      framework-level 403 message (Forbidden), leaving the mix and the
      UAC unjoined.

  A1. AS1 -> MS (CFW CONTROL, audit IVR)
  --------------------------------------
     CFW 140e0f763352 CONTROL
     Control-Package: msc-ivr/1.0
     Content-Type: application/msc-ivr+xml
     Content-Length: 81

     <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <audit/>
     </mscivr>

















Amirante, et al.              Informational                   [Page 174]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  A2. AS1 <- MS (CFW 200, auditresponse)
  --------------------------------------
     CFW 140e0f763352 200
     Timeout: 10
     Content-Type: application/msc-ivr+xml
     Content-Length: 1419

     <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <auditresponse status="200">
        <capabilities>
           <dialoglanguages/>
           <grammartypes/>
           <recordtypes>
              <mimetype>audio/x-wav</mimetype>
              <mimetype>video/mpeg</mimetype>
           </recordtypes>
           <prompttypes>
              <mimetype>audio/x-wav</mimetype>
              <mimetype>video/mpeg</mimetype>
           </prompttypes>
           <variables>
              <variabletype type="date"
                            desc="value formatted as YYYY-MM-DD">
                 <format desc="month day year">mdy</format>
                 <format desc="year month day">ymd</format>
                 <format desc="day month year">dmy</format>
                 <format desc="day month">dm</format>
              </variabletype>
              <variabletype type="time" desc="value formatted as HH:MM">
                 <format desc="24 hour format">t24</format>
                 <format desc="12 hour format with am/pm">t12</format>
              </variabletype>
              <variabletype type="digits" desc="value formatted as D+">
                 <format desc="general digit string">gen</format>
                 <format desc="cardinal">crn</format>
                 <format desc="ordinal">ord</format>
              </variabletype>
           </variables>
           <maxpreparedduration>60s</maxpreparedduration>
           <maxrecordduration>1800s</maxrecordduration>
           <codecs>
              <codec name="audio"><subtype>basic</subtype></codec>
              <codec name="audio"><subtype>gsm</subtype></codec>
              <codec name="video"><subtype>h261</subtype></codec>
              <codec name="video"><subtype>h263</subtype></codec>
              <codec name="video"><subtype>h263-1998</subtype></codec>
              <codec name="video"><subtype>h264</subtype></codec>
           </codecs>



Amirante, et al.              Informational                   [Page 175]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


        </capabilities>
        <dialogs>
        </dialogs>
     </auditresponse>
     </mscivr>


  B1. AS1 -> MS (CFW CONTROL, audit mixer)
  ----------------------------------------
     CFW 0216231b1f16 CONTROL
     Control-Package: msc-mixer/1.0
     Content-Type: application/msc-mixer+xml
     Content-Length: 87

     <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
        <audit/>
     </mscmixer>


  B2. AS1 <- MS (CFW 200, auditresponse)
  --------------------------------------
     CFW 0216231b1f16 200
     Timeout: 10
     Content-Type: application/msc-mixer+xml
     Content-Length: 903

     <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <auditresponse status="200">
       <capabilities>
          <codecs>
             <codec name="audio"><subtype>basic</subtype></codec>
             <codec name="audio"><subtype>gsm</subtype></codec>
             <codec name="video"><subtype>h261</subtype></codec>
             <codec name="video"><subtype>h263</subtype></codec>
             <codec name="video"><subtype>h263-1998</subtype></codec>
             <codec name="video"><subtype>h264</subtype></codec>
          </codecs>
       </capabilities>
       <mixers>
         <conferenceaudit conferenceid="74b6d62">
           <participants>
             <participant id="1864574426:e2192766"/>
             <participant id="1:5a97fd79"/>
           </participants>
           <video-layout min-participants="1">
             <quad-view/>
           </video-layout>
         </conferenceaudit>



Amirante, et al.              Informational                   [Page 176]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


         <joinaudit id1="1864574426:e2192766" id2="74b6d62"/>
         <joinaudit id1="1:5a97fd79" id2="74b6d62"/>
       </mixers>
     </auditresponse>
     </mscmixer>


  C1. AS2 -> MS (CFW CONTROL, audit IVR)
  --------------------------------------
     CFW 0216231b1f16 CONTROL
     Control-Package: msc-ivr/1.0
     Content-Type: application/msc-ivr+xml
     Content-Length: 81

     <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <audit/>
     </mscivr>


  C2. AS2 <- MS (CFW 200, auditresponse)
  --------------------------------------
     CFW 0216231b1f16 200
     Timeout: 10
     Content-Type: application/msc-ivr+xml
     Content-Length: 1502

     <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
     <auditresponse status="200">
        <capabilities>
           <dialoglanguages/>
           <grammartypes/>
           <recordtypes>
              <mimetype>audio/wav</mimetype>
              <mimetype>video/mpeg</mimetype>
           </recordtypes>
           <prompttypes>
              <mimetype>audio/wav</mimetype>
              <mimetype>video/mpeg</mimetype>
           </prompttypes>
           <variables>
              <variabletype type="date"
                            desc="value formatted as YYYY-MM-DD">
                 <format desc="month day year">mdy</format>
                 <format desc="year month day">ymd</format>
                 <format desc="day month year">dmy</format>
                 <format desc="day month">dm</format>
              </variabletype>




Amirante, et al.              Informational                   [Page 177]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


              <variabletype type="time" desc="value formatted as HH:MM">
                 <format desc="24 hour format">t24</format>
                 <format desc="12 hour format with am/pm">t12</format>
              </variabletype>
              <variabletype type="digits" desc="value formatted as D+">
                 <format desc="general digit string">gen</format>
                 <format desc="cardinal">crn</format>
                 <format desc="ordinal">ord</format>
              </variabletype>
           </variables>
           <maxpreparedduration>60s</maxpreparedduration>
           <maxrecordduration>1800s</maxrecordduration>
           <codecs>
              <codec name="audio"><subtype>basic</subtype></codec>
              <codec name="audio"><subtype>gsm</subtype></codec>
              <codec name="video"><subtype>h261</subtype></codec>
              <codec name="video"><subtype>h263</subtype></codec>
              <codec name="video"><subtype>h263-1998</subtype></codec>
              <codec name="video"><subtype>h264</subtype></codec>
           </codecs>
        </capabilities>
        <dialogs>
           <dialogaudit dialogid="6791fee" state="started"
                        connectionid="237430727:a338e95f"/>
        </dialogs>
     </auditresponse>
     </mscivr>


  D1. AS2 -> MS (CFW CONTROL, audit mixer)
  ----------------------------------------
     CFW 515f007c5bd0 CONTROL
     Control-Package: msc-mixer/1.0
     Content-Type: application/msc-mixer+xml
     Content-Length: 87

     <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
        <audit/>
     </mscmixer>












Amirante, et al.              Informational                   [Page 178]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  D2. AS2 <- MS (CFW 200, auditresponse)
  --------------------------------------
     CFW 515f007c5bd0 200
     Timeout: 10
     Content-Type: application/msc-mixer+xml
     Content-Length: 548

     <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
     <auditresponse status="200">
        <capabilities>
           <codecs>
              <codec name="audio"><subtype>basic</subtype></codec>
              <codec name="audio"><subtype>gsm</subtype></codec>
              <codec name="video"><subtype>h261</subtype></codec>
              <codec name="video"><subtype>h263</subtype></codec>
              <codec name="video"><subtype>h263-1998</subtype></codec>
              <codec name="video"><subtype>h264</subtype></codec>
           </codecs>
        </capabilities>
        <mixers>
           <joinaudit id1="1:75d4dd0d" id2="1:b9e6a659"/>
        </mixers>
     </auditresponse>
     </mscmixer>


  E1. AS1 -> MS (CFW CONTROL, dialogterminate)
  --------------------------------------------
     CFW 7fdcc2331bef CONTROL
     Control-Package: msc-ivr/1.0
     Content-Type: application/msc-ivr+xml
     Content-Length: 127

     <mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
        <dialogterminate dialogid="6791fee" immediate="true"/>
     </mscivr>


  E2. AS1 <- MS (CFW 403 Forbidden)
  ---------------------------------
     CFW 7fdcc2331bef 403










Amirante, et al.              Informational                   [Page 179]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


  F1. AS2 -> MS (CFW CONTROL, join to conference)
  -----------------------------------------------
     CFW 140e0f763352 CONTROL
     Control-Package: msc-mixer/1.0
     Content-Type: application/msc-mixer+xml
     Content-Length: 117

     <mscmixer version="1.0" xmlns="urn:ietf:params:xml:ns:msc-mixer">
        <join id1="1:272e9c05" id2="74b6d62"/>
     </mscmixer>


  F2. AS2 <- MS (CFW 403 Forbidden)
  ---------------------------------
     CFW 140e0f763352 403

9.  Acknowledgments

   The authors would like to thank Dale Worley for the thorough review
   of the whole document and for contributing text to make the document
   easier to read.

10.  References

10.1.  Normative References

   [RFC3261]  Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
              A., Peterson, J., Sparks, R., Handley, M., and E.
              Schooler, "SIP: Session Initiation Protocol", RFC 3261,
              June 2002.

   [RFC3264]  Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model
              with Session Description Protocol (SDP)", RFC 3264,
              June 2002.

   [RFC3550]  Schulzrinne, H., Casner, S., Frederick, R., and V.
              Jacobson, "RTP: A Transport Protocol for Real-Time
              Applications", STD 64, RFC 3550, July 2003.

   [RFC4574]  Levin, O. and G. Camarillo, "The Session Description
              Protocol (SDP) Label Attribute", RFC 4574, August 2006.

   [RFC4145]  Yon, D. and G. Camarillo, "TCP-Based Media Transport in
              the Session Description Protocol (SDP)", RFC 4145,
              September 2005.






Amirante, et al.              Informational                   [Page 180]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


   [RFC4572]  Lennox, J., "Connection-Oriented Media Transport over the
              Transport Layer Security (TLS) Protocol in the Session
              Description Protocol (SDP)", RFC 4572, July 2006.

   [RFC6230]  Boulton, C., Melanchuk, T., and S. McGlashan, "Media
              Control Channel Framework", RFC 6230, May 2011.

   [RFC6231]  McGlashan, S., Melanchuk, T., and C. Boulton, "An
              Interactive Voice Response (IVR) Control Package for the
              Media Control Channel Framework", RFC 6231, May 2011.

   [RFC6505]  McGlashan, S., Melanchuk, T., and C. Boulton, "A Mixer
              Control Package for the Media Control Channel Framework",
              RFC 6505, March 2012.

   [RFC6917]  Boulton, C., Miniero, L., and G. Munson, "Media Resource
              Brokering", RFC 6917, April 2013.

   [RFC5239]  Barnes, M., Boulton, C., and O. Levin, "A Framework for
              Centralized Conferencing", RFC 5239, June 2008.

   [RFC4582]  Camarillo, G., Ott, J., and K. Drage, "The Binary Floor
              Control Protocol (BFCP)", RFC 4582, November 2006.

   [RFC4583]  Camarillo, G., "Session Description Protocol (SDP) Format
              for Binary Floor Control Protocol (BFCP) Streams",
              RFC 4583, November 2006.

10.2.  Informative References

   [RFC2606]  Eastlake, D. and A. Panitz, "Reserved Top Level DNS
              Names", BCP 32, RFC 2606, June 1999.

   [RFC3725]  Rosenberg, J., Peterson, J., Schulzrinne, H., and G.
              Camarillo, "Best Current Practices for Third Party Call
              Control (3pcc) in the Session Initiation Protocol (SIP)",
              BCP 85, RFC 3725, April 2004.

   [SRGS]     Hunt, A. and S. McGlashan, "Speech Recognition Grammar
              Specification Version 1.0", W3C Recommendation,
              March 2004.

   [RFC4597]  Even, R. and N. Ismail, "Conferencing Scenarios",
              RFC 4597, August 2006.

   [RFC5567]  Melanchuk, T., "An Architectural Framework for Media
              Server Control", RFC 5567, June 2009.




Amirante, et al.              Informational                   [Page 181]
^L
RFC 7058                 CFW Call Flow Examples            November 2013


Authors' Addresses

   Alessandro Amirante
   University of Napoli
   Via Claudio 21
   Napoli  80125
   Italy

   EMail: alessandro.amirante@unina.it


   Tobia Castaldi
   Meetecho
   Via Carlo Poerio 89
   Napoli  80100
   Italy

   EMail: tcastaldi@meetecho.com


   Lorenzo Miniero
   Meetecho
   Via Carlo Poerio 89
   Napoli  80100
   Italy

   EMail: lorenzo@meetecho.com


   Simon Pietro Romano
   University of Napoli
   Via Claudio 21
   Napoli  80125
   Italy

   EMail: spromano@unina.it















Amirante, et al.              Informational                   [Page 182]
^L