summaryrefslogtreecommitdiff
path: root/ChangeLog
blob: 8223936dfb5dbafe38f771f9e22500d3bb67bac3 (plain)
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
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851
31852
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085
32086
32087
32088
32089
32090
32091
32092
32093
32094
32095
32096
32097
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113
32114
32115
32116
32117
32118
32119
32120
32121
32122
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211
32212
32213
32214
32215
32216
32217
32218
32219
32220
32221
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241
32242
32243
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345
32346
32347
32348
32349
32350
32351
32352
32353
32354
32355
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380
32381
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391
32392
32393
32394
32395
32396
32397
32398
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545
32546
32547
32548
32549
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585
32586
32587
32588
32589
32590
32591
32592
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655
32656
32657
32658
32659
32660
32661
32662
32663
32664
32665
32666
32667
32668
32669
32670
32671
32672
32673
32674
32675
32676
32677
32678
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756
32757
32758
32759
32760
32761
32762
32763
32764
32765
32766
32767
32768
32769
32770
32771
32772
32773
32774
32775
32776
32777
32778
32779
32780
32781
32782
32783
32784
32785
32786
32787
32788
32789
32790
32791
32792
32793
32794
32795
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807
32808
32809
32810
32811
32812
32813
32814
32815
32816
32817
32818
32819
32820
32821
32822
32823
32824
32825
32826
32827
32828
32829
32830
32831
32832
32833
32834
32835
32836
32837
32838
32839
32840
32841
32842
32843
32844
32845
32846
32847
32848
32849
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872
32873
32874
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907
32908
32909
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925
32926
32927
32928
32929
32930
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987
32988
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998
32999
33000
33001
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015
33016
33017
33018
33019
33020
33021
33022
33023
33024
33025
33026
33027
33028
33029
33030
33031
33032
33033
33034
33035
33036
33037
33038
33039
33040
33041
33042
33043
33044
33045
33046
33047
33048
33049
33050
33051
33052
33053
33054
33055
33056
33057
33058
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097
33098
33099
33100
33101
33102
33103
33104
33105
33106
33107
33108
33109
33110
33111
33112
33113
33114
33115
33116
33117
33118
33119
33120
33121
33122
33123
33124
33125
33126
33127
33128
33129
33130
33131
33132
33133
33134
33135
33136
33137
33138
33139
33140
33141
33142
33143
33144
33145
33146
33147
33148
33149
33150
33151
33152
33153
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218
33219
33220
33221
33222
33223
33224
33225
33226
33227
33228
33229
33230
33231
33232
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264
33265
33266
33267
33268
33269
33270
33271
33272
33273
33274
33275
33276
33277
33278
33279
33280
33281
33282
33283
33284
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318
33319
33320
33321
33322
33323
33324
33325
33326
33327
33328
33329
33330
33331
33332
33333
33334
33335
33336
33337
33338
33339
33340
33341
33342
33343
33344
33345
33346
33347
33348
33349
33350
33351
33352
33353
33354
33355
33356
33357
33358
33359
33360
33361
33362
33363
33364
33365
33366
33367
33368
33369
33370
33371
33372
33373
33374
33375
33376
33377
33378
33379
33380
33381
33382
33383
33384
33385
33386
33387
33388
33389
33390
33391
33392
33393
33394
33395
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405
33406
33407
33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
33475
33476
33477
33478
33479
33480
33481
33482
33483
33484
33485
33486
33487
33488
33489
33490
33491
33492
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502
33503
33504
33505
33506
33507
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546
33547
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617
33618
33619
33620
33621
33622
33623
33624
33625
33626
33627
33628
33629
33630
33631
33632
33633
33634
33635
33636
33637
33638
33639
33640
33641
33642
33643
33644
33645
33646
33647
33648
33649
33650
33651
33652
33653
33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664
33665
33666
33667
33668
33669
33670
33671
33672
33673
33674
33675
33676
33677
33678
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777
33778
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873
33874
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
34046
34047
34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098
34099
34100
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110
34111
34112
34113
34114
34115
34116
34117
34118
34119
34120
34121
34122
34123
34124
34125
34126
34127
34128
34129
34130
34131
34132
34133
34134
34135
34136
34137
34138
34139
34140
34141
34142
34143
34144
34145
34146
34147
34148
34149
34150
34151
34152
34153
34154
34155
34156
34157
34158
34159
34160
34161
34162
34163
34164
34165
34166
34167
34168
34169
34170
34171
34172
34173
34174
34175
34176
34177
34178
34179
34180
34181
34182
34183
34184
34185
34186
34187
34188
34189
34190
34191
34192
34193
34194
34195
34196
34197
34198
34199
34200
34201
34202
34203
34204
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215
34216
34217
34218
34219
34220
34221
34222
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235
34236
34237
34238
34239
34240
34241
34242
34243
34244
34245
34246
34247
34248
34249
34250
34251
34252
34253
34254
34255
34256
34257
34258
34259
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276
34277
34278
34279
34280
34281
34282
34283
34284
34285
34286
34287
34288
34289
34290
34291
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308
34309
34310
34311
34312
34313
34314
34315
34316
34317
34318
34319
34320
34321
34322
34323
34324
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405
34406
34407
34408
34409
34410
34411
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
34467
34468
34469
34470
34471
34472
34473
34474
34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514
34515
34516
34517
34518
34519
34520
34521
34522
34523
34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
34535
34536
34537
34538
34539
34540
34541
34542
34543
34544
34545
34546
34547
34548
34549
34550
34551
34552
34553
34554
34555
34556
34557
34558
34559
34560
34561
34562
34563
34564
34565
34566
34567
34568
34569
34570
34571
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581
34582
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610
34611
34612
34613
34614
34615
34616
34617
34618
34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
34630
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641
34642
34643
34644
34645
34646
34647
34648
34649
34650
34651
34652
34653
34654
34655
34656
34657
34658
34659
34660
34661
34662
34663
34664
34665
34666
34667
34668
34669
34670
34671
34672
34673
34674
34675
34676
34677
34678
34679
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723
34724
34725
34726
34727
34728
34729
34730
34731
34732
34733
34734
34735
34736
34737
34738
34739
34740
34741
34742
34743
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754
34755
34756
34757
34758
34759
34760
34761
34762
34763
34764
34765
34766
34767
34768
34769
34770
34771
34772
34773
34774
34775
34776
34777
34778
34779
34780
34781
34782
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871
34872
34873
34874
34875
34876
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897
34898
34899
34900
34901
34902
34903
34904
34905
34906
34907
34908
34909
34910
34911
34912
34913
34914
34915
34916
34917
34918
34919
34920
34921
34922
34923
34924
34925
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940
34941
34942
34943
34944
34945
34946
34947
34948
34949
34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970
34971
34972
34973
34974
34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005
35006
35007
35008
35009
35010
35011
35012
35013
35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041
35042
35043
35044
35045
35046
35047
35048
35049
35050
35051
35052
35053
35054
35055
35056
35057
35058
35059
35060
35061
35062
35063
35064
35065
35066
35067
35068
35069
35070
35071
35072
35073
35074
35075
35076
35077
35078
35079
35080
35081
35082
35083
35084
35085
35086
35087
35088
35089
35090
35091
35092
35093
35094
35095
35096
35097
35098
35099
35100
35101
35102
35103
35104
35105
35106
35107
35108
35109
35110
35111
35112
35113
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123
35124
35125
35126
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136
35137
35138
35139
35140
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153
35154
35155
35156
35157
35158
35159
35160
35161
35162
35163
35164
35165
35166
35167
35168
35169
35170
35171
35172
35173
35174
35175
35176
35177
35178
35179
35180
35181
35182
35183
35184
35185
35186
35187
35188
35189
35190
35191
35192
35193
35194
35195
35196
35197
35198
35199
35200
35201
35202
35203
35204
35205
35206
35207
35208
35209
35210
35211
35212
35213
35214
35215
35216
35217
35218
35219
35220
35221
35222
35223
35224
35225
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428
35429
35430
35431
35432
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443
35444
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454
35455
35456
35457
35458
35459
35460
35461
35462
35463
35464
35465
35466
35467
35468
35469
35470
35471
35472
35473
35474
35475
35476
35477
35478
35479
35480
35481
35482
35483
35484
35485
35486
35487
35488
35489
35490
35491
35492
35493
35494
35495
35496
35497
35498
35499
35500
35501
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548
35549
35550
35551
35552
35553
35554
35555
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567
35568
35569
35570
35571
35572
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621
35622
35623
35624
35625
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635
35636
35637
35638
35639
35640
35641
35642
35643
35644
35645
35646
35647
35648
35649
35650
35651
35652
35653
35654
35655
35656
35657
35658
35659
35660
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672
35673
35674
35675
35676
35677
35678
35679
35680
35681
35682
35683
35684
35685
35686
35687
35688
35689
35690
35691
35692
35693
35694
35695
35696
35697
35698
35699
35700
35701
35702
35703
35704
35705
35706
35707
35708
35709
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733
35734
35735
35736
35737
35738
35739
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
35765
35766
35767
35768
35769
35770
35771
35772
35773
35774
35775
35776
35777
35778
35779
35780
35781
35782
35783
35784
35785
35786
35787
35788
35789
35790
35791
35792
35793
35794
35795
35796
35797
35798
35799
35800
35801
35802
35803
35804
35805
35806
35807
35808
35809
35810
35811
35812
35813
35814
35815
35816
35817
35818
35819
35820
35821
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841
35842
35843
35844
35845
35846
35847
35848
35849
35850
35851
35852
35853
35854
35855
35856
35857
35858
35859
35860
35861
35862
35863
35864
35865
35866
35867
35868
35869
35870
35871
35872
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889
35890
35891
35892
35893
35894
35895
35896
35897
35898
35899
35900
35901
35902
35903
35904
35905
35906
35907
35908
35909
35910
35911
35912
35913
35914
35915
35916
35917
35918
35919
35920
35921
35922
35923
35924
35925
35926
35927
35928
35929
35930
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945
35946
35947
35948
35949
35950
35951
35952
35953
35954
35955
35956
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979
35980
35981
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012
36013
36014
36015
36016
36017
36018
36019
36020
36021
36022
36023
36024
36025
36026
36027
36028
36029
36030
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130
36131
36132
36133
36134
36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166
36167
36168
36169
36170
36171
36172
36173
36174
36175
36176
36177
36178
36179
36180
36181
36182
36183
36184
36185
36186
36187
36188
36189
36190
36191
36192
36193
36194
36195
36196
36197
36198
36199
36200
36201
36202
36203
36204
36205
36206
36207
36208
36209
36210
36211
36212
36213
36214
36215
36216
36217
36218
36219
36220
36221
36222
36223
36224
36225
36226
36227
36228
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339
36340
36341
36342
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397
36398
36399
36400
36401
36402
36403
36404
36405
36406
36407
36408
36409
36410
36411
36412
36413
36414
36415
36416
36417
36418
36419
36420
36421
36422
36423
36424
36425
36426
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436
36437
36438
36439
36440
36441
36442
36443
36444
36445
36446
36447
36448
36449
36450
36451
36452
36453
36454
36455
36456
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474
36475
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485
36486
36487
36488
36489
36490
36491
36492
36493
36494
36495
36496
36497
36498
36499
36500
36501
36502
36503
36504
36505
36506
36507
36508
36509
36510
36511
36512
36513
36514
36515
36516
36517
36518
36519
36520
36521
36522
36523
36524
36525
36526
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558
36559
36560
36561
36562
36563
36564
36565
36566
36567
36568
36569
36570
36571
36572
36573
36574
36575
36576
36577
36578
36579
36580
36581
36582
36583
36584
36585
36586
36587
36588
36589
36590
36591
36592
36593
36594
36595
36596
36597
36598
36599
36600
36601
36602
36603
36604
36605
36606
36607
36608
36609
36610
36611
36612
36613
36614
36615
36616
36617
36618
36619
36620
36621
36622
36623
36624
36625
36626
36627
36628
36629
36630
36631
36632
36633
36634
36635
36636
36637
36638
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649
36650
36651
36652
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672
36673
36674
36675
36676
36677
36678
36679
36680
36681
36682
36683
36684
36685
36686
36687
36688
36689
36690
36691
36692
36693
36694
36695
36696
36697
36698
36699
36700
36701
36702
36703
36704
36705
36706
36707
36708
36709
36710
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720
36721
36722
36723
36724
36725
36726
36727
36728
36729
36730
36731
36732
36733
36734
36735
36736
36737
36738
36739
36740
36741
36742
36743
36744
36745
36746
36747
36748
36749
36750
36751
36752
36753
36754
36755
36756
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787
36788
36789
36790
36791
36792
36793
36794
36795
36796
36797
36798
36799
36800
36801
36802
36803
36804
36805
36806
36807
36808
36809
36810
36811
36812
36813
36814
36815
36816
36817
36818
36819
36820
36821
36822
36823
36824
36825
36826
36827
36828
36829
36830
36831
36832
36833
36834
36835
36836
36837
36838
36839
36840
36841
36842
36843
36844
36845
36846
36847
36848
36849
36850
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860
36861
36862
36863
36864
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904
36905
36906
36907
36908
36909
36910
36911
36912
36913
36914
36915
36916
36917
36918
36919
36920
36921
36922
36923
36924
36925
36926
36927
36928
36929
36930
36931
36932
36933
36934
36935
36936
36937
36938
36939
36940
36941
36942
36943
36944
36945
36946
36947
36948
36949
36950
36951
36952
36953
36954
36955
36956
36957
36958
36959
36960
36961
36962
36963
36964
36965
36966
36967
36968
36969
36970
36971
36972
36973
36974
36975
36976
36977
36978
36979
36980
36981
36982
36983
36984
36985
36986
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009
37010
37011
37012
37013
37014
37015
37016
37017
37018
37019
37020
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030
37031
37032
37033
37034
37035
37036
37037
37038
37039
37040
37041
37042
37043
37044
37045
37046
37047
37048
37049
37050
37051
37052
37053
37054
37055
37056
37057
37058
37059
37060
37061
37062
37063
37064
37065
37066
37067
37068
37069
37070
37071
37072
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082
37083
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093
37094
37095
37096
37097
37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117
37118
37119
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132
37133
37134
37135
37136
37137
37138
37139
37140
37141
37142
37143
37144
37145
37146
37147
37148
37149
37150
37151
37152
37153
37154
37155
37156
37157
37158
37159
37160
37161
37162
37163
37164
37165
37166
37167
37168
37169
37170
37171
37172
37173
37174
37175
37176
37177
37178
37179
37180
37181
37182
37183
37184
37185
37186
37187
37188
37189
37190
37191
37192
37193
37194
37195
37196
37197
37198
37199
37200
37201
37202
37203
37204
37205
37206
37207
37208
37209
37210
37211
37212
37213
37214
37215
37216
37217
37218
37219
37220
37221
37222
37223
37224
37225
37226
37227
37228
37229
37230
37231
37232
37233
37234
37235
37236
37237
37238
37239
37240
37241
37242
37243
37244
37245
37246
37247
37248
37249
37250
37251
37252
37253
37254
37255
37256
37257
37258
37259
37260
37261
37262
37263
37264
37265
37266
37267
37268
37269
37270
37271
37272
37273
37274
37275
37276
37277
37278
37279
37280
37281
37282
37283
37284
37285
37286
37287
37288
37289
37290
37291
37292
37293
37294
37295
37296
37297
37298
37299
37300
37301
37302
37303
37304
37305
37306
37307
37308
37309
37310
37311
37312
37313
37314
37315
37316
37317
37318
37319
37320
37321
37322
37323
37324
37325
37326
37327
37328
37329
37330
37331
37332
37333
37334
37335
37336
37337
37338
37339
37340
37341
37342
37343
37344
37345
37346
37347
37348
37349
37350
37351
37352
37353
37354
37355
37356
37357
37358
37359
37360
37361
37362
37363
37364
37365
37366
37367
37368
37369
37370
37371
37372
37373
37374
37375
37376
37377
37378
37379
37380
37381
37382
37383
37384
37385
37386
37387
37388
37389
37390
37391
37392
37393
37394
37395
37396
37397
37398
37399
37400
37401
37402
37403
37404
37405
37406
37407
37408
37409
37410
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421
37422
37423
37424
37425
37426
37427
37428
37429
37430
37431
37432
37433
37434
37435
37436
37437
37438
37439
37440
37441
37442
37443
37444
37445
37446
37447
37448
37449
37450
37451
37452
37453
37454
37455
37456
37457
37458
37459
37460
37461
37462
37463
37464
37465
37466
37467
37468
37469
37470
37471
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481
37482
37483
37484
37485
37486
37487
37488
37489
37490
37491
37492
37493
37494
37495
37496
37497
37498
37499
37500
37501
37502
37503
37504
37505
37506
37507
37508
37509
37510
37511
37512
37513
37514
37515
37516
37517
37518
37519
37520
37521
37522
37523
37524
37525
37526
37527
37528
37529
37530
37531
37532
37533
37534
37535
37536
37537
37538
37539
37540
37541
37542
37543
37544
37545
37546
37547
37548
37549
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561
37562
37563
37564
37565
37566
37567
37568
37569
37570
37571
37572
37573
37574
37575
37576
37577
37578
37579
37580
37581
37582
37583
37584
37585
37586
37587
37588
37589
37590
37591
37592
37593
37594
37595
37596
37597
37598
37599
37600
37601
37602
37603
37604
37605
37606
37607
37608
37609
37610
37611
37612
37613
37614
37615
37616
37617
37618
37619
37620
37621
37622
37623
37624
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635
37636
37637
37638
37639
37640
37641
37642
37643
37644
37645
37646
37647
37648
37649
37650
37651
37652
37653
37654
37655
37656
37657
37658
37659
37660
37661
37662
37663
37664
37665
37666
37667
37668
37669
37670
37671
37672
37673
37674
37675
37676
37677
37678
37679
37680
37681
37682
37683
37684
37685
37686
37687
37688
37689
37690
37691
37692
37693
37694
37695
37696
37697
37698
37699
37700
37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714
37715
37716
37717
37718
37719
37720
37721
37722
37723
37724
37725
37726
37727
37728
37729
37730
37731
37732
37733
37734
37735
37736
37737
37738
37739
37740
37741
37742
37743
37744
37745
37746
37747
37748
37749
37750
37751
37752
37753
37754
37755
37756
37757
37758
37759
37760
37761
37762
37763
37764
37765
37766
37767
37768
37769
37770
37771
37772
37773
37774
37775
37776
37777
37778
37779
37780
37781
37782
37783
37784
37785
37786
37787
37788
37789
37790
37791
37792
37793
37794
37795
37796
37797
37798
37799
37800
37801
37802
37803
37804
37805
37806
37807
37808
37809
37810
37811
37812
37813
37814
37815
37816
37817
37818
37819
37820
37821
37822
37823
37824
37825
37826
37827
37828
37829
37830
37831
37832
37833
37834
37835
37836
37837
37838
37839
37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851
37852
37853
37854
37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867
37868
37869
37870
37871
37872
37873
37874
37875
37876
37877
37878
37879
37880
37881
37882
37883
37884
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917
37918
37919
37920
37921
37922
37923
37924
37925
37926
37927
37928
37929
37930
37931
37932
37933
37934
37935
37936
37937
37938
37939
37940
37941
37942
37943
37944
37945
37946
37947
37948
37949
37950
37951
37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962
37963
37964
37965
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982
37983
37984
37985
37986
37987
37988
37989
37990
37991
37992
37993
37994
37995
37996
37997
37998
37999
38000
38001
38002
38003
38004
38005
38006
38007
38008
38009
38010
38011
38012
38013
38014
38015
38016
38017
38018
38019
38020
38021
38022
38023
38024
38025
38026
38027
38028
38029
38030
38031
38032
38033
38034
38035
38036
38037
38038
38039
38040
38041
38042
38043
38044
38045
38046
38047
38048
38049
38050
38051
38052
38053
38054
38055
38056
38057
38058
38059
38060
38061
38062
38063
38064
38065
38066
38067
38068
38069
38070
38071
38072
38073
38074
38075
38076
38077
38078
38079
38080
38081
38082
38083
38084
38085
38086
38087
38088
38089
38090
38091
38092
38093
38094
38095
38096
38097
38098
38099
38100
38101
38102
38103
38104
38105
38106
38107
38108
38109
38110
38111
38112
38113
38114
38115
38116
38117
38118
38119
38120
38121
38122
38123
38124
38125
38126
38127
38128
38129
38130
38131
38132
38133
38134
38135
38136
38137
38138
38139
38140
38141
38142
38143
38144
38145
38146
38147
38148
38149
38150
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161
38162
38163
38164
38165
38166
38167
38168
38169
38170
38171
38172
38173
38174
38175
38176
38177
38178
38179
38180
38181
38182
38183
38184
38185
38186
38187
38188
38189
38190
38191
38192
38193
38194
38195
38196
38197
38198
38199
38200
38201
38202
38203
38204
38205
38206
38207
38208
38209
38210
38211
38212
38213
38214
38215
38216
38217
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227
38228
38229
38230
38231
38232
38233
38234
38235
38236
38237
38238
38239
38240
38241
38242
38243
38244
38245
38246
38247
38248
38249
38250
38251
38252
38253
38254
38255
38256
38257
38258
38259
38260
38261
38262
38263
38264
38265
38266
38267
38268
38269
38270
38271
38272
38273
38274
38275
38276
38277
38278
38279
38280
38281
38282
38283
38284
38285
38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297
38298
38299
38300
38301
38302
38303
38304
38305
38306
38307
38308
38309
38310
38311
38312
38313
38314
38315
38316
38317
38318
38319
38320
38321
38322
38323
38324
38325
38326
38327
38328
38329
38330
38331
38332
38333
38334
38335
38336
38337
38338
38339
38340
38341
38342
38343
38344
38345
38346
38347
38348
38349
38350
38351
38352
38353
38354
38355
38356
38357
38358
38359
38360
38361
38362
38363
38364
38365
38366
38367
38368
38369
38370
38371
38372
38373
38374
38375
38376
38377
38378
38379
38380
38381
38382
38383
38384
38385
38386
38387
38388
38389
38390
38391
38392
38393
38394
38395
38396
38397
38398
38399
38400
38401
38402
38403
38404
38405
38406
38407
38408
38409
38410
38411
38412
38413
38414
38415
38416
38417
38418
38419
38420
38421
38422
38423
38424
38425
38426
38427
38428
38429
38430
38431
38432
38433
38434
38435
38436
38437
38438
38439
38440
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450
38451
38452
38453
38454
38455
38456
38457
38458
38459
38460
38461
38462
38463
38464
38465
38466
38467
38468
38469
38470
38471
38472
38473
38474
38475
38476
38477
38478
38479
38480
38481
38482
38483
38484
38485
38486
38487
38488
38489
38490
38491
38492
38493
38494
38495
38496
38497
38498
38499
38500
38501
38502
38503
38504
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514
38515
38516
38517
38518
38519
38520
38521
38522
38523
38524
38525
38526
38527
38528
38529
38530
38531
38532
38533
38534
38535
38536
38537
38538
38539
38540
38541
38542
38543
38544
38545
38546
38547
38548
38549
38550
38551
38552
38553
38554
38555
38556
38557
38558
38559
38560
38561
38562
38563
38564
38565
38566
38567
38568
38569
38570
38571
38572
38573
38574
38575
38576
38577
38578
38579
38580
38581
38582
38583
38584
38585
38586
38587
38588
38589
38590
38591
38592
38593
38594
38595
38596
38597
38598
38599
38600
38601
38602
38603
38604
38605
38606
38607
38608
38609
38610
38611
38612
38613
38614
38615
38616
38617
38618
38619
38620
38621
38622
38623
38624
38625
38626
38627
38628
38629
38630
38631
38632
38633
38634
38635
38636
38637
38638
38639
38640
38641
38642
38643
38644
38645
38646
38647
38648
38649
38650
38651
38652
38653
38654
38655
38656
38657
38658
38659
38660
38661
38662
38663
38664
38665
38666
38667
38668
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685
38686
38687
38688
38689
38690
38691
38692
38693
38694
38695
38696
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706
38707
38708
38709
38710
38711
38712
38713
38714
38715
38716
38717
38718
38719
38720
38721
38722
38723
38724
38725
38726
38727
38728
38729
38730
38731
38732
38733
38734
38735
38736
38737
38738
38739
38740
38741
38742
38743
38744
38745
38746
38747
38748
38749
38750
38751
38752
38753
38754
38755
38756
38757
38758
38759
38760
38761
38762
38763
38764
38765
38766
38767
38768
38769
38770
38771
38772
38773
38774
38775
38776
38777
38778
38779
38780
38781
38782
38783
38784
38785
38786
38787
38788
38789
38790
38791
38792
38793
38794
38795
38796
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814
38815
38816
38817
38818
38819
38820
38821
38822
38823
38824
38825
38826
38827
38828
38829
38830
38831
38832
38833
38834
38835
38836
38837
38838
38839
38840
38841
38842
38843
38844
38845
38846
38847
38848
38849
38850
38851
38852
38853
38854
38855
38856
38857
38858
38859
38860
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873
38874
38875
38876
38877
38878
38879
38880
38881
38882
38883
38884
38885
38886
38887
38888
38889
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910
38911
38912
38913
38914
38915
38916
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948
38949
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989
38990
38991
38992
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006
39007
39008
39009
39010
39011
39012
39013
39014
39015
39016
39017
39018
39019
39020
39021
39022
39023
39024
39025
39026
39027
39028
39029
39030
39031
39032
39033
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043
39044
39045
39046
39047
39048
39049
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
39061
39062
39063
39064
39065
39066
39067
39068
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
39079
39080
39081
39082
39083
39084
39085
39086
39087
39088
39089
39090
39091
39092
39093
39094
39095
39096
39097
39098
39099
39100
39101
39102
39103
39104
39105
39106
39107
39108
39109
39110
39111
39112
39113
39114
39115
39116
39117
39118
39119
39120
39121
39122
39123
39124
39125
39126
39127
39128
39129
39130
39131
39132
39133
39134
39135
39136
39137
39138
39139
39140
39141
39142
39143
39144
39145
39146
39147
39148
39149
39150
39151
39152
39153
39154
39155
39156
39157
39158
39159
39160
39161
39162
39163
39164
39165
39166
39167
39168
39169
39170
39171
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183
39184
39185
39186
39187
39188
39189
39190
39191
39192
39193
39194
39195
39196
39197
39198
39199
39200
39201
39202
39203
39204
39205
39206
39207
39208
39209
39210
39211
39212
39213
39214
39215
39216
39217
39218
39219
39220
39221
39222
39223
39224
39225
39226
39227
39228
39229
39230
39231
39232
39233
39234
39235
39236
39237
39238
39239
39240
39241
39242
39243
39244
39245
39246
39247
39248
39249
39250
39251
39252
39253
39254
39255
39256
39257
39258
39259
39260
39261
39262
39263
39264
39265
39266
39267
39268
39269
39270
39271
39272
39273
39274
39275
39276
39277
39278
39279
39280
39281
39282
39283
39284
39285
39286
39287
39288
39289
39290
39291
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301
39302
39303
39304
39305
39306
39307
39308
39309
39310
39311
39312
39313
39314
39315
39316
39317
39318
39319
39320
39321
39322
39323
39324
39325
39326
39327
39328
39329
39330
39331
39332
39333
39334
39335
39336
39337
39338
39339
39340
39341
39342
39343
39344
39345
39346
39347
39348
39349
39350
39351
39352
39353
39354
39355
39356
39357
39358
39359
39360
39361
39362
39363
39364
39365
39366
39367
39368
39369
39370
39371
39372
39373
39374
39375
39376
39377
39378
39379
39380
39381
39382
39383
39384
39385
39386
39387
39388
39389
39390
39391
39392
39393
39394
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430
39431
39432
39433
39434
39435
39436
39437
39438
39439
39440
39441
39442
39443
39444
39445
39446
39447
39448
39449
39450
39451
39452
39453
39454
39455
39456
39457
39458
39459
39460
39461
39462
39463
39464
39465
39466
39467
39468
39469
39470
39471
39472
39473
39474
39475
39476
39477
39478
39479
39480
39481
39482
39483
39484
39485
39486
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496
39497
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507
39508
39509
39510
39511
39512
39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
39574
39575
39576
39577
39578
39579
39580
39581
39582
39583
39584
39585
39586
39587
39588
39589
39590
39591
39592
39593
39594
39595
39596
39597
39598
39599
39600
39601
39602
39603
39604
39605
39606
39607
39608
39609
39610
39611
39612
39613
39614
39615
39616
39617
39618
39619
39620
39621
39622
39623
39624
39625
39626
39627
39628
39629
39630
39631
39632
39633
39634
39635
39636
39637
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
39649
39650
39651
39652
39653
39654
39655
39656
39657
39658
39659
39660
39661
39662
39663
39664
39665
39666
39667
39668
39669
39670
39671
39672
39673
39674
39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685
39686
39687
39688
39689
39690
39691
39692
39693
39694
39695
39696
39697
39698
39699
39700
39701
39702
39703
39704
39705
39706
39707
39708
39709
39710
39711
39712
39713
39714
39715
39716
39717
39718
39719
39720
39721
39722
39723
39724
39725
39726
39727
39728
39729
39730
39731
39732
39733
39734
39735
39736
39737
39738
39739
39740
39741
39742
39743
39744
39745
39746
39747
39748
39749
39750
39751
39752
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762
39763
39764
39765
39766
39767
39768
39769
39770
39771
39772
39773
39774
39775
39776
39777
39778
39779
39780
39781
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794
39795
39796
39797
39798
39799
39800
39801
39802
39803
39804
39805
39806
39807
39808
39809
39810
39811
39812
39813
39814
39815
39816
39817
39818
39819
39820
39821
39822
39823
39824
39825
39826
39827
39828
39829
39830
39831
39832
39833
39834
39835
39836
39837
39838
39839
39840
39841
39842
39843
39844
39845
39846
39847
39848
39849
39850
39851
39852
39853
39854
39855
39856
39857
39858
39859
39860
39861
39862
39863
39864
39865
39866
39867
39868
39869
39870
39871
39872
39873
39874
39875
39876
39877
39878
39879
39880
39881
39882
39883
39884
39885
39886
39887
39888
39889
39890
39891
39892
39893
39894
39895
39896
39897
39898
39899
39900
39901
39902
39903
39904
39905
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917
39918
39919
39920
39921
39922
39923
39924
39925
39926
39927
39928
39929
39930
39931
39932
39933
39934
39935
39936
39937
39938
39939
39940
39941
39942
39943
39944
39945
39946
39947
39948
39949
39950
39951
39952
39953
39954
39955
39956
39957
39958
39959
39960
39961
39962
39963
39964
39965
39966
39967
39968
39969
39970
39971
39972
39973
39974
39975
39976
39977
39978
39979
39980
39981
39982
39983
39984
39985
39986
39987
39988
39989
39990
39991
39992
39993
39994
39995
39996
39997
39998
39999
40000
40001
40002
40003
40004
40005
40006
40007
40008
40009
40010
40011
40012
40013
40014
40015
40016
40017
40018
40019
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049
40050
40051
40052
40053
40054
40055
40056
40057
40058
40059
40060
40061
40062
40063
40064
40065
40066
40067
40068
40069
40070
40071
40072
40073
40074
40075
40076
40077
40078
40079
40080
40081
40082
40083
40084
40085
40086
40087
40088
40089
40090
40091
40092
40093
40094
40095
40096
40097
40098
40099
40100
40101
40102
40103
40104
40105
40106
40107
40108
40109
40110
40111
40112
40113
40114
40115
40116
40117
40118
40119
40120
40121
40122
40123
40124
40125
40126
40127
40128
40129
40130
40131
40132
40133
40134
40135
40136
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149
40150
40151
40152
40153
40154
40155
40156
40157
40158
40159
40160
40161
40162
40163
40164
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190
40191
40192
40193
40194
40195
40196
40197
40198
40199
40200
40201
40202
40203
40204
40205
40206
40207
40208
40209
40210
40211
40212
40213
40214
40215
40216
40217
40218
40219
40220
40221
40222
40223
40224
40225
40226
40227
40228
40229
40230
40231
40232
40233
40234
40235
40236
40237
40238
40239
40240
40241
40242
40243
40244
40245
40246
40247
40248
40249
40250
40251
40252
40253
40254
40255
40256
40257
40258
40259
40260
40261
40262
40263
40264
40265
40266
40267
40268
40269
40270
40271
40272
40273
40274
40275
40276
40277
40278
40279
40280
40281
40282
40283
40284
40285
40286
40287
40288
40289
40290
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318
40319
40320
40321
40322
40323
40324
40325
40326
40327
40328
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
40350
40351
40352
40353
40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
40364
40365
40366
40367
40368
40369
40370
40371
40372
40373
40374
40375
40376
40377
40378
40379
40380
40381
40382
40383
40384
40385
40386
40387
40388
40389
40390
40391
40392
40393
40394
40395
40396
40397
40398
40399
40400
40401
40402
40403
40404
40405
40406
40407
40408
40409
40410
40411
40412
40413
40414
40415
40416
40417
40418
40419
40420
40421
40422
40423
40424
40425
40426
40427
40428
40429
40430
40431
40432
40433
40434
40435
40436
40437
40438
40439
40440
40441
40442
40443
40444
40445
40446
40447
40448
40449
40450
40451
40452
40453
40454
40455
40456
40457
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467
40468
40469
40470
40471
40472
40473
40474
40475
40476
40477
40478
40479
40480
40481
40482
40483
40484
40485
40486
40487
40488
40489
40490
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544
40545
40546
40547
40548
40549
40550
40551
40552
40553
40554
40555
40556
40557
40558
40559
40560
40561
40562
40563
40564
40565
40566
40567
40568
40569
40570
40571
40572
40573
40574
40575
40576
40577
40578
40579
40580
40581
40582
40583
40584
40585
40586
40587
40588
40589
40590
40591
40592
40593
40594
40595
40596
40597
40598
40599
40600
40601
40602
40603
40604
40605
40606
40607
40608
40609
40610
40611
40612
40613
40614
40615
40616
40617
40618
40619
40620
40621
40622
40623
40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636
40637
40638
40639
40640
40641
40642
40643
40644
40645
40646
40647
40648
40649
40650
40651
40652
40653
40654
40655
40656
40657
40658
40659
40660
40661
40662
40663
40664
40665
40666
40667
40668
40669
40670
40671
40672
40673
40674
40675
40676
40677
40678
40679
40680
40681
40682
40683
40684
40685
40686
40687
40688
40689
40690
40691
40692
40693
40694
40695
40696
40697
40698
40699
40700
40701
40702
40703
40704
40705
40706
40707
40708
40709
40710
40711
40712
40713
40714
40715
40716
40717
40718
40719
40720
40721
40722
40723
40724
40725
40726
40727
40728
40729
40730
40731
40732
40733
40734
40735
40736
40737
40738
40739
40740
40741
40742
40743
40744
40745
40746
40747
40748
40749
40750
40751
40752
40753
40754
40755
40756
40757
40758
40759
40760
40761
40762
40763
40764
40765
40766
40767
40768
40769
40770
40771
40772
40773
40774
40775
40776
40777
40778
40779
40780
40781
40782
40783
40784
40785
40786
40787
40788
40789
40790
40791
40792
40793
40794
40795
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805
40806
40807
40808
40809
40810
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822
40823
40824
40825
40826
40827
40828
40829
40830
40831
40832
40833
40834
40835
40836
40837
40838
40839
40840
40841
40842
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852
40853
40854
40855
40856
40857
40858
40859
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869
40870
40871
40872
40873
40874
40875
40876
40877
40878
40879
40880
40881
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894
40895
40896
40897
40898
40899
40900
40901
40902
40903
40904
40905
40906
40907
40908
40909
40910
40911
40912
40913
40914
40915
40916
40917
40918
40919
40920
40921
40922
40923
40924
40925
40926
40927
40928
40929
40930
40931
40932
40933
40934
40935
40936
40937
40938
40939
40940
40941
40942
40943
40944
40945
40946
40947
40948
40949
40950
40951
40952
40953
40954
40955
40956
40957
40958
40959
40960
40961
40962
40963
40964
40965
40966
40967
40968
40969
40970
40971
40972
40973
40974
40975
40976
40977
40978
40979
40980
40981
40982
40983
40984
40985
40986
40987
40988
40989
40990
40991
40992
40993
40994
40995
40996
40997
40998
40999
41000
41001
41002
41003
41004
41005
41006
41007
41008
41009
41010
41011
41012
41013
41014
41015
41016
41017
41018
41019
41020
41021
41022
41023
41024
41025
41026
41027
41028
41029
41030
41031
41032
41033
41034
41035
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050
41051
41052
41053
41054
41055
41056
41057
41058
41059
41060
41061
41062
41063
41064
41065
41066
41067
41068
41069
41070
41071
41072
41073
41074
41075
41076
41077
41078
41079
41080
41081
41082
41083
41084
41085
41086
41087
41088
41089
41090
41091
41092
41093
41094
41095
41096
41097
41098
41099
41100
41101
41102
41103
41104
41105
41106
41107
41108
41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
41133
41134
41135
41136
41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155
41156
41157
41158
41159
41160
41161
41162
41163
41164
41165
41166
41167
41168
41169
41170
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
41183
41184
41185
41186
41187
41188
41189
41190
41191
41192
41193
41194
41195
41196
41197
41198
41199
41200
41201
41202
41203
41204
41205
41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216
41217
41218
41219
41220
41221
41222
41223
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246
41247
41248
41249
41250
41251
41252
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
41289
41290
41291
41292
41293
41294
41295
41296
41297
41298
41299
41300
41301
41302
41303
41304
41305
41306
41307
41308
41309
41310
41311
41312
41313
41314
41315
41316
41317
41318
41319
41320
41321
41322
41323
41324
41325
41326
41327
41328
41329
41330
41331
41332
41333
41334
41335
41336
41337
41338
41339
41340
41341
41342
41343
41344
41345
41346
41347
41348
41349
41350
41351
41352
41353
41354
41355
41356
41357
41358
41359
41360
41361
41362
41363
41364
41365
41366
41367
41368
41369
41370
41371
41372
41373
41374
41375
41376
41377
41378
41379
41380
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400
41401
41402
41403
41404
41405
41406
41407
41408
41409
41410
41411
41412
41413
41414
41415
41416
41417
41418
41419
41420
41421
41422
41423
41424
41425
41426
41427
41428
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438
41439
41440
41441
41442
41443
41444
41445
41446
41447
41448
41449
41450
41451
41452
41453
41454
41455
41456
41457
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468
41469
41470
41471
41472
41473
41474
41475
41476
41477
41478
41479
41480
41481
41482
41483
41484
41485
41486
41487
41488
41489
41490
41491
41492
41493
41494
41495
41496
41497
41498
41499
41500
41501
41502
41503
41504
41505
41506
41507
41508
41509
41510
41511
41512
41513
41514
41515
41516
41517
41518
41519
41520
41521
41522
41523
41524
41525
41526
41527
41528
41529
41530
41531
41532
41533
41534
41535
41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
41589
41590
41591
41592
41593
41594
41595
41596
41597
41598
41599
41600
41601
41602
41603
41604
41605
41606
41607
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618
41619
41620
41621
41622
41623
41624
41625
41626
41627
41628
41629
41630
41631
41632
41633
41634
41635
41636
41637
41638
41639
41640
41641
41642
41643
41644
41645
41646
41647
41648
41649
41650
41651
41652
41653
41654
41655
41656
41657
41658
41659
41660
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670
41671
41672
41673
41674
41675
41676
41677
41678
41679
41680
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
41691
41692
41693
41694
41695
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724
41725
41726
41727
41728
41729
41730
41731
41732
41733
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754
41755
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781
41782
41783
41784
41785
41786
41787
41788
41789
41790
41791
41792
41793
41794
41795
41796
41797
41798
41799
41800
41801
41802
41803
41804
41805
41806
41807
41808
41809
41810
41811
41812
41813
41814
41815
41816
41817
41818
41819
41820
41821
41822
41823
41824
41825
41826
41827
41828
41829
41830
41831
41832
41833
41834
41835
41836
41837
41838
41839
41840
41841
41842
41843
41844
41845
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883
41884
41885
41886
41887
41888
41889
41890
41891
41892
41893
41894
41895
41896
41897
41898
41899
41900
41901
41902
41903
41904
41905
41906
41907
41908
41909
41910
41911
41912
41913
41914
41915
41916
41917
41918
41919
41920
41921
41922
41923
41924
41925
41926
41927
41928
41929
41930
41931
41932
41933
41934
41935
41936
41937
41938
41939
41940
41941
41942
41943
41944
41945
41946
41947
41948
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963
41964
41965
41966
41967
41968
41969
41970
41971
41972
41973
41974
41975
41976
41977
41978
41979
41980
41981
41982
41983
41984
41985
41986
41987
41988
41989
41990
41991
41992
41993
41994
41995
41996
41997
41998
41999
42000
42001
42002
42003
42004
42005
42006
42007
42008
42009
42010
42011
42012
42013
42014
42015
42016
42017
42018
42019
42020
42021
42022
42023
42024
42025
42026
42027
42028
42029
42030
42031
42032
42033
42034
42035
42036
42037
42038
42039
42040
42041
42042
42043
42044
42045
42046
42047
42048
42049
42050
42051
42052
42053
42054
42055
42056
42057
42058
42059
42060
42061
42062
42063
42064
42065
42066
42067
42068
42069
42070
42071
42072
42073
42074
42075
42076
42077
42078
42079
42080
42081
42082
42083
42084
42085
42086
42087
42088
42089
42090
42091
42092
42093
42094
42095
42096
42097
42098
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138
42139
42140
42141
42142
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173
42174
42175
42176
42177
42178
42179
42180
42181
42182
42183
42184
42185
42186
42187
42188
42189
42190
42191
42192
42193
42194
42195
42196
42197
42198
42199
42200
42201
42202
42203
42204
42205
42206
42207
42208
42209
42210
42211
42212
42213
42214
42215
42216
42217
42218
42219
42220
42221
42222
42223
42224
42225
42226
42227
42228
42229
42230
42231
42232
42233
42234
42235
42236
42237
42238
42239
42240
42241
42242
42243
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257
42258
42259
42260
42261
42262
42263
42264
42265
42266
42267
42268
42269
42270
42271
42272
42273
42274
42275
42276
42277
42278
42279
42280
42281
42282
42283
42284
42285
42286
42287
42288
42289
42290
42291
42292
42293
42294
42295
42296
42297
42298
42299
42300
42301
42302
42303
42304
42305
42306
42307
42308
42309
42310
42311
42312
42313
42314
42315
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325
42326
42327
42328
42329
42330
42331
42332
42333
42334
42335
42336
42337
42338
42339
42340
42341
42342
42343
42344
42345
42346
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366
42367
42368
42369
42370
42371
42372
42373
42374
42375
42376
42377
42378
42379
42380
42381
42382
42383
42384
42385
42386
42387
42388
42389
42390
42391
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405
42406
42407
42408
42409
42410
42411
42412
42413
42414
42415
42416
42417
42418
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
42471
42472
42473
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484
42485
42486
42487
42488
42489
42490
42491
42492
42493
42494
42495
42496
42497
42498
42499
42500
42501
42502
42503
42504
42505
42506
42507
42508
42509
42510
42511
42512
42513
42514
42515
42516
42517
42518
42519
42520
42521
42522
42523
42524
42525
42526
42527
42528
42529
42530
42531
42532
42533
42534
42535
42536
42537
42538
42539
42540
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572
42573
42574
42575
42576
42577
42578
42579
42580
42581
42582
42583
42584
42585
42586
42587
42588
42589
42590
42591
42592
42593
42594
42595
42596
42597
42598
42599
42600
42601
42602
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706
42707
42708
42709
42710
42711
42712
42713
42714
42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752
42753
42754
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768
42769
42770
42771
42772
42773
42774
42775
42776
42777
42778
42779
42780
42781
42782
42783
42784
42785
42786
42787
42788
42789
42790
42791
42792
42793
42794
42795
42796
42797
42798
42799
42800
42801
42802
42803
42804
42805
42806
42807
42808
42809
42810
42811
42812
42813
42814
42815
42816
42817
42818
42819
42820
42821
42822
42823
42824
42825
42826
42827
42828
42829
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
42845
42846
42847
42848
42849
42850
42851
42852
42853
42854
42855
42856
42857
42858
42859
42860
42861
42862
42863
42864
42865
42866
42867
42868
42869
42870
42871
42872
42873
42874
42875
42876
42877
42878
42879
42880
42881
42882
42883
42884
42885
42886
42887
42888
42889
42890
42891
42892
42893
42894
42895
42896
42897
42898
42899
42900
42901
42902
42903
42904
42905
42906
42907
42908
42909
42910
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939
42940
42941
42942
42943
42944
42945
42946
42947
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958
42959
42960
42961
42962
42963
42964
42965
42966
42967
42968
42969
42970
42971
42972
42973
42974
42975
42976
42977
42978
42979
42980
42981
42982
42983
42984
42985
42986
42987
42988
42989
42990
42991
42992
42993
42994
42995
42996
42997
42998
42999
43000
43001
43002
43003
43004
43005
43006
43007
43008
43009
43010
43011
43012
43013
43014
43015
43016
43017
43018
43019
43020
43021
43022
43023
43024
43025
43026
43027
43028
43029
43030
43031
43032
43033
43034
43035
43036
43037
43038
43039
43040
43041
43042
43043
43044
43045
43046
43047
43048
43049
43050
43051
43052
43053
43054
43055
43056
43057
43058
43059
43060
43061
43062
43063
43064
43065
43066
43067
43068
43069
43070
43071
43072
43073
43074
43075
43076
43077
43078
43079
43080
43081
43082
43083
43084
43085
43086
43087
43088
43089
43090
43091
43092
43093
43094
43095
43096
43097
43098
43099
43100
43101
43102
43103
43104
43105
43106
43107
43108
43109
43110
43111
43112
43113
43114
43115
43116
43117
43118
43119
43120
43121
43122
43123
43124
43125
43126
43127
43128
43129
43130
43131
43132
43133
43134
43135
43136
43137
43138
43139
43140
43141
43142
43143
43144
43145
43146
43147
43148
43149
43150
43151
43152
43153
43154
43155
43156
43157
43158
43159
43160
43161
43162
43163
43164
43165
43166
43167
43168
43169
43170
43171
43172
43173
43174
43175
43176
43177
43178
43179
43180
43181
43182
43183
43184
43185
43186
43187
43188
43189
43190
43191
43192
43193
43194
43195
43196
43197
43198
43199
43200
43201
43202
43203
43204
43205
43206
43207
43208
43209
43210
43211
43212
43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
43258
43259
43260
43261
43262
43263
43264
43265
43266
43267
43268
43269
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279
43280
43281
43282
43283
43284
43285
43286
43287
43288
43289
43290
43291
43292
43293
43294
43295
43296
43297
43298
43299
43300
43301
43302
43303
43304
43305
43306
43307
43308
43309
43310
43311
43312
43313
43314
43315
43316
43317
43318
43319
43320
43321
43322
43323
43324
43325
43326
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336
43337
43338
43339
43340
43341
43342
43343
43344
43345
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374
43375
43376
43377
43378
43379
43380
43381
43382
43383
43384
43385
43386
43387
43388
43389
43390
43391
43392
43393
43394
43395
43396
43397
43398
43399
43400
43401
43402
43403
43404
43405
43406
43407
43408
43409
43410
43411
43412
43413
43414
43415
43416
43417
43418
43419
43420
43421
43422
43423
43424
43425
43426
43427
43428
43429
43430
43431
43432
43433
43434
43435
43436
43437
43438
43439
43440
43441
43442
43443
43444
43445
43446
43447
43448
43449
43450
43451
43452
43453
43454
43455
43456
43457
43458
43459
43460
43461
43462
43463
43464
43465
43466
43467
43468
43469
43470
43471
43472
43473
43474
43475
43476
43477
43478
43479
43480
43481
43482
43483
43484
43485
43486
43487
43488
43489
43490
43491
43492
43493
43494
43495
43496
43497
43498
43499
43500
43501
43502
43503
43504
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534
43535
43536
43537
43538
43539
43540
43541
43542
43543
43544
43545
43546
43547
43548
43549
43550
43551
43552
43553
43554
43555
43556
43557
43558
43559
43560
43561
43562
43563
43564
43565
43566
43567
43568
43569
43570
43571
43572
43573
43574
43575
43576
43577
43578
43579
43580
43581
43582
43583
43584
43585
43586
43587
43588
43589
43590
43591
43592
43593
43594
43595
43596
43597
43598
43599
43600
43601
43602
43603
43604
43605
43606
43607
43608
43609
43610
43611
43612
43613
43614
43615
43616
43617
43618
43619
43620
43621
43622
43623
43624
43625
43626
43627
43628
43629
43630
43631
43632
43633
43634
43635
43636
43637
43638
43639
43640
43641
43642
43643
43644
43645
43646
43647
43648
43649
43650
43651
43652
43653
43654
43655
43656
43657
43658
43659
43660
43661
43662
43663
43664
43665
43666
43667
43668
43669
43670
43671
43672
43673
43674
43675
43676
43677
43678
43679
43680
43681
43682
43683
43684
43685
43686
43687
43688
43689
43690
43691
43692
43693
43694
43695
43696
43697
43698
43699
43700
43701
43702
43703
43704
43705
43706
43707
43708
43709
43710
43711
43712
43713
43714
43715
43716
43717
43718
43719
43720
43721
43722
43723
43724
43725
43726
43727
43728
43729
43730
43731
43732
43733
43734
43735
43736
43737
43738
43739
43740
43741
43742
43743
43744
43745
43746
43747
43748
43749
43750
43751
43752
43753
43754
43755
43756
43757
43758
43759
43760
43761
43762
43763
43764
43765
43766
43767
43768
43769
43770
43771
43772
43773
43774
43775
43776
43777
43778
43779
43780
43781
43782
43783
43784
43785
43786
43787
43788
43789
43790
43791
43792
43793
43794
43795
43796
43797
43798
43799
43800
43801
43802
43803
43804
43805
43806
43807
43808
43809
43810
43811
43812
43813
43814
43815
43816
43817
43818
43819
43820
43821
43822
43823
43824
43825
43826
43827
43828
43829
43830
43831
43832
43833
43834
43835
43836
43837
43838
43839
43840
43841
43842
43843
43844
43845
43846
43847
43848
43849
43850
43851
43852
43853
43854
43855
43856
43857
43858
43859
43860
43861
43862
43863
43864
43865
43866
43867
43868
43869
43870
43871
43872
43873
43874
43875
43876
43877
43878
43879
43880
43881
43882
43883
43884
43885
43886
43887
43888
43889
43890
43891
43892
43893
43894
43895
43896
43897
43898
43899
43900
43901
43902
43903
43904
43905
43906
43907
43908
43909
43910
43911
43912
43913
43914
43915
43916
43917
43918
43919
43920
43921
43922
43923
43924
43925
43926
43927
43928
43929
43930
43931
43932
43933
43934
43935
43936
43937
43938
43939
43940
43941
43942
43943
43944
43945
43946
43947
43948
43949
43950
43951
43952
43953
43954
43955
43956
43957
43958
43959
43960
43961
43962
43963
43964
43965
43966
43967
43968
43969
43970
43971
43972
43973
43974
43975
43976
43977
43978
43979
43980
43981
43982
43983
43984
43985
43986
43987
43988
43989
43990
43991
43992
43993
43994
43995
43996
43997
43998
43999
44000
44001
44002
44003
44004
44005
44006
44007
44008
44009
44010
44011
44012
44013
44014
44015
44016
44017
44018
44019
44020
44021
44022
44023
44024
44025
44026
44027
44028
44029
44030
44031
44032
44033
44034
44035
44036
44037
44038
44039
44040
44041
44042
44043
44044
44045
44046
44047
44048
44049
44050
44051
44052
44053
44054
44055
44056
44057
44058
44059
44060
44061
44062
44063
44064
44065
44066
44067
44068
44069
44070
44071
44072
44073
44074
44075
44076
44077
44078
44079
44080
44081
44082
44083
44084
44085
44086
44087
44088
44089
44090
44091
44092
44093
44094
44095
44096
44097
44098
44099
44100
44101
44102
44103
44104
44105
44106
44107
44108
44109
44110
44111
44112
44113
44114
44115
44116
44117
44118
44119
44120
44121
44122
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132
44133
44134
44135
44136
44137
44138
44139
44140
44141
44142
44143
44144
44145
44146
44147
44148
44149
44150
44151
44152
44153
44154
44155
44156
44157
44158
44159
44160
44161
44162
44163
44164
44165
44166
44167
44168
44169
44170
44171
44172
44173
44174
44175
44176
44177
44178
44179
44180
44181
44182
44183
44184
44185
44186
44187
44188
44189
44190
44191
44192
44193
44194
44195
44196
44197
44198
44199
44200
44201
44202
44203
44204
44205
44206
44207
44208
44209
44210
44211
44212
44213
44214
44215
44216
44217
44218
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
44229
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239
44240
44241
44242
44243
44244
44245
44246
44247
44248
44249
44250
44251
44252
44253
44254
44255
44256
44257
44258
44259
44260
44261
44262
44263
44264
44265
44266
44267
44268
44269
44270
44271
44272
44273
44274
44275
44276
44277
44278
44279
44280
44281
44282
44283
44284
44285
44286
44287
44288
44289
44290
44291
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
44306
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316
44317
44318
44319
44320
44321
44322
44323
44324
44325
44326
44327
44328
44329
44330
44331
44332
44333
44334
44335
44336
44337
44338
44339
44340
44341
44342
44343
44344
44345
44346
44347
44348
44349
44350
44351
44352
44353
44354
44355
44356
44357
44358
44359
44360
44361
44362
44363
44364
44365
44366
44367
44368
44369
44370
44371
44372
44373
44374
44375
44376
44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406
44407
44408
44409
44410
44411
44412
44413
44414
44415
44416
44417
44418
44419
44420
44421
44422
44423
44424
44425
44426
44427
44428
44429
44430
44431
44432
44433
44434
44435
44436
44437
44438
44439
44440
44441
44442
44443
44444
44445
44446
44447
44448
44449
44450
44451
44452
44453
44454
44455
44456
44457
44458
44459
44460
44461
44462
44463
44464
44465
44466
44467
44468
44469
44470
44471
44472
44473
44474
44475
44476
44477
44478
44479
44480
44481
44482
44483
44484
44485
44486
44487
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530
44531
44532
44533
44534
44535
44536
44537
44538
44539
44540
44541
44542
44543
44544
44545
44546
44547
44548
44549
44550
44551
44552
44553
44554
44555
44556
44557
44558
44559
44560
44561
44562
44563
44564
44565
44566
44567
44568
44569
44570
44571
44572
44573
44574
44575
44576
44577
44578
44579
44580
44581
44582
44583
44584
44585
44586
44587
44588
44589
44590
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609
44610
44611
44612
44613
44614
44615
44616
44617
44618
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666
44667
44668
44669
44670
44671
44672
44673
44674
44675
44676
44677
44678
44679
44680
44681
44682
44683
44684
44685
44686
44687
44688
44689
44690
44691
44692
44693
44694
44695
44696
44697
44698
44699
44700
44701
44702
44703
44704
44705
44706
44707
44708
44709
44710
44711
44712
44713
44714
44715
44716
44717
44718
44719
44720
44721
44722
44723
44724
44725
44726
44727
44728
44729
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811
44812
44813
44814
44815
44816
44817
44818
44819
44820
44821
44822
44823
44824
44825
44826
44827
44828
44829
44830
44831
44832
44833
44834
44835
44836
44837
44838
44839
44840
44841
44842
44843
44844
44845
44846
44847
44848
44849
44850
44851
44852
44853
44854
2016-10-17 19:08 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.12.0-rc1 Released.

2016-10-17 11:39 +0000 [546ec4b038]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Add patch to address SSL crash

	  Addresses crashes when an attempt is made to operate on an SSL socket
	  after the socket has been closed.

	  ASTERISK-26477 #close

	  Change-Id: I421305b357558b4f9e690210dc0f4831ef4b3002

2016-10-15 04:58 +0000 [f1fd873df0]  Michael Kuron <m.kuron@gmx.de>

	* chan_sip: Only send video on outgoing channel if incoming channel supports it

	  Previously, the settings videosupport=always and videosupport=yes behaved
	  identically and unconditionally caused a video offer to be sent in the SDP on
	  an outgoing call. This was a regression introduced with commit
	  5a1d90e1fbfc4b48927aad55311f3b38efbf1f54 in Asterisk 1.6.1.

	  This commit restores correct behavior: videosupport=always causes a video offer
	  to be sent unconditionally, while videosupport=yes will only offer video on an
	  outbound channel if the incoming channel it is bridged to also supports video.
	  That way, the device receiving the outgoing call can display the correct user
	  interface elements for audio or video and will not unnecessarily show a blank
	  video window on an audio-only call.

	  ASTERISK-17470 #close

	  Change-Id: I782f4409d436114dbc97061c3570c0cd24f7c3ae

2016-10-14 00:18 +0000 [ce4cfd2eca]  Corey Farrell <git@cfware.com>

	* Fix issues with bundled pjproject cached download.

	  Previously when testing I had a preexisting makeopts in ASTTOPDIR.  The
	  ordering of configure.ac causes --with-externals-cache to be processed
	  after third-party configure.  In cases where the Asterisk clone is
	  cleaned it would cause pjproject to be downloaded to /tmp.  This
	  moves processing of the externals cache and sounds cache to happen
	  before third-party configure.

	  This also addresses a possible issue with the third-party Makefile.  If
	  TMPDIR is set by the environment it would override the path given to
	  --with-externals-cache.

	  ASTERISK-26416

	  Change-Id: Ifab7f35bfcd5a31a31a3a4353cc26a68c8c6592d

2016-10-12 16:24 +0000 [3c54328c57]  Richard Mudgett <rmudgett@digium.com>

	* Audit ast_json_pack() calls for needed UTF-8 checks.

	  Added needed UTF-8 checks before constructing json objects in various
	  files for strings obtained outside the system.  In this case string values
	  from a channel driver's peer and not from the user setting channel
	  variables.

	  * aoc.c: Fixed type mismatch in s_to_json() for time and granularity json
	  object construction.

	  ASTERISK-26466
	  Reported by: Richard Mudgett

	  Change-Id: Iac2d867fa598daba5c5dbc619b5464625a7f2096

2016-10-12 16:20 +0000 [7f8f125738]  Richard Mudgett <rmudgett@digium.com>

	* json: Check party id name, number, subaddresses for UTF-8.

	  * Updated unit test as ast_json_name_number() is now NULL tolerant.

	  ASTERISK-26466 #close
	  Reported by: Richard Mudgett

	  Change-Id: I7d4e14194f8f81f24a1dc34d1b8602c0950265a6

2016-10-11 18:14 +0000 [9621c9bcbc]  Richard Mudgett <rmudgett@digium.com>

	* json: Add UTF-8 check call.

	  Since the json library does not make the check function public we
	  recreate/copy the function in our interface module.

	  ASTERISK-26466
	  Reported by: Richard Mudgett

	  Change-Id: I36d3d750b6f5f1a110bc69ea92b435ecdeeb2a99

2016-10-12 17:42 +0000 [e4bb9f9a37]  Richard Mudgett <rmudgett@digium.com>

	* aoc.c: Whitespace cleanup

	  * In s_to_json() removed unnecessary ast_json_ref() to ast_json_null()
	  when creating the type json object.  The ref is a noop.

	  Change-Id: I2be8b836876fc2e34a27c161f8b1c53b58a3889a

2016-10-12 17:27 +0000 [bcac905bd3]  Richard Mudgett <rmudgett@digium.com>

	* app_queue.c: Fix clearing of pause reason string.

	  The pause reason is not always cleared when it should be cleared.

	  * Made set_queue_member_pause() always clear pause reason if not pausing
	  with a reason string.

	  Change-Id: I993dad19626ec017478a230e980989438b778c53

2016-10-12 16:22 +0000 [ee4ae2b648]  Richard Mudgett <rmudgett@digium.com>

	* app_minivm.c: Fix malformed ast_json_pack() call.

	  Change-Id: I082b239022fac462666e52a14a44304748908dc0

2016-10-12 16:30 +0000 [90ae4e4337]  gtjoseph <gjoseph@digium.com>

	* res_config_mysql:  Fix several issues related to recent table changes

	  Unlike any of the other database drivers, res_config_mysql checks that
	  the table definition matches the requirements for every insert and
	  update statement.  Since all requirements are forced to 'char', any
	  column that isn't a char, like ps_contacts' expiration_time,
	  qualify_timeout, etc., will throw a warning.  It's kinda harmless but
	  very misleading.  Since no other driver does those checks on insert
	  or update, they've been removed from res_config_mysql.  Also, all
	  the logic that actually attempted to ALTER the table to fix the issue
	  has been removed.  With the move to alembic, the auto-alter
	  functionality is not only unnecessary, it's also dangerous.

	  The other issue is that res_config_mysql calls the mysql_insert_id
	  function inside store_mysql.  Presumably the intention was to return
	  the number of rows inserted DESPITE A NOTE IN THE CODE THAT THE VALUE
	  IS NON_PORTABLE AND MAY CHANGE.  That value is then returned to
	  config realtime as the number of rows inserted.  Guess what?  The value
	  changed.  It now only returns the number of rows inserted if there's an
	  auto increment column on the table, which ps_contacts doesn't have.
	  Otherwise it returns 0.  So now, the insert worked but we tell config
	  realtime and sorcery that no rows were inserted.  That call to
	  mysql_insert_id was removed and we now always return 1 if the insert
	  succeeded.  We're only inserting 1 row at a time anyway.  If the insert
	  fails, we still return -1.

	  ASTERISK-26362 #close
	  Reported-by: Carlos Chavez

	  Change-Id: I83ce633efdb477b03c8399946994ee16fefceaf4

2016-09-29 13:08 +0000 [86c15db6a1]  Torrey Searle <torrey@voxbone.com>

	* res_fax: Fix a tight race condition causing fax to crash in audio fallback

	  When T.38 gets rejected and G711 failback occurs there is a period of
	  time where neither AST_FAX_TECH_T38 nor AST_FAX_TECH_AUDIO is set,
	  leading to a crash.

	  Change-Id: Icc3f457b2292d48a9d7843dac0028347420cc982

2016-09-30 16:29 +0000 [29b7a5b00f]  Rodrigo Ramírez Norambuena <a@rodrigoramirez.com>

	* Add text of cdr directory into README.md for ast-db-manage

	  Change-Id: I68321c4bea50730c39fdb486e5f23aeadd1ad636

2016-10-06 09:58 +0000 [f919edc4e2]  gtjoseph <gjoseph@digium.com>

	* app_dial:  Add the "Q" option to set the cause on unanswered channels

	  The "Q" option will set the cause on the unanswered channels when
	  another channel answers.  It overrides the default of
	  ANSWERED_ELSEWHERE.

	  NOTE:  chan_sip does not support setting the cause on a CANCEL to
	  anything other than ANSWERED_ELSEWHERE.

	  ASTERISK-26446 #close

	  Change-Id: I71742e0919aaa16784c30a2b2e73fbeed7672e47

2016-10-10 16:59 +0000 [a884b26392]  Badalyan Vyacheslav <v.badalyan@open-bs.ru>

	* vector: After remove element recheck index

	  Small fix. It is necessary to double-check
	  the index that we just removed because there
	  is a new element.

	  ASTERISK-26453 #close

	  Change-Id: Ib947fa94dc91dcd9341f357f1084782c64434eb7

2016-09-29 12:52 +0000 [349c34f72a]  Torrey Searle <torrey@voxbone.com>

	* res_rtp_asterisk: Fix infinite DTMF issue when switching to P2P bridge

	  If a bridge switched to P2P when a DTMF was in progress it
	  was possible for the DTMF to continue being sent indefinitely.

	  Change-Id: I7e2a3efe0d59d4b214ed50cd0b5d0317e2d92e29

2016-10-10 10:59 +0000 [9da3489d24]  Badalyan Vyacheslav <v.badalyan@open-bs.ru>

	* res_pjsip_config_wizard: Memory leak in module_unload

	  Fixed a memory leak. It removes only the first element.
	  Added a useful feature in vector.h to remove all items
	  under the CMP through a callback function / macro.

	  ASTERISK-26453 #close

	  Change-Id: I84508353463456d2495678f125738e20052da950

2016-10-09 21:53 +0000 [fa2885b3ff]  Badalyan Vyacheslav <v.badalyan@open-bs.ru>

	* cel_odbc: Fix memory leak on module unload

	  Change-Id: Ic7a1236eba2408090fdabb5f717b5fa455ead715

2016-10-03 11:30 +0000 [e6b0053d75]  gtjoseph <gjoseph@digium.com>

	* bundled_pjproject:  Add tests for programs used by the Makefile, et al.

	  Added tests for bzip2, tar, patch, sed and nm to configure.ac.

	  Set DOWNLOAD_TO_STDOUT to a working command line regardless of
	  whether the download program is wget, curl or fetch.

	  Added a 'configure.m4' file to the third-party directory which takes
	  care of calling any third-party project setup.  Had to move some
	  pjproject_bundled stuff up in configure.ac so it was called before
	  the third-party configure macro.

	  The pjproject tarball is now downloaded to the externals_cache_dir if
	  it was specified on the ./configure command line

	  Removed regeneration of the pjproject aconfigure file.  It was only
	  needed for an old patch that no longer applies.

	  Converted the tests for symbols to explicit tests since we know that
	  they're now available in the bundled version.  Saves a little time
	  during configure.

	  ASTERISK-26416 #close
	  Reported-by: Corey Farrell

	  Change-Id: Id1d94251c0155f8dd41b7de7067f35cfbaafbb9b

2016-10-05 14:53 +0000 [0dc0356e39]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Add MALLOC_DEBUG capability

	  pjproject_bundled will now use the asterisk memory debugging APIs
	  if MALLOC_DEBUG is turned on in menuselect.

	  Because this required stubs for the executable programs and the python
	  bindings, some Makefile reorganization was needed to properly handle
	  the dependencies.  As a result, the makefile now individually makes
	  each of the pjproject libraries separately instead of making them all
	  in 1 shot.  The only visible change is that there are separate status
	  lines printed for each library instead oif 1 for all libs.  Also, the
	  making of the pjproject dependency files was eliminated.  They're not
	  needed for building unless you're actively modifying pjproject source
	  files and it makes the build process faster.  Finally, any issues with
	  parallel builds should be resolved again making the build faster.

	  Change-Id: Icc5e3d658fbfb00e0a46b44c66dcc2522d5171b0

2016-10-07 17:32 +0000 [dd873bcada]  Corey Farrell <git@cfware.com>

	* astobj2: Add backtrace to log_bad_ao2.

	  * Compile __ast_assert_failed unconditionally.
	  * Use __ast_assert_failed to log messages from log_bad_ao2
	  * Remove calls to ast_assert(0) that happen after log_bad_ao2 was run.

	  Change-Id: I48f1af44b2718ad74a421ff75cb6397b924a9751

2016-10-04 16:59 +0000 [86550f9c17]  gtjoseph <gjoseph@digium.com>

	* alembic:  Allow cdr, config and voicemail to exist in the same schema

	  cdr, config and voicemail are all separate alembic trees.  Because
	  alembic's default is to use a table named 'alembic_version' to store
	  the current tree revision, the 3 trees can't exist in the same schema
	  without stepping on each other.

	  Now each tree uses 'alembic_version_<tree_name>' as the version table.
	  Each tree's env.py script now first checks for 'alembic_version'.  If
	  it finds it AND its revision is in the tree's history, the script
	  renames it to 'alembic_version_<tree_name>'.  Regardless, the script
	  then continues with the migration using 'alembic_version_<tree_name>'
	  and creates that table if it's not found.  The result is that if an
	  existing 'alembic_version' table was found but it didn't belong to this
	  tree, it's left alone and 'alembic_version_<tree_name>' is used or
	  created.

	  WARNING:  If multiple trees are using the same schema, they MUST NOT
	  CRU or D any objects with names that might exist in the other trees.
	  An example would be 'yesno_values' type.  If two trees perform
	  operations on it, one tree could pull it out from under the other.
	  Thankfully we currently don't share any names among cdr, config and
	  voicemail.

	  NOTE:  Since the env.py scripts in each tree were identical, a common
	  env.py has been placed in the ast-db-manage directory and a symlink
	  to it has been placed in each tree directory.

	  ASTERISK-24311 #close
	  Reported-by: Dafi Ni

	  Change-Id: I4d593f000350deb5d21a14fa1e9bc3896844d898

2016-10-05 04:25 +0000 [f166681c12]  Alexander Traud <pabstraud@compuserve.com>

	* chan_sip: Honor support of Symmetric Response (rport) for SIP requests.

	  In the SIP channel driver chan_sip, the default is "auto_force_rport". When no
	  NAT was detected, for example in case of IPv6, Asterisk uses the IP address
	  from the headers within the SIP-REGISTER for subsequent SIP signaling. When
	  the remote party specifies support for Symmetric Response (RFC 3581) via the
	  parameter "rport", Asterisk should not extract the port from the SIP headers
	  but reuse the port of the transport. This did not happen because of a typo.

	  ASTERISK-26438 #close

	  Change-Id: If6e7891848aaf96666dee5305695f7c6667cd5a6

2016-10-04 20:46 +0000 [430f6e5388]  Michael Walton <mike@farsouthnet.com>

	* audiohooks: Remove redundant codec translations when using audiohooks

	  The main frame read and write handlers in main/channel.c don't use the
	  optimum placement in the processing flow for calling audiohooks
	  callbacks, as far as codec translation is concerned. This change places
	  the audiohooks callback code:
	   * After the channel read translation if the frame is not linear before
	  the translation, thereby increasing the chance that the frame is linear
	  as required by audiohooks
	   * Before the channel write translation if the frame is linear at this
	  point
	  This prevents the audiohooks code from instantiating additional
	  translation paths to/from linear where a linear frame format is already
	  available, saving valuable CPU cycles

	  ASTERISK-26419

	  Change-Id: I6edd5771f0740e758e7eb42558b953f046c01f8f

2016-09-29 14:02 +0000 [2449d2877c]  Kevin Harwell <kharwell@digium.com>

	* Remove "format_ogg_opus: New format"

	  This reverts commit 40aa28131bc30b4516da2b20eb1a1e043920169c.

	  ASTERISK-26426 #close

	  Change-Id: I81e55c3c512f1dd6f49896f0c6b97a07d74fd8f5

2016-09-27 16:10 +0000 [f0a2e628d6]  gtjoseph <gjoseph@digium.com>

	* download_externals: Fix issue with re-install

	  Needed to ignore an xmlstarlet return code for optional element.

	  Change-Id: I6a96f709b4b38c9a3f3dda4e8b07903787e16873
	  Reported-by: Dan Jenkins

2016-09-22 09:49 +0000 [5258c067ae]  gtjoseph <gjoseph@digium.com>

	* codec_opus: Add download ability to menuselect

	  Updated codecs/codecs.xml to add codec_opus to the external
	  download list.

	  ASTERISK-26409

	  Change-Id: Ia07b36539f30e852125fb2b94147dc9774df31a4

2016-07-23 14:50 +0000 [a5af8709c8]  gtjoseph <gjoseph@digium.com>

	* codec_opus: Replace res_format_attr_opus with the one from codec_opus

	  Preparation

	  ASTERISK-26409

	  Change-Id: I9f20e7cce00c32464d9a180e81283d49d199d0a3
	  (cherry picked from commit 59f7662a93bf9c07204fb50e1020a0f5bfbbd5c9)

2016-07-23 15:56 +0000 [44c0c51cf1]  gtjoseph <gjoseph@digium.com>

	* format_ogg_opus: New format

	  Add Ogg/Opus playback support.

	  This uses libopusfile in order to be able to read .opus files and play
	  them back.

	  Writing/recording support is not present at this time.

	  ASTERISK-26409

	  Change-Id: I8815d23345108d8ca7c0bd640f6a1ce6b4f56955

2016-09-24 19:05 +0000 [0ab443007b]  gtjoseph <gjoseph@digium.com>

	* build_tools:  Add ability to download variants to download_externals

	  Some external packages have multiple variants that apply to different
	  builds of asterisk.  The DPMA for instance has a "bundled" variant that
	  needs to be downloaded if asterisk was configured with
	  --with-pjproject-bundled.

	  There are 2 ways to specify variants:

	  If you need the user to make the decision about which variant to
	  download, simply create multiple menuselect "member" entries like so...

	  <member name="res_digium_phone" displayname="..snipped..">
	    <support_level>external</support_level>
	    <depend>xmlstarlet</depend>
	    <depend>bash</depend>
	    <defaultenabled>no</defaultenabled>
	  </member>

	  <member name="res_digium_phone-bundled" displayname="..snipped..">
	    <support_level>external</support_level>
	    <depend>xmlstarlet</depend>
	    <depend>bash</depend>
	    <defaultenabled>no</defaultenabled>
	  </member>

	  Note that the second entry has "-<variant>" appended to the name.
	  You can then use the existing menuselect facilities to restrict which
	  members to enable or disable.  Youy probably don't want the user to
	  enable multiple at the same time.

	  If you want to hide the details of the variants, the better way to
	  do it is to create 1 member with "variant" elements.

	  <member name="res_digium_phone" displayname="..snipped..">
	    <support_level>external</support_level>
	    <depend>xmlstarlet</depend>
	    <depend>bash</depend>
	    <defaultenabled>no</defaultenabled>
	    <member_data>
	      <downloader>
	        <variants>
	          <variant tag="bundled"
	            condition='[[ "$PJPROJECT_BUNDLED" = "yes" ]]'/>
	        </variants>
	      </downloader>
	    </member_data>
	  </member>

	  The condition must be a bash expression suitable for use with an "if"
	  statement.  Any environment variable can be used plus those available
	  in makeopts.

	  In this case, if asterisk was configured with --with-pjproject-bundled
	  the bundled variant will be automatically downloaded.  Otherwise the
	  normal version will be downloaded.

	  Change-Id: I4de23e06d4492b0a65e105c8369966547d0faa3e

2016-09-22 01:40 +0000 [a0a17a8c6f]  Aaron An <anjb@ti-net.com.cn>

	* channels/chan_pjsip: fix HANGUPCAUSE function bug.

	  HANGUPCAUSE not return 'SIP 200 Ok' when dialed channel answered.
	  This patch change the call order of ast_queue_control_data
	  and ast_queue_control in chan_pjsip_incoming_response.

	  ASTERISK-26396 #close
	  Reported by: AaronAn
	  Tested by: AaronAn

	  Change-Id: Ide2d31723d8d425961e985de7de625694580be61

2016-09-23 09:54 +0000 [0502675e5c]  Alessandro Crespi

	* chan_sip: Resolve externhost not to IPv6; instead go for IPv4.

	  For the channel driver chan_sip, you specify externhost=example.com in sip.conf
	  when your Asterisk is behind a NAT and your IP address is assigned dynamically.
	  Or stated differently: You do not have a static IP address to use "externaddr"
	  directly. This NAT support is quite handy but just about IPv4. Previously,
	  Asterisk resolved "externhost" to any IP version. When the first DNS answer
	  resolved to an IPv6, Asterisk sent an IPv6 in SIP/SDP for origin (o=) and
	  connection (c=). This happened in outgoing SIP-REGISTER and while answering
	  SIP-INVITE. If the remote peer is IPv4-only, it might not handle o=/c= with an
	  IPv6. This change makes sure, no IPv6 is resolved anymore for "externhost".

	  ASTERISK-18232 #close
	  Reported by: Jacek Kowalski
	  Tested by: Alexander Traud
	  patches:
	   changes.patch submitted by Alessandro Crespi

	  Change-Id: If68eedbeff65bd1c1d8a9ed921c02ba464b32dac

2016-09-20 09:42 +0000 [0056bcaebd]  gtjoseph <gjoseph@digium.com>

	* chan_sip:  Address runaway when realtime peers subscribe to mailboxes

	  Users upgrading from asterisk 13.5 to a later version and who use
	  realtime with peers that have mailboxes were experiencing runaway
	  situations that manifested as a continuous stream of taskprocessor
	  congestion errors, memory leaks and an unresponsive chan_sip.

	  A related issue was that setting rtcachefriends=no NEVER worked in
	  asterisk 13 (since the move to stasis).  In 13.5 and earlier, when a
	  peer tried to register, all of the stasis threads would block and
	  chan_sip would again become unresponsive.  After 13.5, the runaway
	  would happen.

	  There were a number of causes...
	  * mwi_event_cb was (indirectly) calling build_peer even though calls to
	    mwi_event_cb are often caused by build_peer.
	  * In an effort to prevent chan_sip from being unloaded while messages
	    were still in flight, destroy_mailboxes was calling
	    stasis_unsubscribe_and_join but in some cases waited forever for the
	    final message.
	  * add_peer_mailboxes wasn't properly marking the existing mailboxes
	    on a peer as "keep" so build_peer would always delete them all.
	  * add_peer_mwi_subs was unsubscribing existing mailbox subscriptions
	    then just creating them again.

	  All of this was causing a flood of subscribes and unsubscribes on
	  multiple threads all for the same peer and mailbox.

	  Fixes...
	  * add_peer_mailboxes now marks mailboxes correctly and build_peer only
	    deletes the ones that really are no longer needed by the peer.
	  * add_peer_mwi_subs now only adds subscriptions marked as "new" instead
	    of unsubscribing and resubscribing everything.  It also adds the peer
	    object's address to the mailbox instead of its name to the subscription
	    userdata so mwi_event_cb doesn't have to call build_peer.

	  With these changes, with rtcachefriends=yes (the most common setting),
	  there are no leaks, locks, loops or crashes at shutdown.

	  rtcachefriends=no still causes leaks but at least it doesn't lock, loop
	  or crash.  Since making rtcachefriends=no work wasnt in scope for this
	  issue, further work will have to be deferred to a separate patch.

	  Side fixes...
	   * The ast_lock_track structure had a member named "thread" which gdb
	     doesn't like since it conflicts with it's "thread" command.  That
	     member was renamed to "thread_id".

	  ASTERISK-25468 #close

	  Change-Id: I07519ef7f092629e1e844f855abd279d6475cdd0

2016-09-21 15:03 +0000 [323aff3a09]  Joshua Colp <jcolp@digium.com>

	* core: Ensure presencestate subtype and message are NULL.

	  When retrieving presence state information there is no
	  guarantee that the subtype and message passed in are
	  set to NULL. This change ensures they are.

	  ASTERISK-26397 #close

	  Change-Id: I61f8187972d5d8bbd7d6b7f4daa4f4f7e8237b23

2016-09-21 10:48 +0000 [10c180760c]  Joshua Colp <jcolp@digium.com>

	* res_odbc: Make pooling option deprecation notice more useful.

	  This changes the notice for the deprecation of the old
	  pooling options to point to the new option for doing
	  pooling. This gives a clearer direction as to what to
	  look into.

	  ASTERISK-26389 #close

	  Change-Id: I2ca9cdfdcd75aec170a7db9d5ff69a4cd25b7c10

2016-09-12 07:37 +0000 [42cc267016]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* cdr_mysql: fix UTC support

	  * Make 'cdrzone=UTC' work properly.
	  * Fix the documentation of cdr_mysql.conf: it's cdrzone and not timezone

	  ASTERISK-26359 #close

	  Change-Id: I2a6f67b71bbbe77cac31a34d0bbfb1d67c933778

2016-09-21 08:46 +0000 [f16ab19292]  Joshua Colp <jcolp@digium.com>

	* odbc: Remove options that are no longer applicable.

	  The pooling, shared_connection, limit, and idlecheck options
	  are no longer used in res_odbc.

	  ASTERISK-26389

	  Change-Id: I2fde7b467d01f9d1c82cc0a339bb4f7e1dd6bbe6

2016-09-20 15:17 +0000 [c9ce299b64]  Corey Farrell <git@cfware.com>

	* core: Fix LOW_MEMORY missing symbol ast_pbx_uuid_get.

	  Move the function outside the conditional block that excludes
	  LOW_MEMORY.

	  ASTERISK-26273 #close

	  Change-Id: Ic290fa128222c410c3531107e30efacabc8493b4

2016-09-20 10:05 +0000 [610eb4c189]  Corey Farrell <git@cfware.com>

	* logger: Fix default console settings.

	  When logger.conf is missing or invalid we should be printing notices,
	  warnings and errors to the console.  The logmask was incorrectly
	  calculated.

	  Change-Id: Ibaa9465a8682854bc1a5e9ba07079bea1bfb6bb3

2016-06-27 14:26 +0000 [36092ee3a0]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* sd_notify (systemd status notifications) support

	  sd_notify() is used to notify systemd of changes to the status of the
	  process. This allows the systemd daemon to know when the process
	  finished loading (and thus only start another program after Asterisk has
	  finished loading).

	  To use this, use a systemd unit with 'Type=notify' for Asterisk.

	  This commit also adds the function ast_sd_notify(), a wrapper around
	  sd_notify that does nothing if not built with systemd support.

	  Also adds support for libsystemd detection in the configure script.

	  Change-Id: Ied6a59dafd5ef331c5c7ae8f3ccd2dfc94be7811
	  (cherry picked from commit 07b95f7c65b7c083724f1af2b26f93cc22cad58c)

2016-09-19 14:21 +0000 [9372d32100]  Walter Doekes <walter+github@wjd.nu>

	* asterisk.c: Non-root users also get the astcanary after core restart.

	  Without this change, a 'core restart' would kill the astcanary forever
	  if you're not running as root. Both with and without this patch, the
	  scheduling priority was still SCHED_RR after restart.

	  Additionally, the astcanary is now spawned if you start with high
	  priority and Asterisk doesn't get a chance to lower it. For example
	  through: `chrt -r 10 sudo -u asterisk asterisk -c`

	  Also reap killed astcanary processes on core restart.

	  ASTERISK-26352 #close

	  Change-Id: Iacb49f26491a0717084ad46ed96b0bea5f627a55

2016-09-19 09:40 +0000 [e96448e991]  Walter Doekes <walter+github@wjd.nu>

	* asterisk.c: When astcanary dies on linux, reset priority on all threads.

	  Previously only the canary checking thread itself had its priority set
	  to SCHED_OTHER. Now all threads are traversed and adjusted.

	  ASTERISK-19867 #close
	  Reported by: Xavier Hienne

	  Change-Id: Ie0dd02a3ec42f66a78303e9c1aac28f7ed9aae39

2016-09-09 06:35 +0000 [01884a7af6]  Timo Teräs <timo.teras@iki.fi>

	* Fix showing of swap details when sysinfo() is available

	  If sysinfo() is available, but not sysctl() or swapctl() the
	  printing code for swap buffer sizes is incorrectly omitted.
	  The above condition happens with musl c-library.

	  Fix #if rule to consider defined(HAVE_SYSINFO). And also
	  remove the redundant || defined(HAVE_SYSCTL) which was
	  incorrectly there to start with. Now swap information is
	  displayed only if an actual libc function to get it is
	  available.

	  This also fixes warnings previously seen with musl libc:

	     [CC] asterisk.c -> asterisk.o
	  asterisk.c: In function 'handle_show_sysinfo':
	  asterisk.c:773:6: warning: variable 'totalswap' set but not used
	   [-Wunused-but-set-variable]
	    int totalswap = 0;
	        ^~~~~~~~~
	  asterisk.c:770:11: warning: variable 'freeswap' set but not used
	   [-Wunused-but-set-variable]
	    uint64_t freeswap = 0;
	             ^~~~~~~~

	  Change-Id: I1fb21dad8f27e416c60f138c6f2bff03fb626eca

2016-09-12 18:00 +0000 [cdbad152c7]  Richard Mudgett <rmudgett@digium.com>

	* res_config_odbc.c: Fix buffer size limitation creating invalid SQL.

	  Creating ODBC SQL queries resulted in queries too large to fit into the
	  supplied buffer.  The resulting truncated buffer contained an invalid SQL
	  query.

	  * Made SQL query generation code use a thread storage buffer that can
	  increase in size as needed.

	  * Fixed bad multi-line warning messages.

	  ASTERISK-26263 #close
	  Reported by: Jeppe Ryskov Larsen

	  Change-Id: I23f3cdd43c2dac80bed3ded4dd77d18cb17f21ae

2016-09-14 08:42 +0000 [449719be00]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_multihomed: Change Contact port to listening port.

	  The res_pjsip_multihomed module determines what interface and transport
	  a request is going out on and updates the SIP message accordingly with
	  the address information. This currently incorrectly updates the Contact
	  header for connectionful protocols to the ephemeral connection port,
	  instead of the bound address for the listening socket which can actually
	  accept the connection back. If the remote side attempts to connect back on
	  the epehemeral port it will fail.

	  This change makes it so the port is updated to the bound port on
	  connectionful protocols and is maintained on UDP (as there can be
	  multiple of those).

	  ASTERISK-26374 #close

	  Change-Id: I50f8dab65b9f75117d73ba5f6bbcf6c9871854ab

2016-09-07 14:48 +0000 [4d64b176eb]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Prevent SERVFAIL from marking name server bad

	  A name server that returns "Server Failure" is indicating only that
	  the server couldn't process that particular request.  We should NOT
	  assume that the name server is incapable of serving other requests.

	  Here's the scenario we've been encountering...

	  * 2 local name servers configured in resolv.conf.
	  * An OPTIONS request causes a request for A and AAAA records to go out
	    to both nameservers.
	  * The A responses both come back successfully resolved.
	  * Because of an issue at some upstream nameserver, the AAAA responses
	    for that particular query come back as "SERVFAIL" from both local
	    name servers.
	  * Both local servers are marked as bad and no further queries can be
	    sent until the 60 second ttl expires.  Only previously cached results
	    can be used.
	  * In this case, 60 seconds is just enough time for another OPTIONS
	    request to go out to the same host so the cycle repeats.

	  We could set the bad ttl really low but that also affects REFUSED and
	  NOTAUTH which probably DO signal a real server issue.  Besides, even
	  a really low bad ttl would be an issue on a pbx.

	  Although we use our own resolver in 14 and master and don't have this
	  issue there, Teluu has merged this patch upstream so it's appropriate
	  to cherry-pick to 14 and master to keep pjproject consistent.


	  Change-Id: Ie03ba902288e274aff23f9b9bb2786e1e8be09e0

2016-09-14 07:59 +0000 [1cac856e17]  Joshua Colp <jcolp@digium.com>

	* rtp: Preserve timestamps on video frames.

	  Currently when receiving video over RTP we store only
	  a calculated samples on the frame. When starting the video
	  it can take some time for this calculation to actually yield
	  a value as it requires constant changing timestamps. As well
	  if a video frame passes over multiple RTP packets this calculation
	  will fail as the timestamp is the same as the previous RTP
	  packet and the number of samples calculated will be 0.

	  This change preserves the timestamp on the frame and allows
	  it to pass through the core. When sending the video this timestamp
	  is used instead of a new one being calculated.

	  ASTERISK-26367 #close

	  Change-Id: Iba8179fb5c14c9443aee4baf670d2185da3ecfbd

2016-09-14 09:51 +0000 [9df4056d70]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_transport_management: Convert time in log message to seconds.

	  ASTERISK-26375 #close

	  Change-Id: I46496af5cae41413e76d44d2068a7431279f09dc

2016-09-13 05:34 +0000 [98e42cc662]  Steve Davies <steve@one47.co.uk>

	* chan_sip: Fix session timeout on retransmit of non-UDP packets

	  Change-Id I1cd33453c77c56c8e1394cd60a6f17bb61c1d957 Enable Session-Timers for
	  SIP over TCP (and TLS) also disables SIP retransmits in chan_sip for non-UDP
	  connections, allowing the TCP layer to handle the retransmits. Unfortunately,
	  this caused sessions to be terminated with a retransmit timeout becasue it
	  stopped at the point of the first retrans call.

	  This patch waits for the 64*T1 timer to expire instead.

	  ASTERISK-19968

	  Change-Id: I844f26801aada10bc94e9bebe6e151f0a8443204

2016-09-12 12:25 +0000 [0388882cdb]  Richard Mudgett <rmudgett@digium.com>

	* app_queue: Fix CLI "queue show" and AMI Queues action output truncation.

	  The output of CLI "queue show" and AMI Queues action is truncated and
	  "failed to extend from 240 to 327" messages are generated if the queue
	  member and interface names are lengthy.

	  * Increase the string buffer size from 240 to 512 in order to accommodate
	  for more information fields added to the output since v1.8.

	  ASTERISK-26360 #close
	  Reported by: Richard Mudgett

	  Change-Id: Id99c03cf5362453b80491a4b3b0434cb67aa966d

2016-09-12 03:28 +0000 [da8ba990d1]  Walter Doekes <walter+github@wjd.nu>

	* chan_sip: Allow target refresh (Contact update) on re-INVITE.

	  Previously, the Contact was stored only on initial INVITE and on any
	  18X and 200. That meant that after re-INVITEs from *us* the Contact
	  could get updated, but after re-INVITEs from the *peer*, it did not.

	  This changeset fixes this inconsistency, properly allowing target
	  refreshes through re-INVITES (RFC3261, 12.2).

	  If your strictrtp setting allows it, this change allows you to switch
	  the source IP of a connected/calling device mid-call with a simple
	  re-INVITE from the new IP.

	  ASTERISK-26358 #close

	  Change-Id: Ibb8512054ab27c8c3d2514022568fde943bf2435

2016-08-31 15:22 +0000 [e9ddab4685]  Richard Mudgett <rmudgett@digium.com>

	* sip_to_pjsip.py: Map legacy_useroption_parsing.

	  Map the sip.conf general section legacy_useroption_parsing to the
	  new pjsip.conf global ignore_uri_user_options.

	  ASTERISK-26316
	  Reported by: Kevin Harwell

	  Change-Id: I78108a31995db19d41f4e1a07b3324692c5363fc

2016-08-29 18:08 +0000 [30af92e78d]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Add ignore_uri_user_options option.

	  This implements the chan_sip legacy_useroption_parsing option but with a
	  better name.

	  * Made the caller-id number and redirecting number strings obtained from
	  incoming SIP URI user fields always truncated at the first semicolon.
	  People don't care about anything after the semicolon showing up on their
	  displays even though the RFC allows the semicolon.

	  ASTERISK-26316 #close
	  Reported by: Kevin Harwell

	  Change-Id: Ib42b0e940dd34d84c7b14bc2e90d1ba392624f62

2016-09-09 06:26 +0000 [7ed5dc2c58]  Walter Doekes <walter+github@wjd.nu>

	* contrib: Let safe_asterisk script continue without /dev/tty9.

	  If you use the safe_asterisk script, it uses hardcoded defaults before
	  running configurable values from /etc/asterisk/startup.d. The hardcoded
	  default has TTY=9. Some containerized environments don't have such a
	  TTY, and safe_asterisk would stop.

	  The custom configuration from /etc/asterisk/startup.d/* isn't read until
	  after it stopped, so changing TTY in a custom config did not help.

	  This changeset changes safe_asterisk to continue if the TTY setting was
	  untouched and /dev/tty9 and /dev/vc/9 aren't found.

	  Change-Id: I2c7cdba549b77f418a0af4cb1227e8e6fe4148fc

2016-09-09 05:39 +0000 [7580a736bb]  Joshua Colp <jcolp@digium.com>

	* res_pjsip: Only invoke unidentified endpoint logic when unidentified.

	  The code was incorrectly invoking the unidentified logic when
	  an endpoint had actually been identified, causing log messages
	  to be output.

	  ASTERISK-26349 #close

	  Change-Id: Id8104fc9e3d138d5e8b6f6977ecc08765fd17d4f

2016-08-23 06:35 +0000 [efcfc4c1ee]  Corey Farrell <git@cfware.com> (license 5909)

	* chan_sip: Don't allocate new RTP instances on top of old ones.

	  In some scenarios dialog_initialize_rtp can be called multiple times on
	  the same dialog.  This can cause RTP instances to be leaked along with
	  multiple file descriptors for each instance.

	  This change makes it so the existing RTP instances are destroyed and
	  not overwritten, stopping the memory leak.

	  ASTERISK-26272 #close
	  patches:
	    ASTERISK-26272-13.patch submitted by Corey Farrell (license 5909)

	  Change-Id: Id529de1184c68f2f4d254ab41a1f458dafdb5f73

2016-08-16 15:34 +0000 [f1ffc22933]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Do not crash on ACKs from unknown endpoints.

	  The endpoint identification PJSIP module is intended to identify which
	  endpoint an incoming request is from. If an endpoint is not identified,
	  then an artificial endpoint is used in its place when proceeding.

	  The problem is that the ACK request type is an exception to the rule.
	  The artificial endpoint is not used when processing an ACK. This results
	  in the possibility of having a NULL endpoint being used further on.

	  The reason ACK is an exception is an attempt not to spam security logs
	  with unidentified requests. Presumably, you've already logged the
	  unidentified request on the preceeding INVITE.

	  Up until Asterisk 13.10, retrieving a NULL endpoint in this fashion
	  didn't cause an issue. A new change in 13.10 added endpoint ACL checking
	  shortly after endpoint identification. Because we are accessing a NULL
	  endpoint, this ACL check resulted in a crash.

	  The fix here is to be sure to retrieve the artificial endpoint for all
	  request types. ACKs still do not generate unidentified request security
	  events.

	  ASTERISK-26264 #close
	  Reported by nappsoft

	  AST-2016-006

	  Change-Id: Ie0c795ae2d72273decb972dd74b6a1489fb6b703

2016-09-06 11:46 +0000 [23d6ec7417]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_messaging.c: Misc cleanups and fixes.

	  * Eliminated RAII_VAR in get_outbound_endpoint().

	  * Simplify update_to() coding.  However, this function can only be a NoOp
	  because the To string can only be a URI and not a name-address formatted
	  string.

	  * Simplify update_from() coding.  Also fixed a code path modifying the
	  from string when the caller could still want to use the original string.

	  * Fixed msg_data_create() incompletely removing the "pjsip:" to then add
	  back the "sip:" string if needed.  The code didn't handle the "pjsip:sip:"
	  case because it left the colon after pjsip in the string.

	  Change-Id: I68a09a665f6d4daa9eaa59069045ab69122e28db

2016-09-07 16:00 +0000 [5f19657710]  Joshua Colp <jcolp@digium.com>

	* res_pjsip: Allow global headers to be overridden.

	  Currently when you add global headers from the dialplan both
	  the header in the dialplan and the globally configured header
	  are added to the resulting SIP INVITE. This change makes it
	  so the headers in the dialplan take precedence and are the
	  only ones added.

	  Change-Id: I36f864298f38db3632ad503edc11267cb8ffb3ad

2016-08-11 12:10 +0000 [206d4f57dc]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* followme: initialize all config items on reload

	  Some configuration directives were not initialized on reload, and hence
	  were not reset to default if they were removed from followme.conf.

	  ASTERISK-26288 #close

	  Change-Id: Ief829e16374ad1e0ecfd63e6ee4923b5a1d1c150

2016-08-01 20:55 +0000 [117a7741c8]  gtjoseph <gjoseph@digium.com>

	* build: Add download capability for external packages

	  The DPMA and g729a, silk, siren7 and siren14 codecs hosted at
	  http://downloads.digium.com/pub/telephony/ are now listed in the
	  "External" sections of the "Resource Modules" and "Codec Translators"
	  pages in menuselect.  Any that are selected will automatically be
	  downloaded and installed when "make install" is run.  Their LICENSE and
	  README (if avaialble) files will be installed to
	  ASTVARLIBDIR/documentation/thirdparty/<product_name>.

	  Example use with codecs:

	  The codecs/codecs.xml file is a menuselect style xml file that lists
	  the codecs to be included.  Their support levels are 'external', which
	  triggers the download and install, and defaultenabled is no.  Also
	  because codec_g729a is actually in a directory named codec_g729 on the
	  download server, the newly added 'member_data' element is used to
	  override the default of the directory name being the package name.  You
	  can use the 'directory_name' attribute to keep default base URL
	  (http://downloads.digium.com/pub/telephony/) but use the new directory,
	  or you use the 'remote_url' attribute to specify a full URL to the
	  download directory.  In this case, you must still follow the same
	  subdirectory naming conventions as that used for the packages located
	  at 'http://downloads.digium.com/pub/telephony'.

	  A new configure option '--with-externals-cache' was added and like
	  '--with-sounds-cache' it allows the installer to cache tarballs so
	  they're not downloaded every time.

	  To assist with the download and install process, each external package
	  now has a manifest.xml file that, among other things, contains a package
	  version and checksums for each file in the tarball.  The manifest is
	  saved to both the cache directory and ASTMODDIR and together with the
	  manifest.xml on the downloads site, tells the install scripts whether
	  a download and/or update is needed.

	  bash and xmlstarlet are required for downloader operation.  If they're
	  not installed, the external items in menuselect will be unavailable.

	  Change-Id: Id3dcf1289ffd3cb0bbd7dfab3cafbb87be60323a

2016-09-06 02:41 +0000 [d04ae7d1d8]  Walter Doekes <walter+github@wjd.nu>

	* chan_sip: Don't refuse calls with "optional crypto"; fall back to RTP.

	  Certain SNOM phones send so-called "optional crypto" in their SDP body.
	  Regular SRTP setup looks like this:

	      m=audio 64620 RTP/SAVP 8 0 9 99 3 18 4 101
	      a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:...

	  SNOM-style "optional crypto" looks like this:

	      m=audio 61438 RTP/AVP 8 0 9 99 3 18 4 101
	      a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:...

	  A crypto line is supplied, but the m-line does not have SAVP.

	  When res_srtp.so is *not* loaded, then chan_sip.so treats the optional
	  crypto as regular RTP, but when res_srtp.so *is* loaded, it refuses the
	  incoming call with the following message:

	      WARNING: process_sdp: Failed to receive SDP offer/answer with
	      required SRTP crypto attributes for audio

	  For platforms that want to start providing SRTP this presents a
	  compatibility problem.

	  This changeset lets chan_sip handle the SDP as if no crypto-line was
	  supplied: i.e. accept the call as regular RTP, just like it did before
	  res_srtp was loaded.

	  Now you'll get this informative warning instead:

	      WARNING: Ignoring crypto attribute in SDP because RTP transport is
	      insecure

	  ASTERISK-23989 #close
	  Reported by: Olle Johansson

	  Change-Id: I91a15ae05a0296e398d6b65f53bb11afde1d80e2

2016-09-03 16:04 +0000 [df3d0188e4]  Matt Jordan <mjordan@digium.com>

	* apps/app_dial: Fix crash on non-connect call paths for Privacy/Screening option

	  In any scenario in which the callee is not connected to the caller, the
	  current code in app_dial will crash due to raising a Dial End Stasis
	  Message after the callee channel has been hung up. This patch corrects
	  the error by simply moving the explicit hangup of the callee (peer)
	  channel until after the dial end message.

	  ASTERISK-25691 #close

	  Change-Id: I816a414014424d0d8c80e2a3cbef13ef8c63798d

2016-09-03 16:02 +0000 [a64063cc97]  Matt Jordan <mjordan@digium.com>

	* apps/app_dial: Set the DIALSTATUS to NOANSWER on privacy option 5

	  If the callee selects option '5' using the Dial application's privacy
	  (P) option, the DIALSTATUS is erroneously set to ANSWER. This option
	  reflects the callee sending the caller to VoiceMail one time; the call
	  is definitely *not* ANSWERed in such a scenario. With this patch, the
	  DIALSTATUS is instead set to NOANSWER, which is the same DIALSTATUS that
	  is set when the 'send to VoiceMail every time' option is set.

	  ASTERISK-25691

	  Change-Id: Iaf0c9f0fa00545e7366443875e2bb7d9a89a1358

2016-08-30 16:40 +0000 [03fc438f6e]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_registrar.c: Reduce stack usage in find_aor_name().

	  Change-Id: I8aebad1fdcf303bd115b59a4b57fbbd5b2267f09

2016-08-29 18:06 +0000 [b5e753227d]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_configuration.c: Ignore repeated identify by methods.

	  Change-Id: Ied0c06043d1dfef8fdc9c9a808cf89b118119838

2016-08-30 17:26 +0000 [9b7501b6ad]  Richard Mudgett <rmudgett@digium.com>

	* config_global.c: Comments and a default expression adjustment.

	  Change-Id: Ia6a58f8c73a30da6874b3f94364dce162d6f1ad3

2016-08-31 15:14 +0000 [3314e1cec2]  Richard Mudgett <rmudgett@digium.com>

	* sip_to_pjsip.py: Map canreinvite as directmedia alias.

	  Change-Id: I48b8e150f96a3d2a24d8fc25fbe4f5aff9f4a6b2

2016-08-31 15:37 +0000 [6372f40ba0]  Richard Mudgett <rmudgett@digium.com>

	* sip_to_pjsip.py: Fix typo converting outboundproxy registration.

	  Change-Id: I6f30e5f9fcf8469ba0079fbf884047d54c2c0b15

2016-08-31 15:13 +0000 [11eb1afd2d]  Richard Mudgett <rmudgett@digium.com>

	* sip_to_pjsip.py: Fix comment typo and tabs.

	  Change-Id: If35174614545727817d329c60ba4456c028941b5

2016-08-31 15:56 +0000 [0f9b144c1a]  Richard Mudgett <rmudgett@digium.com>

	* Sample configs: Eliminate false multiline comment block starts.

	  Change-Id: Ie627def9604ae30abd80754f9e6f09874825aec6

2016-09-02 11:36 +0000 [8d1c535bd6]  Richard Mudgett <rmudgett@digium.com>

	* format_cap.c: Fix CLI "core show channeltype Surrogate" crash.

	  * Make ast_format_cap_get_names() NULL tolerant.

	  ASTERISK-26331 #close
	  Reported by: CGI.NET

	  Change-Id: Id67e93936dc8ec2a33a9d33655843d43b59285a3

2016-08-18 14:45 +0000 [9bca895469]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip_session: segfault on already disconnected session

	  On heavy loaded system the TCP/TLS incoming calls could be
	  disconnected by pjproject while these calls are being
	  processed by asterisk which could use the session's memory pools.
	  If the session in the disconnected state then the session memory
	  pools were already freed, so we get segfault.

	  This patch adds a lifetime control on an INVITE session to pjproject.
	  The lifetime of the session is manipulated by calling
	  pjsip_inv_add_ref/pjsip_inv_dec_ref.
	  This patch uses these functions to inform pjproject that the
	  session is in use.

	  This patch adds check if the session state is not disconnected
	  and also checks if the memory pool is not NULL.

	  This patch also places tasks 'session_end' and 'session_end_completion'
	  into session's serializer to avoid race condition.

	  ASTERISK-26291 #close

	  Change-Id: I4d28b1fb3b91f0492a911d110049d670fdc3c8d7

2016-08-10 15:14 +0000 [63feffa126]  Mark Michelson <mmichelson@digium.com>

	* ConfBridge: Make some announcements asynchronous.

	  Confbridge announcements tend to block a channel while they are being
	  played. In some circumstances, this is warranted since you want that
	  particular channel not to hear the announcement (Example: "John Doe has
	  entered the conference"). For others it makes less sense.

	  This change first introduces methods for playing sounds asynchronously
	  into the conference. This is very similar to how synchronous sounds are
	  played, except the channel initiating the playback does not wait for the
	  sound to complete before moving on.

	  Asynchronous announcements are used for two circumstances:
	  * Sounds played for a user after they have left the bridge
	  * Sounds that play first to a single user and then the rest of the
	    conference (if the channel and conference use the same language)

	  ASTERISK-26289 #close
	  Reported by Mark Michelson

	  Change-Id: Ie486bb3de1646d50894489030326a423e594ab0a

2016-08-31 12:23 +0000 [a002a4d2db]  Michael Kuron <m.kuron@gmx.de>

	* app_mp3: Use correct buffer size and the same sample rate as the channel

	  Previously, the buffer used for MP3 streamed from HTTP servers had a size of
	  1 MB. For 8 kHz mono audio at 16 bit resolution, such a buffer covers about 1
	  minute. Only when the buffer is full does audio start to play.
	  For MP3 files streamed from a server, that is usually not a big deal as long as
	  the connection to the server is fast enough to supply that much data within a
	  second or two. For MP3 live streams however, it takes 1 minute to download 1
	  minute of audio, so without this change, app_mp3 wasn't really usable for MP3
	  live streams.
	  This commit changes the buffer size so that it covers 6 seconds of an MP3 file
	  streamed from a server and 0.5 seconds of an MP3 live stream. The latter is
	  identified by the use of a .m3u file extension.

	  app_mp3 so far only supported 8 kHz audio.
	  Now it always runs at the sample rate of the channel.

	  ASTERISK-26085 #close

	  Change-Id: Id1ee274733cd804a0edecf7450329b72f1235af0

2016-08-26 10:39 +0000 [308a65fe6c]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: qualify/unqualify added/deleted realtime endpoints

	  If the PJSIP endpoint's AOR with the permanent contact
	  was deleted from the realtime storage the res_pjsip module
	  continues trying to qualify this contact.
	  The error 'Unable to find an endpoint to qualify contact'
	  appeares every 'qualify_frequency' seconds.
	  This patch deletes this contact in this case.

	  The PJSIP endpoint's AOR with the permanent contact
	  is never qualified if it is added to realtime storage
	  after asterisk started.
	  This patch adds qualifying for the AOR's permanent contacts
	  on the first handling of this AOR.

	  ASTERISK-26319 #close

	  Change-Id: Ib93dded9121edb113076903d1aa95402f799f8fe

2016-08-17 02:51 +0000 [2fa168348e]  chris de rock <chris@derock.de>

	* app_macro: Consider '~~s~~' as a macro start extension.

	  As described in issue ASTERISK-26282 the AEL parser creates macros with
	  extension '~~s~~'.  app_macro searches only for extension 's' so the
	  created extension cannot be found.  with this patch app_macro searches for
	  both extensions and performs the right extension.

	  ASTERISK-26282 #close

	  Change-Id: I939aa2a694148cc1054dd75ec0c47c47f47c90fb

2016-08-29 07:10 +0000 [27951792c4]  Etienne Lessard <elessard@proformatique.com>

	* pbx.c: Prevent infinite recursion in manager_show_dialplan_helper.

	  Previously, if context A was including context B and context B was including
	  context A, i.e. if there was a circular dependency between contexts, then
	  calling manager_show_dialplan_helper could lead to an infinite recursion,
	  resulting in a crash.

	  This commit applies the same solution as the one implemented in the
	  show_dialplan_helper function. The manager_show_dialplan_helper and
	  show_dialplan_helper functions contain lots of code in common, but the former
	  was missing the "infinite recursion avoidance" code.

	  ASTERISK-26226 #close

	  Change-Id: I1aea85133c21787226f4f8442253a93000aa0897

2016-08-26 14:34 +0000 [fb82fdb013]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Disable srtp use by pjmedia

	  The reason for the disable is that while Asterisk works fine with older
	  libsrtp versions, newer versions of pjproject won't compile with them.
	  Debian 6 for instance, has libsrtp 1.4.4 which is older than what
	  pjproject is expecting.

	  We don't use most of pjmedia but we DO use it for SDP negotiation.
	  Luckily disabling srtp in pjmedia doesn't interfere with it's ability
	  to negitiate a secure channel.  The proper crypto attributes are
	  negotiated in both directions.

	  ASTERISK-26279 #close

	  Change-Id: Id25a92cdf3df97a26c53cffae65b6b82de33c8e2

2016-08-26 08:41 +0000 [847bd47ff0]  Alexander Traud <pabstraud@compuserve.com>

	* channel: No hung-up on failing security requirements.

	  In your Diaplan, if you specify
	   same => n,Set(CHANNEL(secure_bridge_media)=1)
	   same => n,Set(CHANNEL(secure_bridge_signaling)=1)
	  only the SIP channel driver chan_sip supports this. All other channels drivers
	  like res_pjsip fail. In case of failure, the original sRTP source code released
	  the whole channel, even if not hung-up, yet. This change does not release the
	  channel but instead hangs-up the channel.

	  ASTERISK-26306

	  Change-Id: I0489f0cb660fab6673b0db8af027d116e70a66db

2016-08-20 09:04 +0000 [b59d3b48d0]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Migrate IPv4/IPv6 (Dual Stack) configurations.

	  When using the migration script sip_to_pjsip.py, and your sip.conf is
	  configured with bindaddr=::, two transports are written to pjsip.conf, one for
	  0.0.0.0 (IPv4) and one for [::] (IPv6). That way, PJProject listens on the IPv4
	  and IPv6 wildcards; a IPv4/IPv6 Dual Stack configuration on a single interface
	  like in chan_sip.

	  Furthermore, the script internal functions "build_host" and "split_hostport"
	  did not parse Literal IPv6 addresses as expected (like [::1]:5060). This change
	  makes sure, even such addresses are parsed correctly.

	  ASTERISK-26309

	  Change-Id: Ia4799a0f80fc30c0550fc373efc207c3330aeb48

2016-08-25 07:06 +0000 [f69f5cd3c4]  Joshua Colp <jcolp@digium.com>

	* app_queue: Ensure member is removed from pending when hanging up.

	  When dialing channels it is possible that they may not ever
	  leave the not in use state (Local channels in particular) by
	  the time we cancel them. If this occurs but we know they were
	  dialed we explicitly remove them from the pending members
	  container so that subsequent call attempts occur.

	  ASTERISK-26299 #close

	  Change-Id: I6ad0d17c36480c92cebf840626228ce3f7e4bd65

2016-08-04 20:11 +0000 [5cd583d7a2]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Cache global config options.

	  We may check a global config option hundreds of times a second or more.
	  Asking sorcery for the global configuration from the config files backend
	  involves several allocations and container traversals.  Using realtime
	  without a memory cache is a lot worse because you have to lookup in the
	  realtime database each time to reconstitute the sorcery object.  With a
	  memory cache for realtime, there is about the same amount of overhead as
	  for config files.  Either way, it is still fairly expensive to access the
	  sorcery object that much.

	  * Cache the global config options so we can access them faster.  You must
	  now always perform a res_pjsip reload to change the global options.

	  Change-Id: Ice16c7a4cbca4614da344aaea21a072b86263ef7

2016-08-23 11:02 +0000 [8b4b2500ee]  Richard Mudgett <rmudgett@digium.com>

	* res_fax: Fix deadlock in ast_channel_get_t38_state().

	  ast_channel_get_t38_state() calls ast_channel_queryoption() with
	  AST_OPTION_T38_STATE.  If the passed in channel is a local channel then a
	  deadlock can happen if a channel lock is held when called.

	  * Made ast_channel_get_t38_state() callers not hold a channel lock before
	  calling.

	  * Update ast_channel_get_t38_state() doxygen to note that no channel locks
	  can be held when calling the function.

	  ASTERISK-26203 #close
	  Reported by: Etienne Lessard

	  ASTERISK-24822 #close
	  Reported by: David Brillert

	  ASTERISK-22732 #close
	  Reported by: Richard Mudgett

	  Change-Id: I49fd76fa9af628b4198009b5c0b82c8b03681214

2016-08-23 10:39 +0000 [e8d4f40022]  Richard Mudgett <rmudgett@digium.com>

	* res_fax: Fix deadlock setting FAXMODE channel variable.

	  ASTERISK-25980 added the FAXMODE channel variable to res_fax.c.
	  Unfortunately, it also introduced a deadlock potential because
	  set_channel_variables() which sets FAXMODE can be called during a
	  masquerade.  The ast_channel_get_t38_state() which gets the value used to
	  set FAXMODE cannot be called with the channel locked.  As a result, local
	  channels can deadlock because of how they must acquire the locks necessary
	  to operate.

	  The intent of FAXMODE is for dialplan to know how a fax was transferred
	  after the fax completes.  However, the previous patch sets FAXMODE to the
	  channel's current T.38 state AFTER the fax has completed and where T.38
	  may have already disconnected.

	  * Set FAXMODE based upon T.38 negotiations exchanged either with the fax
	  applications or the fax framehooks.

	  ASTERISK-26203
	  Reported by: Etienne Lessard

	  ASTERISK-24822
	  Reported by: David Brillert

	  ASTERISK-22732
	  Reported by: Richard Mudgett

	  Change-Id: Id525747254b64c1efe8b1b5973d52ff9719c2ae1

2016-08-22 12:31 +0000 [35cf6c7702]  Richard Mudgett <rmudgett@digium.com>

	* res_fax.c: Fix deadlock in fax_gateway_indicate_t38().

	  fax_gateway_indicate_t38() calls ast_indicate_data() which cannot be
	  called with any channel locks already held.  A deadlock can happen if the
	  function is operating on a local channel.

	  * Made fax_gateway_indicate_t38() unlock the channel before calling
	  ast_indicate_data() since fax_gateway_indicate_t38() is always called with
	  the channel locked.

	  * Made fax_gateway_indicate_t38() return void since nothing cared about
	  its return value.

	  ASTERISK-26203
	  Reported by: Etienne Lessard

	  ASTERISK-24822
	  Reported by: David Brillert

	  ASTERISK-22732
	  Reported by: Richard Mudgett

	  Change-Id: I701ff2d26c5fc23e0d5a48a3fd98759a9fd09407

2016-08-23 11:16 +0000 [50b2aa506f]  Richard Mudgett <rmudgett@digium.com>

	* res_fax.c: Add chan locked precondition comments.

	  Change-Id: Ic10ae434536bbf7fb7055d6ab36cc50b8748a4e7

2016-08-23 10:42 +0000 [038cbc0215]  Richard Mudgett <rmudgett@digium.com>

	* ast_framehook_detach() must be called with the channel locked.

	  The framehook container could become corrupted if the channel lock is not
	  held before calling.

	  Change-Id: If0a1c7ba0484ed3a191106a7516526b905952584

2016-08-22 15:01 +0000 [88e9d05ef7]  Richard Mudgett <rmudgett@digium.com>

	* ast_framehook_attach() must be called with the channel locked.

	  The framehook container could become corrupted if the channel lock is not
	  held before calling.

	  Change-Id: I1a6b957a1f7b899eb29a186915f8cccab886a438

2016-08-24 14:42 +0000 [c9e83f6d0b]  gtjoseph <gjoseph@digium.com>

	* res_rtp_multicast:  Fix SEGV in ast_multicast_rtp_create_options

	  ast_multicast_rtp_create_options now checks for NULL or empty options

	  Change-Id: Ib845eae46a67a9787e89a87ebd1027344e5e0362

2016-08-19 18:19 +0000 [cb8fd610e2]  Corey Farrell <git@cfware.com>

	* Fix checks for allocation debugging.

	  MALLOC_DEBUG should not be used to check if debugging is actually
	  enabled, __AST_DEBUG_MALLOC should be used instead.  MALLOC_DEBUG only
	  indicates that debugging is requested, __AST_DEBUG_MALLOC indicates it
	  is active.

	  Change-Id: I3ce9cdb6ec91b74ee1302941328462231be1ea53

2016-08-10 15:14 +0000 [b8b5d52b5e]  Mark Michelson <mmichelson@digium.com>

	* ConfBridge: Rework announcer channel methodology

	  NOTE: This patch was submitted earlier and reverted because of a failing
	  test. The test has been patched so that it adjusts for the changes here,
	  so this is being resubmitted for review.

	  One feature that confbridge has is the ability to play sounds to all
	  participants in the conference. Prior to this commit, the algorithm for
	  this was as follows:

	  * Grab the playback lock
	  * Push the conference announcer channel into the bridge
	  * Play back the sound
	  * Pull the conference announcer channel from the bridge
	  * Release the playback lock

	  The issue here is that the act of adding the playback channel to the
	  bridge and removing it for each announcement is expensive. Amongst the
	  expenses:

	  * The announcer channel is imparted into the bridge, meaning a new
	    thread is spun up for each playback.
	  * When the announcer is added or removed from the bridge, it results
	    in the BRIDGEPEER channel variable being set on all channels in the
	    bridge. This requires keeping the bridge locked and locking each
	    individual channel in order to set it.
	  * There's also just the general overhead of adding the channel and
	    removing it from the bridge. The bridge potentially has to reconfigure
	    every single time

	  With this commit, the paradigm for playing back announcements has
	  shifted.

	  * The announcer channel is now added to the bridge when the conference
	    is allocated, and it is hung up when the conference is destroyed.
	  * A taskprocessor is used to queue playbacks onto the announcer channel.
	    This keeps the behavior from before where playbacks do not overlap.
	  * The announcer channel is no longer placed into the bridge as
	    departable. Since we are not constantly removing the channel from
	    the bridge, it is safe to add the channel using an independent thread
	    and simply hang the channel up when it is time for the conference to
	    be destroyed.

	  The use of the taskprocessor for playbacks opens up the interesting
	  possibility of having asynchronous announcements played. In this commit,
	  however, the behavior is still exactly the same as it previously was.

	  ASTERISK-26289
	  Reported by Mark Michelson

	  Change-Id: Ica9fa4907c2f3728cdd1cf0bc564ef4eb40754a0

2016-08-23 05:54 +0000 [d5d7cbfcfb]  Joshua Colp <jcolp@digium.com>

	* Revert "ConfBridge: Rework announcer channel methodology"

	  This reverts commit 0cdeb2bfb0f4203384c08858951af3c77be8b9b3.

	  Change-Id: I18ba73b6d4dc0b994f4ffb01ae0b6cfad36ac636

2016-08-22 17:08 +0000 [c16ef02318]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Default endpoints to the "offline" status.

	  A recent change attempted to optimize startup by not updating contact
	  status. Instead, code responsible for qualifying contacts updates the
	  status as it becomes known. The code even accounts for contacts/AORs
	  that are not set to be qualified.

	  The problem, though, is when there are no contacts associated with an
	  endpoint. A common case is when an endpoint is set to register its
	  contacts but has not done so yet. In this case, prior to registration,
	  the endpoint's device state will appear to be "not in use" and hints
	  associated with that device will appear to be "idle". In actuality, the
	  device state and hint should both appear as "unavailable". The reason
	  for the failure is that the optimization change made all persistent
	  endpoint states set to "unknown".

	  The fix here is to change the hard-coded "unknown" to be "offline"
	  instead. The default state will be offline until the qualifying code
	  determines that the contact is actually online. This way, if there are
	  no contacts at all, then the state stays as offline, and device state
	  and hints appear correctly.

	  ASTERISK-26269 #close
	  Reported by nappsoft

	  Change-Id: Ie99b84169393983453076f5e9c0d35ff313a456a

2016-08-20 14:51 +0000 [e54dcf4fd5]  David M. Lee <dlee@respoke.io>

	* res_odbc_transaction: add dep on generic_odbc

	  When res_odbc_transaction depended on res_odbc, it got the generic_odbc
	  headers and libs implicitly. Now that it no longer depends on res_odbc,
	  its dependency on generic_odbc must be explicit.

	  Change-Id: I9db88f7af7388437f49903d3008ba8d4890d5911

2016-08-20 11:18 +0000 [be38c95def]  Alexander Traud <pabstraud@compuserve.com>

	* pjproject_bundled: Allow IPv4/IPv6 (Dual Stack) configurations.

	  PJProject supports a lot of platforms even Windows, some with different defaults
	  when it comes to IPv6. In many Linux platforms like Ubuntu 16.04 LTS,
	  "/proc/sys/net/ipv6/bindv6only" is set to 0 (false). Different than in Windows.

	  Because of this, if configured with just an IPv6 address/transport, PJProject
	  listens to both IPv4 and IPv6. However, this is not supported by the PJProject
	  team. As consequence, you end-up with IPv4-mapped IPv6 addresses in SDP,
	  incompatible with IPv4-only clients. Technically, you end-up with an IPv6-only
	  server which accepts incoming connections on IPv4.

	  If you try to configure two transports, one with IPv4 and one with IPv6 on the
	  same interface, as expected by the PJProject team, the IPv4 transport is not
	  able to bind because the IPv6 transport listens to both already.

	  One solution would be to change "/proc/sys/net/ipv6/bindv6only" system-wide.
	  Then, you are able to configure two transports, one for each IP version on the
	  same interface. That way, you get a server which works with IPv4 clients and
	  IPv6 clients at the same time over the same interface.

	  Here, this change sets this parameter directly within PJProject to match the
	  expectations of the PJProject team in any case. This allows IPv4/IPv6 Dual Stack
	  servers out of the box like in chan_sip. This change was accepted by the
	  PJProject team as <http://trac.pjsip.org/repos/changeset/5403> and is expected
	  to arrive in the next version, PJProject 2.6.0. Until then, this change is
	  incorporated in the bundled PJProject of Asterisk.

	  ASTERISK-26309

	  Change-Id: I3335d8718f79f4b2feae91b5b005a3ce684a63ae

2016-08-10 15:14 +0000 [0cdeb2bfb0]  Mark Michelson <mmichelson@digium.com>

	* ConfBridge: Rework announcer channel methodology

	  One feature that confbridge has is the ability to play sounds to all
	  participants in the conference. Prior to this commit, the algorithm for
	  this was as follows:

	  * Grab the playback lock
	  * Push the conference announcer channel into the bridge
	  * Play back the sound
	  * Pull the conference announcer channel from the bridge
	  * Release the playback lock

	  The issue here is that the act of adding the playback channel to the
	  bridge and removing it for each announcement is expensive. Amongst the
	  expenses:

	  * The announcer channel is imparted into the bridge, meaning a new
	    thread is spun up for each playback.
	  * When the announcer is added or removed from the bridge, it results
	    in the BRIDGEPEER channel variable being set on all channels in the
	    bridge. This requires keeping the bridge locked and locking each
	    individual channel in order to set it.
	  * There's also just the general overhead of adding the channel and
	    removing it from the bridge. The bridge potentially has to reconfigure
	    every single time

	  With this commit, the paradigm for playing back announcements has
	  shifted.

	  * The announcer channel is now added to the bridge when the conference
	    is allocated, and it is hung up when the conference is destroyed.
	  * A taskprocessor is used to queue playbacks onto the announcer channel.
	    This keeps the behavior from before where playbacks do not overlap.
	  * The announcer channel is no longer placed into the bridge as
	    departable. Since we are not constantly removing the channel from
	    the bridge, it is safe to add the channel using an independent thread
	    and simply hang the channel up when it is time for the conference to
	    be destroyed.

	  The use of the taskprocessor for playbacks opens up the interesting
	  possibility of having asynchronous announcements played. In this commit,
	  however, the behavior is still exactly the same as it previously was.

	  ASTERISK-26289
	  Reported by Mark Michelson

	  Change-Id: Ic5cd2c4b98a1eaa1715eb7a5b35d62f1a76d78a5

2016-08-19 10:21 +0000 [b494b9f88c]  Alexei Gradinari <alex2grad@gmail.com>

	* compilation failed with -Werror=maybe-uninitialized

	  The compilation failed for devmode
	  --enable DONT_OPTIMIZE
	  --enable BETTER_BACKTRACES
	  --enable DO_CRASH
	  --enable TEST_FRAMEWORK

	  res_pjsip/pjsip_configuration.c: In function dtls_handler:
	  res_pjsip/pjsip_configuration.c:974:20: error:
	  back may be used uninitialized in this function [-Werror=maybe-uninitialized]
	  int size = strlen(front);
	             ^
	  cc1: all warnings being treated as errors

	  Change-Id: I7f082ead0312792a577ec7c73015ba64dabca580

2016-08-19 03:59 +0000 [a628009eb9]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Add cert_file.

	  When using the migration script sip_to_pjsip.py, cert_file was not migrated to
	  pjsip.conf. A previous change regarding this contained a copy/paste error.

	  ASTERISK-22374

	  Change-Id: I0fa72e9412117d53b4284fc6b83fa5b2b95ba03b

2016-08-18 09:21 +0000 [b1fe070d0b]  Alexander Traud <pabstraud@compuserve.com>

	* sip.conf: tlsclientmethod is using sslv23 as default.

	  When 'tlsclientmethod' is not specified in sip.conf, chan_sip uses the OpenSSL
	  SSLv23_method. This was documented incorrectly in the file sip.conf.sample.

	  SSLv23_method got its name in the 90s. Today, with OpenSSL 1.0.2, this method
	  enables (just) the secure TLSv1.0 and TLSv1.2. Or stated differently, that
	  function should have been called 'secure_method' or 'automatic_method' back in
	  the 90s.

	  Consequently please, specify 'tlsclientmethod=tlsv1' in your sip.conf only if
	  you face a server which has problems like not falling back to TLSv1.0
	  automatically.

	  ASTERISK-24425

	  Change-Id: I502ce6146b4504cadfd3973af8d6ec3994f54fa3

2016-08-18 17:16 +0000 [ff2378c735]  Kevin Harwell <kharwell@digium.com>

	* rest-api: Swagger scripts were not replacing format variable in file brief

	  Given resource paths did not have 'json' substituted in for the '{format}'. For
	  some auto generated documentation/comment strings it resulted in something like
	  the following:

	  "... REST handler for /api-docs/sounds.{format}"

	  This patch makes sure the resource api's path is properly substituted.

	  ASTERISK-25472 #close

	  Change-Id: Ie3e950a35db4043e284019d6c9061f3b03922e23

2016-08-16 15:57 +0000 [43f400ef95]  Jason Parker (license 4993)

	* res_format_attr_g729: Add annexb=no format parameter to SDPs

	  Historically, Asterisk has always specified annexb=no for the g729 format.
	  However, when using res_pjsip no format attribute was specified. This patch
	  makes it so the SDP now contains a format attribute line with annexb=no.

	  Note, that this means only g729a is negotiated. Even for pass through support.
	  According to rfc7261 the type of annex used (a or b) is dependent upon the
	  answerer. However, Asterisk being a back to back user agent makes this tricky
	  to support at this time, thus we only allow annex 'a' for now.

	  ASTERISK-26228 #close
	  patches:
	    res_format_attr_g729.c submitted by Jason Parker (license 4993)

	  Change-Id: I76bc20cc0a01af01536e9915afef319c269c22d0

2016-08-18 15:15 +0000 [4c1ae07d51]  gtjoseph <gjoseph@digium.com>

	* res_odbc:  Correct the dependency relationship with res_odbc_transaction

	  The MODULEINFO dependencies between these 2 modules was reversed.
	  res_odbc should depend on res_odbc_transaction, not the other way
	  around.

	  ASTERISK-25984 #close

	  Change-Id: Ifcfbb49c0b51cf6640a5446d47cd6c48caf1331f

2016-08-18 12:04 +0000 [cab6975b02]  Kevin Harwell <kharwell@digium.com>

	* sip_to_pjsip: Set correct tls transport method

	  A recent update had a copy/paste error where the unused variable 'val' was
	  being passed to the set_value function instead of the 'method' value itself.

	  This patch passes in the right variable.

	  ASTERISK-22374

	  Change-Id: I895b7b3779ce4442bc58b8ec40d59dd29bb43f06

2016-08-18 08:19 +0000 [2381ddde63]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Map the TLS method correctly.

	  When using the migration script sip_to_pjsip.py and tlsclientmethod is not set
	  in sip.conf, the default value of chan_sip (sslv23) is copied to pjsip.conf, to
	  overwrite the default of the PJProject (tlsv1). This makes sure, res_pjsip is
	  offering/using not just TLSv1.0 but TLSv1.2 as well.

	  ASTERISK-22374

	  Change-Id: Ie530a3dae9926ae14f3920a21be1e2edb15bda4f

2016-08-18 08:17 +0000 [6500f5e138]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent.

	  When using the migration script sip_to_pjsip.py, no section of type=system or
	  type=general were created. Therefore the keys compactheaders, timerb, timert1,
	  and useragent were not migrated to pjsip.conf.

	  ASTERISK-22374

	  Change-Id: I318a453843227ea36bf130d392d4abd7bd26b5a1

2016-08-18 08:16 +0000 [21e9c69e56]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Map (session-)timers correctly.

	  When using the migration script sip_to_pjsip.py, session-timers=accept and
	  session-timers=refuse were mapped to wrong values.

	  ASTERISK-22374

	  Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092

2016-08-18 08:15 +0000 [c9a97398f7]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Write username even without authname.

	  When using the migration script sip_to_pjsip.py, now the (mandatory) username is
	  written to pjsip.conf, even if there was no (optional) authname in the register
	  string in sip.conf.

	  ASTERISK-22374

	  Change-Id: Ie53e1997104cd2674821688b8a8247249f5e156f

2016-08-18 08:14 +0000 [60275359bc]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Parse register even with transport.

	  When using the migration script sip_to_pjsip.py and the register string
	  started with a transport in sip.conf - like tls://... - register was not parsed
	  correctly and therefore not migrated correctly to pjsip.conf.

	  ASTERISK-22374

	  Change-Id: I44c12104eea2bd8558ada6d25d77edfecd92edd2

2016-08-18 08:13 +0000 [0d479232eb]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit.

	  When using the migration script sip_to_pjsip.py, those keys got missing. These
	  keys might appear several times and the function "merge_value" tried to collect
	  those. However, because these keys have different names in sip.conf and
	  pjsip.conf, "merge_value" was not able to find the new key name in sip.conf.
	  This change lets "merge_value" search with the old key name in sip.conf and
	  write with the new key name in pjsip.conf.

	  ASTERISK-22374

	  Change-Id: Ie53c5278ae6f1cb8fa7e96c5289877d46981d9d2

2016-08-18 08:11 +0000 [cbc1b2d020]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Map externhost/ip to Transports.

	  When using the migration script sip_to_pjsip.py, the externhost or externip of
	  sip.conf were erroneously written to Endpoints instead to Transports.

	  ASTERISK-22374

	  Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4

2016-08-18 08:04 +0000 [5f33e99534]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry.

	  When using the migration script sip_to_pjsip.py, defaultexpiry, maxexpiry, and
	  minexpiry were not migrated to pjsip.conf.

	  ASTERISK-22374

	  Change-Id: I007fbf543dcadc96fc3ed71c54da502bcb209b7b

2016-08-18 08:03 +0000 [231ea0350d]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Write media_encryption.

	  When using the migration script sip_to_pjsip.py, encryption=yes got missing and
	  media_encryption=sdes was not written to pjsip.conf, because of a typo.

	  ASTERISK-22374

	  Change-Id: I0fc3e55dc512a57603ae0fef41baacccf2a35c05

2016-08-18 08:02 +0000 [23eb065121]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Write cos and tos.

	  When using the migration script sip_to_pjsip.py, both tos_sip and cos_sip got
	  missed, because of a typo. Therefore, cos and tos were not written to
	  pjsip.conf. Furthermore, that revealed a misuse of an internal function, caused
	  by a copy-and-paste error.

	  ASTERISK-22374

	  Change-Id: Id245ebadf70ab9776eb280c026288540af3af5c2

2016-08-18 07:55 +0000 [0b675a208b]  Alexander Traud <pabstraud@compuserve.com>

	* sip_to_pjsip: Add cert_file and ca_list_path.

	  When using the migration script sip_to_pjsip.py, cert_file and ca_list_path were
	  not migrated to pjsip.conf.

	  ASTERISK-22374

	  Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825

2016-08-17 14:13 +0000 [1cd12d73a6]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Fix unbound srv failover tests.

	  Commit 1b666549f33d69dc080b212bf92126f3bc3a18b2 broke the srv failover
	  functionality if a TCP connection gets disconnected.  Under these
	  conditions, session_inv_on_state_changed() gets a
	  PJSIP_EVENT_TRANSPORT_ERROR and restarts the INVITE transaction on a new
	  transport.  Unfortunately, session_inv_on_tsx_state_changed() also gets
	  the same PJSIP_EVENT_TRANSPORT_ERROR event and unconditionally terminates
	  the session.

	  * Made session_inv_on_tsx_state_changed() complete terminating the session
	  on PJSIP_EVENT_TRANSPORT_ERROR only if the session state is still
	  PJSIP_INV_STATE_DISCONNECTED.

	  ASTERISK-26305 #close
	  Reported by: Richard Mudgett

	  Change-Id: If736e766b5c55b970fa38ca6c8a885caf27b897d

2016-08-16 15:36 +0000 [329507fe20]  gtjoseph <gjoseph@digium.com>

	* res_pjsip:  Add contact_user to endpoint

	  contact_user, when specified on an endpoint, will override the user
	  portion of the Contact header on outgoing requests.

	  Change-Id: Icd4ebfda2f2e44d3ac749d0b4066630e988407d4

2016-08-17 08:10 +0000 [6f448f32fe]  Torrey Searle <torrey@voxbone.com>

	* res_ari: Add http prefix to generated docs

	  updated the uri handler to include the url prefix of the http server
	  this enables res_ari to add it to the uris when generating docs

	  Change-Id: I279335a2625261a8492206c37219698f42591c2e

2016-08-17 06:12 +0000 [56e0aed177]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Detect ca_list_path capabilities in external PJProject.

	  Since Asterisk 13.8, pj_ssl_cert_load_from_files2 got detected only in the
	  bundled PJProject but not in an external PJProject. Therefore, ca_list_path
	  could not be used in pjsip.conf. With this change, pj_ssl_cert_load_from_files2
	  is detected again to enable ca_list_path again.

	  ASTERISK-26303 #close

	  Change-Id: I4a4a0cdc5cdff33730911fb4cfc0498c069043d0

2016-08-16 12:24 +0000 [2edcfcf1eb]  gtjoseph <gjoseph@digium.com>

	* ari:  Add documentation that path parameters are case-sensitive

	  Added to api.wiki.mustache so that the generated object pages
	  have the notation in the table header as well as under each method
	  that has path parameters.

	  ASTERISK-25492 #close

	  Change-Id: I36c46c6dc0c9ac350470394a999a1b19ef3fcdaf

2016-08-15 15:29 +0000 [f4e28b3a09]  Corey Farrell <git@cfware.com>

	* Refactor usage pattern of xmldoc info tag.

	  This updates func_channel.c and main/message.c to use a generic xpointer
	  include instead of including info from each channel driver.  Now the
	  name attribute of info is CHANNEL or CHANNEL_EXAMPLES to be included in
	  documentation for func_channel.  Setting the name attribute of info to
	  MessageToInfo or MessageFromInfo causes it to be included in the
	  MessageSend application and AMI action.

	  Change-Id: I89fd8276a3250824241a618009714267d3a8d1ea

2016-08-04 20:00 +0000 [a8d9a53bae]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_config.c: Cleanup ao2 container usage idioms.

	  Change-Id: Iad24b335fb121a2bc7f1d048ab7420569edcba5a

2016-08-04 15:57 +0000 [74a91b9ee5]  Richard Mudgett <rmudgett@digium.com>

	* sorcery.c: Minor optimizations.

	  * Remove some unused parameters from internal functions:
	  sorcery_wizard_create()
	  sorcery_wizard_update()
	  sorcery_wizard_delete()

	  * Created the struct sorcery_observer_invocation ao2 object without a lock
	  since it is not needed in sorcery_observer_invocation_alloc().

	  * Cleanup generic ao2 container sorcery object id hash, sort, and cmp
	  functions.

	  Change-Id: Iff71d75f52bc1b8cee955456838c149faaa4f92e

2016-08-01 11:04 +0000 [29beb2890c]  Richard Mudgett <rmudgett@digium.com>

	* sorcery.c: Tweak some container declaration formatting.

	  * Tweak sorcery_object_type_alloc() formatting.
	  * Tweak ast_sorcery_init() formatting.

	  Change-Id: Ib02430023f15268cd7a2ea53f2c331213e4d3944

2016-08-11 23:30 +0000 [9b822293bd]  Corey Farrell <git@cfware.com>

	* pbx.c: Additional fixes to ast_context_remove_extension_callerid2.

	  Do not check registrar of the first extension head.  We should only check
	  the registrar when we match the priority.

	  Additionally fix a couple calls to strcmp which used the input callerid
	  instead of the clean version ex.cidmatch.

	  ASTERISK-26233

	  Change-Id: I17ea6881a18f40840ae9c1f5394aab1fbb3769f1

2016-08-10 14:41 +0000 [403c794684]  Alexei Gradinari <alex2grad@gmail.com>

	* core: Entity ID is not set or invalid

	  The Exchanging Device and Mailbox States could not working
	  if the Entity ID (EID) is not set manually and can't be obtained
	  from ethernet interface.

	  This patch replaces debug message to warning
	  and addes missing description about option 'entityid' to
	  asterisk.conf.sample.

	  With this patch the asterisk also:
	  (1) decline loading the modules which won't work without EID:
	      res_corosync and res_pjsip_publish_asterisk.
	  (2) warn if EID is empty on loading next modules:
	      pbx_dundi, res_xmpp

	  Starting with v197 systemd/udev will automatically assign "predictable"
	  names for all local Ethernet interfaces.
	  This patch also addes some new ethernet prefixes "eno" and "ens".

	  ASTERISK-26164 #close

	  Change-Id: I72d712f1ad5b6f64571bb179c5cb12461e7c58c6

2016-06-15 17:10 +0000 [93332cb1d0]  Evgeniy Tsybra <cjack@yandex.ru>

	* chan_sip: Fix lastrtprx always updated

	  Packets are read regulary, when there is no data in buffer fr->frametype
	  is AST_FRAME_NULL. There was no check of frametype and lastrtprx always 
	  updated and, therefore, rtptimeout did not work at all.

	  ASTERISK-25270 #close

	  Change-Id: If3b5ca0dbb822582a86eb7d01dcae4e83448c41d

2016-08-15 07:17 +0000 [2735ec899a]  Joshua Colp <jcolp@digium.com>

	* manager: Clarify that dialplan manipulation actions are under system class.

	  ASTERISK-26246 #close

	  Change-Id: Id673b9786389f9d2a87f638ce1a25161f5f31657

2016-08-13 22:02 +0000 [f59bd47ed3]  Matt Jordan <mjordan@digium.com>

	* app_dial: Improve documentation

	  * Add some helpful <literal> and other embedded paragraph tags

	  * Document some of the lesser known channel variables set by Dial

	  * Add examples for some common Dial uses, along with some more
	    challenging but useful options

	  Change-Id: Ib2fb9301e8e044d14fbb2815ec64161f19bbfbc1

2016-08-13 20:16 +0000 [4facaac408]  Matt Jordan <mjordan@digium.com>

	* manager: Add <see-also> tags to relate interrelated events/actions together

	  Change-Id: Idbac539205aa732bf786c4f765577d8e9ff28ba4

2016-08-13 20:15 +0000 [232d4fe24f]  Matt Jordan <mjordan@digium.com>

	* manager: Add <see-also> tags to relate Bridge related events,actions, and apps

	  Change-Id: I67e6b79fa3102e494b5fe6cc7510472249080e85

2016-08-13 20:14 +0000 [63c0b2f7c9]  Matt Jordan <mjordan@digium.com>

	* manager: Add <see-also> tags to relate AoC events and actions

	  Change-Id: Iea89a36222712148c1775c05ed0ad1049d67a70e

2016-08-13 20:13 +0000 [0422667d6c]  Matt Jordan <mjordan@digium.com>

	* manager: Add <see-also> tags to relate UserEvent actions/apps/events

	  Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4

2016-08-12 15:53 +0000 [f9e734974b]  Matt Jordan <mjordan@digium.com>

	* res_agi: Improve documentation

	  * Groups of AGI commands that have similar functionality now reference
	    each other, and all reference the AGI application for ease of wiki
	    reference.

	  * The documentation for the AGI application has been improved, in
	    particular noting the various AGI types and how they are invoked.

	  * A warning message has been added to DeadAGI, noting that it is
	    deprecated.

	  Change-Id: I479ccdee8a7393f01b18692c3d4ab7e6bdd1875d

2016-08-12 13:53 +0000 [781bb410d0]  Matt Jordan <mjordan@digium.com>

	* manager: Add <see-also> links between related events

	  This patch adds some see-also references between related AMI events. It
	  focuses primarily on those events that are guaranteed to come in pairs,
	  such as DTMFBegin/DTMFEnd, as well as those that occur during the life
	  cycle of an Asterisk channel, such as Newchannel/Hangup.

	  Change-Id: Iaab600477052018d0f8c03d0c624c0856e9ff1f3

2016-08-12 11:15 +0000 [cfd6852d39]  Matt Jordan <mjordan@digium.com>

	* func_channel: Reorganize documentation

	  * Following the example of the PJSIP channel driver, the channel
	    technology specific documentation has been moved to the respective
	    channel drivers that provide that functionality. This has the benefit
	    of locating the documentation of items with those modules that provide
	    it.

	  * Examples of using the CHANNEL function for both standard items as well
	    as for PJSIP have been added.

	  * The 'max_forwards' standard item has been documented.

	  Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b

2016-08-11 22:11 +0000 [cb043249b6]  Corey Farrell <git@cfware.com>

	* Run mandatory cleanup when startup fails.

	  Errors during startup result in an exit.  These error branches should be
	  calling ast_run_atexit(0) to ensure mandatory cleanup is run.

	  ASTERISK-26267 #close

	  Change-Id: If226f2326ae2df7add20040696132214cf2bb680

2016-08-11 11:24 +0000 [4d5e96ab53]  gtjoseph <gjoseph@digium.com>

	* res_pjsip_caller_id:  Copy header name to short header name

	  When compact_headers was set, we were sending a zero-length header name
	  for PAI and RPID because we always forced the short header name length
	  to 0.  We did this because we cloned the header from "From" and wanted
	  to clear "f" from the sname.  By cloning however, we bypass pjproject's
	  automatic logic that sets sname to name if there's no compact form of
	  the header, which there isn't for PAI and RPID.  So now we force sname
	  to be the same as name right after we set name.

	  res_pjsip_diversion needed the same treatment for the Diversion header.

	  ASTERISK-26241 #close

	  Change-Id: I633ec139630cd83809aae00336cee4a10077e467

2016-08-11 12:18 +0000 [143df33110]  gtjoseph <gjoseph@digium.com>

	* res_pjsip:  Fail global load if debug or default_from_user are empty

	  If debug was specified in the global configuration but left blank,
	  the logger would treat it as a wildcard and log all hosts.  If
	  default_from_user was empty, a crash would result.

	  The global apply handler now checks for empty strings.

	  ASTERISK-26239 #close
	  ASTERISK-26238 #close

	  Change-Id: Ie75727f5cd5808845d92cc81f5713842fb203336

2016-08-01 15:07 +0000 [1fc5c90014]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip res_pjsip_mwi: Misc fixes and cleanups.

	  * Eliminated RAII_VAR() usage in
	  ast_sip_persistent_endpoint_update_state().

	  * Added a missing allocation failure check to
	  persistent_endpoint_find_or_create().

	  * Made persistent_endpoint_find_or_create() create the new object without
	  a lock as it isn't needed.

	  * Cleaned up some ao2 container allocation idioms.

	  * Reordered res_pjsip_mwi.c load_module() and unload_module()

	  Change-Id: If8ce88fbd82a0c72a37a2388f74f77237a6a36a8

2016-08-04 18:03 +0000 [73052e5732]  Richard Mudgett <rmudgett@digium.com>

	* location.c: Misc fixes and cleanups.

	  * Eliminated most RAII_VAR() usage.

	  * Added several missing allocation failure checks.

	  * Made ast_sip_for_each_contact() allocate the wrapper ao2 object without
	  a lock as it is not needed.

	  Change-Id: Ie20913365156c95dd79e5d471cfd25e99ae880bc

2016-08-02 13:53 +0000 [9d4bd3d763]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Tweak high water checks.

	  * The high water check in ast_taskprocessor_alert_set_levels() would
	  trigger immediately if the new high water level is zero and the queue was
	  empty.

	  * The high water check in taskprocessor_push() was off by one.

	  Change-Id: I687729fb4efa6a0ba38ec9c1c133c4d407bc3d5d

2016-08-03 16:24 +0000 [e1248c3075]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Make aor named lock a mutex.

	  The named aor lock was always being locked for writes so a rwlock adds no
	  benefit and may be slower because rwlocks are biased toward read locking.

	  Change-Id: I8c5c2c780eb30ce5441832257beeb3506fd12b28

2016-07-29 17:41 +0000 [6e40334d89]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_distributor.c: Add missing allocation failure check.

	  Change-Id: I932ab2cea845e534d9ff318035b6de39972d3b28

2016-08-11 11:13 +0000 [a3c5488ff4]  Matt Jordan <mjordan@digium.com>

	* app_queue: Prevent crash when a call is forwarded to an invalid location

	  When a call forward attempt is made from a Queue member, the current
	  code will hang up the forwarding channel in an off-nominal condition
	  prior to raising the Stasis events informing the rest of Asterisk that
	  the call was forwarded. This will result in a slew of dreaded FRACKs,
	  most likely leading to a crash.

	  This patch modifies the code such that we don't hang up the forwarding
	  channel even in an off-nominal condition until we've safely raised the
	  Stasis messages.

	  ASTERISK-25797 #close

	  Change-Id: Ife5abed351691fd79105321636eaa8ea8dcdba38

2016-08-11 10:50 +0000 [5913929d31]  Kevin Harwell <kharwell@digium.com>

	* alembic: add auth_username to endpoint's identify_by enum

	  A new identify_by option was added recently, auth_username. However, this
	  setting was not added as an allowable choice in the database enumeration
	  value.

	  This patch updates the current enumeration, adding in the new setting.

	  ASTERISK-26268 #close

	  Change-Id: Ib4788e8485e4cd40172ec0abbf5810a147ab8bf8

2016-08-06 10:57 +0000 [1589452fdc]  Alexei Gradinari <alex2grad@gmail.com>

	* pjsip: Fix deadlock with suspend taskprocessor on masquerade

	  If both channels which should be masqueraded
	  are in the same serializer:
	  1st channel will be locked waiting condition 'complete'
	  2nd channel will be locked waiting condition 'suspended'

	  On heavy load system a chance that both channels will be in
	  the same serializer 'pjsip/distibutor' is very high.

	  To reproduce compile res_pjsip/pjsip_distributor.c with
	  DISTRIBUTOR_POOL_SIZE=1

	  Steps to reproduce:
	  1. Party A calls Party B (bridged call 'AB')
	  2. Party B places Party A on hold
	  3. Party B calls Voicemail app (non-bridged call 'BV')
	  4. Party B attended transfers Party A to voicemail using REFER.
	  5. When asterisk masquerades calls 'AB' and 'BV',
	     a deadlock is happened.

	  This patch adds a suspension indicator to the taskprocessor.
	  When a session suspends/unsuspends the serializer
	  it sets the indicator to the appropriate state.
	  The session checks the suspension indicator before
	  suspend the serializer.

	  ASTERISK-26145 #close

	  Change-Id: Iaaebee60013a58c942ba47b1b4930a63e686663b

2016-08-09 12:07 +0000 [f6ec94cca6]  Kevin Harwell <kharwell@digium.com>

	* alembic/sqlalchemy: auto increment only allowed on a single column

	  The extensions table defined two columns (id and priority) as primary key
	  autoincrement columns. However only one is allowed when defining the primary
	  key.

	  This patch removes the autoincrement attribute from the priority column since
	  it does not need to be as such and really should not have been on there in the
	  first place.

	  This patch also removes 'context', 'exten', and 'priority' from the primary key
	  index and creates a new combined unique contraint index on them.

	  ASTERISK-26183 #close

	  Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b

2016-08-07 09:58 +0000 [5f815f9dba]  Matt Jordan <mjordan@digium.com>

	* channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH

	  This patch adds a new PJSIP specific dialplan function,
	  PJSIP_SEND_SESSION_REFRESH. When invoked on a PJSIP channel, the media
	  session will be refreshed via either an UPDATE or re-INVITE request.
	  When used in conjunction with the PJSIP_MEDIA_OFFER dialplan function,
	  the formats in use on a PJSIP channel can be re-negotiated and changed
	  dynamically after call setup.

	  ASTERISK-26277 #close

	  Change-Id: Ib98fe09ba889aafe26d58d32f0fd1323f8fd9b1b

2016-08-09 16:19 +0000 [a119bab6a6]  Mark Michelson <mmichelson@digium.com>

	* res_rtp_asterisk: Cache local RTCP address.

	  When an RTCP packet is sent or received, res_rtp_asterisk generates a
	  Stasis event that contains the RTCP report as well as the local and
	  remote addresses that the report pertains to.

	  The addresses are determined using ast_find_ourip(). For the local
	  address, this will typically result in a lookup of the hostname of the
	  server, and then a DNS lookup of that hostname. If you do not have the
	  host in /etc/hosts, then this results in a full DNS lookup, which can
	  potentially block for some time.

	  This is especially problematic when performing RTCP reads, since those
	  are done on the same thread responsible for reading and writing media.

	  This patch addresses the issue by performing a lookup of the local
	  address when RTCP is allocated. We then use this cached local address
	  for the Stasis events when necessary.

	  ASTERISK-26280 #close
	  Reported by Mark Michelson

	  Change-Id: I3dd61882c2e57036f09f0c390cf38f7c87e9b556

2016-08-08 12:53 +0000 [a06a1af0eb]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack

	  The PJSIP taskprocessors could be overflowed on startup
	  if there are many (thousands) realtime endpoints
	  configured with unsolicited mwi.
	  The PJSIP stack could be totally unresponsive for a few minutes
	  after boot completed.

	  This patch creates a separate PJSIP serializers pool for mwi
	  and makes unsolicited mwi use serializers from this pool.
	  This patch also adds 2 new global options to tune taskprocessor
	  alert levels: 'mwi_tps_queue_high' and 'mwi_tps_queue_low'.

	  This patch also adds new global option 'mwi_disable_initial_unsolicited'
	  to disable sending unsolicited mwi to all endpoints on startup.
	  If disabled then unsolicited mwi will start processing
	  on next endpoint's contact update.

	  ASTERISK-26230 #close

	  Change-Id: I4c8ecb82c249eb887930980a800c9f87f28f861a

2016-08-04 10:16 +0000 [485fd27f7c]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_outbound_publish: Use a serializer shutdown group for unload.

	  This change replaces the custom unload process for the outbound
	  publish module with the common serializer shutdown group.

	  ASTERISK-25217 #close

	  Change-Id: I280a0384d860c486202d87d2d674394cca77ffb6

2016-08-03 15:39 +0000 [805f105f88]  Corey Farrell <git@cfware.com>

	* Add missing checks during startup.

	  This ensures startup is canceled due to allocation failures from the
	  following initializations.
	  * channel.c: ast_channels_init
	  * config_options.c: aco_init

	  ASTERISK-26265 #close

	  Change-Id: I911ed08fa2a3be35de55903e0225957bcdbe9611

2016-07-22 16:37 +0000 [ea71bd6e3e]  Alexei Gradinari <alex2grad@gmail.com>

	* app_voicemail: Add taskprocessor alert level options.

	  On heavy loaded system with IMAP or DB storage,
	  'app_voicemail' taskprocessor queue could reach 500 scheduled tasks.
	  It could happen when the IMAP or DB server dies or is unreachable.
	  It could happen on startup when there are many (thousands)
	  realtime endpoints configured with unsolicited mwi.
	  If the taskprocessor queue reaches the high water level
	  then the alert is triggered and pjsip stops processing new requests
	  until the queue reaches the low water level to clear the alert.

	  This patch adds 2 new 'general' configuration options
	  to tune taskprocessor alert levels:
	  'tps_queue_high' - Taskprocessor high water alert trigger level.
	  'tps_queue_low' - Taskprocessor low water clear alert level

	  ASTERISK-26229 #close

	  Change-Id: I766294fbffedf64053c0d9ac0bedd3109f043ee8

2016-08-03 09:47 +0000 [9dc8cfabd5]  Joshua Colp <jcolp@digium.com>

	* astconfigparser: Really handle case where line is simply a comment.

	  The regular expression would match causing the code that handled
	  the line if it was merely a comment to never get executed.

	  Change-Id: I3e4022481037ebcba9905587fe8c764b4ce21819

2016-07-23 08:51 +0000 [ad3e65433c]  gtjoseph <gjoseph@digium.com>

	* asterisk.c:  Add auto generation and persistence of UUID

	  Upcoming features will require the generation and persistence
	  of a UUID.

	  Change-Id: I3ec0062427e133217db6ef496a4216f427c3b92d

2016-08-02 12:55 +0000 [efc4034d72]  Kevin Harwell <kharwell@digium.com>

	* rest-api: Code out of sync with the model

	  Change-Id: Idccaa26fd4a423d47d013ee592b8fa6a0349c006

2016-07-29 13:13 +0000 [f6821fbaec]  Mark Michelson <mmichelson@digium.com>

	* Remove SILK payload mappings from Asterisk core.

	  SILK is a bit of a hog when it comes to using up our limited number of
	  dynamic payload types in the RTP engine. By freeing up four slots, it
	  allows for other codecs to potentially take the place.

	  Now, codec_silk.so will dynamically use the payload slots in the RTP
	  engine when it loads.

	  A better fix would be make RTP dynamic payload types actually
	  dynamic. However, at this stage of Asterisk 14 development, this is a
	  risky move that would be imprudent.

	  Change-Id: I5774e09408f9a203db189529eabdc0d3f4c1e612
	  (cherry picked from commit d50895c7b04036aeaad58990089399e46db4c817)

2016-08-01 11:08 +0000 [102d28c11a]  Joshua Colp <jcolp@digium.com>

	* sorcery: Use more compatible regex for local expressions.

	  This changes the use of an empty regex for both res_sorcery_config
	  and res_sorcery_memory to "." instead. This is a more compatible
	  regular expression which also works on FreeBSD.

	  ASTERISK-26206 #close

	  Change-Id: Ia9166dd176f1597555ba22b6931180d0626c1388

2016-08-02 03:08 +0000 [b78d10a2df]  Alexander Traud <pabstraud@compuserve.com>

	* res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports.

	  ASTERISK-26256 #close

	  Change-Id: I3fd68df561f81fdb8c6c497d465b50c12422f058

2016-08-01 16:13 +0000 [1f95c011c7]  gtjoseph <gjoseph@digium.com>

	* menuselect:  Add an opaque "member_data" string to the acceptable xml

	  Change-Id: Id5ac43b95c8d7395f3be37f983632169db3d1afe

2016-07-27 09:56 +0000 [df42f64d62]  David M. Lee <dlee@respoke.io>

	* Replace strdupa with more portable ast_strdupa

	  The strdupa function is a GNU extension, and not widely portable. We
	  have an ast_strdupa function used within Asterisk which is preferred.
	  I pulled the definition up from menuselect.c into the menuselect.h
	  header file so it can be shared across menuselect.

	  Change-Id: I9593c97f78386b47dc1e83201e80cb2f62b36c2e

2016-07-24 18:27 +0000 [56a07fbab9]  gtjoseph <gjoseph@digium.com>

	* menuselect:  Various menuselect enhancements

	  * Add 'external' as a support level.
	  * Add ability for module directories to add entries to the menu
	    by adding members to the <module_prefix>/<module_prefix>.xml file.
	  * Expand the description field to 3 lines in the ncurses implementation.
	  * Allow the description field to wrap in the newt implementation.
	  * Add description field to the gtk implementation.

	  Change-Id: I7f9600a1984a42ce0696db574c1051bc9ad7c808
	  (cherry picked from commit 90f445729d5d86050d9d379485ff0a99f4a006c1)

2016-07-29 04:48 +0000 [7f9369c1b6]  Joshua Colp <jcolp@digium.com>

	* astconfigparser: Handle case where line is simply a comment.

	  Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5

2016-07-28 14:10 +0000 [57e9c66819]  Corey Farrell <git@cfware.com>

	* pbx.c: Fix handling of '-' in extension name and callerid

	  This adds a two strings to ast_exten.  name to go with exten and
	  cidmatch_display to go with cidmatch.  The new fields contain input used
	  to add the extension in the first place.  The existing fields now
	  contain stripped input that excludes insignificant spaces and dashes.
	  These stripped fields should always be used for comparisons.  The
	  unstripped fields should normally be used for display, but displaying
	  stripped values will not cause runtime errors.

	  Note the actual string is only stored twice if it contains dashes.  If
	  no dashes are found then both 'char *' fields point to the same memory.
	  So this change has a minimum effect on memory usage.

	  The existing functions ast_get_extension_name and
	  ast_get_extension_cidmatch return unstripped values as they did before
	  this change.  Other similar bugs likely still exist where unstripped
	  extensions are saved outside pbx.c then passed back in.

	  ASTERISK-26233 #close

	  Change-Id: I6cd61ce57acc1570ca6cc14960c4c3b0a9eb837f

2016-07-27 17:17 +0000 [873fc0fda5]  Richard Mudgett <rmudgett@digium.com>

	* pbx.c: Allow dangerous functions when adding a hint to dialplan.

	  We can allow dangerous functions when adding a hint since altering
	  dialplan is itself a privileged activity.  Otherwise, we could never
	  execute dangerous functions.

	  ASTERISK-25996 #close
	  Reported by: Andrew Nagy

	  Change-Id: I4929ff100ad1200a0198262d069a34f2296e77ba

2016-07-21 10:36 +0000 [f00525a6f6]  Alexei Gradinari <alex2grad@gmail.com>

	* pjproject: fixed a few bugs

	  This patch fixes the issue in pjsip_tx_data_dec_ref()
	  when tx_data_destroy can be called more than once,
	  and checks if invalid value (e.g. NULL) is passed to.

	  This patch updates array limit checks and docs
	  in pjsip_evsub_register_pkg() and pjsip_endpt_add_capability().

	  Change-Id: I4c7a132b9664afaecbd6bf5ea4c951e43e273e40

2016-07-17 18:28 +0000 [972cee2e4c]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Update for pjproject 2.5.5

	  Add more --disable-* switches to Makefile.rules including
	  --disable-opus which was causing bundled pjproject to fail with
	  "undefined reference" errors in libasteriskpj.

	  Changed PJ_ENABLE_EXTRA_CHECK to 1.

	  Removed 2 obsolete patches and added a new one.
	  The new one was merged by Teluu on 6/27/2016.

	  ASTERISK-26148 #close

	  Change-Id: Ib8af6c6a9d31f7238ce65b336134c2efdc855063

2016-07-27 10:33 +0000 [8902a51d59]  David M. Lee <dlee@respoke.io>

	* Portably sscanf tv_usec

	  In a timeval, tv_usec is defined as a suseconds_t, which could be
	  different underlying types on different platforms. Instead of trying to
	  scanf directly into the timeval, scanf into a long int, then copy that
	  into the timeval.

	  Change-Id: I29f22d049d3f7746b6c0cc23fbf4293bdaa5eb95

2016-07-27 12:36 +0000 [852e763571]  Kevin Harwell <kharwell@digium.com>

	* rtp_engine: Failed assertion and wrong name given for codec

	  Fixed an assert check that would trigger when the passed in value was negative.
	  The negative value was being cast to an unsigned value. This resulted in the
	  check failing.

	  Also fixed another problem when loading formats in the engine. When setting the
	  mime type the format's name was being passed in instead of the codec's name.

	  Change-Id: I1a201cd419ba4d8e9a40d337e36b6fbe1737192c

2016-07-21 22:44 +0000 [e8c34680ca]  Richard Mudgett <rmudgett@digium.com>

	* dsp.c: Add fax and DTMF detection unit tests.

	  * Add fax amplitude and frequency sweep tests.
	  * Add DTMF amplitude and twist unit tests.

	  Change-Id: I8d77c9a1eec89e440d715f998c928687e870c3f7

2016-07-21 11:56 +0000 [c1f240b818]  Richard Mudgett <rmudgett@digium.com>

	* dsp.c: Added descriptive comments to Goertzel calculations.

	  * Added doxygen to describe some struct members and what is going on in
	  the code.

	  Change-Id: I2ec706a33b52aee42b16dcc356c2bd916a45190d

2016-07-13 13:48 +0000 [003a52fd62]  Richard Mudgett <rmudgett@digium.com>

	* dsp.c: Fix incorrect format reference typo.

	  Change-Id: Ia131da3ec29acf385cb43a586a29ecc975eb3896

2016-07-25 21:18 +0000 [4c0a0cbe02]  Richard Mudgett <rmudgett@digium.com>

	* dsp.c: Correct DTMF twist dsp.conf documentation.

	  Change-Id: Idf97e3a72f1edc5fca58f2fa7b20785922be0cae

2016-07-22 04:43 +0000 [87433c2566]  Joshua Colp <jcolp@digium.com>

	* astconfigparser.py: Update with realtime fixes.

	  When configuring SIP URIs in the pjsip.conf file it is
	  necessary to escape the semicolon so the parser does not
	  treat it as a comment. This change allows this to work in
	  the astconfigparser implementation.

	  A secondary bug where some data was lost if a configuration
	  option included a "=" in its value was also fixed.

	  A bug where sections would be considered equal despite
	  being different has also been fixed.

	  Change-Id: If229f656ef22050b50e7b34e90c4bffe796431f8

2016-07-28 14:32 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.11.0-rc1 Released.

2016-07-28 09:29 +0000 [3bfaf6b172]  Mark Michelson <mmichelson@digium.com>

	* Release summaries: Add summaries for 13.11.0-rc1

2016-07-28 09:27 +0000 [ca145e1807]  Mark Michelson <mmichelson@digium.com>

	* .version: Update for 13.11.0-rc1

2016-07-28 09:27 +0000 [918ebf79ff]  Mark Michelson <mmichelson@digium.com>

	* .lastclean: Update for 13.11.0-rc1

2016-07-28 09:27 +0000 [d7afc1cf9d]  Mark Michelson <mmichelson@digium.com>

	* realtime: Add database scripts for 13.11.0-rc1

2016-07-21 22:28 +0000 [159e437e5a]  Richard Mudgett <rmudgett@digium.com>

	* dsp.c: Fix erroneous fax tone detection.

	  The Goertzel calculations get less accurate the lower the signal level
	  being worked with becomes because there is less resolution remaining.
	  If it is too low we can erroneously detect a tone where none really
	  exists.  The searched for fax frequencies not only need to be so much
	  stronger than the background noise they must also be a minimum strength.

	  * Add needed minimum threshold test to tone_detect().

	  * Set TONE_THRESHOLD to allow low volume frequency spread detection.

	  ASTERISK-26237 #close
	  Reported by: Richard Mudgett

	  Change-Id: I84dbba7f7628fa13720add6a88eae3b129e066fc

2016-07-22 14:44 +0000 [eda95236d1]  Mark Michelson <mmichelson@digium.com>

	* Fix sqlalchemy error regarding identifier length.

	  sqlalchemy was complaining:

	  sqlalchemy.exc.IdentifierError: Identifier
	  'ps_contacts_qualifyfreq_exptime' exceeds maximum length of 30
	  characters

	  This fixes the problem by changing the index name to be
	  "ps_contacts_qualifyfreq_exp" instead.

	  ASTERISK-26227 #close
	  Reported by Mark Michelson

	  Change-Id: I0ed784f87504be2a59ee8d3242ef6f625d5ed1a9

2016-07-22 05:46 +0000 [66c9dfb272]  Alexander Traud <pabstraud@compuserve.com>

	* chan_sip: Enable Session-Timers for SIP over TCP (and TLS).

	  Asterisk defaults to timers=accept/refresher=uas. In that scenario, only in that
	  scenario, Sessions-Timers (RFC 4028) had no effect via TCP. This change enables
	  Session-Timers for SIP over TCP (and for SIP over TLS).

	  However with longer international calls via TCP, the SIP channel might break,
	  because all hops on the Internet route must stay online (have not a single power
	  outage, for example). Therefore with Session-Timers enabled (which are enabled
	  at default), you might see dropped calls. Consequently even with this change,
	  you might be better-off going for session-timers=refuse in your sip.conf.

	  ASTERISK-19968 #close

	  Change-Id: I1cd33453c77c56c8e1394cd60a6f17bb61c1d957

2016-07-15 16:16 +0000 [33716106e0]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Whitespace and comment cleanup.

	  Change-Id: I11139a4a95df34e223ba622aa6227e33ab8f6c38

2016-07-21 09:05 +0000 [52ab0bf258]  gtjoseph <gjoseph@digium.com>

	* chan_sip: Prevent deadlock when issuing "sip show channels"

	  sip_show_channels locks the dialogs container first then locks each
	  sip_pvt so it can spit out the details.  The rest of sip dialog
	  processing locks the sip_pvt first then locks the dialogs container
	  if it needs to.  Both lock in the order they need but deadlocks can
	  result.  To fix, sip_show_channels and sip_show_channelstats have
	  been converted to use an iterator rather than ao2_callback.  This way
	  the container is locked only while getting the next entry and is
	  unlocked when the callback is called.

	  ASTERISK-23013 #close

	  Change-Id: Id9980419909e811f89484950ed46ef117b9eb990

2016-07-19 15:22 +0000 [5997ec7c9e]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice.

	  This patch removed call of pjsip_tx_data_dec_ref in send_notify
	  if send_request failed.
	  The pjsip_dlg_send_request deletes the message on error by itself.

	  It seems this patch fixes next issues:
	  ASTERISK-26199
	  ASTERISK-26166
	  ASTERISK-26174

	  Change-Id: I8b05917c93d993f95d604c042ace5f1a5500f59a

2016-07-18 22:46 +0000 [7fdf7c3d4c]  Corey Farrell <git@cfware.com>

	* Add conditional support for noreturn functions.

	  This adds support for tagging functions with the noreturn attribute.
	  If DO_CRASH is enabled then ast_do_crash never returns.  If AST_DEVMODE
	  and DO_CRASH are enabled then failed assertions never return.  This can
	  resolve a large number of false positives with static analyzers.

	  ASTERISK-26220 #close

	  Change-Id: Icfb61e5fe54574eced4c3e88b317244f467ec753

2016-07-19 13:18 +0000 [dcb8aa8c1c]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi.c: Fix deadlock potential in fax redirection.

	  The dahdi_handle_dtmf() and my_handle_dtmf() have the potential to
	  deadlock if an incoming fax happens during the Playback or similar
	  application.

	  * Fixed the potential deadlock by not calling ast_async_goto() with the
	  channel lock held.

	  ASTERISK-26216 #close
	  Reported by: Richard Mudgett

	  Change-Id: I9144b84ade5f96690996624ec8a2d40c56af40aa

2016-07-13 18:49 +0000 [fa91cf3eec]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix deadlock potential in fax redirection.

	  The sip_read() has the potential to deadlock if an incoming fax happens
	  during the Playback or similar application.

	  * Fixed the potential deadlock by not calling ast_async_goto() with the
	  channel lock held.

	  * Made always eat the fax detection frame whether there is a fax extension
	  or not.

	  ASTERISK-26216
	  Reported by: Richard Mudgett

	  Change-Id: I6d3f5cccd4b77c3aa6ffc1a54c0f6bde61c9278e

2016-07-13 18:48 +0000 [2e1bdc3775]  Richard Mudgett <rmudgett@digium.com>

	* chan_pjsip.c: Fix deadlock potential in fax redirection.

	  The chan_pjsip_cng_tone_detected() has the potential to deadlock if an
	  incoming fax happens during the Playback or similar application.

	  * Fixed the potential deadlock by not calling ast_async_goto() with the
	  channel lock held.

	  * Made always eat the fax detection frame whether there is a fax extension
	  or not.

	  ASTERISK-26216
	  Reported by: Richard Mudgett

	  Change-Id: I32aecbb4818af646dc5a619f0dc040e9b1f222e5

2016-07-12 17:33 +0000 [628e8c91d5]  Richard Mudgett <rmudgett@digium.com>

	* res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook.

	  The fax_detect_framehook() has the potential to deadlock if an incoming
	  fax happens during the Playback or similar application.

	  * Fixed the potential deadlock by not calling ast_async_goto() with the
	  channel lock held.

	  * Made always eat the fax detection frame whether there is a fax extension
	  or not.

	  * Made only detach the framehook if we detected a fax and not on other
	  possible frames.

	  ASTERISK-26216
	  Reported by: Richard Mudgett

	  Change-Id: I99da35c26d1cd802626ffb4c1b4eb5b015581b6d

2016-07-12 17:24 +0000 [676aeede36]  Richard Mudgett <rmudgett@digium.com>

	* res_fax: Fix FAXOPT(faxdetect) timeout option.

	  The fax detection timeout option did not work because basically the wrong
	  variable was checked in fax_detect_framehook().  As a result, the timer
	  would timeout immediately and disable fax detection.

	  * Fixed ignoring negative timeout values.  We'd complain and then go right
	  on using the negative value.

	  * Fixed destroy_faxdetect() in the off-nominal case of an incomplete
	  object creation.

	  * Added more range checking to FAXOPT(gateway) timeout parameter.

	  ASTERISK-26214 #close
	  Reported by: Richard Mudgett

	  Change-Id: Idc5e698dfe33572de9840bc68cd9fc043cbad976

2016-07-18 16:16 +0000 [652130feb2]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi: Add faxdetect_timeout option.

	  The new option allows the channel driver's faxdetect option to timeout on
	  a call after the specified number of seconds into a call.  The new feature
	  is disabled if the timeout is set to zero.  The option is disabled by
	  default.

	  * Don't clear dsp_features after passing them to the dsp code in
	  my_pri_ss7_open_media().  We should still remember them especially for the
	  new faxdetect_timeout option.

	  ASTERISK-26214
	  Reported by: Richard Mudgett

	  Change-Id: Ieffd3fe788788d56282844774365546dce8ac810

2016-07-15 20:44 +0000 [851b1c3a17]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Add fax_detect_timeout endpoint option.

	  The new endpoint option allows the PJSIP channel driver's fax_detect
	  endpoint option to timeout on a call after the specified number of
	  seconds into a call.  The new feature is disabled if the timeout is set
	  to zero.  The option is disabled by default.

	  ASTERISK-26214
	  Reported by: Richard Mudgett

	  Change-Id: Id5a87375fb2c4f9dc1d4b44c78ec8735ba65453d

2016-07-19 04:48 +0000 [021d4892cd]  Alexander Traud <pabstraud@compuserve.com>

	* Makefile: Retain XML Declaration and DTD in docs.

	  Since Asterisk 12, the documentation got an XML Stylesheet. Because of a typo,
	  the XML Declaration and DTD were overwritten by this.

	  ASTERISK-26212 #close

	  Change-Id: If5ee4625068042e98ab3fcb22a25e2f15d0c68bd

2016-07-18 18:39 +0000 [c8e41d14a1]  Corey Farrell <git@cfware.com>

	* Unit tests: Use AST_TEST_DEFINE in conditional code only.

	  If AST_TEST_DEFINE is not conditional to TEST_FRAMEWORK it produces dead
	  code.  This places all existing unit tests into a conditional block if
	  they weren't already.

	  ASTERISK-26211 #close

	  Change-Id: I8ef83ee11cbc991b07b7a37ecb41433e8c734686

2016-07-18 05:13 +0000 [e404f51b42]  Alexander Traud <pabstraud@compuserve.com>

	* res_rtp_asterisk: Count a roll-over of the sequence number even on lost packets.

	  With this change, the initial RTP sequence number is randomly chosen not between
	  0 and 65535 (0xffff) but 0 and 32767 (0x7fff). This assures, the roll-over
	  counter (ROC) synchronization is not lost for sRTP, when the very first RTP
	  packets get lost; see http://srtp.sourceforge.net/faq.html#Q6

	  ASTERISK-26207 #close

	  Change-Id: I9a527e3aa3ce8f3becc5131d7ba32b57b5845464

2016-07-18 04:14 +0000 [5f24874ebb]  Alexander Traud <pabstraud@compuserve.com>

	* Makefile: Suppress echoing of target 'config' again.

	  ASTERISK-26038 #close

	  Change-Id: I5746cf639f3fdc6332e8a97cf01f979e30bf403f

2016-07-14 03:25 +0000 [76d4983c15]  Corey Farrell <git@cfware.com>

	* features.c: Remove unneeded adsi.h include.

	  adsi.h is no longer used by features.c since parking was moved to a
	  module.

	  Change-Id: I2248b8a455225a17cb6ddaafd6c20c511a1eaf59

2016-07-14 18:06 +0000 [cb58f853e1]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip_mwi: remove unneeded check on endpoint's contacts.

	  The function create_mwi_subscriptions_for_endpoint checks
	  if there is active contacts by retrieving aors and contacts.

	  This function is used to create all unsolicited mwi subscriptions
	  on startup and is used when contact added.

	  In both cases it's not necessary to check if there are contacts.
	  The contacts are needed when asterisk sends mwi.

	  ASTERISK-26200 #close

	  Change-Id: I98e43bdc97f3c0829951cd9bf5f3c6348c6ac1fa

2016-06-30 15:58 +0000 [28501051b4]  Mark Michelson <mmichelson@digium.com>

	* Update support for SILK format.

	  This commit adds scaffolding in order to support the SILK audio format
	  on calls. Roughly, this is what is added:

	  * Cached silk formats. One for each possible sample rate.
	  * ast_codec structures for each possible sample rate.
	  * RTP payload mappings for "SILK".

	  In addition, this change overhauls the res_format_attr_silk file in the
	  following ways:

	  * The "samplerate" attribute is scrapped. That's native to the format.
	  * There are far more checks to ensure that attributes have been
	    allocated before attempting to reference them.
	  * We do not SDP fmtp lines for attributes set to 0.

	  These changes make way to be able to install a codec_silk module and
	  have it actually work. It also should allow for passthrough silk calls
	  in Asterisk.

	  Change-Id: Ieeb39c95a9fecc9246bcfd3c45a6c9b51c59380e

2016-07-14 07:45 +0000 [43b5f8d57b]  Richard Miller (license 5685)

	* app_queue: Only remove queue member from pending when state changes.

	  It is possible for a not in use state change to occur multiple
	  times causing a queue member to be removed from the pending call
	  container prematurely.

	  The first not in use state change will remove the queue member
	  from the container. At this moment the member may be called and
	  placed in the pending container. After this another not in use
	  state change can be received which will remove it from the
	  container. Despite being called at this point the code will
	  incorrectly see that there are no pending calls to it.

	  This change only removes it from the pending container if the
	  state has actually changed.

	  ASTERISK-26133 #close
	  patches:
	    app_queue.diff submitted by Richard Miller (license 5685)

	  Change-Id: Ie5a7f17a44f98e9159e9b85009ce3f8393aa78c0

2016-07-14 02:40 +0000 [a17b071e36]  Corey Farrell <git@cfware.com>

	* pbx: Fix leak of timezone for time based includes.

	  Create include_free to run ast_destroy_timing and ast_free, use that in
	  all places that freed an ast_include structure.  This fixes a couple of
	  paths that previously did not run ast_destroy_timing.

	  ASTERISK-26196 #close

	  Change-Id: I1671bd111bef0dc113e8bf8f77f89fcfc395d838

2016-07-13 17:45 +0000 [8cef8f35e7]  Kevin Harwell <kharwell@digium.com>

	* translate: explicit format destination not properly set

	  If the destination format's name differed from the codec name then the
	  translator's explict_dst field would be improperly set. In some circumstances
	  it would end up setting it to a newly created format that has the same name
	  as the codec when it actually needed to be the given destination codec.

	  This could cause the translation path to use the wrong format. For instance,
	  if an endpoint had specified 'myulaw' as a format the translator could end up
	  using a 'ulaw' format (with whatever/default settings) instead. If the format
	  attribute settings differed between the two then there may unexpected results
	  during processing.

	  This patch removes the name check when building the translation path. This
	  should make it always set the translator's explicit_dst to the given destination
	  format as long as the sample rate and types match.

	  Change-Id: Iaf8a03831d68e657d89569d54b505074efbefab5

2016-07-08 11:46 +0000 [afbd10b0c5]  Richard Mudgett <rmudgett@digium.com>

	* stasis_endpoint.c: Fix contactstatus_to_json().

	  The roundtrip_usec json member is optional.  If it isn't present then
	  don't put it into the converted json structure where ast_json_pack()
	  will choke on it.

	  Change-Id: I39bb2f86154ef54591270c58bfda8635070f9ea0

2016-07-13 13:45 +0000 [2be13d62fd]  Corey Farrell <git@cfware.com>

	* chan_sip: Fix reference leak in mwi_event_cb

	  Cleanup the peer reference when stasis_subscription_final_message is
	  true.  Also free peer_name even if peer exists, after reload a new
	  peer_name will be allocated.

	  ASTERISK-26193 #close

	  Change-Id: If7ecd52facdc5c227f701c760841e3f6ca53cc69

2016-06-22 07:13 +0000 [332beb27d8]  Eugene Voityuk <eugene@thirdlane.com>,Alexander Traud <pabstraud@compuserve.com>

	* res_rtp_asterisk: Enable Forward Secrecy (PFS) for DTLS.

	  Since July 2014, TLS based protocols (SIP over TLS, Secure WebSockets, HTTPS)
	  support PFS thanks to ASTERISK-23905. In July 2015, the same feature was added
	  for DTLS. The source code from main/tcptls.c should have been re-used to ease
	  security audits. Therefore, this change rolls back the change from July 2015 and
	  re-uses the code from July 2014. This has the additional benefits to work under
	  CentOS 7 and enabling not just ECDHE but DHE based cipher suites as well.

	  ASTERISK-25659 #close
	  Reported by: StefanEng86, urbaniak, pay123
	  Tested by: sarumjanuch, traud
	  patches:
	  res_rtp_asterisk.patch submitted by sarumjanuch
	  dtls_centos_step_1.patch submitted by traud
	  dtls_centos_step_2.patch submitted by traud

	  Change-Id: I537cadf4421f092a613146b230f2c0ee1be28d5c

2016-07-13 11:30 +0000 [672a64bda3]  Corey Farrell <git@cfware.com>

	* threadpool: Fix leak in ast_threadpool_serializer_group error path.

	  ast_threadpool_serializer_group leaks a reference to ser when listener
	  is allocated but tps is not.  Although listener takes the reference to
	  ser cleanup functions are not run without tps.

	  ASTERISK-26191 #close

	  Change-Id: Ie3ccf69a3f1e676c2ef62a77067c0cb57dc9a585

2016-07-11 10:22 +0000 [fea201f7e6]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_options.c: Fix container operation.

	  aor_observer_deleted() needs to operate on all contacts found for the
	  deleted AOR instead of only the first one found.  This is really only a
	  problem if there is more than one contact for the AOR.

	  Change-Id: Id24ac0d5e8c931330231fb45dd2a331a84339dc1

2016-07-11 10:21 +0000 [02877b4b4f]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_configuration.c: Misc cleanups.

	  * Fix some whitespace in various routines.

	  * Rename i to iter in persistent_endpoint_update_state().

	  * Fix off-nominal copy/paste message wording in
	  persistent_endpoint_contact_deleted_observer()

	  Change-Id: Id8e34f5d09e7eebac3af22501c44c1110a3e29d8

2016-07-13 08:57 +0000 [148cd1b319]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Avoid obsolete warning with pthread.m4 on autoconf.

	  Updated the macro-set autoconf/ax_pthread.m4 to its latest upstream version.

	  ASTERISK-26046 #close

	  Change-Id: I11abc11d17acd2b6a8a5a5be8ae8e0949dab9cc7

2016-07-11 10:25 +0000 [97b4c7a5b4]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Fix statsd regression.

	  The ASTERISK-25904 change-id I8fad8aae9305481469c38d2146e1ba3a56d3108f
	  patch introduced several regressions when the newly created "Updated"
	  state goes out for each endpoint registration refresh.

	  1) It restarted any OPTIONS RTT ping cycle.

	  2) It would interfere with a currently active ping and throw off that
	  ping's resulting RTT calculation.

	  3) It cleared the RTT time each time the endpoint was refreshed.

	  4) The cleared RTT time was sent out as a statsd update each time.

	  5) It created two AMI events for each update.

	  * Revert the original patch and reimplement it.  Now the current contact
	  status state is re-sent instead of the state being momentarily toggled
	  every time the endpoint refreshes its registration.  The statsd events are
	  not created for the re-sent refresh because they are sent after every
	  OPTIONS ping.

	  ASTERISK-26160 #close
	  Reported by: Matt Jordan

	  Change-Id: Ie072be790fbb2a8f5c1c874266e4143fa31f66d1

2016-07-12 03:50 +0000 [3be6fa1e4b]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Allow own CFLAGS on ./configure.

	  Before this change, make failed with the error
	  Unknown value '' found in build_tools/menuselect-deps for NATIVE_ARCH
	  when CFLAGS were supplied to the configure script. This was introduced with
	  <https://reviewboard.asterisk.org/r/1852/> which disabled BUILD_NATIVE when
	  CFLAGS were supplied. Those who need different -march= values, please, go for
	  ./configure
	  make menuselect.makeopts or make menuselect
	  ./menuselect/menuselect --disable BUILD_NATIVE

	  ASTERISK-25289 #close

	  Change-Id: Ic6365d5a97bb9b3556858f06432a8d1cfa83eebc

2016-07-11 13:42 +0000 [5ee205d8bb]  Richard Mudgett <rmudgett@digium.com>

	* ast_expr2: Fix off-nominal memory leak.

	  Thanks to ibercom for pointing out a memory leak that was missed
	  in the earlier patch for the issue.

	  ASTERISK-26119
	  Reported by: Alexei Gradinari

	  Change-Id: I9a151f5c4725d97fb82a9e938bc73dc659532b71

2016-07-11 10:17 +0000 [f5e9872016]  Alexander Traud <pabstraud@compuserve.com>

	* install_prereq: Checkout of libSRTP 1.5.x.

	  Since 5th November 2014, the master branch of libSRTP changed the prefix of
	  several member names and is not compatible with the source code in Asterisk
	  anymore. Therefore instead, this change checks out the latest version of the
	  libSRTP 1.5.x branch. Furthermore now, libSRTP is compiled with OpenSSL as
	  backend. This makes AES-GCM and AES-IN possible.

	  ASTERISK-22131 #close

	  Change-Id: I2e396cdc01da0ff610686e398ed210ca7408f7d6

2016-07-10 19:08 +0000 [17efed6cf7]  Joshua Colp <jcolp@digium.com>

	* func_odbc: Fix connection deadlock.

	  The func_odbc module was modified to ensure that the
	  previous behavior of using a single database connection
	  was maintained. This was done by getting a single database
	  connection and holding on to it. With the new multiple
	  connection support in res_odbc this will actually starve
	  every other thread from getting access to the database as
	  it also maintains the previous behavior of having only
	  a single database connection.

	  This change disables the func_odbc specific behavior if
	  the res_odbc module is running with only a single database
	  connection active. The connection is only kept for the
	  duration of the request.

	  ASTERISK-26177 #close

	  Change-Id: I9bdbd8a300fb3233877735ad3fd07bce38115b7f

2016-07-09 13:32 +0000 [06ba533bc7]  Corey Farrell <git@cfware.com>

	* chan_sip: Fix reference leaks in error paths.

	  * get_sip_pvt_from_replaces leaks sip_pvt_ptr on any error.
	  * build_peer leaks peer on failure to allocate the endpoint.

	  This patch fixes get_sip_pvt by using an RAII_VAR, build_peer is fixed
	  with an unref in the appropriate place.

	  ASTERISK-26184 #close

	  Change-Id: I728b424648ad041409f7d90880f4c28b3ce2ca12

2016-07-07 12:41 +0000 [9d4e664f62]  Corey Farrell <git@cfware.com>

	* REF_DEBUG: Prevent logging of container node objects.

	  Using AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE can result in an unref being
	  recorded to the refs log for the node being replaced.  This prevents
	  logging of those unrefs since they would produce errors in
	  refcounter.py.

	  ASTERISK-26181 #close

	  Change-Id: Ie4fded84e8a1a58b3a59ce59dfd7eb0da3ddc5d4

2016-07-07 10:55 +0000 [e26bd15e7a]  Scott Griepentrog <scott@griepentrog.com>

	* PJSIP: provide valid tcp nodelay option for reuse

	  When using TCP transport with chan_pjsip, the TCP_NODELAY
	  option value was allocated on the stack, then passed as a
	  pointer to the tcp transport configuration structure, and
	  later re-used on subsequently created sockets when it was
	  no longer valid.  This patch changes the allocation to be
	  a static.

	  ASTERISK-26180 #close
	  Reported by: Scott Griepentrog

	  Change-Id: I3251164c7f710dbdab031282f00e30a9770626a0

2016-07-07 10:38 +0000 [77b0145a25]  Joshua Colp <jcolp@digium.com>

	* chan_sip/res_pjsip_t38: Handle a request to negotiate T.38 after it is enabled.

	  Some T.38 implementations may send another re-invite after the initial
	  one which adds additional negotiation details (such as the max bitrate).
	  Currently this will fail when passthrough is being done in chan_sip as we
	  do nothing if T.38 is already active.

	  Other handlers of T.38 inside of Asterisk (such as res_fax) handle this
	  scenario so this change adds support for it to chan_sip and res_pjsip_t38.
	  If a request to negotiate is received while T.38 is already enabled a
	  new re-INVITE is sent and negotiation is done again.

	  ASTERISK-26179 #close

	  Change-Id: I0298494d3da6df3219bbfa4be9aa04015043145c

2016-07-04 16:38 +0000 [b4a9fa2c9e]  Alexei Gradinari <alex2grad@gmail.com>

	* res_sorcery_realtime: fix bug when successful UPDATE is treated as failed

	  If the SQL UPDATE statement changes nothing then SQLRowCount returns 0.
	  This value should be treated as success.
	  But the function sorcery_realtime_update treats it as failed.

	  This bug was found using stress tests on PJSIP.
	  If there are 2 consecutive SIP REGISTER requests with the same contact data
	  during 1 second then res_pjsip_registrar adds contact location on 1st request
	  and tries to update contact location on 2nd.
	  The update fails and res_pjsip_registrar even removes correct contact location.

	  The test "object_update_uncreated" was removed from test_sorcery_realtime.c
	  because it's now a valid situation.

	  This patch also adds missing debug of extra SQL parameter.

	  ASTERISK-26172 #close

	  Change-Id: I05a7f3051455336c9dda29efc229decf86071303

2016-06-24 19:55 +0000 [1dfd3fc995]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_session: Check for presence of an active negotiator

	  It is possible in a hypothetical situation for a session refresh to be
	  invoked on a PJSIP when the negotiatior on the INVITE session has not
	  yet been established. While this shouldn't occur with existing uses of
	  ast_sip_session_refresh, the crashes that occur due to improperly
	  calling PJSIP functions that expect a non-NULL negotiatior are
	  avoidable. PJSIP will create the negotiator in pjsip_inv_reinvite; this
	  means that simply checking for the presence of the negotiator before
	  passing it to other PJSIP functions that use it is allowable. As such,
	  this patch adds checks for the presence of the negotiator before calling
	  PJSIP functions that assume it is non-NULL.

	  Change-Id: I1028323e7e01b0a531865e5412a71b6f6ec4276d

2015-10-19 18:55 +0000 [9dd0aeeb44]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_pubsub: Add additional debug statements

	  When something very sad and wrong occurs, it's challenging sometimes to
	  figure out why. This patch adds some additional debug statements on
	  off-nominal paths to try and make debugging easier.

	  Change-Id: I7bffb73cc733b6f80193a23340881db4a102b640

2015-10-19 18:55 +0000 [1ec4f8dd00]  Matt Jordan <mjordan@digium.com>

	* res/res_corosync: Raise a Stasis message on node join/leave events

	  When res_corosync detects that a node leaves or joins, it currently is
	  informed of this via Corosync callbacks. However, there are a few
	  limitations with the information presented:
	  (1) While we have information that Corosync is aware of - such as the
	      Corosync nodeid - that information is really only useful inside of
	      Corosync or res_corosync. There's no way to translate a Corosync
	      nodeid to some other internally useful unique identifier for the
	      Asterisk instance that just joined or left the cluster.
	  (2) While res_corosync is notified of the instance joining or leaving
	      the cluster, it has no mechanism to inform the Asterisk core or
	      other modules of this event. This limits the usefulness of res_corosync
	      as a heartbeat mechanism for other modules.

	  This patch addresses both issues.

	  First, it adds the notion of a cluster discovery message both within the
	  Stasis message bus, as well as the binary event messages that
	  res_corosync uses to transmit data back and forth within the cluster.
	  When Asterisk joins the cluster, it sends a discovery message to the other
	  nodes in the cluster, which correlates the Corosync nodeid along with
	  the Asterisk EID. res_corosync now maintains a hash of Corosync nodeids
	  to Asterisk EIDs, such that it can map changes in cluster state with the
	  Asterisk instance that has that nodeid. Likewise, when an Asterisk
	  instance receives a discovery message from a node in the cluster, it now
	  sends its own discovery message back to the originating node with the
	  local Asterisk EID. This lets Asterisk instances within the cluster
	  build a complete picture of the other Asterisk instances within the
	  cluster.

	  Second, it publishes the discovery messages onto the Stasis message bus.
	  Said messages are published whenever a node joins or leaves the cluster.
	  Interested modules can subscribe for the ast_cluster_discovery_type()
	  message under the ast_system_topic() and be notified when changes in
	  cluster state occur.

	  Change-Id: I9015f418d6ae7f47e4994e04e18948df4d49b465

2016-07-04 13:54 +0000 [2c16a81dd5]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: Added "subscribe_context" to endpoint

	  If specified, incoming SUBSCRIBE requests will be searched for the matching
	  extension in the indicated context. If no "subscribe_context" is specified,
	  then the "context" setting is used.

	  ASTERISK-25471 #close

	  Change-Id: I3fb7a15f5bc154079bd348c08b7ad1cdd2d5e514

2016-07-04 05:58 +0000 [a1bd57884d]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Avoid obsolete warning with libcurl.m4 on autoconf.

	  Updated the macro-set autoconf/libcurl.m4 to its latest upstream version. This
	  avoids a warning about an obsolete macro on AC_HELP_STRING, because Asterisk is
	  using AS_HELP_STRING everywhere else already.

	  ASTERISK-26046

	  Change-Id: I8299faf504ceaeee3e39930c59293809e116c631

2016-06-30 15:17 +0000 [640fbbbe28]  Richard Mudgett <rmudgett@digium.com>

	* features: Fix channel datastore access.

	  Found as a result of the testsuite tests/callparking test crashing.

	  Several calls to ast_get_chan_featuremap_config() and
	  ast_get_chan_features_xfer_config() did not lock the channel before
	  calling so the channel's datastore list was accessed without the lock's
	  protection.  Apparently another thread deleted a datastore on the
	  channel's list while the crashing thread was walking the list.  Crash at
	  0xdeaddead due to MALLOC_DEBUG's memory filler value as a result.

	  * Add missing channel locks to calls that were not already protected
	  as the doxygen for those calls indicates.

	  Change-Id: Id273b3d305cc616406c353cbc841b2b7655efaa1

2016-06-22 17:26 +0000 [359134c8d3]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Don't send extra BYE if SDP invalid.

	  When an answer SDP is invalid we were disconnecting the outgoing call and
	  sending two BYE requests.  The first BYE was sent by PJPROJECT because of
	  the invalid SDP answer.  The second BYE was sent by Asterisk because it
	  thought the canceled call was the result of the RFC5407 section 3.1.2 race
	  condition.

	  * Made not send the BYE on a canceled session if the SDP negotiation is
	  incomplete because PJPROJECT has already sent a BYE for the failed
	  negotiation.

	  ASTERISK-25772 #close
	  Reported by:  Dmitriy Serov

	  Change-Id: I44ad0bd0605e8eeb7035c890d6f97a1331f1a836

2016-06-27 17:19 +0000 [5fabcf2ca1]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: End call on initial invalid SDP negotiation.

	  When an incoming call defers SDP negotiation and then sends us an invalid
	  SDP in the ACK, we need to send a BYE to disconnect the call.  In this
	  case SDP negotiation has failed and we don't have valid media streams
	  negotiated.

	  ASTERISK-25772

	  Change-Id: Ia358516b0fc1e6c4c139b78246f10b9da7a2dfb8

2016-06-23 15:13 +0000 [38a4e983dc]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip.c: Register PJMEDIA error code decoder.

	  Registering the PJMEDIA error codes allows errors found when parsing an
	  incoming SDP to be easier to figure out.

	  "Missing SDP rtpmap for dynamic payload type (PJMEDIA_SDP_EMISSINGRTPMAP)"
	  is much easier to understand than "Unknown error 220030".

	  ASTERISK-25772

	  Change-Id: I44b2dcea656fedd7593171be9e845880a2c70ca0

2016-06-27 16:56 +0000 [1952434df5]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Remove unused parameter from handle_incoming().

	  Change-Id: Iedd182d189ec947c42edc2c66c4bda3c22060daa

2016-06-22 18:02 +0000 [28928ba5c4]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Add missing NULL checks when using pjsip_inv_end_session().

	  pjsip_inv_end_session() is documented as being able to return the
	  passed in tdata parameter set to NULL on success.

	  Change-Id: I09d53725c49b7183c41bfa1be3ff225f3a8d3047

2016-06-30 08:25 +0000 [43a78100c0]  gtjoseph <gjoseph@digium.com>

	* configure:  Fix HAVE_PJSIP_EVSUB_GRP_LOCK not set with external pjproject

	  There was a typo in configure.ac preventing HAVE_PJSIP_EVSUB_GRP_LOCK
	  from getting set when using an external pjproject.

	  ASTERISK-26099 #close
	  Reported-by: Ross Beer

	  Change-Id: I709af70428e125fb5ccd44b171d25dd29141f0ae

2016-06-29 15:31 +0000 [99eff80e76]  Matt Jordan <mjordan@digium.com>

	* hep.conf.sample: Default 'enabled' to 'no'

	  Following the principle of least surprise, we should not be sending
	  massive numbers of PJSIP and RTCP HEP packets out into the ether to some
	  only-slightly-random IP address. Having 'enabled' set to 'no' in the
	  sample configuration file should prevent this from happening for those
	  who run 'make samples'.

	  ASTERISK-26159 #close

	  Change-Id: I1753a64ca83a3442a6ebdc31061f8185c062d9b1

2016-06-29 15:09 +0000 [78960975f2]  Matt Jordan <mjordan@digium.com>

	* pjproject/patches/config_site: Increase the max number of ICE candidates

	  When negotiating ICE candidates with WebRTC capable endpoints, many
	  networks will result in a browser offering ICE candidates that exceeds
	  the default number of max candidates, 16. This patch bumps the max
	  candidates to 32, with the max checks at twice the number of candidates.
	  In practice, this has shown to be sufficient for browser/WebRTC
	  negotiation.

	  Change-Id: Ifd8da8b315f5ae14814d4ce20e10d2e6355020e5

2016-06-28 09:00 +0000 [d07c8a0504]  gtjoseph <gjoseph@digium.com>

	* codecs:  Fix ABI incompatibility created by adding format_name to ast_codec

	  Adding format_name even to the end of ast_codec caused issued with
	  binary codec modules because the pointer would be garbage in asterisk
	  when they registered.  So, the ast_codec structure was reverted and an
	  internal_ast_codec structure was created just for use in codec.c.  A new
	  internal-only API was also added (__ast_codec_register_with_format) so
	  that codec_builtin could register codecs with the format_name in a
	  separate parameter rather than in the ast_codec structure.

	  ASTERISK-26144 #close
	  Reported-by: Alexei Gradinari

	  Change-Id: I6df1b08f6a6ae089db23adfe1ebc8636330265ba

2016-06-28 08:22 +0000 [f3d236ca7f]  gtjoseph <gjoseph@digium.com>

	* BuildSystem:  Fix a few issues hightlighted by gcc 6.x

	  gcc 6.1.1 caught a few more issues.
	  Made sure the unit tests still pass for the func_env and stdtime
	  issues.

	  ASTERISK-26157 #close

	  Change-Id: I6664d8f34a45bc1481d2a854481c7878b0c1cf8e

2016-06-28 10:33 +0000 [9d5b0934d9]  Matt Jordan <mjordan@digium.com>

	* configs/basic-pbx/modules.conf: Remove 'bad' modules

	  This patch removes the following modules:
	   - pbx_functions: It never existed.
	   - res_pjsip_log_forwarder: It no longer exists.
	   - res_hep_pjsip: The base HEP module wasn't loaded, and most basic PBXs
	                    aren't going to be installing HOMER
	   - res_pjsip_phoneprov_provider: The basic res_phoneprov module isn't
	                    loaded, and we aren't configured to make use of the
	                    module

	  Change-Id: Id91f68cae7c9c8c3d370029fe1268cb51e4ff5a5

2016-06-22 11:19 +0000 [1dfc286418]  Joshua Colp <jcolp@digium.com>

	* siren: Add format attribute modules for Siren7 and Siren14.

	  This change removes hardcoded SDP parsing and generation for
	  Siren7 and Siren14 from chan_sip and moves it to format attribute
	  modules so it can also be used by chan_pjsip.

	  With this the fmtp lines for both are added with the bitrate
	  information.

	  ASTERISK-26021

	  Change-Id: Ibb004eda37a14c0a35ef0613f6237977fc800037

2016-06-23 04:33 +0000 [5f0a098243]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf.

	  Removed the obsolete macro AC_TYPE_SIGNAL because Asterisk does not use K&R C
	  but requires ANSI C anyway.

	  ASTERISK-26046

	  Change-Id: I914c014385e1862102d90fe7650621def78db02e

2016-06-02 17:26 +0000 [b3c787d1dd]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: improve realtime performance #2

	  The patch removes updating all Endpoints' status on startup.
	  Instead, only non-qualified aors with static contact
	  and non-qualified non-expired contacts are retrieved from the realtime to
	  update the endpoint status to ONLINE.
	  The endpoint name was added to the contact object to simply find the endpoint
	  that created this contact.

	  The status of endpoints with qualified aors will be updated by 'qualify'
	  functions.

	  ASTERISK-26061 #close

	  Change-Id: Id324c1776fa55d3741e0c5457ecac0304cb1a0df

2016-06-23 13:47 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.10.0-rc1 Released.

2016-06-23 08:42 +0000 [62349ac1b4]  Mark Michelson <mmichelson@digium.com>

	* Release summaries: Add summaries for 13.10.0-rc1

2016-06-23 08:38 +0000 [8da6ba4328]  Mark Michelson <mmichelson@digium.com>

	* .version: Update for 13.10.0-rc1

2016-06-23 08:38 +0000 [170b85e3ae]  Mark Michelson <mmichelson@digium.com>

	* .lastclean: Update for 13.10.0-rc1

2016-06-23 08:38 +0000 [4af7049b8f]  Mark Michelson <mmichelson@digium.com>

	* realtime: Add database scripts for 13.10.0-rc1

2016-06-22 15:04 +0000 [3d904659ec]  Corey Farrell <git@cfware.com>

	* res_fax: Fix reference leak in fax_v21_session_new.

	  fax_v21_session_new created a session details object but only released
	  the allocation reference during error conditions.  fax_session_new adds
	  it's own reference to details if needed so the caller is always
	  responsible for cleaning it's own reference.

	  ASTERISK-26141 #close

	  Change-Id: Ie7fc52a83b6596ce9ce2d5a2bd9f3e204f48fc88

2016-06-22 13:41 +0000 [48db4c2159]  gtjoseph <gjoseph@digium.com>

	* res_rtp_asterisk:  Fix a self-comparison identified by gcc 6

	  gcc 6 caught a previously unidentified self-comparison in
	  ice_candidate_cmp.  Fixed it and re-ordered the predicates for better
	  short-circuiting.

	  ASTERISK-26140 #close

	  Change-Id: I3da713c568e24064430257b3502fbdafd35af7a7

2016-06-22 10:37 +0000 [bc69b03316]  gtjoseph <gjoseph@digium.com>

	* chan_unistim:  Fix memcpy in get_to_address

	  A code block only enabled when HAVE_PKTINFO is not defined (FreeBSD)
	  was using a pointer to a pointer as the destination of a memcpy and a
	  '&' instead of '*' in the sizeof.

	  ASTERISK-26138 #close

	  Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708

2016-06-20 13:18 +0000 [1b79e2deff]  Mark Michelson <mmichelson@digium.com>

	* Fix Alembic upgrades.

	  A non-existent constraint was being referenced in the upgrade script.
	  This patch corrects the problem by removing the reference.

	  This patch fixes another realtime problem as well. Our Alembic scripts
	  store booleans as yes or no values. However, Sorcery tries to insert
	  "true" or "false" instead. This patch updates Sorcery to use "yes" and
	  "no"

	  ASTERISK-26128 #close

	  Change-Id: I366dbbf91418a9cb160b3ca74b0e59b5ac284bec

2016-06-22 10:55 +0000 [e30602587c]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Avoid obsolete warning with AC_FUNC_SETVBUF_REVERSED on autoconf.

	  Removed the obsolete macro AC_FUNC_SETVBUF_REVERSED because Asterisk does not
	  support the platform SVR2 from the year 1987 anymore.

	  ASTERISK-26046

	  Change-Id: I28161b037feb2d29ab46ed20e785928460226c22

2016-06-22 10:51 +0000 [77da168e58]  gtjoseph <gjoseph@digium.com>

	* test_res_pjsip_scheduler: Add 'depends' on pjproject in MODULEINFO

	  Since the file was missing the depends on pjproject, it wasn't
	  picking up the pjproject related include path.  If there was no
	  system installed pjproject and pjproject-bundled was used, a compile
	  would fail because pjsip.h wasn't found.

	  ASTERISK-26139 #close

	  Change-Id: I2ee64a999051452bc198c4e2c168c70769cd3757

2016-06-21 06:52 +0000 [dfcd466bf0]  Torrey Searle <torrey@voxbone.com>

	* res_rtp_asterisk: fix memory leak in dtls

	  ensure that cert bios get freed after creating the fingerprint

	  ASTERISK-26129 #close

	  Change-Id: I44d23aea07dce80176ca1ff877c5ace9452ef451

2016-06-21 17:42 +0000 [c982da0641]  Richard Mudgett <rmudgett@digium.com>

	* res_pjproject.c: Replace inlined DEBUG_ATLEAST() with macro.

	  Change-Id: I8799fb0a347ad76e747dafd0eacf1ea1086b9a8c

2016-06-12 11:19 +0000 [6a568bcc66]  gtjoseph <gjoseph@digium.com>

	* res_pjsip_pubsub: Address SEGV when attempting to terminate a subscription

	  Occasionally under load we'll attempt to send a final NOTIFY on a
	  subscription that's already been terminated and a SEGV will occur
	  down in pjproject's evsub_destroy function.  This is a result of a
	  race condition between all the paths that can generate a notify
	  and/or destroy the underlying pjproject evsub object:

	   * The client can send a SUBSCRIBE with Expires: 0.
	   * The client can send a SUBSCRIBE/refresh.
	   * The subscription timer can expire.
	   * An extension state can change.
	   * An MWI event can be generated.
	   * The pjproject transaction timer (timer_b) can expire.

	  Normally when our pubsub_on_evsub_state is called with a terminate,
	  we push a task to the serializer and return at which point the dialog
	  is unlocked.  This is usually not a problem because the task runs
	  immediately and locks the dialog again.  When the system is heavily
	  loaded though, there may be a delay between the unlock and relock
	  during which another event may occur such as the subscription timer
	  or timer_b expiring, an extension state change, etc.  These may also
	  cause a terminate to be processed and if so, we could cause pjproject
	  to try to destroy the evsub structure twice.  There's no way for us to
	  tell that the evsub was already destroyed and the evsub's group lock
	  can't tolerate this and SEGVs.

	  The remedy is twofold.

	   * A patch has been submitted to Teluu and added to the bundled
	     pjproject which adds add/decrement operations on evsub's group lock.

	   * In res_pjsip_pubsub:
	     * configure.ac and pjproject-bundled's configure.m4 were updated
	       to check for the new evsub group lock APIs.
	     * We now add a reference to the evsub group lock when we create
	       the subscription and remove the reference when we clean up the
	       subscription.  This prevents evsub from being destroyed before
	       we're done with it.
	     * A state has been added to the subscription tree structure so
	       termination progress can be tracked through the asyncronous tasks.
	     * The pubsub_on_evsub_state callback has been split so it's not doing
	       double duty.  It now only handles the final cleanup of the
	       subscription tree.  pubsub_on_rx_refresh now handles both client
	       refreshes and client terminates.  It was always being called for
	       both anyway.
	     * The serialized_on_server_timeout task was removed since
	       serialized_pubsub_on_rx_refresh was almost identical.
	     * Missing state checks and ao2_cleanups were added.
	     * Some debug levels were adjusted to make seeing only off-nominal
	       things at level 1 and nominal or progress things at level 2+.

	  ASTERISK-26099 #close
	  Reported-by: Ross Beer.

	  Change-Id: I779d11802cf672a51392e62a74a1216596075ba1

2016-06-21 07:05 +0000 [ef97911a1c]  Alexander Traud <pabstraud@compuserve.com>

	* res_rtp_asterisk: Use latest DTLS version available by underlying platform.

	  Do not use DTLSv1_method() but DTLS_method() when available in OpenSSL of the
	  underlying platform. This change enables DTLS 1.2 since OpenSSL 1.0.2, for
	  WebRTC (DTLS-SRTP via SIP-over-WebSockets). This change enables AEAD-based
	  cipher-suites.

	  ASTERISK-26130 #close

	  Change-Id: I41f24448d6d2953e8bdb97c9f4a6bc8a8f055fd0

2016-06-21 10:53 +0000 [69d58a1e37]  Scott Griepentrog <scott@griepentrog.com>

	* PJSIP: provide transport type with received messages

	  The receipt of a SIP MESSAGE may occur over any transport including TCP
	  and TLS. When the message is received, the original URI is added to the
	  message in the field PJSIP_RECVADDR, but this is insufficient to ensure
	  a reply message can reach the originating endpoint. This patch adds the
	  PJSIP_TRANSPORT field populated with the transport type.

	  ASTERISK-26132 #close

	  Change-Id: I28c4b1e40d573a056c81deb213ecf53e968f725e

2016-06-21 08:01 +0000 [cbfa9f771e]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Avoid obsolete warning with HELP_STRING on autoconf.

	  Some configure scripts used both AC_HELP_STRING and its replacement
	  AS_HELP_STRING. For consistency and to avoid obsolete warnings, those were
	  changed to AS_HELP_STRING.

	  ASTERISK-26046

	  Change-Id: I8aad4fd2bdee40aa2a31ce3339a1eb33ff4f5b0f

2016-06-20 10:29 +0000 [ba0d9e7f7a]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_session: Handle race condition at shutdown with timer.

	  When shutting down res_pjsip_session will get unloaded before res_pjsip.
	  The act of unloading unregisters all the PJSIP services and sets
	  their module IDs to -1. In some cases it is possible for a timer to
	  occur after this happens which calls into res_pjsip_session. The
	  res_pjsip_session module can then try to get the session from the
	  INVITE session using the module ID. Since the module ID is now -1
	  this fails.

	  This change stores a copy of the module ID and uses it for the timer
	  callback scenario. If the module ID is -1 the callback immediately
	  returns but if the module ID is valid then it continues as normal.

	  This works as the original ID of the module is guaranteed to still
	  be valid when used with the INVITE session.

	  ASTERISK-26127 #close

	  Change-Id: I88df72525c4e9ef9f19c13aedddd3ac4a335c573

2016-06-20 12:13 +0000 [c1512f4108]  Richard Mudgett <rmudgett@digium.com>

	* app_voicemail.c: Fix IMAP compile error.

	  Fix compile error introduced by the patch for
	  ASTERISK-26045

	  Change-Id: I5b02876266f2824f4cec2b54d6ff4db5de5778d3

2016-06-16 15:56 +0000 [5134a8043a]  Alexei Gradinari <alex2grad@gmail.com>

	* fix: memory leaks, resource leaks, out of bounds and bugs

	  ASTERISK-26119 #close

	  Change-Id: Iecbf7d0f360a021147344c4e83ab242fd1e7512c

2016-06-13 17:40 +0000 [cfebe3b94a]  Mark Michelson <mmichelson@digium.com>

	* ARI: Ensure announcer channels are destroyed.

	  Announcer channels were not being destroyed because the
	  stasis_app_control structure that referenced them was not being
	  destroyed. The control structure was not being destroyed because it was
	  not being unlinked from its container. It was not being unlinked from
	  its container because the after bridge callback for the announcer
	  channel was not being run. The after bridge callback was not being run
	  because the after bridge datastore was not being removed from the
	  channel on destruction. The channel was not being destroyed because the
	  hangup that used to destroy the channel was now only reducing the
	  reference count to one. The reference count of the channel was only
	  being reduced to one because the stasis_app_control structure was
	  holding the final reference...

	  The control structure used to not keep a reference to the channel, so
	  that loop described above did not happen.

	  The solution is to manually remove the control structure from its
	  container when the playback on a bridge is complete.

	  ASTERISK-26083 #close
	  Reported by Joshua Colp

	  Change-Id: I0ddc0f64484ea0016245800b409b567dfe85cfb4

2016-06-20 08:05 +0000 [76516bd79d]  Alexander Traud <pabstraud@compuserve.com>

	* http: leverage 'bindaddr' for TLS in http.conf

	  The internal HTTP/WebSocket server supports both TCP and TLS, which can be
	  activated separately via the file http.conf. The source code intends to re-use
	  the TCP parameter 'bindaddr' for TLS, even if 'tlsbindaddr' is not specified
	  explicitly. This did not work because of a typo. This change resolves this typo.

	  ASTERISK-26126 #close

	  Change-Id: I5efb0409ae12044dfb3495b6b97b6d40a8c9c51f

2016-05-31 09:10 +0000 [89cc86fc38]  Vasil Kolev <vasil.kolev@securax.org>

	* chan_sip: bigger buffers for headers, better failure mode

	  Currently chan_sip can give weird messages if the contacts don't
	  fit in the From: or To: headers. This fix changes the from,to and
	  invite variables to use ast_str, allocates and deallocates them and
	  resizes them if needed.

	  ASTERISK-26069 #close

	  Change-Id: I1b68fcbddca6f6cc7d7a92fe1cb0d5430282b2b3

2016-05-18 17:37 +0000 [d53a36ff33]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_transport_management.c: Misc cleanups to survive shutdown.

	  * In unload_module(), reordered destroying things to minimize the window
	  that the global transports container could be used by other threads on
	  shutdown.  When shutting down you need to stop things in the opposite
	  order of creation.

	  * Put the global transports container into an AO2_GLOBAL_OBJ_STATIC to
	  eliminate the crash potential by other threads using the container on
	  shutdown.

	  * Made struct monitored_transport.sip_received not use
	  ast_atomic_fetchadd_int() since it is used as a boolean value that is only
	  set TRUE.  It was previously incremented for every received SIP message
	  and could theoretically overflow.

	  * In monitored_transport_state_callback(), allocated the monitored
	  transport object without a lock since the lock was unused.

	  * In keepalive_global_loaded(), removed releasing the transports container
	  if the keepalive_thread could not be started.  I set it up to be tried
	  again if the user reloads the configuration.

	  Change-Id: I8d12d16ef564290fa6d25a32334bb5ce8fdf87ff

2016-01-05 19:08 +0000 [03953d8034]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip.c: Add check that timer actually got scheduled.

	  Change-Id: Iabaa2e5dccf0762c258101ea0eb1487cf6959ad1

2016-06-13 13:33 +0000 [32ab98116e]  Richard Mudgett <rmudgett@digium.com>

	* res_rtp_multicast.c: Fix warning message typo.

	  Change-Id: Ic9928208b9957e09866abe3d9649030942ec52b3

2016-02-11 18:15 +0000 [0429c53368]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Reorganize ast_sip_session_terminate().

	  Change-Id: I68a2128bcba4830985d2d441e70dfd1ac5bd712b

2016-06-10 12:35 +0000 [5823f279f3]  Richard Mudgett <rmudgett@digium.com>

	* chan_rtp: Backport changes from master.

	  * Deprecate chan_multicast_rtp.

	  Change-Id: Ib5a45e58c75ee8abd0b4f9575379b5321feb853e

2016-06-10 16:13 +0000 [dde58df318]  Richard Mudgett <rmudgett@digium.com>

	* chan_rtp.c: Copy file from chan_multicast_rtp.c

	  Change-Id: I1119b53f2152ab1cbec74b5be7ea44844dbda8ef

2016-06-08 06:15 +0000 [ca38a3cbb4]  Alexander Traud <pabstraud@compuserve.com>

	* core: Not the configured but granted number of possible file descriptors.

	  With CLI "core show settings", simply the parameter maxfiles of the file
	  asterisk.conf was shown. If that parameter was not set, nothing was displayed
	  although the environment might have set a default number itself. Or if maxfiles
	  were not granted (completely), still maxfiles was shown. Now, the maximum number
	  of possible file descriptors in the environment is shown.

	  ASTERISK-26097

	  Change-Id: I2df5c58863b5007b34b77adbe28b885dfcdf7e0b

2016-06-07 18:45 +0000 [caf6cccc5c]  Joshua Colp <jcolp@digium.com>

	* cel: Ensure only one dial status per channel exists.

	  CEL wrongly assumed that a channel would only have a single dial
	  event on it. This is incorrect. Particularly in a queue each
	  call attempt to a member will result in a dial event, adding
	  a new dial status in CEL without removing the old one. This
	  would cause the container to grow with only one dial status
	  being removed when the channel went away. The other dial status
	  entries would remain leaking memory.

	  This change fixes the memory leak by ensuring that only one dial
	  status will only ever exist for each channel.

	  The behavior during the scenario where multiple events are received
	  has also been improved. For failure cases the first failure will
	  be the dial status. If an answer dial status is received, though,
	  it will take priority and the dial status for the channel will be
	  answer.

	  Memory usage has also been decreased by storing the minimal
	  amount of information and the code has been cleaned up slightly.

	  ASTERISK-25262 #close

	  Change-Id: I5944eb923db17b6a0faa7317ff6abc9307c009fe

2016-06-09 10:37 +0000 [715ef071a1]  Mark Michelson <mmichelson@digium.com>

	* chan_pjsip: Lock channel when checking for RTP changes.

	  bridge_native_rtp can call into an RTP-capable channel driver in order
	  for the driver to update information about who the channel is
	  communicating with. For SIP channel drivers, this means deactivating
	  RTCP and sending a reinvite so that the endpoints can communicate
	  directly.

	  bridge_native_rtp does the right thing and has the channel locked when
	  calling into the channel driver. chan_pjsip can't alter session
	  properties in this thread, though. chan_pjsip queues a task on the
	  session serializer in order to update properties there.

	  The problem is that this queued task was not locking the channel. This
	  meant that the queued task could attempt to deactivate RTCP at the same
	  time that the channel thread was attempting to process an incoming RTCP
	  packet. This could lead to a crash.

	  This patch fixes the issue by locking the channel in the queued task
	  when altering RTP properties.

	  ASTERISK-26092 #close
	  Reported by Niklas Larsson

	  Change-Id: I3464e226a3c41f6b915f97891e07fa1599e2a159

2016-06-09 09:20 +0000 [a99ddc6a0d]  gtjoseph <gjoseph@digium.com>

	* build:  Fix ast_sockaddr initialization to be more portable

	  A change to glibc 2.22 changed the order of the sockadddr_storage
	  members which caused the places where we do an initialization of
	  ast_sockaddr with '{ { 0, 0, } }' to fail compilation.  Those
	  initializers (which we shouldn't have been using anyway) have been
	  replaced with memsets.

	  Change-Id: Idd1b3b320903d8771bfe221f0b015685de628fa4

2016-06-08 12:26 +0000 [eabb398d71]  Matt Jordan <mjordan@digium.com>

	* res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded

	  A crash can occur in res_hep_pjsip or res_hep_rtcp if res_hep has not
	  loaded and does not have a configuration file. Previously when this
	  occurred, checks were put in to see if the configuration was loaded
	  successfully. While this is a good idea - and has been added to the
	  offending function in res_hep - the reality is res_hep_pjsip and
	  res_hep_rtcp have no business running if res_hep isn't also running.

	  As such, this patch also adds a function to res_hep that returns whether
	  or not it successfully loaded. Oddly enough, ast_module_check returns
	  "everything is peachy" even if a module declined its load - so it cannot
	  be solely relied on. res_hep_pjsip and res_hep_rtcp now also check this
	  function to see if they should continue to load; if it fails, they
	  decline their load as well.

	  ASTERISK-26096 #close

	  Change-Id: I007e535fcc2e51c2ca48534f48c5fc2ac38935ea

2016-06-08 05:58 +0000 [0d84421f93]  Alexander Traud <pabstraud@compuserve.com>

	* astfd: Not maximum size of a single file but maximum file descriptors.

	  With menuselect "DEBUG_FD_LEAKS" and CLI "core show fd", the maximum size of a
	  single file was shown. Now, the maximum number of possible file descriptors is
	  shown.

	  ASTERISK-26097

	  Change-Id: Icf98d145774b38cac144ca76d19eaef42ce659a3

2016-06-02 14:53 +0000 [9c5a0b814b]  Timo Teräs <timo.teras@iki.fi>

	* Fix #include poll.h and sys/cdefs.h

	  POSIX defines poll.h, sys/poll.h should not be used at is c-library
	  internal header which may or may not exist. Notable in musl it
	  generates warning of being incorrect. And add explict include of
	  sys/cdefs.h where needed.

	  Change-Id: I142930df53fe7585a06b854b6faddc5301e024be

2016-06-03 22:44 +0000 [9c35f34301]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_registrar.c: Eliminate rx REGISTER request race condition.

	  This patch fixes a race condition processing received REGISTER requests
	  and their retransmissions caused by REGISTER requests being processed by
	  two threads.  The "sip_transaction Unable to register REGISTER transaction
	  (key exists)" message is a notable symptom of this issue.

	  This issue was more likely to happen before the pjsip/distributor
	  serializers were created.  Instead of steps one and two below placing the
	  REGISTER messages into the same pjsip/distributor they were placed in
	  random pjsip/default serializers.

	  1) REGISTER requests come in and get placed on the pjsip/distributor
	  serializer.

	  2) Before the first request is processed a retransmission comes in and is
	  placed on the same pjsip/distributor serializer.

	  3) The first request goes up the pjsip stack and is then shunted off to
	  the pjsip/aor/<aor> serializer.

	  4) Before the first request is completed processing in the pjsip/aor/<aor>
	  serializer, the second request goes up the pjsip stack and is also shunted
	  off to the pjsip/aor/<aor> serializer.

	  5) The first request completes processing and sends out its response.

	  6) The second request completes processing and tries to send out its
	  response but pjlib complains that the REGISTER transaction key already
	  exists.

	  7) Sadness ensues.

	  * The race is eliminated by removing the pjsip/aor/<aor> serializer and
	  continuing the processing in the pjsip/distributor serializer.  Now any
	  retransmissions queued in the pjsip/distributor serializer will be
	  processed after the first message is completely processed.

	  ASTERISK-26088 #close
	  Reported by:  Richard Mudgett

	  Change-Id: I842d714346088bf717ea27437f1dd85bff0bab5a

2016-06-03 11:35 +0000 [557333ea4c]  Richard Mudgett <rmudgett@digium.com>

	* stasis: Add setting subscription congestion levels.

	  Stasis subscriptions and message routers create taskprocessors to process
	  the event messages.  API calls are needed to be able to set the congestion
	  levels of these taskprocessors for selected subscriptions and message
	  routers.

	  * Updated CDR, CEL, and manager's stasis subscription congestion levels
	  based upon stress testing.  Increased the congestion levels to reduce the
	  potential for bursty call setup/teardown activity from triggering the
	  taskprocessor overload alert.  CDRs in particular need an extra high
	  congestion level because they can take awhile to process the stasis
	  messages.

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: Id0a716394b4eee746dd158acc63d703902450244

2016-06-02 18:19 +0000 [110d772467]  Richard Mudgett <rmudgett@digium.com>

	* sorcery: Add setting object type congestion levels.

	  Sorcery creates taskprocessors for object types to process object observer
	  callbacks.  An API call is needed to be able to set the congestion levels
	  of these taskprocessors for selected object types.

	  * Updated PJSIP's contact and contact_status sorcery object type observer
	  default congestion levels based upon stress testing.  Increased the
	  congestion levels to reduce the potential for bursty register/unregister
	  and subscribe/unsubscribe activity from triggering the taskprocessor
	  overload alert.

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: I4542e83b556f0714009bfeff89505c801f1218c6

2016-06-02 16:08 +0000 [610eee2a36]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessors: Implement high/low water mark alerts.

	  When taskprocessors get backed up, there is a good chance that we are
	  being overloaded and need to defer adding new work to the system.

	  * Implemented a high/low water alert mechanism for modules to check if the
	  system is being overloaded and take appropriate action.  When a
	  taskprocessor is created it has default congestion levels set.  A
	  taskprocessor can later have those congestion levels altered for specific
	  needs if stress testing shows that the taskprocessor is a symptom of
	  overloading or needs to handle bursty activity without triggering an
	  overload alert.

	  * Add CLI "core show taskprocessor" low/high water columns.

	  * Fixed __allocate_taskprocessor() to not use RAII_VAR().  RAII_VAR() was
	  never a good thing to use when creating a taskprocessor because of the
	  nature of how its references needed to be cleaned up on a partial
	  creation.

	  * Made res_pjsip's distributor check if the taskprocessor overload alert
	  is active before placing a message representing brand new work onto a
	  distributor serializer.

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: I182f1be603529cd665958661c4c05ff9901825fa

2016-05-27 17:31 +0000 [26e3492246]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session: Use distributor serializer for incoming calls.

	  We must continue using the serializer that the original INVITE came in on
	  for the dialog.  There may be retransmissions already enqueued in the
	  original serializer that can result in reentrancy and message sequencing
	  problems.

	  Outgoing call legs create the pjsip/outsess/<endpoint> serializers for
	  their dialogs.

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: I24d7948749c582b8045d5389ba3f6588508adbbc

2016-05-27 16:28 +0000 [ceb1007ed7]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer.

	  * Resolves potential reentrancy problems if system restarted in the middle
	  of subscription message transactions.

	  * Fixes memory leak recreating persistent subscriptions when the
	  subscription resource tree could not be created.

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: I71e34d7ae8ed35a694f1030e820e2548c48697be

2016-05-27 12:50 +0000 [27bafc3a8b]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions.

	  We must continue using the serializer that the original SUBSCRIBE came in
	  on for the dialog.  There may be retransmissions already enqueued in the
	  original serializer that can result in reentrancy and message sequencing
	  problems.  The "sip_transaction Unable to register SUBSCRIBE transaction
	  (key exists)" message is a notable symptom of this issue.

	  Outgoing subscriptions still create the pjsip/pubsub/<endpoint>
	  serializers for their dialogs.

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: I18b00bb74a56747b2c8c29543a82440b110bf0b0

2016-05-26 17:35 +0000 [16b08444da]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_distributor.c: Consistently pick a serializer for messages.

	  Incoming messages that are not part of a dialog or a recognized response
	  to one of our requests need to be sent to a consistent serializer.  Under
	  load we may be queueing retransmissions before we can process the original
	  message.  We don't need to throw these messages onto random serializers
	  and cause reentrancy and message sequencing problems.

	  * Created a pool of pjsip/distributor serializers that get picked by
	  hashing the call-id and remote tag strings of the received messages.

	  * Made ast_sip_destroy_distributor() destroy items in the reverse order of
	  creation.

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: I2ce769389fc060d9f379977f559026fbcb632407

2016-06-02 12:51 +0000 [993b769524]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_distributor.c: Ignore messages until fully booted.

	  We should not be processing any incoming messages until we are fully
	  booted.  We may not have dialplan or other needed configuration loaded
	  yet.

	  ASTERISK-26089 #close
	  Reported by: Scott Griepentrog

	  ASTERISK-26088
	  Reported by:  Richard Mudgett

	  Change-Id: I584aefb4f34b885a8927e1f13a2c64babd606264

2016-06-02 12:04 +0000 [321a9b128f]  Joshua Colp <jcolp@digium.com>

	* res_odbc: Implement a connection pool.

	  Testing has shown that our usage of UnixODBC is problematic
	  due to bugs within UnixODBC itself as well as the heavy weight
	  cost of connecting and disconnecting database connections, even
	  when pooling is enabled.

	  For users of UnixODBC 2.3.1 and earlier crashes would occur due
	  to insufficient protection of the disconnect operation. This was
	  fixed in UnixODBC 2.3.2 and above.

	  For users of UnixODBC 2.3.3 and higher a slow-down would occur
	  under heavy database use due to repeated connection establishment.
	  A regression is present where on each connection the database
	  configuration is cached again, with the cache growing out of
	  control.

	  The connection pool implementation present in this change helps
	  to mitigate these issues by reducing how much we connect and
	  disconnect database connections. We also solve the issue of
	  crashes under UnixODBC 2.3.1 by defaulting the maximum number of
	  connections to 1, returning us to the previous working behavior.
	  For users who may have a fixed version the maximum concurrent
	  connection limit can be increased helping with performance.

	  The connection pool works by keeping a list of active connections.
	  If the connection limit has not been reached a new connection is
	  established. If the connection limit has been reached then the
	  request waits until a connection becomes available before
	  continuing.

	  ASTERISK-26074 #close
	  ASTERISK-26054 #close

	  Change-Id: I6774bf4bac49a0b30242c76a09c403d2e856ecff

2016-06-07 05:45 +0000 [c6ee4a0f44]  Alexander Traud <pabstraud@compuserve.com>

	* res_srtp: Instead of libSRTP use OpenSSL as random source.

	  Since libSRTP 1.5, its Random Number Generator (RNG) is not maintained anymore.
	  Therefore, the symbol RAND_bytes is used instead of crypto_get_random.

	  ASTERISK-24436 #close

	  Change-Id: Iea0bae4d4e3c9aa0926ea442b6484b5159789d96

2016-06-07 02:16 +0000 [d38b8e6399]  Alexander Traud <pabstraud@compuserve.com>

	* BuildSystem: Avoid 'ar cru' and use 'ar cr' instead.

	  In several internal library projects, the files are archived with the help of
	  'ar cr'. Only the projects editline and the Objective Open H.323 stack
	  implementation in C (ooh323c) use 'ar cru' instead. Recently, some platforms
	  changed the default parameters of AR which creates "/usr/bin/ar: `u' modifier
	  ignored since `D' is the default (see `U')". For consistency and to avoid this
	  message all projects use 'ar cr' now.

	  ASTERISK-26091 #close

	  Change-Id: I710a9b1c01c1b5a1931a646098c044c8161ead40

2016-05-27 14:49 +0000 [c27c232057]  gtjoseph <gjoseph@digium.com>

	* ari/resource_channels:  Add 'formats' to channel create/originate

	  If you create a local channel and don't specify an originator channel
	  to take capabilities from, we automatically add all audio formats to
	  the new channel's capabilities. When we try to make the channel
	  compatible with another, the "best format" functions pick the best
	  format available, which in this case will be slin192.  While this is
	  great for preserving quality, it's the worst for performance and
	  overkill for the vast majority of applications.

	  In the absense of any other information, adding all formats is the
	  correct thing to do and it's not always possible to supply an
	  originator so a new parameter 'formats' has been added to the channel
	  create/originate functions. It's just a comma separated list of formats
	  to make availalble for the channel. Example: "ulaw,slin,slin16".
	  'formats' and 'originator' are mutually exclusive.

	  To facilitate determination of format names, the format name has been
	  added to "core show codecs".

	  ASTERISK-26070 #close

	  Change-Id: I091b23ecd41c1b4128d85028209772ee139f604b

2016-06-02 04:59 +0000 [cda3385409]  Joshua Colp <jcolp@digium.com>

	* alembic: Fix migration.

	  The 81b01a191a46_pjsip_add_contact_reg_server.py script was attempting
	  to use UniqueConstraint and failing. It was not imported and after
	  importing it also continued to fail.

	  I've changed the script to use the explicit name of the constraint
	  instead.

	  Change-Id: I2438b0be90b7ce583b47dd27983c0c1a02cea5b9

2016-06-01 13:57 +0000 [e2132dd358]  Richard Mudgett <rmudgett@digium.com>

	* logging,cdr,cel: Fix stringfield memory leak.

	  The stringfields refactor to allow adding stringfields to the end of a
	  structure (f6f4cf459f43f072604927209b39646f84aaa2e2) exposed some
	  incomplete cleanup code by some stringfield users.

	  The most noticeable leaker is the logging system where there is a leak for
	  every log message generated.

	  ASTERISK-26078 #close
	  Reported by:  Etienne Lessard
	  Patches:
	        jira_asterisk_26078_v13.patch (license #5621) patch uploaded
	        by Richard Mudgett

	  Change-Id: If6a08b31336b492c3de6f9dfd07c447f8d5a8782

2016-05-25 10:34 +0000 [2de58c6d01]  Alexei Gradinari <alex2grad@gmail.com>

	* core/dial: New channel variable FORWARDERNAME

	  Added a new channel variable FORWARDERNAME which indicates which
	  channel was responsible for a forwarding requests received on dial attempt.

	  Fixed a bug in the app_queue: FORWARD_CONTEXT is not used.

	  ASTERISK-26059 #close

	  Change-Id: I34e93e8c1b5e17776a77b319703c48c8ca48e7b2

2016-05-31 13:02 +0000 [b2ce0e354b]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_distributor.c: Use correct rdata info access method (Part 2).

	  The pjproject doxygen for rdata->msg_info.info says to call
	  pjsip_rx_data_get_info() instead of accessing the struct member directly.
	  You need to call the function mostly because the function will generate
	  the struct member value if it is not already setup.

	  Change-Id: I4d519385a577f3e9d9193a88125e493cf17fa799

2016-05-30 19:27 +0000 [fe305ccf01]  gtjoseph <gjoseph@digium.com>

	* res_pjsip_mwi_body_generator:  Re-order the body items

	  Re-ordered the body items so Message-Account is second.

	  Messages-Waiting: no
	  Message-Account: sip:1571@<IP Removed>:5060
	  Voice-Message: 0/0 (0/0)

	  ASTERISK-26065 #close
	  Reported-by: Ross Beer

	  Change-Id: If5d35a64656eac98c2dd5e490cc0b2807bed80c3

2016-05-30 10:58 +0000 [e8abfdcdc5]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Move to pjproject 2.5

	  Although all the patches we had against 2.4.5 were applied by Teluu,
	  a new bug was introduced preventing re-use of tcp and tls transports
	  This patch removes all the previous patches against 2.4.5, updates
	  the version to 2.5, and adds a new patch to correct the transport
	  re-use problem.

	  Change-Id: I0dc6c438c3910f7887418a5832ca186aea23d068

2016-05-27 12:25 +0000 [37d039fdf3]  Rusty Newton <rnewton@digium.com>

	* res_pjsip: Add clarifying documentation to PJSIP_HEADER help text

	  Added notes about when you can read or write headers. Specifically
	  about being able to read on the inbound channel and write on an
	  outbound channel.

	  ASTERISK-26063 #close
	  Reported by: Private Name
	  Tested by: Rusty Newton

	  Change-Id: Ibeb64af17d1f6451028b3c29855a3f151a01d8c5

2016-05-25 18:30 +0000 [03d5b3ce5c]  Richard Mudgett <rmudgett@digium.com>

	* pjsip_distributor.c: Use correct rdata info access method.

	  The pjproject doxygen for rdata->msg_info.info says to call
	  pjsip_rx_data_get_info() instead of accessing the struct member directly.
	  You need to call the function mostly because the function will generate
	  the struct member value if it is not already setup.

	  Change-Id: Iafe8b01242b7deb0ebfdc36685e21374a43936d2

2016-05-20 13:56 +0000 [859bbec09b]  Alexei Gradinari <alex2grad@gmail.com>

	* app_voicemail: fix bugs, imap mm_status log change to debug

	  Fixed some bugs:
	  - create dirpath when save downloading message from IMAP storage.
	  - create IMAP folder if not exists when saving to IMAP storage
	  - check if file successfully opened before write to it
	  - some IMAP checks
	  - remove non-standard flag 'Unseen'
	  etc

	  Change to debug IMAP mm_status log instead of verbose.

	  Remove unused X-Asterisk-VM-Caller-channel message header
	  for security reason. The clients should not know name of peer/endpoint.

	  ASTERISK-26045 #close

	  Change-Id: I7f83d88b69b36934e2539c114b9fb612deed971b

2016-05-19 14:56 +0000 [230686f4ec]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: add "via_addr", "via_port", "call_id" to contact

	  As res_pjsip_nat rewrites contact's address, only the last Via header
	  can contain the source address of registered endpoint.
	  Also Call-Id header may contain the source address of registered
	  endpoint.

	  Added "via_addr", "via_port", "call_id" to contact.
	  Added new fields ViaAddress, CallID to AMI event ContactStatus.

	  ASTERISK-26011

	  Change-Id: I36bcc0bf422b3e0623680152d80486aeafe4c576

2016-05-24 16:56 +0000 [04c12561a7]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: chatty verbose messages

	  There are a lot of verbose messages about Endpoint and Contact status
	  changes if there are many dynamic endpoints.
	  The patch sets verbose level 2 for Endpoint status changes
	  and verbose level 3 for Contact status changes.

	  ASTERISK-26055 #close

	  Change-Id: Ie64e261ddbbc41bfff0f0190241152cc123fe6d7

2016-02-12 09:59 +0000 [a42bea3314]  Corey Farrell <git@cfware.com>

	* threadpool: Fix potential data race.

	  worker_start checked for ZOMBIE status without holding a lock.  All
	  other read/write of worker status are performed with a lock, so this
	  check should do the same.

	  ASTERISK-25777 #close

	  Change-Id: I5e33685a5c26fdb300851989a3b82be8c4e03781

2016-05-18 10:58 +0000 [a32616d60c]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* Makefile: remove OSARCH check for init install

	  There are more specific checks for the platform.

	  Specifically this allows installing OS/X init scripts.

	  ASTERISK-26038 #close

	  Change-Id: If08933621145b10362a0cfe73c079301d9c13f50
	  Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2016-05-21 05:42 +0000 [9ddaab789e]  Jesper (License 5518)

	* func_curl: Don't trim response text on non-ASCII characters

	  The characters 0x80-0xFF were trimmed as well as 0x00-0x20 because of
	  a signed comparison.

	  ASTERISK-25669 #close
	  Reported by: Jesper
	  patches:
	    strings.curl.trim.patch submitted by Jesper (License 5518)

	  Change-Id: Ia51e169f24e3252a7ebbaab3728630138ec6f60a

2016-05-20 16:59 +0000 [9453d1187a]  Richard Mudgett <rmudgett@digium.com>

	* parking.h: Update ast_parking_park_call() doxygen to reality.

	  ASTERISK-26029

	  Change-Id: I2db14d102a48d3224010e6d1c69e856373cc1260

2016-05-10 14:30 +0000 [cd89501d48]  Alexei Gradinari <alex2grad@gmail.com>

	* func_odbc: single database connection should be optional

	  func_odbc was changed in Asterisk 13.9.0
	  to make func_odbc use a single database connection per DSN
	  because of reported bug ASTERISK-25938
	  with MySQL/MariaDB LAST_INSERT_ID().

	  This is drawback in performance when func_odbc is used
	  very often in dialplan.

	  Single database connection should be optional.

	  ASTERISK-26010

	  Change-Id: I57d990616c957dabf7597dea5d5c3148f459dfb6

2016-05-20 09:39 +0000 [c0b190dd9a]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Match dialogs on responses better.

	  When receiving an incoming response to a dialog-starting INVITE, we were
	  not matching the response to the INVITE dialog. Since we had not
	  recorded the to-tag to the dialog structure, the PJSIP-provided method
	  to find the dialog did not match.

	  Most of the time, this was not a problem, because there is a fall-back
	  that makes the response get routed to the same serializer that the
	  request was sent on. However, in cases where an asynchronous DNS lookup
	  occurs in the PJSIP core, the thread that sends the INVITE is not
	  actually a threadpool serializer thread. This means we are unable to
	  record a serializer to handle the incoming response.

	  Now, imagine what happens when an INVITE is sent on a non-serialized
	  thread, and an error response (such as a 486) arrives. The 486 ends up
	  getting put on some random threadpool thread. Eventually, a hangup task
	  gets queued on the INVITE dialog serializer. Since the 486 is being
	  handled on a different thread, the hangup task can execute at the same
	  time that the 486 is being handled. The hangup task assumes that it is
	  the sole owner of the INVITE session and channel, so it ends up
	  potentially freeing the channel and NULLing the session's channel
	  pointer. The thread handling the 486 can crash as a result.

	  This change has the incoming response match the INVITE transaction, and
	  then get the dialog from that transaction. It's the same method we had
	  been using for matching incoming CANCEL requests. By doing this, we get
	  the INVITE dialog and can ensure that the 486 response ends up being
	  handled by the same thread as the hangup, ensuring that the hangup runs
	  after the 486 has been completely handled.

	  ASTERISK-25941 #close
	  Reported by Javier Riveros

	  Change-Id: I0d4cc5d07e2a8d03e9db704d34bdef2ba60794a0

2016-05-19 11:41 +0000 [ddcf983e39]  Joshua Colp <jcolp@digium.com>

	* res_sorcery_astdb: Filter fields to only the registered ones.

	  This change introduces the same filtering that is done in res_sorcery_realtime
	  to the res_sorcery_astdb module. This allows persisted sorcery objects
	  that may contain unknown fields to still be read in from the AstDB
	  and used. This is particularly useful when switching between different
	  versions of Asterisk that may have introduced additional fields.

	  ASTERISK-26014 #close

	  Change-Id: Ib655130485a3ccfd635b7ed5546010ca14690fb2

2016-05-09 21:40 +0000 [39fedfa423]  snuffy <snuffy22@gmail.com>

	* res_pjsip_empty_info: Respond to empty SIP INFO packets

	  Some SBCs require responses to empty SIP INFO packets
	  after establishing call via INVITE, if not responded to
	  they may drop your call after unspecified timeout of X minutes.

	  They are identified by having no Content-Type, check for this
	  and respond with 200 - OK message.

	  ASTERISK-24986 #close
	  Reported-by: Ilya Trikoz, Federico Santulli

	  Change-Id: Ib27e4f07151e5aef28fa587e4ead36c5b87c43e0

2016-05-18 07:54 +0000 [935e0496c4]  gtjoseph <gjoseph@digium.com>

	* udptl:  Don't eat sequence numbers until OK is received

	  Scenario:
	  Local fax -> Asterisk w/ firewall -> Provider -> Remote fax

	  * Local fax starts rtp call to remote fax
	  * Remote fax starts t38 call back to local fax.
	  * Local fax sends t38 no-signal to Asterisk before sending an OK.
	  * udptl processes the frame and increments the expected sequence number.
	  * chan_sip drops the frame because the call isn't up so nothing goes out
	    the external interface to open the port for incoming packets.
	  * Local fax sends OK and Asterisk sends OK to the remote fax.
	  * Remote fax sends t38 packets which are dropped by the firewall.
	  * Local fax re-sends t38 no-signal with the same sequence number.
	  * udptl drops the frame because it thinks it's a dup.
	  * Still no outgoing packets to open the firewall.
	  * t38 negotiation fails.

	  The patch drops frames t38 received before udptl sequence processing
	  when the call hasn't been answered yet.  The second no-signal frame
	  is then seen as new and is relayed out the external interface which
	  opens the port and allows negotiation to continue.

	  ASTERISK-26034 #close

	  Change-Id: I11744b39748bd2ecbbe8ea84cdb4f3c5943c5af9

2016-05-17 11:14 +0000 [77e8ec162b]  gtjoseph <gjoseph@digium.com>

	* chan_sip:  Prevent extra Session-Expires headers from being added

	  When chan_sip does a re-INVITE to refresh a session and authentication
	  is required, the INVITE with the Authorization header containes a
	  second Session-Expires header without the ";refersher=" parameter.
	  This is causing some proxies to return a 400.  Also, when Asterisk is
	  the uas and the refresher, it is including the Session-Expires and
	  Min-SE headers in OPTIONS messages which is not allowed per RFC4028.

	  This patch (based on the reporter's) Checks to see if a Session-Expires
	  header is already in the message before adding another one.  It also
	  checks that the method is INVITE or UPDATE.

	  ASTERISK-26030 #close

	  Change-Id: I58a7b07bab5a3177748d8a7034fb8ad8e11ce1d9

2016-05-16 15:29 +0000 [3f6ef63099]  gtjoseph <gjoseph@digium.com>

	* res_pjsip_outbound_registration:  Clean up state when registration is deleted

	  Nothing was cleaning up the registration state object when ast_sorcery_delete
	  was called on a registration.  So, the registration was deleted from sorcery
	  but the state object went right on refreshing the registration (or failing
	  to refresh the registration) with the peer.

	  * Added a 'deleted' observer on registration that removes the state object.

	  ASTERISK-25964 #close
	  Reported-by Matt Jordan

	  Change-Id: I2db792145cdb1f72ebbf57dd9099596dbbf12c23

2016-05-15 19:05 +0000 [b6f9392a12]  gtjoseph <gjoseph@digium.com>

	* res_pjsip:  Set TCP_NODELAY on TCP transports

	  Although it's perfectly legal to place multiple SIP messages in the same packet,
	  it can cause problems because the Linux default is to enable Path MTU Discovery
	  which sets the Don't Fragment bit on the packets. If adding a second message to
	  the packet causes the MTU to be exceeded, and the destination isn't equipped to
	  send a FRAGMENTATION NEEDED response to a large packet, the packet will just be
	  dropped.

	  We can't specifically tell the stack to send only 1 message per packet, but we
	  can turn on TCP_NODELAY when we create the transport. This will at least tell
	  the stack to send packets as soon as possible.

	  ASTERISK-26005 #close
	  Reported-by: Ross Beer

	  Change-Id: I820f23227183f2416ca5e393bec510e8fe1c8fbd

2016-05-14 21:48 +0000 [361a16f316]  Matt Jordan <mjordan@digium.com>

	* configs/samples/pjsip.conf.sample: Fix typo

	  A ':' is not a valid token for starting a comment.

	  Change-Id: I123592d93a83d1bdde3e352822881eb9da85e5ad

2016-05-12 07:08 +0000 [f91a7dc993]  Matt Jordan <mjordan@digium.com>

	* res/res_hep_pjsip: Fix reported local IP address when bound to 'any'

	  When bound to an 'any' address, e.g., 0.0.0.0, PJSIP reports as its
	  local address the 'any' address, as opposed to the IP address we
	  actually received the packet on. This can cause some confusion in Homer,
	  as it will dutifully report what we send it.

	  This patch uses the PJSIP inspection routines to determine which IP
	  address we probably received the packet on based on the remote party's
	  IP address. In the event that this fails, it falls back to the IP
	  address natively reported by the transport.

	  Change-Id: I076f835d2aef489e1ee1d01595b211eb2ce62da3

2016-05-14 12:29 +0000 [9de5cd209e]  Sean Bright <sean.bright@gmail.com>

	* res_ari: Correct Location headers returned by some ARI resources

	  The Location headers returned by:

	   * /bridges/{bridgeId}/play
	   * /bridges/{bridgeId}/record
	   * /channels/{channelId}/play
	   * /channels/{channelId}/record

	  Did not have the '/ari' prefix, and in the case of the 'play' resources, were
	  using 'playback' instead of 'playbacks.'

	  Change-Id: I957c58a3a1471bf477dae7c67faa1b74fcd9241c

2016-05-13 11:38 +0000 [524a302974]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: Endpoint IP Access Controls

	  With the old SIP module we can use IP access controls per peer.
	  PJSIP module missing this feature.

	  This patch added next configuration Endpoint options:
	      "acl" - list of IP ACL section names in acl.conf
	      "deny" - List of IP addresses to deny access from
	      "permit" - List of IP addresses to permit access from
	      "contact_acl" - List of Contact ACL section names in acl.conf
	      "contact_deny" - List of Contact header addresses to deny
	      "contact_permit" - List of Contact header addresses to permit

	  This patch also better logging failed request:
	      add custom message instead of "No matching endpoint found"
	      add SIP method to logging

	  ASTERISK-25900

	  Change-Id: I456dea3909d929d413864fb347d28578415ebf02

2016-05-11 20:17 +0000 [89ae4466ea]  Matt Jordan <mjordan@digium.com>

	* res_hep: Provide an option to pick the UUID type

	  At one point in time, it seemed like a good idea to use the Asterisk
	  channel name as the HEP correlation UUID. In particular, it felt like
	  this would be a useful identifier to tie PJSIP messages and RTCP
	  messages together, along with whatever other data we may eventually send
	  to Homer. This also had the benefit of keeping the correlation UUID
	  channel technology agnostic.

	  In practice, it isn't as useful as hoped, for two reasons:
	  1) The first INVITE request received doesn't have a channel. As a
	     result, there is always an 'odd message out', leading it to be
	     potentially uncorrelated in Homer.
	  2) Other systems sending capture packets (Kamailio) use the SIP Call-ID.
	     This causes RTCP information to be uncorrelated to the SIP message
	     traffic seen by those capture nodes.

	  In order to support both (in case someone is trying to use res_hep_rtcp
	  with a non-PJSIP channel), this patch adds a new option, uuid_type, with
	  two valid values - 'call-id' and 'channel'. The uuid_type option is used
	  by a module to determine the preferred UUID type. When available, that
	  source of a correlation UUID is used; when not, the more readily available
	  source is used.

	  For res_hep_pjsip:
	   - uuid_type = call-id: the module uses the SIP Call-ID header value
	   - uuid_type = channel: the module uses the channel name if available,
	                          falling back to SIP Call-ID if not
	  For res_hep_rtcp:
	   - uuid_type = call-id: the module uses the SIP Call-ID header if the
	                          channel type is PJSIP and we have a channel,
	                          falling back to the Stasis event provided
	                          channel name if not
	   - uuid_type = channel: the module uses the channel name

	  ASTERISK-25352 #close

	  Change-Id: Ide67e59a52d9c806e3cc0a797ea1a4b88a00122c

2016-05-10 02:56 +0000 [a73d79c22f]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* basic-cfg: asterisk.conf: remove [directories]

	  A minimal configuration does not need to explicitly spell out the
	  directories. The built-in defaults will do just fine. In many cases
	  they are wrong.

	  Change-Id: Id1a671e5c5e9923765a4156b57f9f7e263fdd26c
	  Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2016-05-10 03:06 +0000 [1c56de9453]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* basic-cfg: asterisk.conf: defaults of options

	  Note the default of remmed-out options. To clarify that those values are
	  not the defaults.

	  Change-Id: I849c29b7a710f0abc37355fcb5bfee335ae30738
	  Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2016-05-10 03:08 +0000 [d7af591c59]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* basic-cfg: asterisk.conf: debug level 5 spams

	  Don't suggest users to use debug level 5, which spews (usually
	  non-useful) debug information. Reduce the suggestion to (an
	  arbitrarily-selected) level 2.

	  Change-Id: Ib53195f78945970956ff59ef13fa89b90e0fcd60
	  Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2016-05-10 03:10 +0000 [9b7db18fc1]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* basic-cfg: asterisk.conf: don't set languages

	  * No need to set language in a miniml configuration. 'en' will do just
	    fine.
	  * It would be useful to have an example of setting it to a different
	    language.
	  * Setting the documentation language explicitly is likewise not
	    required. Setting it to a different value is not common. At least
	    until there is a set of translated documentation.

	  Change-Id: I94d91ea34e129925f25af81ef8dc0906fb568cb7
	  Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2016-05-10 08:17 +0000 [eec539a46e]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* followme: delete the right recorded name file

	  FollowMe with the option a records the name of the caller and plays it
	  to the callee. However it has failed to clean up that recorded file
	  as it tried to delete the file name without the '.sln' extension.

	  ASTERISK-26008 #close

	  Change-Id: I79d7b1be7d5cde57bf076d9389e2a8a4422776ec
	  Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

2016-05-12 14:36 +0000 [02d30e171e]  Mark Michelson <mmichelson@digium.com>

	* Use doubles instead of floats for conversions when comparing strings.

	  In 13.9.0, there was an issue where PJSIP contacts added to an AOR would
	  be deleted at seemingly random times.

	  One reason this was happening was because of an operation to retrieve
	  the contacts whose expiration time was less than or equal to the current
	  time. When retrieving existing contacts, the contact's expiration time
	  and the current time were converted from a string to a float, and those
	  two floats were compared.

	  On some systems, including mine, this conversion was horribly off. For
	  instance, I could regularly see the string "1463079214" get converted
	  into 1463079168.000000. When switching from using a float to using a
	  double, the conversion was as expected.

	  Why was the conversion to float off? My best guess is that the
	  conversion to float was attempting to store the entire value in the 23
	  bit significand of the IEEE-754 floating point number. In particular, if
	  you take only the 23 most significant bits of 1463079214, you get the
	  messed up 1463079168 that we were seeing in the conversion. It likely
	  was possible to get a more precise value by composing the number using
	  an exponent, but the conversion did not work that way. With a double,
	  you have a 52 bit significand, allowing the entire value to fit there,
	  and thereby allowing an accurate conversion.

	  ASTERISK-26007 #close
	  Reported by Greg Siemon

	  Change-Id: I83ca7944aae8b7cd994b254c78ec02411d321070

2016-05-12 09:13 +0000 [e2df15bae9]  gtjoseph <gjoseph@digium.com>

	* pjsip_distributor:  Add missing newline to NOTICE

	  There was a newline missing from the end of the "no matching endpoint" notice.

	  Change-Id: Idc11fe5bc0354072291663dbffe648c471e39181

2016-05-10 10:19 +0000 [a94a12bbf7]  Sebastian Damm <damm@sipgate.de>

	* res_pjsip_outbound_registration: generate correct Contact URI for TLS

	  There are two types of SIP URIs indicating a secure transport:
	  * sips:user@example.org
	  * sip:user@example.org;transport=tls

	  When using a sips URI, Asterisk checks incoming INVITEs and answers from
	  the other side for sips URIs, and rejects the packet if there are only
	  sip URIs. So Asterisk should only generate a sips Contact URI if the
	  other side supports it.

	  This patch makes Asterisk generate either a sip or sips Contact URI
	  depending on the format of the server URI.

	  If you want a sip URI, use:
	  server_uri=sip:example.org\;transport=tls

	  If you want a sips URI, use:
	  server_uri=sips:example.org

	  ASTERISK-25990 #close
	  Reported-by: Sebastian Damm

	  Change-Id: I5ae57d6531ce940b5fc64d5cd2673e60db0f9ba2

2016-05-05 16:41 +0000 [36d66a23e0]  Alexei Gradinari <alex2grad@gmail.com>

	* logger: Add PID to syslog messages.

	  During refactoring of this support the addition of
	  the PID to messages was removed. This change adds it
	  back in.

	  ASTERISK-25538 #close

	  Change-Id: Ie2d43b0652e59b7ac319a7dba94501540d70ba36

2016-05-11 14:07 +0000 [37214b0bdf]  Matt Jordan <mjordan@digium.com>

	* configure: Fix errors with AST_UNDEFINED_SANITIZER/AST_LEAK_SANITIZER

	  When running on a system that does not support or use AST_UNDEFINED_SANITIZER
	  or AST_LEAK_SANITIZER, the configure script would incorrectly set those
	  constants to a blank value, e.g., 'AST_UNDEFINED_SANITIZER='. This would
	  cause menuselect to error out, complaining that a blank value is not a
	  valid option. This patch corrects the issue by setting the value to 0 if
	  the options that those constants enable/disable is not found.

	  Change-Id: Ib39814aaf940f308d500c1e026edb3d70de47fba

2016-05-03 15:43 +0000 [49b25a0956]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_outbound_publish: state potential dropped on reloads/realtime fetches

	  When reloading, or fetching realtime data, if the "apply" failed for any
	  numerous reasons the current state object would not be maintained. This
	  potentially resulted in publishes being stopped for some states/clients when
	  they should not have been.

	  This patch makes it so the current state object is kept upon any type of reload/
	  fetch failures.

	  Change-Id: Iab6020c116d628ed2ae81183e987e2eaa3c90b30

2016-05-03 15:31 +0000 [1b5c91b7be]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_outbound_publish: Potential crash due to off nominal path

	  It was possible for the explicit publish destroy function to be called without
	  the pjsip client ever being initialized. This fix checks to make sure there is
	  a client to destroy before attempting.

	  Change-Id: I8eea1bfa3bd472149bfc255310be2a6248688f5c

2016-05-03 15:35 +0000 [10de553c9d]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_outbound_publishing: After unloading the library won't load again

	  The same thing was happening in res_pjsip_publish_asterisk. When the library
	  was unloaded it did not unregister the object type from sorcery. Subsequent
	  loads resulted in a failed load due to the sorcery type already existing.

	  Change-Id: Ifdc25e94e4cd40bc5a19eb4d0a00b86c2e9fedc9

2016-05-03 14:59 +0000 [1a833b9739]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_outbound_publish: Ref leak in off nominal callback paths

	  There were a few spots where the client object's reference was being leaked in
	  sip_outbound_publish_callback. This patch cleans up those leaks.

	  Change-Id: I485d0bc9335090f373026f77c548042e258461df

2016-05-03 15:39 +0000 [4752ef02e0]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_outbound_publish: Won't unload if condition wait times out

	  When res_pjsip_outbound_publish unloads it has to wait for all current
	  publishing objects to get done. However if the wait condition times out
	  then it does not fail the unload. This sometimes results in an infinite
	  loop check while unloading. This patch now fails the unload operation if
	  the condition times out.

	  Change-Id: Id57b8cbed9d61222690fcba1e4f18e259df4c7ec

2016-05-05 11:37 +0000 [4d063814ba]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_authenticator_digest: Don't use source port in nonce verification

	  From the issue reporter:
	  "res_pjsip_outbound_authenticator_digest builds a nonce that is a hash of
	  the timestamp, the source address, the source port, a server UUID that is
	  calculated at startup, and the authentication realm.

	  Rather than caching nonces that we create, we instead attempt to re-calculate
	  the nonce when receiving an incoming request with authentication. We then
	  compare the re-calculated nonce to the incoming nonce, and if they don't match,
	  then authentication has failed early.

	  The problem is that it is possible, especially when using TCP, to receive two
	  requests from the same endpoint but have differing source ports for those
	  requests. Asterisk itself commonly will use different source ports for
	  outbound TCP requests."

	  This patch removes the source port dependency when building the nonce.

	  ASTERISK-25978 #close

	  Change-Id: I871b5f4adce102df1c4988066283095ec509dffe

2016-05-07 14:39 +0000 [fb6227a372]  gtjoseph <gjoseph@digium.com>

	* config_transport:  Tell pjproject to allow all SSL/TLS protocols

	  The default tls settings for pjproject only allow TLS 1, TLS 1.1 and TLS 1.2.
	  SSL is not allowed.   So, even if you specify "sslv3" for a transport method,
	  it's silently ignored and one of the TLS protocols is used.  This was a new
	  behavior of pjsip_tls_setting_default() in 2.4 (when tls.proto was added) that
	  we never caught.

	  Now we need to set tls.proto = 0 after we call pjsip_tls_setting_default().
	  This tells pjproject to set the socket protocol to match the method.

	  ASTERISK-26004 #close

	  Change-Id: Icfb55c1ebe921298dedb4b1a1d3bdc3ca41dd078

2016-05-04 02:40 +0000 [2db17a793c]  Jaco Kroon <jaco@uls.co.za>

	* app_confbridge: Add a regcontext option for confbridge bridge profiles.

	  This patch allows for having app_confbridge register the name of the
	  conference as an extension into a specific context, similar to
	  regcontext for chan_sip.  This variant is not quite as involved as the
	  one in chan_sip and doesn't allow for multiple contexts or custom
	  extensions, you can only specify the context and the conference name
	  will always be used as the extension to register.

	  ASTERISK-25989 #close

	  Change-Id: Icacf94d9f2b5dfd31ef36f6cb702392619a7902f

2016-05-08 20:19 +0000 [2a7130b8b0]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Check for python-dev and TEST_FRAMEWORK

	  The pjsua and pjsystest apps are now built only if TEST_FRAMEWORK is set.
	  The python bindings are now built only if TEST_FRAMEWORK is set and a
	  python development package is installed.

	  libresample was also disabled.

	  ASTERISK-25993 #close
	  Reported-by: Joshua Colp

	  Change-Id: If4e91c503a02f113d5b71bc8b972081fa3ff6f03

2016-05-04 15:16 +0000 [72eb7c8301]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: module load priority

	  The res_pjsip_authenticator_digest, res_pjsip_endpoint_identifier_*
	  and res_pjsip_registrar modules should load ASAP
	  to avoid "No matching endpoint found" for legitimate endpoint.

	  ASTERISK-25994

	  Change-Id: Iac95d95ad031e0be104189d29e923a2ad7c24a1b

2016-05-04 03:17 +0000 [dd00c71aae]  Chris Trobridge <christ.trobridge@ultra-aep.com>

	* config_options.c: Expand #ifdef to contain whole if statement.

	  ASTERISK-25956 #close

	  Change-Id: If6961ec54be276d5ab4f012ee7e7b420cb45de38

2016-05-05 15:16 +0000 [e6eb17efd9]  Alexei Gradinari <alex2grad@gmail.com>

	* stasis_endpoints: Add new Status and Headers to ContactStatus

	  ASTERISK-25903 added a new headers to AMI Event ContactStatusDetail.
	  ASTERISK-25904 added a new Status to AMI Event ContactStatusDetail.
	  These additions should be also in stasis_endpoints
	  to include in command "manager show event ContactStatus"

	  Change-Id: I7610ad02a998e1f26c20caa27aa50279d0164f6a

2016-05-05 05:07 +0000 [fa11f4c920]  Joshua Colp <jcolp@digium.com>

	* file: Ensure nativeformats remains valid for lifetime of use.

	  It is possible for the nativeformats of a channel to change
	  throughout its lifetime. As a result a user of it needs to either
	  ensure the channel is locked when accessing the formats or keep
	  a reference to the nativeformats themselves.

	  This change fixes the file playback support so it keeps a
	  reference to the nativeformats when accessing things.

	  ASTERISK-25998 #close

	  Change-Id: Ie45b65475e1481ddf05b874ee48f63e39fff8915

2016-04-15 09:32 +0000 [9c2032240e]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: improve realtime performance

	  This patch modified pjsip_options to retrieve only
	  permament contacts for aor if the qualify_frequency is > 0
	  and persisted contacts if the qualify_frequency is > 0.

	  This patch also fixed a bug in res_sorcery_astdb.
	  res_sorcery_astdb doesn't save object data retrived from astdb.

	  ASTERISK-25826

	  Change-Id: I1831fa46c4578eae5a3e574ee3362fddf08a1f05

2016-05-04 16:11 +0000 [fe38d21c2a]  Alexei Gradinari <alex2grad@gmail.com>

	* pjsip: Added "reg_server" to contacts (fixed alembic)

	  ASTERISK-25931

	  Change-Id: Icc4321a88f5c93ff809da3f372eebbf69c6a8549

2016-04-07 16:33 +0000 [7a14e669f0]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip/AMI: add contact.updated event

	  With the old SIP module AMI sends PeerStatus event on every
	  successfully REGISTER requests, ie, on start registration,
	  update registration and stop registration.

	  With PJSIP AMI sends ContactStatus only when status is changed.
	  Regarding registration:
	  on start registration - Created
	  on stop registration - Removed
	  but on update registration nothing

	  This patch added contact.updated event.

	  ASTERISK-25904

	  Change-Id: I8fad8aae9305481469c38d2146e1ba3a56d3108f

2016-05-02 16:08 +0000 [06d4ac0355]  Alexei Gradinari <alex2grad@gmail.com>

	* res_fax: add FAXMODE variable

	  The app_fax set FAXMODE variable, but res_fax missing this feature.
	  This patch add FAXMODE variable which is set to either "audio" or "T38".

	  ASTERISK-25980

	  Change-Id: Ie3dcbfb72cc681e9e267a60202f7fb8723a51b6b

2016-05-02 16:52 +0000 [2d17fe06c5]  Alexei Gradinari <alex2grad@gmail.com>

	* res_fax/t38_gateway: Peer V.21 session is created on wrong channel

	  The channel and peer V.21 sessions are created on the same channel now.
	  The peer V.21 session should be created only on peer channel
	  when one of channel can handle T.38.

	  Also this patch enable debug for T.38 gateway session
	  if global fax debug enabled.

	  ASTERISK-25982

	  Change-Id: I78387156ea521a77eb0faf170179ddd37a50430e

2016-05-01 02:21 +0000 [a2f19d82a8]  Diederik de Groot <dkgroot@talon.nl>

	* configs/basic-pbx/asterisk.conf: contains incorrect path separator

	  Note: When packagers use these files (as an example) the paths are never
	  really used when they are split using '='.

	  Note: Thirdparty applications will also have trouble parsing the file when
	  expecting '=>'.

	  Change-Id: I0ada647f588e81f023fb1333ca15a1a333fd6004

2016-04-30 17:52 +0000 [f39089f17c]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Various fixes discovered during testing of OSes

	  For all OSes:
	  * Disabled third-party codecs in pjproject and added
	    '--disable-speex-codec --disable-speex-aec --disable-gsm-codec' to the
	    configure options since we don't use the pjsip codec capability.

	  FreeBSD:
	  * Added FreeBSD support to install_prereq.
	  * Changed pjproject/configure.m4 to use $GNU_MAKE instead of hardcoding "make".
	  * Added __progname and environ to asterisk.exports.in.
	  * Reverted the use of ldconfig to create shared library symlinks to ln.
	  * Only enable epoll in pjproject if `uname -s` is Linux.
	  * Added a patch to pjproject to take the name of the 'make' command from
	    an environment variable if supplied.  This is needed for the python bindings.
	    (merged by Teluu into pjproject trunk 5/3/2016)
	  FreeBSD support isn't complete.  Still some general issues regarding
	  make/gmake having nothing to do with pjproject.  With some handholding it DOES
	  build successfully.

	  CentOS:
	  Added 'patch' and 'bzip2' to install_prereq PACKAGES_RH.
	  CentOS 6/7 32/64 build and run the pjsip testsuite successfully.

	  Ubuntu:
	  No changes required.
	  Ubuntu 15/16 32/64 build and run the pjsip testsuite successfully.

	  Debian:
	  No changes required.
	  Debian 6/7/8 32/64 build and run the pjsip testsuite successfully.

	  There will utimately be a follow-up patch to create an install_prereq for
	  the testsuite as I've discovered a few missing requirements.

	  ASTERISK-25968 #close

	  Change-Id: I5756a07facfc63798115a5e73a8709382fe9259c

2016-03-17 14:29 +0000 [8028fc7585]  Andrew Nagy <andrew.nagy@the159.com>

	* app_voicemail: always copy dynamic struct to avoid race condition

	  Voicemail email addresses can be corrupt or voicemail
	  emails can end up being sent to the wrong email address if asterisk is
	  reading voicemail.conf during a reload and processing an email at the
	  same time. This patch always copies the struct that would otherwise only
	  be copied once.

	  ASTERISK-24463 #close
	  Reported by: John Campbell
	  Tested by: Etienne Lessard
	  Tested by: Andrew Nagy
	  Change-Id: I3a0643813116da84e2617291903d0d489b7425fb

2016-04-15 14:26 +0000 [3cb8934de0]  Alexei Gradinari <alex2grad@gmail.com>

	* pjsip: Added "reg_server" to contacts.

	  If the Asterisk system name is set in asterisk.conf, it will be stored
	  into the "reg_server" field in the ps_contacts table to facilitate
	  multi-server setups.

	  ASTERISK-25931

	  Change-Id: Ia8f6bd2267809c78753b52bcf21835b9b59f4cb8

2016-04-28 11:35 +0000 [7992923c70]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Start body generator users after suppliers.

	  Change-Id: I8f0b57841feaab56c8a4e821b5ccb4e05e5fbadb

2016-04-28 16:06 +0000 [5dc0e082b2]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Add useful information to some messages.

	  Change-Id: Ia0b2e15773894c599e5c5748bbc70e99f434192a

2016-04-26 15:58 +0000 [f9e416f053]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Fix body generator registration race.

	  Change-Id: Id8752073ef06472a2fd96080f4009fac42843e67

2016-04-26 15:13 +0000 [b1b2019046]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.h: Fix doxygen association.

	  Change-Id: I110d3e3572598289fcd4215d966cf0c858f98632

2016-04-25 16:00 +0000 [b7f07fdff5]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_publish.c: Remove redundant flag check.

	  Change-Id: I0da80a3c3e0eae0c52ff27e7412ba027d6f52353

2016-04-28 16:54 +0000 [719ece5659]  gtjoseph <gjoseph@digium.com>

	* pjproject_bundled:  Disable PJSIP_UNESCAPE_IN_PLACE

	  When pjsip_parse_uri is called with PJSIP_UNESCAPE_IN_PLACE enabled,
	  the input uri string will become corrupted if it contains escape sequences.
	  It's not possible to automatically strdup or strdupa the input string because
	  the output uri pj_str_t's will have pointers to chunks of the input string.
	  Getting around this would require more memory management code and wouldn't
	  be worth the savings of doing the unescape in place.

	  ASTERISK-25970 #close
	  Reported-by: Dmitriy Serov

	  Change-Id: I28dc0e599b5108f7959b9c46dc8278371b372f88

2016-03-07 18:34 +0000 [38bed4515d]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Add ability to identify by Authorization username

	  A feature of chan_sip that service providers relied upon was the ability to
	  identify by the Authorization username.  This is most often used when customers
	  have a PBX that needs to register rather than identify by IP address.  From my
	  own experiance, this is pretty common with small businesses who otherwise
	  don't need a static IP.

	  In this scenario, a register from the customer's PBX may succeed because From
	  will usually contain the PBXs account id but an INVITE will contain the caller
	  id.  With nothing recognizable in From, the service provider's Asterisk can
	  never match to an endpoint and the INVITE just stays unauthorized.

	  The fixes:

	  A new value "auth_username" has been added to endpoint/identify_by that
	  will use the username and digest fields in the Authorization header
	  instead of username and domain in the the From header to match an endpoint,
	  or the To header to match an aor.  This code as added to
	  res_pjsip_endpoint_identifier_user rather than creating a new module.

	  Although identify_by was always a comma-separated list, there was only
	  1 choice so order wasn't preserved.  So to keep the order, a vector was added
	  to the end of ast_sip_endpoint.  This is only used by res_pjsip_registrar
	  to find the aor.  The res_pjsip_endpoint_identifier_* modules are called in
	  globals/endpoint_identifier_order.

	  Along the way, the logic in res_pjsip_registrar was corrected to match
	  most-specific to least-specific as res_pjsip_endpoint_identifier_user does.

	  The order is:

	  username@domain
	  username@domain_alias
	  username

	  Auth by username does present 1 problem however, the first INVITE won't have
	  an Authorization header so the distributor, not finding a match on anything,
	  sends a securty_alert.  It still sends a 401 with a challenge so the next
	  INVITE will have the Authorization header and presumably succeed.  As a result
	  though, that first security alert is actually a false alarm.

	  To address this, a new feature has been added to pjsip_distributor that keeps
	  track of unidentified requests and only sends the security alert if a
	  configurable number of unidentified requests come from the same IP in a
	  configurable amout of time.  Those configuration options have been added to
	  the global config object.  This feature is only used when auth_username
	  is enabled.

	  Finally, default_realm was added to the globals object to replace the hard
	  coded "asterisk" used when an endpoint is not yet identified.

	  The testsuite tests all pass but new tests are forthcoming for this new
	  feature.

	  ASTERISK-25835 #close
	  Reported-by: Ross Beer

	  Change-Id: I30ba62d208e6f63439600916fcd1c08a365ed69d

2016-04-27 13:23 +0000 [677d5b5151]  Mark Michelson <mmichelson@digium.com>

	* func_odbc: Check connection status before executing queries.

	  A recent change to func_odbc made it so that a single connection was
	  maintained per DSN. The problem was that the code was optimistic about
	  the health of the connection after initially opening it and did nothing
	  to re-connect in case the connection had died.

	  This change adds a check before executing a query to ensure that the
	  connection to the database is still up and running.

	  ASTERISK-25963 #close
	  Reported by Ross Beer

	  Change-Id: Id33c86eb04ff48ca088bb2e3086c27b3b683491d

2016-04-15 11:59 +0000 [df3639700a]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: disable multi domain to improve realtime performace

	  This patch added new global pjsip option 'disable_multi_domain'.
	  Disabling Multi Domain can improve Realtime performance by reducing
	  number of database requests.

	  ASTERISK-25930 #close

	  Change-Id: I2e7160f3aae68475d52742107949a799aa2c7dc7

2016-04-26 11:13 +0000 [949bf6b282]  Joshua Colp <jcolp@digium.com>

	* chan_sip: Give more time for TCP/TLS threads to stop.

	  The unload process currently tells each TCP/TLS to terminate but
	  does not wait for them to do so. This introduces a race condition
	  where the container holding the threads may be destroyed before
	  the threads are able to remove themselves from it. When they
	  finally do the container is invalid and can't be used causing a
	  crash.

	  A previous change existed which waited a bit to wait for any
	  stranglers to finish. This change extends this and waits longer.

	  ASTERISK-25961 #close

	  Change-Id: Idc6262b670ca49ede32061159e323b7b63c6f3c6

2016-04-26 05:48 +0000 [6959f5484b]  Joshua Colp <jcolp@digium.com>

	* app_queue: Fix crash when unloading module.

	  When unloading the app_queue module the members in each queue are
	  destroyed and as part of this they are removed from the pending
	  members container. Unfortunately a crash would occur as the container
	  was destroyed before the members were removed.

	  This change tweaks ordering so the container destruction occurs
	  after the members are destroyed.

	  ASTERISK-16115

	  Change-Id: I48c728668c55aee3d05b751a5d450fb57e87f44b

2016-04-24 22:51 +0000 [b38f1146e5]  gtjoseph <gjoseph@digium.com>

	* config:  Fix ast_config_text_file_save2 writability check for missing files

	  A patch I did back in 2014 modified ast_config_text_file_save2 to check the
	  writability of the main file and include files before truncating and re-writing
	  them.  An unintended side-effect of this was that if a file doesn't exist,
	  the check fails and the write is aborted.

	  This patch causes ast_config_text_file_save2 to check the writability of the
	  parent directory of missing files instead of checking the file itself.  This
	  allows missing files to be created again.  A unit test was also added to
	  test_config to test saving of config files.

	  The regression was discovered when app_voicemail's passwordlocation=spooldir
	  feature stopped working.

	  ASTERISK-25917 #close
	  Reported-by: Jonathan Rose

	  Change-Id: Ic4dbe58c277a47b674679e49daed5fc6de349f80

2016-04-21 23:53 +0000 [29bab0d1a4]  Kirill Katsnelson <kkm@smartaction.com>

	* chan_sip: Make autocreated peers send PeerStatus events

	  Since Stasis has been introduced, an attempt to send AMI messages by an
	  autocreated peer caused a crash, and all events from autocreated peers were
	  semi-inadvertently disabled altogether in 0b83761. This change restores the
	  disabled functionality.

	  ASTERISK-25950

	  Change-Id: Iecc350f23db603fadb2f302064643ebe9664e974

2016-04-21 14:23 +0000 [c345e530f4]  Kevin Harwell <kharwell@digium.com>

	* app_queue: queue members can receive multiple calls

	  It was possible for a queue member that is a member of at least 2 or more
	  queues to receive mulitiple calls at the same time. This happened because
	  of a race between when a member was being rung and when the device state
	  notified the other queue(s) member object of the state change.

	  This patch makes it so when a queue member is being rung it gets added to
	  a global pool of queue members. If that same member is tried again, e.g.
	  from another queue, and it is found to already exist in the pending member
	  container then it will not ring that member.

	  ASTERISK-16115 #close

	  Change-Id: I546dd474776d158c2b6be44205353dee5bac7e48

2016-04-25 08:11 +0000 [c0688a6398]  Javier Acosta <javier.acosta@beeonline.es>

	* Fix case sensitive actions in AMI QueueSummary and QueueStatus

	  ASTERISK-25954 #close
	  Reported by: Javier Acosta

	  Change-Id: I00be83d45cc7e8385de2523012bd196aafeeb256

2016-04-22 15:25 +0000 [ebf0724a83]  Richard Mudgett <rmudgett@digium.com>

	* test_message.c: Wait longer in case dialplan also processes the test message.

	  Bumped the wait from 1 second to 5 seconds.  The test message was hitting my
	  default call handler and failing the test because it took longer.

	  Change-Id: I3a03737f25e92983de00548fcc7bbc50dd7544ba

2016-04-12 15:29 +0000 [ba63aa7c9e]  Richard Mudgett <rmudgett@digium.com>

	* Manager: Short circuit AMI message processing.

	  Improve AMI message processing performance if there are no consumers
	  listening for the messages.  We now skip creating the AMI event message
	  text strings.

	  Change-Id: I7b22fc5ec4e500d00635c1a467aa8ea68a1bb2b3

2016-04-13 17:54 +0000 [d5ee6acf28]  Richard Mudgett <rmudgett@digium.com>

	* manager.c: Eliminate most RAII_VAR usage.

	  * Made ast_manager_event_blob_create() not allocate the ao2 event object
	  with a lock as it is not needed.

	  Change-Id: I8e11bfedd22c21316012e0b9dd79f5918f644b7c

2016-04-13 17:09 +0000 [7303e3dc96]  Richard Mudgett <rmudgett@digium.com>

	* manager_channels.c: Fix allocation failure crash.

	  An earlier allocation failure failed to create a channel snapshot for the
	  AMI HangupRequest/SoftHangupRequest event which resulted in a crash in
	  channel_hangup_request_cb().  Where the stasis message gets generated
	  cannot tell if the NULL snapshot returned was because of an allocation
	  failure or the channel was a dummy channel.

	  * Made channel_hangup_request_cb() check if the channel blob has a
	  snapshot and exit if it doesn't.

	  * Eliminated the RAII_VAR usage in channel_hangup_request_cb().

	  Change-Id: I0b6a1c4e95cbb7d80b2a7054c6eadecc169dfd24

2016-04-13 13:50 +0000 [1e93f3d723]  Richard Mudgett <rmudgett@digium.com>

	* Bridge system: Fix memory leaks and double frees on impart failure.

	  You cannot reference the passed in features struct after calling
	  ast_bridge_impart().  Even if the call fails.

	  Change-Id: I902b88ba0d5d39520e670fb635078a367268ea21

2016-04-13 13:20 +0000 [5e388d4188]  Richard Mudgett <rmudgett@digium.com>

	* bridge_softmix.c: Fix crash if channel fails to join mixing tech.

	  softmix_bridge_join() failed because of an allocation failure.  To address
	  this, the softmix bridge technology now checks if the channel failed to
	  join softmix successfully.  In addition, the bridge now begins the process
	  of kicking the channel out of the bridge so we don't have channels
	  partially in the bridge for very long.

	  * Fix the test_channel_feature_hooks.c unit tests.  The test channel must
	  have a valid codec to join the simple_bridge technology.  This patch makes
	  joining a bridge more strict by not allowing partially joined channels to
	  remain in the bridge.

	  Change-Id: I97e2ade6a2bcd1214f24fb839fda948825b61a2b

2016-03-17 12:28 +0000 [9740277713]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Add serialized scheduler (res_pjsip/pjsip_scheduler.c)

	  There are several places that do scheduled tasks or periodic housecleaning,
	  each with its own implementation:

	  * res_pjsip_keepalive has a thread that sends keepalives.
	  * pjsip_distributor has a thread that cleans up expired unidentified requests.
	  * res_pjsip_registrar_expire has a thread that cleans up expired contacts.
	  * res_pjsip_pubsub uses ast_sched directly and then calls ast_sip_push_task.
	  * res_pjsip_sdp_rtp also uses ast_sched to send keepalives.

	  There are also places where we should be doing scheduled work but aren't.
	  A good example are the places we have sorcery observers to start registration
	  or qualify.  These don't work when changes are made to a backend database
	  without a pjsip reload.  We need to check periodically.

	  As a first step to solving these issues, a new ast_sip_sched facility has
	  been created.

	  ast_sip_sched wraps ast_sched but only uses ast_sched as a scheduled queue.
	  When a task is ready to run, ast_sip_task_pusk is called for it. This ensures
	  that the task is executed in a PJLIB registered thread and doesn't hold up the
	  ast_sched thread so it can immediately continue processing the queue.  The
	  serializer used by ast_sip_sched is one of your choosing or a random one from
	  the res_pjsip pool if you don't choose one.

	  Another feature is the ability to automatically clean up the task_data when the
	  task expires (if ever).  If it's an ao2 object, it will be dereferenced, if
	  it's a malloc'd object it will be freed.  This is selectable when the task is
	  scheduled.  Even if you choose to not auto dereference an ao2 task data object,
	  the scheduler itself maintains a reference to it while the task is under it's
	  control.  This prevents the data from disappearing out from under the task.

	  There are two scheduling models.

	  AST_SIP_SCHED_TASK_PERIODIC specifies that the invocations of the task occur at
	  the specific interval.  That is, every "interval" milliseconds, regardless of
	  how long the task takes.  If the task takes longer than the interval, it will
	  be scheduled at the next available multiple of interval.  For exmaple: If the
	  task has an interval of 60 secs and the task takes 70 secs (it better not),
	  the next invocation will happen at 120 seconds.

	  AST_SIP_SCHED_TASK_DELAY specifies that the next invocation of the task should
	  start "interval" milliseconds after the current invocation has finished.

	  Also, the same ast_sched facility for fixed or variable intervals exists.  The
	  task's return code in conjunction with the AST_SIP_SCHED_TASK_FIXED or
	  AST_SIP_SCHED_TASK_VARIABLE flags controls the next invocation start time.

	  One res_pjsip.h housekeeping change was made.  The pjsip header files were
	  added to the top.  There have been a few cases lately where I've needed
	  res_pjsip.h just for ast_sip calls and had compiles fail spectacularly because
	  I didn't add the pjsip header files to my source even though I never referenced
	  any pjsip calls.

	  Finally, a few new convenience APIs were added to astobj2 to make things a
	  little easier in the scheduler.  ao2_ref_and_lock() calls ao2_ref() and
	  ao2_lock() in one go.  ao2_unlock_and_unref() does the reverse. A few macros
	  were also copied from res_phoneprov because I got tired of having to duplicate
	  the same hash, sort and compare functions over and over again. The
	  AO2_STRING_FIELD_(HASH|SORT|CMP)_FN macros will insert functions suitable for
	  aor_container_alloc into your source.

	  This facility can be used immediately for the situations where we already have
	  a thread that wakes up periodically or do some scheduled work.  For the
	  registration and qualify issues, additional sorcery and schema changes would
	  need to be made so that we can easily detect changed objects on a periodic
	  basis without having to pull the entire database back to check.  I'm thinking
	  of a last-updated timestamp on the rows but more on this later.

	  Change-Id: I7af6ad2b2d896ea68e478aa1ae201d6dd016ba1c

2016-04-25 21:43 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.9.0-rc1 Released.

2016-04-25 16:42 +0000 [5237b7cd47]  Joshua Colp <jcolp@digium.com>

	* Release summaries: Add summaries for 13.9.0-rc1

2016-04-25 16:40 +0000 [5a3850ecba]  Joshua Colp <jcolp@digium.com>

	* .version: Update for 13.9.0-rc1

2016-04-25 16:40 +0000 [60b39040e4]  Joshua Colp <jcolp@digium.com>

	* .lastclean: Update for 13.9.0-rc1

2016-04-25 16:40 +0000 [5078454464]  Joshua Colp <jcolp@digium.com>

	* realtime: Add database scripts for 13.9.0-rc1

2016-04-22 17:53 +0000 [eb7c581806]  gtjoseph <gjoseph@digium.com>

	* res_agi:  Prevent run_agi from eating frames it shouldn't

	  The run_agi function is eating control frames when it shouldn't be. This is
	  causing issues when an AGI is run from CONNECTED_LINE_SEND_SUB in a blond
	  transfer.

	  Alice calls Bob. Bob attended transfers to Charlie but hangs up before Charlie
	  answers.

	  Alice gets the COLP UPDATE indicating Charlie but Charlie never gets an UPDATE
	  and is left thinking he's connected to Bob.

	  In this case, when CONNECTED_LINE_SEND_SUB runs on Alice's channel and it calls
	  an AGI, the extra eaten frames prevent CONNECTED_LINE_SEND_SUB from running on
	  Charlie's channel.

	  The fix was to accumulate deferrable frames in the "forever" loop instead of
	  dropping them, and re-queue them just before running the actual agi command
	  or exiting.

	  ASTERISK-25951 #close

	  Change-Id: I0f4bbfd72fc1126c2aaba41da3233a33d0433645

2016-04-22 13:49 +0000 [068ae54c76]  Mark Michelson <mmichelson@digium.com>

	* func_odbc: Use one connection per DSN.

	  res_odbc was changed in Asterisk 13.8.0 to remove connection management,
	  opting instead to let unixodbc maintain open connections and return
	  those to Asterisk as requested.

	  This was a boon for realtime, since it meant that multiple threads could
	  potentially run parallel queries since they could each be using their
	  own database connections.

	  However, on the user-facing side, func_odbc, there were some inherent
	  behaviors being relied on that no longer hold true after the change.
	  One such reported behavior was that MySQL's LAST_INSERTED_ID() works
	  per-connection. This means that if Asterisk uses separate connections
	  for every database operation, whereas before it used one connection for
	  everything, we have broken expectations and functionality.

	  The fix provided in this patch is to make func_odbc use a single
	  database connection per DSN. This way, user-facing database usage will
	  have the same behavior as it did pre-13.8.0. However, realtime, which is
	  the real workhorse of database interaction, will continue to let
	  unixodbc manage connections.

	  ASTERISK-25938 #close
	  Reported by Edwin Vandamme

	  Change-Id: Iac961fe79154c6211569afcdfec843c0c24c46dc

2016-04-22 13:02 +0000 [6aeefa89bc]  Leif Madsen <leif@leifmadsen.com>

	* Remove reference to non-existent sip.conf option

	  Option was removed in commit 7f883ef495b57ae9182e47213d01d5e8009dbf3f

	  ASTERISK-25927 #close

	  Change-Id: I92f9b0196d9fc41d1d58354c07340c465ef1fcf8

2016-04-21 08:26 +0000 [e750ea9b5b]  Diederik de Groot <dkgroot@talon.nl>

	* lock.c: Check *lt before dereferencing it

	  *lt is NULL if t->tracking == 0

	  ASTERISK-25948 #close

	  Change-Id: I4a81af28f9c82a74aa82413d772a7dc8fa6f45ba

2016-04-15 14:36 +0000 [a036c35903]  Richard Mudgett <rmudgett@digium.com>

	* res_stasis: Handle re-enter stasis bridge with swap channel.

	  We lose the fact that there is a swap channel if there is one.  We
	  currently wind up rejoining the stasis bridge as a normal join after the
	  swap channel has already been kicked from the bridge.

	  This patch preserves the swap channel so the AMI/ARI events can note that
	  the channel joining the bridge is swapping with another channel.  Another
	  benefit to swaqpping in one operation is if there are any channels that
	  get lonely (MOH, bridge playback, and bridge record channels).  The lonely
	  channels won't leave before the joining channel has a chance to come back
	  in under stasis if the swap channel is the only reason the lonely channels
	  are staying in the bridge.

	  ASTERISK-25947 #close
	  Reported by: Richard Mudgett

	  ASTERISK-24649
	  Reported by: John Bigelow

	  ASTERISK-24782
	  Reported by: John Bigelow

	  Change-Id: If37ea508831d1fed6dbfac2f191c638fc0a850ee

2016-04-19 16:58 +0000 [9942d50aa5]  Richard Mudgett <rmudgett@digium.com>

	* bridge: Hold off more than one imparting channel at a time.

	  An earlier patch blocked the ast_bridge_impart() call until the channel
	  either entered the target bridge or it failed.  Unfortuantely, if the
	  target bridge is stasis and the imprted channel is not a stasis channel,
	  stasis bounces the channel out of the bridge to come back into the bridge
	  as a proper stasis channel.  When the channel is bounced out, that
	  released the block on ast_bridge_impart() to continue.  If the impart was
	  a result of a transfer, then it became a race to see if the swap channel
	  would get hung up before the imparted channel could come back into the
	  stasis bridge.  If the imparted channel won then everything is fine.  If
	  the swap channel gets hung up first then the transfer will fail because
	  the swap channel is leaving the bridge.

	  * Allow a chain of ast_bridge_impart()'s to happen before any are
	  unblocked to prevent the race condition described above.  When the channel
	  finally joins the bridge or completely fails to join the bridge then the
	  ast_bridge_impart() instances are unblocked.

	  ASTERISK-25947
	  Reported by: Richard Mudgett

	  ASTERISK-24649
	  Reported by: John Bigelow

	  ASTERISK-24782
	  Reported by: John Bigelow

	  Change-Id: I8fef369171f295f580024ab4971e95c799d0dde1

2016-04-19 17:52 +0000 [516c626a7d]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_callerid:  Clear out display name if id->name is not valid

	  When create_new_id_hdr creates a new RPID or PAI header, it starts by cloning
	  the From header, then it overwrites the display name and uri from the channel's
	  connected.id.  If the connected.id.name wasn't valid, create_new_id_hdr was
	  leaving the display name from the From header in the new RPID or PAI header.
	  On an attended transfer where the originator had a caller id number set but not
	  a display name, the re-INVITE to the final transferee had the number of the
	  originator but the display name of the transferer.

	  Added a check to clear out the display name in the new header if
	  connected.id.name was invalid.

	  ASTERISK-25942 #close

	  Change-Id: I60b4bf7a7ece9b7425eba74151c0b4969cd2738b

2016-04-19 13:02 +0000 [ded3794fc6]  Joshua Colp <jcolp@digium.com>

	* app_talkdetect: Make the module core supported.

	  This module is used as part of testsuite tests to confirm
	  stuff works. I'm accordingly marking it as core as it is
	  required by those tests.

	  Change-Id: I558e7af7679b22b8ed641d7dd37ee4ca35b11e88

2016-04-18 12:12 +0000 [efae187217]  Mark Michelson <mmichelson@digium.com>

	* PJSIP: Remove PJSIP parsing functions from uri length validation.

	  The PJSIP parsing functions provide a nice concise way to check the
	  length of a hostname in a SIP URI. The problem is that in order to use
	  those parsing functions, it's required to use them from a thread that
	  has registered with PJLib.

	  On startup, when parsing AOR configuration, the permanent URI handler
	  may not be run from a PJLib-registered thread. Specifically, this could
	  happen when Asterisk was started in daemon mode rather than
	  console-mode. If PJProject were compiled with assertions enabled, then
	  this would cause Asterisk to crash on startup.

	  The solution presented here is to do our own parsing of the contact URI
	  in order to ensure that the hostname in the URI is not too long. The
	  parsing does not attempt to perform a full SIP URI parse/validation,
	  since the hostname in the URI is what is important.

	  ASTERISK-25928 #close
	  Reported by Joshua Colp

	  Change-Id: Ic3d6c20ff3502507c17244a8b7e2ca761dc7fb60

2016-04-18 17:00 +0000 [f436b9ab11]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_registrar: Fix bad memory-ness with user_agent.

	  Recent changes to the PJSIP registrar resulted in tests failing due to
	  missing AOR_CONTACT_ADDED test events. The reason for this was that the
	  user_agent string had junk values in it, resulting in being unable to
	  generate the event.

	  I'm going to be honest here, I have no idea why this was happening. Here
	  are the steps needed for the user_agent variable to get messed up:
	  * REGISTER is received
	  * First contact in the REGISTER results in a contact being removed
	  * Second contact in the REGISTER results in a contact being added
	  * The contact, AOR, expiration, and user agent all have to be passed as
	    format parameters to the creation of a string. Any subset of those
	    parameters would not be enough to cause the problem.

	  Looking into what was happening, the thing that struck me as odd was
	  that the user_agent variable was meant to be set to the value of the
	  User-Agent SIP header in the incoming REGISTER. However, when removing a
	  contact, the user_agent variable would be set (via ast_strdupa inside a
	  loop) to the stored contact's user_agent. This means that the
	  user_agent's value would be incorrect when attempting to process further
	  contacts in the incoming REGISTER.

	  The fix here is to use a different variable for the stored user agent
	  when removing a contact. Correcting the behavior to be correct also
	  means the memory usage is less weird, and the issue no longer occurs.

	  ASTERISK-25929 #close
	  Reported by Joshua Colp

	  Change-Id: I7cd24c86a38dec69ebcc94150614bc25f46b8c08

2016-04-18 13:41 +0000 [49bfdc9ac0]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_transport_management: Allow unload to occur.

	  At shutdown it is possible for modules to be unloaded that wouldn't
	  normally be unloaded. This allows the environment to be cleaned up.

	  The res_pjsip_transport_management module did not have the unload
	  logic in it to clean itself up causing the res_pjsip module to not
	  get unloaded. As a result the res_pjsip monitor thread kept going
	  processing traffic and timers when it shouldn't.

	  Change-Id: Ic8cadee131e3b2c436a81d3ae8bb5775999ae00a

2016-04-15 11:41 +0000 [f4693d1897]  Richard Mudgett <rmudgett@digium.com>

	* bridge_channel.c: Ignore role setup failure in channel push.

	  We have to setup the channel roles after the bridge class push is called
	  because the bridge class push callback may have set roles on the incoming
	  channel.  Since we have already partially pushed the channel into the
	  bridge and reversing what we have already done could be problematic, the
	  only thing we can do is press on to complete pushing the channel into the
	  bridge.

	  * Ignore any channel role setup errors after pushing the channel into a
	  bridge.  The channel may behave incorrectly in the bridge but we can no
	  longer abort the push at this time.

	  Change-Id: I08a97082b729052ee65cdca6bb730cf1289ede00

2016-04-17 15:37 +0000 [22335fe18a]  Jaco Kroon <jaco@uls.co.za>

	* chan_sip: Don't verify table if rtupdate=no

	  If rtupdate=no do not verify sipregs/peers table has updatable fields.

	  ASTERISK-25934 #close

	  Change-Id: Iaa2c53037b93daccc7e7333c40d61861847b856d

2016-04-18 04:53 +0000 [3b9d8b60b2]  ibercom <ibercom123@gmail.com>

	* app_queue: Frequent segfaults in function can_ring_entry()

	  ASTERISK-25888 #close

	  Change-Id: I007a2f2dd99823e04fb5be3ff01f02b0a2956117

2016-04-15 16:51 +0000 [724acb6ce7]  Richard Mudgett <rmudgett@digium.com>

	* stasis_bridge.c: Update stasis bridge push diagnostic messages.

	  Change-Id: I195b14994c9dcccb9452491ca20a885d2a54605a

2016-04-14 13:49 +0000 [5f78801859]  Mark Michelson <mmichelson@digium.com>

	* transport management: Register thread with PJProject.

	  The scheduler thread that kills idle TCP connections was not registering
	  with PJProject properly and causing assertions if PJProject was built in
	  debug mode.

	  This change registers the thread with PJProject the first time that the
	  scheduler callback executes.

	  AST-2016-005

	  Change-Id: I5f7a37e2c80726a99afe9dc2a4a69bdedf661283

2016-03-08 12:12 +0000 [7fb3724a77]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_transport_management: Kill idle TCP connections.

	  "Idle" here means that someone connects to us and does not send a SIP
	  request. PJProject will not automatically time out such connections, so
	  it's up to Asterisk to do it instead.

	  When we receive an incoming TCP connection, we will start a timer
	  (equivalent to transaction timer D) waiting to receive an incoming
	  request. If we do not receive a request in that timeframe, then we will
	  shut down the TCP connection.

	  ASTERISK-25796 #close
	  Reported by George Joseph

	  AST-2016-005

	  Change-Id: I7b0d303e5d140d0ccaf2f7af562071e3d1130ac6

2016-03-08 10:52 +0000 [707fd4dcd0]  Mark Michelson <mmichelson@digium.com>

	* Rename res_pjsip_keepalive res_pjsip_transport_management

	  ASTERISK-25796
	  Reported by George Joseph

	  AST-2016-005

	  Change-Id: Id322a05f927392293570599730050bc677d99433

2016-04-14 07:15 +0000 [0b4bb19e0b]  Mark Michelson <mmichelson@digium.com>

	* AST-2016-004: Fix crash on REGISTER with long URI.

	  Due to some ignored return values, Asterisk could crash if processing an
	  incoming REGISTER whose contact URI was above a certain length.

	  ASTERISK-25707 #close
	  Reported by George Joseph

	  Patches:
	  	0001-res_pjsip-Validate-that-URIs-don-t-exceed-pjproject-.patch

	  AST-2016-004

	  Change-Id: I0ed3898fe7ab10121b76c8c79046692de3a1be55

2016-04-12 13:10 +0000 [f6e080c6a4]  Richard Mudgett <rmudgett@digium.com>

	* bridge_softmix.c: Fix crash if could not allocate the dsp.

	  Fix off nominal crash where we could not setup the channel to process
	  frames for the softmix bridge technology because of allocation failure.

	  Change-Id: Ic307a8386e46bf551e48fcd1eb97276714d56372

2016-04-12 15:41 +0000 [cf15a2f2d3]  gtjoseph <george.joseph@fairview5.com>

	* pjproject:  Add patch for removing strip of '[]' from header params

	  From the patch submitted to Teluu on 4/12/2016
	  <<<<<<<<<
	  The wholesale stripping of '[]' from header parameters causes issues if
	  something (like a port) occurs after the final ']'.

	  '[2001:a::b]' will correctly parse to '2001:a::b'
	  '[2001:a::b]:8080' will correctly parse to '2001:a::b' but the scanner is left
	  with ':8080' and parsing stops with a syntax error.

	  I can't even find a case where stripping the '[]' is a good thing anyway.  Even
	  if you continued to parse and resulted in a string that looks like this...
	  '2001:a::b:8080', it's not valid.

	  This came up in Asterisk because Kamailio sends us a Contact with an alias
	  URI parameter that has an IPv6 address in it like this:
	  Contact: <sip:1171@127.0.0.1:5080;alias=[2001:1:2::3]~43691~6>
	  which should be legal but causes a syntax error because of the characters
	  after the final ']'.  Even if it didn't, the '[]' should still not be stripped.

	  I've run the Asterisk Test Suite for PJSIP (252 tests) many of which are IPv6
	  enabled.  No issues were caused by removing the code that strips the '[]'.
	  >>>>>>>>>>>

	  ASTERISK-25123 #close
	  Reported-by: Anthony Messina

	  Change-Id: I5cb33f4ebf07ee1f2b26d07caae715e2ec65595a

2016-04-12 09:10 +0000 [daa086fae4]  Joshua Colp <jcolp@digium.com>

	* app_voicemail: Fix test_voicemail_notify_endl test.

	  The test_voicemail_notify_endl test checks the end-of-line
	  characters of an email message to confirm that they are consistent.
	  The test wrongfully assumed that reading from the email message
	  into a buffer will always result in more than 1 character being
	  read. This is incorrect. If only 1 character was read the test
	  would go outside of the buffer and access other memory causing
	  a crash.

	  The test now checks to ensure that 2 or more characters are read
	  in ensuring the test stays within the buffer.

	  ASTERISK-25874 #close

	  Change-Id: Ic2c89cea6e90f2c0bc2d8138306ebbffd4f8b710

2016-04-07 12:02 +0000 [f896136460]  Alexei Gradinari <alex2grad@gmail.com>

	* app_voicemail/IMAP: function 'save_to_folder' creates wrong folder

	  If try to move message to Cust1 (number 5)
	  the function 'save_to_folder' tries to create Greeting folder instead of Cust1.

	  This patch fixed it by setting GREETINGS_FOLDER = -1

	  ASTERISK-24927 #close

	  Change-Id: I03d1a761894bcc2d130ec9b003bbcddc28e25c51

2016-04-07 16:18 +0000 [70b7673f09]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip: Add headers to AMI Event ContactStatusDetail

	  * Added Useragent and RegExpire headers to AMI Event
	  ContactStatusDetail with associated documentation.

	  ASTERISK-25903 #close

	  Change-Id: If3d121e943e588d016ba51d4eb9c6a421a562239

2016-04-11 16:20 +0000 [64ecd41c8f]  Alexei Gradinari <alex2grad@gmail.com>

	* Codecs: strip codec name while parsing allow/disallow options

	  Failed registration using PJSIP/Realtime if one of the codec name
	  in allow/disallow option is wrong or contains space.

	  This patch strip codec name.

	  ASTERISK-25914

	  Change-Id: Ifdf02de94e5ddbce305640f6f0666084a3b9283d

2016-04-11 14:26 +0000 [3f6c4667b8]  Jaco Kroon <jaco@uls.co.za>

	* core_unreal: Fix hangupcauses not getting set on Local channels

	  ASTERISK-25912 #close

	  Change-Id: I8e72e6894feaf36c9450f2788d205d07baec23aa

2016-04-01 13:30 +0000 [fe7e48db03]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip contact:  Lock expiration/addition of contacts

	  Contact expiration can occur in several places:  res_pjsip_registrar,
	  res_pjsip_registrar_expire, and automatically when anyone calls
	  ast_sip_location_retrieve_aor_contact.  At the same time, res_pjsip_registrar
	  may also be attempting to renew or add a contact.  Since none of this was locked
	  it was possible for one thread to be renewing a contact and another thread to
	  expire it immediately because it was working off of stale data.  This was the
	  casue of intermittent registration/inbound/nominal/multiple_contacts test
	  failures.

	  Now, the new named lock functionality is used to lock the aor during contact
	  expire and add operations and res_pjsip_registrar_expire now checks the
	  expiration with the lock held before deleting the contact.

	  ASTERISK-25885 #close
	  Reported-by: Josh Colp

	  Change-Id: I83d413c46a47796f3ab052ca3b349f21cca47059

2016-04-10 14:16 +0000 [0c414eaf35]  gtjoseph <george.joseph@fairview5.com>

	* pjproject:  Add patch to fix Via IPv6 parsing

	  There's a bug in pjproject's sip_parser where the ":" wasn't correctly
	  interpreted. This is causing IPv6 addresses in the "received" parameter of the
	  Via header to cause a syntax check failure.

	  This patch was submitted to Teluu on 4/10/2016.

	  ASTERISK-25910 #close
	  Reported-by: Anthony Messina

	  Change-Id: Ic7e4c4aa14ded61860401ec349f5177568c4d922

2016-03-31 20:04 +0000 [772ff3048f]  gtjoseph <george.joseph@fairview5.com>

	* lock:  Add named lock capability

	  Locking some objects like sorcery objects can be tricky because the underlying
	  ao2 object may not be the same for all callers.  For instance, two threads that
	  call ast_sorcery_retrieve_by_id on the same aor name might actually get 2
	  different ao2 objects if the underlying wizard had to rehydrate the aor from a
	  database. Locking one ao2 object doesn't have any effect on the other even if
	  those objects had locks in the first place.

	  Named locks allow access control by keyspace and key strings.  Now an "aor"
	  named "1000" can be locked and any other thread attempting to lock "aor" "1000"
	  will wait regardless of whether the underlying ao2 object is the same or not.
	  Mutex and rwlocks are supported.

	  This capability will initially be used to lock an aor when multiple threads may
	  be attempting to prune expired contacts from it.

	  Change-Id: If258c0b7f92b02d07243ce70e535821a1ea7fb45

2016-04-05 16:56 +0000 [fd601f26f7]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip_outbound_publish: Add transport for outbound PUBLISH

	  The first available transport of the appropriate type is used now.
	  This patch adds new config option 'transport' for outbound-publish.
	  If transport is set then outbound PUBLISH requests will use this transport.

	  ASTERISK-25901 #close

	  Change-Id: Ib389130489b70e36795b0003fa5fd386e2680151

2016-04-07 16:39 +0000 [5f768d2a9c]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip_dialog_info: Add missing "direction" attribute in NOTIFY event

	  BLF pickup isn't working on Cisco SPA and Snom phones
	  if the direction="recipient" attribute is missing in 'dialog' tag.

	  This patch adds direction="recipient" if extension state is
	  Ringing.

	  ASTERISK-24601 #close

	  Change-Id: I5b2c097ca29fd59e92ba237ca5d397cb1b0bcd8c

2016-04-07 10:59 +0000 [82638fb0c7]  Richard Mudgett <rmudgett@digium.com>

	* pbx.c: Minor code rearangements.

	  * Pull out a loop invariant.

	  * Convert an else-if ladder to a switch statement.

	  Change-Id: I0a95cfa9474a4600b9865f7b444534d275b37e95

2016-04-07 11:37 +0000 [bc320df173]  Alexei Gradinari <alex2grad@gmail.com>

	* app_voicemail/IMAP: IMAP access FATAL error: Out of memory

	  Sometimes uw-imap function 'mail_fetchbody' returns huge len
	  which then pass to uw-imap function 'rfc822_base64'.
	  uw-imap tries to allocate huge memory and abort() on fail.

	  This patch check the len.
	  If the len more than max size (128 Mbytes) log error.
	  This patch also set variables len, newlen to avoid uninizialezed len.
	  This patch also check pointer returned by rfc822_base64.

	  ASTERISK-25899 #close

	  Change-Id: I4a0e7d655f11abef6a5224e2169df6d5c1f1caca

2016-04-07 12:26 +0000 [2ef8a954b3]  Richard Mudgett <rmudgett@digium.com>

	* pbx: Update doxygen for extension state watchers.

	  Change-Id: Id1403b12136de62a272c01bb355aef65fd2c2d1e

2016-04-07 11:49 +0000 [d312fdeb1b]  gtjoseph <george.joseph@fairview5.com>

	* alembic:  Remove batch operations (and sqlite support)

	  Because SQLite doesn't support full ALTER capabilities, alembic scripts
	  require batch operations.  However, that capability wasn't available until
	  0.7.0 which some distributions haven't reached yet.  Therefore, the batch
	  operations introduced in commit 86d6e44cc (review 2319) have been reverted
	  and SQLite is unsupported again, for now anyway.

	  Tested the full upgrade and downgrade on MySQL/Mariadb and Postgresql.

	  ASTERISK-25890 #close
	  Reported-by: Harley Peters

	  Change-Id: I82eba5456736320256f6775f5b0b40133f4d1c80

2016-04-07 11:05 +0000 [901e8d78c4]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_registrar_expire: Fix race condition at shutdown.

	  When shutting down, the PJSIP sorcery is destroyed. The registrar
	  expiration module queries the PJSIP sorcery to determine what
	  to expire. As there was no synchronization between termination
	  of the expiration thread and the unloading of the module it was
	  possible for the thread to try to access the PJSIP sorcery after
	  it had been destroyed.

	  This change ensures that the thread is shut down before allowing
	  the module to be considered unloaded.

	  Change-Id: I69fd239edbaaf160c2d37ae00d3ac06e5596fe8b

2016-04-06 16:28 +0000 [8207372e66]  Joshua Colp <jcolp@digium.com>

	* res_pjsip: Fix configuration setting of "regcontext".

	  Due to a merge problem two options were swapped causing the
	  regcontext setting to not get set.

	  Change-Id: Icb33edc668e7357bacbaec2861a6b5ac64edaff1

2016-04-06 08:01 +0000 [0735a4d6d7]  Jacek Konieczny <jkonieczny@eggsoft.pl>

	* frame.c: Copy the whole subclass in ast_frdup().

	  The problem is ast_frdup() does not copy whole frame.subclass for voice,
	  video and image frames, only the format is copied.  For video frames, the
	  subclass structure contains the .frame_ending flag used to put the RTP
	  marker where it needs to be.

	  ASTERISK-25894 #close

	  Change-Id: I812ca90e84ed5d4f473b997d0dd0d3c5a915fe33

2016-04-05 14:23 +0000 [c61dca6419]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Handle deferred SDP hold/unhold properly.

	  Some SIP devices indicate hold/unhold using deferred SDP reinvites. In
	  other words, they provide no SDP in the reinvite.

	  A typical transaction that starts hold might look something like this:

	  * Device sends reinvite with no SDP
	  * Asterisk sends 200 OK with SDP indicating sendrecv on streams.
	  * Device sends ACK with SDP indicating sendonly on streams.

	  At this point, PJMedia's SDP negotiator saves Asterisk's local state as
	  being recvonly.

	  Now, when the device attempts to unhold, it again uses a deferred SDP
	  reinvite, so we end up doing the following:

	  * Device sends reinvite with no SDP
	  * Asterisk sends 200 OK with SDP indicating recvonly on streams
	  * Device sends ACK with SDP indicating sendonly on streams

	  The problem here is that Asterisk offered recvonly, and by RFC 3264's
	  rules, if an offer is recvonly, the answer has to be sendonly. The
	  result is that the device is not taken off hold.

	  What is supposed to happen is that Asterisk should indicate sendrecv in
	  the 200 OK that it sends. This way, the device has the freedom to
	  indicate sendrecv if it wants the stream taken off hold, or it can
	  continue to respond with sendonly if the purpose of the reinvite was
	  something else (like a session timer refresher).

	  The fix here is to alter the SDP negotiator's state when we receive a
	  reinvite with no SDP. If the negotiator's state is currently in the
	  recvonly or inactive state, then we alter our local state to be
	  sendrecv. This way, we allow the device to indicate the stream state as
	  desired.

	  ASTERISK-25854 #close
	  Reported by Robert McGilvray

	  Change-Id: I7615737276165eef3a593038413d936247dcc6ed

2016-03-27 23:33 +0000 [50b0922a22]  gtjoseph <george.joseph@fairview5.com>

	* config:  Allow filters when appending to a category

	  In sorcery based config files where there are multiple categories with the same
	  name, you can't use the (+) operator to reliably append to a category because
	  config.c stops looking when it finds the first one with the same name.

	  Example:

	  [1000]
	  type = endpoint

	  [1000]
	  type = aor

	  [1000](+)
	  authenticate_qualify = yes

	  This config will fail because config.c appends authenticate_qualify to the
	  first category it finds, the endpoint, and that's not valid for endpoint.

	  Solution:

	  The capability to find a category that contains a certain variable already
	  exists so the only real change was to parse anything after the '+' that's not a
	  comma, as a filter string.

	  [1000]
	  type = endpoint

	  [1000]
	  type = aor

	  [1000](+type=aor)
	  authenticate_qualify = yes

	  This now works as expected.

	  Although the following example doesn't make any sense for pjsip, you can even
	  specify multiple filters:

	  [1000](+type=aor&qualify_frequency=10)

	  ASTERISK-25868 #close
	  Reported-by: Nick Repin

	  Change-Id: I10773da4c79db36fbf1993961992af63d3441580

2016-04-05 10:21 +0000 [cb56ef8069]  Joshua Colp <jcolp@digium.com>

	* res_http_websocket: Make core supported.

	  Websockets are a core part of ARI support and as such this
	  module should also be core supported.

	  Change-Id: I8f9283c6a167152761b92984779bb39e3db51a9c

2016-03-25 23:22 +0000 [f6f4cf459f]  gtjoseph <george.joseph@fairview5.com>

	* stringfields:  Refactor to allow fields to be added to the end of structures

	  String fields are great, except that you can't add new ones without breaking
	  ABI compatibility because it shifts down everything else in the structure.
	  The only alternative is to add your own char * field to the end of the
	  structure and manage the memory yourself which isn't ideal, especially since
	  you then can't use the OPT_STRINGFIELD_T type.

	  Background:

	  The reason string fields had to be declared inside the
	  AST_DECLARE_STRING_FIELDS block was to facilitate iteration over all declared
	  fields for initialization, compare and copy.  Since AST_DECLARE_STRING_FIELDS
	  declared the pool, then the fields, then the manager, you could use the offsets
	  of the pool and manager and iterate over the sequential addresses in between to
	  access the fields. The actual pool, field allocation and field set operations
	  don't actually care where the field is.  It's just iteration over the fields
	  that was the problem.

	  Solution: Extended String Fields

	  An extended string field is one that is declared outside the
	  AST_DECLARE_STRING_FIELDS block but still (anywhere) inside the parent
	  structure.  Other than using AST_STRING_FIELD_EXTENDED instead of
	  AST_STRING_FIELD, it looks the same as other string fields.  It's storage comes
	  from the pool and it participates in string field compare and copy operations
	  peformed on the parent structure. It's also a valid target for the
	  OPT_STRINGFIELD_T aco option type.

	  Implementation:

	  To keep track of the extended fields and make sure that ABI isn't broken, the
	  existing embedded_pool pointer in the manager structure was repurposed to be a
	  pointer to a separate header structure that contains the embedded_pool pointer
	  plus a vector of fields.  The length of the manager structure didn't change and
	  the embedded_pool pointer isn't used in the macros, only the stringfields C
	  code.  A side benefit of this is that changing the header structure in the
	  future won't break ABI.

	  ast_string_fields_init initializes the normal string fields and appends them to
	  the vector, and subsequent calls to ast_string_field_init_extended initialize
	  and append the extended fields. Cleanup, ast_string_fields_cmp, and
	  ast_string_fields_copy can now work on the vector instead of sequentially
	  traversing the addresses between the pool and manager.

	  The total size of a structure using string fields didn't change, whether using
	  extended fields or not, nor have the offsets of any structure members, either
	  inside the original block or outside.  Adding an extended field to the end of a
	  structure is the same as adding a char *.

	  Details:

	  The stringfield C code was pulled out from utils.c and into stringfields.c.
	  It just made sense.

	  Additional work was done in ast_string_field_init and
	  ast_calloc_with_stringfields to handle the allocation of the new header
	  structure and the vector, and the associated cleanup.  In the process some
	  additional NULL pointer checking was added.

	  A lot of work was done in stringfields.h since the logic for compare and copy
	  is there.  Documentation was added as well as somne additional NULL checking.

	  The ability to call ast_calloc_with_stringfields with a number of structures
	  greater than 1 never really worked.  Well, the calloc worked but there was no
	  way to access the additional structures or clean them up.  It was agreed that
	  there was no use case for requesting more than 1 structure so an ast_assert
	  was added to prevent it and the iteration code removed.

	  Testing:

	  The stringfield unit tests were updated to test both normal and extended
	  fields.  Tests for ast_string_field_ptr_set_by_fields and
	  ast_calloc_with_stringfields were also added.

	  As an ABI test, 13 was compiled from git and the res_pjsip_* modules, except
	  res_pjsip itself, saved off.  The patch was then added and a full compile and
	  install was performed.  Then the older res_pjsip_* moduled were copied over the
	  installed versions so res_pjsip was new and the rest were old.  No issues.

	  contact->aor, which is a char * at the end of contact, was then changed to an
	  extended string field and a recompile and reinstall was performed, again
	  leaving stock versions of the the res_pjsip_* modules.  Again, no issues with
	  the res_pjsip_* modules using the old stringfield implementation and with
	  contact->aor as a char *, and res_pjsip itself using the new stringfield
	  implementation and contact->aor being an extended string field.

	  Finally, several existing string fields were converted to extended string
	  fields to test OPT_STRINGFIELD_T.  Again, no issues.

	  Change-Id: I235db338c5b178f5a13b7946afbaa5d4a0f91d61

2016-04-04 18:02 +0000 [fe448ac8a7]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_mwi:  Fix segv caused by 16c7d8e74a9af13f98c3c22aa9c43ce39965f6b7

	  I forgot the new voicemail_extension wasn't a stringfield and didn't check
	  for NULL where I should have.

	  Change-Id: I029482d5c2ab72474838750461bd46b0809c90fb

2016-04-03 11:47 +0000 [9d4318f798]  gtjoseph <george.joseph@fairview5.com>

	* install_prereq:  Fix check_installed_debs remove subversion

	  check_installed_debs wasn't handling virtual packages like libsrtp-dev and
	  libresample-dev and on multiarch systems it was accidentally filtering out all
	  packages if any :i386 packages were found instead of just filtering out the
	  :i386 packages themselves.

	  Change-Id: Ifd68da0d1ee30cc84df14de3f9b9079d7c3cecda

2016-04-01 13:09 +0000 [566601837e]  gtjoseph <george.joseph@fairview5.com>

	* utils.c:  Fix typo in handle_show_locks

	  ast_cli_allow_on_shutdown(e) should have been ast_cli_allow_at_shutdown(e).

	  Change-Id: I4f092495c0b2bfd85c2651e0b5877bf4d05d9faf

2016-03-30 18:34 +0000 [964f54bd5d]  gtjoseph <george.joseph@fairview5.com>

	* pjproject_bundled:  Fix use of LDCONFIG for shared library link creation

	  LDCONFIG apparently isn't set to something sane on all systems so the creation
	  of the shared library links fails.  Instead of just testing for non-blank,
	  main/Makefile now checks that LDCONFIG is actually executable and reverts to
	  LN if it isn't.

	  This applies to both libasteriskpj and libasteriskssl.

	  Thanks to 'abelbeck' for pointing out that the issue was LDCONFIG.

	  ASTERISK-25873 #close
	  Reported-by: Hans van Eijsden

	  Change-Id: I25b76379bc637726ec044b2c0e709b56b3701729

2016-03-30 13:31 +0000 [5f73c2ef0a]  Richard Mudgett <rmudgett@digium.com>

	* res_stasis.c: Protect channel datastore list from stasis end.

	  Change-Id: Ifadc469590bd4d5368e19d3763db3bd1f80fdb95

2016-03-29 18:06 +0000 [74d63f56ee]  Richard Mudgett <rmudgett@digium.com>

	* res_ari: Cannot get control also means channel is unavailable.

	  The only caller of ari_bridges_play_found() has this note:

	  If ari_bridges_play_found fails because the channel is unavailable for
	  playback, The channel will be removed from the playback list soon.  We can
	  keep trying to get channels from the list until we either get one that
	  will work or else there isn't a channel for this bridge anymore, in which
	  case we'll revert to ari_bridges_play_new.

	  Change-Id: Ib068141b367ccaa17be0dab4181c98e26c5127d6

2016-03-29 14:29 +0000 [cf49b44090]  Richard Mudgett <rmudgett@digium.com>

	* res_stasis_recording.c: Cleanup stasis_app_recording_find_by_name().

	  Change-Id: Ic7d93c402c498677a122505558859c853d4e5ac7

2016-03-28 14:23 +0000 [7f53f1d89e]  Richard Mudgett <rmudgett@digium.com>

	* core_unreal.c: Add clarification comment about channel ref.

	  Change-Id: I0be0627260cd8d6b6c3cc345949dcfdf32eff1f3

2016-03-29 13:47 +0000 [ecf4102d02]  Richard Mudgett <rmudgett@digium.com>

	* res_stasis: Add control ref to playback and recording structs.

	  The stasis_app_playback and stasis_app_recording structs need to have a
	  struct stasis_app_control ref.  Other threads can get a reference to the
	  playback and recording structs from their respective global container.
	  These other threads can then use the control pointer they contain after
	  the control struct has gone.

	  * Add control ref to stasis_app_playback and stasis_app_recording structs.

	  With the refs added, the control command queue can now have a circular
	  control reference which will cause the control struct to never get
	  released if the control's command queue is not flushed when the channel
	  leaves the Stasis application.  Also the command queue needs better
	  protection from adding commands if the control->is_done flag is set.

	  * Flush the control command queue on exit.

	  ASTERISK-25882 #close

	  Change-Id: I3cf1fb59cbe6f50f20d9e35a2c07ac07d7f4320d

2016-03-28 18:10 +0000 [a179aba65e]  Richard Mudgett <rmudgett@digium.com>

	* res_stasis: Fix crash on a hanging up channel.

	  * Give the struct stasis_app_control ao2 object a ref to the channel held
	  in the object.  Now the channel will still be around if a thread needs to
	  post a stasis message instead of crash because the topic was destroyed.

	  * Moved stopping any lingering silence generator out of the struct
	  stasis_app_control destructor and made it a part of exiting the Stasis
	  application.  Who knows which thread the destructor will be called under
	  so it cannot affect the channel's silence generator.  Not only was the
	  channel unprotected when the silence generator was stopped, stasis may no
	  longer even control the channel.

	  ASTERISK-25882

	  Change-Id: I21728161b5fe638cef7976fa36a605043a7497e4

2016-03-30 12:38 +0000 [16c7d8e74a]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_mwi:  Allow subscribe to vm access extension as an alias

	  Background:

	  If your extension is 1000 and the voicemail access extension is 1571 and you
	  dial 1571, usually a dialplan rule calls voicemailmain with your extension and
	  you are placed directly in your mailbox.  Therefore most admins program the
	  voicemail (or other speed dial) button on their phones to the access extension.
	  Some phones (Snom at least) use whatever is programmed there to also subscribe
	  for MWI and so can't dial one number and subscribe to another.  This works fine
	  in chan_sip because chan_sip completely ignores the user portion of the
	  SUBSCRIBE message request URI.  If it can match the peer, is subscribes to the
	  peer's mailbox.  The user could be set to anything or nothing and you'd still
	  get subscribed to your mailbox.

	  Issue:

	  chan_pjsip actually uses the user portion of the URI to find an aor and its
	  mailboxes.  Therefore a subscribe to 1571 results in a 404.  Sure, you can
	  create an aor for 1571 but you certainly can't add your entire voicemail
	  system's mailboxes to it and everyone would get notified of every MWI.

	  Solution:

	  When an MWI subscribe comes in and an aor can't be found that matches the
	  resource directly, check the resource against the endpoint's aors.  If an aor
	  is found that has a voicemail_extension that matches the resource, use it.

	  ASTERISK-25865
	  Reported-by: Ross Beer

	  Change-Id: I770ea185f751f1ada888fafb4b452115f1c06e9e

2016-03-24 22:55 +0000 [d8f0bc3572]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_mwi:  Add voicemail extension and mwi_subscribe_replaces_unsolicited

	  res_pjsip_mwi was missing the chan_sip "vmexten" functionality which adds
	  the Message-Account header to the MWI NOTIFY.  Also, specifying mailboxes
	  on endpoints for unsolicited mwi and on aors for subscriptions required
	  that the admin know in advance which the client wanted.  If you specified
	  mailboxes on the endpoint, subscriptions were rejected even if you also
	  specified mailboxes on the aor.

	  Voicemail extension:
	  * Added a global default_voicemail_extension which defaults to "".
	  * Added voicemail_extension to both endpoint and aor.
	  * Added ast_sip_subscription_get_dialog for support.
	  * Added ast_sip_subscription_get_sip_uri for support.

	  When an unsolicited NOTIFY is constructed, the From header is parsed, the
	  voicemail extension from the endpoint is substituted for the user, and the
	  result placed in the Message-Account field in the body.

	  When a subscribed NOTIFY is constructed, the subscription dialog local uri
	  is parsed, the voicemail_extension from the aor (looked up from the
	  subscription resource name) is substituted for the user, and the result
	  placed in the Message-Account field in the body.

	  If no voicemail extension was defined, the Message-Account field is not added
	  to the NOTIFY body.

	  mwi_subscribe_replaces_unsolicited:
	  * Added mwi_subscribe_replaces_unsolicited to endpoint.

	  The previous behavior was to reject a subscribe if a previous internal
	  subscription for unsolicited MWI was found for the mailbox.  That remains the
	  default.  However, if there are mailboxes also set on the aor and the client
	  subscribes and mwi_subscribe_replaces_unsolicited is set, the existing internal
	  subscription is removed and replaced with the external subscription.  This
	  allows an admin to configure mailboxes on both the endpoint and aor and allows
	  the client to select which to use.

	  ASTERISK-25865 #close
	  Reported-by: Ross Beer

	  Change-Id: Ic15a9415091760539c7134a5ba3dc4a6a1217cea

2016-03-30 09:46 +0000 [8dc8d6ceb8]  gtjoseph <george.joseph@fairview5.com>

	* res_rtp_asterisk:  Fix placement of txcount increment

	  Commit 1bce690ccb36a4744a327c07af23a9a3a0fa20cd was incrementing txcount
	  for rtcp packets as well as rtp packets and that was causing sender reports
	  to be generated instead of receiver reports in cases where no rtp was actually
	  being sent.

	  Moved the txcount increment from __rtp_sento, which handles both rtp and rtcp,
	  to rtp_sento which only handles rtp packets.

	  Discovered by the hep/rtcp-receiver test.

	  Change-Id: Ie442e4bb947a68847a676497021ba10ffaf376d5

2016-03-26 22:33 +0000 [c7eb18d865]  gtjoseph <george.joseph@fairview5.com>

	* chan_pjsip:  Add 'pjsip show channelstats'

	  Added the ability to show channel statistics to chan_pjsip (cli_functions.c)

	  Moved the existing 'pjsip show channel(s)' functionality from
	  pjsip_configuration to cli_functions.c.  The stats needed chan_pjsip's
	  private header so it made sense to move the existing channel commands as well.

	  Now using stasis_cache_dump to get the channel snapshots rather than retrieving
	  all endpoints, then getting each one's channel snapshots.  Much more efficient.

	  Change-Id: I03b114522126d27434030b285bf6d531ddd79869

2016-03-10 19:52 +0000 [1583559a06]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip/pjsip_options:  Fix From generation on outgoing OPTIONS

	  No one seemed to notice but every time an OPTIONS goes out, it goes
	  out with a From of "asterisk" (or whatever the default from_user is set to),
	  even if you specify an endpoint.

	  The issue had several causes...
	  qualify_contact is only called with an endpoint if called from the CLI.
	  If the endpoint is NULL, qualify_contact only looks up the endpoint if
	  authenticate_qualify=yes. Even then, it never passes it on to
	  ast_sip_create_request where the From header is set.  Therefore From
	  is always "asterisk" (or whatever the default from_user is set to).
	  Even if ast_sip_create_request were to get an endpoint, it only sets
	  the From if endpoint->from_user is set.

	  The fix is 4 parts...

	  First, create_out_of_dialog_request was modified to use the endpoint id
	  if endpoint was specified and from_user is not set.

	  Second, qualify_contact was modified to always look up an endpoint if
	  one wasn't specified regardless of authenticate_qualify.  It then passes
	  the endpoint on to create_out_of_dialog_request.

	  Third (and most importantly), find_an_endpoint was modified to find
	  an endpoint by using an "aors LIKE %contact->aor%" predicate with
	  ast_sorcery_retrieve_by_fields.  As such, this patch will only work
	  if the sorcery realtime optimizations patch goes in.  Otherwise we'd
	  be pulling the entire endpoints database every time we send an OPTIONS.
	  Since we already know the contact's aor, the on_endpoint callback was also
	  modified to just check if the contact->aor is an exact match to one of
	  the endpoint's.

	  Finally, since we now have an endpoint for every OPTIONS request,
	  res_pjsip/endpt_send_request (which handles out-of-dialog reqests) was
	  updated to get the transport from the endpoint and set it on tdata.
	  Now the correct transport is used.

	  Change-Id: I2207e12bb435e373bd1e03ad091d82e5aba011af
2016-03-25 10:59 +0000 [0cfab30b28]  Jacek Konieczny <jkonieczny@eggsoft.pl>

	* res_rtp_asterisk: Use separate SRTP session for RTCP with DTLS

	  Asterisk uses separate UDP ports for RTP and RTCP traffic and RFC 5764
	  explicitly states:

	    There MUST be a separate DTLS-SRTP session for each distinct pair of
	    source and destination ports used by a media session

	  This means RTP keying material cannot be used for DTLS RTCP, which was
	  the reason why RTCP encryption would fail.

	  ASTERISK-25642

	  Change-Id: I7e8779d8b63e371088081bb113131361b2847e3a

2016-03-25 10:42 +0000 [6a9c18fb59]  Jacek Konieczny <jkonieczny@eggsoft.pl>

	* app_echo: forward and generate VIDUPDATE frames

	  When using app_echo via WebRTC with VP8 video the video would appear
	  only after a few minutes, because there would be nothing to request
	  a full reference frame.

	  This fixes the problem in both ways:
	  - echos any VIDUPDATE frames received on the channel
	  - sends one such frame when first video frame is to be forwarded

	  This makes the echo work with Firefox and Chrome WebRTC implementation.

	  ASTERISK-25867 #close

	  Change-Id: I73bda87bf7532ee8bfb28d917045a21034908c1e

2016-03-27 12:53 +0000 [1bce690ccb]  gtjoseph <george.joseph@fairview5.com>

	* res_rtp_asterisk:  Fix packet stats on bridged connection

	  rxcount, txcount, rxoctetcount and txoctetcount weren't being calculated
	  for bridged streams because the calulations were being done after the
	  bridged short-circuit.  Actually, rxoctetcount wasn't ever being calculated.

	  Moved the calculations so they occur for all valid received packets and
	  all transmitted packets.  Also added rxoctetcount and txoctetcount to
	  ast_rtp_instance_stat.

	  Change-Id: I08fb06011a82d38c3b4068867a615068fbe59cbb

2016-03-25 23:19 +0000 [50f90d4099]  Philip Correia

	* res_parking: Fix blind transfer dynamic lots creation.

	  Blind transfers to a recognized parking extension need to use the parker's
	  channel variable values to create the dynamic parking lot.  This is
	  because there is always only one parker while the parkee may actually be a
	  multi-party bridge.  A multi-party bridge can never supply the needed
	  channel variables to create the dynamic parking lot.  In the multi-party
	  bridge blind transfer scenario, the parker's CHANNEL(parkinglot) value and
	  channel variables are inherited by the local channel used to park the
	  bridge.

	  * In park_common_setup(), make use the parker instead of the parkee to
	  supply the dynamic parking lot channel variable values.  In all but one
	  case, the parkee is the same as the parker.  However, in the recognized
	  parking extension blind transfer scenario for a two party bridge they are
	  different channels.  For consistency, we need to use the parker channel.

	  * In park_local_transfer(), pass the CHANNEL(parkinglot) value to the
	  local channel when blind transferring a multi-party bridge to a recognized
	  parking extension.

	  * When a local channel starts a call, the Local;2 side needs to inherit
	  the CHANNEL(parkinglot) value from Local;1.

	  The DTMF one-touch parking case wasn't even trying to create dynamic
	  parking lots before it aborted the attempt.

	  * In parking_park_call(), add missing code to create a dynamic parking
	  lot.

	  A DTMF bridge hook is documented as returning -1 to remove the hook.
	  Though the hook caller is really coded to accept non-zero.  See the
	  ast_bridge_hook_callback typedef.

	  * In feature_park_call(), don't remove the DTMF one-touch parking hook
	  because of an error.

	  ASTERISK-24605 #close
	  Reported by:  Philip Correia
	  Patches:
	        call_park.patch (license #6672) patch uploaded by Philip Correia

	  Change-Id: I221d3a8fcc181877a1158d17004474d35d8016c9

2016-03-08 15:55 +0000 [5aa5c49413]  gtjoseph <george.joseph@fairview5.com>

	* sorcery/res_pjsip:  Refactor for realtime performance

	  There were a number of places in the res_pjsip stack that were getting
	  all endpoints or all aors, and then filtering them locally.

	  A good example is pjsip_options which, on startup, retrieves all
	  endpoints, then the aors for those endpoints, then tests the aors to see
	  if the qualify_frequency is > 0.  One issue was that it never did
	  anything with the endpoints other than retrieve the aors so we probably
	  could have skipped a step and just retrieved all aors. But nevermind.

	  This worked reasonably well with local config files but with a realtime
	  backend and thousands of objects, this was a nightmare.  The issue
	  really boiled down to the fact that while realtime supports predicates
	  that are passed to the database engine, the non-realtime sorcery
	  backends didn't.

	  They do now.

	  The realtime engines have a scheme for doing simple comparisons. They
	  take in an ast_variable (or list) for matching, and the name of each
	  variable can contain an operator.  For instance, a name of
	  "qualify_frequency >" and a value of "0" would create a SQL predicate
	  that looks like "where qualify_frequency > '0'".  If there's no operator
	  after the name, the engines add an '=' so a simple name of
	  "qualify_frequency" and a value of "10" would return exact matches.

	  The non-realtime backends decide whether to include an object in a
	  result set by calling ast_sorcery_changeset_create on every object in
	  the internal container.  However, ast_sorcery_changeset_create only does
	  exact string matches though so a name of "qualify_frequency >" and a
	  value of "0" returns nothing because the literal "qualify_frequency >"
	  doesn't match any name in the objset set.

	  So, the real task was to create a generic string matcher that can take a
	  left value, operator and a right value and perform the match. To that
	  end, strings.c has a new ast_strings_match(left, operator, right)
	  function.  Left and right are the strings to operate on and the operator
	  can be a string containing any of the following: = (or NULL or ""), !=,
	  >, >=, <, <=, like or regex.  If the operator is like or regex, the
	  right string should be a %-pattern or a regex expression.  If both left
	  and right can be converted to float, then a numeric comparison is
	  performed, otherwise a string comparison is performed.

	  To use this new function on ast_variables, 2 new functions were added to
	  config.c.  One that compares 2 ast_variables, and one that compares 2
	  ast_variable lists.  The former is useful when you want to compare 2
	  ast_variables that happen to be in a list but don't want to traverse the
	  list.  The latter will traverse the right list and return true if all
	  the variables in it match the left list.

	  Now, the backends' fields_cmp functions call ast_variable_lists_match
	  instead of ast_sorcery_changeset_create and they can now process the
	  same syntax as the realtime engines.  The realtime backend just passes
	  the variable list unaltered to the engine.  The only gotcha is that
	  there's no common realtime engine support for regex so that's been noted
	  in the api docs for ast_sorcery_retrieve_by_fields.

	  Only one more change to sorcery was done...  A new config flag
	  "allow_unqualified_fetch" was added to reg_sorcery_realtime.
	  "no": ignore fetches if no predicate fields were supplied.
	  "error": same as no but emit an error. (good for testing)
	  "yes": allow (the default);
	  "warn": allow but emit a warning. (good for testing)

	  Now on to res_pjsip...

	  pjsip_options was modified to retrieve aors with qualify_frequency > 0
	  rather than all endpoints then all aors.  Not only was this a big
	  improvement in realtime retrieval but even for config files there's an
	  improvement because we're not going through endpoints anymore.

	  res_pjsip_mwi was modified to retieve only endpoints with something in
	  the mailboxes field instead of all endpoints then testing mailboxes.

	  res_pjsip_registrar_expire was completely refactored.  It was retrieving
	  all contacts then setting up scheduler entries to check for expiration.
	  Now, it's a single thread (like keepalive) that periodically retrieves
	  only contacts whose expiration time is < now and deletes them.  A new
	  contact_expiration_check_interval was added to global with a default of
	  30 seconds.

	  Ross Beer reports that with this patch, his Asterisk startup time dropped
	  from around an hour to under 30 seconds.

	  There are still objects that can't be filtered at the database like
	  identifies, transports, and registrations.  These are not going to be
	  anywhere near as numerous as endpoints, aors, auths, contacts however.

	  Back to allow_unqualified_fetch.  If this is set to yes and you have a
	  very large number of objects in the database, the pjsip CLI commands
	  will attempt to retrive ALL of them if not qualified with a LIKE.
	  Worse, if you type "pjsip show endpoint <tab>" guess what's going to
	  happen? :)  Having a cache helps but all the objects will have to be
	  retrieved at least once to fill the cache.  Setting
	  allow_unqualified_fetch=no prevents the mass retrieve and should be used
	  on endpoints, auths, aors, and contacts.  It should NOT be used for
	  identifies, registrations and transports since these MUST be
	  retrieved in bulk.

	  Example sorcery.conf:

	  [res_pjsip]
	  endpoint=config,pjsip.conf,criteria=type=endpoint
	  endpoint=realtime,ps_endpoints,allow_unqualified_fetch=error

	  ASTERISK-25826 #close
	  Reported-by: Ross Beer
	  Tested-by: Ross Beer

	  Change-Id: Id2691e447db90892890036e663aaf907b2dc1c67

2016-03-23 14:24 +0000 [05fc3a96d1]  Richard Mudgett <rmudgett@digium.com>

	* res_parking: Cleanup find_channel_parking_lot_name() usage.

	  Change-Id: I8f7a8890aef27824301c642d4d15407ac83e6f02

2016-03-18 14:01 +0000 [a4189763ab]  Richard Mudgett <rmudgett@digium.com>

	* res_parking: Misc fixes.

	  res/parking/parking_applications.c:

	  * Add malloc fail checks in setup_park_common_datastore().

	  * Fix playing parking failed announcement to only happen on non-blind
	  transfers in park_app_exec().  It could never go out before because a test
	  was provedly always false.

	  res/parking/parking_bridge.c:

	  * Fix NULL tolerance in generate_parked_user() because
	  bridge_parking_push() can theoretically pass a NULL parker channel if the
	  parker channel went away for some reason.

	  * Clarify some weird code dealing with blind_transfer in
	  bridge_parking_push().

	  res/parking/parking_bridge_features.c:

	  * Made park_local_transfer() set BLINDTRANSFER on the Local;1 channel
	  which will be bulk copied to the Local;2 channel on the subsequent
	  ast_call().  The additional advantage is if the parker channel has the
	  BLINDTRANSFER and ATTENDEDTRANSFER variables set they are now guaranteed
	  to be overridden.

	  res/parking/parking_manager.c:

	  * Fix AMI Park action input range checking of the Timeout header in
	  manager_park().

	  * Reduced locking scope to where needed in manager_park().

	  res/res_parking.c:

	  * Fix some off nominal missing unlocks by eliminating the returns.

	  Change-Id: Ib64945bc285acb05a306dc12e6f16854898915ca

2014-12-15 05:23 +0000 [6f95b5eda1]  Philip Correia

	* res_parking: Update parking documentation for dynamic parking lots.

	  * Remove duplicate res_parking.conf courtesytone config option
	  documentation.

	  ASTERISK-24596 #close
	  Reported by:  Philip Correia

	  ASTERISK-24605
	  Reported by:  Philip Correia
	  Patches:
	        call_park_app_doc.patch (license #6672) patch uploaded by Philip Correia

	  Change-Id: I90a92a891c6494dc08173e675856afcc4764c5b5

2016-03-24 14:08 +0000 [81ce60f6d4]  Alexander Traud <pabstraud@compuserve.com>

	* chan_sip: Do not send all codecs on INVITE. Do not break on Session-Timers.

	  Asterisk 13.7.0 included a fix for ASTERISK-24543, not to send all those
	  codecs, which the caller did not request/support. That fix was not complete
	  because on the second Session Timer all codecs were sent again. Some VoIP/SIP
	  clients interpreted that complete codec-list as a change in the SIP session.
	  Because of that, Asterisk did not send the RTP audio via NAT anymore which
	  created a non-audio scenario after the second Session Timer fired.

	  ASTERISK-24543 #close

	  Change-Id: I1881827816ab7fd47eb4287a95961179b34a0b66

2016-03-19 07:34 +0000 [c6e4c48e67]  Gianluca Merlo <gianluca.merlo@gmail.com>

	* config: fix flags in uint option handler

	  The configuration unsigned integer option handler sets flags for the
	  parser as if the option should be a signed integer (PARSE_INT32),
	  leading to errors on "out of range" values. Fix flags (PARSE_UINT32).

	  A fix to res_pjsip is also present which stops invalid flags from
	  being passed when registering sorcery object fields for qualify
	  status.

	  ASTERISK-25612 #close

	  Change-Id: I96b539336275e0e72a8e8033487d2c3344debd3e

2016-03-10 16:58 +0000 [59c8e189fd]  Mark Michelson <mmichelson@digium.com>

	* Restrict CLI/AMI commands on shutdown.

	  During stress testing, we have frequently seen crashes occur because a
	  CLI or AMI command attempts to access information that is in the process
	  of being destroyed.

	  When addressing how to fix this issue, we initially considered fixing
	  individual crashes we observed. However, the changes required to fix
	  those problems would introduce considerable overhead to the nominal
	  case. This is not reasonable in order to prevent a crash from occurring
	  while Asterisk is already shutting down.

	  Instead, this change makes it so AMI and CLI commands cannot be executed
	  if Asterisk is being shut down. For AMI, this is absolute. For CLI,
	  though, certain commands can be registered so that they may be run
	  during Asterisk shutdown.

	  ASTERISK-25825 #close

	  Change-Id: I8887e215ac352fadf7f4c1e082da9089b1421990
2016-03-24 07:45 +0000 [ff3eebf454]  Walter Doekes <walter+asterisk@wjd.nu>

	* musiconhold: Only warn if music class is not found in memory and database.

	  The log message when a MusicOnHold music class was not found was changed
	  from debug level to WARNING level in Asterisk 11.19 and 13.5.  For those
	  using realtime musiconhold, this message is wrong because it warns
	  before checking the database.

	  This changeset delays the warning until after the database has been
	  checked.

	  Reported-by: Conrad de Wet
	  ASTERISK-25444 #close

	  Change-Id: I6cfb2db2f9cfbd2bb3d30566ecae361c4abf6dbf

2016-03-24 05:38 +0000 [82e55e4883]  Walter Doekes <walter+asterisk@wjd.nu>

	* core/logging: Fix broken syslog levels on older glibc.

	  The fix to ASTERISK-25407 introduced the usage of LOG_MAKEPRI. However
	  this macro is broken in older glibc (< 2.17); it would left-shift the
	  facility a second time, causing the resultant priority to become
	  invalid.

	  The syslog manpage mentions nothing about LOG_MAKEPRI and suggests this:

	      The priority argument is formed by ORing the facility and the level
	      values [...].

	  ASTERISK-25510 #close
	  Reported by: Michael Newton

	  Change-Id: Ia89debe7fac5ad090c7ef595c0707f31bb1e3d03

2016-03-23 08:59 +0000 [d963a33749]  gtjoseph <george.joseph@fairview5.com>

	* pjproject-bundled:  Cleanups for reported issues

	  PortAudio should no longer be required
	  PJSIP_MAX_PKT_LEN is now 6000
	  Older autoconf issue fixed. (CentOS 6)

	  Change-Id: I463fa9586cbe7c6b3b603289f535bd8e361611dd

2015-11-20 08:02 +0000 [c5170677e7]  Francesco Castellano <francesco.castellano@messagenet.it>

	* chan_sip.c: Space after port causes unnecessary resolution attempt

	  check_via() already skips leading blanks where the sent-by address (with the
	  optional port) should be placed.

	  Since RFC 3261 allows for blanks between the port ant the Via parameters:
	  > https://tools.ietf.org/html/rfc3261#section-20.42
	  (actually it allows a lot of blanks more ;-)). I just switched from
	  ast_skip_blanks() to ast_strip() on the local copy of the string.

	  ASTERISK-21301 #close

	  Change-Id: Ie5b8fe5a07067b7c0dc9bcdd1707e99b23b02b06

2016-03-19 17:49 +0000 [51deadee38]  gtjoseph <george.joseph@fairview5.com>

	* progdocs:  Exclude ./third-party from documentation generation

	  We don't need pjproject's documentation embedded in Asterisk's.

	  Change-Id: Iea6f5a621c0f4e3168dda3321eaab258d9f24a17

2016-03-18 20:32 +0000 [aa2fcd244e]  Gianluca Merlo <gianluca.merlo@gmail.com>

	* func_aes: fix misuse of strlen on binary data

	  The encryption code for AES_ENCRYPT evaluates the length of the data to
	  be encoded in base64 using strlen. The data is binary, thus the length
	  of it can be underestimated at the first NULL character.
	  Reuse the write pointer offset to evaluate it, instead.

	  ASTERISK-25857 #close

	  Change-Id: If686b5d570473eb926693c73461177b35b13b186

2016-04-20 10:46 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.8.2 Released.

2016-04-20 05:45 +0000 [26d67ce885]  Joshua Colp <jcolp@digium.com>

	* Release summaries: Remove previous versions

2016-04-20 05:45 +0000 [d9909232ed]  Joshua Colp <jcolp@digium.com>

	* .version: Update for 13.8.2

2016-04-20 05:45 +0000 [fc57bb9b15]  Joshua Colp <jcolp@digium.com>

	* .lastclean: Update for 13.8.2

2016-04-20 05:45 +0000 [ac04474f38]  Joshua Colp <jcolp@digium.com>

	* realtime: Add database scripts for 13.8.2

2016-04-18 17:00 +0000 [91a3e1184f]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_registrar: Fix bad memory-ness with user_agent.

	  Recent changes to the PJSIP registrar resulted in tests failing due to
	  missing AOR_CONTACT_ADDED test events. The reason for this was that the
	  user_agent string had junk values in it, resulting in being unable to
	  generate the event.

	  I'm going to be honest here, I have no idea why this was happening. Here
	  are the steps needed for the user_agent variable to get messed up:
	  * REGISTER is received
	  * First contact in the REGISTER results in a contact being removed
	  * Second contact in the REGISTER results in a contact being added
	  * The contact, AOR, expiration, and user agent all have to be passed as
	    format parameters to the creation of a string. Any subset of those
	    parameters would not be enough to cause the problem.

	  Looking into what was happening, the thing that struck me as odd was
	  that the user_agent variable was meant to be set to the value of the
	  User-Agent SIP header in the incoming REGISTER. However, when removing a
	  contact, the user_agent variable would be set (via ast_strdupa inside a
	  loop) to the stored contact's user_agent. This means that the
	  user_agent's value would be incorrect when attempting to process further
	  contacts in the incoming REGISTER.

	  The fix here is to use a different variable for the stored user agent
	  when removing a contact. Correcting the behavior to be correct also
	  means the memory usage is less weird, and the issue no longer occurs.

	  ASTERISK-25929 #close
	  Reported by Joshua Colp

	  Change-Id: I7cd24c86a38dec69ebcc94150614bc25f46b8c08
	  (cherry picked from commit f436b9ab111f1ff57c6dd3970051f123b42c1103)

2016-04-18 13:41 +0000 [70e25ced60]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_transport_management: Allow unload to occur.

	  At shutdown it is possible for modules to be unloaded that wouldn't
	  normally be unloaded. This allows the environment to be cleaned up.

	  The res_pjsip_transport_management module did not have the unload
	  logic in it to clean itself up causing the res_pjsip module to not
	  get unloaded. As a result the res_pjsip monitor thread kept going
	  processing traffic and timers when it shouldn't.

	  Change-Id: Ic8cadee131e3b2c436a81d3ae8bb5775999ae00a
	  (cherry picked from commit 49bfdc9ac029e0ef17cd8e85d8d7b7731387a34e)

2016-04-18 12:12 +0000 [856931edc2]  Mark Michelson <mmichelson@digium.com>

	* PJSIP: Remove PJSIP parsing functions from uri length validation.

	  The PJSIP parsing functions provide a nice concise way to check the
	  length of a hostname in a SIP URI. The problem is that in order to use
	  those parsing functions, it's required to use them from a thread that
	  has registered with PJLib.

	  On startup, when parsing AOR configuration, the permanent URI handler
	  may not be run from a PJLib-registered thread. Specifically, this could
	  happen when Asterisk was started in daemon mode rather than
	  console-mode. If PJProject were compiled with assertions enabled, then
	  this would cause Asterisk to crash on startup.

	  The solution presented here is to do our own parsing of the contact URI
	  in order to ensure that the hostname in the URI is not too long. The
	  parsing does not attempt to perform a full SIP URI parse/validation,
	  since the hostname in the URI is what is important.

	  ASTERISK-25928 #close
	  Reported by Joshua Colp

	  Change-Id: Ic3d6c20ff3502507c17244a8b7e2ca761dc7fb60
	  (cherry picked from commit efae187217750e322cd6167705a33f888b631427)

2016-04-14 20:26 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.8.1 Released.

2016-04-14 15:26 +0000 [18e6f12e83]  Kevin Harwell <kharwell@digium.com>

	* Release summaries: Remove previous versions

2016-04-14 15:26 +0000 [625c07711a]  Kevin Harwell <kharwell@digium.com>

	* .version: Update for 13.8.1

2016-04-14 15:26 +0000 [584f1fb3c7]  Kevin Harwell <kharwell@digium.com>

	* .lastclean: Update for 13.8.1

2016-04-14 15:26 +0000 [1e37a63379]  Kevin Harwell <kharwell@digium.com>

	* realtime: Add database scripts for 13.8.1

2016-04-14 13:49 +0000 [dcf1b3c098]  Mark Michelson <mmichelson@digium.com>

	* transport management: Register thread with PJProject.

	  The scheduler thread that kills idle TCP connections was not registering
	  with PJProject properly and causing assertions if PJProject was built in
	  debug mode.

	  This change registers the thread with PJProject the first time that the
	  scheduler callback executes.

	  AST-2016-005

	  Change-Id: I5f7a37e2c80726a99afe9dc2a4a69bdedf661283

2016-03-08 12:12 +0000 [efafbb1319]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_transport_management: Kill idle TCP connections.

	  "Idle" here means that someone connects to us and does not send a SIP
	  request. PJProject will not automatically time out such connections, so
	  it's up to Asterisk to do it instead.

	  When we receive an incoming TCP connection, we will start a timer
	  (equivalent to transaction timer D) waiting to receive an incoming
	  request. If we do not receive a request in that timeframe, then we will
	  shut down the TCP connection.

	  ASTERISK-25796 #close
	  Reported by George Joseph

	  AST-2016-005

	  Change-Id: I7b0d303e5d140d0ccaf2f7af562071e3d1130ac6

2016-03-08 10:52 +0000 [159f639770]  Mark Michelson <mmichelson@digium.com>

	* Rename res_pjsip_keepalive res_pjsip_transport_management

	  ASTERISK-25796
	  Reported by George Joseph

	  AST-2016-005

	  Change-Id: Id322a05f927392293570599730050bc677d99433

2016-04-14 07:15 +0000 [c164ff004d]  Mark Michelson <mmichelson@digium.com>

	* AST-2016-004: Fix crash on REGISTER with long URI.

	  Due to some ignored return values, Asterisk could crash if processing an
	  incoming REGISTER whose contact URI was above a certain length.

	  ASTERISK-25707 #close
	  Reported by George Joseph

	  Patches:
	  	0001-res_pjsip-Validate-that-URIs-don-t-exceed-pjproject-.patch

	  AST-2016-004

	  Change-Id: I0ed3898fe7ab10121b76c8c79046692de3a1be55

2016-03-29 19:39 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.8.0 Released.

2016-03-29 14:39 +0000 [0f885f0076]  Mark Michelson <mmichelson@digium.com>

	* Release summaries: Add summaries for 13.8.0

2016-03-29 14:34 +0000 [a1fa37aebd]  Mark Michelson <mmichelson@digium.com>

	* Release summaries: Remove previous versions

2016-03-29 14:34 +0000 [e7de5fd439]  Mark Michelson <mmichelson@digium.com>

	* .version: Update for 13.8.0

2016-03-29 14:34 +0000 [8baf813848]  Mark Michelson <mmichelson@digium.com>

	* .lastclean: Update for 13.8.0

2016-03-29 14:34 +0000 [42469df205]  Mark Michelson <mmichelson@digium.com>

	* realtime: Add database scripts for 13.8.0

2016-03-22 18:31 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.8.0-rc1 Released.

2016-03-22 13:26 +0000 [a698424678]  Mark Michelson <mmichelson@lunkwill>

	* Release summaries: Add summaries for 13.8.0-rc1

2016-03-22 13:21 +0000 [e395a0b973]  Mark Michelson <mmichelson@lunkwill>

	* .version: Update for 13.8.0-rc1

2016-03-22 13:21 +0000 [38a86b2dbf]  Mark Michelson <mmichelson@lunkwill>

	* .lastclean: Update for 13.8.0-rc1

2016-03-22 13:21 +0000 [e0c8c8bf4a]  Mark Michelson <mmichelson@lunkwill>

	* realtime: Add database scripts for 13.8.0-rc1

2016-03-18 14:31 +0000 [6a40520fe9]  Kevin Harwell <kharwell@digium.com>

	* chan_pjsip: ref leak when checking direct_media_glare

	  Fix the reference leak introduced in the following commit:

	  9444ddadf8525d1ce66a1faf1db97f9f6c265ca4

	  ASTERISK-25849

	  Change-Id: I5cfefd5ee6c1c3a1715c050330aaa10e4d2a5e85
2016-03-16 12:37 +0000 [9444ddadf8]  Kevin Harwell <kharwell@digium.com>

	* chan_pjsip: transfers with direct media reinvite has wrong address/port

	  During a transfer involving direct media a race occurs between when the
	  transferer channel is swapped out, initiating rtp changes/updates, and the
	  subsequent reinvites.

	  When Alice, after speaking with Charlie (Bob is on hold), connects Bob and
	  Charlie invites are sent to each in order to establish the call between them.
	  Bob is taken off hold and Charlie is told to have his media flow through
	  Asterisk. However, if before those invites go out the bridge updates Bob's
	  and/or Charlie's rtp information with direct media data (i.e. address, port)
	  then the invite(s) will contain the remote data in the SDP instead of the
	  Asterisk data.

	  The race occurs in the native bridge glue code when updating the peer. The
	  direct_media_address can get set twice before sending out the first invite
	  during call connection. This can happen because the checking/setting of the
	  direct_media_address happened in one thread while the sending of the invite(s)
	  happened in another thread.

	  This fix removes the race condition by moving the checking/setting of the
	  direct_media_address to be in the same thread as the sending of the invites(s).
	  This serializes the checking/setting and sending so they can no longer happen
	  out of order.

	  ASTERISK-25849 #close

	  Change-Id: Idfea590175e74f401929a601dba0c91ca1a7f873

2015-10-19 07:11 +0000 [88240f98d9]  Rodrigo Ramírez Norambuena <a@rodrigoramirez.com>

	* install_prereq: Update repositories before install on Debian systems

	  When to install packages the indexed local is more old of the
	  version of software on the repository they have been upgraded by security
	  update then get the package will give 404 not found.

	  The patch prevent by update local index to repository for aptitude before
	  install.

	  ASTERISK-25495 #close

	  Reporte by: Rodrigo Ramírez Norambuena

	  Change-Id: I645959e553aac542805ced394cac2dca964051fa
	  (cherry picked from commit 88f3dbaec9509bfba8bc1de7799aa0dc65304bb5)

2015-06-03 20:12 +0000 [efcf9a96db]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* install_prereq: Check if is installed aptitude otherwise to install.

	  If in Debian or system based, dont have aptitude installed the script do
	  nothing. This patch checked if aptitude  installed, if not installed.

	  Also, if execute script with all packages installed yet, the script not show
	  nothing and return exit 1 because the command 'grep' get nothing from pipe from
	  'awk'.

	  ASTERISK-25113 #close
	  Reported By: Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	  Change-Id: Iebdff55805d3917166e5e08e0a1e2176f36ff27f
	  (cherry picked from commit 6737ded0581a9e1256bdfe30c1d747e7ca93f8b3)

2016-03-03 04:43 +0000 [2b1b8e382a]  Sergio Medina Toledo <lumasepa@gmail.com>

	* res_pjsip_refer.c: Fix seg fault in process of Refer-to header.

	  The "Refer-to" header of an incoming REFER request is parsed by
	  pjsip_parse_uri().  That function requires the URI parameter to be NULL
	  terminated.  Unfortunately, the previous code added the NULL terminator by
	  overwriting memory that may not be safe.  The overwritten memory results
	  could be benign, memory corruption, or a segmentation fault.  Now the URI
	  is NULL terminated safely by copying the URI to a new chunk of memory with
	  the correct size to be NULL terminated.

	  ASTERISK-25814 #close

	  Change-Id: I32565496684a5a49c3278fce06474b8c94b37342

2016-03-11 12:22 +0000 [de04308ae4]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix mwi resub deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  ASTERISK-25023 #close

	  Change-Id: I96d429c57a48861fd8bde63dd93db4e92dc3adb6

2016-03-10 17:01 +0000 [5f6627a8a4]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix registration timeout and expire deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  ASTERISK-25023

	  Change-Id: I2e40de89efc8ae6e8850771d089ca44bc604b508

2016-03-10 12:17 +0000 [32bd7a64f9]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix t38id deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  ASTERISK-25023

	  Change-Id: If595e4456cd059d7171880c7f354e844c21b5f5f

2016-03-09 16:34 +0000 [43556b800b]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix reinviteid deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  ASTERISK-25023

	  Change-Id: I9c11b9d597468f63916c99e1dabff9f4a46f84c1

2016-03-09 16:32 +0000 [38c1cdab2c]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix packet retransid deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  * Fix retrans_pkt() to call check_pendings() with both the owner channel
	  and the private objects locked as required.

	  * Refactor dialog retransmission packet list to safely remove packet
	  nodes.  The list nodes are now ao2 objects.  The list has a ref and the
	  scheduled entry has a ref.

	  ASTERISK-25023

	  Change-Id: I50926d81be53f4cd3d572a3292cd25f563f59641

2016-03-09 16:26 +0000 [e4ad55c888]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix waitid deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  * Made always run check_pendings() under the scheduler thread so scheduler
	  ids can be checked safely.

	  ASTERISK-25023

	  Change-Id: Ia834d6edd5bdb47c163e4ecf884428a4a8b17d52

2016-03-08 15:08 +0000 [98d5669c28]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix session timers deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  ASTERISK-25023

	  Change-Id: I6d65269151ba95e0d8fe4e9e611881cde2ab4900

2016-03-07 13:21 +0000 [9cb8f73226]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix autokillid deadlock potential.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  * Fix clearing autokillid in __sip_autodestruct() even though we could
	  reschedule.

	  ASTERISK-25023

	  Change-Id: I450580dbf26e2e3952ee6628c735b001565c368f

2016-03-07 18:28 +0000 [c5c7f48a15]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix provisional_keepalive_sched_id deadlock.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Stopping a scheduled event can result in a deadlock if the scheduled event
	  is running when you try to stop the event.  If you hold a lock needed by
	  the scheduled event while trying to stop the scheduled event then a
	  deadlock can happen.  The general strategy for resolving the deadlock
	  potential is to push the actual starting and stopping of the scheduled
	  events off onto the scheduler/do_monitor() thread by scheduling an
	  immediate one shot scheduled event.  Some restructuring may be needed
	  because the code may assume that the start/stop of the scheduled events is
	  immediate.

	  ASTERISK-25023

	  Change-Id: I98a694fd42bc81436c83aa92de03226e6e4e3f48

2016-03-09 11:22 +0000 [f959d84dfd]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Adjust how dialog_unlink_all() stops scheduled events.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  * Make dialog_unlink_all() unschedule all items at once in the sched
	  thread.

	  ASTERISK-25023

	  Change-Id: I7743072fb228836e8228b72f6dc46c8cc50b3fb4

2016-03-10 21:54 +0000 [5f3225ddcc]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Clear scheduled immediate events on unload.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  The reordering of chan_sip's shutdown is to handle any immediate events
	  that get put onto the scheduler so resources aren't leaked.  The typical
	  immediate events at this time are going to be concerned with stopping
	  other scheduled events.

	  ASTERISK-25023

	  Change-Id: I3f6540717634f6f2e84d8531a054976f2bbb9d20

2016-03-15 14:51 +0000 [7a74971771]  Richard Mudgett <rmudgett@digium.com>

	* sip/dialplan_functions.c: Fix /channels/chan_sip/test_sip_rtpqos crash.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  Delaying destruction of the chan_sip sip_pvt structures caused the
	  /channels/chan_sip/test_sip_rtpqos unit test to crash.  That test
	  registers a special test ast_rtp_engine with the rtp engine module.  When
	  the unit test completes it cleans up by unregistering the test
	  ast_rtp_engine and exits.  Since the delayed destruction of the sip_pvt
	  happens after the unit test returns, the destructor tries to call the rtp
	  engine destroy callback of the test ast_rtp_engine auto variable which no
	  longer exists on the stack.

	  * Change the test ast_rtp_engine auto variable to a static variable.  Now
	  the variable can still exist after the unit test exits so the delayed
	  sip_pvt destruction can complete successfully.

	  ASTERISK-25023

	  Change-Id: I61e34a12d425189ef7e96fc69ae14993f82f3f13

2016-03-15 13:31 +0000 [d2c09ed73b]  Andrew Nagy <andrew.nagy@the159.com>

	* app_stasis: Don't hang up if app is not registered

	  This prevents pbx_core from hanging up the channel if the app isn't
	  registered.

	  ASTERISK-25846 #close

	  Change-Id: I63216a61f30706d5362bc0906b50b6f0544aebce
2016-03-07 15:50 +0000 [b2d2906445]  Richard Mudgett <rmudgett@digium.com>

	* sched.c: Ensure oldest expiring entry runs first.

	  This patch is part of a series to resolve deadlocks in chan_sip.c.

	  * Updated sched unit test to check new behavior.

	  ASTERISK-25023

	  Change-Id: Ib69437327b3cda5e14c4238d9ff91b2531b34ef3

2016-03-04 18:25 +0000 [9ae21b510f]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Made sip_reinvite_retry() call sip_pvt_lock_full().

	  Change-Id: I90f04208a089f95488a2460185a8dbc3f6acca12

2016-03-07 18:56 +0000 [56bcb97a3c]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Simplify sip_pvt destructor call levels.

	  Remove destructor calling destroy_it calling really_destroy_it
	  for no benefit.  Just make the destructor the really_destroy_it
	  function.

	  Change-Id: Idea0d47b27dd74f2488db75bcc7f353d8fdc614a

2016-03-14 08:59 +0000 [677a65fcbb]  Joshua Colp <jcolp@digium.com>

	* build: Add configure check for proto field of PJSIP TLS transport setting.

	  Older versions of PJSIP do not have the proto field on the TLS transport
	  setting structure. This change adds a configure check so even if it is
	  not present we will still be able to build.

	  Change-Id: Ibf3f47befb91ed1b8194bf63888baa6fee05aba9

2016-03-12 16:02 +0000 [32f0a3d52a]  gtjoseph <george.joseph@fairview5.com>

	* build_system:  Split COMPILE_DOUBLE from DONT_OPTIMIZE

	  I can't ever recall actually needing the intermediate files or the checking
	  that a double compile produces.  What I CAN remember is every DONT_OPTIMIZE
	  build needing 3 invocations of gcc instead of 1 just to do the checks and
	  produce those intermediate files.

	  Having said that, Richard pointed out that the reason for the double compile
	  was that there were cases in the past where a submitted patch failed to compile
	  because the submitter never tried it with the optimizations turned on.

	  To get the best of both worlds, COMPILE_DOUBLE has been split into its own
	  option.  If DONT_OPTIMIZE is turned on, COMPILE_DOUBLE will also be selected
	  BUT you can then turn it off if all you need are the debugging symbols.  This
	  way you have to make an informed decision about disabling COMPILE_DOUBLE.

	  To allow COMPILE_DOUBLE to be both auto-selected and turned off, a new feature
	  was added to menuselect.  The <use> element can now contain an "autoselect"
	  attribute which will turn the used member on but not create a hard dependency.
	  The cflags.xml implementation for COMPILE_DOUBLE looks like this...

	  <member name="DONT_OPTIMIZE" displayname="Disable Optimizations ...">
	  	<use autoselect="yes">COMPILE_DOUBLE</use>
	  	<support_level>core</support_level>
	  </member>
	  <member name="COMPILE_DOUBLE" displayname="Pre-compile with ...>
	  	<depend>DONT_OPTIMIZE</depend>
	  	<support_level>core</support_level>
	  </member>

	  When DONT_OPTIMIZE is turned on, COMPILE_DOUBLE is turned on because
	  of the use.
	  When DONT_OPTIMIZE is turned off, COMPILE_DOUBLE is turned off because
	  of the depend.
	  When COMPILE_DOUBLE is turned on, DONT_OPTIMIZE is turned on because
	  of the depend.
	  When COMPILE_DOUBLE is turned off, DONT_OPTIMIZE is left as is because
	  it only uses COMPILE_DOUBLE, it doesn't depend on it.

	  I also made a few tweaks to the ncurses implementation to move things
	  left a bit to allow longer descriptions.

	  Change-Id: Id49ca930ac4b5ec4fc2d8141979ad888da7b1611

2016-03-10 13:09 +0000 [38499e7125]  gtjoseph <george.joseph@fairview5.com>

	* pjproject:  Pass (dont_)optimize flags to pjproject and fix pjsua

	  The pjproject Makefile now uses the Asterisk optimization flags which
	  are determined by the setting of the DONT_OPTMIZE menuselect flag.
	  The Makefile was also restructured so a change to the top level
	  menuselect.makeopts will result in a rebuild of pjproject.

	  Also, "--disable-resample" was removed from the pjproject configure
	  options.  Without resample, pjsua (which is used by the testsuite)
	  can't make audio calls.  When it can't, it segfaults.

	  Change-Id: I24b0a4d0872acef00ed89b3c527a713ee4c2ccd4

2016-03-11 16:03 +0000 [336cae73cc]  Walter Doekes <walter+asterisk@wjd.nu>

	* app_chanspy: Fix occasional deadlock with ChanSpy and Local channels.

	  Channel masquerading had a conflict with autochannel locking.

	  When locking autochannel->channel, the channel is fetched from the
	  autochannel and then locked. During the fetch, the autochannel -- which
	  has no locks itself -- can be modified by someone who owns the channel
	  lock. That means that the value of autochan->channel cannot be trusted
	  until you hold the lock.

	  In practice, this caused problems with Local channels getting
	  masqueraded away while the ChanSpy attempted to get info from that
	  channel. The old channel which was about to get removed got locked, but
	  the new (replaced) channel got unlocked (no-op). Because the replaced
	  channel was now locked (and would never get unlocked), it couldn't get
	  removed from the channel list in a timely manner, and would now cause
	  deadlocks when iterating over the channel list.

	  This change checks the autochannel after locking the channel for changes
	  to the autochannel. If the channel had been changed, the lock is
	  reobtained on the new channel.

	  In theory it seems possible that after this fix, the lock attempt on the
	  old (wrong) channel can be on an already destroyed lock, maybe causing
	  a crash. But that hasn't been observed in the wild and is harder induce
	  than the current deadlock.

	  Thanks go to Filip Frank for suggesting a fix similar to this and
	  especially to IRC user hexanol for pointing out why this deadlock was
	  possible and testing this fix. And to Richard for catching my rookie
	  while loop mistake ;)

	  ASTERISK-25321 #close

	  Change-Id: I293ae0014e531cd0e675c3f02d1d118a98683def

2016-03-07 21:34 +0000 [875d5e9872]  gtjoseph <george.joseph@fairview5.com>

	* pjproject_bundled: Remove --with-external-pa from configure options.

	  Not sure why it was there in the first place as we already specify
	  --disable-sound.

	  Change-Id: Ia80a40e8b1e1acc287955ab11ba1fbd0c7d4cff9

2016-03-06 14:38 +0000 [530cff5f5f]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Strip spaces from items parsed from comma-separated lists

	  Configurations like "aors = a, b, c" were either ignoring everything after "a"
	  or trying to look up " b".  Same for mailboxes,  ciphers, contacts and a few
	  others.

	  To fix, all the strsep(&copy, ",") calls have been wrapped in ast_strip.  To
	  facilitate this, ast_strip, ast_skip_blanks and ast_skip_nonblanks were
	  updated to handle null pointers.

	  In some cases, an ast_strlen_zero() test was added to skip consecutive commas.

	  There was also an attempt to ast_free an ast_strdupa'd string in
	  ast_sip_for_each_aor which was causing a SEGV.  I removed it.

	  Although this issue was reported for realtime, the issue was in the res_pjsip
	  modules so all config mechanisms were affected.

	  ASTERISK-25829 #close
	  Reported-by: Mateusz Kowalski

	  Change-Id: I0b22a2cf22a7c1c50d4ecacbfa540155bec0e7a2

2016-03-04 20:37 +0000 [3c8076a83b]  gtjoseph <george.joseph@fairview5.com>

	* install_prereq: Add packages for bundled pjproject

	  RedHat/CentOS needs python-devel
	  Debian/Ubuntu needs automake, libsrtp-dev and python-dev

	  Ubuntu also needed libncurses5-dev for cmenuselect so while not
	  needed for pjproject, I adedd it anyway.

	  Change-Id: Idf5fa16e2d87c687439621507e122cb9461d7089

2016-02-24 17:25 +0000 [27f32cd0a6]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_caller_id: Anonymize 'From' when caller id presentation is prohibited

	  Per RFC3325, the 'From' header is now anonymized on outgoing calls when
	  caller id presentation is prohibited.

	  TID = trust_id_outbound
	  PRO = Set(CALLERID(pres)=prohib)
	  USR = endpoint/from_user
	  DOM = endpoint/from_domain
	  PAI = YES(privacy=off), NO(not sent), PRI(privacy=full) (assumes send_pai=yes)

	  Conditions          |Result
	  --------------------|----------------------------------------------------
	  TID PRO USR DOM     |PAI    FROM
	  --------------------|----------------------------------------------------
	  Y   Y   abc def.ghi |PRI    "Anonymous" <sip:abc@def.ghi>
	  Y   Y   abc         |PRI    "Anonymous" <sip:abc@anonymous.invalid>
	  Y   Y       def.ghi |PRI    "Anonymous" <sip:anonymous@def.ghi>
	  Y   Y               |PRI    "Anonymous" <sip:anonymous@anonymous.invalid>

	  Y   N   abc def.ghi |YES    <sip:abc@def.ghi>
	  Y   N   abc         |YES    <sip:abc@<ip_address>>
	  Y   N       def.ghi |YES    "Caller Name" <sip:<caller_exten>@def.ghi>
	  Y   N               |YES    "Caller Name" <sip:<caller_exten>@<ip_address>>

	  N   Y   abc def.ghi |NO     "Anonymous" <sip:abc@def.ghi>
	  N   Y   abc         |NO     "Anonymous" <sip:abc@anonymous.invalid>
	  N   Y       def.ghi |NO     "Anonymous" <sip:anonymous@def.ghi>
	  N   Y               |NO     "Anonymous" <sip:anonymous@anonymous.invalid>

	  N   N   abc def.ghi |YES    <sip:abc@def.ghi>
	  N   N   abc         |YES    <sip:abc@<ip_address>>
	  N   N       def.ghi |YES    "Caller Name" <sip:<caller_exten>@def.ghi>
	  N   N               |YES    "Caller Name" <sip:<caller_exten>@<ip_address>>

	  ASTERISK-25791 #close
	  Reported-by: Anthony Messina

	  Change-Id: I2c82a5ca1413c2c00fb62ea95b0ae8e97af54dc9

2016-03-03 17:34 +0000 [7cf7b0a4f9]  gtjoseph <george.joseph@fairview5.com>

	* third_party/Makefile.rules:  Replace unsupported != operator with $(shell ...)

	  Apparently the != operator is fairly new so I've replaced it with
	  the old $(shell ...) syntax.

	  Change-Id: I16b2e1878a4f91e7e9740abd427f9639f933c479
	  Reported-by: Richard Mudgett
2016-01-23 15:50 +0000 [53f57001f2]  gtjoseph <george.joseph@fairview5.com>

	* loader: Retry dlopen when loading fails

	  Although we use the RTLD_LAZY flag when calling dlopen
	  the first time on a module, this only defers resolution
	  for function calls.  Pointer references to functions are
	  determined at link time so dlopen expects them to be there.
	  Since we don't cross-module link, pointers to functions
	  in other modules won't be available and dlopen will fail.

	  Doing a "hardened" build also causes problems because it
	  typically sets "-z now" on the ld command line which
	  overrides RTLD_LAZY at run time.

	  If the failing module isn't a GLOBAL_SYMBOLS module, then
	  dlopen will be called again after all the GLOBAL_SYMBOLS
	  modules have been loaded and they'll eventually resolve.

	  If the calling module IS a GLOBAL_SYMBOLS module itself
	  and a third module depends on it, then there's an issue
	  because the second time through the dlopen loop,
	  GLOBAL_SYMBOLS modules aren't given any special treatment
	  and since the order in which dlopen is called isn't
	  deterministic, the dependent may again be tried before the
	  module it needs is loaded.

	  Simple solution:  Save modules that fail load_resource
	  because of a dlopen error in a list and retry them
	  immediately after the first pass. Keep retrying until
	  the failed list is empty or we reach a #defined max
	  retries. Error messages are suppressed until the final
	  pass which also gets rid of those confusing error messages
	  about module failures that are later corrected.

	  Change-Id: Iddae1d97cd2f00b94e61662447432765755f64bb

2016-03-01 16:18 +0000 [40d9e9e238]  Kevin Harwell <kharwell@digium.com>

	* bridge.c: Crash during attended transfer when missing a local channel half

	  It's possible for the transferer channel to get hung up early during the
	  attended transfer process. For instance, a phone may send a "bye" immediately
	  upon receiving a sip notify that contains a sip frag 100 (I'm looking at you
	  Jitsi). When this occurs a race begins between the transferer being hung up
	  and completion of the transfer code.

	  If the channel hangs up too early during a transfer involving stasis bridging
	  for instance, then when the created local channel goes to look up its swap
	  channel (and associated datastore) it can't find it (since it is no longer in
	  the bridge) thus it fails to enter the stasis application. Consequently, the
	  created local channel(s) hang up as well. If the timing is just right then the
	  bridging code attempts to add the message link with missing local channel(s).
	  Hence the crash.

	  Unfortunately, there is no great way to solve the problem of the unexpected
	  "bye". While we can't guarantee we won't receive an early hangup, and in this
	  case still fail to enter the stasis application, we can make it so asterisk
	  does not crash.

	  This patch does just that by locking the local channel structure, checking
	  that the local channel's peer has not been lost, and then continuing. This
	  keeps the local channel's peer from being ripped out from underneath it by
	  the local/unreal hangup code while attempting to set the stasis message link.

	  ASTERISK-25771

	  Change-Id: Ie6d6061e34c7c95f07116fffac9a09e5d225c880

2016-03-01 18:08 +0000 [ff3da61c35]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_refer.c: Delay sending the initial SIP Notify with frag 100

	  During the transfer process, some phones (okay it was the Jitsi softphone,
	  but maybe others are out there) send a "bye" immediately after receiving a
	  SIP Notify. When a "bye" is received early for some types of transfers the
	  transferer channel may no longer be available during late stage transfer
	  processing.

	  For instance, during an attended transfer involving stasis bridging at one
	  point the created local channel looks for an associated swap channel in
	  order to retrieve the stasis application name. If the transferer has hung
	  up then the local channel will fail to find it. The local channel then has
	  no way to know which stasis app to enter, so it fails and hangs up as well.
	  Thus the transfer does not complete as expected.

	  This patch delays the sending of the initial notify in order to give the
	  transfer process enough time to gather the necessary data for a successful
	  transfer.

	  ASTERISK-25771

	  Change-Id: I09cfc9a5d6ed4c007bc70625e0972b470393bf16

2016-03-03 08:26 +0000 [26b8f2692e]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_dtmf_info: NULL terminate the message body.

	  PJSIP does not ensure that when printing the message body the
	  buffer will be NULL terminated. This is problematic when searching
	  for the signal and duration values of the DTMF.

	  This change ensures the buffer is always NULL terminated.

	  Change-Id: I52653a1a60c93092d06af31a27408d569cc98968

2016-03-01 20:03 +0000 [86d6e44cc1]  gtjoseph <george.joseph@fairview5.com>

	* alembic: Fix downgrade and tweak for sqlite

	  Downgrade had a few issues.  First there was an errant 'update' statement in
	  add_auto_dtmf_mode that looks like it was a copy/paste error.  Second, we
	  weren't cleaning up the ENUMs so subsequent upgrades on postgres failed
	  because the types already existed.

	  For sqlite...  sqlite doesn't support ALTER or DROP COLUMN directly.
	  Fortunately alembic batch_operations takes care of this for us if we
	  use it so the alter and drops were converted to use batch operations.

	  Here's an example downgrade:

	      with op.batch_alter_table('ps_endpoints') as batch_op:
	          batch_op.drop_column('tos_audio')
	          batch_op.drop_column('tos_video')
	          batch_op.add_column(sa.Column('tos_audio', yesno_values))
	          batch_op.add_column(sa.Column('tos_video', yesno_values))
	          batch_op.drop_column('cos_audio')
	          batch_op.drop_column('cos_video')
	          batch_op.add_column(sa.Column('cos_audio', yesno_values))
	          batch_op.add_column(sa.Column('cos_video', yesno_values))

	      with op.batch_alter_table('ps_transports') as batch_op:
	          batch_op.drop_column('tos')
	          batch_op.add_column(sa.Column('tos', yesno_values))
	      # Can't cast integers to YESNO_VALUES, so dropping and adding is required
	          batch_op.drop_column('cos')
	          batch_op.add_column(sa.Column('cos', yesno_values))

	  Upgrades from base to head and downgrades from head to base were tested
	  repeatedly for postgresql, mysql/mariadb, and sqlite3.

	  Change-Id: I862b0739eb3fd45ec3412dcc13c2340e1b7baef8

2016-03-02 15:55 +0000 [6f0d7ce9db]  gtjoseph <george.joseph@fairview5.com>

	* config_transport:  Fix objects returned by ast_sip_get_transport_states

	  ast_sip_get_transport_states was returning a container of internal_state
	  objects instead of ast_sip_transport_state objects.  This was causing
	  transport lookups to fail, most noticably in res_pjsip_nat, which
	  couldn't find the correct external addresses.  This was causing contacts
	  to go out with internal ip addresses.

	  ASTERISK-25830 #close
	  Reported-by: Sean Bright

	  Change-Id: I1aee6a2fd46c42e8dd0af72498d17de459ac750e

2016-03-02 11:17 +0000 [1ea7a5a774]  Scott Griepentrog <scott@griepentrog.com>

	* CHAOS: cleanup possible null vars on msg alloc failure

	  In message.c, if msg_alloc fails to init the string field,
	  vars may be null, so use a null tolerant cleanup.

	  In res_pjsip_messaging.c, if msg_data_create fails, mdata
	  will be null, so use a null tolerant cleanup.

	  ASTERISK-25323

	  Change-Id: Ic2d55c2c3750d5616e2a05ea92a19c717507ff56

2016-03-02 09:34 +0000 [3c37c7071f]  Scott Griepentrog <scott@griepentrog.com>

	* CHAOS: prevent crash on failed strdup

	  This patch avoids crashing on a null pointer
	  if the strdup() allocation fails.

	  ASTERISK-25323

	  Change-Id: I3f67434820ba53b53663efd6cbb42749f4f6c0f5

2016-02-29 18:11 +0000 [9633be9d25]  Richard Mudgett <rmudgett@digium.com>

	* func_callerid.c: Update REDIRECTING reason documentation.

	  Change-Id: I6e8d39b0711110a4bceafa652e58b30465e28386

2016-02-26 18:57 +0000 [4165ea7778]  Richard Mudgett <rmudgett@digium.com>

	* SIP diversion: Fix REDIRECTING(reason) value inconsistencies.

	  Previous chan_sip behavior:

	  Before this patch chan_sip would always strip any quotes from an incoming
	  reason and pass that value up as the REDIRECTING(reason).  For an outgoing
	  reason value, chan_sip would check the value against known values and
	  quote any it didn't recognize.  Incoming 480 response message reason text
	  was just assigned to the REDIRECTING(reason).

	  Previous chan_pjsip behavior:

	  Before this patch chan_pjsip would always pass the incoming reason value
	  up as the REDIRECTING(reason).  For an outgoing reason value, chan_pjsip
	  would send the reason value as passed down.

	  With this patch:

	  Both channel drivers match incoming reason values with values documented
	  by REDIRECTING(reason) and values documented by RFC5806 regardless of
	  whether they are quoted or not.  RFC5806 values are mapped to the
	  equivalent REDIRECTING(reason) documented value and is set in
	  REDIRECTING(reason).  e.g., an incoming RFC5806 'unconditional' value or a
	  quoted string version ('"unconditional"') is converted to
	  REDIRECTING(reason)'s 'cfu' value.  The user's dialplan only needs to deal
	  with 'cfu' instead of any of the aliases.

	  The incoming 480 response reason text supported by chan_sip checks for
	  known reason values and if not matched then puts quotes around the reason
	  string and assigns that to REDIRECTING(reason).

	  Both channel drivers send outgoing known REDIRECTING(reason) values as the
	  unquoted RFC5806 equivalent.  User custom values are either sent as is or
	  with added quotes if SIP doesn't allow a character within the value as
	  part of a RFC3261 Section 25.1 token.  Note that there are still
	  limitations on what characters can be put in a custom user value.  e.g.,
	  embedding quotes in the middle of the reason string is silly and just
	  going to cause you grief.

	  * Setting a REDIRECTING(reason) value now recognizes RFC5806 aliases.
	  e.g., Setting REDIRECTING(reason) to 'unconditional' is converted to the
	  'cfu' value.

	  * Added missing malloc() NULL return check in res_pjsip_diversion.c
	  set_redirecting_reason().

	  * Fixed potential read from a stale pointer in res_pjsip_diversion.c
	  add_diversion_header().  The reason string needed to be copied into the
	  tdata memory pool to ensure that the string would always be available.
	  Otherwise, if the reason string returned by reason_code_to_str() was a
	  user's reason string then the string could be freed later by another
	  thread.

	  Change-Id: Ifba83d23a195a9f64d55b9c681d2e62476b68a87

2016-02-26 18:54 +0000 [41f4af4ce5]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_send_to_voicemail.c: Allow either quoted or not send_to_vm reason.

	  Change-Id: Id6350b3c7d4ec8df7ec89863566645e2b0f441fd

2016-02-29 20:41 +0000 [4c5998ff55]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_send_to_voicemail.c: Fix off-nominal double channel unref.

	  * Fix double unref of other_party channel in off nominal path.

	  * This is unlikely to be a real problem.  However, for safety,
	  in handle_incoming_request() keep the datastore ref with the
	  other_party channel ref until we are finished with the other_party
	  channel.

	  Change-Id: I78f22547bf0bb99fb20814ceab75952bd857f821

2016-01-18 21:54 +0000 [b59956a875]  gtjoseph <george.joseph@fairview5.com>

	* build-system: Allow building with static pjproject

	  Background here:
	  http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html

	  From CHANGES:
	   * To help insure that Asterisk is compiled and run with the same known
	     version of pjproject, a new option (--with-pjproject-bundled) has been
	     added to ./configure.  When specified, the version of pjproject specified
	     in third-party/versions.mak will be downloaded and configured.  When you
	     make Asterisk, the build process will also automatically build pjproject
	     and Asterisk will be statically linked to it.  Once a particular version
	     of pjproject is configured and built, it won't be configured or built
	     again unless you run a 'make distclean'.

	     To facilitate testing, when 'make install' is run, the pjsua and pjsystest
	     utilities and the pjproject python bindings will be installed in
	     ASTDATADIR/third-party/pjproject.

	     The default behavior remains building with the shared pjproject
	     installation, if any.

	  Building:

	     All you have to do is include the --with-pjproject-bundled option on
	     the ./configure command line (and remove any existing --with-pjproject
	     option if specified).  Everything else is automatic.

	  Behind the scenes:

	     The top-level Makefile was modified to include 'third-party' in the
	     list of MOD_SUBDIRS.

	     The third-party directory was created to contain any third party
	     packages that may be needed in the future.  Its Makefile automatically
	     iterates over any subdirectories passing on targets.

	     The third-party/pjproject directory was created to house the pjproject
	     source distribution.  Its Makefile contains targets to download, patch
	     configure, generate dependencies, compile libs, apps and python bindings,
	     sanitized build.mak and generate a symbols list.

	     When bootstrap.sh is run, it automatically includes the configure.m4
	     file in third-party/pjproject.  This file has a macro to download and
	     conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR
	     and PJPROJECT_BUNDLED.  It also tests for the capabilities like
	     PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to
	     trying to compile.  Of course, bootstrap.sh is only run once and the
	     configure file is incldued in the patch.

	     When configure is run with the new options, the macro in configure.m4
	     triggers the download, patch, conifgure and tests.  No compilation is
	     performed at this time.  The downloaded tarball is cached in /tmp so
	     it doesn't get downloaded again on a distclean.

	     When make is run in the top-level Asterisk source directory, it will
	     automatically descend all the subdirectories in third_party just as it
	     does for addons, apps, etc.  The top-level Makefile makes sure that
	     the 'third-party' is built before 'main' so that dependencies from the
	     other directories are built first.

	     When main does build, a new shared library (libasteriskpj) is created that
	     links statically to the pjproject .a files and exports all their symbols.
	     The asterisk binary links to that, just as it does with libasteriskssl.

	     When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject
	     python bindings are installed in ASTDATADIR/third-party/pjproject.  This
	     will facilitate testing, including running the testsuite which will be
	     updated to check that directory for the pjsua module ahead of the system
	     python library.

	  Modules should continue to depend on pjproject if they use pjproject APIs
	  directly.  They should not care about the implementation.  No changes to any
	  res_pjsip modules were made.

	  Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103

2016-02-22 16:59 +0000 [18a323e542]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Fix T.38 issues caused by leaving a bridge.

	  chan_sip could not handle AST_T38_TERMINATED frames being sent to it when
	  the channel left the bridge.  The action resulted in overlapping outgoing
	  reINVITEs.  The testsuite tests/fax/sip/directmedia_reinvite_t38 was not
	  happy.

	  * Force T.38 to be remembered as locally bridged.  Now when the channel
	  leaves the native RTP bridge after T.38, the channel remembers that it has
	  already reINVITEed the media back to Asterisk.  It just needs to terminate
	  T.38 when the AST_T38_TERMINATED arrives.

	  * Prevent redundant AST_T38_TERMINATED from causing problems.  Redundant
	  AST_T38_TERMINATED frames could cause overlapping outgoing reINVITEs if
	  they happen before the T.38 state changes to disabled.  Now the T.38 state
	  is set to disabled before the reINVITE is sent.

	  ASTERISK-25582 #close

	  Change-Id: I53f5c6ce7d90b3f322a942af1a9bcab6d967b7ce

2016-02-18 18:27 +0000 [263a39f2cc]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_t38.c: Back out part of an earlier fix attempt.

	  This backs out item 4 of the 4875e5ac32f5ccad51add6a4216947bfb385245d
	  commit.  Item 4 added the t38_bye_supplement.  Unfortunately, the frame
	  that it puts into the bridge may or may not be processed by the time the
	  bridged peer is kicked out of the bridge.  If it is processed then all is
	  well.  However, if it is not processed then that channel is stuck in fax
	  mode until it hangs up or maybe if it joins another bridge for T.38
	  faxing.

	  ASTERISK-25582

	  Change-Id: Ib20a03ecadf1bf8a0dcadfadf6c2f2e60919a9f7

2016-02-22 13:54 +0000 [221422be50]  Richard Mudgett <rmudgett@digium.com>

	* bridge core: Add owed T.38 terminate when channel leaves a bridge.

	  The channel is now going to get T.38 terminated when it leaves the
	  bridging system and the bridged peers are going to get T.38 terminated as
	  well.

	  ASTERISK-25582

	  Change-Id: I77a9205979910210e3068e1ddff400dbf35c4ca7

2016-02-19 16:01 +0000 [0a5bc64491]  Richard Mudgett <rmudgett@digium.com>

	* channel api: Create is_t38_active accessor functions.

	  ASTERISK-25582

	  Change-Id: I69451920b122de7ee18d15bb231c80ea7067a22b

2016-02-19 19:06 +0000 [513638a5f4]  Richard Mudgett <rmudgett@digium.com>

	* bridge_channel: Don't settle owed events on an optimization.

	  Local channel optimization could cause DTMF digits to be duplicated.
	  Pending DTMF end events would be posted to a bridge when the local channel
	  optimizes out and is replaced by the channel further down the chain.  When
	  the real digit ends, the channel would get another DTMF end posted to the
	  bridge.

	  A -- LocalA;1/n -- LocalA;2/n -- LocalB;1 -- LocalB;2 -- B

	  1) LocalA has the /n flag to prevent optimization.
	  2) B is sending DTMF to A through the local channel chain.
	  3) When LocalB optimizes out it can move B to the position of LocalB;1
	  4) Without this patch, when B swaps with LocalB;1 then LocalB;1 would
	  settle an owed DTMF end to the bridge toward LocalA;2.
	  5) When B finally ends its DTMF it sends the DTMF end down the chain.
	  6) Without this patch, A would hear the DTMF digit end when LocalB
	  optimizes out and when B ends the original digit.

	  ASTERISK-25582

	  Change-Id: I1bbd28b8b399c0fb54985a5747f330a4cd2aa251

2016-02-22 12:15 +0000 [7c4495cb70]  Richard Mudgett <rmudgett@digium.com>

	* channel.c: Route all control frames to a channel through the same code.

	  Frame hooks can conceivably return a control frame in exchange for an
	  audio frame inside ast_write().  Those returned control frames were not
	  handled quite the same as if they were sent to ast_indicate().  Now it
	  doesn't matter if you use ast_write() to send an AST_FRAME_CONTROL to a
	  channel or ast_indicate().

	  ASTERISK-25582

	  Change-Id: I5775f41421aca2b510128198e9b827bf9169629b

2016-02-25 15:13 +0000 [48d713a832]  gtjoseph <george.joseph@fairview5.com>

	* sorcery:  Refactor create, update and delete to better deal with caches

	  The ast_sorcery_create, update and delete function have been refactored
	  to better deal with caches and errors.

	  The action is now called on all non-caching wizards first. If ANY succeed,
	  the action is called on all caching wizards and the observers are notified.
	  This way we don't put something in the cache (or update or delete) before
	  knowing the action was performed in at least 1 backend and we only call the
	  observers once even if there were multiple writable backends.

	  ast_sorcery_create was never adding to caches in the first place which
	  was preventing contacts from getting added to a memory_cache when they
	  were created.  In turn this was causing memory_cache to emit errors if
	  the contact was deleted before being retrieved (which would have
	  populated the cache).

	  ASTERISK-25811 #close
	  Reported-by: Ross Beer

	  Change-Id: Id5596ce691685a79886e57b0865888458d6e7b46
2016-02-25 15:39 +0000 [ee947d4a7a]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_mwi:  Turn some NOTICEs and WARNINGs into debug 1s.

	  There are a few cases where we're emitting notices or warnings
	  for things that really need neither, like a client retrying to subscribe
	  to mwi when they're not conifgured for it.  They get a 404 so there's no
	  need for non-debug messages.

	  Change-Id: I05e38a7ff6c2f2521146f4be6a79731b9864e61f
2016-02-25 14:17 +0000 [6e70e8ccdb]  gtjoseph <george.joseph@fairview5.com>

	* res_sorcery_memory_cache:  Fix SEGV in some CLI commands

	  A few of the CLI commands weren't checking for enough arguments
	  and were SEGVing.

	  Change-Id: Ie6494132ad2fe54b4f014bcdc112a37c36a9b413

2016-02-25 10:29 +0000 [4417f64d83]  Leif Madsen <leif@leifmadsen.com>

	* Add initial support to build Docker images

	  This work-in-progress is the first step to being able to reliably
	  build Asterisk containers from the Asterisk source. I'm submitting
	  this based on feedback gained at AstriDevCon 2015.

	  Information about how to use this is provided in contrib/docker/README.md
	  and will result in a local Asterisk container being built right from
	  your source. I believe this can eventually be automated via
	  hub.docker.com.

	  Change-Id: Ifa070706d40e56755797097b6ed72c1e243bd0d1

2016-02-22 19:31 +0000 [e7a6abbbd3]  Richard Mudgett <rmudgett@digium.com>

	* rtp_engine.h: Remove extraneous semicolons.

	  Change-Id: Ib462633d396fa941379dfef648dcd2245e350084

2016-02-23 14:57 +0000 [6656afffa0]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Suppress T.38 SDP c= line if addr is the same.

	  Use the correct comparison function since we only care if the address
	  without the port is the same.

	  Change-Id: Ibf6c485f843a1be6dee58a47b33d81a7a8cbe3b0

2016-02-16 08:14 +0000 [ea9deff996]  Christof Lauber <christof.lauber@annax.ch>

	* res_config_sqlite3: Fix crashes when reading peers from sqlite3 tables

	  Introduced realloaction of ast_str buf in sqlite3_escape functions in case
	  the returned buffer from threadstorage was actually too small.

	  Change-Id: I3c5eb43aaade93ee457943daddc651781954c445

2016-02-11 11:01 +0000 [d2a1457e0b]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip/config_transport: Allow reloading transports.

	  The 'reload' mechanism actually involves closing the underlying
	  socket and calling the appropriate udp, tcp or tls start functions
	  again.  Only outbound_registration, pubsub and session needed work
	  to reset the transport before sending requests to insure that the
	  pjsip transport didn't get pulled out from under them.

	  In my testing, no calls were dropped when a transport was changed
	  for any of the 3 transport types even if ip addresses or ports were
	  changed. To be on the safe side however, a new transport option was
	  added (allow_reload) which defaults to 'no'.  Unless it's explicitly
	  set to 'yes' for a transport, changes to that transport will be ignored
	  on a reload of res_pjsip.  This should preserve the current behavior.

	  Change-Id: I5e759850e25958117d4c02f62ceb7244d7ec9edf

2016-02-07 17:34 +0000 [6b921f706d]  gtjoseph <george.joseph@fairview5.com>

	* res_pjproject:  Add ability to map pjproject log levels to Asterisk log levels

	  Warnings and errors in the pjproject libraries are generally handled by
	  Asterisk.  In many cases, Asterisk wouldn't even consider them to be warnings
	  or errors so the messages emitted by pjproject directly are either superfluous
	  or misleading.  A good exampe of this are the level-0 errors pjproject emits
	  when it can't open a TCP/TLS socket to a client to send an OPTIONS.  We don't
	  consider a failure to qualify a UDP client an "ERROR", why should a TCP/TLS
	  client be treated any differently?

	  A config file for res_pjproject has bene added (pjproject.conf) and a new
	  log_mappings object allows mapping pjproject levels to Asterisk levels
	  (or nothing).  The defaults if no pjproject.conf file is found are the same
	  as those that were hard-coded into res_pjproject initially: 0,1 = LOG_ERROR,
	  2 = LOG_WARNING, 3,4,5 = LOG_DEBUG<level>

	  Change-Id: Iba7bb349c70397586889b8f45b8c3d6c6c8c3898

2016-02-18 10:55 +0000 [f295088764]  Alexei Gradinari <alex2grad@gmail.com>

	* res_pjsip_outbound_publish: Fix processing 412 response

	  When Asterisk receives a 412 (Conditional Request Failed) response
	  it has to recreate publish session.
	  There is bug in res_pjsip_outbound_publish.c
	  The function sip_outbound_publish_client_alloc is called with wrong object
	  while processing 412 (Conditional Request Failed) response.
	  This patch fixes it.

	  ASTERISK-25229 #close

	  Change-Id: I3b62f2debf6bb1e5817cde7b13ea39ef2bf14359
2016-02-18 11:15 +0000 [f1f79812c1]  Mark Michelson <mmichelson@digium.com>

	* Fix failing threadpool_auto_increment test.

	  The threadpool_auto_increment test fails infrequently for a couple of
	  reasons
	  * The threadpool listener was notified of fewer tasks being pushed than
	    were actually pushed
	  * The "was_empty" flag was set to an unexpected value.

	  The problem is that the test pushes three tasks into the threadpool.
	  Test expects the threadpool to essentially gather those three tasks, and
	  then distribute those to the threadpool threads. It also expects that as
	  the tasks are pushed in, the threadpool listener is alerted immediately
	  that the tasks have been pushed. In reality, a task can be distributed
	  to the threadpool threads quicker than expected, meaning that the
	  threadpool has already emptied by the time each subsequent task is
	  pushed. In addition, the internal threadpool queue can be delayed so
	  that the threadpool listener is not alerted that a task has been pushed
	  even after the task has been executed.

	  From the test's point of view, there's no way to be able to predict
	  exactly the order that task execution/listener notifications will occur,
	  and there is no way to know which listener notifications will indicate
	  that the threadpool was previously empty.

	  For this reason, the test has been updated to only check the things it
	  can check. It ensures that all tasks get executed, that the threads go
	  idle after the tasks are executed, and that the listener is told the
	  proper number of tasks that were pushed.

	  Change-Id: I7673120d74adad64ae6894594a606e102d9a1f2c

2016-02-16 23:37 +0000 [79dc5e2f00]  Rodrigo Ramírez Norambuena <a@rodrigoramirez.com>

	* app_queue: fix Calculate talktime when is first call answered

	  Fix calculate of average time for talktime is wrong when is completed the
	  first call beacuse the time for talked would be that call.

	  ASTERISK-25800 #close

	  Change-Id: I94f79028935913cd9174b090b52bb300b91b9492

2016-02-17 13:30 +0000 [5a3a857dd6]  Richard Mudgett <rmudgett@digium.com>

	* cel.c: Fix mismatch in ast_cel_track_event() return type.

	  The return type of ast_cel_track_event() is not large enough to return all
	  64 potential bits of the event enable mask.  Fortunately, the defined CEL
	  events do not really need all 64 bits and the return value is only used to
	  determine if the requested CEL event is enabled.

	  * Made the ast_cel_track_event() return 0 or 1 only so the return value
	  can fit inside an int type instead of zero or a truncated 64 bit non-zero
	  value.

	  Change-Id: I783d932320db11a95c7bf7636a72b6fe2566904c

2016-02-16 16:37 +0000 [87ab65c557]  gtjoseph <george.joseph@fairview5.com>

	* res_odbc: Fix exports.in for missing symbols

	  res_odbc.exports.in was missing a few symbols.
	  Changed to wildcards.

	  Change-Id: Ieadd76df24e43ea92577f651d478a0f7b742c30c

2016-02-16 12:20 +0000 [c0f3062031]  gtjoseph <george.joseph@fairview5.com>

	* res_statsd:  Fix exports.in for missing symbols

	  res_statsd.export.in was missing the _va variations of the log
	  functions causing Asterisk to crash in res_pjsip if OPTIONAL_API
	  wasn't enabled.

	  ASTERISK-25727 #close
	  Reported-by: Gergely Dömsödi

	  Change-Id: I395729f9f51bdd33c5ca757f5f96ebedad74077b

2016-02-15 21:31 +0000 [5e848dae7b]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_config_wizard:  Add command to export primitive objects

	  A new command (pjsip export config_wizard primitives) has been added that
	  will export all the pjsip objects it created to the console or a file
	  suitable for reuse in a pjsip.conf file.

	  ASTERISK-24919 #close
	  Reported-by: Ray Crumrine

	  Change-Id: Ica2a5f494244b4f8345b0437b16d06aa0484452b

2016-02-15 15:37 +0000 [34c64707d1]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip_caller_id: Fix segfault when replacing rpid or pai header

	  If the PJSIP_HEADER dialplan function adds a PAI or RPID header and send_rpid
	  or send_pai is set, res_pjsip_caller_id attemps to retrieve, parse and modify
	  the header added by the dialplan function.  Since the header added by the
	  dialplan function is generic string, there are no virtual functions to parse
	  the uri and we get a segfault when we try.  Since the modify, was really only
	  an overwrite, we now just delete the old header if it was type PJSIP_H_OTHER
	  and recreate it.

	  This raises a question for another time though:  What should happen with
	  duplicate headers?  Right now res_pjsip_header_funcs doesn't check for dups
	  so if it's session supplement is loaded after res_pjsip_caller_id's (or any
	  other module that adds headers), there'll be dups in the message.

	  ASTERISK-25337 #close

	  Change-Id: I5e296b52d30f106b822c0eb27c4c2b0e0f71c7fa

2016-02-15 13:08 +0000 [ebe167f792]  Mark Michelson <mmichelson@digium.com>

	* Fix creation race of contact_status structures.

	  It is possible when processing a SIP REGISTER request to have two
	  threads end up creating contact_status structures in sorcery.
	  contact_status is created using a "find or create" function. If two
	  threads call into this at the same time, each thread will fail to find
	  an existing contact_status, and so both will end up creating a new
	  contact status.

	  During testing, we would see sporadic failures because the
	  PJSIP_CONTACT() dialplan function would operate on a different
	  contact_status than what had been updated by res_pjsip/pjsip_options.

	  The fix here is two-fold:
	  1) The "find or create" function for contact_status now has a lock
	  around the entire operation. This way, if two threads attempt the
	  operation simultaneously, the first to get there will create the object,
	  and the second will find the object created by the first thread.

	  2) res_sorcery_memory has had its create callback updated so that it
	  will not allow for objects with duplicate IDs to be created.

	  Change-Id: I55b1460ff1eb0af0a3697b82d7c2bac9f6af5b97

2016-02-15 12:52 +0000 [1c4f2a920d]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_pubsub: Move where the subscription is stored to after initialized.

	  A problem arose when testing the AMI subscription listing actions where it
	  was possible for a subscription that had not been fully initialized to be
	  listed. This was problematic as the underlying listing code would crash.

	  This change makes it so the subscription tree is fully set up before it is
	  added to the list of subscriptions. This ensures that when the listing actions
	  get the subscription it is valid.

	  ASTERISK-25738 #close

	  Change-Id: Iace2b13641c31bbcc0d43a39f99aba1f340c0f48

2015-02-20 20:51 +0000 [ac00c6bc2d]  Corey Farrell <git@cfware.com>

	* main/asterisk.c: Reverse #if statement in listener() to fix code folding.

	  listener() opens the same code block in two places (#if and #else).  This
	  confuses some folding editors causing it to think that an extra code block
	  was opened.  Folding in 'geany' causes all code after listener() to be
	  folded as if it were part of that procedure.

	  ASTERISK-24813 #close

	  Change-Id: I4b8c766e6c91e327dd445e8c18f8a6f268acd961

2016-02-09 17:34 +0000 [b1b797e0e7]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Refactor load_module/unload_module

	  load_module was just too hairy with every step having to clean up all
	  previous steps on failure.

	  Some of the pjproject init calls have now been moved to a separate
	  load_pjsip function and the unload_pjsip function was enhanced to clean
	  up everything if an error happened at any stage of the load process.

	  In the process, a bunch of missing pj_shutdowns, serializer_pool_shutdowns
	  and ast_threadpool_shutdowns were also corrected.

	  Change-Id: I5eec711b437c35b56605ed99537ebbb30463b302

2016-02-09 22:42 +0000 [20e9792fbc]  Badalyan Vyacheslav <slavon.net@gmail.com>

	* Resources/res_phoneprov: fix memory leak and heap-use-after-free

	  * heap-use-after-free happens when we free "cfg"
	  but then use "value" which refers to it

	  * A memory leak occurs because in some cases
	  it is not released "defaults"

	  ASTERISK-25721 #close
	  Reported by: Badalyan Vyacheslav
	  Tested by: Badalyan Vyacheslav

	  Change-Id: I3807d3f4726df6864430ec144cf6265d3f538469

2016-02-11 11:21 +0000 [962a9d61f8]  Etienne Lessard (license #6394)

	* func_iconv: Ensure output strings are properly terminated.

	  ASTERISK-25272 #close
	  Reported by: Etienne Lessard
	  patches:
	   AST-25272.patch submitted by Etienne Lessard (license #6394)

	  Change-Id: Id75ad202300960a1e91afe15e319d992936ecc17

2016-02-10 16:16 +0000 [c1bf014ea0]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Handle pjsip_dlg_create_uas deprecation

	  Pjproject has deprecated pjsip_dlg_create_uas in 2.5 and replaced it with
	  pjsip_dlg_create_uas_and_inc_lock which, as the name implies, automatically
	  increments the lock on the returned dialog.  To account for this, configure.ac
	  now detects the presence of pjsip_dlg_create_uas_and_inc_lock and res_pjsip.c
	  has an #ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK to decide whether to use
	  the original call or the new one.  If the new one was used, the ref count is
	  decremented before returning.

	  ASTERISK-25751 #close
	  Reported-by Josh Colp

	  Change-Id: I1be776b94761df03bd0693bc7795a75682615ca8

2016-02-09 23:40 +0000 [bd07b6f0dd]  Badalyan Vyacheslav <slavon.net@gmail.com>

	* Build: Added testing compiler to support the system sanitizes

	  In older versions of the compiler was not sanitizes.
	  Compilers other than GCC can not support the Usan and TSAN
	  or have other options for *FLAGS.

	  ASTERISK-25767 #close
	  Reported by: Badalyan Vyacheslav
	  Tested by: Badalyan Vyacheslav

	  Change-Id: Iefce6608221fa87884b82ae3cb5649b7b1804916

2016-02-09 20:57 +0000 [e9e896abd1]  Badalyan Vyacheslav <v.badalyan@open-bs.ru>

	* Build: Fix menuselect USAN conflicts

	  USAN can be used together with other sanitizers.

	  Reported by: Badalyan Vyacheslav
	  Tested by: Badalyan Vyacheslav

	  Change-Id: I3bffa350d70965c3026651dba3a12414d0aaa45f

2016-02-09 14:21 +0000 [93e8ed0154]  Corey Farrell <git@cfware.com>

	* Simplify and fix conditional in FD_SET.

	  FD_SET contains a conditional statement to protect against buffer
	  overruns.  The statement was overly complicated and prevented use
	  of the last array element of ast_fdset.  We now just verify the fd
	  is less than ast_FDMAX.

	  Change-Id: I41895c0b497b052aef5bf49d75c817c48b326f40

2016-02-09 07:11 +0000 [a7c8d4cd6b]  Joshua Colp <jcolp@digium.com>

	* tests/test_sorcery_memory_cache_thrash: Improve termination process.

	  When terminating the threads thrashing a sorcery memory cache each
	  would be told to stop and then we would wait on them. During at
	  least one thrashing test this was problematic due to the specific
	  usage pattern in use. It would take some time for termination of the
	  thread to occur.

	  This would occur due to contention between the threads retrieving
	  and the threads updating the cache. As the retrieving threads are
	  given priority it may be some time before the updating threads
	  are able to proceed.

	  This change makes it so all threads are told to stop and then each
	  are joined to ensure they stop. This way all the threads should
	  stop at around the same time instead of waiting for one to stop,
	  the next to stop, then the next, and so on. As a result of this
	  the execution time for each thrash test is much closer to their
	  expected value than previously seen as well.

	  Change-Id: I04a53470b0ea4170b8819180b0bd7475f3642827
2016-01-29 17:56 +0000 [2451d4e455]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Fix infinite recursion when loading transports from realtime

	  Attempting to load a transport from realtime was forcing asterisk into an
	  infinite recursion loop.  The first thing transport_apply did was to do a
	  sorcery retrieve by id for an existing transport of the same name. For files,
	  this just returns the previous object from res_sorcery_config's internal
	  container, if any.  For realtime, the res_sourcery_realtime driver looks in the
	  database and finds the existing row but now it has to rehydrate it into a
	  sorcery object which means calling... transport_apply.  And so it goes.

	  The main issue with loading from realtime (apart from the loop) was that
	  transport stores structures and pointers directly in the ast_sip_transport
	  structure instead of the separate ast_transport_state structure.  This patch
	  separates those items into the ast_sip_transport_state structure.  The pattern
	  is roughly the same as res_pjsip_outbound_registration.

	  Although all current usages of ast_sip_transport and ast_sip_transport_state
	  were modified to use the new ast_sip_get_transport_state API, the original
	  items are left in ast_sip_transport and kept updated to maintain ABI
	  compatability for third-party modules.  They are marked as deprecated and
	  noted that they're now in ast_sip_transport_state.

	  ASTERISK-25606 #close
	  Reported-by: Martin Moučka

	  Change-Id: Ic7a836ea8e786e8def51fe3f8cce855ea54f5f19

2016-01-25 17:36 +0000 [6f978fbfe5]  Richard Mudgett <rmudgett@digium.com>

	* app_confbridge: Only use b_profile options from the conference.

	  A user cannot set new bridge options after the conference is created by
	  the first user.  Attempting to do so is documented as undefined behavior.

	  This patch ensures that the bridge profile options used are from the
	  conference and not what a subsequent user may have tried to set.

	  Change-Id: I1b6383eba654679e5739d5a8de98199cf074a266

2016-02-05 10:29 +0000 [ec8fd6714d]  gtjoseph <george.joseph@fairview5.com>

	* chan_misdn: Fix a few issues causing compile errors

	  Change-Id: I54b48c24d7ca88ed80496fdfd142d08772a7ab98

2016-02-04 16:17 +0000 [6a799cd78f]  Mark Michelson <mmichelson@digium.com>

	* Check for OpenSSL defines before trying to use them.

	  The SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 defines did not exist prior
	  to OpenSSL version 1.0.1. A recent commit attempts to, by default, set
	  these options, which can cause problems on systems with older OpenSSL
	  installations.

	  This commit adds a configure script check for those defines and will not
	  attempt to make use of those if they do not exist. We will print a
	  warning urging the user to upgrade their OpenSSL installation if those
	  defines are not present.

	  Change-Id: I6a2eb9a43fd0738b404d8f6f2cf4b5c22d9d752d
2016-02-03 14:25 +0000 [953d1cc11a]  gtjoseph <george.joseph@fairview5.com>

	* pjsip/alembic:  Add missing columns to system and registration

	  ps_systems needed disable_tcp_switch
	  ps_registrations needed line and endpoint

	  ASTERISK-25737 #close

	  Change-Id: Iaf9c2d69e62243d9fa53104c28c5339c47d4ac19

2016-02-04 11:39 +0000 [23829b3253]  Mark Michelson <mmichelson@digium.com>

	* res_stasis_device_state: Fix refcounting error.

	  Device state subscription lifetimes were governed by when the
	  subscription was established and unsubscribed from. However, it is
	  possible that at the time of unsubscription, there could be device state
	  events still in flight. When those device state events occur, the device
	  state callback could attempt to dereference a freed pointer. Crash.

	  This change ensures that the lifetime of the device state subscription
	  does not end until the underlying stasis subscription has confirmed that
	  its final message has been sent.

	  Change-Id: I25a0f1472894c1a562252fb7129671478e25e9b2

2016-01-27 10:44 +0000 [4e8e6d3922]  Sean Bright <sean.bright@gmail.com>

	* res_rtp_asterisk: Allow ICE host candidates to be overriden

	  During ICE negotiation the IPs of the local interfaces are sent to the remote
	  peer as host candidates. In many cases Asterisk is behind a static one-to-one
	  NAT, so these host addresses will be internal IP addresses.

	  To help in hiding the topology of the internal network, this patch adds the
	  ability to override the host candidates by matching them against a
	  user-defined list of replacements.

	  Change-Id: I1c9541af97b83a4c690c8150d19bf7202c8bff1f

2015-12-07 12:46 +0000 [c6b1b2b1c8]  Richard Mudgett <rmudgett@digium.com>

	* AST-2016-003 udptl.c: Fix uninitialized values.

	  Sending UDPTL packets to Asterisk with the right amount of missing
	  sequence numbers and enough redundant 0-length IFP packets, can make
	  Asterisk crash.

	  ASTERISK-25603 #close
	  Reported by: Walter Doekes

	  ASTERISK-25742 #close
	  Reported by: Torrey Searle

	  Change-Id: I97df8375041be986f3f266ac1946a538023a5255
2016-02-03 12:05 +0000 [f8acadde2c]  Joshua Colp <jcolp@digium.com>

	* AST-2016-001 http: Provide greater control of TLS and set modern defaults.

	  This change exposes the configuration of various aspects of the TLS
	  support and sets the default to the modern standards.

	  The TLS cipher is now set to the best values according to the
	  Mozilla OpSec team, different TLS versions can now be disabled, and
	  the cipher order can be forced to be that of the server instead of
	  the client.

	  ASTERISK-24972 #close

	  Change-Id: I0a10f2883f7559af5e48dee0901251dbf30d45b8
2015-09-28 17:07 +0000 [3c81a052c8]  Richard Mudgett <rmudgett@digium.com>

	* AST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow.

	  Setting the sip.conf timert1 value to a value higher than 1245 can cause
	  an integer overflow and result in large retransmit timeout times.  These
	  large timeout times hold system file descriptors hostage and can cause the
	  system to run out of file descriptors.

	  NOTE: The default sip.conf timert1 value is 500 which does not expose the
	  vulnerability.

	  * The overflow is now detected and the previous timeout time is
	  calculated.

	  ASTERISK-25397 #close
	  Reported by: Alexander Traud

	  Change-Id: Ia7231f2f415af1cbf90b923e001b9219cff46290
2016-02-03 14:07 +0000 [2a6ee8caeb]  gtjoseph <george.joseph@fairview5.com>

	* logging: Remove/fix some message annoyances

	  test_dlinklists doesn't need to NOTICE everyone that every macro worked.

	  res_phoneprov doesn't need to VERBOSE everyone that a phoneprov extension or
	  provider was registered.

	  res_odbc was missing a newline at the end of one message.

	  Change-Id: I6c06361518ef3711821795e535acd439782a995e

2016-02-02 10:52 +0000 [32fc784284]  Alexei Gradinari License #5691

	* res_sorcery_realtime: Fix regex regression.

	  A regression was introduced where searching for realtime PJSIP objects
	  by regex by starting the regex with a leading "^" would cause no items
	  to be returned.

	  This was due to a change which attempted to drop the requirement for a
	  leading "^" to be present due to how some CLI commands formulate their
	  regexes. However, the change, rather than simply eliminating the
	  requirement, caused any regexes that did begin with "^" to end up not
	  returning the expected results.

	  This change fixes the problem by inspecting the regex and formulating
	  the realtime query differently depending on if it begins with "^".

	  ASTERISK-25702 #close
	  Reported by Nic Colledge

	  Patches:
	      realtime_retrieve_regex.patch submitted by Alexei Gradinari License #5691

	  Change-Id: I055df608a6e6a10732044fa737a9fe8dca602693

2016-02-02 04:05 +0000 [0405c31756]  Karsten Wemheuer <kwe-digium@iptam.com>

	* res_xmpp: Does not connect in component mode

	  The module res_xmpp does not accept usernames in the form used in component
	  mode (XEP-0114). In component mode there is no @something in the name.
	  In component mode the connection is now not dropped anymore.

	  If the xmpp server sends out a "stream" tag before handshake is finished,
	  the connection gets dropped in res_xmpp. Now this tag will be ignored and
	  the connection will be established.

	  After connecting there will be an exchange of presence states. This does
	  not work as expected in component mode. The responsible function
	  "xmpp_pak_presence" is left before the states get sent out. Sending
	  presence states in component mode is now moved to the top of the function.

	  ASTERISK-25735 #close

	  Change-Id: I70e036f931c3124ebb2ad1e56f93ed35cfdd9d5c
2016-02-01 13:04 +0000 [8804d0973c]  gtjoseph <george.joseph@fairview5.com>

	* build_system:  Fix some warnings highlighted by clang

	  Fix some warnings found with clang.

	  Change-Id: I5195b6189b148c2ee3ed4a19d015a6d4ef3e77bd

2016-02-01 13:16 +0000 [109b0aff6b]  gtjoseph <george.joseph@fairview5.com>

	* res/Makefile: Fix bug in "clean" target for ari

	  The "clean" target was attempting to clean res/ari from inside
	  the res directory which doesn't remove anything.  Removed the res/
	  prefix.

	  Change-Id: Ib1a518d54efa81b9fd5a42742d43cc3767435bf6

2016-01-31 20:13 +0000 [a85fab7c44]  gtjoseph <george.joseph@fairview5.com>

	* pjsip/alembic: Fix definition of qualify_timeout

	  A recent commit set qualify_timeout to Decimal which isn't supported.
	  This path corrects it to Float.

	  Change-Id: I038f5274ba8cb60f8518a5845ce448d49306aadf

2016-01-29 07:39 +0000 [aa9348ab9a]  Stefan Engström <stefanen@kth.se>

	* chan_sip.c: AMI & CLI notify methods get different values of asterisk's own ip.

	  When I ask asterisk to send a SIP NOTIFY message to a sip peer using either a)
	  AMI action: SIPnotify or b) cli command: sip notify <cmd> <peer>, I expect
	  asterisk to include the same value for its own ip in both cases a) and b),
	  but it seems a) produces a contact header like Contact:
	  <sip:asterisk@192.168.1.227:8060> whereas b) produces a contact header like
	  <sip:asterisk@127.0.0.1:8060>. 0.0.0.0:8060 is my udpbindaddr in sip.conf

	  My guess is that manager_sipnotify should call
	  ast_sip_ouraddrfor(&p->sa, &p->ourip, p) the same way sip_cli_notify does,
	  because after applying this patch, both cases a) and b) produce
	  the contact header that I expect: <sip:asterisk@192.168.1.227:8060>

	  Reported by: Stefan Engström
	  Tested by: Stefan Engström

	  Change-Id: I86af5e209db64aab82c25417de6c768fb645f476
2015-12-23 15:07 +0000 [65bd4fcc3f]  Mark Michelson <mmichelson@digium.com>

	* res_odbc: Remove connection management

	  Asterisk by default will create a single database connection and share
	  it among all threads that attempt to access the database. In previous
	  versions of Asterisk, this was tolerable, because the most used channel
	  driver, chan_sip, mostly accessed the database from a single thread.
	  With PJSIP, however, many threads may be attempting to perform database
	  operations, and there is the potential for many more database accesses,
	  meaning the concurrency is a horrible bottleneck if only one connection
	  is shared.

	  Asterisk has a connection pooling facility built into it, but the
	  implementation has flaws. For one, there is a strict limit on the number
	  of simultaneous connections that could be made to the database. Anything
	  beyond the maximum would result in a failed operation. Attempting to
	  predict what the maximum should be is nearly impossible even for someone
	  intimately familiar with Asterisk's threading model. In addition, use of
	  transactions in the dialplan can cause some severe bugs if connection
	  pooling is enabled.

	  This commit seeks to fix the concurrency problem by removing all
	  connection management code from Asterisk and leaving that to the
	  underlying unixODBC code instead. Now, Asterisk does not share a single
	  connection, nor does it try to maintain a connection pool. Instead, all
	  Asterisk ever does is request a connection from unixODBC and allow
	  unixODBC to either allocate those connections or retrieve them from a
	  pool.

	  Doing this has a bit of a ripple effect. For one, since connections are
	  not long-lived objects, several of the safeguards that previously
	  existed have been removed. We don't have to worry about trying to use a
	  connection that has gone stale. In every case, when we request a
	  connection, it has just been made and we don't need to perform any
	  sanity checks to be sure it's still active.

	  Another major player affected by this change is transactions.
	  Transactions and their respective connections were so tightly coupled
	  that it was almost pornographic. This code change moves
	  transaction-related code to its own file separate from the core ODBC
	  functionality. This way, the core of ODBC does not even have to know
	  that transactions exist.

	  In making this large change, I had to look at a lot of code and
	  understand it. When making this change, I discovered several places
	  where the behavior is definitely not ideal, but it seemed outside the
	  scope of this change to be fixing it. Instead, any place where I saw
	  some sort of room for improvement has had a XXX comment added explaining
	  what could be altered to improve it.

	  Change-Id: I37a84def5ea4ddf93868ce8105f39de078297fbf

2016-01-28 12:44 +0000 [2a9e623ff9]  Richard Mudgett <rmudgett@digium.com>

	* config_options.c: Fix warning message wording.

	  Change-Id: I915ea437936320393afde0e7552cf0a980a6b2e4

2016-01-25 17:34 +0000 [ed3c9c1512]  Richard Mudgett <rmudgett@digium.com>

	* app_confbridge.c: Replace inlined code with existing function.

	  Change-Id: Ida5594e9f8d7c1fc18eeb733a11f8fb96326da51

2016-01-25 16:05 +0000 [1d0abf86e7]  Richard Mudgett <rmudgett@digium.com>

	* app_confbridge: Add ability to get the muted conference state.

	  * Added CONFBRIDGE_INFO(muted,) for querying the muted conference state.

	  * Added Muted header to AMI ConfbridgeListRooms action response list
	  events to indicate the muted conference state.

	  * Added Muted column to CLI "confbridge list" output to indicate the muted
	  conference state and made the locked column a yes/no value instead of a
	  locked/unlocked value.

	  ASTERISK-20987
	  Reported by: hristo

	  Change-Id: I4076bd8ea1c23a3afd4f5833e9291b49a0c448b1

2016-01-26 17:59 +0000 [f0d40afa69]  Richard Mudgett <rmudgett@digium.com>

	* app_confbridge.c: Update CONFBRIDGE and CONFBRIDGE_INFO documentation.

	  Change-Id: Ic1f9e22ba1f2ff3b3f5cb017c5ddcd9bd48eccc7

2016-01-25 15:48 +0000 [3e51e5c7fd]  Richard Mudgett <rmudgett@digium.com>

	* app_confbridge: Make non-admin users join a muted conference muted.

	  ASTERISK-20987 #close
	  Reported by: hristo

	  Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38

2016-01-27 13:02 +0000 [9da18af992]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Add res_pjproject dependency to UPGRADE.txt and samples

	  Since res_pjsip now depends on res_pjproject, this is now mentioned
	  in UPGRADE.txt and the basic-pbx modules.conf has been updated.

	  Change-Id: I42826597d5e10f08e518208860c44c96e52f1b2d
2016-01-27 10:29 +0000 [aee8448bc2]  gtjoseph <george.joseph@fairview5.com>

	* build_system: Prevent goals needing makeopts from running when it's missing

	  The Makefile only optionally includes makeopts so when goals like uninstall that
	  dont depend on anything else are run after a distclean, rules like
	  'rm -f "$(DESTDIR)$(ASTMODDIR)/"*' get run as 'rm -f ""/*' which attempts
	  to remove everything in the root directory.

	  Although there's a rule defined for makeopts which prints a message and does
	  an 'exit 1', since '-include makepopts' was specified (with the -), the exit
	  was ignored letting the rest of the rules run.

	  This patch makes makeopts required unless the goal has the string 'clean' in it.

	  ASTERISK-25730 #close
	  Reported-by: George Joseph

	  Change-Id: I1bce59a7ea4f48e7a468e22b2abbb13c63417ac7

2016-01-25 09:35 +0000 [f22074e5d9]  Joshua Colp <jcolp@digium.com>

	* config: Allow options to register when documentation is unavailable.

	  The config options framework is strict in that configuration options must
	  be documented unless XML documentation support is not available. In
	  practice this is useful as it ensures documentation exists however in
	  off-nominal cases this can cause strange problems.

	  If it is expected that a config option has a non-zero or non-empty
	  default value but the config option documentation is unavailable
	  this reasonable expectation will not be met. This can cause obscure
	  crashes and weirdness depending on how the code handles it.

	  This change tweaks the behavior to ensure that the config option
	  is still allowed to register, apply default values, and be set when
	  devmode is not enabled. If devmode is enabled then the option can
	  NOT be set.

	  This also does not remove the initial documentation error message that
	  is output on load when registering the configuration option.

	  ASTERISK-25725 #close

	  Change-Id: Iec42fca6b35f31326c33fcdc25473f6fd7bc8af8

2016-01-25 10:23 +0000 [4a3275abb9]  Mark Michelson <mmichelson@digium.com>

	* Stasis: Use custom structure when setting variables.

	  A recent change to queue channel variable setting to the Stasis control
	  queue caused a regression. When setting channel variables, it is
	  possible to give a NULL channel variable value in order to unset the
	  variable (i.e. remove it from the channel variable list). The change
	  introduced a call to ast_variable_new(), which is not tolerant of NULL
	  channel variable values.

	  This new change switches from using ast_variable to using a custom
	  channel variable struct that is lighter weight and NULL value-tolerant.

	  Change-Id: I784d7beaaa3c036ea936d103e7caf0bb1562162d

2016-01-25 16:56 +0000 [b2c8a99f9e]  Rusty Newton <rnewton@digium.com>

	* sounds/Makefile: Incremented core and extra sounds versions to 1.5

	  Core and extra sounds 1.5 was recently released! The tarballs contain
	  change descriptions however I figure more people will see this one so
	  I'll try to be a bit detailed. Approximately 60 sounds were moved from Extra
	  to Core for en, en_GB, fr and added for languages that didn't already
	  have Extra sound sets (it,ja,ru).

	  In addition all of the English and Russian sounds have been completely
	  re-recorded.

	  Sounds moved and added:
	  activated,added,all-circuits-busy-now,astcc-followed-by-pound
	  at-tone-time-exactly,call-forwarding,call-fwd-no-ans,call-fwd-on-busy
	  ,call-fwd-unconditional,calling,call-waiting,cancelled,
	  cannot-complete-as-dialed,check-number-dial-again,conf-full,de-activated
	  ,disabled,do-not-disturb,enabled,enter-num-blacklist,entr-num-rmv-blklist
	  ,extension,feature-not-avail-line,for,from-unknown-caller,goodbye,hello
	  ,if-correct-press,im-sorry,info-about-last-call,is,is-in-use,is-set-to
	  ,location,number,number-not-answering,num-was-successfully,one-moment-please
	  ,please-try-again,pls-hold-while-try,pls-try-call-later,pm-invalid-option
	  ,privacy-to-blacklist-last-caller,removed,simul-call-limit-reached
	  ,something-terribly-wrong,sorry,sorry-youre-having-problems,speed-dial
	  ,speed-dial-empty,telephone-number,time,to-call-this-number,to-extension
	  ,to-listen-to-it,to-rerecord-it,unidentified-no-callback,with,you-entered
	  ,your

	  There were also a few random fixes here and there to file names for a few
	  of the languages.

	  ASTERISK-25068 #close

	  Change-Id: I2b594344ec585d7dfd922b40c1af43b1508828b3
2016-01-25 16:51 +0000 [8261bda1bf]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Prevent crash from AMI command on freed subscription.

	  A test recently uncovered that running an ill-timed AMI command to show
	  inbound subscriptions could cause a crash since Asterisk will try to
	  operate on a freed subscription.

	  The fix for this is to remove the subscription tree from the list of
	  subscriptions at the time that we are sending our final NOTIFY request
	  out. This way, as the subscription is in the process of dying, it is
	  inaccessible from AMI.

	  Change-Id: Ic0239003d8d73e04c47c12dd2a7e23867e5b5b23

2016-01-25 11:03 +0000 [a6823bb0c4]  Corey Farrell <git@cfware.com>

	* chan_sip: Fix buffer overrun in sip_sipredirect.

	  sip_sipredirect uses sscanf to copy up to 256 characters to a stacked buffer
	  of 256 characters.  This patch reduces the copy to 255 characters to leave
	  room for the string null terminator.

	  ASTERISK-25722 #close

	  Change-Id: Id6c3a629a609e94153287512c59aa1923e8a03ab

2016-01-22 15:08 +0000 [1003c2eb05]  Mark Michelson <mmichelson@digium.com>

	* Stasis: Fix potential memory leak of control data.

	  When queuing tasks onto the Stasis control queue, you can pass an
	  arbitrary data pointer and a function to free that data. All ARI
	  commands that use the Stasis control queue made the assumption that the
	  destructor function would be called in all paths, whether the task was
	  queued successfully or not. However, this was not correct. If a task was
	  queued onto a control structure that was already completed, the
	  allocated data would not be freed properly.

	  This patch corrects this by making sure that all return paths call the
	  data destructor.

	  Change-Id: Ibf06522094f8e5c4cce652537dc5d7222b1c4fcb

2016-01-21 10:58 +0000 [eedd77fda0]  Mark Michelson <mmichelson@digium.com>

	* Stasis: Use control queue to prevent crash.

	  A crash occurred when attempting to set a channel variable on a channel
	  that had already been hung up. This is because there is a small window
	  between when a control is grabbed and when the channel variable is set
	  that the channel can be hung up.

	  The fix here is to queue the setting of the channel variable onto the
	  control queue. This way, the manipulation of the channel happens in a
	  thread where it is safe to be done.

	  In this change, I also noticed that the setting of bridge roles on
	  channels was being done outside of the control queue, so I also changed
	  those operations to be done in the control queue.

	  ASTERISK-25709 #close
	  Reported by Mark Michelson

	  Change-Id: I2a0a4d51bce6fba6f1d9954e40935e42f366ea78

2016-01-22 11:48 +0000 [1c95b211a0]  Richard Mudgett <rmudgett@digium.com>

	* logger.c: Fix buffer overrun found by address sanitizer.

	  The null terminator of the tail struct member was not being allocated
	  when no logger.conf config file is installed.

	  ASTERISK-25714 #close
	  Reported by: Badalian Vyacheslav

	  Change-Id: I45770fdd08af39506a3bc33ba279c4f16e047a30

2016-01-21 16:40 +0000 [6ff945ab87]  Corey Farrell <git@cfware.com>

	* Build System: Add support for checking alembic branches.

	  * Add 'check-alembic' target to root Makefile.
	  * Create build_tools/make_check_alembic to do the actual checks.

	  ASTERISK-25685

	  Change-Id: Ibb3cae7d1202ac23dc70b0f3b5801571ad46b004

2016-01-19 18:20 +0000 [02035212de]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip/presence_xml.c: Add missing 2nd call presence state case.

	  ASTERISK-25712 #close
	  Reported by: Richard Mudgett

	  Change-Id: I70634df24f8c6c3a2c66c45af61d021e4999253f

2016-01-18 03:49 +0000 [c68c66c61f]  Diederik de Groot <ddegroot@talon.nl>

	* main/asterisk.c: ast_el_read_char

	  Make sure buf[res] is not accessed at res=-1 (buffer underrun).
	  Address Sanitizer will complain about this quite loudly.

	  ASTERISK-24801 #close

	  Change-Id: Ifcd7f691310815a31756b76067c56fba299d3ae9

2016-01-13 16:49 +0000 [f87c3275cc]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Add CLI "pjsip dump endpt [details]"

	  Dump the res_pjsip endpt internals.

	  In non-developer mode we will not document or make easily accessible the
	  "details" option even though it is still available.  The user has to know
	  it exists to use it.  Presumably they would also be aware of the potential
	  crash warning below.

	  Warning: PJPROJECT documents that the function used by this CLI command
	  may cause a crash when asking for details because it tries to access all
	  active memory pools.

	  Change-Id: If2d98a3641c9873364d1daaad971376311aef3cb

2016-01-18 17:16 +0000 [46b2de55f9]  Matt Jordan <mjordan@digium.com>

	* funcs/func_cdr: Correctly report high precision values for duration and billsec

	  When CDRs were refactored, func_cdr's ability to report high precision values
	  for duration and billsec (the 'f' option) was broken. This was due to func_cdr
	  incorrectly interpreting the duration/billsec values provided by the CDR engine
	  in milliseconds, as opposed to seconds. Since the CDR engine only provides
	  duration and billsec in seconds, and does not expose either attribute with
	  sufficient precision to merely pass back the underlying value, this patch fixes
	  the bug by re-calculating duration and billsec with microsecond precision based
	  on the start/answer/end times on the CDR.

	  ASTERISK-25179 #close

	  Change-Id: I8bc63822b496537a5bf80baf6102c06206bee841

2016-01-18 19:20 +0000 [137fe5ae01]  gtjoseph <george.joseph@fairview5.com>

	* res_pjproject:  Add module providing pjproject logging and utils

	  res_pjsip_log_forwarder has been renamed to res_pjproject
	  and enhanced as follows:

	  As a follow-on to the recent 'Add CLI "pjsip show buildopts"' patch,
	  a new ast_pjproject_get_buildopt function has been added.  It
	  allows the caller to get the value of one of the buildopts.

	  The initial use case is retrieving the runtime value of
	  PJ_MAX_HOSTNAME to insure we don't send a hostname greater
	  than pjproject can handle.  Since it can differ between
	  the version of pjproject that Asterisk was compiled against
	  and the version of pjproject that Asterisk is running against,
	  we can't use the PJ_MAX_HOSTNAME macro directly in Asterisk
	  source code.

	  Change-Id: Iab6e82fec3d7cf00c1cf6185c42be3e7569dee1e

2016-01-19 17:15 +0000 [b5c13c1545]  Joshua Colp <jcolp@digium.com>

	* test_threadpool: Wait for each task to complete and fix memory leak.

	  This change makes the thread_timeout_thrash unit test wait for
	  each task to complete. This fixes the problem where the test would
	  prematurely end when all threads were gone and a new one had to be
	  started to handle the last task. It also increases the thrasing as
	  it is now more likely for each task to encounter the above scenario.

	  This also fixes a memory leak where the data for each task was not
	  being freed.

	  ASTERISK-25611 #close

	  Change-Id: I5017d621a4dc911f509074c16229b86bff2fb3c6

2016-01-18 19:44 +0000 [0ab89182d9]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Increase CLI "core ping taskprocessor" timeout.

	  Change-Id: I4892d6acbb580d6c207d006341eaf5e0f8f2a029

2016-01-18 19:43 +0000 [a2a8ea3330]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Fix some taskprocessor unrefs.

	  You have to call ast_taskprocessor_unref() outside of the taskprocessor
	  implementation code.  Taskprocessor use since v12 has become more
	  transient than just the singleton uses in earlier versions.

	  Change-Id: If7675299924c0cc65f2a43a85254e6f06f2d61bb

2016-01-19 13:44 +0000 [d604a9afc8]  Richard Mudgett <rmudgett@digium.com>

	* Fix alembic branches on v13.

	  Change-Id: I313449b609ede18ad1e1763a655dd23b9210a8e0

2016-01-18 18:45 +0000 [a0c79f3a4f]  gtjoseph <george.joseph@fairview5.com>

	* pjsip_loging_refactor: Rename res_pjsip_log_forwarder to res_pjproject

	  Change-Id: I5387821f29e5caa0cba0b7d62b0fc0d341e7e20b

2016-01-14 09:26 +0000 [018ccf680b]  Rusty Newton <rnewton@digium.com>

	* func_channel: Add help text for undocumented CHANNEL function arguments

	  Adding help text documentation for:
	  * hangupsource
	  * appname
	  * appdata
	  * exten
	  * context
	  * channame
	  * uniqueid
	  * linkedid

	  ASTERISK-24097 #close
	  Reported by: Steven T. Wheeler
	  Tested by: Rusty Newton

	  Change-Id: Ib94b00568b0433987df87d5b67ea529b5905754d

2016-01-16 13:18 +0000 [5644bca9f9]  Daniel Journo <dan@keshercommunications.com>

	* Update version number in features.conf.sample

	  Update the version number in the comments from Asterisk 12 to Asterisk 12+

	  Change-Id: Ie692ac8cda3c993c3bf10f27f51a1cca3317ec7b

2016-01-15 19:52 +0000 [3f5f30cf82]  Corey Farrell <git@cfware.com>

	* main/config: Clean config maps on shutdown.

	  ASTERISK-25700 #close

	  Change-Id: I096da84f9c62c6095f68bcf98eac4b7c7868e808

2016-01-14 14:42 +0000 [660fedecb7]  Kevin Harwell <kharwell@digium.com>

	* bridge_basic: don't cache xferfailsound during an attended transfer

	  The xferfailsound was read from the channel at the beginning of the transfer,
	  and that value is "cached" for the duration of the transfer. Therefore, changing
	  the xferfailsound on the channel using the FEATURE() dialplan function does
	  nothing once the transfer is under way.

	  This makes it so the transfer code instead gets the xferfailsound configuration
	  options from the channel when it is actually going to be used.

	  This patch also fixes a potential memory leak of the props object as well as
	  making sure the condition variable gets initialized before being destroyed.

	  ASTERISK-25696 #close

	  Change-Id: Ic726b0f54ef588bd9c9c67f4b0e4d787934f85e4

2015-07-10 10:37 +0000 [9cda1de34d]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Simplify ast_taskprocessor_get() return code.

	  Change-Id: Id5bd18ef1f60ef8be453e677e98478298358a9d1

2016-01-13 18:20 +0000 [a79af2b312]  Richard Mudgett <rmudgett@digium.com>

	* astmm.c: Add more stats to CLI "memory show" commands.

	  * Add freed regions totals to allocations and summary.

	  * Add totals for all allocations and not just the selected allocations.

	  Change-Id: I61d5a5112617b0733097f2545a3006a344b4032a

2016-01-14 16:00 +0000 [83feb7db3b]  Kevin Harwell <kharwell@digium.com>

	* bridge_basic: don't play an attended transfer fail sound after target hangs up

	  If the attended transfer destination answers (picks call up or goes to
	  voicemail) and then hangs up on the transferer then transferer hears the
	  fail sound.

	  This patch makes it so the fail sound is not played when the transfer
	  destination/target hangs up after answering.

	  ASTERISK-25697 #close

	  Change-Id: I97f142fe4fc2805d1a24b7c16143069dc03d9ded

2016-01-14 13:22 +0000 [935d641f3b]  Mark Michelson <mmichelson@digium.com>

	* Remove res/ari/* content during 'make clean'.

	  'make clean' and 'make distclean' can leave behind .o files in the
	  res/ari/ directory. One observed consequence of this is that running
	  Asterisk with MALLOC_DEBUG can cause Asterisk to crash immediately on
	  startup sometimes.

	  By ensuring that we are making a clean build, we can be sure that stale
	  files are not being included in the build and causing problems when
	  build options should have caused files to be re-built.

	  ASTERISK-25683 #close
	  Reported by yaron nahum

	  Change-Id: I1f48baa904d2468eddeefb42ee68a56af7adc7b7

2016-01-13 15:58 +0000 [46f21df302]  Daniel Journo <dan@keshercommunications.com>

	* pjsip/alembic:  Fix qualify_timeout column definition

	  Corrects the qualify_timeout column type from Integer to Decimal

	  ASTERISK-25686 #close
	  Reported-by: Marcelo Terres

	  Change-Id: I757d0e3c011ee9be6cd5abd48bc92441a405d3c8

2016-01-12 11:14 +0000 [32b29d7b02]  Joshua Colp <jcolp@digium.com>

	* app: Queue hangup if channel is hung up during sub or macro execution.

	  This issue was exposed when executing a connected line subroutine.
	  When connected or redirected subroutines or macros are executed it is
	  expected that the underlying applications and logic invoked are fast
	  and do not consume frames. In practice this constraint is not enforced
	  and if not adhered to will cause channels to continue when they shouldn't.
	  This is because each caller of the connected or redirected logic does not
	  check whether the channel has been hung up on return. As a result the
	  the hung up channel continues.

	  This change makes it so when the API to execute a subroutine or
	  macro is invoked the channel is checked to determine if it has hung up.
	  If it has then a hangup is queued again so the caller will see it
	  and stop.

	  ASTERISK-25690 #close

	  Change-Id: I1f9a8ceb1487df0389f0d346ce0f6dcbcaf476ea

2016-01-13 07:20 +0000 [e7cfda0b38]  Sean Bright <sean.bright@gmail.com>

	* res_musiconhold: Prevent multiple simultaneous reloads.

	  There are two ways in which the reload() function in res_musiconhold can be
	  called from the CLI:

	    * module reload res_musiconhold.so
	    * moh reload

	  In the former case, the module loader holds a lock that prevents multiple
	  concurrent calls, but in the latter there is no such protection.

	  This patch changes the 'moh reload' CLI command to invoke the module loader
	  directly, rather than call reload() explicitly.

	  ASTERISK-25687 #close

	  Change-Id: I408968b4c8932864411b7f9ad88cfdc7b9ba711c
2016-01-12 14:25 +0000 [5586abc957]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_log_forwarder.c: Add CLI "pjsip show buildopts".

	  PJPROJECT has a function available to dump the compile time
	  options used when building the library.

	  * Add CLI "pjsip show buildopts" command.

	  * Update contrib/scripts/autosupport to get pjproject information.

	  Change-Id: Id93a6a916d765b2a2e5a1aeb54caaf83206be748

2016-01-12 10:36 +0000 [4cd58c3b20]  Mark Michelson <mmichelson@digium.com>

	* res_sorcery_realtime: Remove leading ^ requirement.

	  res_sorcery_realtime's search-by-regex callback performed a check to
	  ensure that the passed-in regex began with a caret (^). If it did not,
	  then no results would be returned.

	  This callback only started to become used when "like" support was added
	  to PJSIP CLI commands. The CLI command for listing objects would pass an
	  empty regex ("") to the sorcery backend if no "like" statement was
	  present. For most sorcery backends, this resulted in returning all
	  objects. However, for realtime, this resulted in returning no objects.

	  This commit seeks to fix the regression by removing the requirement from
	  res_sorcery_realtime for the passed-in-regex to begin with a caret.

	  ASTERISK-25689 #close
	  Reported by Marcelo Terres

	  Change-Id: I22b4dc5d7f3f11bb29ac2e42ef94682e9bab3b20

2016-01-07 11:57 +0000 [219c204a41]  gtjoseph <george.joseph@fairview5.com>

	* pjsip_sdp_rtp:  Add option endpoint/bind_rtp_to_media_address

	  On a system with multiple ip addresses in the same subnet, if a
	  transport is bound to a specific ip address and endpoint/media_address
	   is set, the SIP/SDP will have the correct address in all fields but
	  the rtp stream MAY still originate from one of the other ip addresses,
	  most probably the "primary" ip address.  This happens because
	   res_pjsip_sdp_rtp/create_rtp always calls ast_instance_new with
	  the "all" ip address (0.0.0.0 or ::).

	  The new option causes res_pjsip_sdp_rtp/create_rtp to call
	  ast_rtp_instance_new with the endpoint's media_address (if specified)
	  instead of the "all" address.  This causes the packets to originate from
	  the specified address.

	  ASTERISK-25632
	  ASTERISK-25637
	  Reported-by: Olivier Krief
	  Reported-by: Dan Journo

	  Change-Id: I3dfaa079e54ba7fb7c4fd1f5f7bd9509bbf8bd88

2016-01-10 16:22 +0000 [22801a06ee]  Daniel Journo <dan@keshercommunications.com>

	* pjsip:  Add option global/regcontext

	  Added new global option (regcontext) to pjsip. When set, Asterisk will
	  dynamically create and destroy a NoOp priority 1 extension
	  for a given endpoint who registers or unregisters with us.

	  ASTERISK-25670 #close
	  Reported-by: Daniel Journo

	  Change-Id: Ib1530c5b45340625805c057f8ff1fb240a43ea62

2016-01-08 15:22 +0000 [1600ebca7d]  Kevin Harwell <kharwell@digium.com>

	* pbx: Deadlock between contexts container and context_merge locks

	  Recent changes (ASTERISK-25394 commit 2bd27d12223fe33b58c453965ed5c6ed3af7c4f5)
	  introduced the possibility of a deadlock. Due to the mentioned modifications
	  ast_change_hints now needs to keep both merge/delete and state callbacks from
	  occurring while it executes. Unfortunately, sometimes ast_change_hints can be
	  called with the contexts container locked. When this happens it's possible for
	  another thread to grab the context_merge_lock before the thread calling into
	  ast_change_hints does and then try to obtain the contexts container lock. This
	  of course causes a deadlock between the two threads. The thread calling into
	  ast_change_hints waits for the other thread to release context_merge_lock and
	  the other thread is waiting on that one to release the contexts container lock.

	  Unfortunately, there is not a great way to fix this problem. When hints change,
	  the subsequent state callbacks cannot run at the same time as a merge/delete,
	  nor when the usual state callbacks do. This patch alleviates the problem by
	  having those particular callbacks (the ones run after a hint change) occur in a
	  serialized task. By moving the context_merge_lock to a task it can now safely be
	  attempted or held without a deadlock occurring.

	  ASTERISK-25640 #close
	  Reported by: Krzysztof Trempala

	  Change-Id: If2210ea241afd1585dc2594c16faff84579bf302

2016-01-10 17:08 +0000 [0fc3dad965]  Corey Farrell <git@cfware.com>

	* devicestate: Cleanup engine thread during graceful shutdown.

	  ASTERISK-25681 #close

	  Change-Id: I64337c70f0ebd8c77f70792042684607c950c8f1

2016-01-10 13:51 +0000 [f34dd10495]  Corey Farrell <git@cfware.com>

	* manager: Cleanup manager_channelvars during shutdown.

	  ASTERISK-25680 #close

	  Change-Id: I3251d781cbc3f48a6a7e1b969ac4983f552b2446

2016-01-10 13:27 +0000 [1d3a1167fc]  Corey Farrell <git@cfware.com>

	* res_calendar: Cleanup scheduler context at unload.

	  ASTERISK-25679 #close

	  Change-Id: I839159bf6882cccc1b23494c7aa2bc2a2624613f

2016-01-08 11:49 +0000 [3a160cdbf6]  Joshua Colp <jcolp@digium.com>

	* res_rtp_asterisk: Revert DTLS negotiation changes.

	  Due to locking issues within pjnath these changes are being
	  reverted until pjnath can be changed.

	  ASTERISK-25645

	  Revert "res_rtp_asterisk.c: Fix DTLS negotiation delays."

	  This reverts commit 24ae124e4f7310cfa64c187b944b2ffc060da28d.

	  Change-Id: I2986cfb2c43dc14455c1bcaf92c3804f9da49705

	  Revert "res_rtp_asterisk: Resolve further timing issues with DTLS negotiation"

	  This reverts commit 965a0eee46d24321f74c244e23c5a5f45e67e12b.

	  Change-Id: Ie68fafde27dad4b03cb7a1e27ce2a8502c3f7bbe

2016-01-09 17:57 +0000 [4b10fc9173]  gtjoseph <george.joseph@fairview5.com>

	* Revert "pjsip_location: Delete contact_status object when contact is deleted"

	  This reverts commit 0a9941de9d24093b5ff44096d1d7406f29d11e45.

	  Matt,

	  This patch causes another problem and should not have been needed.
	  Before this patch, persistent_endpoint_contact_deleted_observer WAS
	  deleting the contact_status when ast_sip_location_delete_contact was
	  called.  By deleting it yourself in ast_sip_location_delete_contact
	  it was gone before the observer could run and the observer therefore
	  was throwing an error and not sending stasis/AMI/statsd messages.

	  So, I don't think this was the cause of your original issue.  I also
	  had verified the contact AMI and statsd lifecycle and it was working.
	  I'll double check now though.

	  ASTERISK-25675
	  Reported-by: Daniel Journo

	  Change-Id: Ib586a6b7f90acb641b0c410f659743ab90e84f1a

2016-01-09 18:04 +0000 [79b4309881]  Corey Farrell <git@cfware.com>

	* pbx_dundi: Run cleanup on failed load.

	  During failed startup of pbx_dundi no cleanup was performed.  Add a call
	  to unload_module before returning AST_MODULE_LOAD_DECLINE.

	  ASTERISK-25677 #close

	  Change-Id: I8ffa226fda4365ee7068ac1f464473f1a4ebbb29

2016-01-09 13:28 +0000 [a5406b1f9e]  Corey Farrell <git@cfware.com>

	* res_crypto: Perform cleanup at shutdown.

	  This change causes res_crypto to unregister CLI at shutdown while still
	  preventing the module from being unloaded.

	  ASTERISK-25673 #close

	  Change-Id: Ie5d57338dc2752abfc0dd05d0eec86413f2304fc

2016-01-06 19:10 +0000 [cf8e7a580b]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Create human friendly serializer names.

	  PJSIP name formats:
	  pjsip/aor/<aor>-<seq> -- registrar thread pool serializer
	  pjsip/default-<seq> -- default thread pool serializer
	  pjsip/messaging -- messaging thread pool serializer
	  pjsip/outreg/<registration>-<seq> -- outbound registration thread pool
	  serializer
	  pjsip/pubsub/<endpoint>-<seq> -- pubsub thread pool serializer
	  pjsip/refer/<endpoint>-<seq> -- REFER thread pool serializer
	  pjsip/session/<endpoint>-<seq> -- session thread pool serializer
	  pjsip/websocket-<seq> -- websocket thread pool serializer

	  Change-Id: Iff9df8da3ddae1132cb2ef65f64df0c465c5e084

2016-01-06 19:09 +0000 [4276f185f0]  Richard Mudgett <rmudgett@digium.com>

	* Sorcery: Create human friendly serializer names.

	  Sorcery name formats:
	  sorcery/<type>-<seq> -- Sorcery thread pool serializer

	  Change-Id: Idc2e5d3dbab15c825b97c38c028319a0d2315c47

2016-01-06 19:09 +0000 [f02ac1b7f9]  Richard Mudgett <rmudgett@digium.com>

	* Stasis: Create human friendly taskprocessor/serializer names.

	  Stasis name formats:
	  subm:<topic>-<seq> -- Stasis subscription mailbox task processor
	  subp:<topic>-<seq> -- Stasis subscription thread pool serializer

	  Change-Id: Id19234b306e3594530bb040bc95d977f18ac7bfd

2016-01-07 16:15 +0000 [ec1f1c6742]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: New API for human friendly taskprocessor names.

	  * Add new API call to get a sequence number for use in human friendly
	  taskprocessor names.

	  * Add new API call to create a taskprocessor name in a given buffer and
	  append a sequence number.

	  Change-Id: Iac458f05b45232315ed64aa31b1df05b875537a9

2016-01-06 17:19 +0000 [d8bc3e0c8b]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Fix CLI "core show taskprocessors" output format.

	  Update the CLI "core show taskprocessors" output format to not be
	  distorted because UUID names are longer than previously used taskprocessor
	  names.

	  Change-Id: I1a5c82ce3e8f765a0627796aba87f8f7be077601

2016-01-07 21:07 +0000 [2c4b7502de]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Fix CLI "core show taskprocessors" unref.

	  Change-Id: I1d9f4e532caa6dfabe034745dd16d06134efdce5

2016-01-07 20:44 +0000 [3b33ac7a46]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Sort CLI "core show taskprocessors" output.

	  Change-Id: I71e7bf57c7b908c8b8c71f1816348ed7c5a5d51e

2016-01-06 19:00 +0000 [0fc32c4dd3]  Richard Mudgett <rmudgett@digium.com>

	* ccss.c: Replace space in taskprocessor name.

	  The CLI "core ping taskprocessor" command does not work very
	  well with taskprocessor names that have spaces in them.  You
	  have to put quotes around the name so using tab completion
	  becomes awkward.

	  Change-Id: I29e806dd0a8a0256f4e2e0a7ab88c9e19ab0eda0

2016-01-05 16:54 +0000 [0e0c24ad78]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Add CLI "core ping taskprocessor" missing unlock.

	  Change-Id: I78247e0faf978bf850b5ba4e9f4933ab3c59d17b

2016-01-07 03:33 +0000 [0f79c8839b]  Diederik de Groot <ddegroot@talon.nl>

	* main: Use ast_strdup instead of strdup

	  Fix compile error in main/utils.c because strdup was used in dummy_start

	  Change-Id: Id61a6cf4f3cbf235450441e10e7da101a6335793

2016-01-07 03:21 +0000 [4285dee778]  Diederik de Groot <ddegroot@talon.nl>

	* include/asterisk/time.h: Renamed global declaration:tv

	  Renamed global declaration:tv to dummy_tv_var_for_types,
	  which would oltherwise cause 'shadow' warnings when 'tv'
	  was declared as a local variable elsewhere.

	  Added comment to note that dummy_tv_var_for_types is never
	  really exported and only used as a place holder.

	  ASTERISK-25627 #close

	  Change-Id: I9a6e17995006584f3627efe8988e3f8aa0f5dc28

2016-01-07 15:37 +0000 [96094feab6]  Mark Michelson <mmichelson@digium.com>

	* PJSIP: Prevent deadlock due to dialog/transaction lock inversion.

	  A deadlock was observed where the monitor thread was stuck, therefore
	  resulting in no incoming SIP traffic being processed.

	  The problem occurred when two 200 OK responses arrived in response to a
	  terminating NOTIFY request sent from Asterisk. The first 200 OK was
	  dispatched to a threadpool worker, who locked the corresponding
	  transaction. The second 200 OK arrived, resulting in the monitor thread
	  locking the dialog. At this point, the two threads are at odds, because
	  the monitor thread attempts to lock the transaction, and the threadpool
	  thread loops attempting to try to lock the dialog.

	  In this case, the fix is to not have the monitor thread attempt to hold
	  both the dialog and transaction locks at the same time. Instead, we
	  release the dialog lock before attempting to lock the transaction.

	  There have also been some debug messages added to the process in an
	  attempt to make it more clear what is going on in the process.

	  ASTERISK-25668 #close
	  Reported by Mark Michelson

	  Change-Id: I4db0705f1403737b4360e33a8e6276805d086d4a

2016-01-07 09:39 +0000 [52e9de0016]  Corey Farrell <git@cfware.com>

	* ast_format_cap_append_by_type: Resolve codec reference leak.

	  This resolves a reference leak caused by ASTERISK-25535.  The pointer
	  returned by ast_format_get_codec is saved so it can be released.

	  ASTERISK-25664 #close

	  Change-Id: If9941b1bf4320b2c59056546d6bce9422726d1ec

2016-01-04 04:26 +0000 [86eae38d7e]  Aaron An <anjb@ti-net.com.cn>

	* cel/cel_radius: Fix wrong pointer.

	  The macro ADD_VENDOR_CODE defined in the cel_radius.c should use the parameter
	  y not the address of y.

	  I capture the radius UDP packet via tcpdump, and the AV pairs are not correct,
	  then i review the source code and compare it with cdr/cdr_radius.c. Fix it and
	   it works.

	  ASTERISK-25647 #close
	  Reported by: Aaron An
	  Tested by: Aaron An

	  Change-Id: I72889bccd8fde120d47aa659edc0e7e6d4d019f0

2016-01-05 14:52 +0000 [881dc862e0]  gtjoseph <george.joseph@fairview5.com>

	* asterisk.h: Add ASTERISK_REGISTER_FILE macro

	  The 11/13 branches and master use 2 different file version macros. 11/13
	  uses ASTERISK_FILE_VERSION but master uses ASTERISK_REGISTER_FILE. This
	  means a new file added to 11/13 can't just be cherry-picked to master
	  because the macro has to be changed.

	  To make cherry-picking possible, ASTERISK_REGISTER_FILE was added
	  to asterisk.h as a simple alias for ASTERISK_FILE_VERSION(__FILE__, NULL)
	  The "$Revision$" tag doesn't do anything since Asterisk moved to git so
	  just passing NULL as the verison works fine.  asterisk.h was also
	  annotated to deprecate ASTERISK_FILE_VERSION and suggest using
	  ASTERISK_REGISTER_FILE for all new files.

	  Finally, 2 recent file additions, pbx_builtins.c and pbx_functions.c,
	  were modified to use the new macro to make sure it actually worked.
	  'core show file version' showed the correct output.

	  Change-Id: I5867ed898818d26ee49bb6e5c7d4c1a45d4789a5

2016-01-05 11:06 +0000 [d228b62fd4]  gtjoseph <george.joseph@fairview5.com>

	* stasis_cache_pattern:  Backport to 13

	  Somehow stasis_cache_pattern got out of sync between 13 and master
	  and it was causing duplicate channel message issues in 13 when
	  related to a specific endpoint. I.E. from statsd,
	  'endpoints.PJSIP.1174.channels 0|g' was being emitted twice.

	  Backporting stasis_cache_pattern from master to 13 solved
	  the issue and running the unit and testsuite tests confirmed
	  that no new ones were created.

	  ASTERISK-25317 #close

	  Change-Id: Ia8707462f62d15eed14541c37f332a7bbbceb548
2016-01-04 20:23 +0000 [e462f0063f]  Corey Farrell <git@cfware.com>

	* main/pbx: Move hangup handler routines to pbx_hangup_handler.c.

	  This is the sixth patch in a series meant to reduce the bulk of pbx.c.
	  This moves hangup handler management functions to their own source.

	  Change-Id: Ib25a75aa57fc7d5c4294479e5cc46775912fb104

2016-01-04 19:46 +0000 [ab191d124c]  Corey Farrell <git@cfware.com>

	* main/pbx: Move dialplan application management routines to pbx_app.c.

	  This is the sixth patch in a series meant to reduce the bulk of pbx.c.
	  This moves dialplan application management functions to their own source.

	  Change-Id: I444c10fb90a3cdf9f3047605d6a8aad49c22c44c

2016-01-04 18:20 +0000 [09a9b93896]  Corey Farrell <git@cfware.com>

	* main/pbx: Move switch routines to pbx_switch.c.

	  This is the fifth patch in a series meant to reduce the bulk of pbx.c.
	  This moves ast_switch functions to their own source.

	  Change-Id: Ic2592a18a5c4d8a3c2dcf9786c9a6f650a8c628e

2016-01-04 18:00 +0000 [c608274a39]  Corey Farrell <git@cfware.com>

	* main/pbx: Move timing routines to pbx_timing.c.

	  This is the fourth patch in a series meant to reduce the bulk of pbx.c.
	  This moves pbx timing functions to their own source.

	  Change-Id: I05c45186cb11edfc901e95f6be4e6a8abf129cd6

2015-12-29 04:31 +0000 [338a8ffed6]  Martin Tomec <tomec.martin@gmail.com>

	* app_queue: Add member flag "in_call" to prevent reading wrong lastcall time

	  Member lastcall time is updated later than member status. There was chance to
	  check wrapuptime for available member with wrong (old) lastcall time.
	  New boolean flag "in_call" is set to true right before connecting call, and
	  reset to false after update of lastcall time. Members with "in_call" set to true
	  are treat as unavailable.

	  ASTERISK-19820 #close

	  Change-Id: I1923230cf9859ee51563a8ed420a0628b4d2e500

2015-12-28 17:23 +0000 [e13719bff1]  Rodrigo Ramírez Norambuena <a@rodrigoramirez.com>

	* app_queue: Added reason pause of member

	  In app_queue added value Paused Reason on QueueMemberStatus when a member
	  on queue is paused and the reason was set.

	  ASTERISK-25480 #close
	  Reporte by: Rodrigo Ramírez Norambuena

	  Change-Id: Ia5db503482f50764c15e2020196c785f59d4a68e

2015-12-30 10:49 +0000 [4ec85a9f07]  gtjoseph <george.joseph@fairview5.com>

	* voicemail: Move app_voicemail / res_mwi_external conflict to runtime

	  The menuselect conflict between app_voicemail and res_mwi_external
	  makes it hard to package 1 version of Asterisk.  There no actual
	  build dependencies between the 2 so moving this check to runtime
	  seems like a better solution.

	  The ast_vm_register and ast_vm_greeter_register functions in app.c
	  were modified to return AST_MODULE_LOAD_DECLINE instead of -1 if there
	  is already a voicemail module registered. The modules' load_module
	  functions were then modified to return DECLINE instead of -1 to the
	  loader.  Since -1 is interpreted by the loader as AST_MODULE_LOAD_FAILURE,
	  the modules were incorrectly causing Asterisk to stop so this needed
	  to be cleaned up anyway.

	  Now you can build both and use modules.conf to decide which voicemail
	  implementation to load.

	  The default menuselect options still build app_voicemail and not
	  res_mwi_external but if both ARE built, res_mwi_external will load
	  first and become the voicemail provider unless modules.conf rules
	  prevent it.  This is noted in CHANGES.

	  Change-Id: I7d98d4e8a3b87b8df9e51c2608f0da6ddfb89247

2016-01-04 16:22 +0000 [7fdcfd7724]  Corey Farrell <git@cfware.com>

	* main/pbx: Move variable routines to pbx_variables.c.

	  This is the third patch in a series meant to reduce the bulk of pbx.c.
	  This moves channel and global variable routines to their own source.

	  Change-Id: Ibe8fb4647db11598591d443a99e3f99200a56bc6

2015-12-04 17:22 +0000 [80a8b2a4cd]  Richard Mudgett <rmudgett@digium.com>

	* app_dial: Immediately exit dial if the caller is already hung up.

	  If a caller hangs up before dial is executed within an AGI then the AGI
	  has likely eaten all queued frames before executing the dial in DeadAGI
	  mode.  With the caller hung up and no pending frames from the caller's
	  read queue, dial would not know that the call has hung up until a called
	  channel answers.  It is rather annoying to whoever just answered the
	  non-existent call.

	  Dial should not continue execution in DeadAGI mode, hangup handlers, or
	  the h exten.

	  * Added a check early in dial to abort dialing if the caller has hungup.

	  ASTERISK-25307 #close
	  Reported by: David Cunningham

	  Change-Id: Icd1bc0764726ef8c809f76743ca008d0f102f418

2016-01-02 10:26 +0000 [1087b0c6ed]  Matt Jordan <mjordan@digium.com>

	* main/cdr: Allow setting properties on a finalized CDR if it is the last one

	  Prior to this patch, we explicitly disallowed setting any properties on a
	  finalized CDR. This seemed like a good idea at the time; in practice, it was
	  more restrictive.

	  There are weird and strange scenarios where setting a property on a finalized
	  CDR is definitely wrong. For example, we may Fork a CDR, finalizing the
	  previous one, then change a property. In said case, the old CDR is supposed
	  to now be 'immutable' (so to speak), and should not be updated. From the
	  perspective of the code, a forked CDR that is finalized is just finalized.
	  Hence why we decided these should not be updated.

	  In practice, it is much more common to want to set a property on a CDR in
	  the h extension or in a hangup handler. Disallowing a common scenario to make
	  an esoteric behaviour work isn't good. This patch fixes this by allowing
	  callers to set a property IF we are the last CDR in the chain. This preserves
	  the finalized CDR if it was forked, while allowing the more common case to
	  function.

	  ASTERISK-25458 #close

	  Change-Id: Icf3553c607b9f561152a41e6d8381d594ccdf4b9

2016-01-02 10:23 +0000 [1f23e65b89]  Matt Jordan <mjordan@digium.com>

	* main/cdr: Set the end time on a CDR if endbeforehexten is Yes

	  Prior to this patch, the CDR engine attempted to set the end time on a CDR
	  that was executing hangup logic and with endbeforehexten set to Yes by
	  calling a function that inspects the properties on the Party A snapshot to
	  determine if we are ready to set the end time. That always failed. This is
	  because a Party A snapshot is not updated for CDRs that are executing hangup
	  logic with endbeforehexten=Yes.

	  Instead of calling a function that looks at the Party A snapshot, we just
	  simply set the end time on the CDR. This is safe to call multiple times, and is
	  safe to call at this point as we know that (a) we are executing hangup logic,
	  and (b) we are supposed to set the end time at this point.

	  ASTERISK-25458

	  Change-Id: I0c27b493861f9c13c43addbbb21257f79047a3b3

2015-12-30 20:51 +0000 [2ffade4574]  Corey Farrell <git@cfware.com>

	* main/pbx: Move custom function routines to pbx_functions.c.

	  This is the second patch in a series meant to reduce the bulk of pbx.c.
	  This moves custom function management routines to their own source.

	  Change-Id: I34a6190282f781cdbbd3ce9d3adeac3c3805e177

2015-12-28 19:18 +0000 [20b8474f20]  gtjoseph <george.joseph@fairview5.com>

	* main/pbx: Move pbx_builtin dialplan applications to pbx_builtins.c

	  We joked about splitting pbx.c into multiple files but this first step was
	  fairly easy.  All of the pbx_builtin dialplan applications have been moved
	  into pbx_builtins.c and a new pbx_private.h file was added. load_pbx_builtins()
	  is called by asterisk.c just after load_pbx().

	  A few functions were renamed and are cross-exposed between the 2 source files.

	  Change-Id: I87066be3dbf7f5822942ac1449d98cc43fc7561a

2015-12-24 20:26 +0000 [e4a566918a]  Matt Jordan <mjordan@digium.com>

	* tests/test_stasis_endpoints: Remove expected duplicate events

	  The cache_clear test was written to expect duplicate Stasis messages
	  sent from the technology endpoint to the all caching topic. This patch
	  fixes the test to no longer expect these duplicate messages.

	  ASTERISK-25137

	  Change-Id: I58075d70d6cdf42e792e0fb63ba624720bfce981

2015-12-28 14:02 +0000 [a280400758]  Joshua Colp <jcolp@digium.com>

	* test_time: Provide a timeout when waiting.

	  The test_timezone_watch unit test is written to expect a
	  condition to be signaled when the inotify daemon thread runs.
	  There exists a small window where the test_timezone_watch
	  thread can signal the inotify daemon thread while it is not
	  reading on the underlying file descriptor. If this occurs
	  the test_timezone_watch thread will wait indefinitely for a
	  signal that will never arrive.

	  This change adds a timeout to the condition so it will return
	  regardless after a period of time.

	  Change-Id: Ifed981879df6de3d93acd3ee0a70f92546517390

2015-05-27 13:22 +0000 [3a1c4885be]  gtjoseph <george.joseph@fairview5.com>

	* endpoint/stasis: Eliminate duplicate events on endpoint status change

	  When an endpoint is created, its messages are forwarded to both the tech
	  endpoint topic and the all endpoints topic. This is done so that various
	  parties interested in endpoint messages can subscribe to just the tech
	  endpoint and receive all messages associated with that particular technology,
	  as opposed to subscribing to the all endpoints topic. Unfortunately, when the
	  tech endpoint is created, it also forwards all of its messages to the all
	  topic. This results in duplicate messages whenever an endpoint publishes its
	  messages.

	  This patch resolves the duplicate message issue by creating a new function
	  for Stasis caching topics, stasis_cp_sink_create. In most respects, this acts
	  as a normal caching topic, save that it no longer forwards messages it receives
	  to the all endpoints topic. This allows it to act as an aggregation "sink",
	  while preserving the necessary caching behaviour.

	  ASTERISK-25137 #close
	  Reported-by: Vitezslav Novy

	  ASTERISK-25116 #close
	  Reported-by: George Joseph <george.joseph@fairview5.com>
	  Tested-by: George Joseph <george.joseph@fairview5.com>

	  Change-Id: Ie47784adfb973ab0063e59fc18f390d7dd26d17b
2015-12-24 22:19 +0000 [136c537695]  Dade Brandon <dade@xencall.com>

	* res_http_websocket.c: prevent avoidable disconnections caused by write errors

	  Updated ast_websocket_write to encode the entire frame in to one
	  write operation, to ensure that we don't end up with a situation
	  where the websocket header has been sent, while the body can not
	  be written.

	  Previous to August's patch in commit b9bd3c14, certain network
	  conditions could cause the header to be written, and then the
	  sub-sequent body to fail - which would cause the next successful
	  write to contain a new header, and a new body (resulting in
	  the peer receiving two headers - the second of which would be
	  read as part of the body for the first header).

	  This was patched to have both write operations individually fail
	  by closing the websocket.

	  In a case available to the submitter of this patch, the same
	  body which would consistently fail to write, would succeed
	  if written at the same time as the header.

	  This update merges the two operations in to one, adds debug messages
	  indicating the reason for a websocket connection being closed during
	  a write operation, and clarifies some variable names for code legibility.

	  Change-Id: I4db7a586af1c7a57184c31d3d55bf146f1a40598

2015-12-27 22:38 +0000 [f2efbb5d75]  Corey Farrell <git@cfware.com>

	* Remove res_jabber file that was left behind.

	  Change-Id: I9d88fac0394d5bbaff0900a2ee911c4e4478846b

2015-12-13 13:09 +0000 [dde7f3c1c4]  Matt Jordan <mjordan@digium.com>

	* res_pjsip_history: Add a module that provides PJSIP history for debugging

	  This patch adds a new module, res_pjsip_history, that provides a slightly
	  better way of debugging SIP message traffic on a busy Asterisk system. The
	  existing mechanisms all rely on passively dumping a SIP message to the CLI.
	  While this is perfectly fine for logging purposes and well controlled
	  environments, on many installations, the amount of SIP messages Asterisk
	  receives will quickly swamp the CLI. This makes it difficult to view/capture
	  those messages that you want to diagnose in real time.

	  This patch provides another way of handling this. When enabled, the module
	  will store SIP message traffic in memory. This traffic can then be queried
	  at leisure.

	  In order to make the querying useful, a CLI command has been implemented,
	  'pjsip show history', that supports a basic expression syntax similar to
	  SQL or other query languages. A small number of useful fields have been
	  added in this initial patch; additional fields can easily be added in
	  later improvements. Those fields are:
	   - number: The entry index in the history
	   - timestamp: The time the message was recieved
	   - addr: The source/destination address of the message
	   - sip.msg.request.method: The request method
	   - sip.msg.call-id: The Call-ID header

	  Note - this is a resurrection of the module initially proposed on Review Board
	  here: https://reviewboard.asterisk.org/r/4053/

	  Change-Id: I39bd74ce998e99ad5ebc0aab3e84df3a150f8e36

2015-12-25 09:56 +0000 [be050f2638]  Dade Brandon <dade@xencall.com>

	* chan_sip.c: fix websocket_write_timeout default value

	  websocket_write_timeout was not being set to its default value
	  during sip config reload, which meant that prior to this commit,
	  1) the default value of 100 was not used, unless an invalid value
	  (or 1) was specified in sip.conf for websocket_write_timeout, and
	  2) if the websocket_write_timeout directive was removed from sip.conf
	  without a full restart of asterisk, then the previous value would
	  continue to be used indefinitely.

	  This essentially lead to a 0ms write timeout (the first write attempt
	  in ast_careful_fwrite must have succeeded) in websocket write requests
	  from chan_sip, unless websocket_write_timeout was explicitely set in sip.conf.

	  Changes to websocket_write_timeout still only apply to new websocket
	  sessions, after the sip reload -- timeouts on existing sessions are
	  not adjusted during sip reload.

	  Change-Id: Ibed3816ed29cc354af6564c5ab3e75eab72cb953

2015-12-23 17:40 +0000 [b3024cad10]  Richard Mudgett <rmudgett@digium.com>

	* bridge_basic.c: Fix GOTO_ON_BLINDXFR

	  Use of GOTO_ON_BLINDXFR would not work at all.  The target location would
	  never be executed by the transferring channel.

	  * Made feature_blind_transfer() call ast_bridge_set_after_go_on() with
	  valid context, exten, and priority parameters from the transferring
	  channel.

	  * Renamed some feature_blind_transfer() local variables for clarity.

	  ASTERISK-25641 #close
	  Reported by Dmitry Melekhov

	  Change-Id: I19bead9ffdc4aee8d58c654ca05a198da1e4b7ac

2015-12-24 12:19 +0000 [0a9941de9d]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_location: Delete contact_status object when contact is deleted

	  In 450579e908, a change was made that removed the deletion of the
	  'contact_status' object when a 'contact' object is deleted in sorcery.
	  This unfortunately means that the 'contact_status' object persists, even when
	  something has explicitly removed a contact. The result is that the state of
	  the contact will not be regenerated if that contact is re-created, and the
	  stale state will be reported/used for that contact. It also results in
	  no ContactStatusChanged events being generated for either ARI or AMI.

	  This patch restores the deletion logic that was removed. Doing so now
	  results in the expected events being generated again.

	  Change-Id: I28789a112e845072308b5b34522690e3faf58f07

2015-12-24 10:18 +0000 [1e24a0ca8a]  Kevin Harwell <kharwell@digium.com>

	* res_rtp_asterisk: rtp->ice check not wrapped in HAVE_PJPROJECT ifdef

	  Change-Id: I19b49112e1b630bd04e859f14ccf96f8ebd6b151

2015-12-20 21:33 +0000 [1d3d20dd68]  Dade Brandon <dade@xencall.com>

	* app_amd: Correct documentation to reflect functionality

	  Update documentation to reflect that maximum_number_of_words
	  has functionality inconsistent with the variable name (and inconsistent
	  with prior documentation.)

	  Update documentation for silence_threshold, which previously implied
	  that it was measuring time, rather than noise averages in the sample.

	  Update the comments in amd.conf.sample.

	  ASTERISK-25639 #close
	  Change-Id: I4b1451e5dc9cb3cb06d59b6ab872f5275ba79093

2015-12-17 19:05 +0000 [965a0eee46]  Dade Brandon <dade@xencall.com>

	* res_rtp_asterisk: Resolve further timing issues with DTLS negotiation

	  Resolves an edge case dtls negotiation delay for certain networks which
	  somehow manage to drop the rtcp side's packet when these are both sent
	  ast_rtp_remote_address_set, causing it to have to time-out and restart
	  the handshake.

	  Move dtls pending bio flush in to it's own function, and call it from
	  ast_rtp_on_ice_complete, when we're rtp->ice, rather than when
	  ast_rtp_remote_address_set.

	  Keep the existing flush from the recent change to res_rtp_remote_address_set
	  if ice is not being used.

	  ASTERISK-25614 #close
	  Reported-by: XenCALL
	  Tested by: XenCALL

	  Change-Id: Ie2caedbdee1783159f375589b6fd3845c8577ba5

2015-12-18 09:54 +0000 [ae428d8460]  Carlos Oliva <carlos.oliva@invoxcontact.com>

	* app_queue: update RT members when the 1st call joins a queue with no agents

	  If a call enters on a queue and the members on that queue are updated in
	  realtime (ex: using mysql inserting a new agent) the queue members are
	  never refreshed and the call will stay in the queue until other event occurs.
	  This happens only if this is the first call of the queue and there is no
	  agents servicing.
	  This patch prevent this issue, ensuring realtime members are updated if
	  there is one call in the queue and no available agents

	  ASTERISK-25442 #close

	  Change-Id: If1e036d013a5c1d8b0bf60d71d48fe98694a8682

2015-12-05 10:01 +0000 [59d5bb0613]  Joshua Colp <jcolp@digium.com>

	* res_sorcery_memory_cache: Add support for a full backend cache.

	  This change introduces the configuration option 'full_backend_cache'
	  which changes the cache to be a full mirror of the backend instead
	  of a per-object cache. This allows all sorcery retrieval operations
	  to be carried out against it and is useful for object types which
	  are used in a "retrieve all" or "retrieve some" pattern.

	  ASTERISK-25625 #close

	  Change-Id: Ie2993487e9c19de563413ad5561c7403b48caab5

2015-12-17 10:25 +0000 [0cefcabd58]  Joshua Colp <jcolp@digium.com>

	* rtp_engine: Ignore empty filenames in DTLS configuration.

	  When applying an empty DTLS configuration the filenames in the
	  configuration will be empty. This is actually valid to do and
	  each filename should simply be ignored.

	  Change-Id: Ib761dc235638a3fb701df337952f831fc3e69539

2015-12-17 08:10 +0000 [158a0a5422]  Joshua Colp <jcolp@digium.com>

	* chan_sip: Enable WebSocket support by default.

	  Per the documentation the WebSocket support in chan_sip is
	  supposed to be enabled by default but is not. This change
	  corrects that.

	  Change-Id: Icb02bbcad47b11a795c14ce20a9bf29649a54423

2015-12-14 12:04 +0000 [a9d6fc571d]  Joshua Colp <jcolp@digium.com>

	* json: Audit ast_json_* usage for thread safety.

	  The JSON library Asterisk uses, jansson, is not thread
	  safe for us in a few ways. To help with this wrappers for JSON
	  object reference count increasing and decreasing were added
	  which use a global lock to ensure they don't clobber over
	  each other. This does not extend to reference count manipulation
	  within the jansson library itself. This means you can't safely
	  use the object borrowing specifier (O) in ast_json_pack and
	  you can't share JSON instances between objects.

	  This change removes uses of the O specifier and replaces them
	  with the o specifier and an explicit ast_json_ref. Some cases
	  of instance sharing have also been removed.

	  ASTERISK-25601 #close

	  Change-Id: I06550d8b0cc1bfeb56cab580a4e608ae4f1ec7d1

2015-12-16 11:28 +0000 [53bd5a539a]  Mark Michelson <mmichelson@digium.com>

	* Alembic: Increase column size of PJSIP AOR "contact".

	  When running the PJSIP AMI "show_endpoint" test with automatic
	  conversion to realtime, the test would fail. This was because the AOR
	  "contact" column was sized at 40, and the configured contact was larger
	  than that.

	  This commit increases the size of the contact column to 255 characters.

	  Change-Id: Ia65bc7fd37699b7c0eaef9629a1a31eab9a24ba1

2015-12-16 11:25 +0000 [da17dc4d75]  Mark Michelson <mmichelson@digium.com>

	* Alembic: Add PJSIP global keep_alive_interval.

	  The keep_alive_interval option was added about a year ago, but no
	  alembic revision was created to add the appropriate column to the
	  database.

	  This commit fixes the problem and adds the column. This was discovered
	  by running the testsuite with automatic conversion to realtime enabled.

	  Change-Id: If3ef92a7c4f4844d08f8aae170d2178aec5c4c1a

2015-12-08 13:04 +0000 [fe8011cc50]  sungtae kim <pchero21@gmail.com>

	* AMI: Fixed OriginateResponse message

	  When the asterisk sending OriginateResponse message,
	  it doesn't set the "Uniqueid".
	  And it didn't support correct response message for
	  Application originate.

	  ASTERISK-25624 #close

	  Change-Id: I26f54f677ccfb0b7cfd4967a844a1657fd69b74d

2015-12-15 18:01 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.7.0-rc1 Released.

2015-12-15 11:57 +0000 [0370acecfc]  Kevin Harwell <kharwell@lunkwill>

	* Release summaries: Add summaries for 13.7.0-rc1

2015-12-15 11:54 +0000 [d1bb33fe0b]  Kevin Harwell <kharwell@lunkwill>

	* .version: Update for 13.7.0-rc1

2015-12-15 11:54 +0000 [d06a65de01]  Kevin Harwell <kharwell@lunkwill>

	* .lastclean: Update for 13.7.0-rc1

2015-12-15 11:54 +0000 [fb37b44660]  Kevin Harwell <kharwell@lunkwill>

	* realtime: Add database scripts for 13.7.0-rc1

2015-12-15 11:48 +0000 [20b7164b8c]  Kevin Harwell <kharwell@lunkwill>

	* .version: Update for 13.7.0-rc1

2015-12-15 11:48 +0000 [6cbf2414c3]  Kevin Harwell <kharwell@lunkwill>

	* .lastclean: Update for 13.7.0-rc1

2015-12-15 11:48 +0000 [ba1794464d]  Kevin Harwell <kharwell@lunkwill>

	* realtime: Add database scripts for 13.7.0-rc1

2015-12-15 11:39 +0000 [b3e9753a23]  Kevin Harwell <kharwell@lunkwill>

	* .version: Update for 13.7.0-rc1

2015-12-15 11:39 +0000 [b0df64b5f0]  Kevin Harwell <kharwell@lunkwill>

	* .lastclean: Update for 13.7.0-rc1

2015-12-15 11:39 +0000 [ce9a59faf6]  Kevin Harwell <kharwell@lunkwill>

	* realtime: Add database scripts for 13.7.0-rc1

2015-12-15 11:28 +0000 [2e26bef5bb]  Kevin Harwell <kharwell@lunkwill>

	* .version: Update for 13.7.0-rc1

2015-12-15 11:28 +0000 [5e9b47516d]  Kevin Harwell <kharwell@lunkwill>

	* .lastclean: Update for 13.7.0-rc1

2015-12-15 11:28 +0000 [034112c574]  Kevin Harwell <kharwell@lunkwill>

	* realtime: Add database scripts for 13.7.0-rc1

2015-12-15 11:19 +0000 [d1f8ff1789]  Kevin Harwell <kharwell@lunkwill>

	* .version: Update for 13.7.0-rc1

2015-12-15 11:19 +0000 [9376488bef]  Kevin Harwell <kharwell@lunkwill>

	* .lastclean: Update for 13.7.0-rc1

2015-12-15 11:19 +0000 [a894c9e7a9]  Kevin Harwell <kharwell@lunkwill>

	* realtime: Add database scripts for 13.7.0-rc1

2015-12-15 11:12 +0000 [52afb0f112]  Kevin Harwell <kharwell@lunkwill>

	* .version: Update for 13.7.0-rc1

2015-12-15 11:12 +0000 [2de343eb85]  Kevin Harwell <kharwell@lunkwill>

	* .lastclean: Update for 13.7.0-rc1

2015-12-15 11:12 +0000 [184de2a160]  Kevin Harwell <kharwell@lunkwill>

	* realtime: Add database scripts for 13.7.0-rc1

2015-12-14 13:53 +0000 [24ae124e4f]  server-pandora <server-pandora@xencall.com>

	* res_rtp_asterisk.c: Fix DTLS negotiation delays.

	  - Trigger pending DTLS packets to send out, once the RTP instance's remote
	    address is set.
	  - Avoids locking the DTLS structure unnecessarily by only doing this if
	    DTLS is passive.
	  - Add DTLS locks around the structurally sensitive calls in the SSL
	    portion of __rtp_recvfrom, since dtls_srtp_check_pending does not lock
	    inside of itself, and we're dealing with the SSL BIO in at least two
	    threads.

	  WebRTC channels may receive a DTLS handshake before
	  ast_rtp_remote_address_set is called, which causes there to be a pending
	  response to send out.   Previous to 1ad827, this was handled by calling
	  dtls_srtp_check_pending on receipt of any RTP packet - a STUN or RTP
	  packet could trigger the pending handshake response.  Since that was
	  rightfully removed, whenever the DTLS handshake is received before the
	  remote address is set, we would have to wait until another SSL packet
	  arrives.

	  As of Chrome M47's optimizations to their handshake process, WebRTC
	  conversations between Chrome M47+ and Asterisk, where Asterisk is passive,
	  experience a 1 second delay without this patch, because the SSL handshake
	  is received before ICE negotation stores the remote_address, and the next
	  SSL packet isn't received until after a 1 second timeout in Chrome, which
	  causes a new handshake request.

	  ASTERISK-25614 #close

	  Change-Id: I547f1be7e302dbf71f6553dd8cbc0657b1d0b908

2015-12-14 15:25 +0000 [36097a185d]  Richard Mudgett <rmudgett@digium.com>

	* Fix sscanf() format string type mismatch.

	  ASTERISK-25615
	  Reported by: George Joseph

	  Change-Id: Ieff35307254ca193f3d473cff2e396ca57c7ce0b

2015-12-13 13:13 +0000 [94f9927784]  Matt Jordan <mjordan@digium.com>

	* main/utils: Don't emit an ERROR message if the read end of a pipe closes

	  An ERROR or WARNING message should generally indicate that something has gone
	  wrong in Asterisk. In the case of writing to a file descriptor, Asterisk is not
	  in control of when the far end closes its reading on a file descriptor. If the
	  far end does close the file descriptor in an unclean fashion, this isn't a bug
	  or error in Asterisk, particularly when the situation can be gracefully
	  handled in Asterisk.

	  Currently, when this happens, a user would see the following somewhat cryptic
	  ERROR message:

	    "utils.c: write() returned error: Broken pipe"

	  There's a few problems with this:
	  (1) It doesn't provide any context, other than 'something broke a pipe'
	  (2) As noted, it isn't actually an error in Asterisk
	  (3) It can get rather spammy if the thing breaking the pipe occurs often, such
	      as a FastAGI server
	  (4) Spammy ERROR messages make Asterisk appear to be having issues, or can even
	      mask legitimate issues

	  This patch changes ast_carefulwrite to only log an ERROR if we actually had one
	  that was reasonably under our control. For debugging purposes, we still emit
	  a debug message if we detect that the far side has stopped reading.

	  Change-Id: Ia503bb1efcec685fa6f3017bedf98061f8e1b566

2015-12-12 11:08 +0000 [5b867fa904]  gtjoseph <george.joseph@fairview5.com>

	* pjsip/config_transport: Check pjproject version at runtime for async ops

	  pjproject < 2.5.0 will segfault on a tls transport if async_operations
	  is greater than 1.  A runtime version check has been added to throw
	  an error if the version is < 2.5.0 and async_operations > 1.

	  To assist in the check, a new api "ast_compare_versions" was added
	  to utils which compares 2 major.minor.patch.extra version strings.

	  ASTERISK-25615 #close

	  Change-Id: I8e88bb49cbcfbca88d9de705496d6f6a8c938a98
	  Reported-by: George Joseph
	  Tested-by: George Joseph

2015-12-10 11:44 +0000 [14b41115e3]  Jonathan Rose <jrose@digium.com>

	* chan_sip: Add TCP/TLS keepalive to TCP/TLS server

	  Adds the TCP Keep Alive option to TCP and TLS server sockets. Previously
	  this option was only being set on session sockets.
	  http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/
	  According to the link above, the SO_KEEPALIVE option is useful for knowing
	  when a TCP connected endpoint has severed communication without indicating
	  it or has become unreachable for some reason. Without this patch, keep
	  alive is not set on the socket listening for incoming TCP sessions and
	  in Komatsu's report this resulted in the thread listening for TCP becoming
	  stuck in a waiting state.

	  ASTERISK-25364 #close
	  Reported by: Hiroaki Komatsu

	  Change-Id: I7ed7bcfa982b367dc64b4b73fbd962da49b9af36
2015-12-09 09:48 +0000 [cd119ed4a2]  Tyler Cambron <tcambron@digium.com>

	* res_chan_stats: Fix bug to send correct statistics to StatsD

	  Fixed a bug that originally would show a negative number of
	  active calls occuring in Asterisk. A gauge is persistent so
	  incrementing and decrementing it results in a more consistent
	  performance. Also changed to the call to StatsD to use
	  ast_statsd_log_string() so that a "+" could be sent to StatsD.

	  ASTERISK-25619 #close

	  Change-Id: Iaaeff5c4c6a46535366b4d16ea0ed0ee75ab2ee7

2015-12-07 13:07 +0000 [ddf4dddf4f]  Corey Farrell <git@cfware.com>

	* app_meetme: Set default value for audio_buffers.

	  The default value was never set for audio_buffers, causing bad
	  audio quality.  This ensures the default is always set.

	  ASTERISK-25569 #close

	  Change-Id: I2d2ee3e644120b0f9f6ea6ab9286d7d590942a44
2015-12-08 01:57 +0000 [142d4fefb8]  Filip Jenicek <phill@janevim.cz>

	* chan_sip: Check sip_pvt pointer in ast_channel_get_t38_state(c)

	  Asterisk may crash when calling ast_channel_get_t38_state(c)
	  on a locked channel which is being hung up.

	  ASTERISK-25609 #close

	  Change-Id: Ifaa707c04b865a290ffab719bd2e5c48ff667c7b

2015-12-08 17:49 +0000 [21962dad93]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Add existence and readablity checks for tls related files

	  Both transport and endpoint now check for the existence and readability
	  of tls certificate and key files before passing them on to pjproject.
	  This will cause the object to not load rather than waiting for pjproject
	  to discover that there's a problem when a session is attempted.

	  NOTE: chan_sip also uses ast_rtp_dtls_cfg_parse but it's located
	  in build_peer which is gigantic and I didn't want to disturb it.
	  Error messages will emit but it won't interrupt chan_sip loading.

	  ASTERISK-25618 #close

	  Change-Id: Ie43f2c1d653ac1fda6a6f6faecb7c2ebadaf47c9
	  Reported-by: George Joseph
	  Tested-by: George Joseph

2015-12-02 12:42 +0000 [28d9243079]  Eugene Voityuk <eugene@thirdlane.com>

	* chan_sip.c: Start ICE negotiation when response is sent or received.

	  The current logic for ICE negotiation starts it
	  when receiving an SDP with ICE candidates. This is
	  incorrect as ICE negotiation can only start when each 
	  call party have at least one pair of local and remote 
	  candidate. Starting ICE negotiation early would result 
	  in negotiation failure and ultimately no audio.

	  This change makes it so ICE negotiation is only started
	  when a response with SDP is received or when a response
	  with SDP is sent.

	  ASTERISK-24146

	  Change-Id: I55a632bde9e9827871b09141d82747e08379a8ca
2015-12-08 11:03 +0000 [e03582a1c2]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip/config_transport: Prevent async_operations > 1 when protocol = tls

	  See ASTERISK-25615.
	  If the transport protocol is tls and async_operations > 1, pjproject
	  will segfault if more than one operation is attempted on the same socket.
	  Until this is fixed upstream, a check has been added to throw an error
	  if a tls transport config has async_operations set to > 1.

	  ASTERISK-25615

	  Change-Id: I76b9a5b2a5a0054fe71ca5851e635f2dca7685a6
	  Reported-by: George Joseph
	  Tested-by: George Joseph

2015-12-08 08:39 +0000 [876600ce6e]  Alexander Traud <pabstraud@compuserve.com>

	* codec_resample: Increase buffer for Opus Codec with FEC.

	  ASTERISK-25599 #close

	  Change-Id: Idbd187f711b2ec63dda949ca0f79aa0c1a0a0b6e

2015-12-08 03:46 +0000 [69e3d40ad7]  Alexander Traud <pabstraud@compuserve.com>

	* translate: Avoid a warning message when doing FEC within Opus Codec.

	  ASTERISK-25616 #close

	  Change-Id: Ibe729aaf2e6e25506cff247cec5149ec1e589319

2015-12-04 15:36 +0000 [2b992014dc]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip: Fix crash involving the bogus peer during sip reload.

	  A crash happens sometimes when performing a CLI "sip reload".  The bogus
	  peer gets refreshed while it is in use by a new call which can cause the
	  crash.

	  * Protected the global bogus peer object with an ao2 global object
	  container.

	  ASTERISK-25610 #close

	  Change-Id: I5b528c742195681abcf713c6e1011ea65354eeed

2015-12-06 16:32 +0000 [529535f0c2]  Matt Jordan <mjordan@digium.com>

	* Revert "bridges/bridge_t38: Add a bridging module for managing T.38 state"

	  This reverts commit 6614babea27fbafbe11820ea03737dd5c4f9ecec.

	  Unfortunately, using a bridge to manage T.38 state will cause severe deadlocks
	  in core_unreal/chan_local. Local channels attempt to reach across both their
	  peer and the peer's bridge to inspect T.38 state. Given the propensity of
	  Local channel chains, managing the locking situation in such a scenario is
	  practically infeasible.

	  Change-Id: Ic687397ffea08dfb899345a443bd990ec3d0416a

2015-12-04 16:23 +0000 [450579e908]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip/contacts/statsd:  Make contact lifecycle events more consistent

	  It will never be perfect or even pretty, mostly because of the differences
	  between static and dynamic contacts.

	  Created:

	  Can't use the contact or contact_status alloc functions
	  because the objects come and go regardless of the actual state.

	  Can't use the contact_apply_handler, ast_sip_location_add_contact or
	  a sorcery created handler because they only get called for dynamic
	  contacts.  Similarly, permanent_uri_handler only gets called for
	  static contacts.

	  So, Matt had it right. :)  ast_res_pjsip_find_or_create_contact_status is
	  the only place it can go and not have duplicated code.  Both
	  permanent_uri_handler and contact_apply_handler call find_or_create.

	  Removed:

	  Can't use the destructors for the same reason as above.  The only
	  place to put this is in persistent_endpoint_contact_deleted_observer
	  which I believe is the "correct" place but even that will handle only
	  dynamic contacts.  This doesn't called on shutdown however.  There is
	  no hook to use for static contacts that may be removed because of a
	  config change while asterisk is in operation.

	  I moved the cleanup of contact_status from ast_sip_location_delete_contact
	  to the handler as well.

	  Status Change and RTT:

	  Although they worked fine where they were (in update_contact_status) I
	  moved them to persistent_endpoint_contact_status_observer to make it
	  more consistent with removed.  There was logic there already to detect
	  a state change.

	  Finally, fixed a nit in permanent_uri_handler rmudgett reported
	  eralier.

	  ASTERISK-25608 #close

	  Change-Id: I4b56e7dfc3be3baaaf6f1eac5b2068a0b79e357d
	  Reported-by: George Joseph
	  Tested-by: George Joseph

2015-11-21 06:02 +0000 [5a18193dc0]  Alexander Traud <pabstraud@compuserve.com>

	* res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8.

	  ASTERISK-25584 #close

	  Change-Id: Iae00071b4ff1ae76f24995aeac4d00284fd14f91

2015-11-21 05:21 +0000 [3e2178c05e]  Alexander Traud <pabstraud@compuserve.com>

	* res_format_attr_opus: Update to latest RFC 7587.

	  Beside that, the format-attribute module sends only non-default values in the
	  line fmtp, now. This avoids unnecessary overhead in SDP messages. Furthermore,
	  previously the parameter stereo was not parsed when being the first parameter.

	  ASTERISK-25583 #close

	  Change-Id: Iae85ba3e5960bfd5d51cf65bcffad00dd4875a73
2015-12-02 14:11 +0000 [072d94183c]  Jonathan Rose <jrose@digium.com>

	* Fix crash in audiohook translate to slin

	  This patch fixes a crash which would occur when an audiohook was
	  applied to a channel using an audio codec that could not be translated
	  to signed linear (such as when using pass-through codecs like OPUS or
	  when the codec translator module for the format in use is not loaded).

	  ASTERISK-25498 #close
	  Reported by: Ben Langfeld

	  Change-Id: Ib6ea7373fcc22e537cad373996136636201f4384

2015-12-03 12:07 +0000 [9184fbeb34]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip: Use a MD5 hash for static Contact IDs

	  When 90d9a70789 was merged, it mostly tested dynamic contacts created as
	  a result of registering a PJSIP endpoint. Contacts generated in this
	  fashion typically have a long alphanumeric string as their object identifier,
	  which maps reasonably well for StatsD. Unfortunately, this doesn't work in the
	  general case. StatsD treats both '.' and ':' characters as special characters.
	  In particular, having a ':' appear in the middle of a StatsD metric will
	  result in the metric being rejected.

	  This causes some obvious issues with SIP URIs.

	  The StatsD API should not be responsible for escaping the metric name passed
	  to it. The metric is treated as a single long string, and it would be
	  challenging to know what to escape in the string passed to the function.
	  Likewise, we don't want to escape the metric in PJSIP, as that involves
	  overhead that is wasted when either res_statsd isn't loaded or enabled.

	  This patch takes an alternative approach. The Contact ID has been changed
	  to be "aor@@uri_hash" instead of "aor@@uri". This (a) won't contain any of the
	  aforementioned special characters, (b) can be done on Contact creation,
	  which has minimal impact on run-time performance, and (c) also conforms to an
	  earlier commit that changed the ID for dynamic contacts.

	  The downside of this is that StatsD users will have to map SHA1 hashes back to
	  the Contacts that are emitting the statistics. To that end, the CLI commands
	  have been updated to include the first 10 characters of the MD5 hash, which
	  should be enough to match what is shown in Graphite (or some other StatsD
	  backend).

	  ASTERISK-25595 #close

	  Change-Id: Ic674a3307280365b4a45864a3571c295b48a01e2
	  Reported-by: Matt Jordan
	  Tested-by: George Joseph

2015-11-30 22:19 +0000 [ed9134282e]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Update logging to show contact->uri in messages

	  An earlier commit changed the id of dynamic contacts to contain
	  a hash instead of the uri.  This patch updates status change
	  logging to show the aor/uri instead of the id.  This required
	  adding the aor id to contact and contact_status and adding
	  uri to contact_status.  The aor id gets added to contact and
	  contact_status in their allocators and the uri gets added to
	  contact_status in pjsip_options when the contact_status is
	  created or updated.

	  ASTERISK-25598 #close

	  Reported-by: George Joseph
	  Tested-by: George Joseph

	  Change-Id: I56cbec1d2ddbe8461367dd8b6da8a6f47f6fe511

2015-12-01 16:11 +0000 [eadad24b59]  Jonathan Rose <jrose@digium.com>

	* Unset BRIDGEPEER when leaving a bridge

	  Currently if a channel is transferred out of a bridge, the BRIDGEPEER
	  variable (also BRIDGEPVTCALLID) remain set even once the channel is
	  out of the bridge. This patch removes these variables when leaving
	  the bridge.

	  ASTERISK-25600 #close
	  Reported by: Mark Michelson

	  Change-Id: I753ead2fffbfc65427ed4e9244c7066610e546da

2015-11-30 14:22 +0000 [bb0b60619d]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_memory_cache.c: Fix off nominal ref leak.

	  Change-Id: If83d63cf11cbc6df9b15251848b01feb570ade49

2015-11-30 16:42 +0000 [e7c88e11aa]  Richard Mudgett <rmudgett@digium.com>

	* sched.c: Make not return a sched id of 0.

	  According to the API doxygen a sched ID of 0 is valid.  Unfortunately, 0
	  was never returned historically and several users incorrectly coded usage
	  of the returned sched ID assuming that 0 was invalid.

	  ASTERISK-25476

	  Change-Id: Ib19c7ebb44ec9fd393ef6646dea806d4f34e3a20

2015-11-25 12:23 +0000 [4aed349a7b]  Richard Mudgett <rmudgett@digium.com>

	* Audit improper usage of scheduler exposed by 5c713fdf18f. (v13 additions)

	  chan_sip.c:
	  * Initialize mwi subscription scheduler ids earlier because of ASTOBJ to
	  ao2 conversion.

	  * Initialize register scheduler ids earlier because of ASTOBJ to ao2
	  conversion.

	  chan_skinny.c:
	  * Fix more scheduler usage for the valid 0 id value.

	  ASTERISK-25476

	  Change-Id: If9f0e5d99638b2f9d102d1ebc9c5a14b2d706e95

2015-11-24 12:44 +0000 [6d9156d10f]  Richard Mudgett <rmudgett@digium.com>

	* Audit improper usage of scheduler exposed by 5c713fdf18f.

	  channels/chan_iax2.c:
	  * Initialize struct chan_iax2_pvt scheduler ids earlier because of
	  iax2_destroy_helper().

	  channels/chan_sip.c:
	  channels/sip/config_parser.c:
	  * Fix initialization of scheduler id struct members.  Some off nominal
	  paths had 0 as a scheduler id to be destroyed when it was never started.

	  chan_skinny.c:
	  * Fix some scheduler id comparisons that excluded the valid 0 id.

	  channel.c:
	  * Fix channel initialization of the video stream scheduler id.

	  pbx_dundi.c:
	  * Fix channel initialization of the packet retransmission scheduler id.

	  ASTERISK-25476

	  Change-Id: I07a3449f728f671d326a22fcbd071f150ba2e8c8

2015-12-01 07:55 +0000 [b76c196e13]  Alexander Traud <pabstraud@compuserve.com>

	* codec_resample: Increase buffer for Opus Codec.

	  ASTERISK-25599 #close

	  Change-Id: I1f88a88c59fb4e1e62bbdbb100c7152d48e73f10

2015-11-28 08:46 +0000 [6614babea2]  Matt Jordan <mjordan@digium.com>

	* bridges/bridge_t38: Add a bridging module for managing T.38 state

	  When 4875e5ac32 was merged, it fixed several issues with a direct media bridge
	  transitioning to handling a T.38 fax. However, it uncovered a race condition
	  caused by the bridging core. When a channel involved in a T.38 fax leaves a
	  bridge, the frame queued by the channel driver that should inform the far side
	  that it is no longer in a T.38 fax may not make it across the bridge. The
	  bridging framework is *extremely* aggressive in tearing down the bridge, and
	  control frames that are currently in flight *may* get dropped.

	  This patch adds a new module to the bridging framework, bridge_t38. This module
	  maintains some notion of the T.38 state for the two channels in a bridge. When
	  the bridge detects that it is being torn down or when one of the two channels
	  leaves, it informs the respective channel(s) that they should stop faxing. This
	  ensures that channels switch back to audio if they survive and are ejected out
	  of a bridge while faxing.

	  ASTERISK-25582

	  Change-Id: If5b0bb478eb01c4607c9f4a7fc17c7957d260ea0

2015-11-27 07:39 +0000 [3fcf160fae]  Niklas Larsson <niklas@tese.se>

	* CHANGES: Fix a typo

	  Change-Id: Iceb3d9bb78140c376174a7bee197dfcf8ef9cda7
2015-11-25 15:26 +0000 [45efbf8503]  Kevin Harwell <kharwell@digium.com>

	* fastagi: record file closed after sending result

	  The fastagi record-file testsuite test sometimes fails reporting an empty
	  recorded file. This was happening because Asterisk was sending the agi result
	  notification prior to actually closing the file and the data, being buffered,
	  had not been written to the file yet when the test attempts to check the file
	  size.

	  This patch makes it so the record file stream is closed prior to sending the
	  agi result notification.

	  ASTERISK-25593 #close

	  Change-Id: I6b2b3be3ae37f7c7b18e672c419a89b3b8513cde

2015-11-25 13:29 +0000 [b2787876d6]  Walter Doekes <walter+asterisk@wjd.nu>

	* main: Slight refactor of main. Improve color situation.

	  Several issues are addressed here:
	  - main() is large, and half of it is only used if we're not rasterisk;
	    fixed by spliting up the daemon part into a separate function.
	  - Call ast_term_init from rasterisk as well.
	  - Remove duplicate code reading/writing asterisk history file.
	  - Attempt to tackle background color issues and color changes that
	    occur. Tested by starting asterisk -c until the colors stopped
	    changing at odd locations.

	  ASTERISK-25585 #close

	  Change-Id: Ib641a0964c59ef9fe6f59efa8ccb481a9580c52f

2015-11-24 13:54 +0000 [59881fbb99]  David M. Lee <dlee@respoke.io>

	* Fixed some typos

	  Fixes some minor typos in the CHANGES file, plus an embarrasing typo in
	  the StatsD API.

	  Change-Id: I9ca4858c64a4a07d2643b81baa64baebb27a4eb7

2015-11-24 13:07 +0000 [b75f587d15]  Corey Farrell <git@cfware.com>

	* res_pjsip_notify: Fix CLI usage info

	  The usage info for 'pjsip send notify' previously referenced the
	  chan_sip configuration sip_notify.conf.  Fix this to reference
	  the correct configuration pjsip_notify.conf.

	  ASTERISK-25590 #close

	  Change-Id: I3898271a8e8a8b1db201741e790ebe2c6bf5cdea

2015-11-23 14:27 +0000 [fc45f4040d]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_realtime.c: Fix crash from NULL sorcery object type.

	  If the sorcery object type is not found a NULL is returned.
	  Unfortunately, sorcery_realtime_filter_objectset() will crash after
	  complaining about not finding the object type and saying to expect errors.

	  * Use ao2_cleanup() instead of ao2_ref() to prevent the crash.

	  ASTERISK-25165
	  Reported by Corey Farrell

	  Change-Id: Ic3b64453ea3058cb68d5c26d97d4fe7b8eea2e97

2015-11-20 21:08 +0000 [4875e5ac32]  Matt Jordan <mjordan@digium.com>

	* chan_pjsip: Handle T.38 faxes with direct media bridges

	  When a channel is in a direct media bridge, a re-INVITE may arrive that forces
	  Asterisk to re-negotiate the media to a T.38 fax. When this occurs, the bridge
	  must change its technology to a simple bridge, and re-INVITE the media back
	  to Asterisk.

	  Generally, this logic mostly already exists in Asterisk. However, prior to this
	  patch, there were a few bugs:
	  (1) The T.38 framehook currently prevents a channel capable of T.38 faxes from
	      ever entering into a direct media bridge. This applies even when the only
	      media being passed over the channel is audio. This patch fixes this bug
	      by having the framehook specify that it defers caring about any frame type.
	      This allows the channels to enter into a direct media bridge, which will
	      be broken when a re-INVITE is received.
	  (2) When a re-INVITE is received, nothing instructed the bridging layer to
	      re-inspect the allowed bridging technology. This now occurs when either
	      a re-INVITE is received from a peer, or when a response is received from
	      the far end (that is, when the T.38 state changes to either
	      T38_PEER_REINVITE or T38_LOCAL_REINVITE).
	  (3) chan_pjsip needs to do a small amount of work to prevent a direct media
	      bridge from being chosen when a T.38 session is in progress. When a T.38
	      session supplement has a t38 datastore - which is added when we detect
	      we should start thinking about T.38 on a channel - we now refuse a native
	      RTP bridge.
	  (4) When a BYE request is received, we don't terminate the T.38 session. If
	      the other side of a T.38 fax survives the hangup (due to the 'g' flag
	      in Dial, for example), we don't currently re-INVITE the media on the
	      other channel back to audio. This patch now has res_pjsip_t38 intercept
	      BYE requests and inform the far side that the T.38 session is terminated.
	      This naturally causes the correct re-INVITEs to be sent.

	  ASTERISK-25582

	  Change-Id: Iabd6aa578e633d16e6b9f342091264e4324a79eb

2015-11-20 21:07 +0000 [2b94d9a10d]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_t38: Add debug statements

	  This patch adds some debug statements to res_pjsip_t38. These statements help
	  to determine which SDP negotiation callbacks are being executed, and, when
	  a particular callback exits, why a callback may not have applied its logic
	  to the local or remote SDP.

	  Change-Id: I61b3fb9183b7ebbb5da8e9f48b59a5d9d7042d77

2015-10-22 09:44 +0000 [af288b2d96]  Matt Jordan <mjordan@digium.com>

	* main/cli: Use proper string methods to check existence of context/exten/app

	  Because the context, extension, and application are stored in stringfields,
	  checking for them being NULL doesn't work so well. This patch uses the
	  appropriate string library call, ast_strlen_zero, to see if there is a value
	  in the context/exten/app values.

	  Change-Id: Ie09623bfdf35f5a8d3b23dd596647fe3c97b9a23

2015-11-18 09:43 +0000 [d27aac0a9d]  Matt Jordan <mjordan@digium.com>

	* res/res_endpoint_stats: Add module to emit endpoint StatsD statistics

	  This patch adds a module that emits StatsD statistics about Asterisk
	  endpoints. This includes:
	   * A GUAGE statistic for endpoint states, tracking how many endpoints are in
	     a particular state.
	   * A GUAGE statistic for each endpoint, counting the number of channels
	     currently associated with an endpoint.

	  ASTERISK-25572

	  Change-Id: If7e1333c5aeda8d136850b30c2101c0ee1c97305

2015-11-18 10:07 +0000 [90d9a70789]  Matt Jordan <mjordan@digium.com>

	* res_pjsip/pjsip_options: Add StatsD statistics for PJSIP contacts

	  This patch adds the ability to send StatsD statistics related to the
	  state of PJSIP contacts. This includes:
	   * A GUAGE statistic measuring the count of contacts in a particular state.
	     This measures how many contacts are reachable, unreachable, etc.
	   * The RTT time for each contact, if those contacts are qualified. This
	     provides StatsD engines useful time-based data about each contact.

	  ASTERISK-25571

	  Change-Id: Ib8378d73afedfc622be0643b87c542557e0b332c

2015-11-13 10:34 +0000 [75097a0955]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_outbound_registration: Add registration statistics for StatsD

	  This patch adds outbound registration statistics for StatsD. This includes
	  the following:
	   * A GUAGE metric for the overall count of outbound registrations.
	   * A GUAGE metric for each state an outbound registration can be in. As the
	     outbound registrations change state, the overall count of how many
	     outbound registrations are in the particular state is changed.

	  These statistics are particularly useful for systems with a large number of
	  SIP trunks, and where measuring the change in state of the trunks is useful
	  for monitoring.

	  ASTERISK-25571

	  Change-Id: Iba6ff248f5d1c1e01acbb63e9f0da1901692eb37

2015-11-19 09:40 +0000 [8f71263e72]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_outbound_registration: Apply configuration on object type load

	  When Asterisk is configured to use a dynamic sorcery backend (such as
	  res_sorcery_astdb) with 'registration' objects, it will fail to create the
	  internal state objects associated with the registration objects on module
	  load. This is due to nothing actually querying for the specific objects
	  and calling their sorcery apply handler during module load.

	  This patch fixes that by calling get_registrations in the sorcery observer's
	  object_type_loaded handler. Doing this causes the sorcery backends to be
	  asked for the current state of all registration objects, which causes the
	  apply handler to be called and the internal run-time state to be created.

	  ASTERISK-25575 #close

	  Change-Id: Ie9306e797098c6d4da7bcf4a5434a15891508b23

2015-11-11 11:51 +0000 [0b508789ab]  Alexander Traud <pabstraud@compuserve.com>

	* translate: Provide translation modules the result of SDP negotiation.

	  Previously, a trancoding module did not have access to the joint but cached
	  format. Therefore, the module did not have access to the attributes negotiated
	  via SDP (line fmtp). Now, a translation module receives the joint format.

	  ASTERISK-25545 #close

	  Change-Id: Id6878a989b50573298dab115d3371ea369e1a718

2015-11-19 01:14 +0000 [1aa552b2a2]  Alexander Traud <pabstraud@compuserve.com>

	* res_format_attr_h264: Do not reset string buffer.

	  When no parameter is present, Asterisk does not generate the line fmtp, as
	  expected. However, because a buffer was reset, even rtpmap and fmtp of previous
	  media codecs got removed. Now, Asterisk does not reset other codecs in case of
	  no parameter for H.264.

	  ASTERISK-25573 #close

	  Change-Id: I93811331f4a28c45418a9e14ee46c0debd47a286

2015-11-18 10:05 +0000 [3354b325c6]  Matt Jordan <mjordan@digium.com>

	* res_statsd: Add functions that support variable arguments

	  Often, the metric names of statistics we are generating for StatsD have some
	  dynamic component to them. This can be the name of a particular resource, or
	  some internal status label in Asterisk. With the current set of functions,
	  callers of the statsd API must first build the metric name themselves, then
	  pass this to the API functions. This results in a large amount of boilerplate
	  code and usage of either fixed length static buffers or dynamic memory
	  allocation, neither of which is desireable.

	  This patch adds two new functions to the StatsD API that support a printf
	  style format specifier for constructing the metric name. A dynamic string,
	  allocated in threadstorage, is used to build the metric name. This eases
	  the burden on users of the StatsD API.

	  Change-Id: If533c72d1afa26d807508ea48b4d8c7b32f414ea

2015-11-17 14:53 +0000 [d4a522d587]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Be tolerant of short registration timeouts.

	  Change-Id: Ie16f5053ebde0dc6507845393709b4d6a3ea526d

2015-11-17 14:53 +0000 [e44ab3816c]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Fix 423 response handling.

	  Receiving a 423 Interval Too Brief response after authentication for an
	  outbound registration attempt results in assuming that the registrar has
	  rejected the registration permanently.  If there are no configured retries
	  for fatal responses then the outbound registration is stopped for that
	  endpoint.

	  For registrations, PJSIP/PJPROJECT intercepts the handling of 423
	  responses and does not include any authentication in the updated
	  registration request.  When the updated request is challenged then the
	  Asterisk code assumes that we were challenged again because the peer
	  rejected the authentication we sent earlier.

	  * Made registration challenges keep track of the CSeq number to determine
	  if the received challenge response was for the request we thought we sent.
	  If the response's CSeq number differs from the CSeq number we last sent
	  with authentication then authenticate again because it is a challenge to a
	  different request.

	  Change-Id: I81b4bd36d1be095bab606e34b8b44e6302971b09

2015-11-03 14:36 +0000 [1e0040b88f]  Tyler Cambron <tcambron@digium.com>

	* StatsD: Add res_statsd compatibility

	  Added a new api to res_statsd.c to allow it to receive a
	  character pointer for the value argument. This allows for a
	  '+' and a '-' to easily be sent with the value.

	  ASTERISK-25419
	  Reported By: Ashley Sanders

	  Change-Id: Id6bb53600943d27347d2bcae26c0bd5643567611

2015-11-16 13:56 +0000 [f62b642fe3]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip: Fix off nominal crash with requests that fail and have a timer

	  When a request is sent using pjsip_endpt_send_request and fails, a condition
	  exists where the request wrapper, which is an AO2 object, may be de-ref'd
	  more times than it should. This occurs when the request's callback is called,
	  and, in the callback, the timer on the PJSIP heap is cancelled. When that
	  occurs, the request wrapper's lifetime is decremented. When
	  pjsip_endpt_send_request fails, we unilaterally decrement the lifetime of
	  the request wrapper again, even though we've already cancelled the reference
	  associated with the timer.

	  This patch checks the return result of pj_timer_heap_cancel_if_active before
	  removing the reference associated with the timer. We now only decrement it
	  in this case if a timer is cancelled as a result of the function call.

	  Change-Id: I21332343a1a019c1117076f9bf2df27be2850102

2015-11-13 14:03 +0000 [fdd2afcd16]  Mark Michelson <mmichelson@digium.com>

	* Confbridge: Add a user timeout option

	  This option adds the ability to specify a timeout, in seconds, for a
	  participant in a ConfBridge. When the user's timeout has been reached,
	  the user is ejected from the conference with the CONFBRIDGE_RESULT
	  channel variable set to "TIMEOUT".

	  The rationale for this change is that there have been times where we
	  have seen channels get "stuck" in ConfBridge because a network issue
	  results in a SIP BYE not being received by Asterisk. While these
	  channels can be hung up manually via CLI/AMI/ARI, adding some sort of
	  automatic cleanup of the channels is a nice feature to have.

	  ASTERISK-25549 #close
	  Reported by Mark Michelson

	  Change-Id: I2996b6c5e16a3dda27595f8352abad0bda9c2d98

2015-11-16 04:29 +0000 [7debb986a5]  Alec Davis <sivad.a@paradise.net.nz>

	* app_queue: (try_calling): mutex 'qe->chan' freed more times than we've locked!

	  commit aae45acbd (Mark Michelson 2015-04-15 10:38:02 -0500 6525)
	  refer ASTERISK-24958

	  above commit removed ast_channel_lock(qe->chan);
	  but failed to remove corresponding ast_channel_unlock(qe->chan);

	  ASTERISK-25561 #close
	  Reported Alec Davis

	  Change-Id: Ie05f4e2d08912606178bf1fded57cc022c7a2e1a

2015-11-14 07:02 +0000 [afd9a89e5a]  Joshua Colp <jcolp@digium.com>

	* hashtab: Add NULL check when destroying iterator.

	  The hashtab API is pretty NULL tolerant which has resulted
	  in remaining callers not doing much checks themselves.
	  Unfortunately the function to destroy an iterator does not
	  do a NULL check and will result in a crash if passed NULL.
	  This change fixes that.

	  ASTERISK-25552 #close

	  Change-Id: Ic1bf8eec3639e5a440f1c941d3ae3893ac6ed619

2015-11-13 14:32 +0000 [c0f2f8de45]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_rfc3326.c: Fix crash when channel goes away.

	  If an authenticated incoming caller does not respond to our 200 OK INVITE
	  response with an ACK then PJSIP will hangup the call.  Unfortunately,
	  there is a chance that the session's channel will go away between one use
	  of the channel pointer and another when building the BYE request because
	  the BYE is being built by the monitor thread and not the call's serializer
	  thread.

	  * Added a check to ensure that the thread trying to add the Reason header
	  is the call's serializer thread.  This ensures that the channel will not
	  go away on us.

	  Change-Id: I866388d2b97ea2032eaae3f3ab3f1ca6cbd2df89

2015-11-13 14:19 +0000 [4f43b85c92]  Mark Michelson <mmichelson@digium.com>

	* Taskprocessors: Increase high-water mark

	  In practical tests, we have seen certain taskprocessors, specifically
	  Stasis subscription taskprocessors, cross the recently-added high-water
	  mark and emit a warning. This high-water mark warning is only intended
	  to be emitted when things have tanked on the system and things are
	  heading south quickly. In the practical tests, the Stasis taskprocessors
	  sometimes had a max depth of 180 tasks in them, and Asterisk wasn't in
	  any danger at all.

	  As such, this ups the high-water mark to 500 tasks instead. It also
	  redefines the SIP threadpool request denial number to be a multiple of
	  the taskprocessor high-water mark.

	  Change-Id: Ic8d3e9497452fecd768ac427bb6f58aa616eebce

2015-11-11 11:46 +0000 [d8d3991390]  Alexander Traud <pabstraud@compuserve.com>

	* format: Register format-attribute module with cached formats.

	  In Asterisk 13, cached formats are created before their corresponding format-
	  attribute module is registered. Cached formats are involved when a local
	  extension is called. Therefore, ast_format_generate_sdp_fmtp did not work
	  on local extensions. This change affects the Opus Codec, H.263 (Plus), H.264,
	  and format-attribute modules provided externally.

	  ASTERISK-25160 #close

	  Change-Id: I1ea1f0483e5261e2a050112e4ebdfc22057d1354

2015-11-12 11:17 +0000 [367972e42d]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip distributor: Don't send 503 response to responses.

	  When the SIP threadpool is backed up with tasks, we send 503 responses
	  to ensure that we don't try to overload ourselves. The problem is that
	  we were not insuring that we were not trying to send a 503 to an
	  incoming SIP response.

	  This change makes it so that we only send the 503 on incoming requests.

	  Change-Id: Ie2b418d89c0e453cc6c2b5c7d543651c981e1404

2015-11-11 17:11 +0000 [2f9cb7d62b]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Deny requests when threadpool queue is backed up.

	  We have observed situations where the SIP threadpool may become
	  deadlocked. However, because incoming traffic is still arriving, the SIP
	  threadpool's queue can continue to grow, eventually running the system
	  out of memory.

	  This change makes it so that incoming traffic gets rejected with a 503
	  response if the queue is backed up too much.

	  Change-Id: I4e736d48a2ba79fd1f8056c0dcd330e38e6a3816

2015-11-12 06:24 +0000 [4e5bf12b33]  Joshua Colp <jcolp@digium.com>

	* format_cap: Don't append the 'none' format when appending all.

	  When appending all formats of a type all the codecs are iterated
	  and added. This operation was incorrectly adding the ast_format_none
	  format which is special in that it is supposed to be used when no
	  format is present. It shouldn't be appended.

	  ASTERISK-25535

	  Change-Id: I7b00f3bdf4a5f3022e483d6ece602b1e8b12827c

2015-11-11 04:16 +0000 [07583c2888]  Steve Davies <steve@one47.co.uk>

	* Further fixes to improper usage of scheduler

	  When ASTERISK-25449 was closed, a number of scheduler issues mentioned in
	  the comments were missed. These have since beed raised in ASTERISK-25476
	  and elsewhere.

	  This patch attempts to collect all of the scheduler issues discovered so
	  far and address them sensibly.

	  ASTERISK-25476 #close

	  Change-Id: I87a77d581e2e0d91d33b4b2fbff80f64a566d05b

2015-11-11 11:04 +0000 [b818d70533]  Joshua Colp <jcolp@digium.com>

	* threadpool: Handle worker thread transitioning to dead when going active.

	  This change adds handling of dead worker threads when moving them
	  to be active. When this happens the worker thread is removed from
	  both the active and idle threads container. If no threads are able
	  to be moved to active then the pool grows as configured.

	  A unit test has also been added which thrashes the idle timeout
	  and thread activation to exploit any race conditions between the
	  two.

	  ASTERISK-25546 #close

	  Change-Id: I6c455f9a40de60d9e86458d447b548fb52ba1143

2015-11-10 09:27 +0000 [4bf84459c7]  Alexander Traud <pabstraud@compuserve.com>

	* rtp_engine: Init a format-attribute module to its RFC defaults.

	  Previously, format-attribute modules relied on an existing fmtp line in SDP
	  negotiation. However, fmtp is optional for several formats like the Opus Codec.
	  Now, the format-attribute module is called with an empty fmtp, which allows the
	  module to initialise itself to RFC defaults. Furthermore now, Asterisk is able
	  to differentiate between internally and externally created formats.

	  ASTERISK-25537 #close

	  Change-Id: I28f680cef7fdf51c0969ff8da71548edad72ec52

2015-11-09 03:04 +0000 [1bff400df7]  Alexander Traud <pabstraud@compuserve.com>

	* ast_format_cap_get_names: To display all formats, the buffer was increased.

	  ASTERISK-25533 #close

	  Change-Id: Ie1a9d1a6511b3f1a56b93d04475fbf8a4e40010a

2015-11-09 07:04 +0000 [f3ac4d8090]  Alexander Traud <pabstraud@compuserve.com>

	* ast_format_cap: Avoid format creation on module load, use cache instead.

	  Since Asterisk 13, formats are immutable and cached. However while loading a
	  module like chan_sip, some formats were created instead using cached ones.

	  ASTERISK-25535 #close

	  Change-Id: I479cdc220d5617c840a98f3389b3bd91e91fbd9b

2015-11-06 07:54 +0000 [6d1bdb9d3b]  Walter Doekes <walter+asterisk@wjd.nu>

	* func_callerid: Document that CALLERID(pres) is available.

	  CALLERPRES() says that it's deprecated in favor of CALLERID(num-pres)
	  and CALLERID(name-pres).  But for channel driver that don't make a
	  distinction between the two (e.g. SIP), it makes more sense to get/set
	  both at once.  This change reveals the availability of CALLERID(pres),
	  CONNECTEDLINE(pres), REDIRECTING(orig-pres), REDIRECTING(to-pres) and
	  REDIRECTING(from-pres).

	  ASTERISK-25373 #close

	  Change-Id: I5614ae4ab7d3bbe9c791c1adf147e10de8698d7a
2015-11-06 07:52 +0000 [8410336681]  Walter Doekes <walter+asterisk@wjd.nu>

	* docs: Fix a few typo's in app docs (more then, resourse).

	  Change-Id: Iba57efadf6c0b822e762c7a001bc89611d98afd7

2015-11-06 07:36 +0000 [0d425f2eb4]  Walter Doekes <walter+asterisk@wjd.nu>

	* xmldoc: Improve xmldoc wrapping of 'core show ...' output.

	  Previously, the wrapping did both lookahead and lookback, which,
	  together with color escape sequences, caused some lines to be wrapped
	  way earlier than other lines.  This led to inconsistent output.

	  This simplifies the wrapping code and makes it more sane: if maxcolumns
	  is hit, we simply jump back to the last space and wrap there.

	  ASTERISK-25527 #close

	  Change-Id: I56d01c6f9a812642b1b05535c98d4db48d17c957

2015-11-06 06:57 +0000 [33752e0837]  Sean Bright (license #5060)

	* res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP.

	  In SIP/SDP, Opus has two channels always (see RFC 7587 section 7). The actual
	  amount of channels is negotiated in-band. Therefore now, the Opus codec and its
	  attribute rtpmap are registered with two channels.

	  ASTERISK-24779 #close
	  Reported by: PowerPBX
	  Tested by: Alexander Traud
	  patches:
	    asterisk-24779.patch submitted by Sean Bright (license #5060)

	  Change-Id: Ic7ac13cafa1d3450b4fa4987350924b42cbb657b

2015-11-03 16:19 +0000 [6ff48319d9]  Jonathan Rose <jrose@digium.com>

	* taskprocessor: Add high water mark warnings

	  If a taskprocessor's queue grows large, this can indicate that there
	  may be a problem with tasks not leaving the processor or else that
	  the number of available task processors for a given type of task is
	  too low. This patch makes it so that if a taskprocessor's task queue
	  grows above 100 queued tasks that it will emit a warning message.
	  Warning messages are emitted only once per task processor.

	  ASTERISK-25518 #close
	  Reported by: Jonathan Rose

	  Change-Id: Ib1607c35d18c1d6a0575b3f0e3ff5d932fd6600c

2015-11-04 14:31 +0000 [506aea26e6]  Matt Jordan <mjordan@digium.com>

	* main/dial: Protect access to the format_cap structure of the requesting channel

	  When a dial attempt is made that involves a requesting channel, we previously
	  were not:
	  a) Protecting access to the native format capabilities structure on the
	     requesting channel. That is inherently unsafe.
	  b) Reference bumping the lifetime of the format capabilities structure.

	  In both cases, something else could sneak in, blow away the format
	  capabilities, and we'd be holding onto an invalid format_cap structure. When
	  the newly created channel attempts to construct its format capabilities, things
	  go poorly.

	  This patch:
	  a) Ensures that we get a reference to the native format capabilities while
	     the requesting channel is locked
	  b) Holds a reference to the native format capabilities during the creation
	     of the new channel.

	  ASTERISK-25522 #close

	  Change-Id: I0bfb7ba8b9711f4158cbeaae96edf9626e88a54f

2015-10-30 22:57 +0000 [d098d00424]  Corey Farrell <git@cfware.com>

	* Fix cli display of build options.

	  A previous commit reduced the AST_BUILDOPTS compiler define to
	  only include options that affected ABI.  This included some options
	  that were previously displayed by cli "core show settings".  This
	  change corrects the CLI display while still restricting buildopts.h
	  to ABI effecting options only.

	  ASTERISK-25434 #close
	  Reported by: Rusty Newton

	  Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325

2015-11-03 11:15 +0000 [afec1b1b64]  Matt Jordan <mjordan@digium.com>

	* res_pjsip/location: Destroy contact_status objects on contact deletion

	  The contact_status Sorcery objects are currently not destroyed when a contact
	  is deleted. This causes the contact's last known RTT/status to be 'sticky'
	  when the contact itself may no longer exist. This patch causes the
	  contact_status objects associated with both dynamic and static contacts to
	  be destroyed if the AoR holding those contacts is also destroyed (or via
	  other paths where a contact may be deleted.)

	  Change-Id: I7feec8b9278cac3c5263a4c0483f4a0f3b62426e

2015-11-03 10:58 +0000 [715f770c9f]  Matt Jordan <mjordan@digium.com>

	* pjsip_configuration: On delete, remove the persistent version of an endpoint

	  When an endpoint is deleted (such as through an API), the persistent endpoint
	  currently continues to lurk around. While this isn't harmful from a memory
	  consumption perspective - as all persistent endpoints are reclaimed on
	  shutdown - it does cause Stasis endpoint related operations to continue
	  to believe that the endpoint may or may not exist.

	  This patch causes the persistent endpoint related to a PJSIP endpoint to be
	  destroyed if the PJSIP endpoint is deleted.

	  Change-Id: I85ac707b4d5e6aad882ac275b0c2e2154affa5bb
2015-11-03 08:15 +0000 [f0f190af08]  Matt Jordan <mjordan@digium.com>

	* main/stasis_endpoints: Fix ContactStatusChange JSON for roundtrip_usec field

	  The JSON packing for the ContactStatusChange event forgot to include the
	  roundtrip_usec field. As a result, the field never showed up in any event,
	  even when the data was available. This patch corrects that error by properly
	  packing the JSON blob with the data.

	  Change-Id: I8df80da659a44010afbd48f645967518ff5daa17

2015-11-02 20:24 +0000 [0393bd6bed]  Corey Farrell <git@cfware.com>

	* chan_sip: Allow websockets to be disabled.

	  This patch adds a new setting "websockets_enabled" to sip.conf.
	  Setting this to false allows chan_sip to be used without causing
	  conflicts with res_pjsip_transport_websocket.

	  ASTERISK-24106 #close
	  Reported by: Andrew Nagy

	  Change-Id: I04fe8c4f2d57b2d7375e0e25826c91a72e93bea7

2015-11-02 17:19 +0000 [6fbffe42e1]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Set threadpool max size default to 50.

	  During a stress test of subscriptions, a huge blast of
	  subscription-related traffic resulted in the threadpool expanding to a
	  ridiculous number of threads. The balooning of threads resulted in an
	  increase of memory, which led to a crash due to being out of memory.

	  An easy fix for the particular test was to limit the size of the
	  threadpool, thus reining in the amount of memory that would be used. It
	  was decided that there really is no downside to having a non-infinite
	  default value for the maximum size of the threadpool, so this change
	  introduces 50 threads as the maximum threadpool size for the SIP
	  threadpool.

	  ASTERISK-25513 #close
	  Reported by John Bigelow

	  Change-Id: If0b9514f1d9b172540ce1a6e2f2ffa1f2b6119be

2015-11-02 06:57 +0000 [11e54b1932]  Matt Jordan <mjordan@digium.com>

	* pjsip_options: Schedule/unschedule qualifies on AoR creation/destruction

	  When an AoR is created or destroyed dynamically, the scheduled OPTIONS
	  requests that qualify the contacts on the AoR are not necessarily started
	  or destroyed, particularly for persistent contacts created for that AoR.
	  This patch adds create/update/delete sorcery observers for an AoR, which
	  schedule/unschedule the qualifies as expected.

	  Change-Id: Ic287ed2e2952a7808ee068776fe966f9554bdf7d

2015-10-30 13:22 +0000 [118d628e08]  Matt Jordan <mjordan@digium.com>

	* Makefile: Add a rule 'basic-pbx' that installs the Basic PBX configs

	  This patch adds a rule for installing the Super Awesome Company based 'Basic
	  PBX' configuration files. As part of adding this rule, a bit of the content
	  that makes up installing the configuration files under the 'samples' target
	  was refactored into a make subroutine for usage by additional later config
	  make targets.

	  Change-Id: I6c2e27906f73e2919a2b691da0be20ae70302404
2015-10-29 08:28 +0000 [9a021a42ad]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_pubsub: Fix assertion when UAS dialog creation fails.

	  When compiled with assertions enabled one will occur when destroying
	  the subscription tree when UAS dialog creation fails. This is because
	  the code assumes that a dialog will always exist on a subscription
	  tree when in reality during this specific scenario it won't.

	  This change makes it so a dialog is not removed from the subscription
	  tree if it is not present.

	  ASTERISK-25505 #close

	  Change-Id: Id5c182b055aacc5e66c80546c64804ce19218dee

2015-10-26 11:42 +0000 [1256aedf66]  Alexander Traud <pabstraud@compuserve.com>

	* chan_sip: Do not send all codecs on INVITE.

	  Since version 13, Asterisk sent all allowed codecs as callee, even when the
	  caller did not request/support them. In case of dynamic RTP payloads, this led
	  to the same ID for different codecs, which is not allowed by SIP/SDP. Now, the
	  intersection between the requested and the supported codecs is send again.

	  ASTERISK-24543 #close

	  Change-Id: Ie90cb8bf893b0895f8d505e77343de3ba152a287

2015-10-24 13:08 +0000 [5f593e7c38]  gtjoseph <george.joseph@fairview5.com>

	* build: GCC 5.1.x catches some new const, array bounds and missing paren issues

	  Fixed 1 issue in each of the affected files.

	  ASTERISK-25494 #close
	  Reported-by: George Joseph
	  Tested-by: George Joseph

	  Change-Id: I818f149cd66a93b062df421e1c73c7942f5a4a77

2015-10-20 16:02 +0000 [162acd45f7]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip:  Add "like" processing to pjsip list and show commands

	  Add the ability to filter output from pjsip list and show commands
	  using the "like" predicate like chan_sip.

	  For endpoints, aors, auths, registrations, identifyies and transports,
	  the modification was a simple change of an ast_sorcery_retrieve_by_fields
	  call to ast_sorcery_retrieve_by_regex.  For channels and contacts a
	  little more work had to be done because neither of those objects are
	  true sorcery objects.  That was just removing the non-matching object
	  from the final container.  Of course, a little extra plumbing in the
	  common pjsip_cli code was needed to parse the "like" and pass the regex
	  to the get_container callbacks.

	  Some of the get_container code in res_pjsip_endpoint_identifier was also
	  refactored for simplicity.

	  ASTERISK-25477 #close
	  Reported by: Bryant Zimmerman
	  Tested by: George Joseph

	  Change-Id: I646d9326b778aac26bb3e2bcd7fa1346d24434f1

2015-10-21 11:51 +0000 [c58091737d]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip_outbound_registration: registration stops due to fatal 4xx response

	  During outbound registration it is possible to receive a fatal (any permanent/
	  non-temporary 4xx, 5xx, 6xx) response from the registrar that is simply due
	  to a problem with the registrar itself. Upon receiving the failure response
	  Asterisk terminates outbound registration for the given endpoint.

	  This patch adds an option, 'fatal_retry_interval', that when set continues
	  outbound registration at the given interval up to 'max_retries' upon receiving
	  a fatal response.

	  ASTERISK-25485 #close

	  Change-Id: Ibc2c7b47164ac89cc803433c0bbe7063bfa143a2

2015-10-22 17:07 +0000 [ebe69dee0d]  Mark Michelson <mmichelson@digium.com>

	* format_cap: Detect vector allocation failures.

	  A crash was seen on a system that ran out of memory due to Asterisk not
	  checking for vector allocation failures in format_cap.c. With this
	  change, if either of the AST_VECTOR_INIT calls fail, we will return a
	  value indicating failure.

	  Change-Id: Ieb9c59f39dfde6d11797a92b45e0cf8ac5722bc8

2015-10-02 15:32 +0000 [3b19efefef]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Prevent sending NOTIFY on destroyed dialog.

	  A certain situation can result in our attempting to send a NOTIFY on a
	  destroyed dialog. Say we attempt to send a NOTIFY to a subscriber, but
	  that subscriber has dropped off the network. We end up retransmitting
	  that NOTIFY until the appropriate SIP timer says to destroy the NOTIFY
	  transaction. When the pjsip evsub code is told that the transaction has
	  been terminated, it responds in kind by alerting us that the
	  subscription has been terminated, destroying the subscription, and then
	  removing its reference to the dialog, thus destroying the dialog.

	  The problem is that when we get told that the subscription is being
	  terminated, we detect that we have not sent a terminating NOTIFY
	  request, so we queue up such a NOTIFY to be sent out. By the time that
	  queued NOTIFY gets sent, the dialog has been destroyed, so attempting to
	  send that NOTIFY can result in a crash.

	  The fix being introduced here is actually a reintroduction of something
	  the pubsub code used to employ. We hold a reference to the dialog and
	  wait to decrement our reference to the dialog until our subscription
	  tree object is destroyed. This way, we can send messages on the dialog
	  even if the PJSIP evsub code wants to terminate earlier than we would
	  like.

	  In doing this, some NULL checks for subscription tree dialogs have been
	  removed since NULL dialogs are no longer actually possible.

	  Change-Id: I013f43cddd9408bb2a31b77f5db87a7972bfe1e5

2015-09-29 14:53 +0000 [0a346f095f]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Ensure dialog lock balance.

	  When sending a NOTIFY, we lock the dialog and then unlock the dialog
	  when finished. A recent change made it so that the subscription tree's
	  dialog pointer will be set NULL when sending the final NOTIFY request
	  out. This means that when we attempt to unlock the dialog, we pass a
	  NULL pointer to pjsip_dlg_dec_lock(). The result is that the dialog
	  remains locked after we think we have unlocked it. When a response to
	  the NOTIFY arrives, the monitor thread attempts to lock the dialog, but
	  it cannot because we never released the dialog lock. This results in
	  Asterisk being unable to process incoming SIP traffic any longer.

	  The fix in this patch is to use a local pointer to save off the pointer
	  value of the subscription tree's dialog when locking and unlocking the
	  dialog. This way, if the subscription tree's dialog pointer is NULLed
	  out, the local pointer will still have point to the proper place and the
	  dialog lock will be unlocked as we expect.

	  Change-Id: I7ddb3eaed7276cceb9a65daca701c3d5e728e63a

2015-09-28 16:36 +0000 [ad39508095]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Prevent crashes on final NOTIFY.

	  The SIP dialog is removed from the subscription tree when the final
	  NOTIFY is sent. However, after the final NOTIFY is sent, the persistence
	  update function still attempts to access the cseq from the dialog,
	  resulting in a crash.

	  This fix removes the subscription persistence at the same time that the
	  dialog is removed from the subscription tree. This way, there is no
	  attempt to update persistence when the subscription is being destroyed.

	  Change-Id: Ibb46977a6cef9c51dc95f40f43446e3d11eed5bb

2015-09-17 17:28 +0000 [067f408760]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Remove serializer when sending final NOTIFY.

	  There have been crashes seen where a taskprocessor's listener is NULL
	  unexpectedly.

	  Looking at backtraces, the problem was specifically seen in PJSIP
	  serializers.

	  Subscriptions make the mistake of removing a serializer from a dialog
	  during subscription tree destruction. Since subscription trees are
	  reference-counted, guaranteeing the circumstances behind the destruction
	  are not possible. This makes it so that the dialog serializer can be
	  removed while not holding the dialog lock. This makes it possible for
	  the distributor to get a pointer to the dialog serializer and have that
	  serializer get freed out from under it.

	  The fix for this is to remove the serializer from a subscription dialog
	  when sending the final NOTIFY. This guarantees that the serializer is
	  removed with the dialog lock held. By doing this, we guarantee that if
	  the distributor gains access to the dialog's serializer, it will not be
	  possible for the serializer to get freed by another thread.

	  Change-Id: I21f5dac33529f65cec45679bdace60670800ff66

2015-09-02 09:14 +0000 [1bcc592765]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Fix crash on destruction of empty subscription tree.

	  If an old persistent subscription is recreated but then immediately
	  destroyed because it is out of date, the subscription tree will have no
	  leaf subscriptions on it. This was resulting in a crash when attempting
	  to destroy the subscription tree.

	  A simple NULL check fixes this problem.

	  Change-Id: I85570b9e2bcc7260a3fe0ad85904b2a9bf36d2ac

2015-09-01 15:47 +0000 [b3cc2bd7df]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Solidify lifetime and ownership of objects.

	  There have been crashes and general instability seen in the pubsub code,
	  so this patch introduces three changes to increase the stability.

	  First, the ownership model for subscriptions has been modified. Due to
	  RLS, subscriptions are stored in memory as a tree structure. Prior to my
	  patch, the PJSIP subscription was the owner of the subscription tree.
	  When the PJSIP subscription told us that it was terminating, we started
	  destroying the subscription tree along with all of the individual leaf
	  subscriptions that belong to the tree. The problem with this model is
	  that the two actors in play here, the PJSIP subscription and the
	  individual leaf subscriptions, need to have joint ownership of the
	  subscription tree. So now, the PJSIP subscription and the individual
	  leaf subscriptions each have a reference to the subscription tree. This
	  way, we will not actually free memory until no players are left that
	  care. The PJSIP subscription is a bigger stakeholder, in that if the
	  PJSIP subscription's reference to the subscription tree is removed, the
	  subscription tree instructs the leaf subscriptions to shut down and drop
	  their references to the subscription tree when possible. The individual
	  leaf subscriptions, upon being told to shut down, can drop their stasis
	  subscriptions or whatever they use to learn of new state, and then drop
	  their reference to the subscription tree once they are ready to die.

	  Second, the lifetime of a PJSIP subscription's reference to our
	  subscription tree has been altered. As I learned from doing a deep dive,
	  the PJSIP evsub code can tell Asterisk multiple times that the
	  subscription has been terminated, and not all of these times
	  are especially helpful. I have altered the message flow that we use for
	  SIP subscriptions such that we will always drop the PJSIP subscription's
	  reference to the subscription tree when we send the NOTIFY that
	  terminates a SIP subscription. This also means that we will now queue
	  NOTIFY requests to be sent after responding to incoming SUBSCRIBEs so
	  that we can have predictable state changes from the PJSIP evsub code.

	  Third, the synchronization of operations has been improved. PJSIP can
	  call into our code from a serializer thread (e.g. upon receiving an
	  incoming request) or from the monitor thread (e.g. when a subscription
	  times out). Because of this, there is the possibility of competing
	  threads stepping on each other. PJSIP attempts to do some
	  synchronization on its own by always keeping the dialog lock held when
	  it calls into us. However, since we end up pushing tasks into the
	  serializer, the result was that serialized operations were not grabbing
	  the dialog lock and could, as a result, step on something that was being
	  attempted by a different thread. Now we ensure that serialized
	  operations grab the dialog lock, then check for extenuating
	  circumstances, then proceed with their operation if they can.

	  Change-Id: Iff2990c40178dad9cc5f6a5c7f76932ec644b2e5

2015-10-19 15:28 +0000 [c8c65dfa41]  Richard Mudgett <rmudgett@digium.com>

	* strings.c: Fix __ast_str_helper() to always return a terminated string.

	  Users of functions which call __ast_str_helper() such as the ones listed
	  below are likely to not check the return value for failure so ensuring
	  that the string is always nil terminated is a good safety measure.

	  ast_str_set_va()
	  ast_str_append_va()
	  ast_str_set()
	  ast_str_append()

	  Change-Id: I36ab2d14bb6015868b49329dda8639d70fbcae07

2015-10-19 15:27 +0000 [b271d4a28a]  Richard Mudgett <rmudgett@digium.com>

	* Add missing failure checks to ast_str_set_va() callers.

	  Change-Id: I0c2cdcd53727bdc6634095c61294807255bd278f

2015-10-21 11:44 +0000 [f2725c8b77]  Joshua Colp <jcolp@digium.com>

	* res_pjsip: Move URI validation to use time.

	  In a realtime based system with a limited number of threadpool threads
	  it is possible for a deadlock to occur. This happens when permanent
	  endpoint state is updated, which will cause database queries to be done.
	  These queries may result in URI validation being done which is done
	  synchronously using a PJSIP thread. If all PJSIP threads are in use
	  processing traffic they themselves may be blocked waiting to get the
	  permanent endpoint container lock when identifying an endpoint.

	  This change moves URI validation to occur at use time instead of
	  configuration time. While this comes at a cost of not seeing a problem
	  until you use it it does solve the underlying deadlock problem.

	  ASTERISK-25486 #close

	  Change-Id: I2d7d167af987d23b3e8199e4a68f3359eba4c76a

2015-10-21 08:08 +0000 [84ff075d41]  Alexander Traud <pabstraud@compuserve.com>

	* format: Update the maximum packetization time for iLBC 30.

	  In September 2006, the maximum packetization time (ptime) were set to such a
	  low value, packetization was disabled for many codecs actually. This was fixed
	  for many codecs but not for iLBC 30. This enables packetization for iLBC which
	  can be enabled for example via allow=ilbc:60,gsm,alaw,ulaw in the file sip.conf.

	  ASTERISK-7803

	  Change-Id: I2ef90023d35efb7cb8fe96ed74f53f6846ffad12
2015-10-21 09:51 +0000 [869ef2a8ee]  Alexander Traud <pabstraud@compuserve.com>

	* chan_sip: Fix autoframing=yes.

	  With Asterisk 13, the structures ast_format and ast_codec changed. Because of
	  that, the paketization timing (framing) of the RTP channel moved away from the
	  formats/codecs. In the course of that change, the ptime of the callee was not
	  honored anymore, when the optional autoframing was enabled.

	  ASTERISK-25484 #close

	  Change-Id: Ic600ccaa125e705922f89c72212c698215d239b4

2015-10-20 22:24 +0000 [9fd2adc204]  Matt Jordan <mjordan@digium.com>

	* rest-api-templates: Wikify error code response reasons

	  Error response code descriptions may contain wiki markup that need to be
	  escaped. Without this patch, Confluence will reject the document being sent
	  and the responsible script will raise an exception.

	  Change-Id: I21fcb66fee7f6332381f2b99b1b0195dff215ee5

2015-10-20 12:06 +0000 [72cbb6df55]  Matt Jordan <mjordan@digium.com>

	* funcs/func_holdintercept: Actually add the HOLD_INTERCEPT function

	  When ab803ec342 was committed, it accidentally forgot to actually *add* the
	  HOLD_INTERCEPT function. This highlights two interesting points:
	  * Gerrit forces you to put the patch as it is going to into the repo up for
	    review, which Review Board did not. Yay Gerrit.
	  * No one apparently bothered to use this feature, or else they don't know about
	    it. I'm going to go with the latter explanation.

	  ASTERISK-24922

	  Change-Id: Ida38278f259dd07c334a36f9b7d5475b5db72396

2015-10-19 19:59 +0000 [9fc9777fa3]  Matt Jordan <mjordan@digium.com>

	* contrib/scripts/autosupport: Update for Asterisk 13

	  This patch adds some minor tweaks for autosupport to update it for Asterisk 13.
	  This includes:
	  * Finally removing most references to Zaptel
	  * Adding support for some additional 'core' commands, and fixing nomenclature
	    that generally hasn't been used for some time
	  * Adding some PJSIP/SIP commands to gather endpoints/peers and active channels

	  Change-Id: Ic997b418cbd9313588b6608e50f47b0ce6f4f1f1

2015-10-14 14:15 +0000 [dc6ec661b3]  mdu113 <mulitskiy@acedsl.com>

	* res_config_pgsql.c: Fix deadlock loading realtime configuration.

	  On v13, loading several thousand PJSIP endpoints on Asterisk start causes
	  a deadlock most of the time.

	  Thanks to mdu113 for discovering that there was a call to pgsql_exec() not
	  protected by the pgsql_lock reentrancy lock.

	  {quote}
	  I believe a code path exists that attempts to use pgsql connection without
	  locking pgsql_lock.  I believe what happens during that deadlock that I
	  see is two concurrent threads are both attempting to send query to pgsql,
	  one of the thread is using a code path without locking pgsql_lock.  If
	  they managed to send queries at the same time, it seems postgres ignores
	  one of the queries and replies only to the one of them.  If it happens so
	  that the thread holding the lock didn't receive the reply it will wait for
	  it (and hold the lock) forever (or at least for very long time), thus
	  completely blocking all access to db.
	  {quote}

	  * Added missing reentrancy locking around pgsql_exec() in find_table().

	  * Moved unlock of pgsql_lock in unload_module() to avoid locking inversion
	  between the psql_tables list lock and the pgsql_lock.

	  ASTERISK-25455 #close
	  Reported by:  mdu113
	  Patches:
	        res_config_pgsql.c-connlock2.diff (license #5543) patch uploaded by mdu113

	  Change-Id: Id9e7cdf8a3b65ff19964b0cf942ace567938c4e2

2015-10-13 14:13 +0000 [f8707ae9a5]  Olle Johansson (License 5267)

	* channels/chan_sip: Set cause code to 44 on RTP timeout

	  To quote Olle:

	  "When issuing a hangup due to RTP timeouts the cause code is not set. I have
	  selected 44 based on Cisco's implementation..."

	  ASTERISK-25135 #close
	  Reported by: Olle Johansson
	  patches:
	    rtp-timeout-cause-1.8.diff uploaded by Olle Johansson (License 5267)

	  Change-Id: Ia62100c55077d77901caee0bcae299f8dc7375fc

2015-10-10 15:20 +0000 [486b172b50]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* Build: Add menuselect options for using compiler sanitizers

	  This patch adds menuselect options for building Asterisk with
	  various sanitizers provided by gcc and clang.

	  When one of *SANITIZER flags is set in menuselect, the appropriate
	  option is added to CFLAGS ad LDFLAGS for the build.

	  Information on sanitizers in the project wiki:
	  https://github.com/google/sanitizers/wiki

	  GCC Manual:
	  https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html

	  Clang Compiler User's Manual:
	  http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation

	  ASTERISK-24718 #close
	  Reported by: Badalian Vyacheslav

	  Change-Id: Iafa51b792b7bcb20e848b99d16cf362d08590fa0

2015-10-12 11:21 +0000 [e14023ca35]  Richard Mudgett <rmudgett@digium.com>

	* config.c: Fix off-nominal memory leak.

	  Change-Id: I06e346e9a5c63cc5071e7eda537310c4b43bffe0

2015-10-12 11:20 +0000 [a99e821520]  Richard Mudgett <rmudgett@digium.com>

	* config.c: Fix potential memory corruption after [section](+).

	  The memory corruption could happen if the [section](+) is the last section
	  in the file with trailing comments.  In this case process_text_line() has
	  left *last_cat is set to newcat and newcat is destroyed.

	  Change-Id: I0d1d999f553986f591becd000e7cc6ddfb978d93

2015-10-12 11:21 +0000 [8d31d2526b]  Richard Mudgett <rmudgett@digium.com>

	* config.c: Fix #include after [section](+).

	  An #include right after a [section](+) would associate any variable
	  assignments before a new section in the #include with the wrong section.

	  * Fix section association by setting the current section to the appended
	  section.

	  * Fix '+' and '!' section flag interaction corner case depending upon
	  which flag came first.  If the '!' came first then it would be ignored.
	  If the '!' came after then it would affect the appended section.  The '!'
	  will now no longer be ignored.

	  ASTERISK-25461 #close
	  Reported by: Sean Pimental

	  Change-Id: Ic9d3191c8758048e2cbce6432f854b32531731c3

2015-10-06 18:01 +0000 [3329c714f7]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Fix deadlock when sending out-of-dialog requests.

	  The struct send_request_wrapper has a pjsip lock associated with it that
	  is created non-recursive.  There is a code path for the struct
	  send_request_wrapper lock that will attempt to lock it recursively.  The
	  reporter's deadlock showed that the thread calling endpt_send_request()
	  deadlocked itself right after the wrapper object got created.

	  Out-of-dialog requests such as MESSAGE, qualify OPTIONS, and unsolicited
	  MWI NOTIFY messages can hit this deadlock.

	  * Replaced the struct send_request_wrapper pjsip lock with the mutex lock
	  that can come with an ao2 object since all of Asterisk's mutexes are
	  recursive.  Benefits include removal of code maintaining the pjsip
	  non-recursive lock since ao2 objects already know how to maintain their
	  own lock and the lock will show up in the CLI "core show locks" output.

	  ASTERISK-25435 #close
	  Reported by: Dmitriy Serov

	  Change-Id: I458e131dd1b9816f9e963f796c54136e9e84322d

2015-10-06 11:05 +0000 [a1435aa3fa]  Stefan Engström <stefanen@kth.se>

	* res/res_rtp_asterisk.c: Fix incorrect assignment of frame->subclass.frame_ending

	  In ast_rtp_read, the value of the variable 'mark' which we try to assign to a
	  frame->subclass.frame_ending may be 0, 1 or (1<<23), but we should translate
	  it to 0 or 1.

	  ASTERISK-25451 #close
	  Change-Id: I53bdf5c026041730184a6a809009c028549ce626

2015-10-07 01:24 +0000 [3357678b94]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* func_presencestate: Return "not_set" when no data is set in AstDB

	  Return AST_PRESENCE_NOT_SET when CustomPresence AstDB key does not
	  exist, i.e. when a new CustomPresence is added in the dialplan.

	  ASTERISK-25400 #close
	  Reported by: Andrew Nagy

	  Change-Id: I6fb17b16591b5a55fbffe96f3994ec26b1b1723a

2015-10-06 20:43 +0000 [b714b2152d]  Matt Jordan <mjordan@digium.com>

	* res/res_rtp_asterisk: Fix assignment after ao2 decrement

	  When we decide we will no longer schedule an RTCP write, we remove the
	  reference to the RTP instance, then assign -1 to the stored scheduler ID
	  in case something else comes along and wants to see if anything is scheduled.

	  That scheduler ID is on the RTP instance. After 60a9172d7ef2 was merged to
	  fix the regression introduced by 3cf0f29310, this improper assignment on a
	  potentially destroyed object started getting tripped on the build agents.

	  Frankly, this should have been crashing a lot more often earlier. I can only
	  assume that the timing was changed just enough by both changes to start
	  actually hitting this problem.

	  As it is, simply moving the assignment prior to the ao2 deference is sufficient
	  to keep the RTP instance from being referenced when it is very, truly,
	  aboslutely dead.

	  (Note that it is still good practice to assign -1 to the scheduler ID when we
	  know we won't be scheduling it again, as the ao2 deref *may* not always destroy
	  the ao2 object.)

	  ASTERISK-25449

	  Change-Id: Ie6d3cb4adc7b1a6c078b1c38c19fc84cf787cda7

2015-10-06 12:40 +0000 [f939e2bd48]  Florian Sauerteig <ffs@ccn.net>

	* chan_sip: Fix port parsing for IPv6 addresses in SIP Via headers.

	  If a Via header containes an IPv6 address and a port number is ommitted,
	  as it is the standard port, we now leave the port empty and to not set it
	  to the value after the first colon of the IPv6 address.

	  ASTERISK-25443 #close

	  Change-Id: Ie3c2f05471cd006bf04ed15598589c09577b1e70

2015-10-05 16:53 +0000 [426263a64d]  Richard Mudgett <rmudgett@digium.com>

	* chan_pjsip: Fix crash on reINVITE before initial INVITE completes.

	  Apparently some endpoints attempt to send a reINVITE before completing the
	  initial INVITE transaction.  In this case PJSIP responds appropriately to
	  the reINVITE with a 491 INVITE request pending.  Unfortunately chan_pjsip
	  is using the initial INVITE transaction state to determine if an INVITE is
	  the initial INVITE or a reINVITE.  Since the initial INVITE transaction
	  has not been confirmed yet chan_pjsip thinks the reINVITE is an initial
	  INVITE and starts another PBX thread on the channel.  The extra PBX thread
	  ensures that hilarity ensues.

	  * Fix checks for a reINVITE on incoming requests to look for the presence
	  of a to-tag instead of the initial INVITE transaction state.

	  * Made caller_id_incoming_request() determine what to do if there is a
	  channel on the session or not.  After a channel is created it is too late
	  to just store the new party id on the session because the session's party
	  id has already been copied to the channel's caller id.

	  ASTERISK-25404 #close
	  Reported by: Chet Stevens

	  Change-Id: Ie78201c304a2b13226f3a4ce59908beecc2c68be

2015-10-05 21:34 +0000 [50fa9ff997]  Matt Jordan <mjordan@digium.com>

	* Fix improper usage of scheduler exposed by 5c713fdf18f

	  When 5c713fdf18f was merged, it allowed for scheduled items to have an ID of
	  '0' returned. While this was valid per the documentation for the API, it was
	  apparently never returned previously. As a result, several users of the
	  scheduler API viewed the result as being invalid, causing them to reschedule
	  already scheduled items or otherwise fail in interesting ways.

	  This patch corrects the users such that they view '0' as valid, and a returned
	  ID of -1 as being invalid.

	  Note that the failing HEP RTCP tests now pass with this patch. These tests
	  failed due to a duplicate scheduling of the RTCP transmissions.

	  ASTERISK-25449 #close

	  Change-Id: I019a9aa8b6997584f66876331675981ac9e07e39
2015-08-26 16:58 +0000 [8f777ab584]  Debian Amtelco <dan@amtelco.com>

	* chan_pjsip: Add Referred-By header to the PJSIP REFER packet.

	  Some systems require the REFER packet to include a Referred-By header.
	  If the channel variable SIPREFERREDBYHDR is set, it passes that value as the
	  Referred-By header value.  Otherwise, it adds the current dialog’s local info.

	  Reported by: Dan Cropp
	  Tested by: Dan Cropp

	  Change-Id: I3d17912ce548667edf53cb549e88a25475eda245

2015-10-03 06:27 +0000 [74635b5638]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* manager: Fix GetConfigJSON returning invalid JSON

	  When GetConfigJSON was introduced back in 1.6, it returned each
	  section as an array of strings: ["key=value", "key2=value2"].
	  Afterwards, it was changed a few times and became
	  ["key": "value", "key2": "value2"], which is not a correct JSON.
	  This patch fixes that by constructing a JSON object {} instead of
	  an array [].

	  Also, the keys "istemplate" and "tempates" that are used to
	  indicate templates and their inherited categories are now wrapped in
	  quotes.

	  ASTERISK-25391 #close
	  Reported by: Bojan Nemčić

	  Change-Id: Ibbe93c6a227dff14d4a54b0d152341857bcf6ad8

2015-09-30 17:28 +0000 [40c69e78f5]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_memory_cache.c: Fix deadlock with scheduler.

	  A deadlock can happen when a sorcery object is being expired from the
	  memory cache when at the same time another object is being placed into the
	  memory cache.  There are a couple other variations on this theme that
	  could cause the deadlock.  Basically if an object is being expired from
	  the sorcery memory cache at the same time as another thread tries to
	  update the next object expiration timer the deadlock can happen.

	  * Add a deadlock avoidance loop in expire_objects_from_cache() to check if
	  someone is trying to remove the scheduler callback from the scheduler.

	  ASTERISK-25441 #close

	  Change-Id: Iec7b0bdb81a72b39477727b1535b2539ad0cf4dc

2015-10-01 14:30 +0000 [dfeb513e85]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_memory_cache.c: Replace inline code with function.

	  Make sorcery_memory_cache_close() call remove_all_from_cache() instead of
	  partially inlining it.

	  ASTERISK-25441

	  Change-Id: I1aa6cb425b1a4307096f3f914d17af8ec179a74c

2015-10-01 14:27 +0000 [ced0a2d71b]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_memory_cache.c: Shutdown in a less crash potential order.

	  Basically you should shutdown in the opposite order of how you setup since
	  later setup pieces likely depend on earlier setup pieces.  e.g.,
	  Registering your external API with the rest of the system should be the
	  last thing setup and the first thing unregistered during shutdown.

	  Change-Id: I5715765b723100c8d3c2642e9e72cc7ad5ad115e

2015-09-30 17:27 +0000 [cc279eea11]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_memory_cache.c: Misc tweaks.

	  Change-Id: I8cd32dffbb4f33bb0c39518d6e4c991e73573160

2015-09-30 17:27 +0000 [9af3b613f6]  Richard Mudgett <rmudgett@digium.com>

	* res_sorcery_memory_cache.c: Made use OBJ_SEARCH_MASK.

	  Change-Id: Ibca6574dc3c213b29cc93486e01ccd51f5caa46c

2015-09-30 13:42 +0000 [56ed7b9dd5]  Joshua Colp <jcolp@digium.com>

	* res_rtp_asterisk: Move "Set role" warning to be debug.

	  In practice the set_role API callback can be invoked even
	  when no ICE is present on an RTP instance. This can occur
	  if ICE has not been enabled on it.

	  ASTERISK-25438 #close

	  Change-Id: I0e17e4316f0f0d7f095c78c3d4fd73a913b6ba69

2015-09-28 15:31 +0000 [ddebb217f0]  Richard Mudgett <rmudgett@digium.com>

	* sched.c: Add warning about negative time interval request.

	  Change-Id: Ib91435fb45b7f5f7c0fc83d0eec20b88098707bc

2015-09-29 21:15 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.6.0-rc1 Released.

2015-09-29 16:12 +0000 [bba1c4066b]  Kevin Harwell <kharwell@lunkwill>

	* Release summaries: Add summaries for 13.6.0-rc1

2015-09-29 16:08 +0000 [82c4aecdbb]  Kevin Harwell <kharwell@lunkwill>

	* .version: Update for 13.6.0-rc1

2015-09-29 16:08 +0000 [bc18db7388]  Kevin Harwell <kharwell@lunkwill>

	* .lastclean: Update for 13.6.0-rc1

2015-09-29 16:08 +0000 [b9c53f95e3]  Kevin Harwell <kharwell@lunkwill>

	* realtime: Add database scripts for 13.6.0-rc1

2015-09-29 14:53 +0000 [d30939b6e8]  Kevin Harwell <kharwell@digium.com>

	* ARI: Changed version from 1.8.0 to 1.9.0

	  Change-Id: I510991c60d28d171f47c4b58bba4947f7fc71b13

2015-09-25 18:37 +0000 [5f19c9bade]  Richard Mudgett <rmudgett@digium.com>

	* res/ari/config.c: Fix user sort compare function.

	  Made use the ao2 sort compare template function and OBJ_SEARCH_xxx
	  identifiers.

	  Change-Id: Ic53005dc5aafa7a36c72300dd89b75fb63c92f4c

2015-09-25 17:26 +0000 [3a85764039]  Richard Mudgett <rmudgett@digium.com>

	* res/ari/config.c: Optimize conf_alloc() object init.

	  * Now conf_alloc() has more off nominal error checking.

	  * Eliminated RAII_VAR() use in conf_alloc().

	  * Eliminated a dubius shortcut when destroying cfg->general in
	  conf_destructor() that would cause a crash if cfg->general failed to get
	  allocated.

	  * Add some ACO registration section comments.

	  Change-Id: Ia40c2b1b2d0777d641605118ae019c5a73865e1a

2015-09-25 16:48 +0000 [028033e5a8]  Richard Mudgett <rmudgett@digium.com>

	* res/ari/config.c: Fix conf_alloc() object init.

	  Need to finish initializing the string fields in the ao2 object before
	  putting any default strings into them.

	  ASTERISK-25383 #close
	  Reported by:  yaron nahum

	  Change-Id: I9f7f3a03f0c4991a01593abf8697b9a587c0ea84

2015-09-27 20:45 +0000 [90165e306d]  Matt Jordan <mjordan@digium.com>

	* res/res_stasis: Fix accidental subscription to 'all' bridge topic

	  When b99a7052621700a1aa641a1c24308f5873275fc8 was merged, subscribing to a
	  NULL bridge will now cause app_subscribe_bridge to implicitly subscribe to
	  all bridges. Unfortunately, the res_stasis control loop did not check that
	  a bridge changing on a channel's control object was actually also non-NULL.
	  As a result, app_subscribe_bridge will be called with a NULL bridge when a
	  channel leaves a bridge. This causes a new subscription to be made to the
	  bridge. If an application has also subscribed to the bridge, the application
	  will now have two subscriptions:
	  (1) The explicit one created by the app
	  (2) The implicit one accidentally created by the control structure

	  As a result, the 'BridgeDestroyed' event can be sent multiple times. This
	  patch corrects the control loop such that it only subscribes an application
	  to a new bridge if the bridge pointer is non-NULL.

	  ASTERISK-24870

	  Change-Id: I3510e55f6bc36517c10597ead857b964463c9f4f

2015-09-04 13:51 +0000 [e1223ff6db]  Scott Griepentrog <scott@griepentrog.com>

	* Scripts: check file versions of Asterisk and dependencies

	  To help in diagnosing mismatched modules and libraries, this
	  script scans for version, repository, and source information
	  and reports what is found.

	  ASTERISK-25376 #close
	  Reported by: Ashley Sanders

	  Change-Id: Ib0642d0fb96712476f59760d6d137a24633fe2d6

2015-09-24 14:56 +0000 [6b1e7583c1]  Richard Mudgett <rmudgett@digium.com>

	* app_queue.c: Force COLP update if outgoing channel name changed.

	  * When a call is answered and the outgoing channel name has changed then
	  force a connected line update because the channel is no longer the same.
	  The channel was masqueraded into by another channel.  This is usually
	  because of a call pickup.

	  Note: Forwarded calls are handled in a controlled manner so the original
	  channel name is replaced with the forwarded channel.

	  ASTERISK-25423 #close
	  Reported by: John Hardin

	  Change-Id: Ie275ea9e99c092ad369db23e0feb08c44498c172

2015-09-24 14:20 +0000 [6bf304bf25]  Richard Mudgett <rmudgett@digium.com>

	* app_queue.c: Factor out a connected line update routine.

	  Replace inlined code with update_connected_line_from_peer().

	  ASTERISK-25423
	  Reported by: John Hardin

	  Change-Id: I33bbd033596fcb0208d41d8970369b4e87b806f3

2015-09-24 13:27 +0000 [e36b5f1e8e]  Richard Mudgett <rmudgett@digium.com>

	* app_dial.c: Make 'A' option pass COLP updates.

	  While the 'A' option is playing the announcement file allow the caller and
	  peer to exchange COLP update frames.

	  ASTERISK-25423
	  Reported by: John Hardin

	  Change-Id: Iac6cf89b56d26452c6bb88e9363622bbf23895f9

2015-09-24 12:59 +0000 [747bfac895]  Richard Mudgett <rmudgett@digium.com>

	* app_dial.c: Force COLP update if outgoing channel name changed.

	  * When a call is answered and the outgoing channel name has changed then
	  force a connected line update because the channel is no longer the same.
	  The channel was masqueraded into by another channel.  This is usually
	  because of a call pickup.

	  Note: Forwarded calls are handled in a controlled manner so the original
	  channel name is replaced with the forwarded channel.

	  ASTERISK-25423
	  Reported by: John Hardin

	  Change-Id: I2e01f7a698fbbc8c26344a59c2be40c6cd98b00c

2015-09-24 12:37 +0000 [14481d9aa0]  Richard Mudgett <rmudgett@digium.com>

	* app_dial.c: Factor out a connected line update routine.

	  Replace inlined code with update_connected_line_from_peer().

	  ASTERISK-25423
	  Reported by: John Hardin

	  Change-Id: Ia14f18def417645cd7fb453e1bdac682630a5091

2015-09-23 17:41 +0000 [bbeda190c3]  Richard Mudgett <rmudgett@digium.com>

	* app_dial.c: Remove some no-op code.

	  Change-Id: Ice1884a94315d3cb7e3bbd47a9fba76a27276c54

2015-09-23 14:02 +0000 [f050fa76eb]  Mark Michelson <mmichelson@digium.com>

	* logger: Prevent duplicate dynamic channels from being added.

	  There was a problem observed where the "logger add channel" CLI command
	  would allow for a channel with the same name to be added multiple times.
	  This would result in each message being written out to the same file
	  multiple times.

	  The problem was due to the difference in how logger channel filenames
	  are stored versus the format they are allowed to be presented when they
	  are added. For instance, if adding the logger channel "foo" through the
	  CLI, the result would be a logger channel with the file name
	  /var/log/asterisk/foo being stored. So when trying to add another "foo"
	  channel, "foo" would not match "/var/log/asterisk/foo" so we'd happily
	  add the duplicate channel.

	  The fix presented here is to introduce two new methods in the logger
	  code:
	   * make_filename(): given a logger channel name, this creates the
	     filename for that logger channel.
	   * find_logchannel(): given a logger channel name, this calls
	     make_filename() and then traverses the list of logchannels in order
	     to find a match.

	  This change has made use of make_filename() and find_logchannel()
	  throughout to more consistently behave.

	  ASTERISK-25305 #close
	  Reported by Mark Michelson

	  Change-Id: I892d52954d6007d8bc453c3cbdd9235dec9c4a36

2015-09-24 14:49 +0000 [629458d349]  Mark Michelson <mmichelson@digium.com>

	* Do not swallow frames on channels leaving bridges.

	  When leaving a bridge, indications on a channel could be swallowed by
	  the internal indication logic because it appears that the channel is on
	  its way to be hung up anyway. One such situation where this is
	  detrimental is when channels on hold are redirected out of a bridge. The
	  AST_CONTROL_UNHOLD indication from the bridging code is swallowed,
	  leaving the channel in question to still appear to be on hold.

	  The fix here is to modify the logic inside ast_indicate_data() to not
	  drop the indication if the channel is simply leaving a bridge. This way,
	  channels on hold redirected out of a bridge revert to their expected "in
	  use" state after the redirection.

	  ASTERISK-25418 #close
	  Reported by Mark Michelson

	  Change-Id: If6115204dfa0551c050974ee138fabd15f978949

2015-09-22 17:08 +0000 [5f15cd93f0]  Richard Mudgett <rmudgett@digium.com>

	* app_page.c: Fix crash when forwarding with a predial handler.

	  Page uses the async method of dialing with the dial API.  When a call gets
	  forwarded there is no calling channel available.  If the predial handler
	  was set then the calling channel could not be put into auto-service
	  for the forwarded call because it doesn't exist.  A crash is the result.

	  * Moved the callee predial parameter string processing to before the
	  string is passed to the dial API rather than having the dial API do it.
	  There are a few benefits do doing this.  The first is the predial
	  parameter string processing doesn't need to be done for each channel
	  called by the dial API.  The second is in async mode and the forwarded
	  channel is to have the predial handler executed on it then the
	  non-existent calling channel does not need to be present to process the
	  predial parameter string.

	  * Don't start auto-service on a non-existent calling channel to execute
	  the predial handler when the dial API is in async mode and forwarding a
	  call.

	  ASTERISK-25384 #close
	  Reported by: Chet Stevens

	  Change-Id: If53892b286d29f6cf955e2545b03dcffa2610981

2015-09-03 21:19 +0000 [b50e372394]  Matt Jordan <mjordan@digium.com>

	* ARI: Add events for Contact and Peer Status changes

	  This patch adds support for receiving events regarding Peer status changes
	  and Contact status changes. This is particularly useful in scenarios where
	  we are subscribed to all endpoints and channels, where we often want to know
	  more about the state of channel technology specific items than a single
	  endpoint's state.

	  ASTERISK-24870

	  Change-Id: I6137459cdc25ce27efc134ad58abf065653da4e9

2015-09-04 12:24 +0000 [3502c0431d]  Matt Jordan <mjordan@digium.com>

	* res/res_stasis_device_state: Allow for subscribing to 'all' device state

	  This patch adds support for subscribing to all device state changes. This is
	  done either by subscribing to an empty device, e.g., 'eventSource=deviceState:',
	  or by the WebSocket connection specifying that it wants all state in the
	  system.

	  ASTERISK-24870

	  Change-Id: I9cfeca1c9e2231bd7ea73e45919111d44d2eda32

2015-09-04 12:25 +0000 [4c9f613309]  Matt Jordan <mjordan@digium.com>

	* ARI: Add the ability to subscribe to all events

	  This patch adds the ability to subscribe to all events. There are two possible
	  ways to accomplish this:
	  (1) On initial WebSocket connection. This patch adds a new query parameter,
	      'subscribeAll'. If present and True, Asterisk will subscribe the
	      applications to all ARI events.
	  (2) Via the applications resource. When subscribing in this manner, an ARI
	      client should merely specify a blank resource name, i.e., 'channels:'
	      instead of 'channels:12354'. This will subscribe the application to all
	      resources of the 'channels' type.

	  ASTERISK-24870 #close

	  Change-Id: I4a943b4db24442cf28bc64b24bfd541249790ad6

2015-09-21 08:16 +0000 [ec514ad64d]  Elazar Broad <elazar@thebroadfamily.com>

	* core/logging: Fix logging to more than one syslog channel

	  Currently, Asterisk will log to the last configured syslog
	  channel in logger.conf. This is due to the fact that the
	  final call to openlog() supersedes all of the previous calls.
	  This commit removes the call to openlog() and passes the
	  facility to ast_log_vsyslog(), along with utilizing the
	  LOG_MAKEPRI macro to ensure that the message is routed to
	  the correct facility and with the correct priority.

	  ASTERISK-25407 #close
	  Reported by: Elazar Broad
	  Tested by: Elazar Broad

	  Change-Id: Ie2a2416bc00cce1b04e99ef40917c2011953ddd2

2015-09-21 18:06 +0000 [aeddee39fb]  Kevin Harwell <kharwell@digium.com>

	* app_record: RECORDED_FILE variable not being populated

	  The RECORDED_FILE variable is empty unless a '%d' is specified in the filename.
	  This patch makes it so the variable is always set to the filename.

	  ASTERISK-25410 #close

	  Change-Id: I4ec826d8eb582ae2ad184e717be8668b74d37653

2015-09-16 08:22 +0000 [2bd27d1222]  Joshua Colp <jcolp@digium.com>

	* pbx: Update device and presence state when changing a hint extension.

	  When changing a hint extension without removing the hint first the
	  device state and presence state is not updated. This causes the state
	  of the hint to be that of the previous extension and not the current
	  one. This state is kept until a state change occurs as a result of
	  something (presence state change, device state change).

	  This change updates the hint with the current device and presence
	  state of the new extension when it is changed. Any state callbacks
	  which may have been added before the hint extension is changed are
	  also informed of the new device and presence state if either have
	  changed.

	  ASTERISK-25394 #close

	  Change-Id: If268f1110290e502c73dd289c9e7e7b27bc8432f

2015-09-17 16:34 +0000 [c94f46080f]  Scott Griepentrog <scott@griepentrog.com>

	* CHAOS: avoid crash if string create fails

	  Validate string buffer allocation before using them.

	  ASTERISK-25323

	  Change-Id: Ib9c338bdc1e53fb8b81366f0b39482b83ef56ce0

2015-09-17 04:52 +0000 [b59c4d82b5]  Walter Doekes <walter+asterisk@wjd.nu>

	* chan_sip: Fix From header truncation for extremely long CALLERID(name).

	  The CALLERID(num) and CALLERID(name) and other info are placed into the
	  `char from[256]` in initreqprep. If the name was too long, the addr-spec
	  and params wouldn't fit.

	  Code is moved around so the addr-spec with params is placed there first,
	  and then fitting in as much of the display-name as possible.

	  ASTERISK-25396 #close

	  Change-Id: I33632baf024f01b6a00f8c7f35c91e5f68c40260

2015-09-17 16:59 +0000 [4cc59533b9]  Richard Mudgett <rmudgett@digium.com>

	* CHAOS: res_pjsip_diversion avoid crash if allocation fails

	  Validate ast_malloc buffer returned before using it in
	  set_redirecting_value().

	  ASTERISK-25323

	  Change-Id: I15d2ed7cb0546818264c0bf251aa40adeae83253

2015-09-17 16:47 +0000 [4fb95bbc4e]  Kevin Harwell <kharwell@digium.com>

	* app_queue: AgentComplete event has wrong reason

	  When a queued caller transfers an agent to another extension sometimes the
	  raised AgentComplete event has a reason of "caller" and sometimes "transfer".
	  Since a transfer has taken place this should always be transfer. This occurs
	  because sometimes the stasis hangup event arrives before the transfer event
	  thus writing a different reason out.

	  With this patch, when a hangup event is received during a transfer it will
	  check to see if the channel that is hanging up is part of a transfer. If so
	  it will return and let the subsequently received transfer event handler take
	  care of the cleanup.

	  ASTERISK-25399 #close

	  Change-Id: Ic63c49bd9a5ed463ea7a032fd2ea3d63bc81a50d

2015-09-17 13:09 +0000 [fb6b5c684b]  Scott Griepentrog <scott@griepentrog.com>

	* PJSIP: avoid crash when getting rtp peer

	  Although unlikely, if the tech private is returned as
	  a NULL, chan_pjsip_get_rtp_peer() would crash.

	  ASTERISK-25323

	  Change-Id: Ie231369bfa7da926fb2b9fdaac228261a3152e6a

2015-09-17 11:31 +0000 [6409e7b11a]  Kevin Harwell <kharwell@digium.com>

	* app_queue: Crash when transferring

	  During some transfer scenarios involving queues Asterisk would sometimes
	  crash when trying to obtain a channel snapshot (could happen on caller or
	  member channels). This occurred because the underlying channel had already
	  disappeared when trying to obtain the latest snapshot.

	  This patch adds a reference to both the member and caller channels that
	  extends to the lifetime of the queue'd call, thus making sure the channels
	  will always exist when retrieving the latest snapshots.

	  ASTERISK-25185 #close
	  Reported by: Etienne Lessard

	  Change-Id: Ic397fa68fb4ff35fbc378e745da9246a7b552128

2015-09-16 17:36 +0000 [fe5077b1f8]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Eliminate race during initial NOTIFY.

	  There is a slim chance of a race condition occurring where two threads
	  can both attempt to manipulate the same area.

	  Thread A can be handling an incoming initial SUBSCRIBE request. Thread A
	  lets the specific subscription handler know that the subscription has
	  been established.

	  At this point, Thread B may detect a state change on the subscribed
	  resource and queue up a notification task on Thread C, the subscription
	  serializer thread.

	  Now Thread A attempts to generate the initial NOTIFY request to send to
	  the subscriber at the same time that Thread C attempts to generate a
	  state change NOTIFY request to send to the subscriber.

	  The result is that Threads A and C can step on the same memory area,
	  resulting in a crash. The crash has been observed as happening when
	  attempting to allocate more space to hold the body for the NOTIFY.

	  The solution presented here is to queue the subscription establishment
	  and initial NOTIFY generation onto the subscription serializer thread
	  (Thread C in the above scenario). This way, there is no way that a state
	  change notification can occur before the initial NOTIFY is sent, and if
	  there is a quick succession of NOTIFYs, we can guarantee that the two
	  NOTIFY requests will be sent in succession.

	  Change-Id: I5a89a77b5f2717928c54d6efb9955e5f6f5cf815

2015-08-28 15:42 +0000 [b88c54fa4b]  Alexander Traud <pabstraud@compuserve.com>

	* translate: Fix transcoding while different in frame size.

	  When Asterisk translates between codecs, each with a different frame size (for
	  example between iLBC 30 and Speex-WB), too large frames were created by
	  ast_trans_frameout. Now, ast_trans_frameout is called with the correct frame
	  length, creating several frames when necessary. Affects all transcoding modules
	  which used ast_trans_frameout: GSM, iLBC, LPC10, and Speex.

	  ASTERISK-25353 #close

	  Change-Id: I2e229569d73191d66a4e43fef35432db24000212

2015-09-10 17:19 +0000 [5c713fdf18]  Mark Michelson <mmichelson@digium.com>

	* scheduler: Use queue for allocating sched IDs.

	  It has been observed that on long-running busy systems, a scheduler
	  context can eventually hit INT_MAX for its assigned IDs and end up
	  overflowing into a very low negative number. When this occurs, this can
	  result in odd behaviors, because a negative return is interpreted by
	  callers as being a failure. However, the item actually was successfully
	  scheduled. The result may be that a freed item remains in the scheduler,
	  resulting in a crash at some point in the future.

	  The scheduler can overflow because every time that an item is added to
	  the scheduler, a counter is bumped and that counter's current value is
	  assigned as the new item's ID.

	  This patch introduces a new method for assigning scheduler IDs. Instead
	  of assigning from a counter, a queue of available IDs is maintained.
	  When assigning a new ID, an ID is pulled from the queue. When a
	  scheduler item is released, its ID is pushed back onto the queue. This
	  way, IDs may be reused when they become available, and the growth of ID
	  numbers is directly related to concurrent activity within a scheduler
	  context rather than the uptime of the system.

	  Change-Id: I532708eef8f669d823457d7fefdad9a6078b99b2

2015-08-21 21:50 +0000 [865377fc38]  Rodrigo Ramírez Norambuena <a@rodrigoramirez.com>

	* chan_sip.c: Validation on module reload

	  Change validation on reload module because now used the cli function for
	  reload. The sip_reload() function never fail and ever return NULL for this
	  reason on reload() now use the call the sip_reload() and return
	  AST_MODULE_LOAD_SUCCESS.

	  This problem is dectected on reload by PUT method on ARI, getting always
	  404 http code when the module is reloaded.

	  ASTERISK-25325 #close
	  Reporte by: Rodrigo Ramírez Norambuena

	  Change-Id: I41215877fb2cfc589e0d4d464000cf6825f4d7fb

2015-08-21 17:39 +0000 [e75aff53e6]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Mark ast_sip_create_subscription() as not used.

	  Change-Id: I2b8db18eac36c01a5c7eb9467699124e203fd093

2015-09-09 12:24 +0000 [4d91d01df1]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Add some notification comments.

	  Change-Id: Ie62ff1f4b7adc1a12fa0303f53926af249b25e20

2015-08-21 18:01 +0000 [f36a9d1221]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Set dlg_status code instead of sending SIP response.

	  We should not try to send a SIP response message because we may be
	  restoring a persistent subscription where we are not responding to a SIP
	  request.

	  Change-Id: Id89167ef90320c5563f37e632db0dda6cb9e7dec

2015-08-21 17:40 +0000 [94582f8fab]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Fix off-nominal memory leak.

	  Fix off-nominal visited vector leak in build_resource_tree().

	  Change-Id: If0399c7941c9c0b1038bcfb7b9a371760977831c

2015-08-21 15:26 +0000 [8b3ed52239]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Fix one byte buffer overrun error.

	  ast_sip_pubsub_register_body_generator() did not account for the null
	  terminator set by sprintf() in the allocated output buffer.

	  Change-Id: I388688a132e479bca6ad1c19275eae0070969ae2

2015-08-21 15:25 +0000 [4329bd1e4c]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Use ast_alloca() instead of alloca().

	  Change-Id: Ia396096b4fedc2874649ca11137612c3f55e83e3

2015-08-21 11:04 +0000 [a456a20ecf]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_pubsub.c: Add missing error return in load_module().

	  Change-Id: I15debd0f717f16ee2f78e7f56151c3b3b97b72fc

2015-08-21 11:03 +0000 [f58f4c6e27]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip/location.c: Use the builtin ao2_callback() match function instead.

	  Change-Id: I364906d6d2bad3472929986704a0286b9a2cbe3f

2015-09-10 09:49 +0000 [9d1f176e29]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Copy default_from_user to avoid crash.

	  The default_from_user retrieval function was pulling the
	  default_from_user from the global configuration struct in an unsafe way.
	  If using a database as a backend configuration store, the global
	  configuration struct is short-lived, so grabbing a pointer from it
	  results in referencing freed memory.

	  The fix here is to copy the default_from_user value out of the global
	  configuration struct.

	  Thanks go to John Hardin for discovering this problem and proposing the
	  patch on which this fix is based.

	  ASTERISK-25390 #close
	  Reported by Mark Michelson

	  Change-Id: I6b96067a495c1259da768f4012d44e03e7c6148c

2015-09-10 08:39 +0000 [1dd0e220bf]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_nat: Ignore REGISTER requests when looking for a Record-Route

	  We will only rewrite the Contact header if there is no Record-Route header in
	  the received request. If a malfunctioning proxy places a Record-Route header
	  into a REGISTER request, we will decide that we shouldn't update the IP/port
	  in the Contact header, and we will end up storing a contact with an AoR that
	  contains the NAT'd IP address.

	  While it is nice to have the proxy *not* send a Record-Route in a REGISTER
	  request, it's also a good idea to not process the header in a non-dialog
	  message. This patch updates the code to explicitly ignore the Record-Route
	  header in REGISTER requests.

	  ASTERISK-25387 #close

	  Change-Id: I4bd3bcccc4003d460cc354d986b0dea2e433ef3f

2015-09-03 21:15 +0000 [4eedd9ef9d]  Matt Jordan <mjordan@digium.com>

	* main/config_options: Check for existance of internal object before derefing

	  Asterisk can load and register an object type while still having an invalid
	  sorcery mapping. This can cause an issue when a creation call is invoked.
	  For example, mis-configuring PJSIP's endpoint identifier by IP address mapping
	  in sorcery.conf will cause the sorcery mechanism to be invalidated; however, a
	  subsequent ARI invocation to create the object will cause a crash, as the
	  internal type may not be registered as sorcery expects.

	  Merely checking for a NULL pointer here solves the issue.

	  Change-Id: I54079fb94a1440992f4735a9a1bbf1abb1c601ac
2015-09-09 16:46 +0000 [71408df2b8]  Alexander Anikin <may213@yandex.ru>

	* chan_ooh323: Add ProgressIndicator IE with inband info available

	  Add ProgressIndicator IE with inband info present to Progress and
	  Alerting Q.931 message

	  ASTERISK-25227 #close
	  Reported by: Alexandr Dranchuk

	  Change-Id: I326ad13cb1db9a72b3fd902bafed3c28a3684203
2015-09-08 10:35 +0000 [f72f9ceefc]  Scott Griepentrog <scott@griepentrog.com>

	* pjsip: avoid possible crash req_caps allocation failure

	  Make certain that the pjsip session has not failed to
	  allocate the format capabilities structure, which can
	  otherwise cause a crash when referenced.

	  ASTERISK-25323

	  Change-Id: I602790ba12714741165e441cc64a3ecde4cb5750

2015-09-03 14:07 +0000 [fbf720db91]  Jonathan Rose <jrose@digium.com>

	* ParkAndAnnounce: Add variable inheritance

	  In Asterisk 11, the announcer channel would receive channel variables
	  from the channel being parked by means of normal channel inheritance.
	  This functionality was lost during the big res_parking project in
	  Asterisk 12. This patch restores that functionality.

	  ASTERISK-25369 #close
	  Review: https://gerrit.asterisk.org/#/c/1180/

	  Change-Id: Ie47e618330114ad2ea91e2edcef1cb6f341eed6e

2015-09-04 16:33 +0000 [695f26cbb7]  David M. Lee <dlee@respoke.io>

	* res_rtp_asterisk: Add more ICE debugging

	  In working through a recent ICE negotiation bug, I found the debug
	  logging in res_rtp_asterisk to be lacking. This patch adds a number of
	  debug and warning statements that were helpful.

	  Change-Id: I950c6d8f13a41f14b3d6334b4cafe7d4e997be80
2015-09-01 10:16 +0000 [4ed9c9a280]  Guido Falsi <madpilot@freebsd.org>

	* Core/General: Add #ifdef needed on FreeBSD.

	  pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED on FreeBSD
	  too.

	  ASTERISK-25310 #close
	  Reported by: Guido Falsi

	  Change-Id: Iae6befac9028b5b9795f86986a4a08a1ae6ab7c4

2015-09-08 07:21 +0000 [5469caa9dd]  Joshua Colp <jcolp@digium.com>

	* res_pjsip: Use hash for contact object identity instead of Contact URI.

	  In the wild it is possible for Contact URIs to be quite long as
	  parameters can exist on them. This can present a problem when storing
	  them in the AstDB as the URI is used as part of the object name and
	  there is a fixed length limit for the AstDB. This will cause
	  the contact to not get stored.

	  This change uses the MD5 hash of the Contact URI as part of the
	  object name instead. This has a fixed length which is guaranteed
	  to not exceed the AstDB length limit.

	  ASTERISK-25295 #close

	  Change-Id: Ie8252a75331ca00b41b9f308f42cc1fbdf701a02

2015-09-07 13:19 +0000 [480c443e26]  Alexander Anikin <may213@yandex.ru>

	* chan_ooh323: call ast_rtp_instance_stop on ooh323_destroy

	      Call ast_rtp_instance_stop on ooh323_destroy to free resources
	      allocated by rtp instance

	      ASTERISK-25299 #close
	      Report by: Alexandr Dranchuk

	  Change-Id: I455096bd7da016b871afe90af86067c2c7c9f33f

2015-09-07 11:15 +0000 [c3e6debdb9]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip: Purge contacts when an AoR is deleted

	  When an AoR is deleted by an external mechanism, such as through ARI, we
	  currently do not remove dynamic contacts that were created for that AoR as a
	  result of a received REGISTER request. As a result, re-creating the AoR will
	  cause the dynamic contact to be interpreted as a persistent contact, leading
	  to some rather strange state being created for the contacts/endpoints.

	  This patch adds a sorcery observer for the 'aor' object. When a delete is
	  issued on the underlying sorcery object, the observer is called, and all
	  contacts created and persisted in sorcery for that AoR are also removed. Note
	  that we don't want to perform this action when an AO2 object that is an AoR is
	  destroyed, as the AoR can still exist in the backing storage (and we would
	  thus be removing valid contacts from an AoR that still "exists".)

	  ASTERISK-25381 #close

	  Change-Id: I6697e51ef6b2858b5d63401f35dc378bb0f90328

2015-09-05 14:58 +0000 [78d0b9d97e]  Matt Jordan <mjordan@digium.com>

	* channels/pjsip/dialplan_functions: Add an option for extracting the SIP call-id

	  This patch adds a new option to the CHANNEL function that allows for the
	  extraction of the SIP call-id. It is used in conjunction with the 'pjsip'
	  option, and will return the Call-ID of the INVITE request that established
	  the PJSIP channel.

	  ASTERISK-25352

	  Change-Id: I278d1f8bcfe3a53c5aa1dadebc14e92b0abd476a

2015-09-04 16:06 +0000 [61c6c6aa6c]  David M. Lee <dlee@respoke.io>

	* Fix when remote candidates exceed PJ_ICE_MAX_CAND

	  We were passing the wrong count into pj_ice_sess_create_check_list(),
	  causing the create to fail if we ever received more than PJ_ICE_MAX_CAND
	  candidates.

	  Change-Id: I0303d8e1ecb20a8de9fe629a3209d216c4028378

2015-09-04 14:40 +0000 [ac62928d6b]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Change default from user value.

	  When Asterisk sends an outbound SIP request, if there is no direct
	  reason to place a specific value for the username in the From header,
	  Asterisk would generate a UUID. For example, this would happen when
	  sending outbound OPTIONS requests when qualifying or when sending
	  outbound INVITE requests when originating (if no explicit caller ID were
	  provided). The issue is that some SIP providers reject these sorts of
	  requests with a "Name too long" error response.

	  This patch aims to fix this by changing the default outbound username in
	  From headers to "asterisk". This value can be overridden by changing the
	  default_from_user option in the global options if desired.

	  ASTERISK-25377 #close
	  Reported by Mark Michelson

	  Change-Id: I6a4d34a56ff73ff4f661b0075aeba5461b7f3190

2015-09-04 09:26 +0000 [6002472a62]  Scott Griepentrog <scott@griepentrog.com>

	* endpoint snapshot: avoid second cleanup on alloc failure

	  In ast_endpoint_snapshot_create(), a failure to init the
	  string fields results in two attempts to ao2_cleanup the
	  same pointer.  Removed RAII_VAR to eliminate problem.

	  ASTERISK-25375 #close
	  Reported by: Scott Griepentrog

	  Change-Id: If4d9dfb1bbe3836b623642ec690b6d49b25e8979

2015-09-04 05:33 +0000 [d32e516c7c]  Martin Tomec <tomec.martin@gmail.com>

	* res/pjsip: Mark WSS transport as secure

	  Pjsip is refusing to use unsecure transport with "sips" in url.
	  WSS should be considered as secure transport.

	  ASTERISK-24602 #comment Partially fixed by setting WSS as secure

	  Change-Id: Iddac406c6deba6240c41a603b8859dfefe1a5353

2015-09-02 17:26 +0000 [ad9cb6c2ce]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Fix contact refleak on stateful responses.

	  When sending a stateful response, creation of the transaction can fail,
	  most commonly because we are trying to create a transaction from a
	  retransmitted request. When creation of the transaction fails, we end up
	  leaking a reference to a contact that was bumped when the response was
	  created.

	  This patch adds the missing deref and fixes the reference leak.

	  Change-Id: I2f97ad512aeb1b17e87ca29ae0abacb4d6395f07

2015-09-02 12:41 +0000 [cc1363209e]  Joshua Colp <jcolp@digium.com>

	* pbx: Fix crash when issuing "core show hints" with long pattern match.

	  When issuing the "core show hints" CLI command a combination of both
	  the hint extension and context is created. This uses a fixed size
	  buffer expecting that the extension will not exceed maximum extension
	  length. When the extension is actually a pattern match this constraint
	  does not hold true, and the extension may exceed the maximum extension
	  length. In this case extra characters are written past the end of the
	  fixed size buffer.

	  This change makes it so the construction of the combined hint extension
	  and context can not exceed the size of the buffer.

	  ASTERISK-25367 #close

	  Change-Id: Idfa1b95d0d4dc38e675be7c1de8900b3f981f499

2015-09-01 09:05 +0000 [d58c8d73af]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: re-re-fix persistent subscription storage.

	  A recent change to res_pjsip_pubsub switched to using pjsip_msg_print as
	  a means of writing an appropriate packet to persistent storage. While
	  this partially solved the issue, it had its own problems.
	  pjsip_msg_print will always add a Content-Length header to the message
	  it prints. Frequent restarts of Asterisk can result in persistent
	  subscriptions being written with five or more Content-Length headers. In
	  addition, sometimes some apparent corruption of individual headers could
	  be seen.

	  This aims to fix the problem by not running a parsed message through an
	  interpreter but rather by taking the raw message and saving it. The
	  logic for what to save is going to be different depending on whether a
	  SUBSCRIBE was received from the wire or if it was pulled from
	  persistence. When receiving a packet from the wire, when using a
	  streaming transport, the rdata->pkt_info.packet may contain multiple SIP
	  messages or fragments. However, the rdata->msg_info.msg_buf will always
	  contain the current SIP message to be processed. When pulling from
	  persistence, though, the rdata->msg_info.msg_buf will be NULL since no
	  transport actually handled the packet. However, since we know that we
	  will always ever pull one SIP message from persistence, we are free to
	  save directly from rdata->pkt_info.packet instead.

	  ASTERISK-25365 #close
	  Reported by Mark Michelson

	  Change-Id: I33153b10d0b4dc8e3801aaaee2f48173b867855b

2015-08-31 15:24 +0000 [03fe79f29e]  Mark Michelson <mmichelson@digium.com>

	* Fix deadlock on presence state changes.

	  A deadlock was observed where three threads were competing for different
	  locks:

	  * One thread held the hints lock and was attempting to lock a specific
	    hint.
	  * One thread was holding the specific hint's lock and was attempting to
	    lock the contexts lock
	  * One thread was holding the contexts lock and attempting to lock the
	    hints lock.

	  Clearly the second thread was doing the wrong thing here. The fix for
	  this is to make sure that the hint's lock is not held on presence state
	  changes. Something similar is already done (and commented about) for
	  device state changes.

	  ASTERISK-25362 #close
	  Reported by Mark Michelson

	  Change-Id: I15ec2416b92978a4c0c08273b2d46cb21aff97e2

2015-08-29 10:36 +0000 [a676ba2aad]  Joshua Colp <jcolp@digium.com>

	* taskprocessor: Fix race condition between unreferencing and finding.

	  When unreferencing a taskprocessor its reference count is checked
	  to determine if it should be unlinked from the taskprocessors
	  container and its listener shut down. In between the time when the
	  reference count is checked and unlinking it is possible for
	  another thread to jump in, find it, and get a reference to it. If
	  the thread then uses the taskprocessor it may find that it is not
	  in the state it expects.

	  This change locks the taskprocessors container during almost the
	  entire unreference operation to ensure that any other thread which
	  may attempt to find the taskprocessor has to wait.

	  ASTERISK-25295

	  Change-Id: Icb842db82fe1cf238da55df92e95938a4419377c

2015-08-28 20:22 +0000 [1b1561f4c8]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_sdp_rtp: Fix multiple keepalive scheduled items.

	  The keepalive support in res_pjsip_sdp_rtp currently assumes
	  that a stream will only be negotiated once. This is false.
	  If the stream is replaced and later added back it can be
	  negotiated again causing multiple keepalive scheduled items
	  to exist. This change explicitly deletes the existing
	  keepalive scheduled item before adding the new one.

	  The res_pjsip_sdp_rtp module also does not stop RTP
	  keepalives or timeout timer if the stream has been
	  replaced. This change adds a callback to the session media
	  interface to allow a media stream to be stopped without
	  the resources being destroyed. This allows the scheduled
	  items and RTP to be stopped when the stream no longer
	  exists.

	  ASTERISK-25356 #close

	  Change-Id: Ibe6a7cc0927c87326fd5f1c0d4ad889dbfbea1de

2015-08-28 19:57 +0000 [85e1cb51b2]  Joshua Colp <jcolp@digium.com>

	* sched: ast_sched_del may return prematurely due to spurious wakeup

	  When deleting a scheduled item if the item in question is currently
	  executing the ast_sched_del function waits until it has completed.
	  This is accomplished using ast_cond_wait. Unfortunately the
	  ast_cond_wait function can suffer from spurious wakeups so the
	  predicate needs to be checked after it returns to make sure it has
	  really woken up as a result of being signaled.

	  This change adds a loop around the ast_cond_wait to make sure that
	  it only exits when the executing task has really completed.

	  ASTERISK-25355 #close

	  Change-Id: I51198270eb0b637c956c61aa409f46283432be61

2015-08-27 12:26 +0000 [c2c7319082]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_session: Don't invoke session supplements twice for BYE requests.

	  When a BYE request is received the PJSIP invite session implementation
	  creates and sends a 200 OK response before we are aware of it. This
	  causes the INVITE session state callback to be called into and ultimately
	  the session supplements run on the BYE request. Once this response has
	  been sent the normal transaction state callback is invoked which
	  invokes the session supplements on the BYE request again. This can
	  be problematic in particular with res_pjsip_rfc3326 as it may
	  attempt to update the hangup cause code on the channel while it is
	  in the process of being hung up.

	  This change makes it so the session supplements are only invoked
	  once by the INVITE session state callback.

	  ASTERISK-25318 #close

	  Change-Id: I69c17df55ccbb61ef779ac38cc8c6b411376c19a

2015-08-26 15:26 +0000 [6862c2a167]  Scott Griepentrog <scott@griepentrog.com>

	* Chaos: handle failed allocation in get_media_encryption_type

	  If the ast_strndup() call fails to allocate a copy of the
	  transport string for parsing, fail gracefully.

	  ASTERISK-25323
	  Reported by: Scott Griepentrog

	  Change-Id: Ia4b905ce6d03da53fea526224455c1044b1a5a28

2015-08-26 14:25 +0000 [f1cd636658]  Scott Griepentrog <scott@griepentrog.com>

	* Chaos: make hangup NULL tolerant

	  In chan_pjsip_new, if allocation of the pvt
	  structure fails, ast_hangup is called.  But
	  it was written to assume pvt was valid, and
	  this change corrects that.

	  ASTERISK-25323
	  Reported by: Scott Griepentrog

	  Change-Id: I5f47860fe9cee4cd56abd3f79b108678ab72cc87

2015-08-26 05:40 +0000 [c01111223f]  Joshua Colp <jcolp@digium.com>

	* chan_sip: Allow call pickup to set the hangup cause.

	  The call pickup implementation in chan_sip currently sets the channel
	  hangup cause to "normal clearing" if call pickup is successfully
	  performed. This action overwrites the "answered elsewhere" hangup cause
	  set by the call pickup code and can result in the SIP device in
	  question showing a missed call when it should not.

	  This change sets the hangup cause to "normal clearing" as a
	  default initially but allows the call pickup to change it as
	  needed.

	  ASTERISK-25346 #close

	  Change-Id: I00ac2c269cee9e29586ee2c65e83c70e52a02cff

2015-08-25 07:17 +0000 [2a4eee0cd9]  Joshua Colp <jcolp@digium.com>

	* res_pjsip: Add common ast_sip_get_host_ip API.

	  Modules commonly used the pj_gethostip function for retrieving the
	  IP address of the host. This function does not cache the result and may
	  result in a DNS lookup occurring, or additional work. If the DNS
	  server is unreachable or network issues arise this can cause the
	  pj_gethostip function to block for a period of time.

	  This change adds an ast_sip_get_host_ip and ast_sip_get_host_ip_string
	  function which does the same thing but caches the host IP address at
	  module load time. This results in no additional work being done each
	  time the local host IP address is needed.

	  ASTERISK-25342 #close

	  Change-Id: I3205deb679b01fa5ac05a94b623bfd620a2abe1e

2015-08-24 11:04 +0000 [7c4d0c3506]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_pubsub: On recreated notify fail deleted sub_tree is referenced

	  When recreating a subscription it is possible for a freed sub_tree
	  to be referenced when the initial NOTIFY fails to be created.

	  Change-Id: I681c215309aad01b21d611c2de47b3b0a6022788

2015-08-24 06:21 +0000 [6c2dab1e88]  Joshua Colp <jcolp@digium.com>

	* bridge: Kick channel from bridge if hung up during action.

	  When executing an action in a bridge it is possible for the
	  channel to be hung up without the bridge becoming aware of it.
	  This is most easily reproducible by hanging up when the bridge
	  is streaming DTMF due to a feature timeout. This change makes
	  it so after action execution the channel is checked to determine
	  if it has been hung up and if it has it is kicked from the bridge.

	  ASTERISK-25341 #close

	  Change-Id: I6dd8b0c3f5888da1c57afed9e8a802ae0a053062

2015-08-23 18:26 +0000 [bc6fe07f5c]  Matt Jordan <mjordan@digium.com>

	* res_pjsip/pjsip_configuration: Disregard empty auth values

	  When an endpoint is backed by a non-static conf file backend (such as
	  the AstDB or Realtime), the 'auth' object may be returned as being an
	  empty string. Currently, res_pjsip will interpret that as being a valid
	  auth object, and will attempt to authenticate inbound requests. This
	  isn't desired; is an auth value is empty (which the name of an auth
	  object cannot be), we should instead interpret that as being an invalid
	  auth object and skip it.

	  ASTERISK-25339 #close

	  Change-Id: Ic32b0c6eb5575107d5164a8c40099e687cd722c7

2015-08-19 12:10 +0000 [0582776f7f]  Richard Mudgett <rmudgett@digium.com>

	* ari/ari_websockets.c: Fix ast_debug parameter type mismatch.

	  This is a type mismatch fix of the debugging commit
	  c63316eec10e1990a88bf4712238d6deb375bfa9 made to find out why
	  a testsuite test was failing only on one of the continuous
	  integration build agents.

	  Change-Id: Iba34f6e87cec331f6ac80e4daff6476ea6f00a75

2015-08-19 10:30 +0000 [504213f542]  Scott Griepentrog <scott@griepentrog.com>

	* contrib: script install_prereq should install sqlite3

	  Asterisk needs the sqlite 3 library, which is package
	  sqlite-devel in CentOS. By adding this package to the
	  script, a problem with configure failing is resolved.

	  ASTERISK-25331 #close
	  Reported by: Kevin Harwell

	  Change-Id: I90efaf6a01914fea03f21e5cdbd91c348f44b0ec

2015-08-18 16:06 +0000 [77518d5434]  Richard Mudgett <rmudgett@digium.com>

	* res_http_websocket.c: Fix some off nominal path cleanup.

	  * Remove extraneous unlock on off-nominal path.
	  * Add missing HTTP error reply.

	  Change-Id: I1f402bfe448fba8696b507477cab5f060ccd9b2b

2015-08-18 14:46 +0000 [c61547fee6]  Richard Mudgett <rmudgett@digium.com>

	* res_ari.c: Add missing off nominal unlock and remove a RAII_VAR().

	  Change-Id: I0c5e7b34057f26dadb39489c4dac3015c52f5dbf

2015-08-17 16:41 +0000 [bd867cd078]  Richard Mudgett <rmudgett@digium.com>

	* app_queue.c: Extract some functions for simpler code.

	  * Extract set_queue_member_pause() from set_member_paused() for simpler
	  and more consistent code.

	  * Extract set_queue_member_ringinuse() from
	  set_member_ringinuse_help_members() for simpler code.

	  Change-Id: Iecc1f4119c63347341d7ea6b65f5fc4963706306

2015-08-14 12:55 +0000 [e5f5b9f384]  Richard Mudgett <rmudgett@digium.com>

	* app_queue.c: Fix setting QUEUE_MEMBER 'paused' and 'ringinuse'.

	  Setting the 'paused' and 'ringinuse' options on a queue member using the
	  dialplan function QUEUE_MEMBER did not behave the same way as the
	  equivalent dialplan applications or AMI actions.

	  * Made queue_function_mem_write() call the set_member_paused() and
	  set_member_value() for the 'paused' and 'ringinuse' options respectively.
	  A beneficial side effect is that the queue name is now optional and sets
	  the value in all queues the interface is a member.

	  * Update QUEUE_MEMBER XML documentation.

	  * Fix error checking in QUEUE_MEMBER() write.

	  ASTERISK-25215 #close
	  Reported by: Lorne Gaetz

	  Change-Id: I3a016be8dc94d63a9cc155295ff9c9afa5f707cb

2015-08-17 13:34 +0000 [ded51e3d77]  Richard Mudgett <rmudgett@digium.com>

	* app_queue.c: Fix error checking in QUEUE_MEMBER() read.

	  Change-Id: I7294e13d27875851c2f4ef6818adba507509d224

2015-08-17 11:00 +0000 [ab373f2cef]  Scott Griepentrog <scott@griepentrog.com>

	* CHAOS: prevent sorcery object with null id

	  When allocating a sorcery object, fail if the
	  id value was not allocated.

	  ASTERISK-25323
	  Reported by: Scott Griepentrog

	  Change-Id: I152133fb7545a4efcf7a0080ada77332d038669e

2015-08-14 15:46 +0000 [b719f56c72]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_sdp_rtp: Restore removed NULL check.

	  When sending an RTP keepalive, we need to be sure we're not dealing with
	  a NULL RTP instance. There had been a NULL check, but the commit that
	  added the rtp_timeout and rtp_hold_timeout options removed the NULL
	  check.

	  Change-Id: I2d7dcd5022697cfc6bf3d9e19245419078e79b64

2015-08-13 12:30 +0000 [cea5dc7b8a]  Richard Mudgett <rmudgett@digium.com>

	* audiohook.c: Simplify variable usage in audiohook_read_frame_both().

	  Change-Id: I58bed58631a94295b267991c5b61a3a93c167f0c

2015-08-13 12:22 +0000 [b3a56bee83]  Richard Mudgett <rmudgett@digium.com>

	* audiohook.c: Fix MixMonitor crash when using the r() or t() options.

	  The built frame format in audiohook_read_frame_both() is now set to a
	  signed linear format before the rx and tx frames are duplicated instead of
	  only for the mixed audio frame duplication.

	  ASTERISK-25322 #close
	  Reported by Sean Pimental

	  Change-Id: I86f85b5c48c49e4e2d3b770797b9d484250a1538

2015-08-12 12:59 +0000 [25af2d71c8]  Kevin Harwell <kharwell@digium.com>

	* chan_sip.c: wrong peer searched in sip_report_security_event

	  In chan_sip, after handling an incoming invite a security event is raised
	  describing authorization (success, failure, etc...). However, it was doing
	  a lookup of the peer by extension. This is fine for register messages, but
	  in the case of an invite it may search and find the wrong peer, or a non
	  existent one (for instance, in the case of call pickup). Also, if the peers
	  are configured through realtime this may cause an unnecessary database lookup
	  when caching is enabled.

	  This patch makes it so that sip_report_security_event searches by IP address
	  when looking for a peer instead of by extension after an invite is processed.

	  ASTERISK-25320 #close

	  Change-Id: I9b3f11549efb475b6561c64f0e6da1a481d98bc4
2015-08-13 05:26 +0000 [e18c300550]  Joshua Colp <jcolp@digium.com>

	* res_http_websocket: When shutting down a session don't close closed socket

	  Due to the use of ast_websocket_close in session termination it is
	  possible for the underlying socket to already be closed when the
	  session is terminated. This occurs when the close frame is attempted
	  to be written out but fails.

	  Change-Id: I7572583529a42a7dc911ea77a974d8307d5c0c8b
2015-08-11 05:24 +0000 [b4e9416138]  Joshua Colp <jcolp@digium.com>

	* res_http_websocket: Forcefully terminate on write errors.

	  The res_http_websocket module will currently attempt to close
	  the WebSocket connection if fatal cases occur, such as when
	  attempting to write out data and being unable to. When the
	  fatal cases occur the code attempts to write a WebSocket close
	  frame out to have the remote side close the connection. If
	  writing this fails then the connection is not terminated.

	  This change forcefully terminates the connection if the
	  WebSocket is to be closed but is unable to send the close frame.

	  ASTERISK-25312 #close

	  Change-Id: I10973086671cc192a76424060d9ec8e688602845

2015-08-10 13:43 +0000 [256bc52b66]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi.c: Flush the DAHDI write buffer after starting DTMF.

	  Pressing DTMF digits on a phone to go out on a DAHDI channel can result in
	  the digit not being recognized or even heard by the peer.

	  Phone -> Asterisk -> DAHDI/channel

	  Turns out the DAHDI behavior with DTMF generation (and any other generated
	  tones) is exposed by the "buffers=" setting in chan_dahdi.conf.  When
	  Asterisk requests to start sending DTMF then DAHDI waits until its write
	  buffer is empty before generating any samples for the DTMF tones.  When
	  Asterisk subsequently requests DAHDI to stop sending DTMF then DAHDI
	  immediately stops generating the DTMF samples.  As a result, the more
	  samples there are in the DAHDI write buffer the shorter the time DTMF
	  actually gets sent on the wire.  If there are more samples in the write
	  buffer than the time DTMF is supposed to be sent then no DTMF gets sent on
	  the wire.  With the "buffers=12,half" setting and each buffer representing
	  20 ms of samples then the DAHDI write buffer is going to contain around
	  120 ms of samples.  For DTMF to be recognized by the peer the actual sent
	  DTMF duration needs to be a minimum of 40 ms.  Therefore, the intended
	  duration needs to be a minimum of 160 ms for the peer to receive the
	  minimum DTMF digit duration to recognize it.

	  A simple and effective solution to work around the DAHDI behavior is for
	  Asterisk to flush the DAHDI write buffer when sending DTMF so the full
	  duration of DTMF is actually sent on the wire.  When someone is going to
	  send DTMF they are not likely to be talking before sending the tones so
	  the flushed write samples are expected to just contain silence.

	  * Made dahdi_digit_begin() flush the DAHDI write buffer after requesting
	  to send a DTMF digit.

	  ASTERISK-25315 #close
	  Reported by John Hardin

	  Change-Id: Ib56262c708cb7858082156bfc70ebd0a220efa6a

2015-08-05 14:21 +0000 [800e0ea48d]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi.c: Lock private struct for ast_write().

	  There is a window of opportunity for DTMF to not go out if an audio frame
	  is in the process of being written to DAHDI while another thread starts
	  sending DTMF.  The thread sending the audio frame could be past the
	  currently dialing check before being preempted by another thread starting
	  a DTMF generation request.  When the thread sending the audio frame
	  resumes it will then cause DAHDI to stop the DTMF tone generation.  The
	  result is no DTMF goes out.

	  * Made dahdi_write() lock the private struct before writing to the DAHDI
	  file descriptor.

	  ASTERISK-25315
	  Reported by John Hardin

	  Change-Id: Ib4e0264cf63305ed5da701188447668e72ec9abb

2015-08-10 18:23 +0000 [c126afe18f]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip.c: Fix crash from corrupt saved SUBSCRIBE message.

	  If the saved SUBSCRIBE message is not parseable for whatever reason then
	  Asterisk could crash when libpjsip tries to parse the message and adds an
	  error message to the parse error list.

	  * Made ast_sip_create_rdata() initialize the parse error rdata list.  The
	  list is checked after parsing to see that it remains empty for the
	  function to return successful.

	  ASTERISK-25306
	  Reported by Mark Michelson

	  Change-Id: Ie0677f69f707503b1a37df18723bd59418085256

2015-08-10 07:40 +0000 [f68c995bc9]  Alexander Traud <pabstraud@compuserve.com>

	* chan_sip: Fix negotiation of iLBC 30.

	  iLBC 20 was advertised in a SIP/SDP negotiation. However, only iLBC 30 is
	  supported. Removes "a=fmtp:x mode=y" from SDP. Because of RFC 3952 section 5,
	  only iLBC 30 is negotiated now.

	  ASTERISK-25309 #close

	  Change-Id: I92d724600a183eec3114da0ac607b994b1a793da

2015-08-09 18:42 +0000 [8e194047ac]  Matt Jordan <mjordan@digium.com>

	* res/res_format_attr_silk: Expose format attributes to other modules

	  This patch adds the .get callback to the format attribute module, such
	  that the Asterisk core or other third party modules can query for the
	  negotiated format attributes.

	  Change-Id: Ia24f55cf9b661d651ce89b4f4b023d921380f19c

2015-08-09 17:56 +0000 [a0f451c35e]  Matt Jordan <mjordan@digium.com>

	* main/format: Add an API call for retrieving format attributes

	  Some codecs that may be a third party library to Asterisk need to have
	  knowledge of the format attributes that were negotiated. Unfortunately,
	  when the great format migration of Asterisk 13 occurred, that ability
	  was lost.

	  This patch adds an API call, ast_format_attribute_get, to the core
	  format API, along with updates to the unit test to check the new API
	  call. A new callback is also now available for format attribute modules,
	  such that they can provide the format attribute values they manage.

	  Note that the API returns a void *. This is done as the format attribute
	  modules themselves may store format attributes in any particular manner
	  they like. Care should be taken by consumers of the API to check the
	  return value before casting and dereferencing. Consumers will obviously
	  need to have a priori knowledge of the type of the format attribute as
	  well.

	  Change-Id: Ieec76883dfb46ecd7aff3dc81a52c81f4dc1b9e3

2015-08-07 22:11 +0000 [26f0559a94]  David M. Lee <dlee@respoke.io>

	* Replace htobe64 with htonll

	  We don't have a compatability function to fill in a missing htobe64; but
	  we already have one for the identical htonll.

	  Change-Id: Ic0a95db1c5b0041e14e6b127432fb533b97e4cac

2015-08-07 14:20 +0000 [df9ce36366]  Scott Emidy <jemidy@digium.com>

	* ARI: Retrieve existing log channels

	  An http request can be sent to get the existing Asterisk logs.

	  The command "curl -v -u user:pass -X GET 'http://localhost:8088
	  /ari/asterisk/logging'" can be run in the terminal to access the
	  newly implemented functionality.

	  * Retrieve all existing log channels

	  ASTERISK-25252

	  Change-Id: I7bb08b93e3b938c991f3f56cc5d188654768a808

2015-08-07 11:14 +0000 [e9f1bc08cb]  Scott Emidy <jemidy@digium.com>

	* ARI: Creating log channels

	  An http request can be sent to create a log channel
	  in Asterisk.

	  The command "curl -v -u user:pass -X POST
	  'http://localhost:088/ari/asterisk/logging/mylog?
	  configuration=notice,warning'" can be run in the terminal
	  to access the newly implemented functionality for ARI.

	  * Ability to create log channels using ARI

	  ASTERISK-25252

	  Change-Id: I9a20e5c75716dfbb6b62fd3474faf55be20bd782

2015-08-06 15:18 +0000 [78364132ce]  Scott Emidy <jemidy@digium.com>

	* ARI: Deleting log channels

	  An http request can be sent to delete a log channel
	  in Asterisk.

	  The command "curl -v -u user:pass -X DELETE 'http://localhost:8088
	  /ari/asterisk/logging/mylog'" can be run in the terminal
	  to access the newly implemented functionally for ARI.

	  * Able to delete log channels using ARI

	  ASTERISK-25252

	  Change-Id: Id6eeb54ebcc511595f0418d586ff55914bc3aae6

2015-08-06 12:48 +0000 [e25569ef95]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: More accurately persist packet.

	  The pjsip_rx_data structure has a pkt_info.packet field on it that is
	  the packet that was read from the transport. For datagram transports,
	  the packet read from the transport will correspond to the SIP message
	  that arrived. For streamed transports, however, it is possible to read
	  multiple SIP messages in one packet.

	  In a recent case, Asterisk crashed on a system where TCP was being used.
	  This is because at some point, a read from the TCP socket resulted in a
	  200 OK response as well as an incoming SUBSCRIBE request being stored in
	  rdata->pkt_info.packet. When the SUBSCRIBE was processed, the
	  combination 200 OK and SUBSCRIBE was saved in persistent storage. Later,
	  a restart of Asterisk resulted in the crash because the persistent
	  subscription recreation code ended up building the 200 OK response
	  instead of a SUBSCRIBE request, and we attempted to access
	  request-specific data.

	  The fix here is to use the pjsip_msg_print() function in order to
	  persist SUBSCRIBE requests. This way, rather than using the raw socket
	  data, we use the parsed SIP message that PJSIP has given us. If we
	  receive multiple SIP messages from a single read, we will be sure only
	  to save off the relevant SIP message. There also is a safeguard put in
	  place to make sure that if we do end up reconstructing a SIP response,
	  it will not cause a crash.

	  ASTERISK-25306 #close
	  Reported by Mark Michelson

	  Change-Id: I4bf16f7b76a2541d10b55de82bcd14c6e542afb2

2015-08-04 16:12 +0000 [8521a86367]  Joshua Colp <jcolp@digium.com>

	* res_pjsip: Ensure sanitized XML is NULL terminated.

	  The ast_sip_sanitize_xml function is used to sanitize
	  a string for placement into XML. This is done by examining
	  an input string and then appending values to an output
	  buffer. The function used by its implementation, strncat,
	  has specific behavior that was not taken into account.
	  If the size of the input string exceeded the available
	  output buffer size it was possible for the sanitization
	  function to write past the output buffer itself causing
	  a crash. The crash would either occur because it was
	  writing into memory it shouldn't be or because the resulting
	  string was not NULL terminated.

	  This change keeps count of how much remaining space is
	  available in the output buffer for text and only allows
	  strncat to use that amount.

	  Since this was exposed by the res_pjsip_pidf_digium_body_supplement
	  module attempting to send a large message the maximum allowed
	  message size has also been increased in it.

	  A unit test has also been added which confirms that the
	  ast_sip_sanitize_xml function is providing NULL terminated
	  output even when the input length exceeds the output
	  buffer size.

	  ASTERISK-25304 #close

	  Change-Id: I743dd9809d3e13d722df1b0509dfe34621398302

2015-08-05 05:23 +0000 [9a12804e59]  Joshua Colp <jcolp@digium.com>

	* res_rtp_asterisk: Don't leak temporary key when enabling PFS.

	  A change recently went in which enabled perfect forward secrecy for
	  DTLS in res_rtp_asterisk. This was accomplished two different ways
	  depending on the availability of a feature in OpenSSL. The fallback
	  method created a temporary instance of a key but did not free it.
	  This change fixes that.

	  ASTERISK-25265

	  Change-Id: Iadc031b67a91410bbefb17ffb4218d615d051396
2015-08-04 09:47 +0000 [27dc2094e9]  Mark Michelson <mmichelson@digium.com>

	* res_http_websocket: Debug write lengths.

	  Commit 39cc28f6ea2140ad6d561fd4c9e9a66f065cecee attempted to fix a
	  test failure observed on 32 bit test agents by ensuring that a cast from
	  a 32 bit unsigned integer to a 64 bit unsigned integer was happening in
	  a predictable place. As it turns out, this did not cause test runs to
	  succeed.

	  This commit adds several redundant debug messages that print the payload
	  lengths of websocket frames. The idea here is that this commit will not
	  cause tests to succeed for the faulty test agent, but we might deduce
	  where the fault lies more easily this way by observing at what point the
	  expected value (537) changes to some ungangly huge number.

	  If you are wondering why something like this is being committed to the
	  branch, keep in mind that in commit
	  39cc28f6ea2140ad6d561fd4c9e9a66f065cecee I noted that the observed test
	  failures only happen when automated tests are run. Attempts to run the
	  tests by hand manually on the test agent result in the tests passing.

	  Change-Id: I14a65c19d8af40dadcdbd52348de3b0016e1ae8d

2015-08-03 11:06 +0000 [39cc28f6ea]  Mark Michelson <mmichelson@digium.com>

	* res_http_websocket: Avoid passing strlen() to ast_websocket_write().

	  We have seen a rash of test failures on a 32-bit build agent. Commit
	  48698a5e21d7307f61b5fb2bd39fd593bc1423ca solved an obvious problem where
	  we were not encoding a 64-bit value correctly over the wire. This
	  commit, however, did not solve the test failures.

	  In the failing tests, ARI is attempting to send a 537 byte text frame
	  over a websocket. When sending a frame this small, 16 bits are all that
	  is required in order to encode the payload length on the websocket
	  frame. However, ast_websocket_write() thinks that the payload length is
	  greater than 65535 and therefore writes out a 64 bit payload length.
	  Inspecting this payload length, the lower 32 bits are exactly what we
	  would expect it to be, 537 in hex. The upper 32 bits, are junk values
	  that are not expected to be there.

	  In the failure, we are passing the result of strlen() to a function that
	  expects a uint64_t parameter to be passed in. strlen() returns a size_t,
	  which on this 32-bit machine is 32 bits wide. Normally, passing a 32-bit
	  unsigned value to somewhere where a 64-bit unsigned value is expected
	  would cause no problems. In fact, in manual runs of failing tests, this
	  works just fine. However, ast_websocket_write() uses the Asterisk
	  optional API, which means that rather than a simple function call, there
	  are a series of macros that are used for its declaration and
	  implementation. These macros may be causing some sort of error to occur
	  when converting from a 32 bit quantity to a 64 bit quantity.

	  This commit changes the logic by making existing ast_websocket_write()
	  calls use ast_websocket_write_string() instead. Within
	  ast_websocket_write_string(), the 64-bit converted strlen is saved in a
	  local variable, and that variable is passed to ast_websocket_write()
	  instead.

	  Note that this commit message is full of speculation rather than
	  certainty. This is because the observed test failures, while always
	  present in automated test runs, never occur when tests are manually
	  attempted on the same test agent. The idea behind this commit is to fix
	  a theoretical issue by performing changes that should, at the least,
	  cause no harm. If it turns out that this change does not fix the failing
	  tests, then this commit should be reverted.

	  Change-Id: I4458dd87d785ca322b89c152b223a540a3d23e67

2015-07-28 05:33 +0000 [aed068844c]  Mark Duncan <mark@syon.co.jp>

	* res/res_rtp_asterisk: Add ECDH support

	  This will add ECDH support to Asterisk. It will
	  detect auto ECDH support in OpenSSL
	  (1.0.2b and above) during ./configure. If this is
	  available, it will use it,
	  otherwise it will fall back to prime256v1 (this
	  behavior is consistent with
	  other projects such as Apache and nginx).

	  This fixes WebRTC being broken in Firefox 38+ due
	  to Firefox now only supporting
	  ciphers with perfect forward secrecy.

	  ASTERISK-25265 #close

	  Change-Id: I8c13b33a2a79c0bde2e69e4ba6afa5ab9351465b

2015-07-29 14:17 +0000 [1ae762634c]  Benjamin Ford <bford@digium.com>

	* ARI: Rotate log channels.

	  An http request can be sent to rotate a specified log channel.
	  If the channel does not exist, an error response will be
	  returned.

	  The command "curl -v -u user:pass -X PUT 'http://localhost:8088
	  /ari/asterisk/logging/logChannelName/rotate'" can be run in the
	  terminal to access this new functionality.

	  * Added the ability to rotate log files through ARI

	  ASTERISK-25252

	  Change-Id: Iaefa21cbbc1b29effb33004ee3d89c977e76ab01

2015-07-29 13:49 +0000 [aeeb170fc4]  Richard Mudgett <rmudgett@digium.com>

	* rtp_engine.c: Fix performance issue with several channel drivers that use RTP.

	  ast_rtp_codecs_get_payload() gets called once or twice for every received
	  RTP frame so it would be nice to not allocate an ao2 object to then have
	  it destroyed shortly thereafter.  The ao2 object gets allocated only if
	  the payload type is not set by the channel driver as a negotiated value.
	  The issue affects chan_skinny, chan_unistim, chan_rtp, and chan_ooh323.

	  * Made static_RTP_PT[] an array of ao2 objects that
	  ast_rtp_codecs_get_payload() can return instead of an array of structs
	  that must be copied into a created ao2 object.

	  ASTERISK-25296 #close
	  Reported by: Richard Mudgett

	  Change-Id: Icb6de5cd90bfae07d44403a1352963db9109dac0

2015-07-29 17:00 +0000 [84262749d2]  Richard Mudgett <rmudgett@digium.com>

	* res_rtp_asterisk.c: Fix off-nominal crash potential.

	  ASTERISK-25296
	  Reported by: Richard Mudgett

	  Change-Id: I08549fb7c3ab40a559f41a3940f3732a4059b55b

2015-07-29 13:48 +0000 [1519eb44a7]  Richard Mudgett <rmudgett@digium.com>

	* rtp_engine.c: Must protect mime_types_len with mime_types_lock.

	  Change-Id: I44220dd369cc151ebf5281d5119d84bb9e54d54e

2015-07-24 18:42 +0000 [a93b7a927c]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_sdp_rtp.c: Fix processing wrong SDP media list.

	  Change-Id: I7c076826c2d3c6ae8c923ca73b7a71980cca11f2

2015-07-24 18:38 +0000 [741fa0d26d]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_sdp_rtp.c: Fixup some whitespace.

	  Change-Id: Ib4eb7ef7dcaf93ddc26538f0a498aaf110d7a973

2015-07-27 19:10 +0000 [89b21fd9a3]  Richard Mudgett <rmudgett@digium.com>

	* rtp_engine.h: No sense allowing payload types larger than RFC allows.

	  * Tweaked add_static_payload() to not use magic numbers.

	  Change-Id: I1719ff0f6d3ce537a91572501eae5bcd912a420b

2015-07-23 14:04 +0000 [7427c7f13b]  Richard Mudgett <rmudgett@digium.com>

	* rtp_engine.c: Minor tweaks.

	  * Fix off nominial ref leak of new_type in
	  ast_rtp_codecs_payloads_set_m_type().

	  * No need to lock static_RTP_PT_lock in
	  ast_rtp_codecs_payloads_set_m_type() and
	  ast_rtp_codecs_payloads_set_rtpmap_type_rate() before the payload type
	  parameter sanity check.

	  * No need to create ast_rtp_payload_type ao2 objects with a lock since the
	  lock is not used.

	  Change-Id: I64dd1bb4dfabdc7e981e3f61448beac9bb7504d4

2015-07-23 12:41 +0000 [e20f435b60]  Richard Mudgett <rmudgett@digium.com>

	* rtp_engine.h: Misc comment fixes.

	  Change-Id: If98139264d5d97427b4685ecbdc54518f725bc43

2015-07-17 16:23 +0000 [bc5d7f9c37]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip.c: Tweak glue->update_peer() parameter nil value.

	  Change glue->update_peer() parameter from 0 to NULL to better indicate it
	  is a pointer.

	  Change-Id: I8ff2e5087f0e19f6998e3488a712a2470cc823bd

2015-07-30 17:05 +0000 [13eb491e35]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Fix crashes seen when call cancelled.

	  Two testsuite tests crashed in the same place as a result of an INVITE
	  being CANCELed.

	  tests/channels/pjsip/resolver/srv/failover/in_dialog/transport_unspecified
	  tests/channels/pjsip/resolver/srv/failover/in_dialog/transport_tcp

	  The session pointer is no longer in the inv->mod_data[session_module.id]
	  location because the INVITE transaction has reached the terminated state.

	  ASTERISK-25297 #close
	  Reported by: Richard Mudgett

	  Change-Id: Idb75fdca0321f5447d5dac737a632a5f03614427

2015-07-29 14:35 +0000 [48698a5e21]  Mark Michelson <mmichelson@digium.com>

	* res_http_websocket: Properly encode 64 bit payload

	  A test agent was continuously failing all ARI tests when run against
	  Asterisk 13. As it turns out, the reason for this is that on those test
	  runs, for some reason we decided to use the super extended 64 bit
	  payload length for websocket text frames instead of the extended 16 bit
	  payload length. For 64-bit payloads, the expected byte order over the
	  network is

	  7, 6, 5, 4, 3, 2, 1, 0

	  However, we were sending the payload as

	  3, 2, 1, 0, 7, 6, 5, 4

	  This meant that we were saying to expect an absolutely MASSIVE payload
	  to arrive. Since we did not follow through on this expected payload
	  size, the client would sit patiently waiting for the rest of the payload
	  to arrive until the test would time out.

	  With this change, we use the htobe64() function instead of htonl() so
	  that a 64-bit byte-swap is performed instead of a 32 bit byte-swap.

	  Change-Id: Ibcd8552392845fbcdd017a8c8c1043b7fe35964a

2015-07-29 12:23 +0000 [10ba72a927]  Mark Michelson <mmichelson@digium.com>

	* Add a test event for inband ringing.

	  This event is necessary for the bridge_wait_e_options test to be able to
	  confirm that ringing is being played on the local channel that runs the
	  BridgeWait() application with the e(r) option.

	  ASTERISK-25292 #close
	  Reported by Kevin Harwell

	  Change-Id: Ifd3d3d2bebc73344d4b5310d0d55c7675359d72e

2015-07-16 12:16 +0000 [8458b8d441]  Jonathan Rose <jrose@digium.com>

	* holding_bridge: ensure moh participants get frames

	  Currently, if a blank musiconhold.conf is used, musiconhold will fail
	  to start for a channel going into a holding bridge with an anticipation
	  of getting music on hold. That being the case, no frames will be written
	  to the channel and that can pose a problem for blind transfers in PJSIP
	  which may rely on frames being written to get past the REFER framehook.
	  This patch makes holding bridges start a silence generator if starting
	  music on hold fails and makes it so that if no music on hold functions
	  are installed that the ast_moh_start function will report a failure so
	  that consumers of that function will be able to respond appropriately.

	  ASTERISK-25271 #close

	  Change-Id: I06f066728604943cba0bb0b39fa7cf658a21cd99

2015-07-24 22:20 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.5.0-rc1 Released.

2015-07-24 17:15 +0000 [a4b527393b]  Matt Jordan <mjordan@digium.com>

	* Release summaries: Add summaries for 13.5.0-rc1

2015-07-24 17:11 +0000 [158b0b8ebf]  Matt Jordan <mjordan@digium.com>

	* .version: Update for 13.5.0-rc1

2015-07-24 17:11 +0000 [a0a7650e34]  Matt Jordan <mjordan@digium.com>

	* .lastclean: Update for 13.5.0-rc1

2015-07-24 17:11 +0000 [4d238af086]  Matt Jordan <mjordan@digium.com>

	* realtime: Add database scripts for 13.5.0-rc1

2015-07-24 12:56 +0000 [f78a4b52b8]  Matt Jordan <mjordan@digium.com>

	* Bump the ARI version to 1.8.0

	  Due to backwards compatible changes, the ARI version should be bumped to
	  1.8.0 prior to the release of 13.5.0. Note that a previous patch already
	  bumped the version of AMI for this release.

	  Change-Id: I419033bfbbc0d3533a29ccb32b2981f39e0883e7

2015-07-18 11:16 +0000 [2749721791]  Joshua Colp <jcolp@digium.com>

	* pjsip: Add rtp_timeout and rtp_timeout_hold endpoint options.

	  This change adds support for the 'rtp_timeout' and 'rtp_timeout_hold'
	  endpoint options. These allow the channel to be hung up if RTP
	  is not received from the remote endpoint for a specified number of
	  seconds.

	  ASTERISK-25259 #close

	  Change-Id: I3f39daaa7da2596b5022737b77799d16204175b9

2015-07-24 09:46 +0000 [b4e19e414a]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Add rtp_keepalive to sample config file.

	  Change-Id: I5f62d0c5684f8b2335f9f8ac2d79ee04fbdafb19

2015-07-23 13:11 +0000 [f635520527]  Mark Michelson <mmichelson@digium.com>

	* Local channels: Alternate solution to ringback problem.

	  Commit 54b25c80c8387aea9eb20f9f4f077486cbdf3e5d solved an issue where a
	  specific scenario involving local channels and a native local RTP bridge
	  could result in ringback still being heard on a calling channel even
	  after the call is bridged.

	  That commit caused many tests in the testsuite to fail with alarming
	  consequences, such as not sending DialBegin and DialEnd events, and
	  giving incorrect hangup causes during calls.

	  This commit reverts the previous commit and implements and alternate
	  solution. This new solution involves only passing AST_CONTROL_RINGING
	  frames across local channels if the local channel is in AST_STATE_RING.
	  Otherwise, the frame does not traverse the local channels. By doing
	  this, we can ensure that a playtones generator does not get started on
	  the calling channel but rather is started on the local channel on which
	  the ringing frame was initially indicated.

	  ASTERISK-25250 #close
	  Reported by Etienne Lessard

	  Change-Id: I3bc87a18a38eb2b68064f732d098edceb5c19f39

2015-07-22 12:24 +0000 [f509730cb9]  Joshua Colp <jcolp@digium.com>

	* audiohook: Use manipulated frame instead of dropping it.

	  Previous changes to sample rate support in audiohooks accidentally
	  removed code responsible for allowing the manipulate audiohooks
	  to work. Without this code the manipulated frame would be dropped
	  and not used. This change restores it.

	  ASTERISK-25253 #close

	  Change-Id: I3ff50664cd82faac8941f976fcdcb3918a50fe13

2015-07-22 09:46 +0000 [54b25c80c8]  Mark Michelson <mmichelson@digium.com>

	* Local channels: Do not block control -1 payloads.

	  Control frames with a -1 payload are used as a special signal to stop
	  playtones generators on channels. This indication is sent both by
	  app_dial as well as by ast_answer() when a call is answered in case any
	  tones were being generated on a calling channel.

	  This control frame type was made to stop traversing local channel pairs
	  as an optimization, because it was thought that it was unnecessary to
	  send these indications, and allowing such unnecessary control frames to
	  traverse the local channels would cause the local channels to optimize
	  away less quickly.

	  As it turns out, through some special magic dialplan code, it is
	  possible to have a tones being played on a non-local channel, and it is
	  important for the local channel to convey that the tones should be
	  stopped. The result of having tones continue to be played on the
	  non-local channel is that the tones play even once the channel has been
	  bridged. By not blocking the -1 control frame type, we can ensure that
	  this situation does not happen.

	  ASTERISK-25250 #close
	  Reported by Etienne Lessard

	  Change-Id: I0bcaac3d70b619afdbd0ca8a8dd708f33fd2f815

2015-07-22 05:16 +0000 [f1493f900e]  Joshua Colp <jcolp@digium.com>

	* audiohook: Read the correct number of samples based on audiohook format.

	  Due to changes in audiohooks to support different sample rates the
	  underlying storage of samples is in the format of the audiohook
	  itself and not of the format being requested. This means that if a
	  channel is using G722 the samples stored will be at 16kHz. If
	  something subsequently reads from the audiohook at a format which
	  is not the same sample rate as the audiohook the number of samples
	  needs to be adjusted.

	  Given the following example:
	  1. Channel writing into audiohook at 16kHz (as it is using G722).
	  2. Chanspy reading from audiohook at 8kHz.

	  The original code would read 160 samples from the audiohook for
	  each 20ms of audio. This is incorrect. Since the audio in the
	  audiohook is at 16kHz the actual number needing to be read is 320.
	  Failure to read this much would cause the audiohook to reset
	  itself constantly as the buffer became full.

	  This change adjusts the requested number of samples by determining
	  the duration of audio requested and then calculating how many
	  samples that would be in the audiohook format.

	  ASTERISK-25247 #close

	  Change-Id: Ia91ce516121882387a315fd8ee116b118b90653d

2015-07-20 12:39 +0000 [62c64c3bd1]  Rusty Newton <rnewton@digium.com>

	* Documentation: A couple of trivial fixes in sip.conf.sample and func_cdr.c

	   * In sip.conf.sample fix sentence where we said that WS or WSS are supported
	     transports for use in an outbound register definition. They are not
	     supported in that case.
	   * In func_cdr.c made it clear that the Disable option for CDR_PROP can be used
	     to enable CDR on a channel.

	  ASTERISK-24867 #close
	  Reported by: Rusty Newton

	  ASTERISK-24853 #close
	  Reported by: PSDK

	  Change-Id: I3d698bc6302b9d00a0a995b5c4ad9a42d69b48ca

2015-07-09 14:17 +0000 [d9094ddd73]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Add rtp_keepalive endpoint option.

	  This adds an "rtp_keepalive" option for PJSIP endpoints. Similar to the
	  chan_sip option, this specifies an interval, in seconds, at which we
	  will send RTP comfort noise frames. This can be useful for keeping RTP
	  sessions alive as well as keeping NAT associations alive during lulls.

	  ASTERISK-25242 #close
	  Reported by Mark Michelson

	  Change-Id: I06660ba672c0a343814af4cec838e6025cafd54b

2015-07-16 09:13 +0000 [a23adcca3d]  Michael Cargile <mikec@vicidial.com>

	* res/res_musiconhold: Add a warning when MOH does not exist

	  Change-Id: Ifdfbd0b97cf31478d29923ec30aabce28d01740b

2015-07-19 09:11 +0000 [03064daeb2]  Matt Jordan <mjordan@digium.com>

	* res/res_sorcery_config: Prevent crash from misconfigured sorcery.conf

	  Misconfiguring sorcery.conf with a 'config' wizard with no extra data
	  will currently crash Asterisk on startup, as the wizard requires a comma
	  delineated list to parse. This patch updates res_sorcery_config to check
	  for the presence of the data before it starts manipulating it.

	  Change-Id: I4c97512e8258bc82abe190627a9206c28f5d3847

2015-07-16 09:46 +0000 [2c626ceb64]  Joshua Colp <jcolp@digium.com>

	* chan_pjsip: Don't change formats when frame of unsupported format is received.

	  Receipt of an RTP packet currently causes the formats on an PJSIP channel to
	  change to the format of the RTP packet. In some off-nominal cases it's possible
	  for this to be a format that has not been configured or negotiated. This change
	  makes it so only formats explicitly configured on the endpoint are allowed.

	  ASTERISK-25258 #close

	  Change-Id: If93d641fb6418a285928839300d7854cab8c1020

2015-07-17 04:59 +0000 [abb14ac5b8]  Patric Marschall <patric.marschall@1und1.de>

	* sig_pri.h: force_restart_unavailable_chans in wrong scope

	  In channels/sig_pri.h, struct sig_pri_span, the field
	  force_restart_unavailable_chans is only defined if

	  #if defined(HAVE_PRI_MCID) is true.

	  All other occurences of force_restart_unavailable_chans are outside of the

	  #if defined(HAVE_PRI_MCID)
	  endif

	  scope.

	  ASTERISK-25257 #close
	  Reported by: Patric Marschall

	  Change-Id: I071de89cc2cd0d85927a013036e235851f672549
2015-07-14 16:55 +0000 [875aee4c09]  Richard Mudgett <rmudgett@digium.com>

	* pbx.c: Post AMI VarSet event if delete a non-empty dialplan variable.

	  ASTERISK-25256 #close
	  Reported by: Richard Mudgett

	  Change-Id: I0b6be720b66fa956f6a798cd22ef8934eb0c0ff3

2015-07-08 16:39 +0000 [8bcf6d2801]  Matt Jordan <mjordan@digium.com>

	* ARI: Add support for push configuration of dynamic object

	  This patch adds support for push configuration of dynamic, i.e.,
	  sorcery, objects in Asterisk. It adds three new REST API calls to the
	  'asterisk' resource:
	   * GET /asterisk/{configClass}/{objectType}/{id}: retrieve the current
	     object given its ID. This returns back a list of ConfigTuples, which
	     define the fields and their present values that make up the object.
	   * PUT /asterisk/{configClass}/{objectType}/{id}: create or update an
	     object. A body may be passed with the request that contains fields to
	     populate in the object. The same format as what is retrieved using
	     the GET operation is used for the body, save that we specify that the
	     list of fields to update are contained in the "fields" attribute.
	   * DELETE /asterisk/{configClass}/{objectType}/{id}: remove a dynamic
	     object from its backing storage.

	  Note that the success/failure of these operations is somewhat
	  configuration dependent, i.e., you must be using a sorcery wizard that
	  supports the operation in question. If a sorcery wizard does not support
	  the create or delete mechanisms, then the REST API call will fail with a
	  403 forbidden.

	  ASTERISK-25238 #close

	  Change-Id: I28cd5c7bf6f67f8e9e437ff097f8fd171d30ff5c

2015-07-15 15:40 +0000 [e31cb6b248]  Richard Mudgett <rmudgett@digium.com>

	* strings.h: Fix issues with escape string functions.

	  Fixes for issues with the ASTERISK-24934 patch.

	  * Fixed ast_escape_alloc() and ast_escape_c_alloc() if the s parameter is
	  an empty string.  If it were an empty string the functions returned NULL
	  as if there were a memory allocation failure.  This failure caused the AMI
	  VarSet event to not get posted if the new value was an empty string.

	  * Fixed dest buffer overwrite potential in ast_escape() and
	  ast_escape_c().  If the dest buffer size is smaller than the space needed
	  by the escaped s parameter string then the dest buffer would be written
	  beyond the end by the nul string terminator.  The num parameter was really
	  the dest buffer size parameter so I renamed it to size.

	  * Made nul terminate the dest buffer if the source string parameter s was
	  an empty string in ast_escape() and ast_escape_c().

	  * Updated ast_escape() and ast_escape_c() doxygen function description
	  comments to reflect reality.

	  * Added some more unit test cases to /main/strings/escape to cover the
	  empty source string issues.

	  ASTERISK-25255 #close
	  Reported by: Richard Mudgett

	  Change-Id: Id77fc704600ebcce81615c1200296f74de254104

2015-07-14 14:29 +0000 [243c0d1609]  Richard Mudgett <rmudgett@digium.com>

	* parking_applications.c: Fix ast_verb() line terminator.

	  Change-Id: I8797238c71563e243c48c6145b4f1ae58f91f775

2015-07-14 14:36 +0000 [c782320c68]  Richard Mudgett <rmudgett@digium.com>

	* res_parking: Fix crash if ATTENDEDTRANSFER set empty before Park.

	  setup_park_common_datastore() was assuming that a non-NULL string returned
	  for the ATTENDEDTRANSFER and BLINDTRANSFER channel variables are not empty
	  strings.  Things got crashy as a result.

	  * Made setup_park_common_datastore() treat the channel variable values the
	  same whether they are NULL or empty for ATTENDEDTRANSFER and
	  BLINDTRANSFER.

	  ASTERISK-25254 #close
	  Reported by: Richard Mudgett

	  Change-Id: I9a9c174b33f354f35f82cc6b7cea8303adbaf9c2

2015-07-10 18:01 +0000 [2735dd5b2d]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Extract sip_session_defer_termination_stop_timer().

	  Change-Id: I9e115dee74bd72e06081d0ee73ecdeb886caa5fb

2015-07-10 10:42 +0000 [3d0ca343ca]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Add some helpful comments and minor tweaks.

	  Change-Id: I742aeeaf5f760593f323a00fb691affe22e35743

2015-07-10 10:43 +0000 [8d08bb179c]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Fix off nominal crash potential in debug message.

	  Change-Id: I09928297927ee85f7655289acee3a586816466bc

2015-07-15 10:31 +0000 [0a1a550593]  Matt Jordan <mjordan@digium.com>

	* apps/app_dictate: Fix typo in attribution

	  Last time I checked, it's "Sangoma", not "Samgoma". Thanks to Brian
	  (GameGamer43) for pointing that out.

	  Change-Id: I43d7b196f6d7a2b2517b84915e3a8dfbc2894106

2015-07-15 10:28 +0000 [3384e64ef6]  Benjamin Ford <bford@digium.com>

	* ARI: Fixed unload mode for unload module.

	  Changed the unload mode to AST_FORCE_SOFT from AST_FORCE_FIRM,
	  which would unload a module even if it was in use.

	  * Changed unload mode to proper mode

	  ASTERISK-25173

	  Change-Id: If2402487b5bce05d9770f25f65f5c8e292ad5533

2015-07-08 16:38 +0000 [0b6ff77afb]  Matt Jordan <mjordan@digium.com>

	* res/res_sorcery_astdb: Add a debugging message for when retrieval by ID fails

	  Having a debug message tell us that we attempted to look up an item but
	  failed is nice in circumstances when it isn't clear if the wizard was
	  queried correctly or not.

	  Change-Id: I2600c3bbea87f252196358f62e73f4c7da8632f7

2015-07-08 16:37 +0000 [2f0d6d346c]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_outbound_registration: Fix WARNING message

	  Newlines are nice.

	  Change-Id: Icf0d915db02882e47cd9077ed9009f5d44140d42

2015-07-08 16:35 +0000 [cd2213f1ae]  Matt Jordan <mjordan@digium.com>

	* res_pjsip/configuration: Fix a variety of default value problems

	  This patch fixes some bad default value handling in the following
	  settings:

	  * The 'message_context' and 'accountcode' settings are not mandatory. As
	    such, we can allow their stringfield values to be empty.
	  * The 'media_encryption' setting applies a default value of 'none' to
	    the setting, which it then can't parse or understand. Since the value
	    is documented to be 'no', this will now apply that as the default
	    value.

	  Change-Id: Ib9be7f97a7a5b9bc7aee868edf5acf38774cff83

2015-07-08 16:32 +0000 [2e4bdbd78a]  Matt Jordan <mjordan@digium.com>

	* main/sorcery: Provide log messages when a wizard does not support an operation

	  If a sorcery wizard does not support one of the 'optional' CRUD
	  operations (namely the CUD), log a WARNING message so we are aware of
	  why the operation failed. This also removes an assert in this case, as
	  the CUD operation may have been triggered by an external system, in
	  which case it is not a programming error but a configuration error.

	  Change-Id: Ifecd9df946d9deaa86235257b49c6e5e24423b53

2015-07-10 18:17 +0000 [653f2087e0]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session.c: Fix crash on call disconnect.

	  The crash fix for ASTERISK-25183 backported some code from master to try
	  to make sure that a BYE response is processed by the same serializer used
	  by the BYE request.  The identified race condition causing that backport
	  was the BYE request code had not finished processing after sending the BYE
	  before the BYE response came in for processing under a different thread.
	  Unfortunately, there is still a race condition.  Now the race condition is
	  between destroying the call session's serializer in
	  ast_taskprocessor_unreference() and using ast_taskprocessor_get() to get a
	  reference to the serializer for a BYE response.  Even worse, the new race
	  condition is a design limitation of the taskprocessor implementation that
	  didn't matter in versions before v12.  Back then, taskprocessors were only
	  destroyed when a module unloaded.  Now res_pjsip can destroy them when a
	  call ends.

	  However, as noted on the ASTERISK-25183 commit,
	  session_inv_on_state_changed() is disassociating the dialog from the
	  session when the invite dialog state becomes PJSIP_INV_STATE_DISCONNECTED.
	  This is a tad too soon because our BYE request transaction has not
	  completed yet.

	  * Split session_end() that is called by session_inv_on_state_changed() to
	  hold off session destruction until the BYE transaction timeout occurs or a
	  failed initial INVITE transaction timeout occurs in
	  session_inv_on_tsx_state_changed().

	  ASTERISK-25201 #close
	  Reported by: Matt Jordan

	  Change-Id: Iaf8dc8485fd8392a2a3ee4ad3b7f7f04a0dcc961

2015-07-14 13:12 +0000 [1aafadf814]  Benjamin Ford <bford@digium.com>

	* ARI: Added new functionality to reload a single module.

	  An http request can be sent to reload an Asterisk module. If the
	  module can not be reloaded or is not already loaded, an error
	  response will be returned.

	  The command "curl -v -u user:pass -X PUT 'http://localhost:8088
	  /ari/asterisk/modules/{moduleName}'" (or something similar, based
	  on configuration) can be run in the terminal to access this new
	  functionality.

	  For more information, see:
	  https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource

	  * Added new ARI functionality
	  * Asterisk modules can be reloaded through http requests

	  ASTERISK-25173

	  Change-Id: I289188bcae182b2083bdbd9ebfffd50b62f58ae1

2015-07-14 08:55 +0000 [9dcae23cfc]  Benjamin Ford <bford@digium.com>

	* ARI: Added new functionality to unload a single module.

	  An http request can be sent to unload an Asterisk module. If the
	  module can not be unloaded or is already unloaded, an error response
	  will be returned.

	  The command "curl -v -u user:pass -X DELETE 'http://localhost:8088
	  /ari/asterisk/modules/{moduleName}'" (or something similar, depending
	  on configuration) can be run in the terminal to access this new
	  functionality.

	  For more information, see:
	  https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource

	  * Added new ARI functionality
	  * Asterisk modules can be unloaded through http requests

	  ASTERISK-25173

	  Change-Id: I535a95f5676deb02651522761ecbdc0b00b5ac57

2015-07-13 16:00 +0000 [c219a98d2b]  Benjamin Ford <bford@digium.com>

	* ARI: Added new functionality to load a single module.

	  An http request can be sent to load an Asterisk module. If the
	  module can not be loaded or is loaded already, an error response
	  will be returned.

	  The command curl -v -u user:pass -X POST 'http://localhost:8088/ari
	  /asterisk/modules/{moduleName}'" (or something similar, depending on
	  configuration) can be run in the terminal to access this new
	  functionality.

	  For more information, see:
	  https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource

	  * Added new ARI functionality
	  * Asterisk modules can be loaded through http requests

	  ASTERISK-25173

	  Change-Id: I9e05d5b8c5c666ecfef341504f9edc1aa84fda33

2015-07-13 10:54 +0000 [73e35d20de]  Benjamin Ford <bford@digium.com>

	* ARI: Added new functionality to get information on a single module.

	  An http request can be sent to retrieve information on a single
	  module, including the resource name, description, use count, status,
	  and support level.

	  The command "curl -v -u user:pass -X GET 'http://localhost:8088/ari
	  /asterisk/modules/{moduleName}'" (or something similar, depending on
	  configuration) can be run in the terminal to access this new
	  functionality.

	  For more information, see:
	  https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource

	  * Added new ARI functionality
	  * Information on a single module can now be retrieved

	  ASTERISK-25173

	  Change-Id: Ibce5a94e70ecdf4e90329cf0ba66c33a62d37463

2015-07-08 14:56 +0000 [97ee0ee6c6]  Kevin Harwell <kharwell@digium.com>

	* bridge.c: Fixed race condition during attended transfer

	  During an attended transfer a thread is started that handles imparting the
	  bridge channel. From the start of the thread to when the bridge channel is
	  ready exists a gap that can potentially cause problems (for instance, the
	  channel being swapped is hung up before the replacement channel enters the
	  bridge thus stopping the transfer). This patch adds a condition that waits
	  for the impart thread to get to a point of acceptable readiness before
	  allowing the initiating thread to continue.

	  ASTERISK-24782
	  Reported by: John Bigelow

	  Change-Id: I08fe33a2560da924e676df55b181e46fca604577

2015-07-08 16:28 +0000 [bb76b88baf]  Matt Jordan <mjordan@digium.com>

	* main/sorcery: Don't fail object set creation from JSON if field fails

	  Some individual fields may fail their conversion due to their default
	  values being invalid for their custom handlers. In particular,
	  configuration values that depend on others being enabled (and thus have
	  an empty default value) are notorious for tripping this routine up. An
	  example of this are any of the DTLS options for endpoints. Any of the
	  DTLS options will fail to be applied (as DTLS is not enabled), causing
	  the entire object set to be aborted.

	  This patch makes it so that we log a debug message when skipping a
	  field, and rumble on anyway.

	  ASTERISK-25238

	  Change-Id: I0bea13de79f66bf9f9ae6ece0e94a2dc1c026a76

2015-07-08 16:21 +0000 [5f13c2226a]  Matt Jordan <mjordan@digium.com>

	* main/format_cap: Parse capabilities generated by ast_format_cap_get_names

	  We have a strange relationship between the parsing of format
	  capabilities from a string and their representation as a string. We
	  expect the format capabilities to be expressed as a string in the
	  following format:

	  allow = !all,ulaw,alaw
	  disallow = g722

	  While we would generate the string representation of those formats as:

	  allow = (ulaw|alaw)
	  disallow = (ulaw|alaw|g729...)

	  When the configuration framework needs to store values as a string, it
	  generates the format capabilities using the second representation; this
	  representation however cannot be parsed when the entry is rehydrated.
	  This patch fixes that by updating
	  ast_format_cap_update_by_allow_disallow to parse an entry as if it were
	  in the generated format if it has a leading '(' and a trailing ')'.

	  ASTERISK-25238

	  Change-Id: I904d43caf4cf45af06f6aee0c9e58556eb91d6ca

2015-06-27 17:53 +0000 [2325b106fd]  Matt Jordan <mjordan@digium.com>

	* tests/test_devicestate: Add additional tests for the device state API

	  This patch adds more tests that exercise the device state API. This includes:

	  * Tests that cover adding a device state provider, as well as deleting a
	    device state provider. This also verifies that you cannot add an
	    already added device state provider, and cannot delete an already
	    deleted device state provider.
	  * A test that covers changing device state and receiving said updates
	    from a device state subscriber. This also covers hitting both the
	    device state cache as well as a custom device state provider.
	  * A test that covers converting device state to channel state and device
	    state values to a string representation and back.
	  * A test that covers obtaining device state from an active channel and a
	    channel driver that provides its own device state.

	  Change-Id: I2adca67ffb405cd8625a5d6df1e3f9b3d945c08d

2015-06-27 17:51 +0000 [328f0be806]  Matt Jordan <mjordan@digium.com>

	* main/devicestate: Prevent duplicate registration of device state providers

	  Currently, the device state provider API will allow you to register a
	  device state provider with the same case insensitive name more than
	  once. This could cause strange issues, as the duplicate device state
	  providers will not be queried when a device's state has to be polled.
	  This patch updates the API such that a device state provider with the
	  same name as one that has already registered will be rejected.

	  Change-Id: I4a418a12280b7b6e4960bd44f302e27cd036ceb2

2015-07-10 22:25 +0000 [bee41eec62]  Matt Jordan <mjordan@digium.com>

	* res/res_sorcery_memory_cache: Fix test registration issues

	  Again, tests now need to not end with a newline. This patch makes it so
	  the tests can register again, unit tests will actually pass, and we can
	  stop wasting time trying to figure out why builds are failing when they
	  really aren't failing.

	  Change-Id: Ide519fbeba89f413c733446c5ff7b224fc4ce840

2015-07-10 21:42 +0000 [4d738e9026]  Matt Jordan <mjordan@digium.com>

	* tests/test_sorcery_memory_cache_thrash: Fix test loading problems

	  Because unit tests now want descriptions to not end with a newline, the
	  sorcery memory cache thrash tests failed to register. This patch
	  corrects their descriptions.

	  Change-Id: Id004b1becfdeed8ee3c846f49beab76a5c0f68b6

2015-06-26 10:57 +0000 [47ea312b24]  Benjamin Ford <bford@digium.com>

	* ARI: Added new functionality to get all module information.

	  An http request can be sent to retrieve a list of all existing modules,
	  including the resource name, description, use count, status, and
	  support level.

	  The command "curl -v -u user:pass -X GET 'http://localhost:8088/ari/
	  asterisk/modules" (or something similar, depending on configuration)
	  can be run in the terminal to access this new functionality.

	  For more information, see:
	  https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource

	  * Added new ARI functionality
	  * Information on modules can now be retrieved

	  Change-Id: I63cbbf0ec0c3544cc45ed2a588dceabe91c5e0b0

2015-07-09 09:18 +0000 [d558b00c85]  Joshua Colp <jcolp@digium.com>

	* bridge_native_rtp.c: Don't start native RTP bridging after attended transfer.

	  The bridge_native_rtp module adds a frame hook to channels which are in
	  a native RTP bridge. This frame hook is used to intercept when a hold
	  or unhold frame traverses the bridge so native RTP can be stopped or
	  started as appropriate. This is expected but exposes a specific bug
	  when attended transfers are involved.

	  Upon completion of an attended transfer an unhold frame is queued up
	  to take one of the channels involved off hold. After this is done
	  the channel is moved between bridges.

	  When the frame hook is involved in this case for the unhold it
	  releases the channel lock and acquires the bridge lock. This
	  allows the bridge core to step in and move the channel
	  (potentially changing the bridging techology) from another thread.
	  Once completed the bridge lock is released by the bridge core.
	  The frame hook is then able to acquire the bridge lock and
	  wrongfully starts native RTP again, despite the channel no longer
	  being in the bridge or needing to start native RTP. In fact at
	  this point the frame hook is no longer attached to the channel.

	  This change makes it so the native RTP bridge data is available to
	  the frame hook when it is invoked. Whether the frame hook has
	  been detached or not is stored on the native RTP bridge data and
	  is checked by the frame hook before starting or stopping native
	  RTP bridging. If the frame hook has been detached it does nothing.

	  ASTERISK-25240 #close

	  Change-Id: I13a73186a05f4e5a764f81e5cd0ccec1ed1891d2

2015-05-16 17:02 +0000 [b74b071369]  Joshua Colp <jcolp@digium.com>

	* res_sorcery_memory_cache: Backport to 13

	  Gerrit is complaining of conflicts when trying to create a patch series
	  of all of the cherry-picked master commits, so I have instead squashed
	  it all into one commit.

	  ASTERISK-25067 #close
	  Reported by: Matt Jordan

	  Change-Id: I6dda90343fae24a75dc5beec84980024e8d61eb9

2015-07-08 04:21 +0000 [7ff1ac8797]  Joshua Colp <jcolp@digium.com>

	* res_rtp_asterisk: Ensure DTLS timeout timer is -1 if DTLS is not used.

	  This change fixes a bug where the DTLS timeout timer would be
	  initialized to 0 if DTLS was not used for an RTP session.

	  ASTERISK-25103

	  Change-Id: If8d26bb054f1d300838850da5b8db9044c2fe2ac

2015-07-01 07:55 +0000 [05e8e14982]  Joshua Colp <jcolp@digium.com>

	* res_rtp_asterisk: Prevent simultaneous access to DTLS SSL context.

	  This change moves logic for setting up the DTLS SSL contexts to
	  when the SDP is done being processed instead of when ICE negotiation
	  completes. It also stops handshakes from being initiated when we
	  are acting as a server.

	  Manipulating the SSL context when ICE negotiation has completed
	  is problematic as the SSL context is not protected and if acting
	  as a client the remote side may have started DTLS negotiation
	  already.

	  The retransmission timeout timer code has also been split up
	  and simplified some. Both RTP and RTCP now have their own timers
	  and the points at which the timer is stopped and started is now
	  more specific. When a packet is sent the timer is started. When
	  a response is received but before it is processed the timer is
	  stopped. This provides a guarantee that the timeout is not
	  occurring while the response is processed.

	  ASTERISK-22805 #close
	  ASTERISK-24550 #close
	  ASTERISK-24651 #close
	  ASTERISK-24832 #close
	  ASTERISK-25103 #close
	  ASTERISK-25127 #close

	  Change-Id: Ib75ea2546f29d6efc3d2d37c58df6986c7bd9b91

2015-06-26 16:10 +0000 [38bace4fbb]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_t38.c: Fix always false if test.

	  Calling t38_change_state() sets the t38 state so it makes little sense to
	  then check the state right after the call for something else.

	  * Made the code in t38_interpret_parameters() reject or exit T.38 mode as
	  intended but not implemented.

	  Change-Id: Ib281263a6ed44da9448132c4e6df1e183b8a3df2

2015-06-30 11:17 +0000 [2f7688c788]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_mwi.c: Use safer loop coding in mwi_subscription_mailboxes_str().

	  Change-Id: I6f39d809a6d1b47b35bb32b298f5a12f35d6f907

2015-06-30 11:14 +0000 [74be3a50d7]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_mwi.c: Eliminate a simple RAII_VAR.

	  Change-Id: Ib1843f81e826a6c760c424c88eb70c350d9d61da

2015-06-30 11:11 +0000 [589e93617a]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_mwi.c: Fix mid-line log message line breaks.

	  * Add create_mwi_subscriptions_for_endpoint() doxygen comment.

	  Change-Id: I3c3f921f4ec749fb65b62d2f6fa0d4d1888b94e2

2015-06-26 18:48 +0000 [0d67e04359]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_mwi.c: Fix MWI subscription memory corruption crash.

	  MWI subscriptions can crash or corrupt memory when using the subscription
	  datastore to access the MWI subscription object because the datastore is
	  not holding a reference to the object.

	  * Give the subscription datastore a ref to the MWI subscription object.
	  It is unfortunate that the ref causes a circular ref chain that must be
	  explicitly broken to allow the memory to get released.  The loop is broken
	  when the subscription is shutdown and if the subscription setup fails.

	  ASTERISK-25168 #close
	  Reported by: Carl Fortin

	  Change-Id: Ice4fa823f138ff10a6c74d280699c41a82836d4f

2015-07-02 14:51 +0000 [0422433f47]  Richard Mudgett <rmudgett@digium.com>

	* PJSIP XML, XPIDF: Fix buffer size overwrite memory corruption error.

	  When res_pjsip body generator modules were generating XML or XPIDF
	  response bodies, there was a chance that the generated body would be the
	  exact size of the supplied buffer.  Adding the nul string terminator would
	  then write beyond the end of the buffer and potentially corrupt memory.

	  * Fix MALLOC_DEBUG high fence violations caused by adding a nul string
	  terminator on the end of a buffer for XML or XPIDF response bodies.

	  * Made calls to pj_xml_print() safer if the XML prolog is requested.  Due
	  to a bug in pjproject, the return value could be -1 _or_
	  AST_PJSIP_XML_PROLOG_LEN if the supplied buffer is not large enough.

	  * Updated the doxygen comment of AST_PJSIP_XML_PROLOG_LEN to describe the
	  return value of pj_xml_print() when the supplied buffer is not large
	  enough.

	  ASTERISK-25168
	  Reported by: Carl Fortin

	  Change-Id: Id70e1d373a6a2b2bd9e678b5cbc5e55b308981de

2015-06-26 10:36 +0000 [8ea214aed7]  Richard Mudgett <rmudgett@digium.com>

	* PJSIP FAX: Fix T.38 automatic reject timer NULL channel pointer dereferences.

	  When a caller calls a FAX number and then hangs up right after the call is
	  answered then the T.38 re-INVITE automatic reject timer may still be
	  running after the channel goes away.

	  * Added session NULL channel checks on the code paths that get executed by
	  t38_automatic_reject() to prevent a crash when the T.38 re-INVITE
	  automatic reject timer expires.

	  ASTERISK-25168
	  Reported by: Carl Fortin

	  Change-Id: I07b6cd23815aedce5044f8f32543779e2f7a2403

2015-06-05 15:37 +0000 [ada7346792]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip: Need to use the same serializer for a pjproject SIP transaction.

	  All send/receive processing for a SIP transaction needs to be done under
	  the same threadpool serializer to prevent reentrancy problems inside
	  pjproject and res_pjsip.

	  * Add threadpool API call to get the current serializer associated with
	  the worker thread.

	  * Pick a serializer from a pool of default serializers if the caller of
	  res_pjsip.c:ast_sip_push_task() does not provide one.

	  This is a simple way to ensure that all outgoing SIP request messages are
	  processed under a serializer.  Otherwise, any place where a pushed task is
	  done that would result in an outgoing out-of-dialog request would need to
	  be modified to supply a serializer.  Serializers from the default
	  serializer pool are picked in a round robin sequence for simplicity.

	  A side effect is that the default serializer pool will limit the growth of
	  the thread pool from random tasks.  This is not necessarily a bad thing.

	  * Made pjsip_distributor.c save the thread's serializer name on the
	  outgoing request tdata struct so the response can be processed under the
	  same serializer.

	  This is a cherry-pick from master.

	  **** ASTERISK-25115 Change-Id: Iea71c16ce1132017b5791635e198b8c27973f40a

	  NOTE: session_inv_on_state_changed() is disassociating the dialog from the
	  session when the invite dialog becomes PJSIP_INV_STATE_DISCONNECTED.
	  Unfortunately this is a tad too soon because our BYE request transaction
	  has not completed yet.

	  ASTERISK-25183 #close
	  Reported by: Matt Jordan

	  Change-Id: I8bad0ae1daf18d75b8c9e55874244b7962df2d0a

2015-07-04 18:22 +0000 [55137c3d12]  Joshua Colp <jcolp@digium.com>

	* res/res_http_websocket: Don't send HTTP response fragmented.

	  This change makes it so that when accepting a WebSocket
	  connection the HTTP response is sent as one packet instead of
	  fragmented. Browsers don't like it when you send it fragmented.

	  ASTERISK-25103

	  Change-Id: I9b82c4ec2949b0bce692ad0bf6f7cea9709e7f69

2015-06-27 18:47 +0000 [49f81ddb85]  Matt Jordan <mjordan@digium.com>

	* Makefile: Remove coverage files on 'make clean'

	  This patch updates a variety of Makefiles in Asterisk's build system to
	  remove .gcda and .gcno files when 'make clean' is executed. These files
	  are generated when '--enable-coverage' is passed to the Asterisk
	  configure script.

	  Change-Id: Ib70b41eea2ee2908885bff02e80faf9f40c84602

2015-07-02 09:08 +0000 [e0f565663b]  Walter Doekes <walter+asterisk@wjd.nu>

	* chan_sip: Fix early call pickup channel leak.

	  When handle_invite_replaces() was called, and either ast_bridge_impart()
	  failed or there was no bridge (because the channel we're picking up was
	  still ringing), chan_sip would leak a channel.

	  Thanks Matt and Corey for checking the bridge path.

	  ASTERISK-25226 #close

	  Change-Id: Ie736bb182170a73eef5bcef0ab0376f645c260c8

2015-07-02 06:19 +0000 [a5a262be78]  Walter Doekes <walter+asterisk@wjd.nu>

	* chan_mgcp: Don't call close on fd -1.

	  ASTERISK-25220 #close

	  Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3

2015-07-02 06:10 +0000 [b835312b4c]  Walter Doekes <walter+asterisk@wjd.nu>

	* rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format.

	  When running valgrind on Asterisk, it complained about:

	      ==32423== Source and destination overlap in memcpy(0x85a920, 0x85a920, 304)
	      ==32423==    at 0x4C2F71C: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/...)
	      ==32423==    by 0x55BA91: ast_rtp_engine_unload_format (rtp_engine.c:2292)
	      ==32423==    by 0x4EEFB7: ast_format_attr_unreg_interface (format.c:1437)

	  The code in question is a struct assignment, which may be performed by
	  memcpy as a compiler optimization. It is changed to only copy the struct
	  contents if source and destination are different.

	  ASTERISK-25219 #close

	  Change-Id: I6d3546c326b03378ca8e9b8cefd41c16e0088b9a

2015-07-02 05:16 +0000 [6551e16e03]  Walter Doekes <walter+asterisk@wjd.nu>

	* astfd: Fix buffer overflow in DEBUG_FD_LEAKS.

	  If DEBUG_FD_LEAKS was used and more file descriptors than the default of
	  1024 were available, some DEBUG_FD_LEAKS-patched functions would
	  overwrite memory past the fixed-size (1024) fdleaks buffer.

	  This change:
	  - adds bounds checks to __ast_fdleak_fopen and __ast_fdleak_pipe
	  - consistently uses ARRAY_LEN() instead of sizeof() or 1023 or 1024
	  - stores pointers to constants instead of copying the contents
	  - reorders the fdleaks struct for possibly tighter packing
	  - adds a tiny bit of documentation

	  ASTERISK-25212 #close

	  Change-Id: Iacb69e7701c0f0a113786bd946cea5b6335a85e5

2015-07-02 04:57 +0000 [f4dd9560cf]  Walter Doekes <walter+asterisk@wjd.nu>

	* res_timing: Don't close FD 0 when out of open files.

	  This fixes so a failure to get a timer file descriptor does not cascade
	  to closing FD 0.

	  On error, both res_timing_kqueue and res_timing_timerfd would call the
	  destructor before setting the file handle. The file handle had been
	  initialized to 0, causing FD 0 to be closed. This in turn, resulted in
	  floods of "CLI>" messages and an unusable terminal.

	  ASTERISK-19277 #close
	  Reported by: Barry Chern

	  For the 13 branch, this was already fixed. This patch only ensures that
	  we do not attempt to close a negative file descriptor.

	  Change-Id: I147d7e33726c6e5a2751928d56561494f5800350

2015-07-01 17:25 +0000 [78a1f4aa46]  Richard Mudgett <rmudgett@digium.com>

	* chan_vpb.cc: Fix compiler warning Jenkins found.

	  Change-Id: I0ec7fd10d56d90d5a60b12b5a7d6807f265ac5e0

2015-07-01 13:34 +0000 [6b16fbfc22]  Scott Griepentrog <scott@griepentrog.com>

	* Channel alert pipe: improve diagnostic error return

	  When a frame is queued on a channel, any failure in
	  ast_channel_alert_write is logged along with errno.

	  This change improves the diagnostic message through
	  aligning the errno value with actual failure cases.

	  ASTERISK-25224
	  Reported by: Andrey Biglari

	  Change-Id: I1bf7b3337ad392789a9f02c650589cd065d20b5b

2015-07-01 16:04 +0000 [8e07ab145d]  Matt Jordan <mjordan@digium.com>

	* sorcery/realtime: Add a bit of debug and warning messages for bad configs

	  When a mapping does not exist between a sorcery.conf defined object and
	  a realtime mapping in extconf, currently, the user will receive a slew
	  of ERROR messages that don't really tell what is happening. Some ERROR
	  messages may even be misleading, as they occur after the sorcery API has
	  already given up on the attempt to load and create the sorcery object.

	  This patch adds a bit of debug and a useful WARNING message for when a
	  wizard's open callback fails for a particular object type. In the bad
	  configurations that resulted in this patch, this provided a 'root cause'
	  WARNING message that pointed in the right direction of the configuration
	  problem.

	  Change-Id: I1cc7344f2b015b8b9c85a7e6ebc8cb4753a8f80b
2015-06-29 12:45 +0000 [156395e743]  Mark Michelson <mmichelson@digium.com>

	* res_sorcery_realtime: Fix leak of sorcery object type.

	  This prevents a leak of a sorcery object type when realtime sorcery
	  objects are retrieved by fields or when multiple objects are retrieved.

	  The extent of this leak is that sorcery object types would be leaked.
	  These are allocated whenever an object type is registered with sorcery,
	  meaning that on module shutdown, these objects would be leaked. This
	  could be problematic if many reloads were performed, but it is not as
	  severe as if every sorcery object retrieved from realtime were being
	  leaked.

	  ASTERISK-25165 #close
	  Reported by Corey Farrell

	  Change-Id: I625c3b50eee4576670b7eeb013c81ad043b4b4f8

2015-06-26 22:02 +0000 [a5e9c4e9b2]  Matt Jordan <mjordan@digium.com>

	* res/res_corosync: Always decline module load, instead of failing

	  Returns a 'failure' from the module load routine indicates to Asterisk
	  that it should abort loading completely. This is rarely - in fact,
	  really, never - a good option. Aborting load of Asterisk from a dynamic
	  module implies that the core, and the rest of the dynamic modules, don't
	  matter: we should abandon all processing.

	  res_corosync is really not that important.

	  This patch updates the module such that, if it fails to load, it
	  politely declines (emitting ERROR messages along the way), and allows
	  Asterisk to continue to function.

	  Note that this issue was keeping Asterisk unit tests from running on
	  certain build agents.

	  Change-Id: I252249e81fb9b1a68e0da873f54f47e21d648f0f

2015-06-26 20:38 +0000 [399cd8bcd9]  Matt Jordan <mjordan@digium.com>

	* main/pbx: Resolve case sensitivity regression in PBX hints

	  When 8297136f was merged for ASTERISK-25040, a regression was introduced
	  surrounding the case sensitivity of device names within hints.
	  Previously, device names - such as 'sip/foo' - were compared in a case
	  insensitive fashion. Thus, 'sip/foo' was equivalent to 'SIP/foo'. After
	  that patch, only the case sensitive name would match, i.e., 'SIP/foo'.
	  As a result, some dialplan hints stopped working.

	  This patch re-introduces case insensitive matching for device names in
	  hints.

	  ASTERISK-25040

	  ASTERISK-25202 #close

	  Change-Id: If5046a7d14097e1e3c12b63092b9584bb1e9cb4c
	  (cherry picked from commit 96bbcf495a1da9e607d9b04a44b5c4f49e83cc03)

2015-06-26 16:12 +0000 [24eec5a10b]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_nat: Adjust when contact should be rewritten.

	  A previous change made the contact only get rewritten if the dialog's
	  route set was not marked frozen. Unfortunately, while the intent of this
	  is correct, the dialog's route set actually gets marked as frozen
	  earlier than expected, especially for UAS dialogs.

	  Instead, the idea is that the contact needs to not be rewritten if there
	  is a pre-existing route set on the dialog. This is now accomplished by
	  checking the dialog's route set list instead of checking if the route
	  set is frozen.

	  Doing this causes some broken tests to begin passing again.

	  ASTERISK-25196
	  Reported by Mark Michelson

	  Change-Id: I525ab251fd40a52ede327a52a2810a56deb0529e

2015-06-19 18:27 +0000 [0ec461a637]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Add a serializer shutdown group.

	  The client_state objects contain a serializer used to send the outbound
	  REGISTER messages.  Once all those message transactions are complete then
	  the module can shutdown.

	  ASTERISK-24907 #close
	  Reported by: Kevin Harwell

	  Change-Id: Ibb2fe558f98190f2a06da830e0fadfa25516f547

2015-06-26 10:41 +0000 [05a2cc1293]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_refer: Prevent sending duplicate headers.

	  res_pjsip_refer will attempt to add Referred-By or Replaces headers to
	  outbound INVITEs at times. If the INVITE gets challenged for
	  authentication, then we will resend the INVITE. Prior to this patch, the
	  Referred-By or Replaces header would be re-added to the outbound INVITE,
	  resulting in duplicated headers.

	  ASTERISK-25204 #close
	  Reported by Mark Michelson

	  Change-Id: I59fb5c08b4d253c0dba9ee3d3950b5025358222d

2015-06-23 17:43 +0000 [028fa54620]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_nat: Rewrite route set when required.

	  When performing some provider testing, the rewrite_contact option was
	  interfering with proper construction of a route set when sending an ACK
	  after receiving a 200 OK response to an INVITE.

	  The initial INVITE was sent to address sip:foo. The 200 OK had a Contact
	  header with URI sip:bar. In addition, the 200 OK had Record-Route
	  headers for sip:baz and sip:foo, in that order. Since the Record-Route
	  headers had the lr parameter, the result should have been:

	  * Set R-URI of the ACK to sip:bar.
	  * Add Route headers for sip:foo and sip:baz, in that order.

	  However, the rewrite_contact option resulted in our rewriting the
	  Contact header on the 200 OK to sip:foo. The result was:

	  * R-URI remained sip:foo.
	  * We added Route headers for sip:foo and sip:baz, in that order.

	  The result was that sip:bar was not indicated in the ACK at all, so the
	  far end never received our ACK. The call eventually dropped.

	  The intention of rewrite_contact is to rewrite the most immediate
	  destination of our SIP request to be the same address on which we
	  received a request or response. In the case of processing a SIP response
	  with Record-Route headers, this means that instead of rewriting the
	  Contact header, we should instead rewrite the bottom-most Record-Route
	  header. In the case of processing a SIP request with Record-Route
	  headers, this means we rewrite the top-most Record-route header.
	  Like when we rewrite the Contact header, we also ensure to update
	  the dialog's route set if it exists.

	  ASTERISK-25196 #close
	  Reported by Mark Michelson

	  Change-Id: I9702157c3603a2d0bd8a8215ac27564d366b666f
2015-06-19 16:16 +0000 [84c12f9e0c]  Richard Mudgett <rmudgett@digium.com>

	* threadpool, res_pjsip: Add serializer group shutdown API calls.

	  A module trying to unload needs to wait for all serializers it creates and
	  uses to complete processing before unloading.

	  ASTERISK-24907
	  Reported by: Kevin Harwell

	  Change-Id: I8c80b90f2f82754e8dbb02ddf3c9121e5e966059

2015-06-16 15:06 +0000 [602c4b74b5]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Fix handle_client_state_destruction() refs

	  * handle_client_state_destruction() must always be passed a ref to
	  client_state because it will always unref client_state.
	  handle_registration_response() was not passing a client_state ref.

	  * Made the final un-REGISTER message get sent normally using the pjproject
	  register control structure in handle_client_state_destruction().  The
	  previous code attempted to short circuit the response handling for the
	  module to unload.  That doesn't work for a couple reasons.  One,
	  pjsip_regc_send() may call the registered callback before it returns and
	  unbalance the client_state ref count.  Two, the registered callback
	  handles any authentication for the un-REGISTER message.

	  * Made the distinction between internal registration state and external
	  registration status with sip_outbound_registration_status_str().  This is
	  necessary to avoid altering documented AMI messages with internal
	  changes.

	  * Removed references to client_state->client outside of the serializer
	  thread.  When handle_client_state_destruction() destroys the pjproject
	  register control structure that memory is freed and cannot be referenced
	  anymore.  These accesses were to provide information for debug and
	  off-nominal warning messages.

	  * In sip_outbound_registration_timer_cb() you should not access entry->id
	  after unrefing client_state because the passed in entry is normally
	  pointing to the timer entry in the client_state object.

	  ASTERISK-24907
	  Reported by: Kevin Harwell

	  Change-Id: Ia7b446d8644b6b4550ef5bea49527671de65183f

2015-06-15 15:28 +0000 [8c6a95a9ac]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Use ast_sorcery_object_unregister() API

	  The sorcery pjsip 'registration' config object needs to be destroyed on
	  module unload.  Otherwise, a reload of res_pjsip could try to use
	  callbacks for a previously unloaded instance of the module provided by
	  ast_sorcery_object_register() or one of the variants.  Also, if
	  res_pjsip_outbound_registration were subsequently reloaded, the sorcery
	  config field objects would be registered in sorcery twice.

	  ASTERISK-24907
	  Reported by: Kevin Harwell

	  Change-Id: I304fad13dece2604af48353f6c6d9d5c7b064697

2015-06-25 06:42 +0000 [e4a2ef9e4e]  Joshua Colp <jcolp@digium.com>

	* channel: Remove ignore of answer on non-outgoing channels.

	  Due to the way that channels can now be moved around inside of
	  Asterisk it is possible for the outgoing flag of a channel to get
	  cleared before it has been answered. This results in the bridge
	  not receiving notification that the outgoing leg has been answered.

	  This most easily exhibits itself with DTMF based blond transfers.
	  Since the answer of the outgoing leg is ignored the other party
	  continues to receive both a locally generated ringing and the
	  media stream of the outgoing leg upon its answer. This results
	  in no media being heard.

	  This change removes the ignore of the answer and allows it
	  to pass through.

	  ASTERISK-25171 #close

	  Change-Id: I82aedcec4f89f34a2e5472086dfc9a6c775bca8e

2015-06-15 15:28 +0000 [20f3d77ab9]  Richard Mudgett <rmudgett@digium.com>

	* sorcery: Add ast_sorcery_object_unregister() API call.

	  Find and unlink the specified sorcery object type to complement
	  ast_sorcery_object_register().  Without this function you cannot
	  completely unload individual modules that use sorcery for configuration.

	  ASTERISK-24907
	  Reported by: Kevin Harwell

	  Change-Id: I1c04634fe9a90921bf676725c7d6bb2aeaab1c88

2015-06-15 13:38 +0000 [4313f32969]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Reorder load_module() and unload_module().

	  It is best if the loading code creates and initializes the module's
	  infrastructure before letting the system know of its existence.  The
	  unloading code needs to reverse the actions of the loading code and in the
	  reverse order.

	  ASTERISK-24907
	  Reported by: Kevin Harwell

	  Change-Id: I5d151383e9787b5b60aa5e1627b10f040acdded4

2015-06-23 14:34 +0000 [890c923786]  Richard Mudgett <rmudgett@digium.com>

	* AMI: Add Linkedid to the standard channel snapshot AMI event headers.

	  * The AMI version is bumped to 2.8.0.

	  ASTERISK-25189 #close
	  Reported by: John Hardin

	  Change-Id: I2b1778c3fdc1dca0ed55db4e3a639eddfb16c2ac

2015-06-24 14:30 +0000 [2602a7484b]  Richard Mudgett <rmudgett@digium.com>

	* test.c: Add unit test registration checks for summary and description.

	  Added checks when a unit test is registered to see that the summary and
	  description strings do not end with a new-line '\n' for consistency.

	  The check generates a warning message and will cause the
	  /main/test/registrations unit test to fail.

	  * Updated struct ast_test_info member doxygen comments.

	  Change-Id: I295909b6bc013ed9b6882e85c05287082497534d

2015-06-24 14:39 +0000 [2b0482d699]  Richard Mudgett <rmudgett@digium.com>

	* Unit tests: Fix unit test description strings.

	  Analyzing the code shows that the unit test summary and description
	  strings should not end with a new-line character.  Where these strings are
	  used in the code a new-line is provided for output.

	  Change-Id: I129284f5e7ca93d82532334076da4c462d3d9fba

2015-06-23 11:21 +0000 [e99e654d75]  Joshua Colp <jcolp@digium.com>

	* app_dial: Hold reference to calling channel formats when dialing outbound.

	  Currently when requesting a channel the native formats of the
	  calling channel are provided to the core for usage when dialing
	  the outbound channel. This occurs without holding the channel lock
	  or keeping a reference to the formats. This is problematic as
	  the channel driver may end up changing the formats during this time.
	  In the case of chan_sip this happens when an SDP negotiation
	  completes.

	  This change makes it so app_dial keeps a reference to the native
	  formats of the calling channel which guarantees that they will
	  remain valid for the period of time needed.

	  ASTERISK-25172 #close

	  Change-Id: I2f0a67bd0d5d14c3bdbaae552b4b1613a283f0db
2015-06-17 05:04 +0000 [80e82dc97f]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_mwi: Set up unsolicited MWI upon registration.

	  The res_pjsip_mwi previously required a reload to set up the proper
	  subscriptions to allow unsolicited MWI to work. This change
	  makes it so the act of registering will also cause this to occur.
	  This is particularly useful if realtime is involved as no reload
	  needs to occur within Asterisk to cause the MWI information
	  to get sent.

	  ASTERISK-25180 #close

	  Change-Id: Id847b47de4b8b3ab8858455ccc2f07b0f915f252

2015-06-22 15:11 +0000 [35a99b6394]  Kevin Harwell <kharwell@digium.com>

	* bridge.c: Hangup attended transfer target if bridged

	  After completing an attended transfer the transfer target channel was not being
	  hung up after leaving the bridge. Added an explicit softhangup to hangup said
	  channel, but only if it was previously bridged.

	  ASTERISK-24782 #close
	  Reported by: John Bigelow

	  Change-Id: Idde9543d56842369384a5e8c00d72a22bbc39ada

2015-06-17 16:23 +0000 [036bc0012f]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Add missing line endings to CLI commands

	  Change-Id: I39ae612746d892d2dbe86f3ff2d7027fa1da57f7

2015-06-12 14:29 +0000 [bec7435945]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Eliminate simple RAII_VAR() usage.

	  Change-Id: I399cb9d61bbba706b48c98e0bf75e98984cd9a9e

2015-06-12 13:33 +0000 [c2519fdf1c]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_outbound_registration.c: Misc code cleanups.

	  * Break some long lines.

	  * Fix doxygen comment.

	  Change-Id: I8f12ba6822f84d5e7bb575280270cd7e2fefb305

2015-06-22 09:26 +0000 [a419c69def]  Alexander Traud (License 6520)

	* chan_sip: Reload peer without its old capabilities.

	  On reload, previously allowed codecs were not removed. Therefore, it was not
	  possible to remove codecs while Asterisk was running. Furthermore, newly added
	  codecs got appended behind the previous codecs. Therefore, it was not possible
	  to add a codec with a priority of #1. This change removes the old capabilities
	  before the current ones are added.

	  ASTERISK-25182 #close
	  Reported by: Alexander Traud
	  patches:
	   asterisk_13_allow_codec_reload.patch uploaded by Alexander Traud (License 6520)

	  Change-Id: I62a06bcf15e08e8c54a35612195f97179ebe5802

2015-06-20 19:38 +0000 [74616ae43d]  Joshua Colp <jcolp@digium.com>

	* chan_sip: Destroy peers without holding peers container lock.

	  Due to the use of stasis_unsubscribe_and_join in the peer destructor
	  it is possible for a deadlock to occur when an event callback is
	  occurring at the same time.

	  This happens because the peer may be destroyed while holding the
	  peers container lock. If this occurs the event callback will never
	  be able to acquire the container lock and the unsubscribe will
	  never complete.

	  This change makes it so the peers that have been removed from the
	  peers container are not destroyed with the container lock held.

	  ASTERISK-25163 #close

	  Change-Id: Ic6bf1d9da4310142a4d196c45ddefb99317d9a33

2015-06-18 13:16 +0000 [9015bb4c8c]  Mark Michelson <mmichelson@digium.com>

	* Resolve race conditions involving Stasis bridges.

	  This resolves two observed race conditions.

	  First, a bit of background on what the Stasis application does:

	  1a Creates a stasis_app_control structure. This structure is linked into
	     a global container and can be looked up using a channel's unique ID.
	  2a Puts the channel in an event loop. The event loop can exit either
	     because the stasis_app_control structure has been marked done, or
	     because of some other factor, such as a hangup. In the event loop, the
	     stasis_app_control determines if any specific ARI commands need to be
	     run on the channel and will run them from this thread.
	  3a Checks if the channel is bridged. If the channel is bridged, then
	     ast_bridge_depart() is called since channels that are added to Stasis
	     bridges are always imparted as departable.
	  4a Unlink the stasis_app_control from the container.

	  When an ARI command is received by Asterisk, the following occurs
	  1b A thread is spawned to handle the HTTP request
	  2b The stasis_app_control(s) that corresponds to the channel(s) in the
	     request is/are retrieved. If the stasis_app_control cannot be
	     retrieved, then it is assumed that the channel in question has exited
	     the Stasis app or perhaps was never in Stasis in the first place.
	  3b A command is queued onto the stasis_app_control, and the channel's
	     event loop thread is signaled to run the command.
	  4b While most ARI commands do nothing further, some, such as adding or
	     removing channels from a bridge, will block until the command they
	     issued has been completed by the channel's event loop.

	  The first race condition that is solved by this patch involves a crash
	  that can occur due to faulty detection of the channel's bridged status
	  in step 3a. What can happen is that in step 2a, the event loop may run
	  the ast_bridge_impart() function to asynchronously place the channel
	  into a bridge, then immediately exit the event loop because the channel
	  has hung up. In step 3a, we would detect that the channel was not
	  bridged and would not call ast_bridge_depart(). The reason that the
	  channel did not appear to be bridged was that the depart_thread that is
	  spawned by ast_bridge_impart() had not yet started. That is the thread
	  where the channel is marked as being bridged. Since we did not call
	  ast_bridge_depart(), the Stasis application would exit, and then the
	  channel would be destroyed Then the depart_thread would start up and
	  try to manipulate the destroyed channel, causing a crash.

	  The fix for this is to switch from using ast_channel_is_bridged() to
	  checking the NULLity of ast_channel_internal_bridge_channel() to
	  determine if ast_bridge_depart() needs to be called. The channel's
	  internal bridge_channel is set when ast_bridge_impart() is called and
	  is NULLed by the call to ast_bridge_depart(). If the channel's internal
	  bridge_channel is non-NULL, then the channel must have been imparted
	  into the bridge and needs to be departed, even if the actual bridging
	  operation has not yet started. By departing the channel when necessary,
	  the thread that is running the Stasis application will block until the
	  bridge gives the okay that the depart_thread has exited.

	  The second race condition that is solved by this patch involves a leak
	  of HTTP handler threads. The problem was that step 2b would successfully
	  retrieve a stasis_app_control structure. Then step 2a would exit the
	  channel from the event loop due to a hangup. Steps 3a and 4a would
	  execute, and then finally steps 3b and 4b would. The problem is that at
	  step 4b, when attempting to add a channel to a bridge, the thread would
	  block forever since the channel would never execute the queued command
	  since it was finished with the event loop. This meant that the HTTP
	  handling thread would be leaked, along with any references that thread
	  may have owned (in my case, I was seeing bridges leaked).

	  The fix for this is to hone in better on when the channel has exited the
	  event loop. The stasis_app_control structure has an is_done field that
	  is now set at each point where the channel may exit the event loop. If
	  step 2b retrieves a valid stasis_app_control structure but the control
	  is marked as done, then the attempted operation exits immediately since
	  there will be nothing to service the attempted command.

	  ASTERISK-25091 #close
	  Reported by Ilya Trikoz

	  Change-Id: If66265b73b4c9f8f58599124d777fedc54576628
2015-06-16 11:13 +0000 [723a9d4225]  Mark Michelson <mmichelson@digium.com>

	* Parking: Add documentation for AMI ParkedCallSwap event.

	  This event was added some time ago in order to clarify when a channel
	  took the place of another channel in a parking lot. However, there was
	  no XML documentation added for the event. This patch adds the XML
	  documentation.

	  ASTERISK-24900 #close
	  Reported by Rusty Newton

	  Change-Id: I4cfe7777c4b94bbff91c9221c6096a7a02a92eac
2015-06-15 16:40 +0000 [79bf56c78a]  Corey Farrell <git@cfware.com>

	* func_pjsip_aor: Fix leaked contact from iterator.

	  ASTERISK-25162 #close

	  Change-Id: Id79aa3c6fe490016ee98efc97ac4c1d3f461f97e

2015-06-12 16:58 +0000 [31c77b157b]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip: Add option to force G.726 to be treated as AAL2 packed.

	  Some phones send g.726 audio packed for AAL2, which differs from what is
	  recommended by RFC 3351. If Asterisk receives audio formatted as such when
	  negotiating g.726 then it sounds a bit distorted. Added an option to
	  res_pjsip_endpoint that allows g.726 negotiated audio to be treated as g.726
	  AAL2 packed.

	  ASTERISK-25158 #close
	  Reported by: Steve Pitts

	  Change-Id: Ie7e21f75493d7fe53e75e12c971e72f5afa33615

2015-06-14 19:48 +0000 [de8c7f46ed]  Matt Jordan <mjordan@digium.com>

	* main/cdr: Carry over the disable flag when 'disable all' is specified

	  The CDR_PROP function (as well as the NoCDR application) set the
	  'disable all' flag (AST_CDR_FLAG_DISABLE_ALL) on the current CDR. This
	  flag is supposed to be applied to all CDRs that are currently in the
	  chain, as well as all CDRs that may be created in the future. Currently,
	  however, the flag is only applied to the existing CDRs in the chain; new
	  CDRs do not receive the 'disable all' flag. In particular, this affects
	  parallel dials, which generate new CDRs for each pair of channels in
	  the dial attempt.

	  This patch carries over the 'disable all' flag when it is specified on a
	  CDR and a new CDR is generated for the chain.

	  ASTERISK-24344 #close

	  Change-Id: I91a0f0031e4d147bdf8a68ecd08304d506fb6a0e
2015-06-12 14:28 +0000 [78ea356e78]  Matt Jordan <mjordan@digium.com>

	* main/cdr: Copy context/exten on chained CDRs for parallel dials in subroutines

	  When a parallel dial occurs, a new CDR will be created for each dial
	  attempt that is made. In most circumstances, the act of creating each
	  CDR in the chain will include a step that updates the Party A snapshot,
	  which causes the context/extension of the Party A to be copied onto the
	  CDR object.

	  However, when the Party A is in a subroutine, we explicitly do *not*
	  copy the context/extension onto the CDR. This prevents the Macro or
	  GoSub routine name from blowing away the context/extension that the
	  channel was originally executing in. For the original CDR, this is not a
	  problem: the original CDR already recorded the last known 'good' state
	  of the channel just prior to it going into the subroutine. However, for
	  newly generated CDRs in a chain, there is no context/extension set on
	  them. Since we are in a subroutine, we will never set the Party A's
	  context/extension on the CDR, and we end up with a CDR with no
	  destination recorded on it.

	  This patch updates the creation of a chained CDR such that it copies
	  over the original CDR's context/extension. This is the last known "good"
	  state of the CDR, and is a reasonable starting point for the newly
	  generated CDR. In the case where we are not in a subroutine, subsequent
	  code will update the location of the CDR from the Party A information;
	  in the case where we are in a subroutine, the context/extension on the
	  original CDR is the correct information.

	  ASTERISK-24443 #close

	  Change-Id: I6a3ef0d6e458d3b9b30572feaec70f2964f3bc2a

2015-06-11 08:18 +0000 [3f57f3f8ec]  Damian Ivereigh <damo@launtel.net.au>

	* chan_sip.c: Update dialog fromtag after request with auth

	  If a client sends and INVITE which is 401 rejected, then subsequently
	  sends a new INVITE with the auth info and uses a different fromtag
	  from the first INVITE, Asterisk will accept the new INVITE as part of
	  the original dialog - match_req_to_dialog() specifically ignores the
	  fromtag. However it does not update the stored dialog with the new
	  fromtag.

	  This results in Asterisk being unable to match future packets that are
	  part of this dialog (such as the ACK to the OK or the OK to the BYE),
	  and the call is dropped.

	  This problem was originally found when using an NEC-i SV8100-GE (NEC SIP
	  Card).

	  * After a successful match of a packet to the dialog, if the packet is
	    not a SIP_RESPONSE, authentication is present and the fromtags are
	    different, the stored fromtag is updated with the one from the recent
	    INVITE.

	  ASTERISK-25154 #close
	  Reported by: Damian Ivereigh
	  Tested by: Damian Ivereigh

	  Change-Id: I5c16cf3b409e5ef9f2b2fe974b6bd2a45a6aa17e

2015-06-11 18:52 +0000 [30a0f2d9ac]  Matt Jordan <mjordan@digium.com>

	* chan_pjsip: Set the context and extension on the channel when created

	  Prior to this patch, chan_pjsip was failing to pass the endpoint's
	  context and the desired extension to the ast_channel_alloc_* routine.
	  This caused a new channel snapshot to be issued without a context and
	  extension, which can cause some reporting issues for users of AMI, CEL,
	  and other APIs. The channel driver would later set the context and
	  extension on the channel such that the channel would start in the
	  correct location in the dialplan, but the information reported in the
	  initial event would be incorrect.

	  This patch modifies the channel driver such that it now passes the
	  context and extension directly into the allocation routine. This
	  provides the information in the new channel snapshot published over
	  Stasis.

	  ASTERISK-25156 #close
	  Reported by: cloos

	  Change-Id: Ic6f8542836e596db8f662071d118e8f934fdf25e

2015-06-10 18:28 +0000 [dbb067279e]  Joshua Colp <jcolp@digium.com>

	* bridge: When performing a blonde transfer update connected line information.

	  When performing a blonde transfer the code uses the old masquerade
	  mechanism to move a channel around. As a result of this certain information,
	  such as connected line, is moved between the channels involved. Upon
	  completion of the move a frame is queued which is supposed to update the
	  connected line information on the channel. This does not occur as the
	  code considers it a redundant update since the masquerade operation
	  updated the channel (but did not inform it of the new connected line
	  information). The code also does not queue a connected line update
	  to be handled by the thread handling the channel. Without this any
	  other channel that may be loosely involved does not know it is
	  talking to a different caller.

	  This change does the following to resolve this:

	  1. The indicated connected line information is cleared upon
	  completion of the masquerade operation when doing a blonde transfer.
	  This prevents the connected line update from being considered
	  redundant.

	  2. A connected line update frame is now queued upon the completion
	  of the masquerade operation so any other channel loosely involved
	  knows that there is a different caller.

	  ASTERISK-25157 #close
	  Reported by: Joshua Colp

	  Change-Id: Ibb8798184a1dab3ecd35299faecc420034adbf20

2015-06-11 14:39 +0000 [a2f4d03c87]  Richard Mudgett <rmudgett@digium.com>

	* app_directory: Fix crash when using the alias option 'a'.

	  The voicemail.conf mailbox key/value pair is defined as:
	  <mailbox>=[<password>[,<full-name>[,<email>[,<pager>[,<options>]]]]]
	  Where all fields in the value including the field values are optional.

	  Since the parsing code for the mailbox key/value pair is sloppy, this
	  patch tightens the parsing for the directory information.

	  * Renamed the 'pos' and 'bufptr' variables to 'name' and 'options'
	  respectively in search_directory_sub().  Those names make more sense.

	  * Made sure that search_directory_sub() is dealing with the voicemail.conf
	  mailbox options field if it even exists when looking for the 'hidefromdir'
	  and 'alias' options.

	  * Fix crash if a voicemail.conf mailbox is just
	  <mailbox>=<password>,<name> when the 'a' option is used.  If there were no
	  fields after the name then the 'options' pointer was not checked for NULL.

	  * Fix users.conf alias processing if the 'a' option is used.  The wrong
	  variable was used.

	  ASTERISK-25087 #close
	  Reported by: Chet Stevens

	  Change-Id: I86052ea77307beddddba5279824d39dc0d593374

2015-06-09 15:31 +0000 [a2b718f4f6]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip.h: Fix some doxygen comments.

	  Change-Id: I4615771077c3c6a0a7273da6d7b5f77af7e8d976

2015-06-05 13:46 +0000 [32ddf6d86b]  Richard Mudgett <rmudgett@digium.com>

	* taskprocessor.c: Remove extra unref from off-nominal path.

	  Change-Id: Iee3bd8c8a528776056972066698fe735f0f6cf60

2015-04-20 16:00 +0000 [cf98c744d5]  Yousf Ateya <y.ateya@starkbits.com>

	* chan_iax2: Prevent deadlock between hangup and sending lagrq/ping

	  channels/chan_iax.c: Prevent the deadlock between iax2_hangup and send_lagrq/
	  send_ping. This deadlock happens because the scheduled task send_lagrq(or
	  send_ping) starts execution after the call hangup procedure starts but before
	  it deletes the tasks in the scheduler.

	  The solution is to delete scheduled lagrq (and ping) task asynchronously
	  (i.e. schedule AST_SCHED_DEL for these tasks); By this, AST_SCHED_DEL will
	  be called in a new context (doesn't have callno locked).

	  This commit also cleans up the procedure of sending LAGRQ and PING.

	  main/sched.c: Do not assert when deleting non existant entry from scheduler.
	  This assert seems to be the reason for a lot of awkward code to avoid it.

	  ASTERISK-24983 #close
	  Reported by: Y Ateya

	  Change-Id: I03bec1fc8faacb89630269e935fa667c6d6c080c

2015-05-31 12:37 +0000 [8af6c9cf6b]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* res_pjsip_transport_websocket: Fix use-after-free bugs.

	  This patch fixes use-after-free bugs caught by AddressSanitizer.

	  1. PJSIP transport manager may decide to destroy transport on its own.
	  For example, when the contact registered via websocket has not renewed
	  its registration in time. The transport was destoyed, but the websocket
	  listener thread was still active until the socket closes, and then tried
	  to call transport_shutdown on transport that has been freed.

	  Also, the transport destructor accessed wstransport->rdata.tp_info.pool
	  right after freeing memory that contained wstransport itself.

	  This patch converts transport to an ao2 object, allowing it to be
	  refcounted, so that it is available until both websocket listener and
	  pjsip transport manager are finished with it.

	  2. The websocket listener deletes the last reference on websocket session
	  when the tcp connection is closed, and it gets destroyed, but
	  the transport manager may still use it, for example when disconnect
	  happens in the middle of a SIP transaction.

	  A new reference to websocket session has been added that is released
	  with the transport to prevent this.

	  ASTERISK-25096 #close
	  Reported by: Josh Kitchens

	  ASTERISK-24963 #close
	  Reported by: Badalian Vyacheslav

	  Change-Id: Idc0b63eb6e459c1ddfb2430127d34b3c4d8d373b

2015-06-09 13:41 +0000 [3046bc17ed]  ibercom <ibercom123@gmail.com>

	* weakref attribute detection broken with gcc 4.6 and higher

	  GCC 4.7 Manual:
	  http://gcc.gnu.org/onlinedocs/gcc-4.7.4/gcc/Function-Attributes.html

	  weakref ("target")

	  A weak reference is an alias that does not by itself require a definition
	  to be given for the target symbol.

	  ASTERISK-22559 #close
	  Reported by: Ibercom

	  Change-Id: I36a136cae947b65187a697533416f9ff9a0b8cdf

2015-06-08 10:09 +0000 [55c8daf88b]  Corey Farrell <git@cfware.com>

	* Fix unsafe uses of ast_context pointers.

	  Although ast_context_find, ast_context_find_or_create and
	  ast_context_destroy perform locking of the contexts table,
	  any context pointer can become invalid at any time that the
	  contexts table is unlocked. This change adds locking around
	  all complete operations involving these functions.

	  Places where ast_context_find was followed by ast_context_destroy
	  have been replaced with calls ast_context_destroy_by_name.

	  ASTERISK-25094 #close
	  Reported by: Corey Farrell

	  Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa

2015-06-04 07:14 +0000 [e0090216db]  ibercom <ibercom123@gmail.com>

	* CLI: Cosmetic issue - core show uptime

	  Show uptime information ends with an unnecessary space.

	  Now NEEDCOMMA is better defined.

	  Change-Id: I11b360504a0703309ff51772ff8f672287f3c5a1

2015-06-03 17:41 +0000 [88212ccb7f]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip: Prevent access of NULL channels.

	  It is possible to receive incoming requests or responses after the channel
	  on an ast_sip_session has been destroyed and NULLed out. Handlers of these
	  sorts of requests or responses need to be prepared for the possibility
	  that the channel is NULL or else they could cause a crash.

	  While several places have been amended to deal with NULL channels, there
	  were still a couple of places that needed updating.

	  res_pjsip_dtmf_info.c: When handling incoming INFO requests, we need to
	  return early if there is no channel on the session.

	  res_pjsip_session.c: When handling a 302 response, we need to stop the
	  redirecting attempt if there is no channel on the session.

	  ASTERISK-25148 #close
	  reported by Mark Michelson

	  Change-Id: Id1a75ffc3d0eaa168b0b28188fb54d6cf9fc47a9

2015-06-01 11:45 +0000 [f5d5aa67dc]  Kevin Harwell <kharwell@digium.com>

	* AMI: Escape string values.

	  So this issue is a bit complicated. Since it is possible to pass values to AMI
	  that contain a '\r\n' (or other similar sequences) these values need to be
	  escaped. One way to solve this is to escape the values and then pass the escaped
	  values to the AMI variable parameter string building function. However, this
	  puts the onus on the pre-build function to escape all string values. This
	  potentially requires a fair amount of changes along with a lot of string
	  allocations/freeing for all values.

	  Surely there is a way to push this complexity down a level into the string
	  building function itself? This of course is possible, but ends up requiring a
	  way to distinguish between strings that need to be escaped and those that don't.
	  The best way to handle this is by introducing a new format specifier in the
	  format string. For instance a %s (no escape) and %S (escape). However, that is
	  a bit weird and unexpected.

	  So faced with those possibilities this patch implements a limited version of the
	  first option. Instead of attempting to escape all string values this patch only
	  escapes those values that make sense. This approach limits the number of changes
	  and doesn't suffer from the odd format specifier problem.

	  ASTERISK-24934 #close
	  Reported by: warren smith

	  Change-Id: Ib55a5b84fe0481b0f2caaaab68c566f392c0aac0

2015-06-03 13:17 +0000 [5dc9fb4198]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip/location: Fix ref leak in contact_apply_handler

	  contact_apply_handler calls ast_res_pjsip_find_or_create_contact_status
	  to force the creation of a contact_status object whenever a new
	  contact is added but it didn't unref the returned object.

	  Added an ao2_cleanup(status) to plug the leak.

	  ASTERISK-25141

	  Change-Id: Icc1401cae142855a1abc86ab5179dfb3ee861c40
	  Reported-by: Corey Farrell

2015-06-02 15:07 +0000 [d908272b7e]  David M. Lee <dlee@respoke.io>

	* Fixes for OS X

	   * Add some type casting so tv_usec can really be a long, instead of
	     some strange platform specific type.

	   * Add some .dylib style files to .gitignore.

	   * Switch from using -Xlinker to -Wl,. For [reasons unknown][], newer
	     versions of GCC, when compiling the Homebrew formula for Asterisk,
	     are not properly passing the -Xlinker options to the linker. Given
	     that -Wl, does exactly the [same thing][], and does it properly, this
	     patch changes the -Xlinker options to use -Wl, instead.

	   [reasons unknown]: http://bit.ly/1SUbEYx
	   [same thing]: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

	  Change-Id: Id5e6b3c6cc86282ea5fca630dc3991137c5bf4dd

2015-05-30 20:22 +0000 [9e7827e3ac]  Corey Farrell <git@cfware.com>

	* pjsip_configuration: Fix leak in persistent_endpoint_update_state.

	  The loop to find the first available contact of an endpoint grabbed
	  contact from the iterator, then checked for offline state.  This
	  caused the first contact after the state was found to leak a reference.

	  ASTERISK-25141

	  Change-Id: Id0f1d87410fc63742db0594eb4b18b36e99aec08
2015-05-31 11:33 +0000 [888bb49618]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* Fix buffer overflow in slin sample frames generation.

	  The length of frames retured by sample functions was twice as large as
	  real, what caused global buffer overflow caught by AddressSanitizer.

	  ASTERISK-24717 #close
	  Reported by: Badalian Vyacheslav

	  Change-Id: Iec2fe682aef13e556684912f906bedf7c18229c6

2015-05-29 16:19 +0000 [857166b5e5]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip/location:  Fix memory leak in permanent_uri_handler

	  When permanent_uri_handler was creating the contact status
	  object for each contact, it wasn't unreffing it at the
	  end of the loop.

	  ASTERISK-25141 #close
	  Reported-by: Corey Farrell

	  Change-Id: I7bb127994677bb3d459f87952f8425c9b9967b12

2015-05-29 14:52 +0000 [1558a89129]  gtjoseph <george.joseph@fairview5.com>

	* Revert "endpoint/stasis: Eliminate duplicate events on endpoint status change"

	  This reverts commit 35c699086ae2fd81b2473307ccb2ae79ad32375a.

	  Change-Id: Ia98c2b4820cf579a5b9bb75e9e05d7a233205fb7

2015-05-27 13:22 +0000 [35c699086a]  gtjoseph <george.joseph@fairview5.com>

	* endpoint/stasis: Eliminate duplicate events on endpoint status change

	  When an endpoint was created, it's messages were being forwarded to
	  both the tech endpoint topic and the all endpoints topic.  Since
	  the tech topic was also forwarded to all, this was resulting in
	  duplicate messages whenever an endpoint published.  This patch
	  causes the endpoint to only forward to the tech topic and lets
	  the tech topic forward to all.

	  To accomplish this, the existing stasis_cp_single_create function
	  (which both creates and forwards) was cloned and split into 2
	  functions, one that creates the topic and one that sets up the
	  forwarding.  This allows endpoint_internal_create to create
	  the topic from the endpoint_all cache without forwarding it there,
	  then allows it to do the forward to the tech's topic.

	  ASTERISK-25137 #close
	  Reported-by: Vitezslav Novy
	  ASTERISK-25116 #close
	  Reported-by: George Joseph <george.joseph@fairview5.com>
	  Tested-by: George Joseph <george.joseph@fairview5.com>

	  Change-Id: I26d7d4926a0861748fd3bdffe316b75b549a801c

2015-05-26 13:56 +0000 [fe21f2e52f]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_session: Fix in-dialog authentication.

	  When the remote peer requires authentication for in-dialog requests then
	  re-INVITEs to the peer cause the call to be disconnected and other
	  in-dialog requests to the peer like MESSAGE just don't go through.

	  * Made session_inv_on_tsx_state_changed() handle in-dialog authentication
	  for re-INVITEs and other methods.  Initial INVITEs cannot be handled here
	  because the INVITE transaction must be restarted earlier.

	  * Pulled needed code from res/res_pjsip/pjsip_outbound_auth.c in
	  preparation for removing the file.  The generic outbound authentication
	  code did not work as well as anticipated.

	  * Created outbound_invite_auth() to only handle initial outbound INVITEs.
	  Re-INVITEs cannot be handled here.  The re-INVITE transaction is still in
	  progress and the PJSIP library cannot handle the overlapping INVITE
	  transactions.  Other method types should not be handled here as this code
	  only works on outgoing calls and we need to handle incoming and outgoing
	  calls.

	  ASTERISK-25131 #close
	  Reported by: Richard Mudgett

	  Change-Id: I12bdd7ddccc819b4ce4b091e826d1e26334601b0

2015-05-21 17:21 +0000 [262d590819]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip: Add AMI events for chan_pjsip contact lifecycle changes

	  Add a new ContactStatus AMI event.
	  Publish the following status/state changes:
	  Created
	  Removed
	  Reachable
	  Unreachable
	  Unknown

	  Contact URI, new status/state, aor and endpoint names, and the
	  last qualify rtt result are included in the event.

	  ASTERISK-25114 #close

	  Change-Id: Id25aae5f7122facba183273efb3e8f36c20fb61e
	  Reported-by: George Joseph <george.joseph@fairview5.com>
	  Tested-by: George Joseph <george.joseph@fairview5.com>

2015-05-26 07:44 +0000 [5a42397018]  Joshua Colp <jcolp@digium.com>

	* sorcery: Fix cache creation callback.

	  The cache creation callback function expects to receive a sorcery_details
	  structure and not just a standalone object.

	  Change-Id: I3e4a5a137cb25292eb52d7a14cbb6daa09213450

2015-05-24 13:47 +0000 [97a6ce1717]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* Astobj2: Correctly treat hash_fn returning INT_MIN

	  The code in astobj2_hash.c wrongly assumed that abs(int) is always > 0.
	  However, abs(INT_MIN) = INT_MIN and is still negative, as well as
	  abs(INT_MIN) % num_buckets, and as a result this led to a crash.

	  One way to trigger the bug is using host=::80 or 0.0.0.128 in peer
	  configuration section in chan_sip or chan_iax.

	  This patch takes the remainder before applying abs, so that bucket
	  number is always in range.

	  ASTERISK-25100 #close
	  Reported by: Mark Petersen

	  Change-Id: Id6981400ad526f47e10bcf7b847b62bd2785e899
2015-05-23 04:36 +0000 [554bd1e39c]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* res_pjsip_transport_websocket: Fix crash on receiving large SIP packets

	  Incoming SIP packets larger than PJSIP_MAX_PKT_LEN were themselves
	  truncated before passing to pjsip_tpmgr_receive_packet, but the length
	  was passed unaltered, thus causing memory corruption and segfault.

	  ASTERISK-25122 #close

	  Change-Id: I608a6b6b7f229eacc33a0a7d771d18e27e5b08ab

2015-05-22 21:50 +0000 [0d266cbe02]  Corey Farrell <git@cfware.com>

	* Stasis: Fix unsafe use of stasis_unsubscribe in modules.

	  Many uses of stasis_unsubscribe in modules can be reached through unload.
	  These have been switched to stasis_unsubscribe_and_join.

	  Some subscription callbacks do nothing, for these I've created a noop
	  callback function in stasis.c.  This is used by some modules that monitor
	  MWI topics in order to enable cache, since the callback does not become
	  invalid after dlclose it is safe to use stasis_unsubscribe on these, even
	  during module unload.

	  ASTERISK-25121 #close

	  Change-Id: Ifc2549fbd8eef7d703c222978e8f452e2972189c

2015-05-22 12:22 +0000 [51ffed5e61]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_pubsub: Note that 'dialog' is also a valid event type for RLS

	  In addition to specifying lists of 'presence' and 'message-summary',
	  users can also create lists of type 'dialog'. These should be treated in
	  the same fashion as 'presence'.

	  Change-Id: I583bb69cd9f88b0b29bf09ddaddeac4e84189f6e

2015-05-22 12:18 +0000 [7950b65e4f]  Matt Jordan <mjordan@digium.com>

	* res/res_pjsip_exten_state: Fix confusing NOTICE message

	  When a SUBSCRIBE request is made to a dialplan hint that doesn't exist,
	  the current NOTICE message informing users of this swaps the context and
	  extension parameters. This can cause a bit of confusion.

	  Thanks to CptBurger in #asterisk for helping to point this out.

	  Change-Id: Ie584d1a58ae217385c87a450ca25b55ca0e36e43

2015-05-17 20:36 +0000 [5ac65ddfb4]  Matt Jordan <mjordan@digium.com>

	* res/ari: Register Stasis application on WebSocket attempt

	  Prior to this patch, when a WebSocket connection is made, ARI would not
	  be informed of the connection until after the WebSocket layer had
	  accepted the connection. This created a brief race condition where the
	  ARI client would be notified that it was connected, a channel would be
	  sent into the Stasis dialplan application, but ARI would not yet have
	  registered the Stasis application presented in the HTTP request that
	  established the WebSocket.

	  This patch resolves this issue by doing the following:
	   * When a WebSocket attempt is made, a callback is made into the ARI
	     application layer, which verifies and registers the apps presented in
	     the HTTP request. Because we do not yet have a WebSocket, we cannot
	     have an event session for the corresponding applications. Some
	     defensive checks were thus added to make the application objects
	     tolerant to a NULL event session.
	   * When a WebSocket connection is made, the registered application is
	     updated with the newly created event session that wraps the WebSocket
	     connection.

	  ASTERISK-24988 #close
	  Reported by: Joshua Colp

	  Change-Id: Ia5dc60dc2b6bee76cd5aff0f69dd53b36e83f636

2015-05-20 11:11 +0000 [60e2fbfe62]  gtjoseph <george.joseph@fairview5.com>

	* res_pjsip: Refactor endpt_send_transaction (qualify_timeout)

	  This patch refactors the transaction timeout processing to eliminate
	  calling the lower level public pjsip functions and reverts to calling
	  pjsip_endpt_send_request again.  This is the result of me noticing
	  a possible incompatibility with pjproject-2.4 which was causing
	  contact status flapping.

	  The original version of this feature used the lower level calls to
	  get access to the tsx structure in order to cancel the transaction
	  when our own timer expires. Since we no longer have that access,
	  if our own timer expires before the pjsip timer, we call the callbacks
	  and just let the pjsip transaction take it's own course.  When the
	  transaction ends, it discovers the callbacks have already been run
	  and just cleans itself up.

	  A few messages in pjsip_configuration were also added/cleaned up.

	  ASTERISK-25105 #close

	  Change-Id: I0810f3999cf63f3a72607bbecac36af0a957f33e
	  Reported-by: George Joseph <george.joseph@fairview5.com>
	  Tested-by: George Joseph <george.joseph@fairview5.com>
2015-05-20 00:45 +0000 [42476e6633]  demon-ru <serov.d.p@gmail.com>

	* res_pjsip_outbound_registration: Check request URI for line.

	  When an inbound call is received the To header is checked
	  for the "line" option. Some remote servers will place this
	  in the request URI instead. This adds an additional check for
	  the option in the request URI.

	  ASTERISK-25072 #close
	  Reported by: Dmitriy Serov

	  Change-Id: Id4e44debbb80baad623b914a88574371575353c8

2015-05-21 17:51 +0000 [e7edb59db6]  Corey Farrell <git@cfware.com>

	* res_mwi_external_ami: Use module version of AMI registration.

	  Use ast_manager_register_xml for res_mwi_external_ami manager
	  actions.  This ensures the module is held open while any of
	  the actions are being run.

	  ASTERISK-25117 #close
	  Reported by: Corey Farrell

	  Change-Id: Iececfdc2da498b2c32b9e09042f5f12292007ac7
2015-05-21 19:59 +0000  Asterisk Development Team <asteriskteam@digium.com>

	* asterisk 13.4.0-rc1 Released.

2015-05-21 14:56 +0000 [3fb2b375fe]  Matt Jordan <mjordan@digium.com>

	* Release summaries: Remove previous versions

2015-05-21 14:56 +0000 [9d9ae03842]  Matt Jordan <mjordan@digium.com>

	* .version: Update for 13.4.0-rc1

2015-05-21 14:56 +0000 [53a39083e5]  Matt Jordan <mjordan@digium.com>

	* .lastclean: Update for 13.4.0-rc1

2015-05-21 14:56 +0000 [7af8ef9346]  Matt Jordan <mjordan@digium.com>

	* realtime: Add database scripts for 13.4.0-rc1

2015-05-21 14:52 +0000 [20982c68d4]  Matt Jordan <mjordan@digium.com>

	* Release summaries: Correct summaries for 13.4.0-rc1

2015-05-21 13:17 +0000 [1bb62b037f]  mjordan <mjordan@lunkwill>

	* ChangeLog: Updated for 13.4.0-rc1

2015-05-21 13:17 +0000 [1e98a36699]  mjordan <mjordan@lunkwill>

	* Release summaries: Add summaries for 13.4.0-rc1

2015-05-21 13:15 +0000 [5c12e5ba72]  mjordan <mjordan@lunkwill>

	* .version: Update for 13.4.0-rc1

2015-05-21 13:15 +0000 [69292a9f11]  mjordan <mjordan@lunkwill>

	* .lastclean: Update for 13.4.0-rc1

2015-05-21 13:15 +0000 [628680803a]  mjordan <mjordan@lunkwill>

	* realtime: Add database scripts for 13.4.0-rc1

2015-05-21 13:05 +0000 [9d8a462356]  Matt Jordan <mjordan@digium.com>

	* ARI: Update version to 1.7.0

	  This patch updates the version of ARI to 1.7.0 to reflect the backwards
	  compatible changes that will be introduced in 13.4.0.

	  Change-Id: I6c36e6144da426412f25828a868e4df916bff60a

2015-05-21 07:22 +0000 [620054c527]  Matt Jordan <mjordan@digium.com>

	* Merge "audiohook.c: Difference in read/write rates caused continuous buffer resets" into 13
2015-05-21 07:21 +0000 [f5e195b44e]  Matt Jordan <mjordan@digium.com>

	* Merge "Logger: Reset defaults before processing config." into 13
2015-05-21 07:20 +0000 [e8a4e01c32]  Matt Jordan <mjordan@digium.com>

	* Merge "res/res_http_websocket: Add a pre-session established callback" into 13
2015-05-21 05:15 +0000 [3c98544543]  Joshua Colp <jcolp@digium.com>

	* Merge "main/sdp_srtp.c: allow SDP crypto tag to be up to 9 digits" into 13
2015-05-20 20:53 +0000 [9b6e228419]  Corey Farrell <git@cfware.com>

	* Logger: Reset defaults before processing config.

	  Reset options to default values before reloading config.  This ensures
	  that if a setting is removed or commented out of the configuration file
	  it is unset on reload.

	  ASTERISK-25112 #close
	  Reported by: Corey Farrell

	  Change-Id: Id24bb1fb0885c2c14cf8bd6f69a0c2ee7cd6c5bd

2015-05-20 19:05 +0000 [7fcf0a97b8]  George Joseph <george.joseph@fairview5.com>

	* app_playback: Suppress warnings on playback if channel hung up

	  If a channel hangs up while an audio file is playing, there's
	  no need to clutter up the logs with a warning so suppress it
	  if ast_check_hangup returns true.

	  Also, change warning to debug/2 in file.c if writing a frame
	  fails.  Same reasoning.

	  Change-Id: I2e66191af3c5b6e951c98e8f1c3fe3cf2cf7ed89
	  Reported-by: George Joseph <george.joseph@fairview5.com>
	  Tested-by: George Joseph <george.joseph@fairview5.com>

2015-05-14 15:21 +0000 [b1e8c0b9eb]  Kevin Harwell <kharwell@digium.com>

	* audiohook.c: Difference in read/write rates caused continuous buffer resets

	  Currently, everytime a sample rate change occurs (on read or write) the
	  associated factory buffers are reset. If the requested sample rate on a
	  read differed from that of a write then the buffers are continually reset
	  on every read and write. This has the side effect of emptying the buffer,
	  thus there being no data to read and then write to a file in the case of
	  call recording.

	  This patch fixes it so that an audiohook_list's rate always maintains the
	  maximum sample rate among hooks and formats. Audiohook sample rates are
	  only overwritten by this value when slin native compatibility is turned on.
	  Also, the audiohook sample rate can only overwrite the list's sample rate
	  when its rate is greater than that of the list or if compatibility is
	  turned off. This keeps the rate from constantly switching/resetting.

	  ASTERISK-24944 #close
	  Reported by: Ronald Raikes

	  Change-Id: Idab4dfef068a7922c09cc631dda27bc920a6c76f

2015-05-20 15:22 +0000 [4a450f863b]  Matt Jordan <mjordan@digium.com>

	* Merge "Fix potential crash after unload of func_periodic_hook or test_message." into 13
2015-05-19 13:01 +0000 [17d6ede337]  Corey Edwards <tensai@zmonkey.org>

	* main/sdp_srtp.c: allow SDP crypto tag to be up to 9 digits

	  ASTERISK-24887 #close
	  Reported by: Makoto Dei
	  Tested by: tensai

	  Change-Id: I6a96f572adb17f76b3acafe503a01c48eb5dd9bf

2015-05-13 09:55 +0000 [31cc24aad6]  Matt Jordan <mjordan@digium.com>

	* res/res_http_websocket: Add a pre-session established callback

	  This patch updates http_websocket and its corresponding implementation
	  with a pre-session established callback. This callback allows for
	  WebSocket server consumers to be notified when a WebSocket connection is
	  attempted, but before we accept it. Consumers can choose to reject the
	  connection, if their application specific logic allows for it.

	  As a result, this patch pulls out the previously private
	  websocket_protocol struct and makes it public, as
	  ast_websocket_protocol. In order to preserve backwards compatibility
	  with existing modules, the existing APIs were left as-is, and new APIs
	  were added for the creation of the ast_websocket_protocol as well as for
	  adding a sub-protocol to a WebSocket server.

	  In particular, the following new API calls were added:
	  * ast_websocket_add_protocol2 - add a protocol to the core WebSocket
	    server
	  * ast_websocket_server_add_protocol2 - add a protocol to a specific
	    WebSocket server
	  * ast_websocket_sub_protocol_alloc - allocate a sub-protocol object.
	    Consumers can populate this with whatever callbacks they wish to
	    support, then add it to the core server or a specified server.

	  ASTERISK-24988
	  Reported by: Joshua Colp

	  Change-Id: Ibe0bbb30c17eec6b578071bdbd197c911b620ab2

2015-05-14 22:05 +0000 [f9114179e6]  snuffy <snuffy22@gmail.com>

	* chan_pjsip: Fix crash during off-nominal when no endpoint specified.

	  Add missing return -1 when no endpoint name is specified.

	  ASTERISK-25086 #close
	  Reported by: snuffy

	  Change-Id: I9de76c2935a1f4e3f0cffe97a670106f5605e89e
2015-05-14 18:01 +0000 [dd78ab42e4]  George Joseph <george.joseph@fairview5.com>

	* res_pjsip_config_wizard/config: Fix template processing

	  The config wizard was always pulling the first occurrence of
	  a variable from an ast_variable list but this gets the template
	  value from the list instead of any overridden value.  This patch
	  creates ast_variable_find_last_in_list() in config.c and updates
	  res_pjsip_config_wizard to use it instead of
	  ast_variable_find_in_list.  Now the overridden values, where they
	  exist, are used instead of template variables.

	  Updated test_config to test the new API.

	  ASTERISK-25089 #close

	  Reported-by: George Joseph <george.joseph@fairview5.com>
	  Tested-by: George Joseph <george.joseph@fairview5.com>
	  Change-Id: Ifa7ddefc956a463923ee6839dd1ebe021c299de4

2015-05-15 01:54 +0000 [091b436007]  snuffy <snuffy22@gmail.com>

	* cdr: Fix 'core show channel' CDR variable truncation.

	  When the new Bridging API was implemented, the workspace variable
	  changed to a malloc'd string, causing sizeof() to always be 8 (char).

	  Revert back to stored on stack string for workspace.

	  ASTERISK-25090 #close

	  Change-Id: I51e610ae87371df771ce7693a955510efb90f8f7
2015-05-14 15:20 +0000 [8697a49ef9]  Joshua Colp <jcolp@digium.com>

	* Merge "sorcery: Add API to insert/remove a wizard to/from an object type's list" into 13
2015-05-14 15:19 +0000 [aea349a87e]  Joshua Colp <jcolp@digium.com>

	* Merge "Message.c: Clear message channel frames on cleanup" into 13
2015-05-14 00:06 +0000 [6b7282ca40]  Corey Farrell <git@cfware.com>

	* Fix potential crash after unload of func_periodic_hook or test_message.

	  These modules save a pointer to the context they create on load, and
	  use that pointer to destroy the context at unload.  It is not safe
	  to save this pointer, it is replaced during load of pbx_config,
	  pbx_lua or pbx_ael.

	  This change causes the modules to pass NULL to ast_context_destroy,
	  a safer way to perform the unregistration since it does not use
	  a pointer that could become invalid.

	  ASTERISK-25085 #close
	  Reported by: Corey Farrell

	  Change-Id: I6a00ec8e38046058f97dc703e1adcde9bf517835
2015-05-14 05:02 +0000 [8f8d54a18e]  Joshua Colp <jcolp@digium.com>

	* Merge "main/manager.c: Bugfix sort action_manager by alphabetically" into 13
2015-05-13 15:41 +0000 [02c5130589]  Jonathan Rose <jrose@digium.com>

	* Message.c: Clear message channel frames on cleanup

	  The message channel is a special channel that doesn't actually process frames.
	  However, certain actions can cause frames to be placed in the channel's read
	  queue including the Hangup application which is called on the channel after
	  each message is processed. Since the channel will continually be reused for
	  many messages, it's necessary to flush these frames at some point.

	  ASTERISK-25083 #close
	  Reported by: Jonathan Rose

	  Change-Id: Idf18df73ccd8c220be38743335b5c79c2a4c0d0f

2015-05-13 15:44 +0000 [586da882bc]  Joshua Colp <jcolp@digium.com>

	* Merge "app_voicemail: fix moving when old messages full" into 13
2015-05-12 17:45 +0000 [d49d64b79c]  Jonathan Rose <jrose@digium.com>

	* app_voicemail: fix moving when old messages full

	  When completing voicemail playback of a message in the 'INBOX', the
	  message gets moved to the 'Old' messages folder. Without this patch, if
	  the 'Old' folder is already at its set limit, then the 'INBOX' message will
	  simply be deleted. With this patch, the flag to delete the message will be
	  removed if the save_to_folder function indicates that the message could
	  not be moved due to a full folder.

	  ASTERISK-25082 #close
	  Reported by: Jonathan Rose
	  Review: https://gerrit.asterisk.org/#/c/448/

	  Change-Id: I2be440a09f42e2d06d50975c40d1ad7f836ecb3f
2015-05-13 14:20 +0000 [51478575e4]  Joshua Colp <jcolp@digium.com>

	* Merge "General: Fix recent menuselect-related cross compile regression" into 13
2015-05-13 12:26 +0000 [5fcaf727cc]  Joshua Colp <jcolp@digium.com>

	* Merge "res_config_mysql: Fix broken column type checking" into 13
2015-05-13 12:24 +0000 [6a12b0634b]  Joshua Colp <jcolp@digium.com>

	* Merge "chan_dahdi/sig_pri: Fix crash on ISDN call hangup collision." into 13
2015-05-04 20:11 +0000 [9b13536fed]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* main/manager.c: Bugfix sort action_manager by alphabetically

	  Fix the alphabetic order added on ast_manager_register_struct. The order
	  for struct manager_action added is not working, this change fixes the
	  problem.

	  Change-Id: I149da0cd06c3c4445d7516cc303358e9f26f8b4b

2015-05-08 18:01 +0000 [e67e8d5c7f]  Alexandre Fournier <alexandre.fournier@kiplink.fr>

	* res_config_mysql: Fix broken column type checking

	  MySQL configuration engine contains a bug in require_mysql(). This
	  function is used for column type checking in tables. This bug only
	  affects DATETIME, DATE and FLOAT types.

	  It came from mixing the first condition (switch-case-like
	  if/then/else), to check the expected column type, with the second
	  condition, to check the actual column type against the expected column
	  type. Both conditions must be checked separately in order to avoid the
	  execution of the wrong block.

	  ASTERISK-18252 #comment This patch might fix the issue
	  Reported by: Gareth Blades

	  ASTERISK-25041 #close
	  Reported by: Alexandre Fournier
	  Tested by: Alexandre Fournier

	  Change-Id: I0b8bf7e68ab938be8e6525a249260cb648cb0bfa

2015-05-10 07:37 +0000 [16f602f5c2]  Yousf Ateya <y.ateya@starkbits.com>

	* res_rtp_asterisk: Correction for the limit which detects that a packet is DTLS.

	  First byte of DTLS packet shall be in range 20-63, not 20-64. Refer to RFC
	  https://tools.ietf.org/html/rfc5764#section-5.1.2 for correct values.

	  Change-Id: Iae6fa0d72b37c36a27fe40686e0ae6fba3afec31

2015-05-13 04:35 +0000 [62422712f7]  Joshua Colp <jcolp@digium.com>

	* Merge "cdr_pgsql: Use PQescapeStringConn for escaping names." into 13
2015-05-12 17:34 +0000 [c780b6e431]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi/sig_pri: Fix crash on ISDN call hangup collision.

	  If an ISDN call is hungup by both sides at the same time a crash could
	  happen.

	  * Added missing NULL checks for the owner channel after calling
	  pri_queue_pvt_cause_data() in two places.  Code after those calls need to
	  check the owner channel pointer for NULL before use because
	  pri_queue_pvt_cause_data() needs to do deadlock avoidance to lock the
	  owner and the owner may get hung up.

	  ASTERISK-21893 #close
	  Reported by:  Alexandr Gordeev

	  Change-Id: Ica3e266ebc7a894b41d762326f08653e1904bb9a

2015-05-10 02:26 +0000 [6627de830b]  Sebastian Kemper <sebastian_ml@gmx.net>

	* General: Fix recent menuselect-related cross compile regression

	  MAKE_MENUSELECT currently sets CC to CC, which is the compiler for the
	  target platform. But menuselect is to be run on the build system, so
	  BUILD_CC needs to be used instead - like it was in the past, before the
	  recent changes (https://reviewboard.asterisk.org/r/4370/). This is the
	  patch for ASTERISK-25074.

	  ASTERISK-25074 #close
	  Reported by: Sebastian Kemper
	  Tested by: Sebastian Kemper

	  Change-Id: I8a2b1fc5deb6ad2b80f49baca35b1b13d468ebf8

2015-05-05 15:32 +0000 [637c8f065e]  George Joseph <george.joseph@fairview5.com>

	* sorcery: Add API to insert/remove a wizard to/from an object type's list

	  Currently you can 'apply' a wizard to an object type but the wizard
	  always goes at the end of the object type's wizard list.  This patch
	  adds a new ast_sorcery_insert_wizard_mapping function that allows
	  you to insert a wizard anyplace in the list.  I.E.  You could
	  add a caching wizard to an object type and place it before all
	  wizards.

	  ast_sorcery_get_wizard_mapping_count and
	  ast_sorcery_get_wizard_mapping were added to allow examination
	  of the mapping list.

	  ast_sorcery_remove_mapping was added to remove a mapping by name.

	  As part of this patch, the object type's wizard list was converted
	  from an ao2_container to an AST_VECTOR_RW.

	  A new test was added to test_sorcery for this capability.

	  ASTERISK-25044 #close

	  Change-Id: I9d2469a9296b2698082c0989e25e6848dc403b57

2015-05-12 01:31 +0000 [3cdb7950f0]  Corey Farrell <git@cfware.com>

	* Fix processing of asterisk.conf debug=yes.

	  The code which reads asterisk.conf supports processing the debug
	  option with ast_true, but ast_true returns -1.  This causes debug
	  to still be off, convert to 1 so debug will be on as requested.

	  ASTERISK-25042
	  Reported by: Corey Farrell

	  Change-Id: I3c898b7d082d914b057e111b9357fde46bad9ed6

2015-05-01 23:43 +0000 [6553a00770]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* cdr_pgsql: Use PQescapeStringConn for escaping names.

	  Use function PQescapeStringConn for escaping the name
	  of the table and schema instead of doing it manually.

	  Change-Id: I6709165e2d00463e9c813d24f17830ad4910b599

2015-05-12 05:38 +0000 [8523a5ed09]  Joshua Colp <jcolp@digium.com>

	* Merge "vector:  Add REMOVE, ADD_SORTED and RESET macros" into 13
2015-05-09 16:58 +0000 [ea917fefaf]  George Joseph <george.joseph@fairview5.com>

	* vector:  Add REMOVE, ADD_SORTED and RESET macros

	  Based on feedback from Corey Farrell and Y Ateya, a few new
	  macros have been added...

	  AST_VECTOR_REMOVE which takes a parameter to indicate if
	  order should be preserved.

	  AST_VECTOR_ADD_SORTED which adds an element to
	  a sorted vector.

	  AST_VECTOR_RESET which cleans all elements from the vector
	  leaving the storage intact.

	  Change-Id: I41d32dbdf7137e0557134efeff9f9f1064b58d14

2015-05-11 07:07 +0000 [d5864a358c]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* pbx/pbx_spool: Fix issue when call files were executed too early

	  pbx_spool used to delete/move the call file upon successful outgoing
	  call completion, but did not delete it from in-memory list of files
	  (dirlist, used only when compiled with inotify/kqueue support).
	  That resulted in an extra attempt to process that filename after
	  retrytime seconds.
	  Then, if a new file with the same name appears that is scheduled
	  in future further than the completed one plus its retrytime,
	  then it gets executed earlier than expected.

	  This patch fixes remove_from_queue function to also remove the entry
	  from the dirlist.

	  ASTERISK-17069 #close
	  Reported by: Jeremy Kister

	  ASTERISK-24442 #close
	  Reported by: tootai

	  Change-Id: If9ec9b88073661ce485d6b008fd0b2612e49a28b

2015-05-08 14:47 +0000 [4dbd4021c9]  Rusty Newton <rnewton@digium.com>

	* configs/basic-pbx: Modified main IVR to play new Allison prompt.

	  The main IVR was playing demo-congrats. I've switched it over to the
	  basic-pbx-ivr-main file that we added in core sounds 1.4.27. This prompt
	  has Allison prompting the user with the actual IVR menu.

	  ASTERISK-24892 #close

	  Change-Id: Ifb749616ff8e156a1031ddaddfcc9244767a095d

2015-05-08 15:55 +0000 [7111ba6df4]  Matt Jordan <mjordan@digium.com>

	* Merge "tcptls: Avoiding ERR_remove_state in OpenSSL." into 13
2015-05-08 10:39 +0000 [613a461c3d]  Sean Bright <sean@malleable.com>

	* res_rtp_asterisk: Issue ERROR if res_srtp is not found.

	  While trying to get WebRTC working with chan_pjsip, I was running
	  into the following error:

	      Attempted to set an invalid DTLS-SRTP configuration on RTP
	      instance...

	  Josh helpfully pointed out that res_srtp.so might not be loaded, and
	  sure enough, it wasn't. This patch adds a ERROR indiciating as much
	  to hopefully help others having a similar problem.

	  Change-Id: I13aa477b47b299876728a21b130998a0ea6cd19f

2015-05-07 17:49 +0000 [394fcb5eab]  Rusty Newton <rnewton@digium.com>

	* sounds: Add Swedish sounds to Makefile and XML

	  Added the necessary lines to the Makefile and sounds.xml so we'll have the
	  Swedish sounds in all available formats in menuselect.

	  See also: Swedish sounds were added into the core sounds release 1.4.27.

	  ASTERISK-24744 #close

	  Reported by: Tove Hjelm
	  Tested by: Rusty Newton

	  Change-Id: Ib6f4fd177afd1667b2402735034001d4d055a908

2015-05-08 09:54 +0000 [30c3b254c5]  Joshua Colp <jcolp@digium.com>

	* Merge "doc: Make progdocs play nice with git" into 13
2015-05-05 11:35 +0000 [2115f11b54]  Alexander Traud (License 6520)

	* tcptls: Avoiding ERR_remove_state in OpenSSL.

	  ERR_remove_state was deprecated with OpenSSL 1.0.0 and was replaced by 
	  ERR_remove_thread_state. ERR_load_SSL_strings and ERR_load_BIO_strings were 
	  called by SSL_load_error_strings already and got removed. These changes allow 
	  OpenSSL forks like BoringSSL to be used with Asterisk.

	  ASTERISK-25043 #close
	  Reported by: Alexander Traud
	  patches:
	    asterisk_with_BoringSSL.patch uploaded by Alexander Traud (License 6520)

	  Change-Id: If1c0871ece21a7e0763fafbd2fa023ae49d4d629
	  (cherry picked from commit 247fef66537b59649e7571d64e2c574a106dbd65)

2015-05-07 14:54 +0000 [5392e970d0]  George Joseph <george.joseph@fairview5.com>

	* doc: Make progdocs play nice with git

	  Moved contrib/asterisk-ng-doxygen to doc/asterisk-ng-doxygen.in

	  Changed /Makefile to copy asterisk-ng-doxygen.in to
	  asterisk-ng-doxygen then modify it with version instead of
	  modifying asterisk-ng-doxygen directly.  Updated clean
	  targets as well.

	  Updated /.gitignore and doc/.gitignore.

	  Change-Id: I38712d3e334fa4baec19d30d05de8c6f28137622

2015-05-07 15:10 +0000 [1e44d1bef9]  Joshua Colp <jcolp@digium.com>

	* Merge "res_pjsip_exten_state: Fix race condition between sending NOTIFY and termination" into 13
2015-05-04 14:43 +0000 [608f0a94ee]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* contrib/editors: Fix vim syntax highlighting of comments in config files

	   * Added a lookbehind to one-line comment matcher to skip escaped
	     semicolons.
	   * Added support for block comments.

	  Change-Id: Id17dfaeda8ed4be572e8107a0c010066584aaee7

2015-05-07 13:30 +0000 [22c6c12af2]  Matt Jordan <mjordan@digium.com>

	* Merge "vector:  Additional enhancements and fixes" into 13
2015-05-06 13:24 +0000 [d649d682c4]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_exten_state: Fix race condition between sending NOTIFY and termination

	  The res_pjsip_exten_state module currently has a race condition between
	  processing the extension state callback from the PBX core and processing
	  the subscription shutdown callback from res_pjsip_pubsub. There is currently
	  no synchronization between the two. This can present a problem as while
	  the SIP subscription will remain valid the tree it points to may not.
	  This is in particular a problem as a task to send a NOTIFY may get queued
	  which will try to use the tree that may no longer be valid.

	  This change does the following to fix this problem:

	  1. All access to the subscription tree is done within the task that
	  sends the NOTIFY to ensure that no other thread is modifying or
	  destroying the tree. This task executes on the serializer for the
	  subscriptions.

	  2. A reference to the subscription serializer is kept to ensure it
	  remains valid for the lifetime of the extension state subscription.

	  3. The NOTIFY task has been changed so it will no longer attempt
	  to send a NOTIFY if the subscription has already been terminated.

	  ASTERISK-25057 #close
	  Reported by: Matt Jordan

	  Change-Id: I0b3cd2fac5be8d9b3dc5e693aaa79846eeaf5643

2015-05-07 07:02 +0000 [9322bc6ff6]  Matt Jordan <mjordan@digium.com>

	* Merge "chan_dahdi: Improve force_restart_unavailable_chans option description." into 13
2015-05-07 06:39 +0000 [b1514362ef]  Matt Jordan <mjordan@digium.com>

	* Merge "res_stasis_snoop: Spying on a single direction continually increases CPU" into 13
2015-05-07 06:28 +0000 [652ee2ff83]  Joshua Colp <jcolp@digium.com>

	* Merge "features: Fix crash when transferee hangs up during DTMF attended transfer." into 13
2015-05-05 20:22 +0000 [5f9aea8e3c]  George Joseph <george.joseph@fairview5.com>

	* vector:  Additional enhancements and fixes

	  After using the new vector stuff for real I found...

	  A bug in AST_VECTOR_INSERT_AT that could cause a seg fault.

	  The callbacks needed to be closer to ao2_callback in behavior
	  WRT to CMP_MATCH and CMP_STOP behavior and the ability to return
	  a vector of matched entries.

	  A pre-existing issue with APPEND and REPLACE was also fixed.

	  I also added a new macro to test.h that acts like ast_test_validate
	  but also accepts a return code variable and a cleanup label.  As well
	  as printing the error, it sets the rc variable to AST_TEST_FAIL and
	  does a goto to the specified label on error.  I had a local version
	  of this in test_vector so I just moved it.

	  ASTERISK-25045

	  Change-Id: I05e5e47fd02f61964be13b7e8942bab5d61b29cc

2015-05-04 17:28 +0000 [68513e00f7]  Kevin Harwell <kharwell@digium.com>

	* res_stasis_snoop: Spying on a single direction continually increases CPU

	  Creating a snoop channel in ARI and spying only on a single direction (in or
	  out) results in CPU utilization continually increasing until the CPU is fully
	  consumed. This occurs because frames are being put in the opposing direction's
	  slin factory queue, but not being removed.

	  Fixed the problem by always reading and disposing of frames from the opposite
	  queue of the direction selected.

	  ASTERISK-24938 #closes

	  Change-Id: I935bfd15f1db958f364d9d6b3b45582c0113dd60
2015-05-06 16:00 +0000 [904f5d98f6]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi: Improve force_restart_unavailable_chans option description.

	  ASTERISK-25034
	  Reported by: Richard Mudgett

	  Change-Id: I1ff8f02124d2f4abd632a050da52c64285bb7f30

2015-05-06 07:42 +0000 [d6ffbe39b0]  Joshua Colp <jcolp@digium.com>

	* Merge "app_queue: Fix queue_log EXITWITHTIMEOUT containing only 1 parameter" into 13
2015-05-06 06:13 +0000 [dfb292ce3e]  Matt Jordan <mjordan@digium.com>

	* Merge "res_ari_bridges: Add missing dependencies." into 13
2015-05-05 21:05 +0000 [50e90f9121]  Matt Jordan <mjordan@digium.com>

	* Merge "pbx_config: Register manager actions with module version of macro." into 13
2015-05-05 18:17 +0000 [be1260a35f]  Richard Mudgett <rmudgett@digium.com>

	* features: Fix crash when transferee hangs up during DTMF attended transfer.

	  A crash happens with this sequence of steps:
	  1) Party A is connected to party B.
	  2) Party B starts a DTMF attended transfer.
	  3) Party A hangs up while party B is dialing party C.

	  When party A hangs up the bridge that party A and party B are in is
	  dissolved and party B is kicked out of the bridge.  When party B finishes
	  dialing party C he attempts to move to the new bridge with party C.  Since
	  party B is no longer in a bridge the attempted move dereferences a NULL
	  bridge_channel pointer and crashes.

	  * Made the hold(), unhold(), ringing(), and the bridge_move() functions
	  tolerant of the channel not being in a bridge.  The assertion that party B
	  is always in a bridge is not true if the bridged peer of party B hangs up
	  and dissolves the bridge.  Being tolerant of not being in a bridge allows
	  the peer hangup stimulus to be processed by the FSM.

	  * Made the bridge_move() function return void since where the return value
	  for a failed move was checked generated a FSM coding ERROR message for a
	  normal off-nominal condition.

	  * Eliminated most uses of RAII_VAR in bridge_basic.c.

	  ASTERISK-25003 #close
	  Reported by: Artem Volodin

	  Change-Id: Ie2c1b14e5e647d4ea6de300bf56d69805d7bcada

2015-05-05 15:40 +0000 [8b0f85ac06]  George Joseph <george.joseph@fairview5.com>

	* test_vector: Fix build breakage caused by ASTERISK_REGISTER_FILE

	  My 13 version of test_vector had an ASTERISK_REGISTER_FILE() macro
	  call at the top which is only supported in master.  Once removed
	  builds are successful.

	  Change-Id: I7cac8b669bed6de543bbf4e2eec3cffc9741acdd

2015-05-05 14:48 +0000 [87263b47b5]  Ivan Poddubny <ivan.poddubny@gmail.com>

	* app_queue: Fix queue_log EXITWITHTIMEOUT containing only 1 parameter

	  This patch fixes EXITWITHTIMEOUT queue_log entry to always come with 3
	  parameters: position, original position and waiting time.

	  ASTERISK-25038 #close
	  Reported by: Etienne Lessard

	  Change-Id: I0c62045922e26bee2125e93aee1dee17eee79618

2015-05-05 13:13 +0000 [2d9081b5ec]  Matt Jordan <mjordan@digium.com>

	* Merge "stasis: Fix dial masquerade datastore lifetime" into 13
2015-05-05 12:45 +0000 [8ca25dfd7e]  Matt Jordan <mjordan@digium.com>

	* Merge "vector:  Traversal, retrieval, insert and locking enhancements" into 13
2015-05-05 09:47 +0000 [366ea63438]  Corey Farrell <git@cfware.com>

	* res_ari_bridges: Add missing dependencies.

	  Missed this module in the previous commit.  res_ari_bridges uses symbols
	  from res_stasis_playback and res_stasis_recording.

	  ASTERISK-25027 #close
	  Reported by: Corey Farrell

	  Change-Id: I90bf756abd25adfc4920d2869ebe7feb636b8c5f

2015-05-05 09:27 +0000 [69ae8cf0a4]  Corey Farrell <git@cfware.com>

	* pbx_config: Register manager actions with module version of macro.

	  Switch manager actions in pbx_config to use the registration macro that
	  passes the module pointer, allowing pbx_config reference to be bumped
	  while the manager actions run.

	  ASTERISK-25061 #close
	  Reported by: Corey Farrell

	  Change-Id: I422c50dd74814616ac10c5e9c6598a0b1bc2c44e

2015-05-04 12:16 +0000 [181ae3b8d9]  Joshua Colp <jcolp@digium.com>

	* stasis: Fix dial masquerade datastore lifetime

	  A recent change went into Asterisk which added reference counts to the
	  channels stored in a dial masquerade datastore. Unfortunately this
	  included a reference to the caller in a dialing operation. While all
	  of the dialed targets have the datastore removed from them upon dialing
	  completion this did not occur for the caller, causing it to have a
	  reference to itself that could go never go away (as it depended on
	  the destruction of the datastore which only happened when the channel
	  was destroyed). This resulted in the caller channel remaining on the
	  system despite it having hung up.

	  This change does the following to fix this issue:

	  1. The dial masquerade datastore is now removed from the caller upon
	  dialing completion, just like the dialed targets.
	  2. Upon destruction of the caller all the dialed targets are also
	  removed from the dial masquerade datastore (just in case).
	  3. The reference to the caller has been removed as it should not be
	  possible for the datastore to now be valid/useful after the lifetime
	  of the caller has ended.

	  ASTERISK-25025 #close

	  Change-Id: I1ef4ca5ca04980028604cc2af5d2992ac3431b3f

2015-05-01 19:25 +0000 [7a7e9733c2]  George Joseph <george.joseph@fairview5.com>

	* vector:  Traversal, retrieval, insert and locking enhancements

	  Renamed AST_VECTOR_INSERT to AST_VECTOR_REPLACE because it really
	  does replace not insert.  The few users of AST_VECTOR_INSERT were
	  refactored.  Because these are macros, there should be no ABI
	  compatibility issues.

	  Added AST_VECTOR_INSERT_AT that actually inserts an element into the
	  vector at a specific index pushing existing elements to the right.

	  Added AST_VECTOR_GET_CMP that can retrieve from the vector based
	  on a user-provided compare function.

	  Added AST_VECTOR_CALLBACK function that will execute a function
	  for each element in the vector.  Similar to ao2_callback and
	  ao2_callback_data functions although the vector callback can take
	  a variable number of arguments.  This should allow easy migration
	  to a vector where a container might be too heavy.

	  Added read/write locked vector and lock manipulation macros.

	  Added unit tests.

	  ASTERISK-25045 #close

	  Change-Id: I2e07ecc709d2f5f91bcab8904e5e9340609b00e0

2015-05-03 13:55 +0000 [040d2f8558]  Corey Farrell <git@cfware.com>

	* main/test.c: Add test to verify there were no registration errors.

	  This adds a test that will fail if any test failed to register. Also fail
	  if any test registration produced a warning about missing a leading or
	  trailing slash.

	  ASTERISK-25053 #close
	  Reported by: Corey Farrell

	  Change-Id: I93e50b8fcbcfa7f1f5b41b2c44a51685c09529c3

2015-05-04 09:26 +0000 [626bffc4c2]  Matt Jordan <mjordan@digium.com>

	* Merge "contrib/ast-db-manage: Add Postgres ENUM type support in auto DTMF mode update" into 13
2015-05-04 09:26 +0000 [87fb7fc165]  Matt Jordan <mjordan@digium.com>

	* Merge "cdr/cdr_csv.c: Add a new option to enable columns added in Asterisk 1.8" into 13
2015-05-04 09:25 +0000 [81c27127aa]  Matt Jordan <mjordan@digium.com>

	* Merge "Format Interfaces: Prevent unload except by shutdown." into 13
2015-05-04 07:46 +0000 [743fed71fc]  Matt Jordan <mjordan@digium.com>

	* Merge "res_odbc: Use negative connection cache for all connections" into 13
2015-04-21 11:52 +0000 [3dcec04ab5]  Martin Tomec <tomec.martin@gmail.com>

	* res_odbc: Use negative connection cache for all connections

	  Apply the negative connection cache setting to all connections,
	  even those that are not pooled. This ensures that the connection
	  will not be re-established before the negative connection cache
	  time is met.

	  ASTERISK-22708 #close

	  Change-Id: I431cc2e8584ab0b6908b3523d0a0e18c9a527271
2015-05-04 04:03 +0000 [74799b3fe2]  Matt Jordan <mjordan@digium.com>

	* Merge "Remove unneeded uses of optional_api providers." into 13
2015-05-04 04:03 +0000 [78c02f8e88]  Matt Jordan <mjordan@digium.com>

	* Merge "Update configure.ac/Makefile for clang" into 13
2015-05-03 21:03 +0000 [f38066fcad]  Corey Farrell <git@cfware.com>

	* Format Interfaces: Prevent unload except by shutdown.

	  Format interfaces cannot be unregistered, so the modules that provide them
	  need to be held open except by shutdown.

	  ASTERISK-25054 #close
	  Reported by: Corey Farrell

	  Change-Id: Iadbd9675bf0d30b8fded5a739b163db3ea2db8f3

2015-05-03 20:28 +0000 [e76a6a97bf]  Matt Jordan <mjordan@digium.com>

	* contrib/ast-db-manage: Add Postgres ENUM type support in auto DTMF mode update

	  The upgrade script for auto DTMF mode (31cd4f4891ec) added in 88b0fa7755
	  failed to add ENUM support for Postgres databases. This requires a
	  specific import from the sqlalchemy.dialects.postgresql package. This
	  patch corrects this error, which allows for Postgres update scripts to
	  be generated.

	  ASTERISK-24706

	  Change-Id: I4742ac8efa533cd6f18e0bdd907b339a9aedf015

2015-05-01 19:50 +0000 [92120247e9]  D Tucny <d@tucny.com>

	* term: send proper reset sequence when black background is forced

	  When using the force black background command-line option or configuration
	  option an invalid reset sequence is sent following a coloured output item 
	  in the CLI, the result is that the colour is not 'turned off' and continues
	  until the next non-default coloured text output.

	  A reset sequence is already defined in term.c, but the ast_term_reset
	  function doesn't use it, instead building it's own invalid sequence and 
	  returning that.

	  This patch changes that behaviour, removing the building of a reset sequence
	  and instead using the pre-built constant 'enddata' which is a suitable reset
	  sequence for this purpose.

	  ASTERISK-24896 #close
	  Reported by: Dan Tucny

	  Change-Id: I56323899123ae3264900389cae1f5b252aa3bf43

2015-05-03 09:20 +0000 [13819a34c4]  Matt Jordan <mjordan@digium.com>

	* Merge "Build System: Prevent unneeded changes to asterisk/buildopts.h." into 13
2015-05-03 09:19 +0000 [b518ba1c6c]  Matt Jordan <mjordan@digium.com>

	* Merge "res_pjsip_dlg_options: Fix MODULEINFO section." into 13
2015-05-02 18:58 +0000 [ad6ea29697]  Corey Farrell <git@cfware.com>

	* Remove unneeded uses of optional_api providers.

	  A few cases exist where headers of optional_api provders are included but
	  not needed.  This causes unneeded calls to ast_optional_api_use.

	  * Don't include optional_api.h from sip_api.h.
	  * Move 'struct ast_channel_monitor' to channel.h.
	  * Don't include monitor.h from chan_sip.c, channel.c or features.c.

	  The move of struct ast_channel_monitor is needed since channel.c depends on
	  it.  This has no effect on users of monitor.h since channel.h is included
	  from monitor.h.

	  ASTERISK-25051 #close
	  Reported by: Corey Farrell

	  Change-Id: I53ea65a9fc9693c89f8bcfd6120649bfcfbc3478

2015-05-02 10:19 +0000 [9888562c8c]  Matt Jordan <mjordan@digium.com>

	* Merge "include/asterisk/channel.h: Fix typo" into 13
2015-05-02 10:17 +0000 [b4000f2d44]  Matt Jordan <mjordan@digium.com>

	* Merge "Astobj2: Fix initialization order of refdebug and AO2_DEBUG." into 13
2015-04-30 02:07 +0000 [525c8c8689]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* include/asterisk/channel.h: Fix typo

	  Change-Id: Ie584b85e16a94c255e60d0b1732ef9686464fef3

2015-05-02 02:15 +0000 [63196a8256]  Corey Farrell <git@cfware.com>

	* res_pjsip_dlg_options: Fix MODULEINFO section.

	  Removed the extra space before "MODULEINFO" in res_pjsip_dlg_options.
	  This extra space prevented any of the dependencies from being seen by
	  menuselect, so building with default options would fail if PJSIP was
	  not installed.

	  This also makes the tool that extracts information for menuselect
	  tolerant of multiple spaces in the future.

	  ASTERISK-25033 #close
	  Reported by: Peter Whisker

	  Change-Id: Iccd54846f70c4a7a50cb5bf70b7bb5cb4bab3698

2015-04-29 03:03 +0000 [ac1f0090eb]  Corey Farrell <git@cfware.com>

	* Build System: Prevent unneeded changes to asterisk/buildopts.h.

	  * Add AST_DEVMODE to BUILDOPTS
	  * Remove CFLAGS that do not effect ABI from BUILDOPTS.
	  * Use BUILDOPTS to generate AST_BUILDOPT_SUM.
	  * Remove loop that defined AST_MODULE_*

	  These changes ensure that only ABI effecting options are considered for
	  AST_BUILDOPT_SUM.  This also reduces unneeded full system rebuilds caused
	  by enabling or disabling one module that another is dependent on.

	  ASTERISK-25028
	  Reported by: Corey Farrell

	  Change-Id: I2c516d93df9f6aaa09ae079a8168c887a6ff93a2

2015-05-01 13:22 +0000 [5875bf183c]  Corey Farrell <git@cfware.com>

	* Astobj2: Fix initialization order of refdebug and AO2_DEBUG.

	  This ensures that refdebug is initialized before AO2_DEBUG if
	  both are enabled, since AO2_DEBUG allocates a container.

	  This change also makes AO2_DEBUG initialization critical, a
	  failure will abort Asterisk startup.  This is needed since
	  the failure would be caused by reg_containers allocation
	  failure, and that would result in a segmentation fault by
	  ao2_container_register later in startup.

	  ASTERISK-25048 #close
	  Reported by: Corey Farrell

	  Change-Id: I9a243ea3fc5653b48b931ba6d61971cb2e530244

2015-04-29 14:49 +0000 [1b19c15f17]  Matt Jordan <mjordan@digium.com>

	* main/pbx: Improve performance of dialplan reloads with a large number of hints

	  The PBX core maintains two hash tables for hints: a container of the
	  actual hints (hints), along with a container of devices that are watching that
	  hint (hintdevices). When a dialplan reload occurs, each hint in the hints
	  container is destroyed; this requires a lookup in the container of devices to
	  find the device => hint mapping object. In the current code, this performs an
	  ao2_callback, iterating over each of the device to hint objects in the
	  hintdevices container. For a large number of hints, this is extremely
	  expensive: dialplan reloads with 20000 hints could take several minutes
	  in just this phase.

	  This patch improves the performance of this step in the dialplan reloads
	  by caching which devices are watching a hint on the hint object itself.
	  Since we don't want to create a circular reference, we just cache the
	  name of the device. This allows us to perform a smarter ao2_callback on
	  the hintdevices container during hint removal, hashing on the name of the
	  device and returning an iterator to the matching names. The overall
	  performance improvement is rather large, taking this step down to a number of
	  seconds as opposed to minutes.

	  In addition, this patch also registers the hint containers in the PBX
	  core with the astobj2 library. This allows for reasonable debugging to
	  hash collisions in those containers.

	  ASTERISK-25040 #close
	  Reported by: Matt Jordan

	  Change-Id: Iedfc97a69d21070c50fca42275d7b3e714e59360

2015-05-01 06:55 +0000 [ec0f80b6e8]  Matt Jordan <mjordan@digium.com>

	* Merge "res_pjsip_outbound_authenticator_digest: Add missing outbound authenticator callback." into 13
2015-05-01 06:55 +0000 [ed51fbbe9c]  Matt Jordan <mjordan@digium.com>

	* Merge "Prevent potential crash on blond transfer." into 13
2015-04-30 15:54 +0000 [3efe0df044]  Corey Farrell <git@cfware.com>

	* Sample Configs: Fix syntax error in pjsip.conf

	  The sample pjsip.conf has a few comment lines that are missing the
	  semicolons at the start of the comment, causing the config to fail
	  load.

	  Change-Id: I776a38c916a7df7ee3e072fd0b21dbf4cc457352

2015-04-30 15:20 +0000 [077979618b]  Mark Michelson <mmichelson@digium.com>

	* Prevent potential crash on blond transfer.

	  Scenario:
	  Alice calls Bob. Bob performs a blond transfer to Carol. Carol rejects
	  the incoming call (or some other immediate circumstance causes Carol not
	  to answer the call)

	  What occurs in this case is that when the bridge between Alice and Bob
	  breaks, Alice is told to masquerade into Bob's channel that had placed
	  the call to Carol. The actual masquerade goes down without a hitch.
	  However, a channel fixup callback that attempts to publish dial events
	  over Stasis has a crash. The reason for this crash is that the datastore
	  on Bob's channel that placed the outbound call to Carol only had a bare
	  pointer to Carol's channel. Since Carol rejected the incoming call,
	  Carol's channel has been hung up and freed, meaning accessing her
	  channel results in a crash.

	  The fix here is simple. The dial fixup code has been altered to hold
	  references to the involved channels and to drop those references when
	  freeing data.

	  ASTERISK-25025 #close
	  Reported by Chet Stevens

	  Change-Id: I54eedda207b8ec7a69263353b43abe5746aea197

2015-04-30 14:09 +0000 [4b8cddfb36]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_outbound_authenticator_digest: Add missing outbound authenticator callback.

	  The Asterisk 13 version of the fix for outbound registration was missing
	  a key component that set the outbound authenticator's callback that
	  creates an authenticated request based on an old request. This was
	  picked up by some outbound registration tests failing in the testsuite.

	  Change-Id: I5ca9379698c606da36bc38eaffccedaf64211ce3
2015-04-30 13:42 +0000 [415a0d0745]  Joshua Colp <jcolp@digium.com>

	* res_ari_device_states: Fix dependency on res_stasis_device_state.

	  The res_ari_device_states module depends on res_stasis_device_state,
	  not res_stasis_device_states.

	  Change-Id: I26e02ad37f9e36bcc859867e2fad1b90452ec3de

2015-04-30 11:11 +0000 [e0c6f88010]  Mark Michelson <mmichelson@digium.com>

	* Merge "chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option." into 13
2015-04-30 10:53 +0000 [d1bc86fc99]  Matt Jordan <mjordan@digium.com>

	* Merge "res_pjsip_outbound_registration: Add virtual line support." into 13
2015-04-29 14:29 +0000 [d3c310a28c]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option.

	  Some telco switches occasionally ignore ISDN RESTART requests.  The fix
	  for ASTERISK-19608 added an escape clause for B channels in the restarting
	  state if the telco ignores a RESTART request.  If the telco fails to
	  acknowledge the RESTART then Asterisk will assume the telco acknowledged
	  the RESTART on the second call attempt requesting the B channel by the
	  telco.  The escape clause is good for dealing with RESTART requests in
	  general but it does cause the next call for the restarting B channel to be
	  rejected if the telco insists the call must go on that B channel.

	  chan_dahdi doesn't really need to issue a RESTART request in response to
	  receiving a cause 44 (Requested channel not available) code.  Sending the
	  RESTART in such a situation is not required (nor prohibited) by the
	  standards.  I think chan_dahdi does this for historical reasons to deal
	  with buggy peers to get channels unstuck in a similar fashion as the
	  chan_dahdi.conf resetinterval option.

	  * Add the chan_dahdi.conf force_restart_unavailable_chans compatability
	  option that when disabled will prevent chan_dahdi from trying to RESTART
	  the channel in response to a cause 44 code.

	  ASTERISK-25034 #close
	  Reported by: Richard Mudgett

	  Change-Id: Ib8b17a438799920f4a2038826ff99a1884042f65
2015-04-30 06:38 +0000 [7f611fa0e8]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* cdr/cdr_csv.c: Add a new option to enable columns added in Asterisk 1.8

	  This patch adds a new option to cdr.conf, 'newcdrcolumns', that will handle CDR
	  columns added in Asterisk 1.8. The columns are:
	   * peeraccount
	   * linkedid
	   * sequence
	  When enabled, the columns in the database entry will be populated with the data
	  from the CDR.

	  ASTERISK-24976 #close

	  Change-Id: I51a57063f4ae5e194a9d933a8df45dc8a4534f0b

2015-04-30 06:04 +0000 [e332c7ed5e]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_outbound_registration: Fix double unref on error return.

	  When the PJSIP pjsip_regc_send function is invoked and an error
	  status returned the caller currently decrements the reference count
	  of the client state that it just incremented, assuming the
	  registration callback would not have been invoked. In practice
	  this is not correct. If the failure happens after the transaction
	  has been set up the callback will still be invoked. This will
	  cause the reference count to be incorrectly decremented twice, once
	  by the registration callback and second by the caller of
	  pjsip_regc_send.

	  This change makes it so that whether the callback is invoked or
	  not is known by the caller of pjsip_regc_send. Depending on
	  this it can know whether it is responsible for decrementing the
	  reference count of the client state or not.

	  ASTERISK-25037 #close
	  Reported by: Joshua Colp

	  Change-Id: I749dc12f3a22115c49c5d7d95ff42a5fa45319de

2015-04-20 13:03 +0000 [9c3ed42875]  Diederik de Groot <ddegroot@talon.nl>

	* Update configure.ac/Makefile for clang

	  Created autoconf/ast_check_raii.m4: contains AST_CHECK_RAII which
	  checks compiler requirements for RAII:
	  gcc: -fnested-functions support
	  clang: -fblocks (and if required -lBlocksRuntime)
	  The original check was implemented in configure.ac and now has it's
	  own file. This function also sets C_COMPILER_FAMILY to either gcc or
	  clang for use by makefile

	  Created autoconf/ast_check_strsep_array_bounds.m4 (contains
	  AST_CHECK_STRSEP_ARRAY_BOUNDS):
	  which checks if clang is able to handle the optimized strsep & strcmp
	  functions (linux). If not, the standard libc implementation should be
	  used instead. Clang + the optimized macro's work with:
	  strsep(char *, char []), but not with strsepo(char *, char *).
	  Instead of replacing all the occurences throughout the source code,
	  not using the optimized macro version seemed easier

	  See 'define __strcmp_gc(s1, s2, l2) in bits/string2.h':
	  llvm-comment: Normally, this array-bounds warning are suppressed for
	  macros, so that unused paths like the one that accesses __s1[3] are
	  not warned about.  But if you preprocess manually, and feed the
	  result to another instance of clang, it will warn about all the
	  possible forks of this particular if statement. Instead of switching
	  of this optimization, another solution would be to run the preproces-
	  sing step with -frewrite-includes, which should preserve enough
	  information so that clang should still be able to suppress the diag-
	  nostic at the compile step later on.

	  See also "https://llvm.org/bugs/show_bug.cgi?id=20144"
	  See also "https://llvm.org/bugs/show_bug.cgi?id=11536"

	  Makefile.rules: If C_COMPILER_FAMILY=clang then add two warning
	  suppressions:
	  -Wno-unused-value
	  -Wno-parentheses-equality
	  In an earlier review (reviewboard: 4550 and 4554), they were deemed a
	  nuisace and less than benefitial.

	  configure.ac:
	  Added AST_CHECK_RAII() see earlier
	  Added AST_CHECK_STRSEP_ARRAY_BOUNDS() see earlier
	  Removed moved content

	  ASTERISK-24917
	  Change-Id: I12ea29d3bda2254ad3908e279b7effbbac6a97cb

2015-04-29 16:43 +0000 [37a193da18]  Matt Jordan <mjordan@digium.com>

	* Merge "ARI: Fix missing dependencies." into 13
2015-04-29 16:42 +0000 [6a86b3555b]  Matt Jordan <mjordan@digium.com>

	* Merge "res_fax: allow 2400 transmission rate according to v.27ter standard" into 13
2015-04-29 16:15 +0000 [d4e207e27e]  Matt Jordan <mjordan@digium.com>

	* main/rtp_engine: Fix DTLS double-free introduced by 0b6410c4f8

	  The patch in 0b6410c4f8 did correctly fix a memory leak of the DTLS
	  structures in the RTP engine. However, when a 'core reload' is issued, a
	  double free of the memory pointed to by the char *'s in the DTLS
	  configuration struct can occur, as ast_rtp_dtls_cfg_free does not set
	  the pointers to NULL when they are freed.

	  This patch sets those pointers to NULL, preventing a second call to
	  ast_rtp_dtls_cfg_free from corrupting memory.

	  ASTERISK-25022

	  Change-Id: I820471e6070a37e3c26f760118c86770e12f6115

2015-04-29 13:05 +0000 [3fb6daeb55]  Kevin Harwell <kharwell@digium.com>

	* res_fax: allow 2400 transmission rate according to v.27ter standard

	  A previous set of patches (see: ASTERISK-22790 & ASTERISK-23231) made it so
	  a v.27 modem was not allowed to have a minimum transmission rate of 2400 bits
	  per second. This reverts all or some of those patches since according to the
	  v.27ter standard a rate of 2400 bits per second is also supported.

	  One of the original patches also added 9600 bits per second support for v.27.
	  This patch also removes that since v.27ter only supports 2400/4800 bits per
	  second.

	  Also, since Asterisk specifically supports v.27ter the enum was renamed to
	  better reflect this.

	  ASTERISK-24955 #close
	  Reported by: Matt Jordan

	  Change-Id: I4b9dfb6bf7eff08463ab47ee1a74224f27cae733

2015-04-29 10:46 +0000 [49ef81c15c]  Joshua Colp <jcolp@digium.com>

	* res_sorcery_config: Fix build issue due to syntax error.

	  Change-Id: Ic8322f04e37842848ad72cf2871bd0378f67c4ac

2015-04-28 00:29 +0000 [3278fe5327]  Ashley Sanders <asanders@digium.com>

	* chan_pjsip: Creating Channel Causes Asterisk to Crash When Duplicate AOR
	              Sections Exist in pjsip.conf

	  This patch modifies the current loading strategy of the pjsip configuration. If
	  duplicate sections (e.g. sections containing the same [id/type]) are defined in
	  [pjsip.conf], the loader will consider the configuration for the given type as
	  invalid when the duplicate section is encountered. The entire configuration
	  (including what was previously loaded) for the duplicate [id/type] sections
	  will be rejected and destroyed, an error message is logged and the load
	  processing for the given stops.

	  ASTERISK-24996
	  Reported By: Ashley Sanders

	  Change-Id: I35090ca4cd40f1f34881dfe701a329145c347aef

2014-11-04 06:03 +0000 [89f6719f7a]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_outbound_registration: Add virtual line support.

	  Virtual line support establishes a relationship between messages
	  related to an outbound registration and a local endpoint. This is
	  accomplished by attaching a parameter to the Contact of the outbound
	  registration and looking for it on any received requests. If the
	  parameter exists and can be matched to an outbound registration
	  the configured endpoint is associated with the request.

	  ASTERISK-24949 #close
	  Reported by: Joshua Colp

	  Change-Id: I7df909d2625479110a83fdd354c21ac539e8615d

2015-04-29 06:39 +0000 [d61f03c4f9]  Corey Farrell <git@cfware.com>

	* ARI: Fix missing dependencies.

	  ARI modules that are generated by 'make ari-stubs' are all dependent on
	  res_ari_model.  Additionally some of the same modules depend on one or more
	  res_stasis_* modules.

	  ASTERISK-25027 #close
	  Reported by: Corey Farrell

	  Change-Id: I8e07fe7e81fedacb87232f2b6f8b5f47927b4153

2015-04-29 06:26 +0000 [3e4624ad21]  Corey Farrell <git@cfware.com>

	* res_pjsip: Remove incorrect MODULEINFO from presence_xml.c.

	  Remove incorrect MODULEINFO block and unneeded header includes
	  from presence_xml.c.

	  ASTERISK-25027
	  Reported by: Corey Farrell

	  Change-Id: I977c609ab9d1fe05373027c4138900f6985990eb

2015-04-29 06:17 +0000 [fed9faab8d]  Corey Farrell <git@cfware.com>

	* Git Migration: Create doc/rest-api when needed.

	  Create the directory './doc/rest-api' at the start of 'make ari-stubs'
	  to prevent an error when documentation is generated.  The directory is
	  also added to git ignores.

	  ASTERISK-25027
	  Reported by: Corey Farrell

	  Change-Id: Iaccc7f0138501c23aa78feaca2f3cce9e68cbc1b

2015-04-29 05:17 +0000 [df23c8a86b]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_outbound_registration: Fix build due to removal of transaction.

	  Change-Id: I7a8a7beec3334cec304943f2dd7597eabe2e3150

2015-04-28 19:18 +0000 [95ab9fdb1a]  Joshua Colp <jcolp@digium.com>

	* Merge "res_pjsip_outbound_registration: Add debugging messages." into 13
2015-04-28 19:18 +0000 [0e70dc0dc8]  Joshua Colp <jcolp@digium.com>

	* Merge "res_pjsip_outbound_registration: Don't fail on delayed processing: 13." into 13
2015-04-27 16:56 +0000 [e39bd6ba46]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_outbound_registration: Don't fail on delayed processing: 13.

	  This is the Asterisk 13 version of a change to master that allows for
	  registration responses to be processed successfully potentially after
	  the original transaction has timed out. The main difference between this
	  and the master change is that the master version has API changes that
	  are unacceptable for 13. For 13, this is worked around by adding a new
	  API call that the outbound registration code uses instead.

	  The following is the text from the master version of this commit:

	  Odd behaviors have been observed during outbound registrations. The most
	  common problem witnessed has been one where a request with
	  authentication credentials cannot be created after receiving a 401
	  response. Other behaviors include apparently processing an incorrect SIP
	  response.

	  Inspecting the code led to an apparent issue with regards to how we
	  handle transactions in outbound registration code. When a response to a
	  REGISTER arrives, we save a pointer to the transaction and then push a
	  task onto the registration serializer. Between the time that we save the
	  pointer and push the task, it's possible for the transaction to be
	  destroyed due to a timeout. It's also possible for the address to be
	  reused by the transaction layer for a new transaction.

	  To allow for authentication of a REGISTER request to be authenticated
	  after the transaction has timed out, we now also hold a reference to the
	  original REGISTER request instead of the transaction. The function for
	  creating a request with authentication has been altered to take the
	  original request instead of the transaction where the original request
	  was sent.

	  ASTERISK-25020
	  Reported by Mark Michelson

	  Change-Id: If1ee5f601be839479a219424f0358a229f358f7c
2015-04-27 14:44 +0000 [1bf008fc76]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_outbound_registration: Add debugging messages.

	  When problems occur regarding outbound registrations, it currently
	  is difficult to debug. Most off-nominal paths had warning messages,
	  but sometimes we want to know what's going on before hitting the
	  off-nominal path. This patch adds lots of debugging output that
	  should give a clearer picture of what is happening with regards
	  to outbound registrations.

	  ASTERISK-25020
	  Reported by Mark Michelson

	  Change-Id: I577bde7860be0a6c872b5bcb4d5047340bf45d45

2015-04-28 07:13 +0000 [7ee05892d6]  Joshua Colp <jcolp@digium.com>

	* Merge "Example script for scan-build (the llvm static analyzer)" into 13
2015-04-28 05:38 +0000 [0b6410c4f8]  Steve Davies <steve@one47.co.uk>

	* res_rtp_asterisk: Resolve 2 discrete memory leaks in DTLS

	  ao2 ref leak in res_rtp_asterisk.c when a DTLS policy is created.
	  The resources are linked into a table, but the original alloc refs
	  are never released. ast_strdup leak in rtp_engine.c. If
	  ast_rtp_dtls_cfg_copy() is called twice on the same destination struct,
	  a pointer to an alloc'd string is overwritten before the string is free'd.

	  ASTERISK-25022
	  Reported by: one47

	  Change-Id: I62a8ceb8679709f6c3769136dc6aa9a68202ff9b

2015-04-28 06:55 +0000 [427209603d]  Joshua Colp <jcolp@digium.com>

	* Merge "cdr/cdr_odbc.c: Added to record new columns add on CDR 1.8 Asterisk Version" into 13
2015-04-27 12:11 +0000 [99fb87ae13]  George Joseph <george.joseph@fairview5.com>

	* res_pjsip: Fix SEGV on pending-qualify contacts

	  Permanent contacts that hadn't been qualified yet were missing
	  their contact_status entries causing SEGVs when running CLI
	  commands.

	  This patch makes sure that contact_statuses are created for
	  both dynamic and permanent contacts when they are created.
	  It also adds checks in the CLI code to make sure there's a
	  contact_status, just in case.

	  ASTERISK-25018 #close
	  Reported-by: Ivan Poddubny
	  Tested-by: Ivan Poddubny
	  Tested-by: George Joseph

	  Change-Id: I3cc13e5cedcafb24c400368b515b02d7fb81e029

2015-04-15 18:55 +0000 [d5dd43856e]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* cdr/cdr_odbc.c: Added to record new columns add on CDR 1.8 Asterisk Version

	  Add new column to INSERT new columns added in cdr 1.8 version. The columns are:
	   * peeraccount
	   * linkedid
	   * sequence
	  This feature is configurable in cdr_odbc.conf using a new configuration
	  option, 'newcdrcolumns'.

	  ASTERISK-24976 #close

	  Change-Id: Ibe0c7540a88305c6012786f438a0813ad8b19127
2015-04-26 17:21 +0000 [e9788056e9]  Matt Jordan <mjordan@digium.com>

	* channels/chan_skinny: Fix compilation error introduced in f8e21a1adf

	  A typo in commit f8e21a1adf resulted in a compilation error in
	  chan_skinny. This patch fixes the typo.

	  ASTERISK-24917

	  Change-Id: Id7f4ad1fe948eb2408622e80c27936ce4516c33c

2015-04-26 15:53 +0000 [2d277996b7]  Matt Jordan <mjordan@digium.com>

	* Merge "Clang: Fix some more tautological-compare warnings." into 13
2015-04-24 13:07 +0000 [145f65598c]  Matt Jordan <mjordan@digium.com>

	* Merge "app_confbridge: Default the template option to a compatible default profile." into 13
2015-04-23 15:11 +0000 [7e5056b393]  Kevin Harwell <kharwell@digium.com>

	* app_confbridge: Default the template option to a compatible default profile.

	  Confbridge dynamic profiles did not have a default profile unless you
	  explicitly used Set(CONFBRIDGE(bridge,template)=default_bridge). If a
	  template was not set prior to the bridge being created then some
	  options were left with no default values set. This patch makes it so
	  the default templates are set to the default bridge and user profiles.

	  ASTERISK-24749 #close
	  Reported by: philippebolduc

	  Change-Id: I1bd6e94b38701ac2112d842db68de63d46f60e0a

2015-04-24 09:17 +0000 [1da9ec969d]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_outbound_authenticator: Increase CSeq on authed requests.

	  The way PJSIP generates an authenticated request is to use a previous
	  request as a template. This means that the authenticated request will
	  have the same Call-ID, From header (including tag), and CSeq as the
	  original request. PJSIP generates a new branch on the Via header to
	  indicate that this is a new transaction, though.

	  There are some SIP implementations, though, that do not notice the
	  change in the branch and therefore will match the authed request to the
	  original request's transaction. Since the CSeq is the same, the server
	  will repeat the response it sent to the original request.

	  This patch aids interoperability by increasing the CSeq of the authed
	  request by one.

	  ASTERISK-24845 #close
	  Reported by: Carl Fortin
	  Tested by: Carl Fortin

	  Change-Id: I39c4ca52e688a9f83bcc1878371334becdc5be01

2015-04-24 09:24 +0000 [bf3d9db4a6]  Matt Jordan <mjordan@digium.com>

	* Merge "res_pjsip_t38: Don't crash on authenticated reinvite after originated T.38 FAX." into 13
2015-04-20 13:06 +0000 [cb318f3960]  Diederik de Groot <ddegroot@talon.nl>

	* Example script for scan-build (the llvm static analyzer)

	   - Added Pre-amble (Options / Flags / Usage Example / GNU License)
	   - Extended Configurability
	   - Made Executable

	  ASTERISK-24917
	  Change-Id: I70405fe54e4be7dbfbcb62e291690069b88617a8

2015-04-23 17:23 +0000 [b3cd5bc77f]  Mark Michelson <mmichelson@digium.com>

	* Merge "Clang: change previous tautological-compare fixes." into 13
2015-04-23 12:54 +0000 [eabf3b5a3c]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_t38: Don't crash on authenticated reinvite after originated T.38 FAX.

	  When Asterisk originates a channel to an application, the channel is
	  hung up once the application finishes executing. When the application
	  in question is SendFax, the Asterisk PJSIP code will attempt to reinvite
	  the T.38 session to audio after the FAX completes. The hangup of the
	  channel happens in the midst of this reinvite transaction. In most
	  circumstances, this works out okay because the BYE is delayed until the
	  reinvite transaction can complete.

	  However, if the reinvite that Asterisk sends receives a 401/407
	  response, then Asterisk's attempt to re-send the reinvite with
	  authentication will fail. This is because the session supplement in
	  res_pjsip_t38 makes the assumption that the channel on the session will
	  always be non-NULL. Since the channel has been hung up, though, the
	  channel is now NULL. Attempting to operate on the channel causes a
	  crash.

	  This patch fixes the issue by ensuring that the channel on the session
	  is not NULL before attempting to mess with the T.38 framehook.

	  This patch also contains some corrections for comments that were
	  incorrect and really confused me when I first started looking at the
	  code.

	  ASTERISK-25004 #close
	  Reported by Mark Michelson

	  Change-Id: Ic5a1230668369dda4bb13524098aed9306ab45a0
2015-04-23 09:16 +0000 [f70d21b2cf]  George Joseph <george.joseph@fairview5.com>

	* res_pjsip:  Validate that contact uris start with sip: or sips:

	  Currently we use pjsip_parse_hdr to validate contact uris but it
	  appears that it allows uris without a scheme if there's a port
	  supplied.  I.E myexample.com will fail but myexample.com:5060 will
	  pass even though it has no scheme.  This causes SEGVs later on
	  whenever the uri is used.

	  To prevent this, permanent_contact_validate has been updated to check
	  that the scheme is either 'sip' or 'sips'.

	  2 uses of possibly-null endpoint have also been fixed in
	  create_out_of_dialog_request.

	  ASTERISK-24999

	  Change-Id: Ifc17d16a4923e1045d37fe51e43bbe29fa556ca2
	  Reported-by: Brad Latus

2015-04-23 08:00 +0000 [1bb16bedc7]  Diederik de Groot <ddegroot@talon.nl>

	* Clang: change previous tautological-compare fixes.

	  clang can warn about a so called tautological-compare, when it finds
	  comparisons which are logically always true, and are therefor deemed
	  unnecessary.

	  Exanple:
	  unsigned int x = 4;
	  if (x > 0)    // x is always going to be bigger than 0

	  Enum Case:
	  Each enumeration is its own type. Enums are an integer type but they
	  do not have to be *signed*. C leaves it up to the compiler as an
	  implementation option what to consider the integer type of a particu-
	  lar enumeration is. Gcc treats an enum without negative values as
	  an int while clang treats this enum as an unsigned int.

	  rmudgett & mmichelson: cast the enum to (unsigned int) in assert.
	  The cast does have an effect. For gcc, which seems to treat all enums
	  as int, the cast to unsigned int will eliminate the possibility of
	  negative values being allowed. For clang, which seems to treat enums
	  without any negative members as unsigned int, the cast will have no
	  effect. If for some reason in the future a negative value is ever
	  added to the enum the assert will still catch the negative value.

	  ASTERISK-24917

	  Change-Id: I0557ae0154a0b7de68883848a609309cdf0aee6a

2015-04-23 06:50 +0000 [a06924e9d9]  Matt Jordan <mjordan@digium.com>

	* Merge "Astobj2: Ensure all calls to __adjust_lock pass a valid object." into 13
2015-04-22 16:22 +0000 [1474bb05f6]  George Joseph <george.joseph@fairview5.com>

	* res_corosync: Add check for config file before calling corosync apis

	  On some systems, res_corosync isn't compatible with the installed version of
	  corosync so corosync_cfg_initialize fails, load_module returns LOAD_FAILURE,
	  and Asterisk terminates.  The work around has been to remember to add
	  res_corosync as a noload in modules.conf.  A better solution though is to have
	  res_corosync check for its config file before attempting to call corosync apis
	  and return LOAD_DECLINE if there's no config file.  This lets Asterisk loading
	  continue.

	  If you have a res_corosync.conf file and res_corosync fails, you get the same
	  behavior as today and the fatal error tells you something is wrong with the
	  install.

	  ASTERISK-24998

	  Change-Id: Iaf94a9431a4922ec4ec994003f02135acfdd3889
2015-04-22 15:17 +0000 [73efb093b8]  Corey Farrell <git@cfware.com>

	* Astobj2: Ensure all calls to __adjust_lock pass a valid object.

	  __adjust_lock doesn't check for invalid objects, and doesn't have an
	  appropriate return value for invalid objects.  Most callers of
	  __adjust_lock pass objects that have already been confirmed valid,
	  this change adds checks before the remaining calls.

	  ASTERISK-24997 #close
	  Reported by: Corey Farrell

	  Change-Id: I669100f87937cc3f867cec56a27ae9c01292908f

2015-04-22 16:32 +0000 [b0e929219b]  George Joseph <george.joseph@fairview5.com>

	* .gitignore:  Add .gcno and .gcda

	  Products of --enable-coverage

	  Change-Id: Ie20882d64b60692e2c941ea8872ab82a86ce77a3

2015-04-22 14:25 +0000 [5a3948a66f]  Matt Jordan <mjordan@digium.com>

	* Merge "Fix/Update clang-RAII macro implementation" into 13
2015-04-22 14:07 +0000 [2ef1e1fc68]  Mark Michelson <mmichelson@digium.com>

	* Merge "res_pjsip_mwi: Send unsolicited MWI NOTIFY on startup and when endpoint registers." into 13
2015-04-22 04:17 +0000 [d6dfc85666]  Diederik de Groot <ddegroot@talon.nl>

	* Clang: Fix some more tautological-compare warnings.

	  clang can warn about a so called tautological-compare, when it finds
	  comparisons which are logically always true, and are therefor deemed
	  unnecessary.

	  Exanple:
	  unsigned int x = 4;
	  if (x > 0)    // x is always going to be bigger than 0

	  Enum Case:
	  Each enumeration is its own type. Enums are an integer type but they
	  do not have to be *signed*. C leaves it up to the compiler as an
	  implementation option what to consider the integer type of a particu-
	  lar enumeration is. Gcc treats an enum without negative values as
	  an int while clang treats this enum as an unsigned int.

	  rmudgett & mmichelson: cast the enum to (unsigned int) in assert.
	  The cast does have an effect. For gcc, which seems to treat all enums
	  as int, the cast to unsigned int will eliminate the possibility of
	  negative values being allowed. For clang, which seems to treat enums
	  without any negative members as unsigned int, the cast will have no
	  effect. If for some reason in the future a negative value is ever
	  added to the enum the assert will still catch the negative value.

	  ASTERISK-24917
	  Change-Id: Ief23ef68916192b9b72dabe702b543ecfeca0b62

2015-04-22 05:45 +0000 [edd9e54818]  Joshua Colp <jcolp@digium.com>

	* Merge "Check for ao2_alloc failure in __ast_channel_internal_alloc." into 13
2015-04-14 14:04 +0000 [7b57116833]  Joshua Colp <jcolp@digium.com>

	* res_pjsip_mwi: Send unsolicited MWI NOTIFY on startup and when endpoint registers.

	  Currently the res_pjsip_mwi module only sends an unsolicited MWI NOTIFY upon
	  a mailbox state change (such as a new message being left, or one being deleted).
	  In practice this is not sufficient to keep clients aware of the current MWI status.

	  This change makes the module send unsolicited MWI NOTIFY on startup so that
	  clients are guaranteed to have the most up to date MWI information. It also makes
	  clients receive an unsolicited MWI NOTIFY upon registration so if they are unaware
	  of the current MWI status they receive it.

	  ASTERISK-24982 #close
	  Reported by: Joshua Colp

	  Change-Id: I043f20230227e91218f18a82c7d5bb2aa62b1d58

2015-04-22 05:29 +0000 [4423d5f755]  Joshua Colp <jcolp@digium.com>

	* Merge "res_pjsip_pubsub: Set the endpoint on SUBSCRIBE dialogs." into 13
2015-04-21 15:17 +0000 [ad1a118632]  Corey Farrell <git@cfware.com>

	* Check for ao2_alloc failure in __ast_channel_internal_alloc.

	  Fix a crash that could occur in __ast_channel_internal_alloc if
	  ao2_alloc fails.

	  ASTERISK-24991 #close

	  Change-Id: I4ca89189eb22f907408cb87d0a1645cfe1314a90

2015-04-20 14:30 +0000 [3327560cb2]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_pubsub: Set the endpoint on SUBSCRIBE dialogs.

	  When SUBSCRIBE dialogs were established, we never associated
	  the endpoint that created the subscription with the dialog
	  we end up creating. In most cases, this ended up not causing
	  any problems.

	  The actual bug that was observed was that when a device that
	  was behind NAT established a subscription with Asterisk, Asterisk
	  would end up sending in-dialog NOTIFY requests to the device's
	  private IP addres instead of the public address of the NAT router.

	  When Asterisk receives the initial SUBSCRIBE from the device,
	  res_pjsip_nat rewrites the contact to the public address on which the
	  SUBSCRIBE was received. This allows for the dialog to have its target
	  address set to the proper public address. Asterisk then would send a 200
	  OK response to the SUBSCRIBE, then a NOTIFY with the initial
	  subscription state. The device would then send a 200 OK response to
	  Asterisk's NOTIFY.

	  Here's where things went wrong. When the 200 OK arrived, res_pjsip_nat
	  did not rewrite the address in the Contact header. Then, when the PJSIP
	  dialog layer processed the 200 OK, PJSIP would perform a comparison
	  between the IP address in the Contact header and its saved target
	  address for the dialog. Since they differed, PJSIP would update the
	  target dialog address to be the address in the Contact header. From this
	  point, if Asterisk needed to send a NOTIFY to the device, the result was
	  that the NOTIFY would be sent to the private address that the device
	  placed in the Contact header.

	  The reason why res_pjsip_nat did not rewrite the address when it
	  received the 200 OK response was that it could not associate the
	  incoming response with a configured endpoint. This is because on a
	  response, the only way to associate the response to an endpoint is by
	  finding the dialog that the response is associated with and then finding
	  the endpoint that is associated with that dialog. We do not perform
	  endpoint lookups on responses. res_pjsip_pubsub skipped the step of
	  associating the endpoint with the dialog we created, so res_pjsip_nat
	  could not find the associated endpoint and therefore couldn't rewrite
	  the contact.

	  This commit message is like 50x longer than the actual fix.

	  ASTERISK 24981 #close
	  Reported by Mark Michelson

	  Change-Id: I2b963c58c063bae293e038406f7d044a8a5377cd
2015-04-20 18:00 +0000 [d08446ec36]  Richard Mudgett <rmudgett@digium.com>

	* chan_dahdi/sig_pri: Make post AMI HangupRequest events on PRI channels.

	  The chan_dahdi channel driver is a very old driver.  The ability for it to
	  support ISDN was added well after the initial analog support.  Setting the
	  softhangup flags is a carry over from the original analog code.  The
	  driver was not updated to call ast_queue_hangup() which will post the AMI
	  HangupRequest event.

	  * Changed sig_pri.c to call ast_queue_hangup() instead of setting the
	  softhangup flag when the remote party initiates a hangup.

	  ASTERISK-24895 #close
	  Reported by: Andrew Zherdin

	  Change-Id: I5fe2e48556507785fd8ab8e1c960683fd5d20325

2015-04-20 17:23 +0000 [96e18453f4]  Joshua Colp <jcolp@digium.com>

	* Merge "pjsip_options:  Fix non-qualified contacts showing as unavailable" into 13
2015-04-20 13:01 +0000 [2be9cc2643]  Diederik de Groot <ddegroot@talon.nl>

	* Fix/Update clang-RAII macro implementation

	  - When you need to refer to 'variable XXX' outside a block, it needs
	  to be declared as '__block XXX', otherwise it will not be available with-
	  in the block, making updating that variable hard to do, and ast_free
	  lead to issues.

	  - Removed the #error message
	  because it creates complications when compiling external projects
	  against asterisk For example when using a different compiler than the
	  one used to compile asterisk. The warning/error should be generated
	  during the configure process not the compilation process

	  ASTERISK-24917
	  Change-Id: I12091228090e90831bf2b498293858f46ea7a8c2
2015-04-20 09:53 +0000 [b74b2cdcda]  George Joseph <george.joseph@fairview5.com>

	* pjsip_options:  Fix format specifier for int64_t rtt.

	  Contact status rtt is an int64_t and needs the PRId64 macro to
	  properly create the format specifier on 32-bit systems.

	  Change-Id: I4b8ab958fc1e9a179556a9b4ffa49673ba9fdec7

2015-04-20 06:29 +0000 [27a122af66]  Matt Jordan <mjordan@digium.com>

	* Merge "main/pbx: Don't attempt to destroy a previously destroyed exten/priority tuple" into 13
2015-04-20 05:54 +0000 [9581a0ebf3]  Joshua Colp <jcolp@digium.com>

	* Merge "Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled." into 13
2015-04-18 13:36 +0000 [63169e00ff]  George Joseph <george.joseph@fairview5.com>

	* pjsip_options:  Fix non-qualified contacts showing as unavailable

	  The "Add qualify_timeout processing and eventing" patch introduced
	  an issue where contacts that had qualify_frequency set to 0 were
	  showing Unavailable instead Unknown.  This patch checks for
	  qualify_frequency=0 and create an "Unknown"  contact_status
	  with an RTT = 0.

	  Previously, the lack of contact_status implied Unknown but since
	  we're now changing endpoint state based on contact_status, I've
	  had to add new UNKNOWN status so that changes could trigger the
	  appropriate contact_status observers.

	  ASTERISK-24977: #close

	  Change-Id: Ifcbc01533ce57f0e4e584b89a395326e098b8fe7

2015-04-19 15:49 +0000 [f0c82a173a]  Matt Jordan <mjordan@digium.com>

	* main/pbx: Don't attempt to destroy a previously destroyed exten/priority tuple

	  When a PBX registrar is unloaded, it will fail to remove its extension from
	  the context root_table if a dialplan application used by that extension is
	  still loaded. This can be the case for AGI, which can be unloaded after several
	  of the standard PBX providers. Often, this is harmless; however, if the
	  extension's priorities are removed during the failed unloading *and* the
	  dialplan application later unregisters, it leaves a ticking timebomb for the
	  next PBX provider that attempts to iterate over the extensions. When that
	  occurs, the peer_table pointer on the extension will already be set to NULL.
	  The current code does not check to see if the pointer is NULL before passing
	  it to a hashtab function this is not NULL tolerant.

	  Since it is possible for the peer_table to be NULL when we normally would not
	  expect that to be the case, the solution in this patch is to simply skip over
	  processing an extension's priorities if peer_table is NULL.

	  Prior to this patch, the tests/pbx/callerid_match test would crash during
	  module unload. With this patch, the test no longer crashes after running.

	  ASTERISK-24774 #close
	  Reported by: Corey Farrell

	  Change-Id: I2bbeecb7e0f77bac303a1b9135e4cdb4db6d4c40

2015-04-17 18:05 +0000 [82bc0fd3ad]  Richard Mudgett <rmudgett@digium.com>

	* res_fax: Fix latent bug exposed by ASTERISK-24841 changes.

	  Three fax related tests started failing as a result of changes made for
	  ASTERISK-24841:
	  tests/fax/pjsip/gateway_t38_g711
	  tests/fax/sip/gateway_mix1
	  tests/fax/sip/gateway_mix3

	  Historically, ast_channel_make_compatible() did nothing if the channels
	  were already "compatible" even if they had a sub-optimal translation path
	  already setup.  With the changes from ASTERISK-24841 this is no longer
	  true in order to allow the best translation paths to always be picked.  In
	  res_fax.c:fax_gateway_framehook() code manually setup the channels to go
	  through slin and then called ast_channel_make_compatible().  With the
	  previous version of ast_channel_make_compatible() this was always a
	  no-operation.

	  * Remove call to ast_channel_make_compatible() in fax_gateway_framehook()
	  that now undoes what was just setup when the framehook is attached.

	  * Fixed locking around saving the channel formats in
	  fax_gateway_framehook() to ensure that the formats that are saved are
	  consistent.

	  * Fix copy pasta errors in fax_gateway_framehook() that confuses read and
	  write when dealing with saved channel formats.

	  ASTERISK-24841
	  Reported by: Matt Jordan

	  Change-Id: I6fda0877104a370af586a5e8cf9e161a484da78d

2015-04-17 16:19 +0000 [c59a800707]  Corey Farrell <git@cfware.com>

	* Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled.

	  When DEBUG_THREADLOCALS is enabled it causes the threadlocal cleanup to be
	  called as a function.  This causes a compile error with raw threadstorage as
	  it uses NULL for cleanup.  This fix uses a macro that provides NULL when
	  DEBUG_THREADLOCALS is disabled, and replaces the call to "c_cleanup(data);"
	  with "{};" when DEBUG_THREADLOCALS is enabled.

	  ASTERISK-24975 #close
	  Reported by: Ashley Sanders

	  Change-Id: I3ef7428ee402816d9fcefa1b3b95830c00d5c402

2015-04-17 15:57 +0000 [e05b076827]  Matt Jordan <mjordan@digium.com>

	* Merge "Detect potential forwarding loops based on count." into 13
2015-04-15 10:38 +0000 [4f1a8dbe92]  Mark Michelson <mmichelson@digium.com>

	* Detect potential forwarding loops based on count.

	  A potential problem that can arise is the following:

	  * Bob's phone is programmed to automatically forward to Carol.
	  * Carol's phone is programmed to automatically forward to Bob.
	  * Alice calls Bob.

	  If left unchecked, this results in an endless loops of call forwards
	  that would eventually result in some sort of fiery crash.

	  Asterisk's method of solving this issue was to track which interfaces
	  had been dialed. If a destination were dialed a second time, then
	  the attempt to call that destination would fail since a loop was
	  detected.

	  The problem with this method is that call forwarding has evolved. Some
	  SIP phones allow for a user to manually forward an incoming call to an
	  ad-hoc destination. This can mean that:

	  * There are legitimate use cases where a device may be dialed multiple
	  times, or
	  * There can be human error when forwarding calls.

	  This change removes the old method of detecting forwarding loops in
	  favor of keeping a count of the number of destinations a channel has
	  dialed on a particular branch of a call. If the number exceeds the
	  set number of max forwards, then the call fails. This approach has
	  the following advantages over the old:

	  * It is much simpler.
	  * It can detect loops involving local channels.
	  * It is user configurable.

	  The only disadvantage it has is that in the case where there is a
	  legitimate forwarding loop present, it takes longer to detect it.
	  However, the forwarding loop is still properly detected and the
	  call is cleaned up as it should be.

	  Address review feedback on gerrit.

	  * Correct "mfgium" to "Digium"
	  * Decrement max forwards by one in the case where allocation of the
	    max forwards datastore is required.
	  * Remove irrelevant code change from pjsip_global_headers.c

	  ASTERISK-24958 #close

	  Change-Id: Ia7e4b7cd3bccfbd34d9a859838356931bba56c23
2015-04-11 16:56 +0000 [674b18bdf0]  George Joseph <george.joseph@fairview5.com>

	* pjsip_options: Add qualify_timeout processing and eventing

	  This is the second follow-on to https://reviewboard.asterisk.org/r/4572/ and the
	  discussion at
	  http://lists.digium.com/pipermail/asterisk-dev/2015-March/073921.html

	  The basic issues are that changes in contact status don't cause events to be
	  emitted for the associated endpoint.  Only dynamic contact add/delete actions
	  update the endpoint.  Also, the qualify timeout is fixed by pjsip at 32 seconds
	  which is a long time.

	  This patch makes use of the new transaction timeout feature in r4585 and
	  provides the following capabilities...

	  1.  A new aor/contact variable 'qualify_timeout' has been added that allows the
	  user to specify the maximum time in milliseconds to wait for a response to an
	  OPTIONS message.  The default is 3000ms.  When the timer expires, the contact is
	  marked unavailable.

	  2.  Contact status changes are now propagated up to the endpoint as follows...
	  When any contact is 'Available', the endpoint is marked as 'Reachable'.  When
	  all contacts are 'Unavailable', the endpoint is marked as 'Unreachable'.  The
	  existing endpoint events are generated appropriately.

	  ASTERISK-24863 #close

	  Change-Id: Id0ce0528e58014da1324856ea537e7765466044a
	  Tested-by: Dmitriy Serov
	  Tested-by: George Joseph <george.joseph@fairview5.com>

2015-04-17 15:29 +0000 [f1abf51b73]  Matt Jordan <mjordan@digium.com>

	* Merge "res_pjsip: Refactor endpt_send_request to include transaction timeout" into 13
2015-04-17 10:30 +0000 [ab5b38e434]  Matt Jordan <mjordan@digium.com>

	* Merge "res_pjsip: Add global option to limit the maximum time for initial qualifies" into 13
2015-04-17 10:25 +0000 [ec77b6148f]  Joshua Colp <jcolp@digium.com>

	* Merge "res_pjsip_pubsub: On notify fail deleted sub_tree is then referenced" into 13
2015-04-16 10:51 +0000 [b56c1914fa]  Kevin Harwell <kharwell@digium.com>

	* bridge.c: NULL app causes crash during attended transfer

	  Due to a race condition there was a chance that during an attended transfer the
	  channel's application would return NULL. This, of course, would cause a crash
	  when attempting to access the memory. This patch retrieves the channel's app
	  at an earlier time in processing in hopes that the app name is available.
	  However, if it is not then "unknown" is used instead. Since some string value
	  is now always present the crash can no longer occur.

	  ASTERISK-24869 #close
	  Reported by: viniciusfontes
	  Review:

	  Change-Id: I5134b84c4524906d8148817719d76ffb306488ac

2015-04-16 13:20 +0000 [8d4ce7cc2b]  Scott Griepentrog <scott@griepentrog.com>

	* res_pjsip_pubsub: On notify fail deleted sub_tree is then referenced

	  This change makes the send_notify of the sub_tree
	  not happen when the sub_tree has been deleted due
	  to the notify call failing, which avoids a crash.

	  ASTERISK-24970 #close

	  Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf
2015-04-11 16:39 +0000 [bf46799f0e]  George Joseph <george.joseph@fairview5.com>

	* res_pjsip: Refactor endpt_send_request to include transaction timeout

	  This is the first follow-on to https://reviewboard.asterisk.org/r/4572/ and the
	  discussion at
	  http://lists.digium.com/pipermail/asterisk-dev/2015-March/073921.html

	  Since we currently have no control over pjproject transaction timeout, this
	  patch pulls the pjsip_endpt_send_request function out of pjproject and into
	  res_pjsip/endpt_send_transaction in order to implement that capability.

	  Now when the transaction is initiated, we also schedule our own pj_timer with
	  our own desired timeout.

	  If the transaction completes before either timeout, pjproject cancels its timer,
	  and calls our tsx callback where we cancel our timer and run the app callback.

	  If the pjproject timer times out first, pjproject calls our tsx callback where
	  we cancel our timer and run the app callback.

	  If our timer times out first, we terminate the transaction which causes
	  pjproject to cancel its timer and call our tsx callback where we run the app
	  callback.

	  Regardless of the scenario, pjproject is calling the tsx callback inside the
	  group_lock and there are checks in the callback to make sure it doesn't run
	  twice.

	  As part of this patch ast_sip_send_out_of_dialog_request was created to replace
	  its similarly named private function.  It takes a new timeout argument in
	  milliseconds (<= 0 to disable the timeout).

	  ASTERISK-24863 #close
	  Reported-by: George Joseph <george.joseph@fairview5.com>
	  Tested-by: George Joseph <george.joseph@fairview5.com>

	  Change-Id: I0778dc730d9689c5147a444a04aee3c1026bf747
2015-04-11 17:04 +0000 [1b6f6ff841]  George Joseph <george.joseph@fairview5.com>

	* res_pjsip: Add global option to limit the maximum time for initial qualifies

	  Currently when Asterisk starts initial qualifies of contacts are spread out
	  randomly between 0 and qualify_timeout to prevent network and system overload.
	  If a contact's qualify_frequency is 5 minutes however, that contact may be
	  unavailable to accept calls for the entire 5 minutes after startup.  So while
	  staggering the initial qualifies is a good idea, basing the time on
	  qualify_timeout could leave contacts unavailable for too long.

	  This patch adds a new global parameter "max_initial_qualify_time" that sets the
	  maximum time for the initial qualifies.  This way you could make sure that all
	  your contacts are initialy, randomly qualified within say 30 seconds but still
	  have the contact's ongoing qualifies at a 5 minute interval.

	  If max_initial_qualify_time is > 0, the formula is initial_interval =
	  min(max_initial_interval, qualify_timeout * random().  If not set,
	  qualify_timeout is used.

	  The default is "0" (disabled).

	  ASTERISK-24863 #close

	  Change-Id: Ib80498aa1ea9923277bef51d6a9015c9c79740f4
	  Tested-by: George Joseph <george.joseph@fairview5.com>

2015-04-15 16:08 +0000 [5d218cde87]  George Joseph <george.joseph@fairview5.com>

	* More .gitignore updates

	  Added .pyc and .sha1 to the top-level .gitignore.

	  Change-Id: I7dfc4f554d54d22947b38140d3305007503cc16a
	  Tested-by: George Joseph <george.joseph@fairview5.com>

2015-04-15 13:36 +0000 [97f83c4c53]  Matt Jordan <mjordan@digium.com>

	* Merge "Build System: Replace comment about setting menuselect defaults." into 13
2015-04-14 13:16 +0000 [abd56db3e0]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* cel_pgsql: Fix name string for log on unable allocate memory.

	  The LOG_ERROR has reference to CDR instead of CEL  for LENGTHEN_BUF1 and
	  LENGTHEN_BUF2.

	  ASTERISK-24965 #close
	  Reported by: Rodrigo Ramirez Norambuena

	  Change-Id: Icc818697d7d66d34bfe3048cdd15ca2b06c89744
2015-04-14 13:48 +0000 [222fbe1d9a]  Corey Farrell <git@cfware.com>

	* Build System: Replace comment about setting menuselect defaults.

	  The Makefile claims that you can set default menuselect options by creating
	  ~/.asterisk.makeopts or /etc/asterisk.makeopts, but those files have never
	  been respected in Asterisk 11 or 13.  This changes the comment to accurately
	  reflect that these files are not automatically used by the build system.

	  ASTERISK-13721 #close
	  Reported by: pj

	  Change-Id: Ibde804ff196283def49ccb9432fbf224a22586e2

2015-04-12 09:08 +0000 [07e729cc7b]  Rodrigo Ramírez Norambuena <decipher.hk@gmail.com>

	* cdr_pgsql: Fix CLI "cdr show pgsql status" command.

	  The command always showed the usage information.

	  * Fix the error in command validation for CLI_SHOWUSAGE.

	  ASTERISK-24959 #close
	  Reported by: Rodrigo Ramirez Norambuena

	  Change-Id: I584f0936bb01001336a468a55c1d05d79fe795d5
	  (cherry picked from commit 23a180cade51e84b9def65b05759c3cb9feba225)

2015-04-13 19:06 +0000 [7d43d85bea]  George Joseph <george.joseph@fairview5.com>

	* .gitignore updates for master/13

	  Added products of ./bootstrap

	  Added nmenuselect and gmenuselect to menuselect/

	  Change-Id: Ied658463958bafc04a9aff9ebc28e40c116a6e35

2015-04-13 14:41 +0000 [3d27c223a5]  David M. Lee <dlee@respoke.io>

	* Fixing extconf compile

	  During the mass code deletion for clang support, a stray backslash was
	  left behind that was causing utils to fail to compile.

	  Change-Id: I60e5fa58c9a5b248bde23aaada79ff663f87a2a1

2015-04-13 12:03 +0000 [30045b4e67]  Matt Jordan <mjordan@digium.com>

	* Merge "build_tools/make_version: Update version parsing for Git migration" into 13
2015-04-13 10:47 +0000 [88dbf6653e]  Joshua Colp <jcolp@digium.com>

	* Merge "res_monitor: Add dependency on func_periodic_hook." into 13
2015-04-13 09:54 +0000 [e996d8f728]  Matt Jordan <mjordan@digium.com>

	* build_tools/make_version: Update version parsing for Git migration

	  External systems - such as the Asterisk Test Suite - require knowledge of the
	  upstream branch. Unfortunately, after moving to Git, the Asterisk version
	  currently consists of only a 'GIT" prefix followed by an object blob,
	  e.g., GIT-as08d7. This makes it difficult for such systems to know what
	  features are available in a particular check out of Asterisk.

	  This patch fixes this by hardcoding the branch in a variable in the
	  make_version script. Since the mainline branches are not changed often -
	  typically only once a year - this is a reasonable approach to solving
	  the problem, and is more reliable than parsing the output of 'git branch
	  -vv'. Branches that track off of an upstream primary branch will then get the
	  benefit of knowing which mainline branch they are currently based off
	  of.

	  ASTERISK-24954 #close

	  Change-Id: I8090d5d548b6d19e917157ed530b914b7eaf9799

2015-04-12 12:59 +0000 [d1a6f1a9f9]  Matt Jordan <mjordan@digium.com>

	* git migration: Remove support for file versions

	  Git does not support the ability to replace a token with a version
	  string during check-in. While it does have support for replacing a
	  token on clone, this is somewhat sub-optimal: the token is replaced
	  with the object hash, which is not particularly easy for human
	  consumption. What's more, in practice, the source file version was often
	  not terribly useful. Generally, when triaging bugs, the overall version
	  of Asterisk is far more useful than an individual SVN version of a file.
	  As a result, this patch removes Asterisk's support for showing source file
	  versions.

	  Specifically, it does the following:
	  * main/asterisk:
	    - Refactor the file_version structure to reflect that it no longer
	      tracks a version field.
	    - Alter the "core show file version" CLI command such that it always
	      reports the version of Asterisk. The file version is no longer
	      available.

	  * main/manager: The Version key now always reports the Asterisk version.

	  * UPGRADE: Add notes for:
	    - Modification to the ModuleCheck AMI Action.
	    - Modification of the "core show file version" CLI command.

	  Change-Id: Ia932d3c64cd18a14a3c894109baa657ec0a85d28

2015-04-13 06:19 +0000 [0e4b997cd7]  Corey Farrell <git@cfware.com>

	* res_monitor: Add dependency on func_periodic_hook.

	  OPTIONAL_API has conditionals to define AST_OPTIONAL_API and
	  AST_OPTIONAL_API_ATTR differently based on if AST_API_MODULE is defined.
	  Unfortunately this is inside the include protection block, so only the
	  first status of AST_API_MODULE is respected.  For example res_monitor
	  is an optional API provider, but uses func_periodic_hook.  This makes
	  func_periodic_hook non-optional to res_monitor.

	  ASTERISK-17608 #close
	  Reported by: Warren Selby

	  Change-Id: I8fcf2a5e7b481893e17484ecde4f172c9ffb5679

2015-04-12 15:27 +0000 [91c1ed7ef6]  Matt Jordan <mjordan@digium.com>

	* Merge "main/editline: Add .gitignore." into 13
2015-04-12 06:12 +0000 [a77c31b99c]  Corey Farrell <git@cfware.com>

	* main/editline: Add .gitignore.

	  This patch adds a .gitignore for main/editline to ignore all build results.

	  Change-Id: I68c7bf375ea46282689e5a706534b69fca233b5d

2015-04-11 23:22 +0000 [d918c3b78e]  Matt Jordan <mjordan@digium.com>

	* .gitignore: Ignore tarballs (*.gz)

	  This patch updates the root .gitignore file to ignore files with a .gz
	  extension. This will cause git to ignore downloaded sound tarballs in
	  the the sounds/ directory.

	  Change-Id: I1e42fbfa02a8884231507b683e8e49ac3e278aaa

2015-04-11 13:20 +0000 [555b5f5d30]  George Joseph <george.joseph@fairview5.com>

	* Add .gitignore and .gitreview files

	  Add the .gitignore and .gitreview files to the asterisk repo.

	  NB:  You can add local ignores to the .git/info/exclude file
	  without having to do a commit.

	  Common ignore patterns are in the top-level .gitignore file.
	  Subdirectory-specific ignore patterns are in their own .gitignore
	  files.

	  Change-Id: I4c8af3b8e3739957db545f7368ac53f38e99f696
	  Tested-by: George Joseph

2015-04-11 10:35 +0000 [5807ca519c]  Matthew Jordan <mjordan@digium.com>

	* Blocked revisions 434708

	  ........
	  main/event: Remove unnecessary assignment of negative value to enum

	  When cleaning up some clang compiler warnings, the comparison of a negative
	  value to an unsigned enum was removed. However, the initial assignment of a
	  negative value to said enum remained in the variable declaration. This patch
	  removes that assignment.

	  Thanks to ibercom in #asterisk-bugs for pointing it out.


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434709 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-11 10:26 +0000 [d0d78d5732]  dkdegroot (License 6600)

	* clang compiler warnings: Fix various warnings for tests

	  This patch fixes a variety of clang compiler warnings for unit tests. This
	  includes autological comparison issues, ignored return values, and
	  interestingly enough, one embedded function. Fun!

	  Review: https://reviewboard.asterisk.org/r/4555

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4555.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434705 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434706 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-11 10:10 +0000 [4cf7d0bf01]  Juergen Spies (License 6698)

	* res/res_pjsip_t38: Add missing initialization of t38faxmaxdatagram

	  Prior to this patch, the far_max_datagram value on the UDPTL structure would
	  remain -1 if the remote endpoint fails to provide the SDP media attribute
	  T38FaxMaxDatagram. This can result in the INVITE request being rejected. With
	  this patch, we will now properly initialize the value with either the default
	  value or with the value provided by pjsip.conf's t38_udptl_maxdatagram
	  parameter.

	  Review: https://reviewboard.asterisk.org/r/4589

	  ASTERISK-24928 #close
	  Reported by: Juergen Spies
	  Tested by: Juergen Spies
	  patches:
	    pjsipT38patch20150331.txt submitted by Juergen Spies (License 6698)


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434688 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 18:29 +0000 [13cd99682d]  Richard Mudgett <rmudgett@digium.com>

	* chan_pjsip/res_pjsip/bridge_softmix/core: Improve translation path choices.

	  With this patch, chan_pjsip/res_pjsip now sets the native formats to the
	  codecs negotiated by a call.

	  * The changes in chan_pjsip.c and res_pjsip_sdp_rtp.c set the native
	  formats to include all the negotiated audio codecs instead of only the
	  initial preferred audio codec and later the currently received audio
	  codec.

	  * The audio frame handling in channel.c:ast_read() is more streamlined and
	  will automatically adjust to changes in received frame formats.  The new
	  policy is to remove translation and pass the new frame format to the
	  receiver except if the translation was to a signed linear format.  A more
	  long winded version is commented in ast_read() along with some caveats.

	  * The audio frame handling in channel.c:ast_write() is more streamlined
	  and will automatically adjust any needed translation to changes in the
	  frame formats sent.  Frame formats sent can change for many reasons such
	  as a recording is being played back or the bridged peer changed the format
	  it sends.  Since it is a normal expectation that sent formats can change,
	  the codec mismatch warning message is demoted to a debug message.

	  * Removed the short circuit check in
	  channel.c:ast_channel_make_compatible_helper().  Two party bridges need to
	  make channels compatible with each other.  However, transfers and moving
	  channels among bridges can result in otherwise compatible channels having
	  sub-optimal translation paths if the make compatible check is short
	  circuited.  A result of forcing the reevaluation of channel compatibility
	  is that the asterisk.conf:transcode_via_slin and codecs.conf:genericplc
	  options take effect consistently now.  It is unfortunate that these two
	  options are enabled by default and negate some of the benefits to the
	  changes in channel.c:ast_read() by forcing translation through signed
	  linear on a two party bridge.

	  * Improved the softmix bridge technology to better control the translation
	  of frames to the bridge.  All of the incoming translation is now normally
	  handled by ast_read() instead of splitting any translation steps between
	  ast_read() and the slin factory.  If any frame comes in with an unexpected
	  format then the translation path in ast_read() is updated for the next
	  frame and the slin factory handles the current frame translation.

	  This is the final patch in a series of patches aimed at improving
	  translation path choices.  The other patches are on the following reviews:
	  https://reviewboard.asterisk.org/r/4600/
	  https://reviewboard.asterisk.org/r/4605/

	  ASTERISK-24841 #close
	  Reported by: Matt Jordan

	  Review: https://reviewboard.asterisk.org/r/4609/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434671 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 16:03 +0000 [af458e2e60]  Kevin Harwell <kharwell@digium.com>

	* chan_sip: make progressinband default to no

	  After the "progressinband" value setting of "never" was updated to never send a
	  183 this separated its use from the "no" value. Since "never" was the default,
	  but most users probably expect "no" this patch updates the default for the
	  "progressinband" setting to "no."

	  ASTERISK-24835 #close
	  Reported by: Andrew Nagy
	  Review: https://reviewboard.asterisk.org/r/4606/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434654 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 12:53 +0000 [88b0fa7755]  yaron nahum (License 6676)

	* res_pjsip: Add an 'auto' option for DTMF Mode

	  This patch adds support for automatically detecting the type of DTMF that a
	  PJSIP endpoint supports. When the 'dtmf_mode' endpoint option is set to 'auto',
	  the channel created for an endpoint will attempt to determine if RFC 4733
	  DTMF is supported. If so, it will use that DTMF type. If not, the DTMF type
	  for the channel will be set to inband.

	  Review: https://reviewboard.asterisk.org/r/4438

	  ASTERISK-24706 #close
	  Reported by: yaron nahum
	  patches:
	    yaron_patch_3_Feb.diff submitted by yaron nahum (License 6676)


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434637 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 11:59 +0000 [16afee4651]  George Joseph <george.joseph@fairview5.com>

	* res_pjsip_config_wizard: Cleanup load unload

	  While investigating other unload issues I realized that the load/unload process 
	  for the config wizard was pretty ugly so I've refactored it as follows...

	  When the res_pjsip sorcery instance is created the config_wizard bumps it's own 
	  module reference to prevent it from unloading while the sorcery instance is 
	  still active.  When res_pjsip unloads and it's sorcery instance is destroyed, 
	  the config wizard unrefs itself which then allows itself to unload cleanly.  
	  Since the config wizard now can't load after res_pjsip or unload before it 
	  (which should have been the correct behavior all along), I was able to remove 
	  the chunks of code in both load_module and unload_module that handled that case.

	  Ran the testsuite tests to insure there were no functional changes and REF_DEBUG 
	  to insure that Asterisk was shutting down cleanly with no FRACKs or leaks.

	  Tested-by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4610/




	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434619 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 11:37 +0000 [125acc52fe]  Richard Mudgett <rmudgett@digium.com>

	* bridge_softmix.c,channel.c: Minor code simplification and cleanup.

	  * Made code easier to follow in bridge_softmix.c:analyse_softmix_stats()
	  and made some debug messages more helpful.

	  * Made some debug and warning messages more helpful in
	  channel.c:set_format().

	  Review: https://reviewboard.asterisk.org/r/4607/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434617 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 11:28 +0000 [a63f7ad04a]  Richard Mudgett <rmudgett@digium.com>

	* translate.c: Only select audio codecs to determine the best translation choice.

	  Given a source capability of h264 and ulaw, a destination capability of
	  h264 and g722 then ast_translator_best_choice() would pick h264 as the
	  best choice even though h264 is a video codec and Asterisk only supports
	  translation of audio codecs.  When the audio starts flowing, there are
	  warnings about a codec mismatch when the channel tries to write a frame to
	  the peer.

	  * Made ast_translator_best_choice() only select audio codecs.

	  * Restore a check in channel.c:set_format() lost after v1.8 to prevent
	  trying to set a non-audio codec.

	  This is an intermediate patch for a series of patches aimed at improving
	  translation path choices for ASTERISK-24841.

	  This patch is a complete enough fix for ASTERISK-21777 as the v11 version
	  of ast_translator_best_choice() does the same thing.  However, chan_sip.c
	  still somehow tries to call ast_codec_choose() which then calls
	  ast_best_codec() with a capability set that doesn't contain any audio
	  formats for the incoming call.  The remaining warning message seems to be
	  a benign transient.

	  ASTERISK-21777 #close
	  Reported by: Nick Ruggles

	  ASTERISK-24380 #close
	  Reported by: Matt Jordan

	  Review: https://reviewboard.asterisk.org/r/4605/
	  ........

	  Merged revisions 434614 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434615 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 09:55 +0000 [c9791dba1f]  Matthew Jordan <mjordan@digium.com>

	* res/ari: Fix model validation for ChannelHold event

	  When the ChannelHold event was added, the 'musicclass' parameter was
	  erroneously removed. This caused the ChannelHold events to be rejected as
	  they failed model validation. This patch updates the Swagger schema such that
	  it now properly reflects the event that is being created.

	  Hooray for tests that catch things like this.


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434597 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-10 07:39 +0000 [c39faa4729]  Y Ateya (License 6693)

	* channels/chan_iax2: Improve POKE expiration time calculation for lossy networks

	  POKE is used to check for peer availability; however, in networks with packet
	  loss, the current calculations may result in POKE expiration times that are too
	  short. This patch alters the expiration/retry time logic to take into account
	  the last known qualify round trip time, as opposed to always using a static
	  value for each peer.

	  Review: https://reviewboard.asterisk.org/r/4536

	  ASTERISK-22352 #close
	  Reported by: Frederic Van Espen

	  ASTERISK-24894 #close
	  Reported by: Y Ateya
	  patches:
	    poke_noanswer_duration.diff submitted by Y Ateya (License 6693)
	  ........

	  Merged revisions 434564 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434565 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-09 17:35 +0000 [75c2c85962]  George Joseph <george.joseph@fairview5.com>

	* res_pjsip_phoneprov_provider: Fix reference leak on unload

	  res_pjsip_phoneprov_provider was leaking references to phoneprov objects due to 
	  a missing OBJ_NODATA in an ao2_callback in load_users().  Rather than adding the 
	  OBJ_NODATA, I changed load_users to use a more straightforward ao2_iterator.  
	  This plugged the leak but exposed an unload order issue between 
	  res_pjsip_phoneprov_provider, res_phoneprov and res_pjsip.

	  res_pjsip_phoneprov_provider unloads first, then res_phoneprov, then res_pjsip.  
	  Since res_pjsip_phoneprov_provider uses res_pjsip's sorcery instance, when it 
	  unloads, it's objects are still in the sorcery instance.  When res_pjsip 
	  unloads, it destroys all its objects including res_pjsip_phoneprov_provider's.  
	  The phoneprov destructor then attempts to unregister the extension from 
	  res_phoneprov but because res_phoneprov is already cleaned up, its users 
	  container is gone and we get a FRACK.

	  Simple solution, check for the NULL users container before attempting to remove 
	  the entry. Duh.

	  Ran tests/res_phoneprov/res_phoneprov_provider.  No leaks in 
	  res_pjsip_phoneprov_provider and no FRACKs.

	  Reported-by: Corey Farrell
	  Tested-by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4608/
	  ASTERISK-24935 #close



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434545 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-09 17:31 +0000 [73c286a393]  George Joseph <george.joseph@fairview5.com>

	* loader/main: Don't set ast_fully_booted until deferred reloads are processed

	  Until we have a true module management facility it's sometimes necessary for one 
	  module to force a reload on another before its own load is complete.  If 
	  Asterisk isn't fully booted yet, these reloads are deferred.  The problem is 
	  that asterisk reports fully booted before processing the deferred reloads which 
	  means Asterisk really isn't quite ready when it says it is.

	  This patch moves the report of fully booted after the processing of the deferred 
	  reloads is complete.

	  Since the pjsip stack has the most number of related modules, I ran the 
	  channels/pjsip testsuite to make sure there aren't any issues.  All tests 
	  passed.

	  Tested-by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4604/



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434544 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-09 17:03 +0000 [5737650a67]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip: add CLI command to show global and system configuration

	  Added a new CLI command for res_pjsip that shows both global and system
	  configuration settings: pjsip show settings

	  ASTERISK-24918 #close
	  Reported by: Scott Griepentrog
	  Review: https://reviewboard.asterisk.org/r/4597/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434527 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-09 11:07 +0000 [1695a5b85f]  Richard Mudgett <rmudgett@digium.com>

	* chan_iax2.c: Fix ref leak in iax2_request().

	  * Increased warning message format capability string buffer size in
	  iax2_request().

	  Review: https://reviewboard.asterisk.org/r/4601/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434510 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-09 10:54 +0000 [92c1688edb]  Richard Mudgett <rmudgett@digium.com>

	* bridge_native_rtp.c: Defer allocation and check if it fails in native_rtp_bridge_compatible().

	  Review: https://reviewboard.asterisk.org/r/4601/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-09 10:42 +0000 [2679d0100a]  yaron nahum (License 6676)

	* res/res_pjsip_dlg_options: Add a module to handle in-dialog OPTIONS requests

	  This patch adds a new session supplement that handles in-dialog OPTIONS
	  requests. Said OPTIONS requests are sent a 200 OK, as an endpoint lookup
	  for the OPTIONS request would already have been done by the time the
	  session supplement receives the inbound request.

	  ASTERISK-24862 #close
	  Reported by: yaron nahum
	  patches:
	    res_pjsip_dlg_options.c submitted by yaron nahum (License 6676)


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434506 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-09 07:56 +0000 [6ba6e3dffd]  dkdegroot (License 6600)

	* clang compiler warnings: Fix autological comparisons

	  This fixes autological comparison warnings in the following:
	   * chan_skinny: letohl may return a signed or unsigned value, depending on the
	     macro chosen
	   * func_curl: Provide a specific cast to CURLoption to prevent mismatch
	   * cel: Fix enum comparisons where the enum can never be negative
	   * enum: Fix comparison of return result of dn_expand, which returns a signed
	     int value
	   * event: Fix enum comparisons where the enum can never be negative
	   * indications: tone_data.freq1 and freq2 are unsigned, and hence can never be
	     negative
	   * presencestate: Use the actual enum value for INVALID state
	   * security_events: Fix enum comparisons where the enum can never be negative
	   * udptl: Don't bother to check if the return value from encode_length is less
	     than 0, as it returns an unsigned int
	   * translate: Since the parameters are unsigned int, don't bother checking
	     to see if they are negative. The cast to unsigned int would already blow
	     past the matrix bounds.
	   * res_pjsip_exten_state: Use a temporary value to cache the return of
	     ast_hint_presence_state
	   * res_stasis_playback: Fix enum comparisons where the enum can never be
	     negative
	   * res_stasis_recording: Add an enum value for the case where the recording
	     operation is in error; fix enum comparisons
	   * resource_bridges: Use enum value as opposed to -1
	   * resource_channels: Use enum value as opposed to -1

	  Review: https://reviewboard.asterisk.org/r/4533
	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4533.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434469 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 21:05 +0000 [e05c8ae68e]  Stefan Engström (License 6691)

	* apps/app_queue: Prevent possible crash when evaluating queue penalty rules

	  Although it only occurred once, a crash occurred when a queue attempted to
	  evaluate a queue penalty rule that appeared to have already been destroyed.
	  In many locations in app_queue, a test is done to see if qe->pr is NULL;
	  however, when we dispose of a queue's penalty rules, we don't set the pointer
	  to NULL after free'ing it. This patch does that to prevent any dangling
	  pointers from lingering on the queue object.

	  Review: https://reviewboard.asterisk.org/r/4522

	  ASTERISK-23319 #close
	  Reported by: Vadim
	  patches:
	    rb4552.patch submitted by Stefan Engström (License 6691)
	  ........

	  Merged revisions 434448 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434449 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 13:15 +0000 [f21b45db49]  Jonathan Rose <jrose@digium.com>

	* res_pjsip_t38: Fix FAX failures when using PJSIP with authentication

	  Without this patch, if a PJSIP endpoint with udptl enabled and authentication
	  set attempted to use sendFax, the FAX session would fail during setup. This
	  was because the invite issued in response to being auth challenged would cause
	  the PJSIP channel performing the FAX to receive a second T38 framehook and
	  this would cause frames to be consumed in an inappropriate manner.

	  ASTERISK-24933 #close
	  Reported by: Jonathan Rose
	  Review: https://reviewboard.asterisk.org/r/4577/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434425 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 13:14 +0000 [4441bb6a25]  Richard Mudgett <rmudgett@digium.com>

	* Bridging: Eliminate the unnecessary make channel compatible with bridge operation.

	  When a channel enters the bridging system it is first made compatible with
	  the bridge and then the bridge technology makes the channel compatible
	  with the technology.  For all but the DAHDI native and softmix bridge
	  technologies the make channel compatible with the bridge step is an
	  effective noop because the other technologies allow all audio formats.
	  For the DAHDI native bridge technology it doesn't matter because it is not
	  an initial bridge technology and chan_dahdi allows only one native format
	  per channel.  For the softmix bridge technology, it is a noop at best and
	  harmful at worst because the wrong translation path could be setup if the
	  channel's native formats allow more than one audio format.

	  This is an intermediate patch for a series of patches aimed at improving
	  translation path choices.

	  * Removed code dealing with the unnecessary step of making the channel
	  compatible with the bridge.

	  ASTERISK-24841
	  Reported by: Matt Jordan

	  Review: https://reviewboard.asterisk.org/r/4600/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434424 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 11:40 +0000 [f767440906]  mhej (license 6085)

	* Security/tcptls: MitM Attack potential from certificate with NULL byte in CN.

	  When registering to a SIP server with TLS, Asterisk will accept CA signed
	  certificates with a common name that was signed for a domain other than the
	  one requested if it contains a null character in the common name portion of
	  the cert. This patch fixes that by checking that the common name length
	  matches the the length of the content we actually read from the common name
	  segment. Some certificate authorities automatically sign CA requests when
	  the requesting CN isn't already taken, so an attacker could potentially
	  register a CN with something like www.google.com\x00www.secretlyevil.net
	  and have their certificate signed and Asterisk would accept that certificate
	  as though it had been for www.google.com - this is a security fix and is
	  noted in AST-2015-003.

	  ASTERISK-24847 #close
	  Reported by: Maciej Szmigiero
	  Patches:
	   asterisk-null-in-cn.patch submitted by mhej (license 6085)
	  ........

	  Merged revisions 434337 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........

	  Merged revisions 434338 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434384 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 11:23 +0000 [1712d16825]  Richard Mudgett <rmudgett@digium.com>

	* format_cache.c: Add missing slin12 format to ast_format_cache_is_slinear().

	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434357 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 07:33 +0000 [ae39dd1f46]  Matthew Jordan <mjordan@digium.com>

	* chan_iax2: Fix compilation issue due to funky merge

	  Don't mix declarations and code


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434314 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 07:00 +0000 [05397ad01e]  Jaco Kroon (License 5671)

	* chan_iax2: Fix crash caused by unprotected access to iaxs[peer->callno]

	  This patch fixes an access to the peer callnumber that is unprotected by a
	  corresponding mutex. The peer->callno value can be changed by multiple threads,
	  and all data inside the iaxs array must be procted by a corresponding lock
	  of iaxsl.

	  The patch moves the unprotected access to a location where the mutex is
	  safely obtained.

	  Review: https://reviewboard.asterisk.org/r/4599/

	  ASTERISK-21211 #close
	  Reported by: Jaco Kroon
	  patches:
	    asterisk-11.2.1-iax2_poke-segfault.diff submitted by Jaco Kroon (License 5671)
	  ........

	  Merged revisions 434291 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434292 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 06:53 +0000 [be13c72142]  Valentin Vidić (License 6697)

	* chan_sip: Handle IPv4 mapped IPv6 clients when NAT is enabled

	  When udpbindaddr is set to the IPv6 bind all address of '::', Asterisk will
	  attempt to handle both IPv4 and IPv6 addresses, although the information will
	  be stored in a struct with an AF_INET6 address type. However, the current
	  NAT handling code won't handle the IPv4 mapped IPv6 addresses correctly.
	  This patch adds an additional check for the mapped address case, allowing
	  the NAT code to handle clients even when the address is IPv6.

	  Review: https://reviewboard.asterisk.org/r/4563/

	  ASTERISK-18032 #close
	  Reported by: Christoph Timm
	  patches:
	    nat_with_ipv6.diff submitted by Valentin Vidić (License 6697)
	  ........

	  Merged revisions 434288 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434289 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-08 06:44 +0000 [f324870dab]  dkdegroot (License 6600)

	* clang compiler warnings: Fix pointer-bool-converesion warnings

	  This patch fixes several warnings pointed out by the clang compiler.
	  * chan_pjsip: Removed check for data->text, as it will always be non-NULL.
	  * app_minivm: Fixed evaluation of etemplate->locale, which will always
	    evaluate to 'true'. This patch changes the evaluation to use
	    ast_strlen_zero.
	  * app_queue:
	    - Fixed evaluation of qe->parent->monfmt, which always evaluates to
	      true. Instead, we just check to see if the dereferenced pointer
	      evaluates to true.
	    - Fixed evaluation of mem->state_interface, wrapping it with a call to
	      ast_strlen_zero.
	  * res_smdi: Wrapped search_msg->mesg_desk_term with calls to ast_strlen_zero.

	  Review: https://reviewboard.asterisk.org/r/4541

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4541.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434285 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434286 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-07 14:38 +0000 [a6aed7f6f6]  Scott Griepentrog <sgriepentrog@digium.com>

	* Revert accidental change in r434261


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434262 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-07 14:35 +0000 [0584e29300]  Scott Griepentrog <sgriepentrog@digium.com>

	* pjsip: resolve compatibility problem with ast_sip_session

	  A change in r430179 inserted a variable near the top of a
	  structure caused a problem when running DPMA in a version
	  of Asterisk compiled across the change.  This patch moves
	  the new variable to the end of the structure, eliminating
	  the problem.

	  Review: https://reviewboard.asterisk.org/r/4574/
	  ........

	  Merged revisions 433944 from http://svn.asterisk.org/svn/asterisk/branches/13


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434261 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-07 11:40 +0000 [d754f70239]  Kevin Harwell <kharwell@digium.com>

	* bridge.c: Hangup attended transfer target after it has been swapped out

	  After completing an attended transfer the transfer target channel (the one that
	  gets swapped out) was not being hung up after leaving the bridge. This resulted
	  in a channel possibly being left around. Added an explicit softhangup for the
	  channel in question after the transfer is successfully completed in order to
	  make sure the channel is hung up.

	  ASTERISK-24782 #close
	  Reported by: John Bigelow
	  Review: https://reviewboard.asterisk.org/r/4575/



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434240 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-07 10:33 +0000 [c516981dc7]  Mark Michelson <mmichelson@digium.com>

	* Do not queue message requests that we do not respond to.

	  If we receive a MESSAGE request that we cannot send a response
	  to, we should not send the incoming MESSAGE to the dialplan.

	  This commit should help the bouncing message_retrans test to
	  pass consistently.



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434218 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-07 10:21 +0000 [ab803ec342]  Matthew Jordan <mjordan@digium.com>

	* ARI: Add the ability to intercept hold and raise an event

	  For some applications - such as SLA - a phone pressing hold should not behave
	  in the fashion that the Asterisk core would like it to. Instead, the hold
	  action has some application specific behaviour associated with it - such as
	  disconnecting the channel that initiated the hold; only playing MoH to channels
	  in the bridge if the channels are of a particular type, etc.

	  One way of accomplishing this is to use a framehook to intercept the
	  hold/unhold frames, raise an event, and eat the frame. Tasty. This patch
	  accomplishes that using a new dialplan function, HOLD_INTERCEPT.

	  In addition, some general cleanup of raising hold/unhold Stasis messages was
	  done, including removing some RAII_VAR usage.

	  Review: https://reviewboard.asterisk.org/r/4549/

	  ASTERISK-24922 #close


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434216 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 21:09 +0000 [488f093e97]  dkdegroot (License 6600)

	* clang compiler warnings: Fix sometimes-initialized warning in func_math

	  This patch fixes a bug in a unit test in func_math where a variable could be
	  passed to ast_free that wasn't allocated. This patch corrects the issue and
	  ensures that we only attempt to free a variable if we previously allocated
	  it.

	  Review: https://reviewboard.asterisk.org/r/4552

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4552.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434190 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434191 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 21:03 +0000 [c027133f6d]  dkdegroot (License 6600)

	* clang compiler warnings: Fix non-literal-null-conversion warnings

	  Clang will flag errors when a char pointer is set to '\0', as opposed to a
	  value that the char pointer points to. This patch fixes this warning
	  in a variety of locations.

	  Review: https://reviewboard.asterisk.org/r/4551

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4551.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434187 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434188 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 14:23 +0000 [2270c40d33]  Kevin Harwell <kharwell@digium.com>

	* res_pjsip: config option 'timers' can't be set to 'no'

	  When setting the configuration option 'timers' equal to 'no' the bit flag was
	  not properly negated. This patch clears all associated flags and only sets the
	  specified one. pjsip will handle any necessary flag combinations. Also went
	  ahead and did similar for the '100rel' option.

	  ASTERISK-24910 #close
	  Reported by: Ray Crumrine
	  Review: https://reviewboard.asterisk.org/r/4582/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434131 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 14:02 +0000 [95de71f247]  George Joseph <george.joseph@fairview5.com>

	* build: Fixes for gcc 5 compilation

	  These are fixes for compilation under gcc 5.0...

	  chan_sip.c:    In parse_request needed to make 'lim' unsigned.
	  inline_api.h:  Needed to add a check for '__GNUC_STDC_INLINE__' to detect C99 
	                 inline semantics (same as clang).
	  ccss.c:        In ast_cc_set_parm, needed to fix weird comparison.
	  dsp.c:         Needed to work around a possible compiler bug.  It was throwing 
	                 an array-bounds error but neither
	                 sgriepentrog, rmudgett nor I could figure out why.
	  manager.c:     In action_atxfer, needed to correct an array allocation.

	  This patch will go to 11, 13, trunk.

	  Review: https://reviewboard.asterisk.org/r/4581/
	  Reported-by: Jeffrey Ollie
	  Tested-by: George Joseph
	  ASTERISK-24932 #close
	  ........

	  Merged revisions 434113 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434114 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 13:18 +0000 [d54ccda3b1]  dkdegroot (License 6600)

	* clang compiler warnings: Remove large chunks of unused code from extconf

	  This patch fixes a warning caught by clang, in which it detected that large
	  chunks of extconf were unused. Frankly, I wish we could pretend that all of
	  extconf was unused, but alas, that is not yet the case.

	  A few extraneous functions in the parking tests were removed as well, for
	  the same reason.

	  Review: https://reviewboard.asterisk.org/r/4553

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4553.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434093 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434097 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 13:03 +0000 [0ecd472e4f]  dkdegroot (License 6600)

	* clang compiler warnings: Fix sometimes-uninitialized warning in pbx_config

	  This patch fixes a warning caught by clang, in which a char pointer could be
	  assigned to before it was initialized. The patch re-organizes the code to
	  ensure that the pointer is always initialized, even on off nominal paths.

	  Review: https://reviewboard.asterisk.org/r/4529

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4529.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434090 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434091 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 12:52 +0000 [4e7be5b2dc]  dkdegroot (License 6600)

	* clang compiler warnings: Fix format specified in framehook

	  This patch fixes an invalid format specifier used in the formatting of an
	  ERROR message in the framehook code. The format specifier specifies a
	  type of 'unsigned short', but the argument passed to it is of type 'int'.
	  The patch changes the format specifier to 'i'.

	  Review: https://reviewboard.asterisk.org/r/4540

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4535.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 434087 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434088 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 11:02 +0000 [2443b40341]  Mark Michelson <mmichelson@digium.com>

	* Ensure that a non-zero sample rate is returned for all formats.

	  Versions of Asterisk prior to 12 defaulted to 8000 as a sample rate
	  if one was not provided by a format. In Asterisk 13, this was removed.
	  The result was that some calculations which involve dividing by the
	  sample rate resulted in dividing by 0. The fix being put in place
	  here is to have the same default fallback that was present in previous
	  versions of Asterisk.

	  Asterisk-24914 #close
	  Reported by Marcello Ceschia



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434046 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 10:16 +0000 [b1102cd642]  Corey Farrell <git@cfware.com>

	* res_pjsip_phoneprov_provider: Revert 433996 / 433997.

	  res_pjsip_phoneprov_provider is using ao2_callback with OBJ_MULTIPLE, then
	  ignoring the return.  OBJ_NODATA flag was to prevent a reference leak, but
	  this caused the module to FRACK on unload.  Revert change until this can
	  be investigated further.

	  ASTERISK-24935
	  Reported by: Corey Farrell
	  Review: https://reviewboard.asterisk.org/r/4578/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434025 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-06 09:50 +0000 [0f25076f67]  Mark Michelson (license #5049)

	* ParkedCall: Don't allow dialplan fallthrough after retrieving parked call.

	  This is a change to align behavior with that of Asterisk 11 and previous versions.
	  In those versions, if a parked call were retrieved, and the call ended, the parked
	  call retriever would be hung up after the ParkedCall application ran. Prior to this
	  patch, in Asterisk 13, the same situation would result in the parked call retriever
	  falling through to additional priorities in the extension where the ParkedCall
	  application was called. With this patch, the behavior between Asterisk 11 and 13
	  aligns.

	  ASTERISK-24899 #close
	  Reported by Malcolm Davenport
	  Patches:
	  	ASTERISK-24899.patch uploaded by Mark Michelson(license #5049)



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434022 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-05 07:53 +0000 [709fa14b44]  Corey Farrell <git@cfware.com>

	* res_pjsip_phoneprov_provider: Fix leaked OBJ_MULTIPLE iterator.

	  res_pjsip_phoneprov_provider was using ao2_callback with OBJ_MULTIPLE, then
	  ignoring the return.  Added OBJ_NODATA flag to prevent a reference leak.

	  ASTERISK-24935 #close
	  Reported by: Corey Farrell
	  Review: https://reviewboard.asterisk.org/r/4578/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433996 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-03 16:53 +0000 [1ee8424f27]  Mark Michelson <mmichelson@digium.com>

	* res_pjsip_messaging: Serialize outbound SIP MESSAGEs

	  Outbound SIP MESSAGEs had the potential to be sent out
	  of order from how they were specified in a set of
	  dialplan steps.

	  This change creates a serializer for sending outbound
	  MESSAGE requests on. This ensures that the MESSAGEs are
	  sent by Asterisk in the same order that they were sent
	  from the dialplan.

	  ASTERISK-24937 #close
	  Reported by Mark Michelson

	  Review: https://reviewboard.asterisk.org/r/4579



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433968 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-02 09:56 +0000 [169e57d2e0]  Scott Griepentrog <sgriepentrog@digium.com>

	* pjsip: resolve compatibility problem with ast_sip_session

	  A change in r430179 inserted a variable near the top of a
	  structure caused a problem when running DPMA in a version
	  of Asterisk compiled across the change.  This patch moves
	  the new variable to the end of the structure, eliminating
	  the problem.

	  Review: https://reviewboard.asterisk.org/r/4574/



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-02 05:31 +0000 [1eb0c5f4e8]  Corey Farrell <git@cfware.com>

	* Tell menuselect that MALLOC_DEBUG conflicts with DEBUG_CHAOS.

	  DEBUG_CHAOS was marked as conflicting with MALLOC_DEBUG, but
	  for this to work correctly MALLOC_DEBUG must also be marked
	  as conflicting with DEBUG_CHAOS.

	  Review: https://reviewboard.asterisk.org/r/4557/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433923 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-04-01 11:25 +0000 [e301185983]  Ashley Sanders <asanders@digium.com>

	* stasis: set a channel variable on websocket disconnect error

	  Resolve compile errors caused by r433863 by fixing the
	  documentation xml to comply with the schema.


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433888 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-31 22:26 +0000 [a1f12d9231]  Ashley Sanders <asanders@digium.com>

	* stasis: set a channel variable on websocket disconnect error

	  Resolve compile errors caused by r433839 by included the missing
	  header file, pbx.h.



	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433863 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-31 17:00 +0000 [7293ecd90b]  Ashley Sanders <asanders@digium.com>

	* stasis: set a channel variable on websocket disconnect error

	  When an error occurs while writing to a web socket, the web socket is
	  disconnected and the event is logged. A side-effect of this, however, is that
	  any application on the other side waiting for a response from Stasis is left
	  hanging indefinitely (as there is no mechanism presently available for
	  notifying interested parties about web socket error states in Stasis).

	  To remedy this scenario, this patch introduces a new channel variable:
	  STASISSTATUS.

	  The possible values for STASISSTATUS are:
	  SUCCESS         - The channel has exited Stasis without any failures
	  FAILED          - Something caused Stasis to croak. Some (not all) possible
	                    reasons for this:
	                      - The app registry is not instantiated;
	                      - The app requested is not registered;
	                      - The app requested is not active;
	                      - Stasis couldn't send a start message

	  ASTERISK-24802
	  Reported By: Kevin Harwell
	  Review: https://reviewboard.asterisk.org/r/4519/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433839 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-31 11:55 +0000 [94949e7f2f]  Richard Mudgett <rmudgett@digium.com>

	* chan_sip: Fix expression in unit test /channels/chan_sip/test_sip_rtpqos.

	  Fix misplaced parentheses in original fabs() expression.
	  ........

	  Merged revisions 433816 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433817 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-31 06:47 +0000 [9967739669]  Corey Farrell <git@cfware.com>

	* Re-add _ast_mem_backtrace_buffer variable for ABI compatibility.

	  Modules built prior to commit of r4502 expect to link at runtime
	  to the variable _ast_mem_backtrace_buffer.  This change re-adds
	  the variable to the C file only.

	  Review: https://reviewboard.asterisk.org/r/4558/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433795 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-30 06:42 +0000 [2d39bc5528]  Corey Farrell <git@cfware.com>

	* Fix an ABI compatibility issue with ast_log_safe for modules.

	  Binary modules are sometimes built against the latest release of
	  Asterisk in each branch, and need to be compatible with all
	  releases of that branch.  This change ensures that utils.h only
	  uses ast_log_safe from the core.  For modules and utilities ast_log
	  is used instead.

	  Review: https://reviewboard.asterisk.org/r/4548/
	  ........

	  Merged revisions 433772 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433773 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-29 21:44 +0000 [5f8faf16af]  dkdegroot (License 6600)

	* clang compiler warnings: Fix -Wabsolute-value warnings

	  This patch fixes several warnings caught by clang - in this case, usage of the
	  abs function on non-integer values. This patch uses labs and fabs, as
	  appropriate, in the various affected files.

	  Review: https://reviewboard.asterisk.org/r/4525

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4525.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433749 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433750 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-29 21:39 +0000 [09b681e344]  dkdegroot (License 6600)

	* clang compiler warnings: Fix invalid enum conversion

	  This patch fixes some invalid enum conversion warnings caught by clang. In
	  particular:
	  * chan_sip: Several functions mixed usage of the st_refresher_param
	    enum and st_refresher enum. This patch corrects the functions to use the
	    right enum.
	  * chan_pjsip: Fixed mixed usage of ast_sip_session_t38state and ast_t38_state.
	  * strings: Fixed incorrect usage of AO2 flags with strings container.
	  * res_stasis: Change a return enumeration to stasis_app_user_event_res.

	  Review: https://reviewboard.asterisk.org/r/4535

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4535.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433746 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433747 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-29 21:29 +0000 [7f33abb827]  Matthew Jordan <mjordan@digium.com>

	* main/stdtime/localtime: Fix warning introduced in r433720

	  The patch in r433720 caused a warning to be kicked back by gcc. It occurred
	  due to this check in unistd.h:

	      if (__nbytes > __bos0 (__buf))
	          return __read_chk_warn (__fd, __buf, __nbytes, __bos0 (__buf));

	  That is, if __nbytes is greater than the result of GCC's built-in object size
	  for the struct, we'll kick back a warning.

	  As it turns out, this is because there is an error in the code in the patch.
	  We are passing the address of the pointer to the struct, not iev, which is a
	  pointer to the struct. Hence, the number of bytes is probably going to be lot
	  larger than the number of bytes that make up a pointer! This patch changes
	  the code just read from the pointer to the struct - which fixes the warning.

	  ASTERISK-24917
	  ........

	  Merged revisions 433743 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433744 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-29 20:56 +0000 [47eeb67e14]  dkdegroot (License 6600)

	* clang compiler warnings: Ignore -Wunused-command-line-argument

	  Asterisk's build system has a tendency to pass include directives for libraries
	  to everything compiled within a particular group of source files. This means
	  we pass the header for libxml2 to things that don't necessarily need it. As a
	  result, we ignore this particular warning.

	  Review: https://reviewboard.asterisk.org/r/4545/

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4545.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433720 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433721 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-29 20:52 +0000 [dbb4d6f9e7]  dkdegroot (License 6600)

	* clang compiler warnings: Fix warning for -Wgnu-variable-sized-type-not-at-end

	  This patch fixes a warning caught by clang, wherein a variable sized struct is
	  not located at the end of a struct. While the code in question actually
	  expected this, this is a good warning to watch for. Hence, this patch refactors
	  the code in question to not have two variable length elements in the same
	  struct.

	  Review: https://reviewboard.asterisk.org/r/4530/

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4530.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433717 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433718 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-28 07:56 +0000 [e126ab9eeb]  dkdegroot (License 6600)

	* clang compiler warnings: Fix a variety of "unused" warnings

	  This patch fixes the -Wunused-value -Wunused-variable -Wunused-const-variable
	  errors caught by clang. Specifically:

	  * apps/app_queue.c: removed unused qpm_cmd_usage[], qum_cmd_usage[],
	                      qsmp_cmd_usage[]
	  * cel/cel_sqlite3_custom.c: removed unused name[] = "cel_sqlite3_custom"
	  * channels/chan_pjsip.c: removed unused desc[] = "PJSIP Channel"
	  * codecs/gsm/src/gsm_create.c: removed unused ident[] = "$Header$"
	  * funcs/func_env.c:729: Fixed ast_str_append_substr.
	  * main/editline/np/strlcat.c: removed unused rcsid variable
	  * main/editline/np/strlcpy.c: removed unused rcsid variable
	  * main/security_events.c: removed unused TIMESTAMP_STR_LEN
	  * utils/conf2ael.c: removed unused cfextension_states
	  * utils/extconf.c: removed unused cfextension_states

	  Review: https://reviewboard.asterisk.org/r/4526

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4526.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433693 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433694 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-28 07:48 +0000 [2f6534527d]  dkdegroot (License 6600)

	* clang compiler warnings: Fix -Wself-assign

	  Assigning a variable to itself isn't super useful. However, the WAV format
	  modules make use of this in order to perform byte endian checks. This patch
	  works around the warning by only performing the self assignment if we are
	  going to do more than just assign it to ourselves. Which is odd, but true.

	  Review: https://reviewboard.asterisk.org/r/4544/

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4544.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433690 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433691 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-28 07:40 +0000 [eb70993a50]  dkdegroot (License 6600)

	* clang compiler warnings: Fix -Wparantheses-equality warnings

	  Clang will treat ((a == b)) as a warning, as it reasonably expects that the
	  developer may have intended to write (a == b) or ((a = b)). This patch cleans
	  up all instances where equality, not assignment, was intended between two
	  parantheses.

	  Review: https://reviewboard.asterisk.org/r/4531/

	  ASTERISK-24917
	  Repoted by: dkdegroot
	  patches:
	    rb4531.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433687 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433688 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-28 07:31 +0000 [c0ff16036a]  dkdegroot (License 6600)

	* clang compiler warnings: Fix -Wbitfield-constant-conversion warning

	  In chan_iax2, we attempt to assign a -1 to a bitfield. This gets caught by
	  clang, as it will truncate the -1 to a 1 implicitly.

	  Instead, we just assign the value a '1'.

	  Review: https://reviewboard.asterisk.org/r/4537/

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4537.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433683 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433684 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-28 07:27 +0000 [844bc76bef]  dkdegroot (License 6600)

	* clang compiler warnings: Fix -Winitializer-overrides

	  This patch fixes clange compiler warnings for initializer overrides.
	  Specifically:

	  res_pjsip/config_transport maps PJSIP_TLSV1_METHOD to the same enumeration
	  value as PJSIP_SSL_DEFAULT_METHOD. When initializing an array containing
	  those enum values, we therefore initialize the value twice to two different
	  values, "tlsv1" and "default". This patch changes it to just initialize
	  the index in the array to "tlsv1".

	  Review: https://reviewboard.asterisk.org/r/4539/

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4539.patch submitted by dkdegroot (License 6600)


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433682 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-28 07:19 +0000 [5e204042d9]  dkdegroot (License 6600)

	* clang compiler warnings: Fix -Wunused-function; make inline function static

	  This patch fixes clang compilers warnings for unused functions. Specifically:
	   * channels/chan_iax2: removed user_ref function
	   * main/dsp.c: removed goertzel_update function
	   * main/config.c: made variable_list_switch static

	  Review: https://reviewboard.asterisk.org/r/4527

	  ASTERISK-24917
	  Reported by: dkdegroot
	  patches:
	    rb4527.patch submitted by dkdegroot (License 6600)
	  ........

	  Merged revisions 433678 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433680 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 17:34 +0000 [cfbf5fbe91]  Jonathan Rose <jrose@digium.com>

	* SAC: Add a few basic queues

	  Review: https://reviewboard.asterisk.org/r/4503/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433658 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 17:25 +0000 [1a50d8d4c2]  Jonathan Rose <jrose@digium.com>

	* SAC: Add conferencing extensions and configuration

	  Review: https://reviewboard.asterisk.org/r/4504/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 16:15 +0000 [c6c08d755d]  Rusty Newton <rnewton@digium.com>

	* configs/basic-pbx - Super Awesome Company example configs Phase 1, Patch 2

	  Example configuration files for a "basic PBX" deployment for the fictitious
	  Super Awesome Company. Details at https://reviewboard.asterisk.org/r/4488/
	  and https://wiki.asterisk.org/wiki/display/AST/Super+Awesome+Company

	  Patch 4488 includes all functionality needed for SAC's outside connectivity
	  and some externally accessed features, as well as outbound dialing.

	  Reported by: Malcolm Davenport
	  Tested by: Rusty Newton

	  Review: https://reviewboard.asterisk.org/r/4488/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433624 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 16:04 +0000 [13557675d4]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_registrar_expire.c: Made use ao2 container template routines and eliminated some RAII_VAR() usage.

	  * Converted the contact_autoexpire container to use the ao2 template hash
	  and cmp functions.  Also made use the OBJ_SEARCH_xxx names instead of the
	  deprecated names.

	  * Eliminates several unnecessary uses of RAII_VAR().

	  Review: https://reviewboard.asterisk.org/r/4524/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433622 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 15:30 +0000 [85feac857c]  Mark Michelson <mmichelson@digium.com>

	* Add stateful PJSIP response API call, and use it for out-of-dialog responses.

	  Asterisk had an issue where retransmissions of MESSAGE requests resulted in
	  Asterisk processing the retransmission as if it were a new MESSAGE request.

	  This patch fixes the issue by creating a transaction in PJSIP on the incoming
	  request. This way, if a retransmission arrives, the PJSIP transaction layer
	  will resend the response and Asterisk will not ever see the retransmission.

	  ASTERISK-24920 #close
	  Reported by Mark Michelson

	  Review: https://reviewboard.asterisk.org/r/4532/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433619 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 12:50 +0000 [dc2cf21144]  Richard Mudgett <rmudgett@digium.com>

	* res_pjsip_registrar_expire.c: Cleanup scheduler leaks on unload/shutdown.

	  Contact expiration object refs were leaked when the module was unloaded.

	  * Made empty the scheduler of entries before destroying it to release the
	  object ref held by the scheduler entry.

	  Review: https://reviewboard.asterisk.org/r/4523/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433596 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 09:41 +0000 [6e6f5b3a1f]  scsiguy (License 6692)

	* res/res_timing_kqueue: Update the module to conform to current timer API

	  This patch updates the kqueue timing module to conform to current timer API.

	  This fixes issues with using the kqueue timing source on Asterisk 13 on
	  FreeBSD 10. These issues include:

	  - Remove support for kevent64().  The values used to support Asterisk timers
	    fit within 32bits and so can be handled on all platforms via kevent().

	  - Provide debug logging for, but do not track, unacked events.  This matches
	    the behavior of all other timer implementations.

	  - Implement continuous mode by triggering and leaving active, a user event.
	    This ensures that the file descriptor for the timer returns immediately from
	    poll(), without placing the load of a high speed timer on the kernel.

	  - In kqueue_timer_get_max_rate(), don't overstate the capability of the timer.
	    On some platforms, UINT_MAX is greater than INTPTR_MAX, the largest integer
	    type kqueue supports for timers.

	  - In kqueue_timer_get_event(), assume the caller woke up from poll() and just
	    return the mode the timer is currently in. This matches all other timer
	    implementations.

	  - Adjust the test code now that unacked events are not tracked.

	  Review: https://reviewboard.asterisk.org/r/4465/

	  ASTERISK-24857 #close
	  Reported by: scsiguy
	  Tested by: Ed Hynan
	  patches:
	    rb4465.patch submitted by scsiguy (License 6692)


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433574 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 07:26 +0000 [b0df413fb2]  Corey Farrell <git@cfware.com>

	* Fix link error for utils/aelparse.

	  Use the standard ast_log instead of ast_log_safe for STANDALONE programs.

	  Review: https://reviewboard.asterisk.org/r/4538/
	  ........

	  Merged revisions 433549 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433550 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-27 02:09 +0000 [d01706ce1e]  Corey Farrell <git@cfware.com>

	* Improved and portable ast_log recursion avoidance

	  This introduces a new logger routine ast_log_safe.  This routine should be
	  used for all error messages in code that can be run as a result of ast_log.
	  ast_log_safe does nothing if run recursively.  All error logging in
	  astobj2.c, strings.c and utils.h have been switched to ast_log_safe.

	  This required adding support for raw threadstorage.  This provides direct
	  access to the void* pointer in threadstorage.  In ast_log_safe, NULL is used
	  to signify that this thread is not already running ast_log_safe, (void*)1 when
	  it is already running.  This was done since it's critical that ast_log_safe
	  do nothing that could log during recursion checking.

	  ASTERISK-24155 #close
	  Reported by: Timo Teräs
	  Review: https://reviewboard.asterisk.org/r/4502/
	  ........

	  Merged revisions 433522 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433523 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-26 18:07 +0000 [4b225e2104]  Corey Farrell <git@cfware.com>

	* Fix compile errors caused by r4500 / r4501.

	  * Add ast_register_cleanup to utils/clicompat.c to deal with
	    any utils that copy sources from main.
	  * Asterisk 13+: remove unused variables from core_local.c.

	  Review: https://reviewboard.asterisk.org/r/4534/
	  ........

	  Merged revisions 433499 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433500 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-26 17:19 +0000 [6adf26f14d]  Corey Farrell <git@cfware.com>

	* Replace most uses of ast_register_atexit with ast_register_cleanup.

	  Since 'core stop now' and 'core restart now' do not stop modules,
	  it is unsafe for most of the core to run cleanups.  Originally all
	  cleanups used ast_register_atexit, and were only changed when it
	  was shown to be unsafe.  ast_register_atexit is now used only when
	  absolutely required to prevent corruption and close child processes.

	  Exceptions that need to use ast_register_atexit:
	  * CDR: Flush records.
	  * res_musiconhold: Kill external applications.
	  * AstDB: Close the DB.
	  * canary_exit: Kill canary process.

	  ASTERISK-24142 #close
	  Reported by: David Brillert

	  ASTERISK-24683 #close
	  Reported by: Peter Katzmann

	  ASTERISK-24805 #close
	  Reported by: Badalian Vyacheslav

	  ASTERISK-24881 #close
	  Reported by: Corey Farrell

	  Review: https://reviewboard.asterisk.org/r/4500/
	  Review: https://reviewboard.asterisk.org/r/4501/
	  ........

	  Merged revisions 433495 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433497 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-26 12:46 +0000 [d0df545a44]  Corey Farrell <git@cfware.com>

	* res_pjsip: Enable unload of all modules at shutdown.

	  * Move most of res_pjsip:module_unload to unload_pjsip to resolve crashes
	    caused by running PJSIP functions from non-PJSIP threads.
	  * Remove call to pjsip_endpt_destroy(ast_pjsip_endpoint), it was causing
	    crashes in some cases.  In theory pj_shutdown() should take care of this.
	  * Mark res_pjsip_keepalive and res_pjsip_session as allowed to unload at
	    shutdown.
	  * Resolve leaked config global in res_pjsip_notify.
	  * Unregister pubsub pjsip service module.
	  * Implement cleanup for res_pjsip_session.

	  ASTERISK-24731 #close
	  Reported by: Corey Farrell
	  Review: https://reviewboard.asterisk.org/r/4498/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433469 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-26 12:04 +0000 [fd434a210f]  Kevin Harwell <kharwell@digium.com>

	* app_confbridge: file playback blocks dtmf

	  Attempting to execute DTMF in a confbridge while file playback (prompt,
	  announcement, etc) is occurring is not allowed. You have to wait until
	  the sound file has completed before entering DTMF. This patch fixes it
	  so that app_confbridge now monitors for dtmf key presses during menu
	  driven file playback. If a key is pressed playback stops and it executes
	  the matched menu option.

	  ASTERISK-24864 #close
	  Reported by: Steve Pitts
	  Review: https://reviewboard.asterisk.org/r/4510/
	  ........

	  Merged revisions 433445 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-25 13:37 +0000 [dea885a607]  Richard Mudgett <rmudgett@digium.com>

	* A couple minor cleanup tweaks.

	  * In res/res_sorcery_realtime.c: Broke long line.

	  * In main/bucket.c: Eliminated unnecessary NULL check as
	  ast_sorcery_unref() is NULL tolerant and set the global object to NULL
	  after unref in the system shutdown bucket_cleanup().


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433420 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-25 10:30 +0000 [05de9082a5]  Simon Arlott (License 5756)

	* res_xmpp: Buddies are always auto-registered when processing the roster

	  Due to a quirk in the configuration handling of res_xmpp, the 'autoregister'
	  setting was never actually processed. This was due to not properly copying
	  over the global settings to the client settings when applying the
	  configuration to the run-time object.

	  Review: https://reviewboard.asterisk.org/r/4496/

	  ASTERISK-14233
	  ASTERISK-24780 #close
	  Reported by: Simon Arlott
	  patches:
	    asterisk-13.1.0-24780 uploaded by Simon Arlott (License 5756)
	  ........

	  Merged revisions 433395 from http://svn.asterisk.org/svn/asterisk/branches/11


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433396 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-24 14:26 +0000 [b1e9552b08]  Richard Mudgett <rmudgett@digium.com>

	* chan_pjsip: Add "rpid_immediate" option to prevent unnecessary "180 Ringing" messages.

	  Incoming PJSIP call legs that have not been answered yet send unnecessary
	  "180 Ringing" or "183 Progress" messages every time a connected line
	  update happens.  If the outgoing channel is also PJSIP then the incoming
	  channel will always send a "180 Ringing" or "183 Progress" message when
	  the outgoing channel sends the INVITE.

	  Consequences of these unnecessary messages:

	  * The caller can start hearing ringback before the far end even gets the
	  call.

	  * Many phones tend to grab the first connected line information and refuse
	  to update the display if it changes.  The first information is not likely
	  to be correct if the call goes to an endpoint not under the control of the
	  first Asterisk box.

	  When connected line first went into Asterisk in v1.8, chan_sip received an
	  undocumented option "rpid_immediate" that defaults to disabled.  When
	  enabled, the option immediately passes connected line update information
	  to the caller in "180 Ringing" or "183 Progress" messages as described
	  above.

	  * Added "rpid_immediate" option to prevent unnecessary "180 Ringing" or
	  "183 Progress" messages.  The default is "no" to disable sending the
	  unnecessary messages.

	  ASTERISK-24781 #close
	  Reported by: Richard Mudgett

	  Review: https://reviewboard.asterisk.org/r/4473/


	  git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433338 65c4cc65-6c06-0410-ace0-fbb531ad65f3

2015-03-23  Asterisk Development Team <asteriskteam@digium.com>

	* Asterisk 13.3.0-rc1 Released.

2015-03-22 23:58 +0000 [r433247-433269]  Matthew Jordan <mjordan@digium.com>

	* apps/app_queue.c, main/cli.c, main/cdr.c, main/manager.c,
	  main/rtp_engine.c, /, funcs/func_cdr.c: Fix compilations errors
	  on 64-bit OpenBSD systems In versiong 5.5, OpenBSD went to 64-bit
	  time values. This requires a cast to (long) when printing members
	  of certain time structs. Review:
	  https://reviewboard.asterisk.org/r/4507 ASTERISK-24879 #close
	  Reported by: snuffy Tested by: snuffy patches:
	  openbsd-time64.diff uploaded by snuffy (License 5024) ........
	  Merged revisions 433268 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* main/asterisk.c, main/loader.c, main/xmldoc.c, /: Fix compilation
	  issues for OpenBSD This patch addresses compilation issues for
	  OpenBSD. Specifically, it addresses: * It allows including
	  <sys/vmmeter.h> in asterisk.c * Provides a needed (size_t) cast
	  in xmldoc.c In 13+, it also addresses a conditional inclusion in
	  loader.c. Review: https://reviewboard.asterisk.org/r/4506
	  ASTERISK-24880 #close Reported by: snuffy Tested by: snuffy
	  patches: misc-openbsd.diff uploaded by snuffy (License 5024)
	  ........ Merged revisions 433245 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-20 19:52 +0000 [r433199-433222]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_messaging.c, res/res_pjsip/pjsip_options.c,
	  res/res_pjsip.c, res/res_pjsip_nat.c: Audit
	  ast_pjsip_rdata_get_endpoint() usage for ref leaks. Valgrind
	  found some memory leaks associated with
	  ast_pjsip_rdata_get_endpoint(). The leaks would manifest when
	  sending responses to OPTIONS requests, processing MESSAGE
	  requests, and res_pjsip supplements implementing the
	  incoming_request callback. * Fix ast_pjsip_rdata_get_endpoint()
	  endpoint ref leaks in res/res_pjsip.c:supplement_on_rx_request(),
	  res/res_pjsip/pjsip_options.c:send_options_response(),
	  res/res_pjsip_messaging.c:rx_data_to_ast_msg(), and
	  res/res_pjsip_messaging.c:send_response(). * Eliminated
	  RAII_VAR() use with ast_pjsip_rdata_get_endpoint() in
	  res/res_pjsip_nat.c:nat_on_rx_message(). * Fixed inconsistent but
	  benign return value in
	  res/res_pjsip/pjsip_options.c:options_on_rx_request(). Review:
	  https://reviewboard.asterisk.org/r/4511/

	* res/res_pjsip_sdp_rtp.c, main/sorcery.c, main/xmldoc.c:
	  res_pjsip_sdp_rtp,sorcery: Fix invalid access and memory leak
	  respectively. Valgrind found a memory leak and invalid access. *
	  Fix invalid access by sscanf() being fed a non-nul terminated
	  string of digits in res/res_pjsip_sdp_rtp.c:get_codecs(). * Fix
	  memory leak in main/sorcery.c:sorcery_object_field_destructor().
	  * Fix potential NULL pointer dereference in
	  main/xmldoc.c:xmldoc_get_syntax_config_option(). Review:
	  https://reviewboard.asterisk.org/r/4513/

2015-03-19 19:19 +0000 [r433174]  Matthew Jordan <mjordan@digium.com>

	* funcs/func_env.c, tests/test_func_file.c, /: funcs/func_env: Fix
	  regression caused in FILE read operation When r432935 was merged,
	  it did correctly fix a situation where a FILE read operation on
	  the middle of a file buffer would not read the requested length
	  in the parameters passed to the FILE function. Unfortunately, it
	  would also allow the FILE function to append more bytes than what
	  was available in the buffer if the length exceeded the end of the
	  buffer length. This patch takes the minimum of the remaining
	  bytes in the buffer along with the calculated length to append
	  provided by the original patch, and uses that as the length to
	  append in the return result. This patch also updates the unit
	  tests with the scenarios that were originally pointed out in
	  ASTERISK-21765 that the original implementation treated
	  incorrectly. ASTERISK-21765 ........ Merged revisions 433173 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-19 10:20 +0000 [r433113-433126]  Corey Farrell <git@cfware.com>

	* main/logger.c, /: logger: Apply default console logging when
	  configuration cannot be loaded. When logger.conf is missing or
	  invalid enable console logging and display an error message.
	  ASTERISK-24817 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4497/ ........ Merged
	  revisions 433122 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* channels/sip/include/dialog.h, channels/chan_sip.c,
	  channels/sip/include/sip.h: chan_sip: Simplify dialog/peer
	  references, improve REF_DEBUG output. * Replace functions for
	  ref/undef of dialogs and peers with macro's to call
	  ao2_t_bump/ao2_t_cleanup. * Enable passthough of REF_DEBUG caller
	  information to sip_alloc and find_call. ASTERISK-24882 #close
	  Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4189/

	* /, channels/chan_sip.c: chan_sip: Fix dialog reference leaked to
	  scheduler for reinvite_timeout. Release the scheduler reference
	  to the dialog for reinvite timeout during dialog_unlink_all.
	  ASTERISK-24876 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4491/ ........ Merged
	  revisions 433112 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-18 02:34 +0000 [r433088]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_session.c: res_pjsip_session: Fix off-nominal extra
	  unref of session.

2015-03-17 22:15 +0000 [r433060-433064]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/asterisk.c, main/config.c, main/xmldoc.c, main/manager.c,
	  include/asterisk/config.h, main/utils.c, main/codec_builtin.c,
	  main/endpoints.c: Various: bugfixes found via chaos Using
	  DEBUG_CHAOS several instances of a null pointer crash, and one
	  uninitialized variable were uncovered and fixed. Also added
	  details on why Asterisk failed to initialize. Review:
	  https://reviewboard.asterisk.org/r/4468/

	* build_tools/cflags.xml, include/asterisk/utils.h: core: Introduce
	  chaos into memory allocations Locate potential crashes by
	  exercising seldom used code paths. This patch introduces a new
	  define DEBUG_CHAOS, and mechanism to randomly return an error
	  condition from functions that will seldom do so. Functions that
	  handle the allocation of memory get the first treatment. Review:
	  https://reviewboard.asterisk.org/r/4463/

2015-03-17 21:49 +0000 [r433057]  Richard Mudgett <rmudgett@digium.com>

	* main/netsock2.c, /, res/res_pjsip_sdp_rtp.c, res/res_pjsip_t38.c,
	  apps/app_externalivr.c, res/res_pjsip_acl.c: Audit
	  ast_sockaddr_resolve() usage for memory leaks. Valgrind found
	  some memory leaks associated with ast_sockaddr_resolve(). Most of
	  the leaks had already been fixed by earlier memory leak hunt
	  patches. This patch performs an audit of ast_sockaddr_resolve()
	  and found one more. * Fix ast_sockaddr_resolve() memory leak in
	  apps/app_externalivr.c:app_exec(). * Made
	  main/netsock2.c:ast_sockaddr_resolve() always set the addrs
	  parameter for safety so the pointer will never be uninitialized
	  on return. The same goes for
	  res/res_pjsip_acl.c:extract_contact_addr(). * Made functions that
	  call ast_sockaddr_resolve() with RAII_VAR() controlling the addrs
	  variable use ast_free instead of ast_free_ptr to provide better
	  MALLOC_DEBUG information. Review:
	  https://reviewboard.asterisk.org/r/4509/ ........ Merged
	  revisions 433056 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-17 18:34 +0000 [r433028-433031]  Kevin Harwell <kharwell@digium.com>

	* include/asterisk/res_pjsip.h,
	  res/res_pjsip_endpoint_identifier_anonymous.c,
	  res/res_pjsip_endpoint_identifier_ip.c, res/res_pjsip.c,
	  res/res_pjsip_endpoint_identifier_user.c: res_pjsip: Allow
	  configuration of endpoint identifier query order Updated some
	  documentation stating that endpoint identifiers registered
	  without a name are place at the front of the lookup list. Also
	  renamed register method
	  'ast_sip_register_endpoint_identifier_by_name' to
	  'ast_sip_register_endpoint_identifier_with_name' ASTERISK-24840
	  Reported by: Mark Michelson

	* configs/samples/pjsip.conf.sample, CHANGES, res/res_pjsip.c,
	  res/res_pjsip_endpoint_identifier_user.c,
	  include/asterisk/res_pjsip.h, res/res_pjsip/config_global.c,
	  res/res_pjsip_endpoint_identifier_anonymous.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  contrib/ast-db-manage/config/versions/45e3f47c6c44_add_pjsip_endpoint_identifier_order.py:
	  res_pjsip: Allow configuration of endpoint identifier query order
	  This patch fixes previously reverted code that caused binary
	  incompatibility problems with some modules. And like the original
	  patch it makes sure that no matter what order the endpoint
	  identifier modules were loaded, priority is given based on the
	  ones specified in the new global 'endpoint_identifier_order'
	  option. ASTERISK-24840 Reported by: Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/4489/

2015-03-17 16:10 +0000 [r433005]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip.c: res_pjsip: Add reason comment.

2015-03-14 02:28 +0000 [r432971]  Matthew Jordan <mjordan@digium.com>

	* /, main/format_cap.c: main/frame: Don't report empty disallow
	  values as an error In realtime, it is normal to have a database
	  with both 'allow' and 'disallow' columns in the schema. It is
	  perfectly valid to have an 'allow' value of '!all,g722,ulaw,alaw'
	  and no 'disallow' value. Unlike in static conf files, you can't
	  *not* provide the disallow value. Thus, the empty disallow value
	  causes a spurious WARNING message, which is kind of annoying.
	  This patch makes it so that a 'disallow' value with no ... value
	  ... is ignored. Granted, you can still screw this up as well, as
	  technically specifying 'disallow=all,!ulaw' allows only ulaw, and
	  then you would have no 'allow' value in your database. But
	  really, why would you do that? WHY? ASTERISK-16779 #close
	  Reported by: Atis Lezdins ........ Merged revisions 432970 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-14 02:00 +0000 [r432945-432949]  Joshua Colp <jcolp@digium.com>

	* funcs/func_curl.c, /: func_curl: Don't hold exclusive lock when
	  performing HTTP request. This code originally kept a lock held
	  when performing the HTTP request to ensure that the options
	  provided to curl remain valid. This doesn't seem to be necessary
	  these days and holding the lock caused requests to happen
	  sequentially instead of in parallel. ASTERISK-18708 #close
	  Reported by: Dave Cabot ........ Merged revisions 432948 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* main/cli.c, /: core: Fix tab completion of "core set debug
	  channel" CLI command. The "core set debug channel" CLI command
	  mistakenly had source filenames added to its tab completion. This
	  occurred because the CLI generator fell back to the "core set
	  debug" command which permits setting debug at a source filename
	  level. ASTERISK-21038 #close Reported by: Richard Kenner ........
	  Merged revisions 432944 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-14 01:21 +0000 [r432920-432938]  Matthew Jordan <mjordan@digium.com>

	* /, funcs/func_env.c: FILE: fix retrieval of file contents when
	  offset is specified The loop that reads in a file was not
	  correctly using the offset when determining what bytes to append
	  to the output. This patch corrects the logic such that the
	  correct portion of the file is extracted when an offset is
	  specified. ASTERISK-21765 Reported by: John Zhong Tested by: Matt
	  Jordan, Di-Shi Sun patches: file_read_390821.patch uploaded by
	  Di-Shi Sun (License 5076) ........ Merged revisions 432935 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* apps/app_amd.c, /, configs/samples/amd.conf.sample: apps/app_amd:
	  Document maximum_word_length option; fix AMDCAUSE documentation
	  This patch corrects the documentation for the AMD application.
	  Specifically: * It documents the maximum_word_length option,
	  which limits the maximum allowed length of a single utterance. *
	  It clarifies the AMDCAUSE values MAXWORDS and MAXWORDLENGTH.
	  MAXWORDLENGTH was documented as MAXWORDS, while MAXWORDS was
	  undocumented. Thanks to the issue reporter, Frank DiGennaro, for
	  pointing out the issues. ASTERISK-19470 #close Reported by: Frank
	  DiGennaro ........ Merged revisions 432918 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-13 17:04 +0000 [r432892-432894]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip/pjsip_configuration.c: chan_pjsip: AMI action
	  PJSIPShowEndpoint closes AMI connection on error. Also fixed
	  similar problem with AMI action PJSIPShowEndpoints.
	  ASTERISK-24872 #close Reported by: Dmitriy Serov Review:
	  https://reviewboard.asterisk.org/r/4487/

	* channels/chan_pjsip.c, res/res_pjsip_caller_id.c:
	  chan_pjsip/res_pjsip_callerid: Make Party ID handling simpler and
	  consistent. The res_pjsip modules were manually checking both
	  name and number presentation values when there is a function that
	  determines the combined presentation for a party ID struct. The
	  function takes into account if the name or number components are
	  valid while the manual code rarely checked if the data was even
	  valid. * Made use ast_party_id_presentation() rather than
	  manually checking party ID presentation values. * Ensure that
	  set_id_from_pai() and set_id_from_rpid() will not return
	  presentation values other than what is pulled out of the SIP
	  headers. It is best if the code doesn't assume that
	  AST_PRES_ALLOWED and AST_PRES_USER_NUMBER_UNSCREENED are zero. *
	  Fixed copy paste error in add_privacy_params() dealing with RPID
	  privacy. * Pulled the id->number.valid test from
	  add_privacy_header() and add_privacy_params() up into the parent
	  function add_id_headers() to skip adding PAI/RPID headers
	  earlier. * Made update_connected_line_information() not send out
	  connected line updates if the connected line number is invalid.
	  Lower level code would not add the party ID information and thus
	  the sent message would be unnecessary. * Eliminated RAII_VAR
	  usage in send_direct_media_request(). Review:
	  https://reviewboard.asterisk.org/r/4472/

2015-03-13 14:48 +0000 [r432868]  Kevin Harwell <kharwell@digium.com>

	* include/asterisk/res_pjsip.h, res/res_pjsip/config_global.c,
	  res/res_pjsip_endpoint_identifier_anonymous.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  contrib/ast-db-manage/config/versions/45e3f47c6c44_add_pjsip_endpoint_identifier_order.py,
	  configs/samples/pjsip.conf.sample, CHANGES, res/res_pjsip.c,
	  res/res_pjsip_endpoint_identifier_user.c: Revert - res_pjsip:
	  Allow configuration of endpoint identifier query order Due to a
	  break in binary compatibility with some other modules these
	  changes are being reverted until the issue can be resolved.
	  ASTERISK-24840 Reported by: Mark Michelson

2015-03-12 12:58 +0000 [r432808-432811]  Matthew Jordan <mjordan@digium.com>

	* /, main/audiohook.c: main/audiohook: Update internal sample rate
	  on reads When an audiohook is created (which is used by the
	  various Spy applications and Snoop channel in Asterisk 13+), it
	  initially is given a sample rate of 8kHz. It is expected,
	  however, that this rate may change based on the media that passes
	  through the audiohook. However, the read/write operations on the
	  audiohook behave very differently. When a frame is written to the
	  audiohook, the format of the frame is checked against the
	  internal sample rate. If the rate of the format does not match
	  the internal sample rate, the internal sample rate is updated and
	  a new SLIN format is chosen based on that sample rate. This works
	  just fine. When a frame is read, however, we do something quite
	  different. If the format rate matches the internal sample rate,
	  all is fine. However, if the rates don't match, the audiohook
	  attempts to "fix up" the number of samples that were requested.
	  This can result in some seriously large number of samples being
	  requested from the read/write factories. Consider the worst case
	  - 192kHz SLIN. If we attempt to read 20ms worth of audio produced
	  at that rate, we'd request 3840 samples (192000 / (1000 / 20)).
	  However, if the audiohook is still expecting an internal sample
	  rate of 8000, we'll attempt to "fix up" the requested samples to:
	  samples_converted = samples * (ast_format_get_sample_rate(format)
	  / (float) audiohook->hook_internal_samp_rate); which is: 92160 =
	  3840 * (192000 / 8000) This results in us attempting to read
	  92160 samples from our factories, as opposed to the 3840 that we
	  actually wanted. On a 64-bit machine, this miraculously survives
	  - despite allocating up to two buffers of length 92160 on the
	  stack. The 32-bit machines aren't quite so lucky. Even in the
	  case where this works, we will either (a) get way more samples
	  than we wanted; or (b) get about 3840 samples, assuming the
	  timing is pretty good on the machine. Either way, the calculation
	  being performed is wrong, based on the API users expectations. My
	  first inclination was to allocate the buffers on the heap. As it
	  is, however, there's at least two drawbacks with doing this: (1)
	  It's a bit complicated, as the size of the buffers may change
	  during the lifetime of the audiohook (ew). (2) The stack is
	  faster (yay); the heap is slower (boo). Since our calculation is
	  flat out wrong in the first place, this patch fixes this issue by
	  instead updating the internal sample rate based on the format
	  passed into the read operation. This causes us to read the
	  correct number of samples, and has the added benefit of setting
	  the audihook with the right SLIN format. Note that this issue was
	  caught by the Asterisk Test Suite as a result of r432195 in the
	  13 branch. Because this issue is also theoretically possible in
	  Asterisk 11, the change is being made here as well. Review:
	  https://reviewboard.asterisk.org/r/4475/ ........ Merged
	  revisions 432810 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* Makefile, include/asterisk/utils.h, /, configure, main/Makefile,
	  configure.ac, include/asterisk/inline_api.h, makeopts.in: Add
	  support for the clang compiler; update RAII_VAR to use
	  BlocksRuntime RAII_VAR, which is used extensively in Asterisk to
	  manage reference counted resources, uses a GCC extension to
	  automatically invoke a cleanup function when a variable loses
	  scope. While this functionality is incredibly useful and has
	  prevented a large number of memory leaks, it also prevents
	  Asterisk from being compiled with clang. This patch updates the
	  RAII_VAR macro such that it can be compiled with clang. It makes
	  use of the BlocksRuntime, which allows for a closure to be
	  created that performs the actual cleanup. Note that this does not
	  attempt to address the numerous warnings that the clang compiler
	  catches in Asterisk. Much thanks for this patch goes to: * The
	  folks on StackOverflow who asked this question and Leushenko for
	  providing the answer that formed the basis of this code:
	  http://stackoverflow.com/questions/24959440/rewrite-gcc-cleanup-macro-with-nested-function-for-clang
	  * Diederik de Groot, who has been extremely patient in working on
	  getting this patch into Asterisk. Review:
	  https://reviewboard.asterisk.org/r/4370/ ASTERISK-24133
	  ASTERISK-23666 ASTERISK-20399 ASTERISK-20850 #close Reported by:
	  Diederik de Groot patches: RAII_CLANG.patch uploaded by Diederik
	  de Groot (License 6600) ........ Merged revisions 432807 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-11 16:38 +0000 [r432764-432787]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip/config_domain_aliases.c,
	  res/res_pjsip/include/res_pjsip_private.h,
	  include/asterisk/res_pjsip.h: res_pjsip: Move internal
	  init/destroy prototypes to private header file. Done as a
	  separate commit from a finding in
	  https://reviewboard.asterisk.org/r/4467/

	* include/asterisk/res_pjsip.h, res/res_pjsip/config_global.c,
	  res/res_pjsip/pjsip_configuration.c: res_pjsip: Fix pjsip.conf
	  type=global object default value handling. When a type=global
	  section is not defined in pjsip.conf the global defaults are not
	  applied. As a result the mandatory Max-Forwards header is not
	  added to SIP messages for res_pjsip/chan_pjsip. The handling of
	  pjsip.conf type=global objects has several problems: 1) If the
	  global object is missing the defaults are not applied. 2) If the
	  global object is missing the default_outbound_endpoint's default
	  value is not returned by
	  ast_sip_global_default_outbound_endpoint(). 3) Defines are needed
	  so default values only need to be changed in one place. * Added a
	  sorcery instance observer callback to check if there were any
	  type=global sections loaded. If there were more than one then
	  issue an error message. If there were none then apply the global
	  defaults. * Fixed ast_sip_global_default_outbound_endpoint() to
	  return the documented default when no type=global object is
	  defined. * Made defines for the global default values. *
	  Increased the default_useragent[] size because SVN version
	  strings can get lengthy and 128 characters may not be enough. *
	  Fixed an off-nominal code path ref leak in global_alloc() if the
	  string fields fail to initialize. * Eliminated RAII_VAR in
	  get_global_cfg() and ast_sip_global_default_outbound_endpoint().
	  ASTERISK-24807 #close Reported by: Anatoli Review:
	  https://reviewboard.asterisk.org/r/4467/

	* res/res_pjsip/pjsip_global_headers.c: res_pjsip: Fixed invalid
	  empty Server and User-Agent SIP headers. Setting pjsip.conf
	  useragent to an empty string results in an empty SIP header being
	  sent. * Made not add an empty SIP header item to the global SIP
	  headers list. Review: https://reviewboard.asterisk.org/r/4467/

2015-03-10 23:09 +0000 [r432742]  Joshua Colp <jcolp@digium.com>

	* main/stasis_channels.c, main/endpoints.c, main/stasis_bridges.c:
	  core: Don't create snapshots with locks. Snapshots are immutable
	  and are never changed. Allocating them with a lock is wasteful.
	  Review: https://reviewboard.asterisk.org/r/4469/

2015-03-10 21:33 +0000 [r432693-432721]  Matthew Jordan <mjordan@digium.com>

	* res/res_config_odbc.c, /: res/res_config_odbc: Fix improper
	  escaping of backslashes with MySQL When escaping backslashes with
	  MySQL, the proper way to escape the characters in a LIKE clause
	  is to escape the '\' four times, i.e., '\\\\'. To quote the MySQL
	  manual: "Because MySQL uses C escape syntax in strings (for
	  example, “\n” to represent a newline character), you must double
	  any “\” that you use in LIKE strings. For example, to search for
	  “\n”, specify it as “\\n”. To search for “\”, specify it as
	  “\\\\”; this is because the backslashes are stripped once by the
	  parser and again when the pattern match is made, leaving a single
	  backslash to be matched against." ASTERISK-24808 #close Reported
	  by: Javier Acosta patches: res_config_odbc.diff uploaded by
	  Javier Acosta (License 6690) ........ Merged revisions 432720
	  from http://svn.asterisk.org/svn/asterisk/branches/11

	* apps/app_voicemail.c, /: app_voicemail: Fix crash with IMAP
	  backends when greetings aren't present When an IMAP backend is in
	  use and greetings are set to be used, but aren't present for a
	  user in their IMAP folder, Asterisk will crash. This occurs due
	  to the mailstream being set to the 'greetings' folder and being
	  left in that particular state, regardless of the success/failure
	  of the attempt to access the folder the mailstream points to.
	  Later access of the mailstream assumes that it points to the
	  'INBOX' (or some other folder), resulting in either a crash (if
	  the greetings folder didn't exist and the mailstream is invalid)
	  or an inability to read messages from the 'INBOX' folder. This
	  patch restores the mailstream to its correct state after
	  accessing the greetings. This fixes the crash, and sets the
	  mailstream to the state that VoiceMailMain expects. Note that
	  while ASTERISK-23390 also contained a patch for this issue, the
	  patch on ASTERISK-24786 is the one being merged here. Review:
	  https://reviewboard.asterisk.org/r/4459/ ASTERISK-23390 #close
	  Reported by: Ben Smithurst ASTERISK-24786 #close Reported by:
	  Graham Barnett Tested by: Graham Barnett patches:
	  app_voicemail.c.patch.SIGSEGV3rev2 uploaded by Graham Barnett
	  (License 6685) ........ Merged revisions 432695 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* /, main/stdtime/localtime.c: localtime: Fix file descriptor leak
	  on kqueue(2) systems The localtime management in the Asterisk
	  core contains a thread that watches for changes in the local
	  timezone. On systems where the directory containing
	  /etc/localtime is modified frequently, the thread monitoring the
	  changes will be woken up to determine if any changes in timezone
	  have occurred. When using kqueue(2), this can cause a leak of
	  file descriptors due to some improper management of resources.
	  This patch updates the kqueue(2) handling in localtime, such that
	  is no longer leaks resources. Review:
	  https://reviewboard.asterisk.org/r/4450/ ASTERISK-24739 #close
	  Reported by: Ed Hynan patches: 11.15.0-u.diff uploaded by Ed
	  Hynan (Licnese 6680) 11.7.0-u.diff uploaded by Ed Hynan (License
	  6680) svn-trunk-Jan-26-2015-u.diff uploaded by Ed Hynan (License
	  6680) ........ Merged revisions 432691 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-10 16:04 +0000 [r432668]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_refer.c, res/res_pjsip_session.c,
	  include/asterisk/res_pjsip_session.h,
	  res/res_pjsip_session.exports.in: res_pjsip_refer: Fix occasional
	  unexpected BYE sent after receiving a REFER. A race condition
	  happened between initiating a transfer and requesting that a
	  dialog termination be delayed. Occasionally, the transferrer
	  channels would exit the bridge and hangup before the dialog
	  termination delay was requested. * Made request dialog
	  termination delay before initiating the transfer action. If the
	  transfer fails then cancel the delayed dialog termination
	  request. ASTERISK-24755 #close Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/4460/

2015-03-09 16:12 +0000 [r432638]  Kevin Harwell <kharwell@digium.com>

	* include/asterisk/res_pjsip.h, res/res_pjsip/config_global.c,
	  res/res_pjsip_endpoint_identifier_anonymous.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  contrib/ast-db-manage/config/versions/45e3f47c6c44_add_pjsip_endpoint_identifier_order.py
	  (added), configs/samples/pjsip.conf.sample, CHANGES,
	  res/res_pjsip.c, res/res_pjsip_endpoint_identifier_user.c:
	  res_pjsip: Allow configuration of endpoint identifier query order
	  It's possible to have a scenario that will create a conflict
	  between endpoint identifiers. For instance an incoming call could
	  be identified by two different endpoint identifiers and the one
	  chosen depended upon which identifier module loaded first. This
	  of course causes problems when, for example, the incoming call is
	  expected to be identified by username, but instead is identified
	  by ip. This patch adds a new 'global' option to res_pjsip called
	  'endpoint_identifier_order'. It is a comma separated list of
	  endpoint identifier names that specifies the order by which
	  identifiers are processed and checked. ASTERISK-24840 #close
	  Reported by: Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/4455/

2015-03-08 01:46 +0000 [r432614]  Joshua Colp <jcolp@digium.com>

	* res/res_rtp_asterisk.c: res_rtp_asterisk: Fix wrongful use of
	  USE_PJPROJECT define. As pjproject is now used as a shared
	  library a different define, HAVE_PJPROJECT, is used to specify if
	  pjproject is present. ASTERISK-24830 #close Reported by: Stefan
	  Engström

2015-03-06 22:50 +0000 [r432574-432594]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_refer.c: res_pjsip_refer: Make safely get the
	  context for a blind transfer. Made safely get the
	  TRANSFER_CONTEXT channel value while the channel is locked in
	  refer_incoming_attended_request() and
	  refer_incoming_blind_request(). The pointer returned by
	  pbx_builtin_getvar_helper() is only valid while the channel is
	  locked.

	* res/res_pjsip_refer.c: res_pjsip_refer: Made
	  refer_attended_alloc() not create the ao2 object with a lock. The
	  lock is unused.

2015-03-06 21:11 +0000 [r432556]  Jonathan Rose <jrose@digium.com>

	* include/asterisk/app.h, main/app.c: app: Add functions to swap
	  voicemail function table for testing purposes

2015-03-06 20:18 +0000 [r432528-432534]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_dahdi.c, channels/sig_analog.c, /,
	  channels/chan_dahdi.h, channels/sig_analog.h, UPGRADE.txt:
	  chan_dahdi/sig_analog: Fix distinctive ring detection to suck
	  less. The distinctive ring feature interferes with detecting
	  Caller ID and appears to have been broken for years. What happens
	  is if you have a ring-ring cadence as used in the UK you get too
	  many DAHDI events for the distinctive ring pattern array and
	  Caller ID detection is aborted. I think when Zapata/DAHDI added
	  the ring begin event it broke distinctive ring. More events
	  happen than before and the code does no filtering of which event
	  times are recorded in the pattern array. * Made distinctive ring
	  only record the ringt count when the ring ends instead of on just
	  any DAHDI event. Distinctive ring can be ring, ring-ring,
	  ring-ring-ring, or different ring durations for the up to three
	  rings. * Fixed the distinctive ring detection enable
	  (chan_dahdi.conf option usedistinctiveringdetection) to be per
	  port instead of somewhat per port and somewhat global. This has
	  been broken since v1.8. * Fixed using the default distinctive
	  ring context when the detected pattern does not match any
	  configured dringX patterns. The default context did not get set
	  when the previous call was a matched distinctive ring pattern and
	  the current call is not matched. This has been broken since v1.8.
	  * Made distinctive ring have no effect on Caller ID detection
	  when it is disabled. Caller ID detection just monitors for 10
	  seconds before giving up. * Fixed leak of struct callerid_state
	  memory when a polarity reversal during Caller ID detection causes
	  the incoming call to be aborted. DAHDI-1143 AST-1545
	  ASTERISK-24825 #close Reported by: Richard Mudgett ASTERISK-17588
	  Reported by: Daniel Flounders Review:
	  https://reviewboard.asterisk.org/r/4444/ ........ Merged
	  revisions 432530 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* /, channels/chan_sip.c: chan_sip: Fix realtime locking inversion
	  when poking a just built peer. When a realtime peer is built it
	  can cause a locking inversion when the just built peer is poked.
	  If the CLI command "sip show channels" is periodically executed
	  then a deadlock can happen because of the locking inversion. *
	  Push the peer poke off onto the scheduler thread to avoid the
	  locking inversion of the just built realtime peer. AST-1540
	  ASTERISK-24838 #close Reported by: Richard Mudgett Review:
	  https://reviewboard.asterisk.org/r/4454/ ........ Merged
	  revisions 432526 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-05 16:38 +0000 [r432485]  George Joseph <george.joseph@fairview5.com>

	* apps/app_voicemail.c, /: app_voicemail: Fix compile breaking in
	  app_voicemail with IMAP_STORAGE. There is a leftover "assert" in
	  app_voicemail/__messagecount that references variables that don't
	  exist. This causes the compile to fail when --enable-dev-mode and
	  IMAP_STORAGE are selected. This patch removes the assert.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4461/ ........ Merged
	  revisions 432484 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-03-04 18:52 +0000 [r432453]  Matthew Jordan <mjordan@digium.com>

	* main/translate.c: translate: Prevent invalid memory accesses on
	  fast shutdown When a 'core restart now' or 'core stop now' is
	  executed and a channel is currently in a media operation, the
	  translator matrix can be destroyed while a channel is currently
	  blocked on getting the best translation choice (see
	  ast_translator_best_choice). When the channel gets the mutex, the
	  translation matrix now has invalid memory, and Asterisk crashes.
	  This patch does two things: (1) We now only clean up the
	  translation matrix on a graceful shutdown. In that case, there
	  are no channels, and so there is no risk of this occurring. (2)
	  We also now set the __matrix and __indextable to NULL. In some
	  initial backtraces when this occurred, it looked as if there was
	  a memory corruption occurring, and it wasn't until we determined
	  that something had restarted Asterisk that the issue became
	  clear. By setting these to NULL on shutdown, it becomes a bit
	  easier to determine why a crash is occurring. Note that we could
	  litter the code with NULL checks on the __matrix, but the act of
	  making the translation matrix cleaned up on shutdown should
	  preclude this issue from occurring in the first place, and this
	  part of the code needs to be as fast as possible. Review:
	  https://reviewboard.asterisk.org/r/4457/

2015-03-02 19:14 +0000 [r432423]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_sdp_rtp.c: res/res_pjsip_sdp_rtp: Revert portion of
	  r432195 Unfortunately, while initial testing with ConfBridge did
	  not reproduce the audio problem alluded to in the comment in
	  res_pjsip_sdp_rtp, further testing did show that bridge_softmix
	  and/or ConfBridge has a severe problem bridging two or more
	  participants at different sampling rates. Sometimes, it even
	  picks odd sampling rates that cause hideous audio problems. This
	  patch backs out the offending portion of the code until the
	  issues in the affected bridging modules can be more properly
	  analyzed. ASTERISK-24841

2015-02-27 18:23 +0000 [r432404]  Richard Mudgett <rmudgett@digium.com>

	* main/json.c, rest-api/api-docs/endpoints.json,
	  res/ari/resource_endpoints.c, res/res_ari_endpoints.c,
	  include/asterisk/json.h, res/ari/resource_channels.c: ARI: Fix
	  crash if integer values used in JSON payload 'variables' object.
	  Sending the following ARI commands caused Asterisk to crash if
	  the JSON body 'variables' object passes values of types other
	  than strings. POST /ari/channels POST /ari/channels/{channelid}
	  PUT /ari/endpoints/sendMessage PUT
	  /ari/endpoints/{tech}/{resource}/sendMessage * Eliminated
	  RAII_VAR usage in ast_ari_channels_originate_with_id(),
	  ast_ari_channels_originate(), ast_ari_endpoints_send_message(),
	  and ast_ari_endpoints_send_message_to_endpoint(). ASTERISK-24751
	  #close Reported by: jeffrey putnam Review:
	  https://reviewboard.asterisk.org/r/4447/

2015-02-26 18:52 +0000 [r432385]  Scott Griepentrog <sgriepentrog@digium.com>

	* include/asterisk/dial.h, main/dial.c: Dial API: add self destruct
	  option when complete This patch adds a self-destruction option to
	  the dial api. The usefulness of this is mostly when using async
	  mode to spawn a separate thread used to handle the new call,
	  while the calling thread is allowed to go on about other
	  business. The only alternative to this option would be the
	  calling thread spawning a new thread, or hanging around itself
	  waiting to destroy the dial struct after completion. Example of
	  use (minus error checking): struct ast_dial *dial =
	  ast_dial_create(); ast_dial_append(dial, "PJSIP", "200", NULL);
	  ast_dial_option_global_enable(dial, AST_DIAL_OPTION_ANSWER_EXEC,
	  "Echo"); ast_dial_option_global_enable(dial,
	  AST_DIAL_OPTION_SELF_DESTROY, NULL); ast_dial_run(dial, NULL, 1);
	  The dial_run call will return almost immediately after spawning
	  the new thread to run and monitor the dial. If the call is
	  answered, it is placed into the echo app. When completed, it will
	  call ast_dial_destroy() on the dial structure. Note that any
	  allocations made to pass values to ast_dial_set_user_data() or
	  dial options must be free'd in a state callback function on any
	  of: AST_DIAL_RESULT_UNASWERED, AST_DIAL_RESULT_ANSWERED,
	  AST_DIAL_RESULT_HANGUP, or AST_DIAL_RESULT_TIMEOUT. Review:
	  https://reviewboard.asterisk.org/r/4443/

2015-02-26 17:07 +0000 [r432363]  Kevin Harwell <kharwell@digium.com>

	* /, apps/app_chanspy.c, main/channel.c: app_chanspy, channel: fix
	  frame leaks Fixed a couple of frame leaks that were found during
	  testing. ASTERISK-24828 #close Reported by: John Hardin Review:
	  https://reviewboard.asterisk.org/r/4445/ ........ Merged
	  revisions 432362 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-26 04:58 +0000 [r432321-432342]  Matthew Jordan <mjordan@digium.com>

	* /, apps/Makefile, channels/Makefile: make: Remove 'res_features'
	  from libraries to link against with cygwin/mingw32 Both the apps
	  and channels Makefiles still listed 'res_features' as modules to
	  link against when compiling for cygwin or mingw32. This module
	  hasn't existed for quite some time. ASTERISK-18105 #close
	  Reported by: feyfre ........ Merged revisions 432341 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* /, channels/chan_sip.c: channels/chan_sip: Don't send a BYE after
	  final response when PBX thread fails When Asterisk fails to start
	  a PBX thread for a new channel - for example, when the maxcalls
	  setting in asterisk.conf is exceeded - we currently send a final
	  response, and then attempt to send a BYE request to the UA. Since
	  that's all sorts of wrong, this patch fixes that by setting
	  sipalreadygone on the sip_pvt such that we don't get stuck
	  sending BYE requests to something that does not want it. Note
	  that this patch is a slight modification of the one on
	  ASTERISK-15434. For clarity, it explicitly calls sipalreadygone
	  with the calls to transmit a final response. ASTERISK-21845
	  ASTERISK-15434 #close Reported by: Makoto Dei Tested by: Matt
	  Jordan patches: sip-pbxstart-failed.patch uploaded by Makoto Dei
	  (License 5027) ........ Merged revisions 432320 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-25 23:48 +0000 [r432301]  Rusty Newton <rnewton@digium.com>

	* configs/basic-pbx/README (added), configs/basic-pbx (added),
	  configs/basic-pbx/extensions.conf (added),
	  configs/basic-pbx/logger.conf (added),
	  configs/basic-pbx/indications.conf (added),
	  configs/basic-pbx/musiconhold.conf (added),
	  configs/basic-pbx/asterisk.conf (added),
	  configs/basic-pbx/pjsip.conf (added),
	  configs/basic-pbx/modules.conf (added),
	  configs/basic-pbx/voicemail.conf (added): configs/basic-pbx -
	  Super Awesome Company example configs Phase 1, Patch 1 Example
	  configuration files for a "basic PBX" deployment for the
	  fictitious Super Awesome Company. Details at
	  https://reviewboard.asterisk.org/r/4379/ and
	  https://wiki.asterisk.org/wiki/display/AST/Super+Awesome+Company
	  Reported by: Malcolm Davenport Tested by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/4379/

2015-02-25 23:09 +0000 [r432258-432281]  Matthew Jordan <mjordan@digium.com>

	* /, configure, configure.ac: configure: Promote SQLite3 "not
	  installed" warning to error Since Asterisk won't build without
	  the library, not having it is definitely an error. Thanks to Kyle
	  Kurz for pointing this out. ........ Merged revisions 432280 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* /, channels/chan_sip.c: channels/chan_sip: Clarify WARNING
	  message in mismatched SRTP scenario When we receive an SDP as
	  part of an offer/answer for a peer/friend has been configured to
	  require encryption, and that SDP offer/answer failed to provide
	  acceptable crypto attributes, we currently issue a WARNING that
	  uses the phrase "we" and "requested". In this case, both of those
	  terms are ambiguous - the user will probably think "we" is
	  Asterisk (it most likely isn't) and it may not be a "request", so
	  much as an SDP that was received in some fashion. This patch
	  makes the WARNING messages slightly less bad and a bit more
	  accurate as well. ASTERISK-23214 #close Reported by: Rusty Newton
	  ........ Merged revisions 432277 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* main/sdp_srtp.c, /: channels/sip/sdp_crypto: Handle SRTP keys
	  negotiated with key lifetime/MKI Prior to this patch, SDP offers
	  negotiating SDES-SRTP crypto attributes would be rejected if
	  those crypto attributes contained either a key lifetime or a MKI
	  parameter. While from a theoretical point of view this was
	  defensible - Asterisk does not support key lifetimes or multiple
	  crypto keys - from a practical point of view, this is quite a
	  problem. A large number of endpoints offer lifetimes/MKI, which
	  Asterisk can tolerate so long as it doesn't actually have to
	  support anything more than a single key or refresh the key. In
	  reality, this is (so far as we've seen) always the case. This
	  patch is a forward port of Olle's work in the
	  lingon-srtp-key-lifetime-1.8 branch. To quote Olle from
	  ASTERISK-17721, it handles lifetime/MKI parameters in the
	  following fashion: > The Lingon branch now handle lifetime and
	  MKI parameters. > > We only accept lifetimes up to max for the
	  crypto and higher than 10 hours > for packetization of 20 ms (50
	  pps). > > We only handle MKI with index 1. > > We do not really
	  bother with counting packets and reinviting at end of > lifetime,
	  so the min of 10 hours kind of takes care of most calls. If there
	  > are longer ones, we rely on the other side for re-invites. > >
	  It's still not perfect, but I personally think this is an
	  improvement. A > configuration option for minimum lifetime
	  accepted could be added. When the patch was ported forward, I
	  decided against adding a configuration option as Olle's handling
	  was more than sufficient for every case I've seen come through
	  the issue tracker or through interoperability testing. We can
	  revisit that decision if it proves to be false. A few small other
	  tweaks were made to the surrounding code to reduce indentation
	  and provide better type safety for the 'tag' parameter. Review:
	  https://reviewboard.asterisk.org/r/4419/ Review:
	  https://reviewboard.asterisk.org/r/4418/ ASTERISK-17721 #close
	  Reported by: Terry Wilson ASTERISK-17899 #close Reported by:
	  Dwayne Hubbard patches: lingon-srtp-key-lifetime-1.8.diff
	  uploaded by oej (License 5267) ASTERISK-20233 Reported by: tootai
	  ASTERISK-22748 Reported by: Alejandro Mejia ........ Merged
	  revisions 432239 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-25 20:44 +0000 [r432237]  David M. Lee <dlee@digium.com>

	* res/res_http_websocket.c, /: Increase WebSocket frame size and
	  improve large read handling Some WebSocket applications, like
	  [chan_respoke][], require a larger frame size than the default
	  8k; this patch bumps the default to 16k. This patch also fixes
	  some problems exacerbated by large frames. The sanity counter was
	  decremented on every fread attempt in ws_safe_read(), regardless
	  of whether data was read from the socket or not. For large
	  frames, this could result in loss of sanity prior to reading the
	  entire frame. (16k frame / 1448 bytes per segment = 12 segments).
	  This patch changes the sanity counter so that it only decrements
	  when fread() doesn't read any bytes. This more closely matches
	  the original intention of ws_safe_read(), given that the error
	  message is "Websocket seems unresponsive". This patch also
	  properly logs EOF conditions, so disconnects are no longer
	  confused with unresponsive connections. [chan_respoke]:
	  https://github.com/respoke/chan_respoke Review:
	  https://reviewboard.asterisk.org/r/4431/ ........ Merged
	  revisions 432236 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-24 22:14 +0000 [r432195-432199]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: channels/chan_sip: Fix crash when
	  transmitting packet after thread shutdown When the monitor thread
	  is stopped, its pthread ID is set to a specific value
	  (AST_PTHREADT_STOP) so that later portions of the code can
	  determine whether or not it is safe to manipulate the thread.
	  Unfortunately, __sip_reliable_xmit failed to check for that
	  value, checking instead only for AST_PTHREAD_STOP. Passing the
	  invalid yet very specific value to pthread_kill causes a crash.
	  This patch adds a check for AST_PTHREADT_STOP in
	  __sip_reliable_xmit such that it doesn't attempt to poke the
	  thread if the thread has already been stopped. ASTERISK-24800
	  #close Reported by: JoshE ........ Merged revisions 432198 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* channels/chan_pjsip.c, main/channel.c, res/res_pjsip_sdp_rtp.c,
	  res/ari/resource_channels.c: ARI/PJSIP: Apply requesting
	  channel's format cap to created channels This patch addresses the
	  following problems: * ari/resource_channels: In ARI, we currently
	  create a format capability structure of SLIN and apply it to the
	  new channel being created. This was originally done when the PBX
	  core was used to create the channel, as there was a condition
	  where a newly created channel could be created without any
	  formats. Unfortunately, now that the Dial API is being used, this
	  has two drawbacks: (a) SLIN, while it will ensure audio will
	  flows, can cause a lot of needless transcodings to occur,
	  particularly when a Local channel is created to the dialplan.
	  When no format capabilities are available, the Dial API handles
	  this better by handing all audio formats to the requsted
	  channels. As such, we defer to that API to provide the format
	  capabilities. (b) If a channel (requester) is causing this
	  channel to be created, we currently don't use its format
	  capabilities as we are passing in our own. However, the Dial API
	  will use the requester channel's formats if none are passed into
	  it, and the requester channel exists and has format capabilities.
	  This is the "best" scenario, as it is the most likely to create a
	  media path that minimizes transcoding. Fixing this simply entails
	  removing the providing of the format capabilities structure to
	  the Dial API. * chan_pjsip: Rather than blindly picking the first
	  format in the format capability structure - which actually *can*
	  be a video or text format - we select an audio format, and only
	  pick the first format if that fails. That minimizes the weird
	  scenario where we attempt to transcode between video/audio. *
	  res_pjsip_sdp_rtp: Applied the joint capapbilites to the format
	  structure. Since ast_request already limits us down to one format
	  capability once the format capabilities are passed along, there's
	  no reason to squelch it here. * channel: Fixed a comment. The
	  reason we have to minimize our requested format capabilities down
	  to a single format is due to Asterisk's inability to convey the
	  format to be used back "up" a channel chain. Consider the
	  following: PJSIP/A => L;1 <=> L;2 => PJSIP/B g,u,a g,u,a g,u,a u
	  That is, we have PJSIP/A dialing a Local channel, where the
	  Local;2 dials PJSIP/B. PJSIP/A has native format capabilities
	  g722,ulaw,alaw; the Local channel has inherited those format
	  capabilities down the line; PJSIP/B supports only ulaw. According
	  to these format capabilities, ulaw is acceptable and should be
	  selected across all the channels, and no transcoding should
	  occur. However, there is no way to convey this: when L;2 and
	  PJSIP/B are put into a bridge, we will select ulaw, but that is
	  not conveyed to PJSIP/A and L;1. Thus, we end up with: PJSIP/A
	  <=> L;1 <=> L;2 <=> PJSIP/B g g X u u Which causes g722 to be
	  written to PJSIP/B. Even if we can convey the 'ulaw' choice back
	  up the chain (which through some severe hacking in Local channels
	  was accomplished), such that the chain looks like: PJSIP/A <=>
	  L;1 <=> L;2 <=> PJSIP/B u u u u We have no way to tell PJSIP/A's
	  *channel driver* to Answer in the SDP back with only 'ulaw'. This
	  results in all the channel structures being set up correctly, but
	  PJSIP/A *still* sending g722 and causing the chain to fall apart.
	  There's a lot of difficulty just in setting this up, as there are
	  numerous race conditions in the act of bridging, and no clean
	  mechanism to pass the selected format backwards down an
	  established channel chain. As such, the best that can be done at
	  this point in time is clarifying the comment. Review:
	  https://reviewboard.asterisk.org/r/4434/ ASTERISK-24812 #close
	  Reported by: Matt Jordan

2015-02-24 18:32 +0000 [r432175]  Kevin Harwell <kharwell@digium.com>

	* /, bridges/bridge_softmix.c: bridge_softmix: G.729 codec license
	  held When more than one call using the same codec type enters
	  into a softmix bridge and no audio is present for a channel the
	  bridge optimizes the out frame by using the same one for all
	  channels with the same codec type. Unfortunately, when that
	  number (channels with same codec type) dropped to <= 1 the codec
	  was not dereferenced. At least not until all parties left the
	  bridge. Thus in the case of G.729 the license was not released.
	  This patch ensures that the codec is dereferenced immediately
	  when the optimization no longer applies. ASTERISK-24797 #close
	  Reported by: Luke Hulsey Review:
	  https://reviewboard.asterisk.org/r/4429/ ........ Merged
	  revisions 432174 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-21 20:47 +0000 [r432118-432154]  Joshua Colp <jcolp@digium.com>

	* rest-api/api-docs/channels.json, res/ari/resource_channels.c,
	  res/res_ari_channels.c: res_ari_channels: Return a 404 response
	  when a requested channel variable does not exist. This change
	  makes it so that if a channel variable is requested and it does
	  not exist a 404 response will be returned instead of an
	  allocation failed response. This makes it easier to debug and
	  figure out what is going on for a user. ASTERISK-24677 #close
	  Reported by: Joshua Colp

	* res/res_pjsip_registrar.c: res_pjsip_registrar: Add Expires
	  header to 200 OK if present in REGISTER. Some implementations
	  don't pay attention to the expires for individual contacts. In
	  this case they may consider the lack of an Expires header in the
	  200 OK as unregistered. This change makes it so if an Expires
	  header is present in the REGISTER we will add one in the 200 OK.
	  ASTERISK-24785 #close Reported by: Ross Beer

	* res/res_pjsip.c: res_pjsip: Add a log message when creating a UAC
	  dialog to a target URI that is invalid. ASTERISK-24499 #close
	  Reported by: Rusty Newton

2015-02-21 17:35 +0000 [r432099]  Matthew Jordan <mjordan@digium.com>

	* apps/app_voicemail.c, /: apps/app_voicemail: Demote an ERROR
	  message to a WARNING message When using IMAP voicemail with
	  FreePBX, you will often get ERROR messages complaining about not
	  being able to find a mailbox. This is due to how FreePBX handles
	  voicemail mailboxes. Unfortunately, app_voicemail has to consider
	  this a configuration error, as in any other system it would be
	  indicative of someone misconfiguring their system. Regardless, a
	  misconfiguration is a WARNING, and not an ERROR. This patch
	  demotes the message so that system administrators can hopefully
	  reduce some of the noise in their log files. Note that in the
	  original patch this was made into a NOTICE, but that's a too
	  forgiving. ASTERISK-24790 #close Reported by: Graham Barnett
	  patches: app_voicemail.c.patch_noise uploaded by Graham Barnett
	  (License 6685) ........ Merged revisions 432098 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-21 14:05 +0000 [r432079]  Joshua Colp <jcolp@digium.com>

	* main/http.c, /: http: Add missing html tag to 'httpstatus'
	  functionality. ASTERISK-24724 #close Reported by: Ashley Sanders
	  ........ Merged revisions 432078 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-21 02:56 +0000 [r432055-432059]  Corey Farrell <git@cfware.com>

	* /, main/bucket.c, main/codec.c, main/loader.c: Allow shutdown to
	  unload modules that register bucket scheme's or codec's. * Change
	  __ast_module_shutdown_ref to be NULL safe (11+). * Allow modules
	  that call ast_bucket_scheme_register or ast_codec_register to be
	  unloaded during graceful shutdown only (13+ only). ASTERISK-24796
	  #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4428/ ........ Merged
	  revisions 432058 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* /, include/asterisk/lock.h: asterisk/lock.h: Fix syntax errors
	  for non-gcc OSX with 64-bit integers. Add a couple of missing
	  closing brackets / parenthesis. ASTERISK-24814 #close Reported
	  by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4436/ ........ Merged
	  revisions 432054 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-20 17:51 +0000 [r432034]  Richard Mudgett <rmudgett@digium.com>

	* /, channels/sig_analog.c: chan_dahdi/sig_analog: Put log message
	  strings on one line. With the log messages on one line, you can
	  search for the log message seen in the log and expect to find it.
	  ........ Merged revisions 432032 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-20 17:46 +0000 [r432033]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_publish_asterisk.c, res/res_pjsip_acl.c:
	  ASTERISK-24811: Add ast_sorcery_apply_config() to
	  res_pjsip_publish_asterisk. Matt Hoskins reported that
	  res_pjsip_publish_asterisk wouldn't pull config from realtime.
	  Turns out it was just missing a call ast_sorcery_apply_config().
	  res_pjsip_acl was missing it as well, so I added it. The other
	  pjsip modules looked OK. ASTERISK-24811 #close Reported-by: Matt
	  Hoskins Tested-by: George Joseph Tested-by: Matt Hoskins patches:
	  res_pjsip_publish_asterisk.c.patch submitted by Matt Hoskins
	  (license 6688) Review: https://reviewboard.asterisk.org/r/4433/

2015-02-20 15:47 +0000 [r432013]  Matthew Jordan <mjordan@digium.com>

	* apps/app_voicemail.c, /: apps/app_voicemail: Fix IMAP header
	  compatibility issue with Microsoft Exchange When interfacing with
	  Microsoft Exchange, custom headers will be returned as all lower
	  case. Currently, the IMAP header code will fail to parse the
	  returned custom headers, as it will be performing a case
	  sensitive comparison. This can cause playback of messages to
	  fail, as needed information - such as origtime - will not be
	  present. This patch updates app_voicemail's header parsing code
	  to perform a case insensitive lookup for the requested custom
	  headers. Since the headers are specific to Asterisk, e.g.,
	  'x-asterisk-vm-orig-time', and headers should be unique in an
	  IMAP message, this should cause no issues with other systems.
	  ASTERISK-24787 #close Reported by: Graham Barnett patches:
	  app_voicemail.c.patch_MSExchange uploaded by Graham Barnett
	  (License 6685) ........ Merged revisions 432012 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-19 21:25 +0000 [r431956-431993]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_dahdi.c, channels/sig_analog.c, /: chan_dahdi:
	  Remove some dead code. ........ Merged revisions 431992 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* main/aoc.c: ISDN AOC: Fix crash from an AOC-E message that
	  doesn't have a channel association. Processing an AOC-E event
	  that does not or no longer has a channel association causes a
	  crash. The problem with posting AOC events to the channel topic
	  is that AOC-E events don't always have a channel association and
	  posting the event to the all channels topic is just wrong. AOC-E
	  events do however have their own charging association method to
	  refer to the agreement with the charging entity. * Changed the
	  AOC events to post to the AMI manager topic instead of the
	  channel topics. If a channel is associated with the event then
	  channel snapshot information is supplied with the AMI event. *
	  Eliminated RAII_VAR() usage in aoc_to_ami() and
	  ast_aoc_manager_event(). This patch supercedes the patch on
	  Review: https://reviewboard.asterisk.org/r/4427/ ASTERISK-22670
	  #close Reported by: klaus3000 ASTERISK-24689 #close Reported by:
	  Marcel Manz ASTERISK-24740 #close Reported by: Panos Gkikakis
	  Review: https://reviewboard.asterisk.org/r/4430/

	* res/res_pjsip_refer.c: res_pjsip_refer: Handle INVITE with
	  Replaces failure after answer. * Fixed hangup handling of the
	  session->channel after answer if the ast_channel_move() or
	  ast_bridge_impart() fails. We are still the thread controlling
	  the session->channel so we need to call ast_hangup() to kill the
	  channel. * Fixed debug messages in
	  refer_incoming_invite_request() referencing incorrect channnels
	  on success. Code comments now say why the session->channel cannot
	  be used. Review: https://reviewboard.asterisk.org/r/4422/

2015-02-19 15:28 +0000 [r431937]  Matthew Jordan <mjordan@digium.com>

	* main/tcptls.c, /: tcptls: Handle new OpenSSL compile time option
	  to disable SSLv3 Some distributions are going to disable SSLv3 at
	  compile time. This option can be checked using the directive
	  OPENSSL_NO_SSL3_METHOD. This patch updates the TCP/TLS handling
	  in Asterisk to look for that directive before attempting to use
	  the SSLv3 specific methods. ASTERISK-24799 #close Reported by:
	  Alexander Traud patches: no-ssl3-method.patch uploaded by
	  Alexander Traud (License 6520) ........ Merged revisions 431936
	  from http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-19 02:01 +0000 [r431917]  Corey Farrell <git@cfware.com>

	* main/sched.c, /, include/asterisk/sched.h, channels/chan_iax2.c:
	  Create work around for scheduler leaks during shutdown. * Added
	  ast_sched_clean_by_callback for cleanup of scheduled events that
	  have not yet fired. * Run all pending peercnt_remove_cb and
	  replace_callno events in chan_iax2. Cleanup of replace_callno
	  events is only run 11, since it no longer releases any references
	  or allocations in 13+. ASTERISK-24451 #close Reported by: Corey
	  Farrell Review: https://reviewboard.asterisk.org/r/4425/ ........
	  Merged revisions 431916 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-17 15:31 +0000 [r431898]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_sdp_rtp.c, res/res_pjsip_messaging.c,
	  res/res_pjsip_caller_id.c, res/res_pjsip_refer.c,
	  res/res_pjsip_send_to_voicemail.c: res_pjsip_refer: Fix crash
	  from a REFER and BYE collision. Analyzing a one-off crash on a
	  busy system showed that processing a REFER request had a NULL
	  session channel pointer. The only way I can think of that could
	  cause this is if an outgoing BYE transaction overlapped the
	  incoming REFER transaction in a collision. Asterisk sends a BYE
	  while the phone sends a REFER to complete an attended transfer. *
	  Made check the session channel pointer before processing an
	  incoming REFER request in res_pjsip_refer. * Fixed similar crash
	  potential for res_pjsip supplement incoming request processing
	  for res_pjsip_sdp_rtp INFO, res_pjsip_caller_id INVITE/UPDATE,
	  res_pjsip_messaging MESSAGE, and res_pjsip_send_to_voicemail
	  REFER messages. * Made res_pjsip_messaging respond to a message
	  body too large with a 413 instead of ignoring it. ASTERISK-24700
	  #close Reported by: Zane Conkle Review:
	  https://reviewboard.asterisk.org/r/4417/

2015-02-16 21:29 +0000 [r431879]  Matthew Jordan <mjordan@digium.com>

	* res/res_rtp_asterisk.c: res/res_rtp_asterisk: Fix crash in debug
	  from RTCP reports without report block When RTCP debugging was
	  enabled, an RTCP report without a report block would cause a
	  crash. This was due to the verbose output not checking to see if
	  the report_block pointer was NULl before dereferencing it. This
	  patch adds the necessary check to prevent printing any verbose
	  output if the far side hasn't provided us the information they
	  should have. ASTERISK-24791 #close Reported by: JoshE Tested by:
	  JoshE

2015-02-15 19:00 +0000 [r431807-431860]  Joshua Colp <jcolp@digium.com>

	* configs/samples/pjsip.conf.sample: pjsip: Remove "contact" type
	  from pjsip.conf.sample The "contact" object is not meant to be
	  configured from the pjsip.conf configuration file. It is meant to
	  be created as a result of a registration and stored elsewhere.
	  ASTERISK-24085 #close Reported by: Rusty Newton

	* contrib/scripts/install_prereq: install_prereq: Tweak flags when
	  configuring pjproject. This change does two things: 1. Disables
	  debugging so assertions which can return an error do, instead of
	  asserting. 2. Enables IPv6 support. ASTERISK-24632 #close
	  Reported by: Rusty Newton

	* res/res_sorcery_config.c: res_sorcery_config: Improve object
	  lookup times. The res_sorcery_config module currently uses a
	  fixed bucket size of 53. This means that depending on the number
	  of objects you either end up with excess buckets or a lot of
	  collisions. Due to the way that res_sorcery_config is implemented
	  it's actually possible to make the bucket size dynamic based on
	  the number of objects. This is due to the fact that each loading
	  of the config file produces a new container and does not modify
	  the existing one. This change uses the number of expected objects
	  and finds a prime number near it. In practice depending on the
	  number of objects this can speed up lookups anywhere from 2X to
	  15X. This change also removes the lock from the container as it
	  is not needed. Review: https://reviewboard.asterisk.org/r/4423/

	* res/res_pjsip/pjsip_cli.c: res_pjsip: Add "pjsip show version"
	  CLI command. When debugging things it can be useful to know
	  absolutely what version of pjproject res_pjsip is running
	  against. This change adds a "pjsip show version" CLI command
	  which can be used to query for this. ASTERISK-24685 #close
	  Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/4424/

	* res/res_timing_pthread.c: res_timing_pthread: Fix leaky pipes.
	  During some refactoring the way private information for timers
	  was stored was changed. As a result of this the action which
	  normally removed the timer upon closure in res_timing_pthread was
	  also removed causing the timer to remain after it should using up
	  resources. This change ensures that the timer is removed upon
	  closure. ASTERISK-24768 #close Reported by: Matthias Urlichs
	  patches: timer.patch submitted by Matthias Urlichs (license 5508)

2015-02-15 00:32 +0000 [r431789]  Matthew Jordan <mjordan@digium.com>

	* /, apps/app_mixmonitor.c: apps/app_mixmonitor: Move Test Event
	  for MIXMONITOR_END to after it finishes The Test Event for
	  MIXMONITOR_END - which signals that a MixMonitor has completed -
	  technically fired before the filestream was closed. If a test
	  used this to trigger a condition to verify that the file was
	  written, it could result in a race condition where the file size
	  would not be what the test expected. Luckily, no tests were using
	  this (although they should have been). Since the test event
	  needed to be moved after the point where the MixMonitor autochan
	  has been destroyed, the test event no longer emits the channel
	  name. Luckily, nothing needs it. ........ Merged revisions 431788
	  from http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-14 19:45 +0000 [r431751-431771]  Joshua Colp <jcolp@digium.com>

	* main/sorcery.c: sorcery: Output an error message if a wizard is
	  specified for an object type and it isn't found. ASTERISK-24612
	  #close Reported by: Joshua Colp

	* res/res_pjsip_exten_state.c: res_pjsip_exten_state: Improve log
	  message when a subscription is attempted to a non-existent
	  extension. ASTERISK-24716 #close Reported by: Rusty Newton

	* channels/pjsip/dialplan_functions.c: 'information' ends with an
	  'n'.

	* channels/pjsip/dialplan_functions.c: chan_pjsip: Fix crash when
	  CHANNEL dialplan function is invoked with pjsip argument and no
	  type. ASTERISK-24771 #close Reported by: Niklas Larsson

2015-02-13 17:21 +0000 [r431734]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_session.c: res_pjsip_session: Fix double re-INVITE
	  collision crash. A multi-asterisk box setup with direct media
	  enabled would occasionally crash when two re-INVITE collisions on
	  a call leg happen in a row. The re-INVITE logic only had one
	  timer struct to defer the re-INVITE. When the second collision
	  happens the timer struct is overwritten and put into the timer
	  heap again. Resources for the first timer are leaked and the heap
	  has two positions occupied by the same timer struct. Now the heap
	  ordering is potentially corrupted, the timer will fire twice, and
	  any resources allocated for the second timer will be released
	  twice. * The solution is to put the collided re-INVITE into the
	  delayed requests queue with all the other delayed requests and
	  cherry pick the next request that can come off the queue when an
	  event happens. * Changed to put delayed BYE requests at the head
	  of the delayed queue. There is no sense in processing delayed
	  UPDATEs and re-INVITEs when a BYE has been requested. * Made the
	  start of a BYE request flush the delayed requests queue to
	  prevent a delayed request from overlapping the BYE transaction. I
	  saw a few cases where a delayed re-INVITE got started after the
	  BYE transaction started. * Changed the delayed_request struct to
	  use an enum instead of a string for the request method. Cherry
	  picking the queue is easier with an enum than string comparisons
	  and the compiler can warn if a switch statement does not cover
	  all defined enum values. * Improved the debug output to give more
	  information. It helps to know which channel is involved with an
	  endpoint. Trunks can have many channels associated with the
	  endpoint at the same time. ASTERISK-24727 #close Reported by:
	  Mark Michelson Review: https://reviewboard.asterisk.org/r/4414/

2015-02-12 20:32 +0000 [r431717]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_multihomed.c, res/stasis/control.c,
	  include/asterisk/stasis_app.h, rest-api/api-docs/channels.json,
	  res/ari/resource_channels.c, CHANGES, res/res_ari_channels.c,
	  channels/chan_pjsip.c, res/res_pjsip_nat.c,
	  res/res_pjsip_transport_websocket.c, res/ari/resource_channels.h:
	  ARI/PJSIP: Add the ability to redirect (transfer) a channel in a
	  Stasis app This patch adds a new feature to ARI to redirect a
	  channel to another server, and fixes a few bugs in PJSIP's
	  handling of the Transfer dialplan application/ARI redirect
	  capability. *New Feature* A new operation has been added to the
	  ARI channels resource, redirect. With this, a channel in a Stasis
	  application can be redirected to another endpoint of the same
	  underlying channel technology. *Bug fixes* In the process of
	  writing this new feature, two bugs were fixed in the PJSIP stack:
	  (1) The existing .transfer channel callback had the limitation
	  that it could only transfer channels to a SIP URI, i.e., you had
	  to pass 'PJSIP/sip:foo@my_provider.com' to the dialplan
	  application. While this is still supported, it is somewhat
	  unintuitive - particularly in a world full of endpoints. As such,
	  we now also support specifying the PJSIP endpoint to transfer to.
	  (2) res_pjsip_multihomed was, unfortunately, trying to 'help' a
	  302 redirect by updating its Contact header. Alas, that resulted
	  in the forwarding destination set by the dialplan application/ARI
	  resource/whatever being rewritten with very incorrect
	  information. Hence, we now don't bother updating an outgoing
	  response if it is a 302. Since this took a looong time to find,
	  some additional debug statements have been added to those modules
	  that update the Contact headers. Review:
	  https://reviewboard.asterisk.org/r/4316/ ASTERISK-24015 #close
	  Reported by: Private Name ASTERISK-24703 #close Reported by: Matt
	  Jordan

2015-02-11 18:02 +0000 [r431693-431698]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip/pjsip_configuration.c: res_pjsip: dtls_handler
	  causes Asterisk to crash There have been a couple of times where
	  a crash occurred in the dtls_handler section of the code for
	  res_pjsip. Unfortunately, in working this issue the problem was
	  unable to be reproduced. After looking at the backtraces and
	  through the code the current best guess as to why this happened
	  might be due to a reentrance problem and the strtok function. So,
	  the current fix is to convert the strtok function into the
	  reentrant version of the function, strtok_r. ASTERISK-24741
	  #close Reported by: Zane Conkle Review:
	  https://reviewboard.asterisk.org/r/4409/

	* res/ari/ari_websockets.c: ari_websockets: removed extra check on
	  websocket session read When merging the websocket timeout issue
	  (ASTERISK-24701) an extra, almost duplicate, check was left in
	  the code that should not have been. This removes it.
	  ASTERISK-24701 #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/4412/

2015-02-11 17:28 +0000 [r431692]  Richard Mudgett <rmudgett@digium.com>

	* main/bridge.c, main/http.c, apps/app_confbridge.c,
	  include/asterisk/channel.h, res/res_pjsip/pjsip_options.c,
	  res/res_pjsip_pubsub.c, main/asterisk.c, main/channel.c,
	  include/asterisk.h, channels/chan_sip.c: HTTP: Stop accepting
	  requests on final system shutdown. There are three CLI commands
	  to stop and restart Asterisk each. 1) core stop/restart now -
	  Hangup all calls and stop or restart Asterisk. New channels are
	  prevented while the shutdown request is pending. 2) core
	  stop/restart gracefully - Stop or restart Asterisk when there are
	  no calls remaining in the system. New channels are prevented
	  while the shutdown request is pending. 3) core stop/restart when
	  convenient - Stop or restart Asterisk when there are no calls in
	  the system. New calls are not prevented while the shutdown
	  request is pending. ARI has made stopping/restarting Asterisk
	  more problematic. While a shutdown request is pending it is
	  desirable to continue to process ARI HTTP requests for current
	  calls. To handle the current calls while a shutdown request is
	  pending, a new committed to shutdown phase is needed so ARI
	  applications can deal with the calls until the system is fully
	  committed to shutdown. * Added a new shutdown committed phase so
	  ARI applications can deal with calls until the final committed to
	  shutdown phase is reached. * Made refuse new HTTP requests when
	  the system has reached the final system shutdown phase. Starting
	  anything while the system is actively releasing resources and
	  unloading modules is not a good thing. * Split the bridging
	  framework shutdown to not cleanup the global bridging containers
	  when shutting down in a hurry. This is similar to how other
	  modules prevent crashes on rapid system shutdown. * Moved
	  ast_begin_shutdown(), ast_cancel_shutdown(), and
	  ast_shutting_down(). You should not have to include channel.h
	  just to access these system functions. ASTERISK-24752 #close
	  Reported by: Matthew Jordan Review:
	  https://reviewboard.asterisk.org/r/4399/

2015-02-11 17:12 +0000 [r431674]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: channels/chan_sip: Fix RealTime error
	  during SIP unregistration with MariaDB When a SIP device that has
	  its registration stored in RealTime unregisters, the entry for
	  that device is updated with blank values, i.e., "", indicating
	  that it is no longer registered. Unfortunately, one of those
	  values that is 'blanked' is the device's port. If the column type
	  for the port is not a string datatype (the recommended type is
	  integer), an ODBC or database error will be thrown. MariaDB does
	  not coerce empty strings to a valid integer value. This patch
	  updates the query run from chan_sip such that it replaces the
	  port value with a value of '0', as opposed to a blank value. This
	  is the value that other database backends coerce the empty string
	  ("") to already, and the handling of reading a RealTime
	  registration value from a backend already anticipates receiving a
	  port of '0' from the backends. ASTERISK-24772 #close Reported by:
	  Richard Miller patches: chan_sip.diff uploaded by Richard Miller
	  (License 5685) ........ Merged revisions 431673 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-11 16:51 +0000 [r431670]  Kevin Harwell <kharwell@digium.com>

	* res/res_http_websocket.c, res/ari/ari_websockets.c, /:
	  res_http_websocket: websocket write timeout fails to fully
	  disconnect When writing to a websocket if a timeout occurred the
	  underlying socket did not get closed/disconnected. This patch
	  makes sure the websocket gets disconnected on a write timeout.
	  Also a notice is logged stating that the websocket was
	  disconnected. ASTERISK-24701 #close Reported by: Matt Jordan
	  Review: https://reviewboard.asterisk.org/r/4412/ ........ Merged
	  revisions 431669 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-11 15:51 +0000 [r431663]  Corey Farrell <git@cfware.com>

	* include/asterisk/module.h, main/loader.c, /,
	  bridges/bridge_builtin_features.c: Enable REF_DEBUG for
	  ast_module_ref / ast_module_unref. Add ast_module_shutdown_ref
	  for use by modules that can only be unloaded during graceful
	  shutdown. When REF_DEBUG is enabled: * Add an empty ao2 object to
	  struct ast_module. * Allocate ao2 object when the module is
	  loaded. * Perform an ao2_ref in each place where mod->usecount is
	  manipulated. * ao2_cleanup on module unload. ASTERISK-24479
	  #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4141/ ........ Merged
	  revisions 431662 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-02-10 23:16 +0000 [r431643]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_config_wizard.c,
	  configs/samples/pjsip_wizard.conf.sample:
	  res_pjsip_config_wizard: Add ability to auto-create hints.
	  Looking at the Super Awesome Company sample reminded me that
	  creating hints is just plain gruntwork. So you can now have the
	  pjsip conifg wizard auto-create them for you. Specifying
	  'hint_exten' in the wizard will create 'exten =>
	  <hint_exten>,hint/PJSIP/<wizard_id>' in whatever is specified for
	  'hint_context'. Specifying 'hint_application' in the wizard will
	  create 'exten => <hint_exten>,1,<hint_application>' in whatever
	  is specified for 'hint_context'. The default for 'hint_context'
	  is the endpoint's context. There's no default for
	  'hint_application'. If not specified, no app is added. There's no
	  default for 'hint_exten'. If not specified, neither the hint
	  itself nor the application will be created. Some may think this
	  is the slippery slope to users.conf but hints are a basic
	  necessity for phones unlike voicemail, manager, etc that
	  users.conf creates. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4383/

2015-02-09 03:10 +0000 [r431600-431622]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/channels.json, res/ari/resource_channels.c:
	  res/ari/resource_channels: Add missing 'no_answer' reason to
	  DELETE /channels One of the canonical reasons for hanging up a
	  channel is because the far end failed to answer - or because
	  someone else answered, and we want to get rid of this channel.
	  This patch adds the missing value to the 'reason' query parameter
	  for the DELETE /channels operation. Review:
	  https://reviewboard.asterisk.org/r/4400 ASTERISK-24745 #close
	  Reported by: Ben Merrills patches:
	  add_no_answer_ari_hangup_cause.diff uploaded by Ben Merrills
	  (License 6678)

	* /, res/res_odbc.c: res/res_odbc: Remove unneeded queries when
	  determining if a table exists This patch modifies the
	  ast_odbc_find_table function such that it only performs a lookup
	  of the requested table if the table is not already known. Prior
	  to this patch, a queries would be executed against the database
	  even if the table was already known and cached. Review:
	  https://reviewboard.asterisk.org/r/4405/ ASTERISK-24742 #close
	  Reported by: ibercom patches: patch.diff uploaded by ibercom
	  (License 6599) ........ Merged revisions 431617 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* res/res_pjsip_sdp_rtp.c: res/res_pjsip_sdp_rtp: Fix leak of local
	  ICE candidates when applying to SDP When an SDP is created for an
	  outgoing request/response, the ICE candidates obtained from the
	  RTP instance are currently leaked. This causes the ao2 container
	  that holds the candidates to never properly be reclaimed when the
	  RTP instance is destroyed. This patch properly decrements the ICE
	  candidates' container if it is successfully obtained.
	  ASTERISK-24769 #close Reported by: Matt Jordan

2015-02-06 21:26 +0000 [r431583]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/utils.c, res/res_pjsip.c, main/config.c: various: cleanup
	  issues found during leak hunt In this collection of small patches
	  to prevent Valgrind errors are: fixes for reference leaks in
	  config hooks, evaluating a parameter beyond bounds, and accessing
	  a structure after a lock where it could have been already free'd.
	  Review: https://reviewboard.asterisk.org/r/4407/

2015-02-04 01:27 +0000 [r431538-431555]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_keepalive.c: res_pjsip_keepalive: Don't crash if
	  PJSIP module is not loaded.

	* main/sorcery.c: sorcery: Don't try to load object types which
	  haven't been defined. The act of defining wizards for an object
	  type in sorcery.conf will create a minimal object type. This can
	  cause a problem when a module has multiple sorcery instances
	  (which all get the wizards from sorcery.conf applied) but the
	  sorcery instances do not all contain full information about the
	  object types. Upon loading errors will occur stating that the
	  objects can not be created. This is confusing and is actually
	  perfectly fine. This change makes it so that only object types
	  which have been fully defined will be loaded. ASTERISK-24748
	  #close Reported by: Joshua Colp

2015-01-31 16:27 +0000 [r431521]  Joshua Colp <jcolp@digium.com>

	* res/res_format_attr_h264.c: res_format_attr_h264: Fix crash when
	  determining joint capability. The res_format_attr_h264 module
	  currently incorrectly attempts to copy SPS and PPS information
	  from the wrong attribute. This change fixes that. ASTERISK-24616
	  #close Reported by: Yura Kocyuba Review:
	  https://reviewboard.asterisk.org/r/4392/

2015-02-06  Asterisk Development Team <asteriskteam@digium.com>

	* Asterisk 13.2.0 Released.

2015-01-30  Asterisk Development Team <asteriskteam@digium.com>

	* Asterisk 13.2.0-rc1 Released.

2015-01-30 17:44 +0000 [r431492]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_agent_pool.c: app_agent_pool: Fix initial module load
	  agent device state reporting. When the app_agent_pool module
	  initially loads there is a race condition between the thread
	  loading agents.conf and the device state internal processing
	  thread. If the device state internal processing thread handles
	  the agent creation state updates before the thread that loaded
	  agents.conf registers the device state provider callback then the
	  cached agent state is "Invalid". When a consumer module like
	  app_queue asks for the agent state it gets the cached "Invalid"
	  state instead of the real state from the provider. * Moved
	  loading the agents.conf configuration to the last thing setup by
	  app_agent_pool in load_module(). Now the device state provider
	  callback is registered before the config is loaded so the agent
	  creation state updates are guaranteed to get the initial device
	  state. * Removed some now redundant config cleanup on error in
	  load_config(). * Added lock protection when accessing the device
	  state in agent_pvt_devstate_get() and eliminated the RAII_VAR()
	  usage. ASTERISK-24737 #close Reported by: Steve Pitts Review:
	  https://reviewboard.asterisk.org/r/4390/

2015-01-30 17:38 +0000 [r431490]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_outbound_publish.c: res_pjsip_outbound_publish:
	  eventually crashes when no response is ever received When
	  Asterisk attempts to send SIP outbound publish information and no
	  response is ever received (no 200 okay, 412, 423) the system
	  eventually crashes. A response is never received because the
	  system Asterisk is attempting to send publish information to is
	  not available. The underlying pjsip framework attempts to send
	  publish information. After several attempts it calls back into
	  the Asterisk outbound publish code. At this point if the
	  "client->queue" is empty Asterisk attempts to schedule a refresh
	  which utilizes "rdata" and since no response was received the
	  given "rdata" struture is NULL. Attempting to dereference a NULL
	  object of course results in a crash. The fix here removes the
	  dependency on rdata for schedule_publish_refresh. Instead
	  param->expiration is now passed to it as this is set to -1 if no
	  response is received. Also added a notification when no response
	  is received. ASTERISK-24635 #close Reported by: Marco Paland
	  Review: https://reviewboard.asterisk.org/r/4384/

2015-01-30 16:52 +0000 [r431471]  asanders <asanders@localhost>:

	* include/asterisk/http.h, configs/samples/http.conf.sample,
	  main/http.c: HTTP: For httpd server, need option to define server
	  name for security purposes Added a new config property
	  [servername] to the http.conf file; updated the http server to
	  use the new property when sending responses, for showing http
	  status through the CLI and when reporting status through the
	  'httpstatus' webpage. ASTERISK-24316 #close Reported By: Andrew
	  Nagy Review: https://reviewboard.asterisk.org/r/4374/

2015-01-30 16:47 +0000 [r431468]  Mark Michelson <mmichelson@digium.com>

	* main/stasis_channels.c, channels/chan_pjsip.c, main/xmldoc.c,
	  res/res_pjsip_refer.c, main/pbx.c, main/manager.c,
	  pbx/pbx_spool.c, main/bridge_after.c: Fix some memory leaks.
	  These memory leaks were found and fixed by John Hardin. I'm just
	  committing them for him. ASTERISK-24736 #close Reported by Mark
	  Michelson Review: https://reviewboard.asterisk.org/r/4389

2015-01-29 23:02 +0000 [r431450]  Scott Griepentrog <sgriepentrog@digium.com>

	* include/asterisk/bridge.h, main/bridge.c,
	  res/stasis/stasis_bridge.c: stasis transfer: fix stasis bridge
	  push race part two When swapping a Local channel in place of one
	  already in a bridge (to complete a bridge attended transfer), the
	  channel that was swapped out can actually be hung up before the
	  stasis bridge push callback executes on the independant transfer
	  thread. This results in the stasis app loop dropping out and
	  removing the control that has the the app name which the local
	  replacement channel needs so it can re-enter stasis. To avoid
	  this race condition a new push_peek callback has been added, and
	  called from the ast_bridge_impart thread before it launches the
	  independant thread that will complete the transfer. Now the
	  stasis push_peek callback can copy the stasis app name before the
	  swap channel can hang up. ASTERISK-24649 Review:
	  https://reviewboard.asterisk.org/r/4382/

2015-01-29 20:58 +0000 [r431420-431426]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip.c, res/res_pjsip_sips_contact.c (added): Use SIPS
	  URIs in Contact headers when appropriate. RFC 3261 sections
	  8.1.1.8 and 12.1.1 dictate specific scenarios when we are
	  required to use SIPS URIs in Contact headers. Asterisk's
	  non-compliance with this could actually cause calls to get
	  dropped when communicating with clients that are strict about
	  checking the Contact header. Both of the SIP stacks in Asterisk
	  suffered from this issue. This changeset corrects the behavior in
	  res_pjsip/chan_pjsip.c Review:
	  https://reviewboard.asterisk.org/r/4345

	* /, channels/chan_sip.c: Use SIPS URIs in Contact headers when
	  appropriate. RFC 3261 sections 8.1.1.8 and 12.1.1 dictate
	  specific scenarios when we are required to use SIPS URIs in
	  Contact headers. Asterisk's non-compliance with this could
	  actually cause calls to get dropped when communicating with
	  clients that are strict about checking the Contact header. Both
	  of the SIP stacks in Asterisk suffered from this issue. This
	  changeset corrects the behavior in chan_sip. ASTERISK-24646
	  #close Reported by Stephan Eisvogel Review:
	  https://reviewboard.asterisk.org/r/4346 ........ Merged revisions
	  431423 from http://svn.asterisk.org/svn/asterisk/branches/11

	* res/res_pjsip/pjsip_configuration.c: Allow disabling of 100rel
	  support on PJSIP endpoints. Due to an inversion error, setting
	  100rel=no would not actually change the current value of the
	  setting (which defaulted to "yes"). With this fix, the inversion
	  is corrected.

2015-01-29 16:46 +0000 [r431403]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_exten_state.c: res_pjsip_exten_state: Reduce log
	  clutter... change a WARNING to a VERBOSE/2 Reduce log clutter by
	  changing the "Watcher for hint %s (removed|deactivated)" message
	  from WARNING to VERBOSE/2. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4387/

2015-01-29 12:09 +0000 [r431385]  Joshua Colp <jcolp@digium.com>

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Fix DTLS when used
	  with OpenSSL 1.0.1k A recent security fix for OpenSSL broke DTLS
	  negotiation for many applications. This was caused by read ahead
	  not being enabled when it should be. While a commit has gone into
	  OpenSSL to force read ahead on for DTLS it may take some time for
	  a release to be made and the change to be present in
	  distributions (if at all). As enabling read ahead is a simple one
	  line change this commit does that and fixes the issue.
	  ASTERISK-24711 #close Reported by: Jared Biel ........ Merged
	  revisions 431384 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-28 17:37 +0000 [r431301-431303]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_sdp_rtp.c, res/res_pjsip_t38.c,
	  res/res_pjsip_session.c: Fix file descriptor leak in RTP code.
	  SIP requests that offered codecs incompatible with configured
	  values could result in the allocation of RTP and RTCP ports that
	  would not get reclaimed later. ASTERISK-24666 #close Reported by
	  Y Ateya Review: https://reviewboard.asterisk.org/r/4323
	  AST-2015-001 ........ Merged revisions 431300 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* funcs/func_curl.c, /: Multiple revisions 431297-431298 ........
	  r431297 | mmichelson | 2015-01-28 11:05:26 -0600 (Wed, 28 Jan
	  2015) | 17 lines Mitigate possible HTTP injection attacks using
	  CURL() function in Asterisk. CVE-2014-8150 disclosed a
	  vulnerability in libcURL where HTTP request injection can be
	  performed given properly-crafted URLs. Since Asterisk makes use
	  of libcURL, and it is possible that users of Asterisk may get
	  cURL URLs from user input or remote sources, we have made a patch
	  to Asterisk to prevent such HTTP injection attacks from
	  originating from Asterisk. ASTERISK-24676 #close Reported by Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/4364
	  AST-2015-002 ........ r431298 | mmichelson | 2015-01-28 11:12:49
	  -0600 (Wed, 28 Jan 2015) | 3 lines Fix compilation error from
	  previous patch. ........ Merged revisions 431297-431298 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 431299 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2015-01-28 12:18 +0000 [r431267]  Sean Bright <sean@malleable.com>

	* res/res_format_attr_silk.c, res/res_format_attr_opus.c: media
	  formats: update res_format_attr_opus & silk In r419044, we
	  changed how formats were handled, but the return value of the
	  format_parse_sdp_fmtp functions in res_format_attr_opus and
	  res_format_attr_silk were not updated, causing calls to fail. Ran
	  into this when getting codec_opus working with Asterisk 13. Once
	  the return value was corrected, we were crashing in opus_getjoint
	  because of NULL format attributes. I've fixed this as well in
	  this patch. Review: https://reviewboard.asterisk.org/r/4371/

2015-01-28 04:09 +0000 [r431243]  Richard Mudgett <rmudgett@digium.com>

	* main/sorcery.c, res/res_pjsip_outbound_registration.c,
	  res/res_pjsip.c: res_pjsip_outbound_registration: Fix reload race
	  condition. Performing a CLI "module reload" command when there
	  are new pjsip.conf registration objects defined frequently failed
	  to load them correctly. What happens is a race condition between
	  res_pjsip pushing its reload into an asynchronous task processor
	  task and the thread that does the rest of the reloads when it
	  gets to reloading the res_pjsip_outbound_registration module. A
	  similar race condition happens between a reload and the CLI/AMI
	  show registrations commands. The reload updates the
	  current_states container and the CLI/AMI commands call
	  get_registrations() which builds a new current_states container.
	  * Made res_pjsip.c reload_module() use
	  ast_sip_push_task_synchronous() instead of ast_sip_push_task() to
	  eliminate two threads processing config reloads at the same time.
	  * Made get_registrations() not replace the global current_states
	  container so the CLI/AMI show registrations command cannot
	  interfere with reloading. You could never add/remove objects in
	  the container without the possibility of the container being
	  replaced out from under you by get_registrations(). * Added a
	  registration loaded sorcery instance observer to purge any dead
	  registration objects since get_registrations() cannot do this job
	  anymore. The struct ast_sorcery_instance_observer callbacks must
	  be used because the callback happens inline with the load
	  process. The struct ast_sorcery_observer callbacks are pushed to
	  a different thread. * Added some global current_states NULL
	  pointer checks in case the container disappears because of
	  unload_module(). * Made sorcery's struct
	  ast_sorcery_instance_observer.object_type_loaded callbacks
	  guaranteed to be called before any struct
	  ast_sorcery_observer.loaded callbacks will be called. * Moved the
	  check for non-reloadable objects to before the sorcery instance
	  loading callbacks happen to short circuit unnecessary work.
	  Previously with non-reloadable objects, the sorcery instance
	  loading/loaded callbacks would always happen, the individual
	  wizard loading/loaded would be prevented, and the non-reloadable
	  type logging message would be logged for each associated wizard.
	  ASTERISK-24729 #close Review:
	  https://reviewboard.asterisk.org/r/4381/

2015-01-27 22:56 +0000 [r431179-431219]  Kevin Harwell <kharwell@digium.com>

	* /, main/tcptls.c: tcptls: Bad file descriptor error when
	  reloading chan_sip While running through some scenarios using
	  chan_sip and tcp a problem would occur that resulted in a flood
	  of bad file descriptor messages on the cli: tcptls.c:712
	  ast_tcptls_server_root: Accept failed: Bad file descriptor The
	  message is received because the underlying socket has been
	  closed, so is valid. This is probably happening because unloading
	  of chan_sip is not atomic. That however is outside the scope of
	  this patch. This patch simply stops the logging of multiple
	  occurrences of that message. ASTERISK-24728 #close Reported by:
	  Thomas Thompson Review: https://reviewboard.asterisk.org/r/4380/
	  ........ Merged revisions 431218 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* /, channels/chan_sip.c: chan_sip: stale nonce causes failure When
	  refreshing (with a small expiration) a registration that was sent
	  to chan_sip the nonce would be considered stale and reject the
	  registration. What was happening was that the initial
	  registration's "dialog" still existed in the dialogs container
	  and upon refresh the dialog match algorithm would choose that as
	  the "dialog" instead of the newly created one. This occurred
	  because the algorithm did not check to see if the from tag
	  matched if authentication info was available after the 401. So,
	  it ended up assuming the original "dialog" was a match and
	  stopped the search. The old "dialog" of course had an old nonce,
	  thus the stale nonce message. This fix attempts to leave the
	  original functionality alone except in the case of a REGISTER. If
	  a REGISTER is received if searches for an existing "dialog"
	  matching only on the callid. If the expires value is low enough
	  it will reuse dialog that is there, otherwise it will create a
	  new one. ASTERISK-24715 #close Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/4367/ ........ Merged
	  revisions 431187 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* res/res_pjsip/pjsip_outbound_auth.c, res/res_pjsip/config_auth.c,
	  main/stasis_message_router.c, res/res_pjsip/location.c,
	  res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/pjsip_distributor.c,
	  res/res_pjsip/include/res_pjsip_private.h,
	  res/res_pjsip/pjsip_global_headers.c,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip.c,
	  res/res_pjsip/config_transport.c: res_pjsip: make it unloadable
	  (take 2) Due to the original patch causing memory corruptions it
	  was removed until the problem could be resolved. This patch is
	  the original patch plus some added locking around stasis router
	  subcription that was needed to avoid the memory corruption.
	  Description of the original problem and patch (still applicable):
	  The res_pjsip module was previously unloadable. With this patch
	  it can now be unloaded. This patch is based off the original
	  patch on the issue (listed below) by Corey Farrell with a few
	  modifications. Namely, removed a few changes not required to make
	  the module unloadable and also fixed a bug that would cause
	  asterisk to crash on unloading. This patch is the first step
	  (should hopefully be followed by another/others at some point) in
	  allowing res_pjsip and the modules that depend on it to be
	  unloadable. At this time, res_pjsip and some of the modules that
	  depend on res_pjsip cannot be unloaded without causing problems
	  of some sort. The goal of this patch is to get res_pjsip and only
	  res_pjsip to be able to unload successfully and/or shutdown
	  without incident (crashes, leaks, etc...). Other dependent
	  modules may still cause problems on unload. Basically made sure,
	  with the patch applied, that res_pjsip (with no other dependent
	  modules loaded) could be succesfully unloaded and Asterisk could
	  shutdown without any leaks or crashes that pertained directly to
	  res_pjsip. ASTERISK-24485 #close Reported by: Corey Farrell
	  Review: https://reviewboard.asterisk.org/r/4363/ patches:
	  pjsip_unload-broken-r1.patch submitted by Corey Farrell (license
	  5909)

2015-01-27 17:36 +0000 [r431160]  Richard Mudgett <rmudgett@digium.com>

	* /, apps/confbridge/include/confbridge.h, apps/app_confbridge.c:
	  app_confbridge: Repeatedly starting and stopping recording ref
	  leaks the recording channel. Starting and stopping conference
	  recording more than once causes the recording channels to be
	  leaked. For v13 the channels also show up in the CLI "core show
	  channels" output. * Reworked and simplified the recording channel
	  code to use ast_bridge_impart() instead of managing the recording
	  thread in the ConfBridge code. The recording channel's ref
	  handling easily falls into place and other off nominal code paths
	  get handled better as a result. ASTERISK-24719 #close Reported
	  by: John Bigelow Review: https://reviewboard.asterisk.org/r/4368/
	  Review: https://reviewboard.asterisk.org/r/4369/ ........ Merged
	  revisions 431135 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-27 17:32 +0000 [r431157]  Joshua Colp <jcolp@digium.com>

	* main/bridge_channel.c, res/res_pjsip_sdp_rtp.c: bridge /
	  res_pjsip_sdp_rtp: Fix issues with media not being reinvited
	  during direct media. This change fixes two issues: 1. During a
	  swap operation bridging added the new channel before having the
	  swap channel leave. This was not handled in bridge_native_rtp and
	  could result in a channel not getting reinvited back to Asterisk.
	  After this change the swap channel will leave first and the new
	  channel will then join. 2. If a re-invite was received after a
	  session had been established any upstream elements (such as
	  bridge_native_rtp) were not notified that they may want to
	  re-evaluate things. After this change an UPDATE_RTP_PEER control
	  frame is queued when this situation occurs and upstream can
	  react. AST-1524 #close Review:
	  https://reviewboard.asterisk.org/r/4378/

2015-01-27 17:22 +0000 [r431153]  Jonathan Rose <jrose@digium.com>

	* main/manager.c: Manager: Fix Manager Action ModuleLoad to give
	  correct response when reloading Prior to this patch, ModuleLoad
	  would respond with an error indicating that the requested module
	  wasn't found in spite of finding and reloading the module.
	  Review: https://reviewboard.asterisk.org/r/4373/ ASTERISK-24721
	  #close

2015-01-27 17:20 +0000 [r431134-431145]  Matthew Jordan <mjordan@digium.com>

	* res/ari/resource_bridges.c,
	  rest-api-templates/asterisk_processor.py,
	  res/ari/resource_channels.h, res/res_ari_bridges.c,
	  res/ari/resource_bridges.h, rest-api-templates/api.wiki.mustache,
	  rest-api/api-docs/channels.json,
	  rest-api-templates/swagger_model.py,
	  rest-api/api-docs/bridges.json: ARI: Improve wiki documentation
	  This patch improves the documentation of ARI on the wiki.
	  Specifically, it addresses the following: * Allowed values and
	  allowed ranges weren't documented. This was particularly
	  frustrating, as Asterisk would reject query parameters with
	  disallowed values - but we didn't tell anyone what the allowed
	  values were. * The /play/id operation on /channels and /bridges
	  failed to document all of the added media resource types. *
	  Documentation for creating a channel into a Stasis application
	  failed to note when it occurred, and that creating a channel into
	  Stasis conflicts with creating a channel into the dialplan. *
	  Some other minor tweaks in the mustache templates, including
	  italicizing the parameter type, putting the default value on its
	  own sub-bullet, and some other nicities. Review:
	  https://reviewboard.asterisk.org/r/4351

	* apps/confbridge/conf_config_parser.c,
	  apps/confbridge/include/confbridge.h: app_confbridge: Restore
	  user's menu name to CLI output of 'confbridge list' When issuing
	  a 'confbridge list XXXX' CLI command, the resulting output no
	  longer displays the menu associated with a ConfBridge
	  participant. The issue was caused by ASTERISK-22760. When that
	  patch was done, it removed the copying of the menu name
	  associated with the user from the actual user profile. This patch
	  fixes the issue by copying the menu name over to the user profile
	  when the menu hooks are applied to the user. Since that function
	  now does a little bit more than just apply the hooks, the name of
	  the function has been changed to cover the copying of the menu
	  name over as well. In addition, there is a disparity between the
	  menu name length as it is stored on the conf_menu structure and
	  the confbridge_user structure; this patch makes the lengths match
	  so that a strcpy can be used. Review:
	  https://reviewboard.asterisk.org/r/4372/ ASTERISK-24723 #close
	  Reported by: Steve Pitts

2015-01-27 11:47 +0000 [r431114]  Joshua Colp <jcolp@digium.com>

	* res/parking/parking_manager.c: res_parking: Fix crash due to race
	  condition when unloading. There is currently a race condition
	  when unloading the res_parking module. Depending on the will of
	  the universe the subscription invocation may occur AFTER the
	  module is unloaded. This is because the module does NOT use
	  stasis_unsubscribe_and_join when terminating the subscription. It
	  merely uses stasis_unsubscribe. This change makes it use
	  stasis_unsubscribe_and_join which is documented for usage in this
	  exact scenario. AST-1520 #close Review:
	  https://reviewboard.asterisk.org/r/4375/

2015-01-26 14:49 +0000 [r431092]  David M. Lee <dlee@digium.com>

	* channels/sip/include/route.h, funcs/func_presencestate.c,
	  main/rtp_engine.c, configure, include/asterisk/autoconfig.h.in,
	  include/asterisk/sem.h, configure.ac, main/app.c,
	  main/bridge_channel.c, main/sem.c, res/res_timing_kqueue.c,
	  main/asterisk.c: Various fixes for OS X This patch addresses
	  compilation errors on OS X. It's been a while, so there's quite a
	  few things. * Fixed __attribute__ decls in route.h to be
	  portable. * Fixed htonll and ntohll to work when they are defined
	  as macros. * Replaced sem_t usage with our ast_sem wrapper. *
	  Added ast_sem_timedwait to our ast_sem wrapper. * Fixed some GCC
	  4.9 warnings using sig*set() functions. * Fixed some format
	  strings for portability. * Fixed compilation issues with
	  res_timing_kqueue (although tests still fail on OS X). * Fixed
	  menuconfig /sbin/launchd detection, which disables
	  res_timing_kqueue on OS X). ASTERISK-24539 #close Reported by:
	  George Joseph ASTERISK-24544 #close Reported by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4327/

2015-01-25 13:42 +0000 [r431072]  Matthew Jordan <mjordan@digium.com>

	* main/config.c: dynamic realtime: Updates fail to work due to
	  update fields being passed over When a crash was fixed due to
	  usage of the REALTIME function in r423003, a regression was
	  introduced into ast_update2_realtime where the update fields
	  passed to the function would be skipped and the lookup field
	  processed twice. The use of this function is a bit interesting: A
	  variable argument list is used with two sentinel values - the
	  first marks the end of the lookup fields/values; the second marks
	  the end of the update fields/values. Unfortunately,
	  ast_update2_realtime parses over the lookup fields twice, as
	  opposed to parsing over the update fields. This causes the
	  lookups to succeed, but the updates itself to have no effect.
	  Note that the most common instance of this problem occurred in
	  app_voicemail during the updating of a mailbox password. Thanks
	  to the issue reporter, Paddy Grice, for pointing out the problem.
	  Review: https://reviewboard.asterisk.org/r/4356/ ASTERISK-24231
	  ASTERISK-24626 #close Reported by: Paddy Grice

2015-01-23 20:13 +0000 [r431050-431052]  Richard Mudgett <rmudgett@digium.com>

	* apps/confbridge/conf_chan_record.c: app_confbridge: Make CBRec
	  channel names more unique. Channel names should be different from
	  other channels in the system while the channel exists. * Use a
	  sequence number for CBRec channels instead of a random number
	  because the same random number could be picked again for the next
	  CBRec channel.

	* /, apps/app_confbridge.c: app_confbridge: Whitespace Because
	  there is sometimes no sence to any whitespace. ........ Merged
	  revisions 431049 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-23 17:08 +0000 [r431030]  David M. Lee <dlee@digium.com>

	* res/res_pjsip_config_wizard.c: Add depend on pjproject to
	  res_pjsip_config_wizard.c

2015-01-23 15:12 +0000 [r430999]  Kevin Harwell <kharwell@digium.com>

	* res/parking/parking_applications.c, channels/chan_iax2.c,
	  res/res_pjsip/pjsip_global_headers.c, res/res_pjsip_pubsub.c,
	  res/res_ari_channels.c, res/res_stasis.c,
	  rest-api-templates/param_parsing.mustache,
	  res/res_ari_endpoints.c, res/res_ari_events.c,
	  include/asterisk/stasis_app.h, res/res_pjsip_mwi.c: Investigate
	  and fix memory leaks in Asterisk Fixed memory leaks that were
	  found in Asterisk. ASTERISK-24693 #close Reported by: Kevin
	  Harwell Review: https://reviewboard.asterisk.org/r/4347/

2015-01-23 15:03 +0000 [r430994-430998]  Walter Doekes <walter+asterisk@wjd.nu>

	* apps/app_voicemail.c, channels/chan_unistim.c,
	  funcs/func_hangupcause.c, main/manager_bridges.c,
	  channels/chan_misdn.c, funcs/func_groupcount.c, /,
	  addons/ooh323c/src/ooh245.c, channels/chan_sip.c, res/res_fax.c,
	  res/res_pjsip_outbound_registration.c, apps/app_minivm.c,
	  apps/app_alarmreceiver.c, include/asterisk/channel.h,
	  contrib/utils/eagi_proxy.c: Fix typo's (retrieve, specified,
	  address). ........ Merged revisions 430996 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* /, channels/chan_sip.c: chan_sip: Case insensitive comparison of
	  "defaultuser" parameter. All the other configuration options are
	  case insensitive, so this one should be too. ASTERISK-24355
	  #close Reported by: HZMI8gkCvPpom0tM patches: ast.patch uploaded
	  by HZMI8gkCvPpom0tM (License 6658) ........ Merged revisions
	  430993 from http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-22 19:24 +0000 [r430957-430975]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/bridge.h,
	  include/asterisk/bridge_channel_internal.h, main/bridge.c,
	  include/asterisk/bridge_internal.h, main/bridge_channel.c: Bridge
	  core: Pass a ref with the swap channel when joining a bridge.
	  When code imparts a channel into a bridge to swap with another
	  channel, a ref needs to be held on the swap channel to ensure
	  that it cannot dissapear before finding it in the bridge. * The
	  ast_bridge_join() swap channel parameter now always steals a ref
	  for the swap channel. This is the only change to the bridge
	  framework's public API semantics. *
	  bridge_channel_internal_join() now requires the
	  bridge_channel->swap channel to pass in a ref. ASTERISK-24649
	  Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/4354/

	* res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration.c: Minor code cleanup. * Add an
	  allocation failure check and assert in
	  sip_outbound_registration_response_cb(). * Made
	  sip_outbound_registration_state_destroy() handle partially
	  created state objects from
	  sip_outbound_registration_state_alloc(). Review:
	  https://reviewboard.asterisk.org/r/4366/

2015-01-22 18:09 +0000 [r430939]  Scott Griepentrog <sgriepentrog@digium.com>

	* res/stasis/app.c, res/stasis/stasis_bridge.c: stasis transfer:
	  fix a race condition on stasis bridge push After a bridge
	  transfer completes where a local replacement channel is used, a
	  stasis transfer message with the details of the transfer is sent.
	  This is processed by stasis which then sets the stasis app name
	  and replaced channel snapshot on the replacement channel.
	  However, since a separate thread was already started to run
	  stasis on the new replacement channel, a race was on to see if
	  the message processing would be completed before the app name was
	  needed, otherwise the channel would be hung up. This change moves
	  the calls used to set the stasis app name and the replace
	  snapshot to the bridge_stasis_push function callback from the
	  bridge transfer logic, allowing the steps to be completed earlier
	  and more deterministically, and the race elimianted. NOTE: the
	  swap channel parameter to bridge_stasis_push (and thus all bridge
	  push callbacks) must always be present when performing a swap
	  with another channel. ASTERISK-24649 #close Reported by: John
	  Bigelow Review: https://reviewboard.asterisk.org/r/4341/

2015-01-22 14:23 +0000 [r430921]  Matthew Jordan <mjordan@digium.com>

	* /, apps/app_voicemail.c: apps/app_voicemail: Trigger MWI
	  notification with MixMonitor m() option The MixMonitor m() option
	  allows a recording to be pushed to a specific voicemail mailbox.
	  If the message is delivered to the mailbox's INBOX, however, no
	  MWI notification is currently raised. This patch corrects the
	  issue by properly calling notify_new_state from the
	  msg_create_from_file function. This will cause MWI to be
	  triggered if the message was placed in the mailbox's INBOX.
	  ASTERISK-24709 #close Reported by: Gareth Palmer patches:
	  app_voicemail-430919.patch uploaded by Gareth Palmer (License
	  5169) ........ Merged revisions 430920 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-21 21:53 +0000 [r430902]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration.c: Move unref to a better place.
	  Move an unconditional unref of client_state so it doesn't look
	  like it could be used after the last ref has destroyed it.

2015-01-21 13:33 +0000 [r430840-430864]  Matthew Jordan <mjordan@digium.com>

	* channels/chan_sip.c: channels/chan_sip: Fix registration leak
	  during reload When the SIP registrations were migrated to using
	  ao2 in what was then trunk, the explicit destruction of the
	  registrations on module reload was removed and not replaced with
	  an ao2 equivalent. Debugging done by Stefan Engström, the issue
	  reporter, on ASTERISK-24673 confirmed that the reference in the
	  registry_list container was being leaked. Since the purpose of
	  cleanup_all_regs is to prep a registration for destruction, this
	  function now calls an ao2_callback function callback with the
	  OBJ_MULTIPLE | OBJ_NODATA | OBJ_UNLINK flags used to remove the
	  registrations. This cleans up each registration, and also removes
	  it from the registration container registry_list. Review:
	  https://reviewboard.asterisk.org/r/4355/ ASTERISK-24640 #close
	  Reported by: Max Man ASTERISK-24673 #close Reported by: Stefan
	  Engström Tested by: Stefan Engström

	* cdr/cdr_manager.c, cel/cel_manager.c: AMI: Add documentation for
	  the missing Cdr/CEL events. This patch adds AMI event
	  documentation for the Cdr and CEL AMI events. Note that while
	  these events do share fields with each other and with other
	  channel related events, they do not contain all of the fields in
	  a standard channel snapshot, nor is the description of the fields
	  identical. As such, the patch opts for documentation for each
	  field, for each event. Review:
	  https://reviewboard.asterisk.org/r/4350/ ASTERISK-24671 #close
	  Reported by: Dan Jenkins

	* apps/app_dial.c: apps/app_dial: Don't publish DialEnd twice on
	  unexpected GoSub/Macro values The Dial application has some
	  interesting options with the mid-call Macro (M) and GoSub (U)
	  options. If the MACRO_RESULT/GOSUB_RESULT returns specific
	  values, the Dial application will take some action upon the
	  channels involved in the dial operation (such as hanging up a
	  particular party, etc.) The Dial application ensures that a
	  Stasis message is published in the event that
	  MACRO_RESULT/GOSUB_RESULT returns a value that kills the dial
	  operation, so that there is a corresponding DialEnd event
	  published in AMI/ARI for the DialBegin event that preceeded it. A
	  bug exists where that same DialEnd event will be published on
	  Stasis even if the value returned in MACRO_RESULT/GOSUB_RESULT is
	  not one that the Dial application cares about. This causes two
	  DialEnd events to be published - one with the
	  MACRO_RESULT/GOSUB_RESULT and another with "ANSWERED" - which is
	  all sorts of wrong. This patch fixes the bug by ensuring that we
	  only publish a DialEnd message to Stasis if the Dial
	  application's mid-call Macro/GoSub returns something that Dial
	  cares about. Review: https://reviewboard.asterisk.org/r/4336
	  ASTERISK-24682 #close Reported by: Matt Jordan

	* main/rtp_engine.c: main/rtp_engine: Format NTP timestamps as
	  unsigned longs When the RTCP reports are created, the NTP
	  timestamps are stored as strings, as JSON does not have an
	  integer type long enough to store the value. However, on 32-bit
	  systems, a signed long may overflow for some portion of the
	  timestamp. This patch corrects the overflow by formatting the
	  timestamps as unsigned longs.

2015-01-20 16:51 +0000 [r430818]  asanders <asanders@localhost>:

	* res/ari/resource_bridges.c: ARI: Fixed crash that occurred when
	  updating a bridge when the optional query parameter 'name' was
	  not supplied. Prior to this changeset, posting to the:
	  /ari/bridges/{bridgeId} endpoint without specifying a value for
	  the [name] query parameter, would crash Asterisk if the bridge
	  you are attempting to create (or update) had the same ID as an
	  existing bridge. The internal mechanism of the POST operation
	  interpreted a null value for name, thus resulting in an error
	  condition that crashed Asterisk. ASTERISK-24560 #close Reported
	  By: Kinsey Moore Review: https://reviewboard.asterisk.org/r/4349/

2015-01-20 16:46 +0000 [r430817]  Richard Mudgett <rmudgett@digium.com>

	* configs/samples/iax.conf.sample, res/res_fax.c,
	  funcs/func_channel.c, UPGRADE.txt, res/snmp/agent.c,
	  channels/chan_iax2.c: CHANNEL(peer), chan_iax2, res_fax, SNMP
	  agent: Fix deadlock from reaching across a bridge. Calling
	  ast_channel_bridge_peer() cannot be done while holding any
	  channel locks. The reported issue hit the deadlock in chan_iax2,
	  but an audit of the ast_channel_bridge_peer() calls found three
	  more locations where the same deadlock can occur. * Made
	  CHANNEL(peer), res_fax, and the SNMP agent not call
	  ast_channel_bridge_peer() with any channel locked. For
	  CHANNEL(peer) I had to rework the logic to not hold the channel
	  lock. * Made chan_iax2 no longer call ast_channel_bridge_peer().
	  It was done for legacy reasons that no longer apply. * Removed
	  the iax.conf forcejitterbuffer option. It is now always enabled
	  when the jitterbuffer option is enabled. If you put a jitter
	  buffer on a channel it will be on the channel. ASTERISK-24600
	  #close Reported by: Jeff Collell Review:
	  https://reviewboard.asterisk.org/r/4342/

2015-01-20 02:39 +0000 [r430796-430799]  Matthew Jordan <mjordan@digium.com>

	* contrib/scripts/install_prereq, /:
	  contrib/scripts/install_prereq: Don't install 32-bit packages on
	  64-bit hosts On Debian based systems, the install_prereq tool
	  uses a search command on Debian that results in selecting both
	  64-bit and 32-bit packages. Besides the waste of disk space, this
	  can actually cause aptitude use 100% of memory on a VM with 1GB
	  of RAM as it tried to work out all of the 32-bit package
	  dependencies. This patch filters out the 32-bit packages on a
	  64-bit machine, and leaves 32-bit machines alone. ASTERISK-24048
	  #close Reported by: Ben Klang Tested by: Ben Klang, Matt Jordan
	  patches: install_prereq_64-bit_compat.patch uploaded by Ben Klang
	  (License 5876) ........ Merged revisions 430798 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* apps/app_voicemail.c, /: app_voicemail: Temp message left after
	  review/hangup with ODBC/IMAP backend When using ODBC or IMAP
	  storage, temporary files created on the file system must be
	  disposed of using the DISPOSE macro. The DELETE macro will map to
	  a deletion function for the backend storage, but does not clean
	  up any local files created as a result of the operation. When
	  using voicemail with the operator and review options enabled,
	  pressing 0 to enter the menu, followed by 1 to save the message,
	  followed by any other DTMF press to delete the message, will
	  result in the temporary file lingering on the file system. This
	  patch properly calls DISPOSE after the DELETE. This causes the
	  local file to be disposed of. ASTERISK-24288 #close Reported by:
	  LEI FU patches: voicemail_odbc_review_fix.diff uploaded by LEI FU
	  (License 6640) ........ Merged revisions 430795 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-19 18:05 +0000 [r430776]  Mark Michelson <mmichelson@digium.com>

	* main/pbx.c: Call extension state callbacks at hint creation. When
	  a hint gets created, any subsequent device or presence state
	  changes result in extension status events getting sent out to
	  interested parties. However, at the time of hint creation, no
	  such event gets sent out, so watchers of extension state are
	  potentially left in the dark until the first state change after
	  hint creation. Patch contributed by John Hardin (License #6512)

2015-01-19 13:18 +0000 [r430755]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_multihomed.c, res/res_pjsip.c: res_pjsip /
	  res_pjsip_multihomed: Use the correct transport and addressing
	  information on UAS sessions. The first thing this patch fixes is
	  UAS dialogs. Previously if a transport was configured on an
	  endpoint and an inbound session was created there was no
	  guarantee that requests sent on the dialog would use the correct
	  transport and address information. This has now been fixed so an
	  explicitly configured transport is taken into account. The second
	  thing this patch fixes is res_pjsip_multihomed. The
	  res_pjsip_multihomed module attempts to determine what transport
	  a message should go out on and what addressing information should
	  go into the message itself. In a scenario where multiple
	  transports exist bound to the same IP address but a different
	  port the code would incorrectly alter the transport and change
	  the message to the wrong transport. This change makes the
	  res_pjsip_multihomed module smarter so it will only change the
	  transport and address information in the message when it is
	  possible and makes sense. ASTERISK-24615 #close Reported by:
	  David Justl Review: https://reviewboard.asterisk.org/r/4331/

2015-01-17 00:31 +0000 [r430734]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip/config_transport.c,
	  res/res_pjsip/pjsip_outbound_auth.c, res/res_pjsip/config_auth.c,
	  main/stasis_message_router.c, res/res_pjsip/location.c,
	  res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/pjsip_distributor.c,
	  res/res_pjsip/include/res_pjsip_private.h,
	  res/res_pjsip/pjsip_global_headers.c,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip.c: REVERTING
	  res_pjsip: make it unloadable Due to the original patch causing
	  memory corruptions the patch is being removed until the problem
	  can be resolved.

2015-01-16 22:13 +0000 [r430709-430716]  Mark Michelson <mmichelson@digium.com>

	* CHANGES: Change PJProject version requirement for ca_list_path
	  transport option in CHANGES file.

	* channels/chan_pjsip.c, res/res_pjsip_session.c: Fix problem where
	  a hung channel could occur on a failed blind transfer. Different
	  clients react differently to being told that a blind transfer has
	  failed. Some will simply send a BYE and be done with it. Others
	  will attempt to reinvite themselves back onto the call. In the
	  latter case, we were creating a new channel and then leaving it
	  to sit forever doing nothing. With this code change, that new
	  channel will not be created and the dialog with the transferring
	  channel will be cleaned up properly. ASTERISK-24624 #close
	  Reported by Zane Conkle Review:
	  https://reviewboard.asterisk.org/r/4339

	* include/asterisk/res_pjsip.h, configure,
	  include/asterisk/autoconfig.h.in, configure.ac,
	  configs/samples/pjsip.conf.sample, CHANGES, res/res_pjsip.c,
	  res/res_pjsip/config_transport.c: Add support for the
	  ca_list_path option for PJSIP transports. This allows for a path
	  to be specified that has a collection of CA certificates in it.
	  ASTERISK-24575 #close Reported by cloos Patches:
	  pj-ca-path-trunk.diff uploaded by cloos (License #5956) Review:
	  https://reviewboard.asterisk.org/r/4344

2015-01-15 17:35 +0000 [r430685-430687]  Richard Mudgett <rmudgett@digium.com>

	* res/res_fax_spandsp.c, res/res_fax.c: res_fax.c,
	  res_fax_spandsp.c: Remove redundant locking. When FAX was
	  developed, apparently the faxregistry.container used to be a
	  linked list that was converted to an ao2 container. Some of the
	  replacement ao2 container operations still had explicit
	  lock/unlocks around them. Three off nominal code paths in
	  res_fax.c and res_fax_spandsp.c unlock the channel even though
	  the routine did not lock the channel and other code paths in the
	  routine do not unlock the channel. Review:
	  https://reviewboard.asterisk.org/r/4340/

	* res/res_fax_spandsp.c, res/res_fax.c: res_fax.c,
	  res_fax_spandsp.c: Fix some curlies on the end of function
	  definitions.

2015-01-15 12:09 +0000 [r430664]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration: Fix race condition when
	  reloading and listing registrations. Due to the split of outbound
	  registration state from configuration it is possible during a
	  reload for a "pjsip show registrations" CLI command to be
	  executed which gets an older snapshot of the configuration. This
	  configuration may include outbound registrations which have been
	  removed due to a reload operation occurring at the same time. The
	  code for printing the outbound registration did not take this
	  into account but now it does. AST-1506 #close Review:
	  https://reviewboard.asterisk.org/r/4338/

2015-01-15 02:18 +0000 [r430646]  Matthew Jordan <mjordan@digium.com>

	* configure, configure.ac: configure: If cross-compiling, assume we
	  have working semaphores The Asterisk 13 configure.ac checks for
	  HAS_WORKING_SEMAPHORE but does not have an option for
	  cross-compiling so it fails with an exit. Since we're cross-
	  compiling, we can't exactly go looking for the header. The
	  semaphore.h header is relatively common: * It's part of the POSIX
	  standard * It's part of GNU C Library As such, we assume that it
	  will be present when cross-compiling. As such, this patch
	  defaults "HAS_WORKING_SEMAPHORE" to "1" if cross-compiling is
	  detected. If you're cross-compiling to a platform that doesn't
	  support this, then make sure you re-define this to 0.
	  ASTERISK-24663 #close Reported by: abelbeck patches:
	  asterisk-13-anonymous-semaphores.patch uploaded by abelbeck
	  (License 5903)

2015-01-14 23:14 +0000 [r430628]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/pjsip_distributor.c,
	  res/res_pjsip/include/res_pjsip_private.h,
	  res/res_pjsip/pjsip_global_headers.c,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip.c,
	  res/res_pjsip/config_transport.c,
	  res/res_pjsip/pjsip_outbound_auth.c, res/res_pjsip/config_auth.c,
	  main/stasis_message_router.c, res/res_pjsip/location.c:
	  res_pjsip: make it unloadable The res_pjsip module was previously
	  unloadable. With this patch it can now be unloaded. This patch is
	  based off the original patch on the issue (listed below) by Corey
	  Farrell with a few modifications. Namely, removed a few changes
	  not required to make the module unloadable and also fixed a bug
	  that would cause asterisk to crash on unloading. This patch is
	  the first step (should hopefully be followed by another/others at
	  some point) in allowing res_pjsip and the modules that depend on
	  it to be unloadable. At this time, res_pjsip and some of the
	  modules that depend on res_pjsip cannot be unloaded without
	  causing problems of some sort. The goal of this patch is to get
	  res_pjsip and only res_pjsip to be able to unload successfully
	  and/or shutdown without incident (crashes, leaks, etc...). Other
	  dependent modules may still cause problems on unload. Basically
	  made sure, with the patch applied, that res_pjsip (with no other
	  dependent modules loaded) could be succesfully unloaded and
	  Asterisk could shutdown without any leaks or crashes that
	  pertained directly to res_pjsip. ASTERISK-24485 #close Reported
	  by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4311/ patches:
	  pjsip_unload-broken-r1.patch submitted by Corey Farrell (license
	  5909)

2015-01-14 20:27 +0000 [r430608]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_outbound_publish.c: Prevent slow graceful shutdown
	  when outbound publications never started. The code was missing
	  the case for explicitly destroying an outbound publication when
	  Asterisk had never actually published anything. The result was
	  that Asterisk would hang for a while on a graceful shutdown. With
	  this change, the case is taken into account, and on a graceful
	  shutdown, these publications are destroyed without the need to
	  actually send a PUBLISH request. ASTERISK-24655 #close Reported
	  by Kevin Harwell Review: https://reviewboard.asterisk.org/r/4325

2015-01-14 15:39 +0000 [r430590]  Matthew Jordan <mjordan@digium.com>

	* build_tools/mkpkgconfig, /: build_tools/mkpkgconfig: Fix Cflags
	  concatenation error in asterisk.pc The mkpkgconfig script
	  incorrectly concatenates Cflags options together. As an example,
	  the following: Cflags: -I/usr/include/libxml2 -g3 Is instead
	  generated as: Cflags: -I/usr/include/libxml2-g3 This patch
	  corrects the generation of Cflags in mkpkgconfig such that the
	  Cflags options are output correctly. Review:
	  https://reviewboard.asterisk.org/r/3707/ ASTERISK-23991 #close
	  Reported by: Diederik de Groot patches: fix_mkpkgconfig.diff
	  uploaded by Diederik de Groot (License 6600) ........ Merged
	  revisions 430589 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-13 18:16 +0000 [r430565]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_macro.c, /: app_macro: Don't restore the calling
	  location on a channel redirect. v11: If a channel redirect to a
	  macro exten of a macro that is active happens, the redirect
	  location doesn't get executed. Instead the original macro
	  location is restored and gets reexecuted. v13: An additional
	  effect happens if a parked call times out to an extension in the
	  macro that parked the call then the macro is reexecuted instead
	  of the expected park return location. * Made not restore the
	  macro calling location on an AST_SOFTHANGUP_ASYNCGOTO. *
	  Increased the locked channel range when setting up the macro
	  execution environment to cover things that should be done while
	  the channel is locked. * Removed unnecessary NULL tests before
	  calling ast_free() in _macro_exec(). ASTERISK-23850 #close
	  Reported by: Andrew Nagy Review:
	  https://reviewboard.asterisk.org/r/4292/ ........ Merged
	  revisions 430564 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-13 12:06 +0000 [r430546]  Joshua Colp <jcolp@digium.com>

	* channels/pjsip/dialplan_functions.c, configure,
	  include/asterisk/autoconfig.h.in, configure.ac: chan_pjsip: Add
	  configure check for 'pjsip_get_dest_info' function. The
	  'pjsip_get_dest_info' function is used to determine if the
	  signaling transport of the dialog is secure or not. This function
	  was added in PJSIP 2.3 and does not exist in earlier versions.
	  This configure check allows Asterisk to build and run with older
	  versions at the loss of the 'secure' argument for the PJSIP
	  CHANNEL dialplan function. Usage of this argument will require
	  upgrading to PJSIP 2.3. ASTERISK-24665 #close Reported by: Mark
	  Michelson Review: https://reviewboard.asterisk.org/r/4329/

2015-01-12 18:34 +0000 [r430528]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/manager.h, main/manager.c: AMI: Revert
	  non-backwards compatible changes from earlier commit. * Reverted
	  the change to astman_send_listack() to not use the listflag
	  parameter and always set the value to "Start" so the start
	  capitalization is consistent. Unfortunately changing the case of
	  a returned value is not a backward compatible change so for now
	  FAXSessions is going to have to remain inconsistent with all of
	  the other AMI list actions. * Reverted the minor protocol error
	  fix in action_getconfig() when no requested categories are found.
	  Each line needs to be formatted as "Header: text". Caught by the
	  testsuite. ASTERISK-24049

2015-01-12 18:28 +0000 [r430488-430526]  Matthew Jordan <mjordan@digium.com>

	* configs/samples/features.conf.sample:
	  configs/samples/features.conf.sample: Document attended transfer
	  DTMF options The sample config was missing the configuration
	  options for DTMF attended transfer completion scenarios. The
	  configuration options 'atxferabort', 'atxfercomplete',
	  'atxferthreeway', and 'atxferswap' are now documented in the
	  appropriate configuration file. ASTERISK-24678 #close Reported
	  by: Niklas Larsson patches: features.conf.sample.diff uploaded by
	  Niklas Larsson (License 5068)

	* main/syslog.c, include/asterisk/syslog.h, /: main/syslog: Allow
	  dynamic logs, such as security events, to log to the syslog The
	  security event log uses a dynamic log level (SECURITY) that is
	  registered with the Asterisk logging core. Unfortunately, the
	  syslog would ignore log statements that had a dynamic log level
	  associated with them. Because the syslog cannot handle ad hoc
	  dynamic log levels, this patch treats any dynamic log entries
	  sent to the syslog as logs with a level of NOTICE. ASTERISK-20744
	  #close Reported by: Michael Keuter Tested by: Michael L. Young,
	  Jacek Konieczny patches:
	  asterisk-20744-syslog-dynamic-logging_trunk.diff uploaded by
	  Michael L. Young (license 5026) ........ Merged revisions 430506
	  from http://svn.asterisk.org/svn/asterisk/branches/11

	* funcs/func_curl.c, /: funcs/func_curl: Fix memory leak when
	  CURLOPT channel datastore is destroyed When the channel datastore
	  associated with the usage of CURLOPT on a specific channel is
	  freed, the underlying structure holding the list of options is
	  not disposed of. This patch properly frees the structure in the
	  datastore .destroy callback. ASTERISK-24672 #close Reported by:
	  Kristian Hogh patches: func_curl-memory-leak.diff uploaded by
	  Kristian Hogh (License 6639) ........ Merged revisions 430487
	  from http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-09 22:08 +0000 [r430467-430469]  Scott Griepentrog <sgriepentrog@digium.com>

	* contrib/scripts/sip_to_pjsip/sip_to_pjsip.py,
	  contrib/scripts/sip_to_pjsip/astconfigparser.py: sip_to_pjsip:
	  improve ability to parse input files General improvements to SIP
	  to PJSIP conversion utility: 1) track default section of input
	  file to allow parsing an include file that doesn't specify a
	  [section] 2) informatively handle case of assignment without
	  [section] 3) correctly handle getting sections from included
	  files - [section]'s are inherited by included file 4) provide
	  null string as default transport bind ip 5) gracefully handle
	  missing portions of registration string 6) denote steps of
	  operation during conversion and confirm top level files as a
	  convenience ASTERISK-24474 #close Review:
	  https://reviewboard.asterisk.org/r/4280/ Reported by: John
	  Kiniston

	* main/features.c: app_bridge: return to the next dialplan priority
	  When app_bridge grabs a channel and puts it into a bridge, the
	  channel should then continue where it left off in the dialplan
	  after the bridge has ended. Although it stores the current
	  dialplan location as an after bridge goto on the channel, it was
	  executing the same priority again instead of going to the next
	  priority. By swapping the "specific" version of
	  bridge_set_after_goto with bridge_set_after_go_on, the next
	  priority in the dialplan is executed instead. ASTERISK-24637
	  #close Review: https://reviewboard.asterisk.org/r/4322/ Reported
	  by: John Bigelow

2015-01-09 17:54 +0000 [r430434]  Richard Mudgett <rmudgett@digium.com>

	* UPGRADE.txt, res/res_mwi_external_ami.c, CHANGES,
	  include/asterisk/manager.h, channels/chan_iax2.c,
	  apps/app_queue.c, apps/app_agent_pool.c,
	  res/res_manager_devicestate.c, main/manager_bridges.c,
	  channels/chan_dahdi.c, main/manager.c, channels/chan_skinny.c,
	  res/res_pjsip_outbound_registration.c,
	  res/res_manager_presencestate.c,
	  res/res_pjsip/pjsip_configuration.c, apps/app_confbridge.c,
	  res/res_pjsip_pubsub.c, main/db.c, res/parking/parking_manager.c,
	  res/res_pjsip_registrar.c, apps/app_voicemail.c, main/pbx.c,
	  channels/chan_sip.c, apps/app_meetme.c, main/bridge.c,
	  res/res_fax.c: AMI: Make AMI actions that generate event lists
	  consistent. * Made the following AMI actions use list API calls
	  for consistency: Agents BridgeInfo BridgeList
	  BridgeTechnologyList ConfbridgeLIst ConfbridgeLIstRooms
	  CoreShowChannels DAHDIShowChannels DBGet DeviceStateList
	  ExtensionStateList FAXSessions Hangup IAXpeerlist IAXpeers
	  IAXregistry MeetmeList MeetmeListRooms MWIGet ParkedCalls
	  Parkinglots PJSIPShowEndpoint PJSIPShowEndpoints
	  PJSIPShowRegistrationsInbound PJSIPShowRegistrationsOutbound
	  PJSIPShowResourceLists PJSIPShowSubscriptionsInbound
	  PJSIPShowSubscriptionsOutbound PresenceStateList PRIShowSpans
	  QueueStatus QueueSummary ShowDialPlan SIPpeers SIPpeerstatus
	  SIPshowregistry SKINNYdevices SKINNYlines Status
	  VoicemailUsersList * Incremented the AMI version to 2.7.0. *
	  Changed astman_send_listack() to not use the listflag parameter
	  and always set the value to "Start" so the start capitalization
	  is consistent. i.e., The FAXSessions used "Start" while the rest
	  of the system used "start". The corresponding complete event
	  always used "Complete". * Fixed ami_show_resource_lists()
	  "PJSIPShowResourceLists" to output the AMI ActionID for all of
	  its list events. * Fixed off-nominal AMI protocol error in
	  manager_bridge_info(), manager_parking_status_single_lot(), and
	  manager_parking_status_all_lots(). Use of astman_send_error()
	  after responding to the original AMI action request violates the
	  action response pattern by sending two responses. * Fixed minor
	  protocol error in action_getconfig() when no requested categories
	  are found. Each line needs to be formatted as "Header: text". *
	  Fixed off-nominal memory leak in
	  manager_build_parked_call_string(). * Eliminated unnecessary use
	  of RAII_VAR() in ami_subscription_detail(). ASTERISK-24049 #close
	  Reported by: Jonathan Rose Review:
	  https://reviewboard.asterisk.org/r/4315/

2015-01-09 14:51 +0000 [r430416]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_fax.c, include/asterisk/res_fax.h,
	  configs/samples/res_fax.conf.sample, CHANGES: res_fax: Add T.38
	  negotiation timeout option This change makes the T.38 negotiation
	  timeout configurable via 't38timeout' in res_fax.conf or
	  FAXOPT(t38timeout). It was previously hard coded to be 5000
	  milliseconds. This change also handles T.38 switch failures by
	  aborting the fax since in the case where this can happen, both
	  sides have agreed to switch to T.38 and Asterisk is unable to do
	  so. Review: https://reviewboard.asterisk.org/r/4320/ ........
	  Merged revisions 430415 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2015-01-08 21:40 +0000 [r430373-430397]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_pubsub.c: res_pjsip_pubsub: Fix persistent
	  subscriptions not surviving graceful shutdown If you do a 'core
	  (shutdown|restart) graceful' persistent subscriptions won't
	  survive. If you do a 'core (shutdown|restart) now' or asterisk
	  terminates for some reason, they do. Here's why... When asterisk
	  shuts down gracefully, it sends a 'NOTIFY/terminated' to
	  subscribers for each subscription. This not only tells the
	  subscribers that the dialog/state machine is done, it also frees
	  the last reference to the subscription tree which causes the
	  persistent subscription to get deleted from astdb. When asterisk
	  restarts, nothing's left. Just preventing the delete from astdb
	  doesn't work because we already told the subscriber to terminate
	  the dialog so we can't restart it even if it was still in astdb.
	  Everything works OK if asterisk terminates unexpectedly because
	  we never send the 'terminated' message so on restart, the
	  subscription is still in astdb and the subscriber is none the
	  wiser. This patch suppresses the sending of 'NOTIFY/terminated'
	  on shutdown for persistent connections. Tested-by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4318/

	* res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration: Fix reference leak. Every time a
	  registration started, sip_outbound_registration_response_cb bumps
	  the ref count on client_state then pushes a
	  handle_registration_response task. handle_registration_response
	  never unreffed it though. So every time a registration goes out,
	  the ref count goes up by one. This patch adds the unreffs to
	  handle_registration_response. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4303/

	* res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration: Fix several reload issues There
	  are 2 issues with reloading registrations... 1. The
	  'can_reuse_registration' test wasn't considering the intervals or
	  expiration in its determination of whether a registration changed
	  or not so if you changed any of the intervals or the expiration
	  and reloaded, the object would get reloaded but the actual timers
	  wouldn't change. can_reuse_registration now does a sorcery diff
	  on the old and new objects instead of discretely testing certain
	  fields. Now if you change expiration for instance, and reload,
	  the timer is updated and re-registration will occur on the new
	  value. 2. If you mung up your password on an outbound
	  registration you get a permanent failure. If you fix the password
	  (on the outbound_auth object) and reload, nothing tells
	  outbound_registration to try again because the registration
	  itself didn't change. This patch adds an observer on the "auth"
	  object type and if any auth changes, existing registration states
	  are searched and those in a REJECTED_PERMANENT state are retried.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4304/

2015-01-07 21:25 +0000 [r430355]  Kinsey Moore <kmoore@digium.com>

	* res/res_stasis.c: ARI: Allow usage of ASYNCGOTO with Stasis()
	  When the AMI Redirect action is used with a channel bridged
	  inside Stasis() and not running a pbx, the channel is hung up
	  instead of proceeding to the desired location in dialplan. This
	  change allows such channels to be Redirected properly by
	  detecting the operation used by Redirect (ASYNCGOTO) and using
	  the code already established for functionality of the ARI channel
	  continue operation. ASTERISK-24591 #close Review:
	  https://reviewboard.asterisk.org/r/4271/

2015-01-07 18:53 +0000 [r430337]  Mark Michelson <mmichelson@digium.com>

	* rest-api/api-docs/channels.json, rest-api/resources.json,
	  res/ari/resource_channels.c, CHANGES, res/res_ari_channels.c,
	  res/ari/resource_channels.h: Add the ability to continue and
	  originate using priority labels. With this patch, the following
	  two ARI commands POST /channels POST /channels/{id}/continue
	  Accept a new parameter, label, that can be used to continue to or
	  originate to a priority label in the dialplan. Because this is
	  adding a new parameter to ARI commands, the API version of ARI
	  has been bumped from 1.6.0 to 1.7.0. This patch comes courtesy of
	  Nir Simionovich from Greenfield Tech. Thanks! ASTERISK-24412
	  #close Reported by Nir Simionovich Review:
	  https://reviewboard.asterisk.org/r/4285

2015-01-07 18:17 +0000 [r430315-430319]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_exten_state.c: res_pjsip_exten_state: Change 'does
	  not exist' warning to notice The 'new_subscribe: Extension <>
	  does not exist or has no associated hint' is a config issue and
	  doesn't need to clutter up logs with warnings. Changed to notice.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4307/

	* res/res_pjsip_mwi.c: res_pjsip_mwi: Change "MWI Subscription
	  failed" message from warning to notice The "MWI Subscription
	  failed" message means the client is trying to subscribe to a
	  mailbox that doesn't exist. There's no need to clutter up logs
	  with warnings for a client misconfiguration so I changed it to a
	  notice. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4306/

	* funcs/func_config.c, tests/test_config.c: func_config: Add
	  ability to retrieve specific occurrence of a variable I guess
	  nobody uses templates with AST_CONFIG because today if you have a
	  context that inherits from a template and you call AST_CONFIG on
	  the context, you'll get the value from the template even if
	  you've overridden it in the context. This is because AST_CONFIG
	  only gets the first occurrence which is always from the template.
	  This patch adds an optional 'index' parameter to AST_CONFIG which
	  lets you specify the exact occurrence to retrieve, or '-1' to
	  retrieve the last. The default behavior is the current behavior.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4313/

2015-01-07 17:35 +0000 [r430313]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_refer.c: Fix ability to perform a remote attended
	  transfer with PJSIP. This fix has two parts: * Corrected an error
	  message to properly state that external_replaces is an extension.
	  The error message also prints what dialplan context the
	  external_replaces extension was being looked for in. * Corrected
	  the printing of the Replaces: header in an INVITE request. We
	  were duplicating "Replaces: " in the header. ASTERISK-24376
	  #close Reported by Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/4296

2015-01-07 16:55 +0000 [r430295]  George Joseph <george.joseph@fairview5.com>

	* include/asterisk/config.h, main/config.c, main/manager.c: config:
	  Add option to NOT preserve effective context when changing a
	  template Let's say you have a template T with variable VAR1 = ON
	  and you have a context C(T) that doesn't specify VAR1. If you
	  read C, the effective value of VAR1 is ON. Now you change T VAR1
	  to OFF and call ast_config_text_file_save. The current behavior
	  is that the file gets re-written with T/VAR1=OFF but C/VAR1=ON is
	  added. Personally, I think this is a bug. It's preserving the
	  effective state of C even though I didn't specify C/VAR1 in th
	  first place. I believe the behavior should be that if I didn't
	  specify C/VAR1 originally, then the effective value of C/VAR1
	  should continue to follow the inherited state. Now, if I DID
	  explicitly specify C/VAR1, the it should be preserved even if the
	  template changes. Even though I think the existing behavior is a
	  bug, it's been that way forever so I'm not changing it. Instead,
	  I've created ast_config_text_file_save2() that takes a bitmask of
	  flags, one of which is to preserve the effective context (the
	  current behavior). The original ast_config_text_file_save calls
	  *2 with the preserve flag. If you want the new behavior, call *2
	  directly without a flag. I've also updated Manager UpdateConfig
	  with a new parameter 'PreserveEffectiveContext' whose default is
	  'yes'. If you want the new behavior with UpdateConfig, set
	  'PreserveEffectiveContext: no'. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4297/

2015-01-07 02:52 +0000 [r430274]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip/pjsip_options.c, res/res_pjsip.c,
	  main/rtp_engine.c: Fix dev-mode build on recent gcc

2015-01-06 22:46 +0000 [r430252]  Matthew Jordan <mjordan@digium.com>

	* contrib/ast-db-manage/config/versions/371a3bf4143e_add_user_eq_phone_option_to_pjsip.py:
	  contrib/ast-db-manage: Correct down_revision path for
	  user_eq_phone When the user_eq_phone patch was backported to 13,
	  it referenced the downward revision that the PJSIP optimistic
	  encryption option also references. This creates a multi-path
	  upgrade Exception when generating the SQL files. This patch
	  corrects this in the 13 branch. Note that trunk, which already
	  contained both of these features, is unaffected by this problem.

2015-01-06 17:52 +0000 [r430221-430227]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_mwi.c: res_pjsip_mwi: Change warning to notice When
	  res_pjsip loads and an endpoint auto-subscribes a mailbox for
	  mwi, if a contact hasn't registered yet, res_pjsip_mwi spits out
	  a warning. This is a perfectly normal situation though and
	  doesn't require something as serious as a warning. It's also self
	  correcting. The device will start getting mwi as soon as it
	  registers. This patch changes the warning to a notice. Tested-by:
	  George Joseph Review: https://reviewboard.asterisk.org/r/4314/

	* bridges/bridge_native_rtp.c: bridge_native_rtp: Change
	  local/remote message from debug/2 to verb/4 Change the "Locally
	  bridged"/"Remotely bridged" messages from dbg/2 to verb/4.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4300/

	* res/res_pjsip_outbound_registration.c, CHANGES:
	  outbound_registration: Add 'pjsip send register' and update 'send
	  unregister' The current behavior of 'pjsip send unregister' is to
	  send the unregister (REGISTER with 0 exp) but let the next
	  scheduled register proceed normally. I don't think that's a good
	  idea. If you unregister, it should stay unregistered until you
	  decide to start registrations again. So this patch just adds a
	  cancel_registration call to the current unregister_task to cancel
	  the timer. Of course, now you need a way to start registration
	  again so I've added a 'pjsip send register' command that
	  unregisters and cancels any existing registration (the same as
	  send unregister), then sends an immediate registration and starts
	  the timer back up again. Both changes also ripple to AMI. There's
	  a new PJSIPRegister command. There's no harm in calling either
	  command repeatedly. They don't care about the actual state.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4301/

	* res/res_pjsip/location.c: pjsip cli: Fix sorting of contacts for
	  'pjsip list contacts' For some reason I was using a hash
	  container instead of a list to gather the contacts for 'pjsip
	  list/show contacts' so even though I had a sort function, the
	  output wasn't sorted. This patch just changes the hash container
	  to a list container and the contacts now appear sorted in the
	  CLI. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4305/

2015-01-05 22:49 +0000 [r430200]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, main/bridge_basic.c: bridge: avoid leaking channel during
	  blond transfer pt2 A blond transfer to a failed destination, when
	  followed by a recall attempt, lead to a leak of the reference to
	  the destination channel. In addition to correcting the regression
	  on the previous attempt (r429826) this fixes the leak and two
	  additional reference leaks on failures of bridge_import.
	  ASTERISK-24513 #close Review:
	  https://reviewboard.asterisk.org/r/4302/ ........ Merged
	  revisions 430199 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2015-01-05 17:56 +0000 [r430179-430181]  Joshua Colp <jcolp@digium.com>

	* CHANGES: pjsip: Document addition of 'PJSIP_AOR' and
	  'PJSIP_CONTACT' in CHANGES file.

	* funcs/func_pjsip_contact.c (added), res/res_pjsip_session.c,
	  include/asterisk/res_pjsip.h,
	  channels/pjsip/dialplan_functions.c,
	  include/asterisk/res_pjsip_session.h, funcs/func_pjsip_aor.c
	  (added), res/res_pjsip/location.c: pjsip: Add 'PJSIP_AOR' and
	  'PJSIP_CONTACT' dialplan functions. The PJSIP_AOR dialplan
	  function allows inspection of configured AORs including what
	  contacts are currently bound to them. The PJSIP_CONTACT dialplan
	  function allows inspection of contacts in existence. These can
	  include both externally added (by way of registration) or
	  permanent ones. ASTERISK-24341 Reported by: xrobau Review:
	  https://reviewboard.asterisk.org/r/4308/

2014-12-29 13:10 +0000 [r430145]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip.c: PJSIP: Update transport method documentation
	  This updates the documentation for the 'method' configuration
	  option to be more verbose about the behaviors of values
	  'unspecified' and 'default'. They do exactly the same thing which
	  is to select the default as defined by PJSIP which is currently
	  TLSv1. Review: https://reviewboard.asterisk.org/r/4264/

2014-12-24 21:27 +0000 [r430127]  Kevin Harwell <kharwell@digium.com>

	* /, configs/samples/queues.conf.sample: app_queue: Update sample
	  conf documenation Updated the queues.conf.sample file to
	  explicitly state which channel queue variables are propagated to.
	  ASTERISK-24267 Reported by: Mitch Claborn ........ Merged
	  revisions 430126 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2014-12-24 15:26 +0000 [r430083-430092]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip.c,
	  contrib/ast-db-manage/config/versions/371a3bf4143e_add_user_eq_phone_option_to_pjsip.py
	  (added): res_pjsip: Backport missing commits for user_eq_phone
	  This backports the following from trunk, which were missed:
	  r427257 | file | 2014-11-04 16:31:16 -0600 (Tue, 04 Nov 2014) | 2
	  lines res_pjsip: Allow + at the beginning of a phone number when
	  user_eq_phone is enabled. r427259 | file | 2014-11-04 16:51:32
	  -0600 (Tue, 04 Nov 2014) | 2 lines res_pjsip: Apply the
	  'user_eq_phone' setting to the To header as well. It also adds
	  the Alembic script for the option. ASTERISK-24643

	* CHANGES, res/res_pjsip.c, include/asterisk/res_pjsip.h,
	  res/res_pjsip/config_global.c, res/res_pjsip_keepalive.c (added),
	  configs/samples/pjsip.conf.sample: res_pjsip_keepalive: Add
	  runtime configurable keepalive module for connection-oriented
	  transports. Note that this is backport from trunk of r425825.
	  This change adds a module which is configurable using the
	  keep_alive_interval setting in the global section that will send
	  a CRLF keep alive to all active connection-oriented transports at
	  the provided interval. This is useful because it can help keep
	  connections open through NATs. This functionality also exists
	  within PJSIP but can not be controlled at runtime and requires
	  recompiling it. Review: https://reviewboard.asterisk.org/r/4084/
	  ASTERISK-24644 #close

	* res/res_pjsip/pjsip_configuration.c, res/res_pjsip_caller_id.c,
	  CHANGES, res/res_pjsip.c, include/asterisk/res_pjsip.h:
	  res_pjsip: Add 'user_eq_phone' option to add a 'user=phone'
	  parameter when applicable. Note that this is a backport of
	  r425804 from trunk. This change adds a configuration option which
	  adds a 'user=phone' parameter if the user portion of the request
	  URI or the From URI is determined to be a number. Review:
	  https://reviewboard.asterisk.org/r/4073/ ASTERISK-24643 #close

2014-12-23 23:18 +0000 [r430059-430064]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip/pjsip_options.c: pjsip_options: Fix continued
	  qualifies after endpoint/aor deletion If you remove an
	  endpoint/aor from pjsip.conf then do a core reload, qualifies
	  will continue even though the object are gone. This happens
	  because nothing clears out the qualify tasks. This patch
	  unschedules all existing qualify tasks before scheduling new ones
	  on reload. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4290/

	* tests/test_astobj2.c: test_astobj2: Fix warning for missing
	  trailing slash in category This patch adds a trailing slash to
	  the category for this test. No more warning. Tested-by: George
	  Joseph Review: https://reviewboard.asterisk.org/r/4295/

2014-12-22 21:18 +0000 [r430010-430034]  Richard Mudgett <rmudgett@digium.com>

	* main/bridge_basic.c: DTMF atxfer: Setup recall channels as if the
	  transferee initiated the call. After the initial DTMF atxfer call
	  attempt to the transfer target fails to answer during a blonde
	  transfer, the recall callback channels do not get setup with
	  information from the initial transferrer channel. As a result,
	  the recall callback to the transferrer does not have callid,
	  channel variables, datastores, accountcode, peeraccount, COLP,
	  and CLID setup. A similar situation happens with the recall
	  callback to the transfer target but it is less visible. The
	  recall callback to the transfer target does not have callid,
	  channel variables, datastores, accountcode, peeraccount, and COLP
	  setup. * Added missing information to the recall callback
	  channels before initiating the call. callid, channel variables,
	  datastores, accountcode, peeraccount, COLP, and CLID * Set callid
	  of the transferrer channel on the DTMF atxfer controller thread
	  attended_transfer_monitor_thread(). * Added missing channel
	  unlocks and props unref to off nominal paths in
	  attended_transfer_properties_alloc(). ASTERISK-23841 #close
	  Reported by: Richard Mudgett Review:
	  https://reviewboard.asterisk.org/r/4259/

	* /, main/logger.c, include/asterisk/_private.h, main/asterisk.c:
	  queue_log: Post QUEUESTART entry when Asterisk fully boots. The
	  QUEUESTART log entry has historically acted like a fully booted
	  event for the queue_log file. When the QUEUESTART entry was
	  posted to the log was broken by the change made by
	  ASTERISK-15863. * Made post the QUEUESTART queue_log entry when
	  Asterisk fully boots. This restores the intent of that log entry
	  and happens after realtime has had a chance to load. AST-1444
	  #close Reported by: Denis Martinez Review:
	  https://reviewboard.asterisk.org/r/4282/ ........ Merged
	  revisions 430009 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2014-12-22 15:40 +0000 [r429983]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: chan_sip: Send CANCEL via original INVITE
	  destination even after UPDATE request Given the following
	  scenario: * Three SIP phones (A, B, C), all communicating via a
	  proxy with Asterisk * A call is established between A and B. B
	  performs a SIP attended transfer of A to C. B sets the call on
	  hold (A is hearing MOH) and dials the extension of C. While phone
	  C is ringing, B transfers the call (that is, what we typically
	  call a 'blond transfer'). * When the transfer completes, A hears
	  the ringing of phone C, while B is idle. In the SIP messaging for
	  the above scenario, a REFER request is sent to transfer the call.
	  When "sendrpid=yes" is set in sip.conf, Asterisk may send an
	  UPDATE request to phone C to update party information. This
	  update is sent directly to phone C, not through the intervening
	  proxy. This has the unfortunate side effect of providing route
	  information, which is then set on the sip_pvt structure for C. If
	  someone (e.g. B) is trying to get the call back (through a
	  directed pickup), Asterisk will send a CANCEL request to C.
	  However, since we have now updated the route set, the CANCEL
	  request will be sent directly to C and not through the proxy. The
	  phone ignores this CANCEL according to RFC3261 (Section 9.1).
	  This patch updates reqprep such that the route is not updated if
	  an UPDATE request is being sent while the INVITE state is
	  INV_PROCEEDING or INV_EARLY_MEDIA. This ensures that a subsequent
	  CANCEL request is still sent to the correct location. Review:
	  https://reviewboard.asterisk.org/r/4279 ASTERISK-24628 #close
	  Reported by: Karsten Wemheuer patches: issue.patch uploaded by
	  Karsten Wemheuer (License 5930) ........ Merged revisions 429982
	  from http://svn.asterisk.org/svn/asterisk/branches/11

2014-12-22 00:17 +0000 [r429914]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_phoneprov_provider.c:
	  res_pjsip_phoneprovi_provider: Fix reload Reloading wasn't
	  working correctly because on a reload, the sorcery apply handler
	  was never being called for unchanged users. So, instead of using
	  an apply handler, I'm now iterating over all users. Works much
	  more reliably. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4288/

2014-12-20 20:57 +0000 [r429894]  Joshua Colp <jcolp@digium.com>

	* main/named_acl.c, /: acl: Fix reloading of configuration if
	  configuration file does not exist at startup. The named ACL code
	  incorrectly destroyed the config options information if loading
	  of the configuration file failed at startup. This would result in
	  reloading also failing even if a valid configuration file was put
	  in place. ASTERISK-23733 #close Reported by: Richard Kenner
	  ........ Merged revisions 429893 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2014-12-19 20:54 +0000 [r429829-429868]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_http_websocket.c: res_http_websocket.c: Fix incorrect
	  use of sizeof in ast_websocket_write(). This won't fix the
	  reported issue but it is an incorrect use of sizeof.
	  ASTERISK-24566 Reported by: Badalian Vyacheslav ........ Merged
	  revisions 429867 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* channels/chan_dahdi.c, /: chan_dahdi: Don't ignore setvar when
	  using configuration section scheme. When the configuration
	  section scheme of chan_dahdi.conf is used (keyword dahdichan
	  instead of channel) all setvar= options are completely ignored.
	  No variable defined this way appears in the created DAHDI
	  channels. * Move the clearing of setvar values to after the
	  deferred processing of dahdichan. AST-1378 #close Reported by:
	  Guenther Kelleter Patch by: Guenther Kelleter ........ Merged
	  revisions 429825 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2014-12-19 17:26 +0000 [r429827]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, main/bridge_basic.c: bridge: avoid leaking channel during
	  blond transfer After a blond transfer (start attended and hang
	  up) to a destination that also hangs up without answer, the
	  Local;1 channel was leaked and would show up on core show
	  channels. This was happening because the attended state
	  blond_nonfinal_enter() resetting the props->transfer_target to
	  null while releasing it's own reference, which would later
	  prevent props from releasing another reference during
	  destruction. The change made here is simply to not assign the
	  target to NULL. ASTERISK-24513 #close Reported by: Mark Michelson
	  Review: https://reviewboard.asterisk.org/r/4262/ ........ Merged
	  revisions 429826 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-18 22:38 +0000 [r429784-429805]  Richard Mudgett <rmudgett@digium.com>

	* res/res_rtp_asterisk.c, channels/chan_dahdi.c, /: chan_dahdi.c,
	  res_rtp_asterisk.c: Change some spammy debug messages to level 5.
	  ASTERISK-24337 #close Reported by: Rusty Newton ........ Merged
	  revisions 429804 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

	* UPGRADE.txt, channels/sig_analog.c, /: chan_dahdi: Populate
	  CALLERID(ani2) for incoming calls in featdmf signaling mode. For
	  the featdmf signaling mode the incoming MF Caller-ID information
	  is formatted as follows:
	  *${CALLERID(ani2)}${CALLERID(ani)}#*${EXTEN}# Rather than
	  discarding the ani2 digits, populate the CALLERID(ani2) value
	  with what is received instead. AST-1368 #close Reported by: Denis
	  Martinez Patches: extract_ani2_for_featdmf_v11.patch (license
	  #5621) patch uploaded by Richard Mudgett ........ Merged
	  revisions 429783 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2014-12-18 15:50 +0000 [r429763]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_sdp_rtp.c: res_pjsip_sdp_rtp: wrong bridge chosen
	  when the DTMF mode is not compatible A native rtp bridge was
	  being chosen (it shouldn't have been) when using two pjsip
	  channels with incompatible DTMF modes. This patch sets the rtp
	  instance property, AST_RTP_PROPERTY_DTMF, for the appropriate
	  DTMF mode(s) for pjsip. It was not being set before, meaning all
	  DTMF modes for pjsip were being treated as compatible, thus
	  native bridging would be chosen as the bridge type when it
	  shouldn't have been. ASTERISK-24459 #close Reported by: Yaniv
	  Simhi Review: https://reviewboard.asterisk.org/r/4265/

2014-12-18 15:34 +0000 [r429739-429761]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_outbound_registration.c: Prevent potential infinite
	  outbound authentication loops in registration. Prior to this
	  patch, Asterisk would always respond to 401 responses to
	  registration attempts by trying to provide a registration with
	  authentication credentials. Even if subsequent attempts were
	  rejected with 401 responses, Asterisk would continue this
	  behavior. If authentication credentials were incorrect, this
	  could continue forever. With this patch, we keep track of whether
	  we have attempted authentication on an outbound registration
	  attempt. If we already have, we don not try again until the next
	  attempt. This prevents the infinite loop scenario. Review:
	  https://reviewboard.asterisk.org/r/4273

	* main/manager.c: Prevent possible race condition on dual redirect
	  of channels in the same bridge. The
	  AST_FLAG_BRIDGE_DUAL_REDIRECT_WAIT flag was created to prevent
	  bridges from prematurely acting on orphaned channels in bridges.
	  The problem with the AMI redirect action was that it was setting
	  this flag on channels based on the presence of a PBX, not whether
	  the channel was in a bridge. Whether a channel has a PBX is
	  irrelevant, so the condition has been altered to check if the
	  channel is in a bridge. ASTERISK-24536 #close Reported by Niklas
	  Larsson Review: https://reviewboard.asterisk.org/r/4268

	* channels/pjsip/dialplan_functions.c: Ensure the correct value is
	  returned for CHANNEL(pjsip, secure) Prior to this patch, we were
	  using the PJSIP dialog's secure flag to determine if a secure
	  transport was being used. Unfortunately, the dialog's secure flag
	  was only set if a SIPS URI were in use, as required by RFC 3261
	  sections 12.1.1 and 12.1.2. What we're interested in is not
	  dialog security, but transport security. This code change
	  switches to a model where we use the dialog's target URI to
	  determine what transport would be used to communicate, and then
	  check if that transport is secure. AST-1450 #close Reported by
	  John Bigelow Review: https://reviewboard.asterisk.org/r/4277

2014-12-18 00:10 +0000 [r429699-429719]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_config_wizard.c: res_pjsip_config_wizard: fix
	  unload SEGV If certain pjsip modules aren't loaded, the wizard
	  causes a SEGV when it unloads. Added a check for the presense of
	  the object type wizard before trying to clean it up. Tested-by:
	  George Joseph

	* res/res_pjsip_config_wizard.c: res_pjsip_config_wizard: Change
	  FILEUNCHANGED config_load2 flag determination The module now
	  applies the FILEUNCHANGED flag when both reloaded is specified
	  AND there's no last_config for the object type. Tested-by: George
	  Joseph Review: https://reviewboard.asterisk.org/r/4276/

2014-12-17 09:54 +0000 [r429675]  Walter Doekes <walter+asterisk@wjd.nu>

	* addons/ooh323c/src/printHandler.c, apps/app_adsiprog.c,
	  channels/chan_unistim.c, main/udptl.c, res/res_rtp_asterisk.c, /,
	  channels/chan_sip.c, channels/vcodecs.c, res/res_crypto.c,
	  utils/astman.c, utils/smsq.c, main/utils.c, pbx/dundi-parser.c,
	  apps/app_getcpeid.c, channels/chan_iax2.c, channels/sig_pri.c,
	  res/res_pktccops.c, main/loader.c, channels/iax2/parser.c,
	  main/uuid.c, main/manager.c, channels/chan_misdn.c,
	  apps/app_osplookup.c, channels/misdn/ie.c, main/http.c,
	  apps/app_sms.c: Fix printf problems with high ascii characters
	  after r413586 (1.8). In r413586 (1.8) various casts were added to
	  silence gcc 4.10 warnings. Those fixes included things like: -out
	  += sprintf(out, "%%%02X", (unsigned char) *ptr); +out +=
	  sprintf(out, "%%%02X", (unsigned) *ptr); That works for low ascii
	  characters, but for the high range that yields e.g. FFFFFFC3 when
	  C3 is expected. This changeset: - fixes those casts to use the
	  'hh' unsigned char modifier instead - consistently uses %02x
	  instead of %2.2x (or other non-standard usage) - adds a few 'h'
	  modifiers in various places - fixes a 'replcaes' typo -
	  dev/urandon typo (in 13+ patch) Review:
	  https://reviewboard.asterisk.org/r/4263/ ASTERISK-24619 #close
	  Reported by: Stefan27 (on IRC) ........ Merged revisions 429673
	  from http://svn.asterisk.org/svn/asterisk/branches/11 ........
	  Merged revisions 429674 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-16 17:53 +0000 [r429653]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_config_wizard.c: res_pjsip_config_wizard: fix test
	  breakage Fix test breakage caused by not checking for res_pjsip
	  before calling ast_sip_get_sorcery. Tested-by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4269/

2014-12-16 16:38 +0000 [r429612-429633]  Joshua Colp <jcolp@digium.com>

	* /, channels/chan_sip.c: chan_sip: Allow T.38 switch-over when
	  SRTP is in use. Previously when SRTP was enabled on a channel it
	  was not possible to switch to T.38 as no crypto attributes would
	  be present. This change makes it so it is now possible. If a T.38
	  re-invite comes in SRTP is terminated since in practice you can't
	  encrypt a UDPTL stream. Now... if we were doing T.38 over RTP
	  (which does exist) then we'd have a chance but almost nobody does
	  that so here we are. ASTERISK-24449 #close Reported by: Andreas
	  Steinmetz patches: udptl-ignore-srtp-v2.patch submitted by
	  Andreas Steinmetz (license 6523) ........ Merged revisions 429632
	  from http://svn.asterisk.org/svn/asterisk/branches/11

	* res/res_pjsip_t38.c: res_pjsip_t38: Fix T.38 failure when peer
	  reinvites immediately. If a remote endpoint reinvites to T.38
	  immediately the state machine will go into a peer reinvite state.
	  If a T.38 capable application (such as ReceiveFax) queries it
	  will receive this state. Normally the application will then
	  indicate so that the channel driver will queue up the T.38 offer
	  previously received. Once it receives this offer the application
	  will act normally and negotiate. The res_pjsip_t38 module
	  incorrectly partially squashed this indication. This would cause
	  the application to think the request had failed when in reality
	  it had actually worked. This change makes it so that no T.38
	  control frames (or indications) are squashed.

2014-12-15 17:07 +0000 [r429592]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_phoneprov_provider.c,
	  configs/samples/pjsip_wizard.conf.sample (added), CHANGES,
	  res/res_pjsip_config_wizard.c (added): res_pjsip_config_wizard:
	  Allow streamlined config of common pjsip scenarios
	  res_pjsip_config_wizard ------------------ * This is a new module
	  that adds streamlined configuration capability for chan_pjsip.
	  It's targetted at users who have lots of basic configuration
	  scenarios like 'phone' or 'agent' or 'trunk'. Additional
	  information can be found in the sample configuration file at
	  config/samples/pjsip_wizard.conf.sample. Tested-by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4190/

2014-12-15 15:36 +0000 [r429571]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pubsub.c: Activate persistent subscriptions when
	  they are recreated. Prior to this change, recreating persistent
	  subscriptions would create the subscription but would not
	  activate it. This led to subscriptions being listed in the "NULL"
	  state by diagnostics and not sending NOTIFYs when expected.
	  Review: https://reviewboard.asterisk.org/r/4261

2014-12-12 23:54 +0000 [r429542]  George Joseph <george.joseph@fairview5.com>

	* main/manager.c, include/asterisk/module.h,
	  include/asterisk/_private.h: loader: Move definition of
	  ast_module_reload from _private.h to module.h No functionality
	  change. Just move the definition of ast_module_reload from
	  _private.h to module.h so it can be public. Also removed the
	  include of _private.h from manager.c since ast_module_load was
	  the only reason for including it. Tested-by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/4251/

2014-12-12 23:40 +0000 [r429540]  Richard Mudgett <rmudgett@digium.com>

	* main/lock.c, /, include/asterisk/lock.h: DEBUG_THREADS: Fix
	  regression and lock tracking initialization problems. This patch
	  started with David Lee's patch at
	  https://reviewboard.asterisk.org/r/2826/ and includes a
	  regression fix introduced by the ASTERISK-22455 patch. The
	  initialization of a mutex's lock tracking structure was not
	  protected in a critical section. This is fine for any mutex that
	  is explicitly initialized, but a static mutex may have its lock
	  tracking double initialized if multiple threads attempt the first
	  lock simultaneously. * Added a global mutex to properly serialize
	  initialization of the lock tracking structure. The painful global
	  lock can be mitigated by adding a double checked lock flag as
	  discussed on the original review request. * Defer lock tracking
	  initialization until first use. * Don't be "helpful" and
	  initialize an uninitialized lock when DEBUG_THREADS is enabled.
	  Debug code is not supposed to fix or change normal code behavior.
	  We don't need a lock initialization race that would force a
	  re-setup of lock tracking. Lock tracking already handles
	  initialization on first use. * Properly handle allocation
	  failures of the lock tracking structure. * No need to initialize
	  tracking data in __ast_pthread_mutex_destroy() just to turn
	  around and destroy it. The regression introduced by
	  ASTERISK-22455 is the result of manipulating a pthread_mutex_t
	  struct outside of the pthread library code. The pthread_mutex_t
	  struct seems to have a global linked list pointer member that can
	  get changed by other threads. Therefore, saving and restoring the
	  contents of a pthread_mutex_t struct is a bad thing. Thanks to
	  Thomas Airmont for finding this obscure regression. * Don't
	  overwrite the struct ast_lock_track.reentr_mutex member to
	  restore tracking data in __ast_cond_wait() and
	  __ast_cond_timedwait(). The pthread_mutex_t struct must be
	  treated as a read-only opaque variable. Miscellaneous other items
	  fixed by this patch: * Match ast_suspend_lock_info() with
	  ast_restore_lock_info() in __ast_cond_timedwait(). * Made some
	  uninitialized lock sanity checks return EINVAL and try a
	  DO_THREAD_CRASH. * Fix bad canlog initialization expressions.
	  ASTERISK-24614 #close Reported by: Thomas Airmont Review:
	  https://reviewboard.asterisk.org/r/4247/ Review:
	  https://reviewboard.asterisk.org/r/2826/ ........ Merged
	  revisions 429539 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2014-12-12 22:53 +0000 [r429518-429519]  Matthew Jordan <mjordan@digium.com>

	* res/res_agi.c: res/res_agi: Make Verbose message for 'stream
	  file' match other playbacks The Verbose message displayed when a
	  file is played back via 'stream file' was formatted differently
	  than other playbacks: * It didn't include the channel name * It
	  didn't include the channel language It does, however, include the
	  playback offset as well as any escape digits. That information
	  was kept; however, this patch updates the formatting to more
	  closely match the Verbose messages displayed when a file is
	  played back by 'control stream file', Playback, ControlPlayback,
	  or any other file playback operation.

	* /: Add 11 merge properties

2014-12-12 16:57 +0000 [r429497]  Joshua Colp <jcolp@digium.com>

	* main/format.c, main/codec.c, include/asterisk/format.h: media:
	  Fix crash when determining sample count of a frame during
	  shutdown. When shutting down Asterisk the codecs are cleaned up.
	  As a result anything attempting to get a codec based on ID or
	  details will find that no codec exists. This currently occurs
	  when determining the sample count of a frame. This code did not
	  take this situation into account. This change fixes this by
	  getting the codec directly from the format and eliminates the
	  lookup. This is both faster and also provides a guarantee that
	  the codec will exist and will be valid. ASTERISK-24604 #close
	  Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/4260/

2014-12-12 15:30 +0000 [r429477]  Kevin Harwell <kharwell@digium.com>

	* channels/chan_pjsip.c: chan_pjsip: Race between channel answer
	  and bridge setup when using direct media When direct media is
	  enabled and a pjsip channel is answered a race would occur
	  between the handling of the answer and bridge setup. Sometimes
	  the media negotiation would take place after the native bridge
	  was setup. This resulted in a NULL media address, which in turn
	  resulted in Asterisk using its address as the remote media
	  address when sending a reinvite. This patch makes the chan_pjsip
	  answer handler synchronous thus alleviating the race condition
	  (the bridge won't start setting things up until after it
	  returns). ASTERISK-24563 #close Reported by: Steve Pitts Review:
	  https://reviewboard.asterisk.org/r/4257/

2014-12-12 15:00 +0000 [r429457]  David M. Lee <dlee@digium.com>

	* res/res_pjsip_outbound_publish.c: Fix crash for sorcery
	  misconfigs res_pjsip_outbound_publish was missing the
	  CHECK_PJSIP_MODULE_LOADED() call in load_module, and would crash
	  with a segfault if res_pjsip declined to load. Review:
	  https://reviewboard.asterisk.org/r/4258/

2014-12-12 14:12 +0000 [r429430-429433]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip_sdp_rtp.c: PJSIP: Allow use of 'inactive'
	  streams for hold This allows use of the 'inactive' stream
	  direction identifier to be used for hold where 'sendonly' is
	  normally used. Some Seimens phones use 'inactive' and this change
	  allows music on hold to operate properly. Review:
	  https://reviewboard.asterisk.org/r/4252/ Reported by: Steve Pitts
	  ........ Merged revisions 429432 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_sorcery_config.c, /: Sorcery: Log when old config remains
	  in use This adds a log message notifying the user that a stale
	  configuration is in place upon reload when a config object fails
	  to load. This situation can end up causing confusion when the
	  object failed to load but exists from a previous config load
	  especially when the old config is significantly different from
	  the new config. Review: https://reviewboard.asterisk.org/r/4250/
	  Reported by: Thomas Thompson ........ Merged revisions 429429
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-12 13:05 +0000 [r429407-429409]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.exports.in, channels/chan_pjsip.c,
	  res/res_pjsip_session.c, include/asterisk/res_pjsip_session.h:
	  res_pjsip_session: Delay sending BYE if a re-INVITE transaction
	  is in progress. Given the scenario where a PJSIP channel is in a
	  native RTP bridge with direct media and the channel is then hung
	  up the code will currently re-INVITE the channel back to Asterisk
	  and send a BYE at the same time. Many SIP implementations dislike
	  this greatly. This change makes it so that if a re-INVITE
	  transaction is in progress the BYE is queued to occur after the
	  completion of the transaction (be it through normal means or a
	  timeout). Review: https://reviewboard.asterisk.org/r/4248/

	* res/res_pjsip_session.c: res_pjsip_session: Fix issue where a
	  declined media stream in a re-INVITE would fail SDP negotiation.
	  In the past the SDP negotiation within res_pjsip_session was made
	  more tolerant of certain situations. The only case where SDP
	  negotiation will fail is when a major error occurs during
	  negotiation. Receiving an already declined media stream is not
	  considered a major error. When producing the local SDP the logic
	  took this into account so on the initial INVITE the declined
	  media stream did not cause an SDP negotiation failure.
	  Unfortunately the logic for handling media streams with a handler
	  did not mirror this logic and considered an already declined
	  media stream an error and thus failed the SDP negotiation. This
	  change makes the logic between both situations match so only
	  under major errors will the SDP negotiation fail. ASTERISK-24607
	  #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/4254/

2014-12-11 20:31 +0000 [r429387]  Kevin Harwell <kharwell@digium.com>

	* CHANGES: ARI/AMI: Include language in standard channel snapshot
	  output The CHANGES verbiage for the "language" addition had been
	  put under the wrong release. This moves it to be under 13.1 to
	  13.2 changes. ASTERISK-24553 Reported by: Matt Jordan

2014-12-11 17:21 +0000 [r429352-429379]  Kinsey Moore <kmoore@digium.com>

	* /: Recorded merge of revisions 429378 from
	  http://svn.asterisk.org/svn/asterisk/branches/12 ........ Fix
	  incorrect patch applied in r429354 The patch that was applied was
	  another pending patch. This swaps them out.

	* /: Recorded merge of revisions 429354 from
	  http://svn.asterisk.org/svn/asterisk/branches/12 ........ Stasis:
	  Update unittest for channel snapshots This adjusts the unit test
	  for channel snapshots to take the new language key into account.

	* tests/test_stasis_channels.c: Stasis: Update unittest for channel
	  snapshots This adjusts the unit test for channel snapshots to
	  take the new language key into account.

2014-12-10 15:42 +0000 [r429326]  Kevin Harwell <kharwell@digium.com>

	* /, CHANGES: ARI/AMI: Include language in standard channel
	  snapshot output Adding information about including "language" in
	  the standard channel snapshot output to the CHANGES file. Note
	  the actual source changes have already been previously committed.
	  ASTERISK-24553 Reported by: Matt Jordan ........ Merged revisions
	  429325 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-10 13:34 +0000 [r429273]  Joshua Colp <jcolp@digium.com>

	* res/res_http_websocket.c, res/res_pjsip_transport_websocket.c, /,
	  channels/chan_sip.c: res_http_websocket: Fix crash due to double
	  freeing memory when receiving a payload length of zero. Frames
	  with a payload length of 0 were incorrectly handled in
	  res_http_websocket. Provided a frame with a payload had been
	  received prior it was possible for a double free to occur. The
	  realloc operation would succeed (thus freeing the payload) but be
	  treated as an error. When the session was then torn down the
	  payload would be freed again causing a crash. The read function
	  now takes this into account. This change also fixes assumptions
	  made by users of res_http_websocket. There is no guarantee that a
	  frame received from it will be NULL terminated. ASTERISK-24472
	  #close Reported by: Badalian Vyacheslav Review:
	  https://reviewboard.asterisk.org/r/4220/ Review:
	  https://reviewboard.asterisk.org/r/4219/ ........ Merged
	  revisions 429270 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 429272 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-10 13:14 +0000 [r429246]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip/pjsip_options.c: PJSIP: Fix assert on initial
	  mass qualify This fixes the MWI test regressions caused by
	  r429127 and ensures that contacts have non-zero qualify_frequency
	  before attempting scheduling. ........ Merged revisions 429245
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-09 20:46 +0000 [r429223]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/asterisk.c: core: avoid possible asterisk -r crash from long
	  id When connecting to the remote console, an id string is first
	  provided that consts of the hostname, pid, and version. This is
	  parsed by the remote instance using a buffer that may be too
	  short, and can allow a buffer overrun because it is not
	  terminated. This patch adds termination and a larger buffer.
	  Review: https://reviewboard.asterisk.org/r/4182/

2014-12-09 20:19 +0000 [r429175-429206]  Kevin Harwell <kharwell@digium.com>

	* res/ari/ari_model_validators.h, /, main/stasis_channels.c,
	  rest-api/api-docs/channels.json, res/ari/ari_model_validators.c,
	  main/manager_channels.c: ARI/AMI: Include language in standard
	  channel snapshot output The channel "language" was already part
	  of a channel snapshot, however is was not sent out over AMI or
	  ARI. This patch makes it so the channel "language" is included in
	  the appropriate AMI or ARI events. ASTERISK-24553 #close Reported
	  by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4245/
	  ........ Merged revisions 429204 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/rtp_engine.h, res/res_rtp_asterisk.c,
	  main/rtp_engine.c, /, channels/chan_sip.c: Direct Media calls
	  within private network sometimes get one way audio When endpoints
	  with direct_media enabled, behind a firewall (Asterisk on a
	  separate network) and were bridged sometimes Asterisk would send
	  the ip address of the firewall in the sdp to one of the phones in
	  the reinvite resulting in one way audio. When sending the
	  reinvite Asterisk will retrieve the media address from the
	  associated rtp instance, but if frames were being read this can
	  be overwritten with another address (in this case the
	  firewall's). This patch ensures that Asterisk uses the original
	  device address when using direct media. ASTERISK-24563 Reported
	  by: Steve Pitts Review: https://reviewboard.asterisk.org/r/4216/
	  ........ Merged revisions 429195 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_outbound_publish.c: res_pjsip_outbound_publish:
	  stack overflow when using non-default sorcery wizard When using a
	  non-default sorcery wizard (in this instance realtime) for
	  outbound publishes Asterisk will crash after a stack overflow
	  occurs due to the code infinitely recursing. The fix entails
	  removing the outbound publish state dependency from the outbound
	  publish sorcery object and instead keeping an in memory container
	  that can be used to lookup the state when needed. ASTERISK-24514
	  #close Reported by: Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/4178/

2014-12-09 15:44 +0000 [r429153]  Joshua Colp <jcolp@digium.com>

	* res/ari/resource_channels.h, rest-api/api-docs/channels.json,
	  res/ari/resource_channels.c, CHANGES, res/res_ari_channels.c:
	  ari: Add support for specifying an originator channel when
	  originating. If an originator channel is specified when
	  originating a channel the linked ID of it will be applied to the
	  newly originated outgoing channel. This allows an association to
	  be made between the two so it is known that the originator has
	  dialed the originated channel. ASTERISK-24552 #close Reported by:
	  Matt Jordan Review: https://reviewboard.asterisk.org/r/4243/

2014-12-09 14:00 +0000 [r429128]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip/pjsip_options.c: PJSIP: Stagger outbound
	  qualifies This change staggers initiation of outbound qualify
	  (OPTIONS) attempts to reduce instantaneous server load and
	  prevent network congestion. Review:
	  https://reviewboard.asterisk.org/r/4246/ ASTERISK-24342 #close
	  Reported by: Richard Mudgett ........ Merged revisions 429127
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-15  Asterisk Development Team <asteriskteam@digium.com>

	* Asterisk 13.1.0 Released.

2014-12-10  Asterisk Development Team <asteriskteam@digium.com>

	* Asterisk 13.1.0-rc2 Released.

	* AST-2014-019: Fix crash when receiving a WebSocket packet with a
	  payload length of zero.

	  Frames with a payload length of 0 were incorrectly handled in
	  res_http_websocket. Provided a frame with a payload had been
	  received prior it was possible for a double free to occur. The
	  realloc operation would succeed (thus freeing the payload) but be
	  treated as an error. When the session was then torn down the payload
	  would be freed again causing a crash. The read function now takes
	  this into account.

	  This change also fixes assumptions made by users of
	  res_http_websocket. There is no guarantee that a frame received from
	  it will be NULL terminated.

	  ASTERISK-24472 #close
	  Reported by: Badalian Vyacheslav

2014-12-08  Asterisk Development Team <asteriskteam@digium.com>

	* Asterisk 13.1.0-rc1 Released.

2014-12-08 16:53 +0000 [r429091]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/playbacks.json, UPGRADE.txt,
	  rest-api/api-docs/channels.json, rest-api/api-docs/sounds.json,
	  rest-api/resources.json, CHANGES, include/asterisk/manager.h,
	  rest-api/api-docs/bridges.json,
	  rest-api/api-docs/recordings.json,
	  rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/endpoints.json,
	  rest-api/api-docs/mailboxes.json, rest-api/api-docs/events.json,
	  rest-api/api-docs/asterisk.json,
	  rest-api/api-docs/applications.json: AMI/ARI: Update version to
	  2.6.0/1.6.0 respectively for new features AMI/ARI are getting a
	  few enhancements in the next release of Asterisk 13. Per semantic
	  versioning, that warrants a bump in the minor version number, as
	  it reflects a backwards compatible change. Hence, this commit.

2014-12-08 16:41 +0000 [r429064-429089]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_session.c: Fix a crash that would occur when
	  receiving a 491 response to a reinvite. The reviewboard
	  description does a fine job of summarizing this, so here it is: A
	  reporter discovered that Asterisk would crash when attempting to
	  retransmit a reinvite that had previously received a 491
	  response. The crash occurred because a pjsip_tx_data structure
	  was being saved for reuse, but its reference count was not being
	  increased. The result was that the pjsip_tx_data was being freed
	  before we were actually done with it. When we attempted to re-use
	  the structure when re-sending the reinvite, Asterisk would crash.
	  The fix implemented here is not to try holding onto the
	  pjsip_tx_data at all. Instead, when we reschedule sending the
	  reinvite, we create a brand new pjsip_tx_data and send that
	  instead. Because of this change, there is no need for an
	  ast_sip_session_delayed_request structure to have a pjsip_tx_data
	  on it any more. So any code referencing its use has been removed.
	  When this initial fix was introduced, I encountered a second
	  crash when processing a subsequent 200 OK on a rescheduled
	  reinvite. The reason was that when rescheduling the reinvite, we
	  gave the wrong location for a response callback. This has been
	  fixed in this patch as well. ASTERISK-24556 #close Reported by
	  Abhay Gupta Review: https://reviewboard.asterisk.org/r/4233

	* main/stasis_channels.c, CHANGES, res/ari/ari_model_validators.c,
	  main/manager_channels.c, main/channel.c,
	  res/ari/ari_model_validators.h,
	  include/asterisk/stasis_channels.h,
	  rest-api/api-docs/events.json, res/stasis/app.c: Add new AMI and
	  ARI events for connected line changes on a channel. The AMI event
	  is called NewConnectedLine and the ARI event is called
	  ChannelConnectedLine. ASTERISK-24554 #close Reported by Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/4231

2014-12-08 15:43 +0000 [r429062]  Kinsey Moore <kmoore@digium.com>

	* /, res/stasis/app.c, main/channel_internal_api.c,
	  res/stasis/stasis_bridge.c, res/stasis/app.h,
	  include/asterisk/channel.h, res/res_stasis.c, main/channel.c:
	  Stasis: Fix StasisStart/End order and missing events This
	  corrects several bugs that currently exist in the stasis
	  application code. * After a masquerade, the resulting channels
	  have channel topics that do not match their uniqueids **
	  Masquerades now swap channel topics appropriately * StasisStart
	  and StasisEnd messages are leaked to observer applications due to
	  being published on channel topics ** StasisStart and StasisEnd
	  publishing is now properly restricted to controlling apps via app
	  topics * Race conditions exist where StasisStart and StasisEnd
	  messages due to a masquerade may be received out of order due to
	  being published on different topics ** These messages are now
	  published directly on the app topic so this is now a non-issue *
	  StasisEnds are sometimes missing when sent due to masquerades and
	  bridge swaps into and out of Stasis() ** This was due to
	  StasisEnd processing adjusting message-sent flags after Stasis()
	  had already exited and Stasis() had been re-entered ** This was
	  corrected by adjusting these flags prior to sending the message
	  while the initial Stasis() application was still shutting down
	  Review: https://reviewboard.asterisk.org/r/4213/ ASTERISK-24537
	  #close Reported by: Matt DiMeo ........ Merged revisions 429061
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-06 18:16 +0000 [r429029-429033]  Matthew Jordan <mjordan@digium.com>

	* res/res_monitor.c, /: res/res_monitor: Reset in/out sample counts
	  on Monitor start When repeatedly starting/stopping a Monitor on a
	  channel, the accumulated in/out sample counts are never reset to
	  0. This can cause inadvertent jumps in the recordings, as the
	  code in the channel core will determine incorrectly that a jump
	  in the recorded file position should occur. Setting the sample
	  counts to 0 simply reflects the initial state a Monitor should be
	  in when it is started, as this is the initial count that would be
	  on the channels at that time. ASTERISK-24573 #close Reported by:
	  Nuno Borges patches: 24573.patch uploaded by Nuno Borges (License
	  6116) ........ Merged revisions 429031 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 429032 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_meetme.c: apps/app_meetme: Apply default values on
	  initial load with no config file When the app_meetme module is
	  loaded without its configuration file, the module settings aren't
	  initialized. In particular, this impacts the use of logging
	  realtime members. This patch guarantees that we always set the
	  default module settings on initial load. Review:
	  https://reviewboard.asterisk.org/r/4242/ ASTERISK-24572 #close
	  Reported by: Nuno Borges patches: 24572.patch uploaded by Nuno
	  Borges (License 6116) ........ Merged revisions 429027 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 429028 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-05 17:06 +0000 [r429000]  George Joseph <george.joseph@fairview5.com>

	* tests/test_sorcery.c, main/sorcery.c, include/asterisk/test.h, /,
	  include/asterisk/sorcery.h: sorcery: Add additional observer
	  capabilities. Add new global, instance and wizard observers.
	  instance_created wizard_registered wizard_unregistered
	  instance_destroying instance_loading instance_loaded
	  wizard_mapped object_type_registered object_type_loading
	  object_type_loaded wizard_loading wizard_loaded Tested-by: George
	  Joseph Review: https://reviewboard.asterisk.org/r/4215/ ........
	  Merged revisions 428999 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-04 17:13 +0000 [r428865-428973]  Matthew Jordan <mjordan@digium.com>

	* /, main/test.c: main/test: Fix compilation issue on 32-bit
	  systems On a 32-bit system, a type of intmax_t will result in a
	  compilation warning when formatted as a 'long int'. Use the
	  format specifier of %jd (which was what was used originally in
	  manager.c) to format the JSON extracted integer on both
	  32-/64-bit systems. ........ Merged revisions 428972 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/manager.c, /, main/test.c: main/test: Fix race condition
	  between AMI topic and Test Suite topic This patch fixes a race
	  condition between the raising of test AMI events (which drive
	  many tests in the Asterisk Test Suite) and other AMI events.
	  Prior to this patch, the Stasis messages published to the test
	  topic were not forwarded to the AMI topic. Instead, the code in
	  manager had a dedicated handler for test messages that was
	  independent of the topics forwarded to the AMI topic. This
	  results in no synchronization between the test messages and the
	  rest of the Stasis messages published out over AMI. In some test
	  with very tight timing constraints, this can result in out of
	  order messages and spurious test failures. Properly forwarding
	  the Test Suite topic to the AMI topic ensures that the messages
	  are synchronized properly. This patch does that, and moves the
	  message handling to the Stasis definition of the Test Suite
	  message in test.c as well. Review:
	  https://reviewboard.asterisk.org/r/4221/ ........ Merged
	  revisions 428945 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* tests/test_cel.c, /: tests/test_cel: Add
	  test_cel_attended_transfer_bridges_link to racey tests Despite
	  failing less often, the ordering of the ATTENDEDTRANSFER event
	  and the BRIDGE_EXIT event for the Alice and David channels is not
	  defined. This makes the test still fail. ........ Merged
	  revisions 428918 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* tests/test_cel.c, /: tests/test_cel: Fix CEL unit test failures
	  caused by attended transfer changes When the publication of
	  attended transfer messages were pushed to another thread, some
	  subtle race conditions were introduced with the CEL unit tests.
	  This patch fixes one of them, and pushes the other to
	  ASTERISK-22367, which already exists to fix another bouncy CEL
	  unit test. In particular, this patch fixes the
	  test_cel_attended_transfer_bridges_link test, and defers the
	  test_cel_attended_transfer_bridges_swap test to the
	  aforementioned JIRA issue. ASTERISK-22367 ........ Merged
	  revisions 428891 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_voicemail.c, /: apps/app_voicemail: Fix crash with IMAP
	  when streams are opened simultaneously The UW IMAP library is
	  instrinsically not thread-safe, and relies upon higher level
	  applications to guarantee thread safety. For the most part, this
	  is provided by the vms object, which provides locking for
	  individual streams. Unfortunately, this is not sufficient for
	  calls to mail_open which create the IMAP stream. mail_open can,
	  on some systems, call into a UW IMAP specific function for
	  determining the address of a system based on a hostname,
	  ip_nametoaddr. In the ip6_unix implementation of this function,
	  static variables are used to hold parsing buffers. This can cause
	  a crash if multiple threads attempt to convert a hostname to an
	  address at the same time. Locking on a single mail stream is not
	  sufficient to prevent simultaneous access to these static
	  variables. In the IMAP library, this function can be called from
	  the mail_open and imap_status functions. As the imap_status
	  function is not used by app_voicemail, locking on access to
	  mail_open is sufficient to prevent any mangling of the buffers.
	  Review: https://reviewboard.asterisk.org/r/4188/ ASTERISK-24516
	  #close Reported by: David Duncan Ross Palmer Tested by: David
	  Duncan Ross Palmer patches: ASTERISK-24516.diff uploaded by David
	  Duncan Ross Palmer (License 6660) ........ Merged revisions
	  428863 from http://svn.asterisk.org/svn/asterisk/branches/11
	  ........ Merged revisions 428864 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-02 21:53 +0000 [r428837]  George Joseph <george.joseph@fairview5.com>

	* CHANGES, /: CHANGES: Add item for new 'pjsip show identif(y|ies)
	  commands Tested-by: George Joseph ........ Merged revisions
	  428836 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-02 19:03 +0000 [r428789-428815]  Matthew Jordan <mjordan@digium.com>

	* tests/test_stasis.c: tests/test_stasis: Resolve compilation
	  issues from Asterisk 12 merge When merging the changes up stream
	  in r428687, I missed the fact that the signature for
	  stasis_message_type_create was changed. This patch fixes the
	  compilation issues introduced by that merge.

	* pbx/pbx_loopback.c, /: pbx/pbx_loopback: Speed up switches by
	  avoiding unneeded lookups This patch makes a small rearrangement
	  to only do dialplan lookups during loopback switches if the
	  pattern matches. Prior to this patch, the dialplan lookups were
	  always performed, even when the result would be discarded.
	  Dialplan lookups can be very costly if remote switches - like
	  DUNDi - are present. In those cases extension matching is sped up
	  considerably, making the issue of lost digits more manageable. As
	  collateral damage, 6 trailing spaces were killed. Review:
	  https://reviewboard.asterisk.org/r/4211 ASTERISK-24577 #close
	  Reported by: Birger Harzenetter patches: ast-loopback.patch
	  uploaded by Birger Harzenetter (License 5870) ........ Merged
	  revisions 428787 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428788 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-02 12:20 +0000 [r428761]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_refer.c, /: res_pjsip_refer: Fix issue where native
	  bridge may not occur upon completion of a transfer. There are two
	  methods within res_pjsip_refer for keeping track of the state of
	  a transfer. The first is a framehook which looks at frames
	  passing by to determine the state. The second subscribes to know
	  when the channel joins a bridge. In the case when the channel
	  joins the bridge the framehook is *NOT* removed and this prevents
	  the native RTP bridging technology from getting used. This change
	  gets the channel and if it still exists remove the framehook.
	  Review: https://reviewboard.asterisk.org/r/4218/ ........ Merged
	  revisions 428760 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-02 00:38 +0000 [r428731-428734]  George Joseph <george.joseph@fairview5.com>

	* /, include/asterisk/config.h, main/config.c: config: Create
	  ast_variable_find_in_list() Add const char
	  *ast_variable_find_in_list(const struct ast_variable *list, const
	  char *variable); ast_variable_find() requires a config category
	  to search whereas ast_variable_find_in_list() just needs the root
	  list element which is useful if you don't have a category.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4217/ ........ Merged
	  revisions 428733 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_endpoint_identifier_ip.c,
	  res/res_pjsip/pjsip_cli.c: res_pjsip_endpoint_identifier_ip: Add
	  'show identify(ies)' cli commands While troubleshooting other
	  things I realized there were no pjsip cli commands for identify.
	  This patch adds them. It also also fixes a reference leak when a
	  'show endpoint' displayed identifies and properly sets the return
	  code if load_module can't allocate a cli formatter structure.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4212/ ........ Merged
	  revisions 428725 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-01 17:57 +0000 [r428687]  Matthew Jordan <mjordan@digium.com>

	* channels/chan_skinny.c, res/res_pjsip_mwi.c, tests/test_stasis.c,
	  res/res_pjsip_pubsub.c, res/res_pjsip_refer.c,
	  channels/chan_mgcp.c, main/stasis_cache.c, channels/chan_sip.c,
	  include/asterisk/stasis_internal.h, /, include/asterisk/stasis.h,
	  UPGRADE.txt, configs/samples/stasis.conf.sample,
	  res/parking/parking_applications.c, res/res_xmpp.c,
	  channels/chan_iax2.c, apps/app_queue.c,
	  res/res_stasis_device_state.c, channels/sig_pri.c,
	  include/asterisk/stasis_message_router.h, main/endpoints.c,
	  res/parking/parking_bridge_features.c, main/stasis.c,
	  channels/chan_dahdi.c, main/stasis_message_router.c: main/stasis:
	  Allow subscriptions to use a threadpool for message delivery
	  Prior to this patch, all Stasis subscriptions would receive a
	  dedicated thread for servicing published messages. In contrast,
	  prior to r400178 (see review
	  https://reviewboard.asterisk.org/r/2881/), the subscriptions
	  shared a thread pool. It was discovered during some initial work
	  on Stasis that, for a low subscription count with high message
	  throughput, the threadpool was not as performant as simply having
	  a dedicated thread per subscriber. For situations where a
	  subscriber receives a substantial number of messages and is
	  always present, the model of having a dedicated thread per
	  subscriber makes sense. While we still have plenty of
	  subscriptions that would follow this model, e.g., AMI, CDRs, CEL,
	  etc., there are plenty that also fall into the following two
	  categories: * Large number of subscriptions, specifically those
	  tied to endpoints/peers. * Low number of messages. Some
	  subscriptions exist specifically to coordinate a single message -
	  the subscription is created, a message is published, the delivery
	  is synchronized, and the subscription is destroyed. In both of
	  the latter two cases, creating a dedicated thread is wasteful
	  (and in the case of a large number of peers/endpoints, harmful).
	  In those cases, having shared delivery threads is far more
	  performant. This patch adds the ability of a subscriber to Stasis
	  to choose whether or not their messages are dispatched on a
	  dedicated thread or on a threadpool. The threadpool is
	  configurable through stasis.conf. Review:
	  https://reviewboard.asterisk.org/r/4193 ASTERISK-24533 #close
	  Reported by: xrobau Tested by: xrobau ........ Merged revisions
	  428681 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-12-01 13:41 +0000 [r428632-428655]  Joshua Colp <jcolp@digium.com>

	* /, apps/app_record.c: app_record: Fix bug where using the 'k'
	  option and hanging up would trim 1/4 of a second of the
	  recording. The Record dialplan function trims 1/4 of a second
	  from the end of recordings in case they are terminated because of
	  DTMF. When hanging up, however, you don't want this to happen.
	  This change makes it so on hangup this does not occur.
	  ASTERISK-24530 #close Reported by: Ben Smithurst patches:
	  app_record_v2.diff submitted by Ben Smithurst (license 6529)
	  Review: https://reviewboard.asterisk.org/r/4201/ ........ Merged
	  revisions 428653 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428654 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/channel.c: channel: Extend size of buffer for codecs in
	  "core show channeltype" CLI command. The static buffer for codecs
	  when invoking the "core show channeltype" CLI command did not
	  have enough room for all codecs. This has been extended so it
	  does. ASTERISK-24542 #close Reported by: snuffy patches:
	  channeltype-tech.diff submitted by snuffy (license 5024) Review:
	  https://reviewboard.asterisk.org/r/4204/

2014-11-24 20:37 +0000 [r428602-428604]  Richard Mudgett <rmudgett@digium.com>

	* tests/test_channel_feature_hooks.c: test_channel_feature_hooks.c:
	  Fix unit test for DTMF hooks. Fix the failing
	  /channels/features/test_features_channel_dtmf unit test. DTMF
	  emulation does not work without a stream of packets to prod the
	  emulation code. Review: https://reviewboard.asterisk.org/r/4199/

	* /, main/bridge.c, main/bridge_channel.c: DTMF hooks: Leaving
	  channels need to push any collected digits into the bridge. Any
	  partially collected DTMF digits for a DTMF hook need to be pushed
	  into the bridge when a channel leaves the bridging system as if
	  there were a timeout. Review:
	  https://reviewboard.asterisk.org/r/4199/ ........ Merged
	  revisions 428601 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-21 19:09 +0000 [r428572]  Richard Mudgett <rmudgett@digium.com>

	* main/manager.c, /: manager: Fix could not extend string messages.
	  When shutting down Asterisk that has an active AMI connection,
	  you get several "failed to extend from %d to %d" messages because
	  use of the EVENT_FLAG_SHUTDOWN attempts to add all AMI permission
	  strings to the event. * Created MAX_AUTH_PERM_STRING to use when
	  creating stack based struct ast_str variables used with the
	  authority_to_str() and user_authority_to_str() functions instead
	  of a variety of magic numbers that could be too small. * Added a
	  special check for EVENT_FLAG_SHUTDOWN to authority_to_str() so it
	  will not attempt to add all permission level strings. Review:
	  https://reviewboard.asterisk.org/r/4200/ ........ Merged
	  revisions 428570 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428571 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-21 17:45 +0000 [r428544]  George Joseph <george.joseph@fairview5.com>

	* main/sorcery.c, /, res/res_pjsip_phoneprov_provider.c,
	  tests/test_sorcery.c: sorcery: Make is_object_field_registered
	  handle field names that are regexes. As a result of
	  https://reviewboard.asterisk.org/r/3305, res_sorcery_realtime was
	  tossing database fields that didn't have an exact match to a
	  sorcery registered field. This broke the ability to use regexes
	  as field names which manifested itself as a failure of
	  res_pjsip_phoneprov_provider which uses this capability. It also
	  broke handling of fields that start with '@' in realtime but I
	  don't think anyone noticed. This patch does the following... *
	  Modifies ast_sorcery_fields_register to pre-compile the name
	  regex. * Modifies ast_sorcery_is_object_field_registered to test
	  the regex if it exists instead of doing an exact strcmp. *
	  Modifies res_pjsip_phoneprov_provider with a few tweaks to get it
	  to work with realtime. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4185/ ........ Merged
	  revisions 428543 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-21 02:16 +0000 [r428505]  Matthew Jordan <mjordan@digium.com>

	* main/bridge_basic.c: main/bridge_basic: Fix features regressions
	  introduced by r428165 In r428165, two bugs were introduced: *
	  Prior to entering the features retry loop, the buffer that holds
	  the collected digits is wiped. However, this inadvertently wipes
	  out the first collected digit on the first pass through, which is
	  obtained in ast_stream_and_wait. This caused all of the features
	  tests to fail. * If ast_app_dtget returns a hangup (-1), the loop
	  would retry incorrectly. If we detect a hangup, we have to stop
	  trying the feature. This patch fixes both issues. Review:
	  https://reviewboard.asterisk.org/r/4196/

2014-11-20 16:36 +0000 [r428425]  Mark Michelson <mmichelson@digium.com>

	* main/acl.c, /: Fix error with mixed address family ACLs. Prior to
	  this commit, the address family of the first item in an ACL was
	  used to compare all incoming traffic. This could lead to traffic
	  of other IP address families bypassing ACLs. ASTERISK-24469
	  #close Reported by Matt Jordan Patches: ASTERISK-24469-11.diff
	  uploaded by Matt Jordan (License #6283) AST-2014-012 ........
	  Merged revisions 428402 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 428417 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428422 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-20 16:34 +0000 [r428413]  Kevin Harwell <kharwell@digium.com>

	* funcs/func_db.c, /: AST-2014-018 - func_db: DB Dialplan function
	  permission escalation via AMI. The DB dialplan function when
	  executed from an external protocol (for instance AMI), could
	  result in a privilege escalation. Asterisk now inhibits the DB
	  function from being executed from an external interface if the
	  live_dangerously option is set to no. ASTERISK-24534 Reported by:
	  Gareth Palmer patches: submitted by Gareth Palmer (license 5169)
	  ........ Merged revisions 428331 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 428363 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428409 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-20 16:13 +0000 [r428343]  Jonathan Rose <jrose@digium.com>

	* res/res_pjsip_acl.c, /: PJSIP ACLs: Fix ACLs not loading on
	  startup and apply/acl issues on contact The biggest problem this
	  patch fixes is that ACLs weren't previously being loaded when the
	  res_pjsip_acl module was loaded. Yikes. In addition, the ACL
	  options contact_permit and contact_acl were effectively
	  interpreted as contact_deny and this patch fixes that as well.
	  AST-1418 #close Reported by: Thomas Thompson Review:
	  https://reviewboard.asterisk.org/r/4120/ ASTERISK-24531 #close
	  Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/4171/ ........ Merged
	  revisions 428333 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-20 15:50 +0000 [r428339]  Kevin Harwell <kharwell@digium.com>

	* apps/app_confbridge.c, /: AST-2014-017 - app_confbridge:
	  permission escalation/ class authorization. Confbridge dialplan
	  function permission escalation via AMI and inappropriate class
	  authorization on the ConfbridgeStartRecord action. The CONFBRIDGE
	  dialplan function when executed from an external protocol (for
	  instance AMI), could result in a privilege escalation. Also, the
	  AMI action “ConfbridgeStartRecord” could also be used to execute
	  arbitrary system commands without first checking for system
	  access. Asterisk now inhibits the CONFBRIDGE function from being
	  executed from an external interface if the live_dangerously
	  option is set to no. Also, the “ConfbridgeStartRecord” AMI action
	  is now only allowed to execute under a user with system level
	  access. ASTERISK-24490 Reported by: Gareth Palmer ........ Merged
	  revisions 428332 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428334 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-20 14:55 +0000 [r428302-428305]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_refer.c, /: AST-2014-016: Fix crash when receiving
	  an in-dialog INVITE with Replaces in res_pjsip_refer. The
	  implementation of INVITE with Replaces in res_pjsip_refer did not
	  expect them to occur in-dialog. As a result it would incorrectly
	  attempt to hang up a channel it thought was under its control. In
	  reality the channel would be under the control of another thread.
	  When the other thread accessed the channel it would be accessing
	  freed memory and could crash. This change makes res_pjsip_refer
	  not act on an in-dialog INVITE with Replaces. ASTERISK-24528
	  #close Reported by: Joshua Colp ........ Merged revisions 428304
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_pjsip.c, /: AST-2014-015: Fix race condition in
	  chan_pjsip when sending responses after a CANCEL has been
	  received. Due to the serialized architecture of chan_pjsip there
	  exists a race condition where a CANCEL may be received and
	  processed before responses (such as 180 Ringing, 183 Session
	  Progress, and 200 OK) are sent. Since the session is in an
	  unexpected state PJSIP will assert when this is attempted. This
	  change makes it so that these responses are not sent on
	  disconnected sessions. ASTERISK-24471 #close Reported by: yaron
	  nahum ........ Merged revisions 428301 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-19 19:31 +0000 [r428273]  Corey Farrell <git@cfware.com>

	* include/asterisk/stringfields.h, /: stringfields: Fix bug in
	  ast_string_fields_copy. ast_string_fields_copy relies on the fact
	  that __ast_string_field_release_active never previously zeroed
	  pool->used, so keeping the existing pointer was "ok". Now that
	  existing pools can be reset to 'empty', it is important to set
	  each field to __ast_string_field_empty after releasing the
	  memory. ASTERISK-24535 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4186/ ........ Merged
	  revisions 428272 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-19 17:13 +0000 [r428246]  Richard Mudgett <rmudgett@digium.com>

	* res/res_calendar.c, main/manager.c, /, channels/chan_sip.c,
	  channels/sip/security_events.c: ast_str: Fix improper member
	  access to struct ast_str members. Accessing members of struct
	  ast_str outside of the string manipulation API routines is
	  invalid since struct ast_str is supposed to be treated as opaque.
	  Review: https://reviewboard.asterisk.org/r/4194/ ........ Merged
	  revisions 428244 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428245 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-19 12:40 +0000 [r428196-428222]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.c, include/asterisk/res_pjsip.h,
	  include/asterisk/res_pjsip_session.h, res/res_pjsip_sdp_rtp.c,
	  res/res_pjsip/pjsip_configuration.c,
	  configs/samples/pjsip.conf.sample,
	  contrib/ast-db-manage/config/versions/eb88a14f2a_add_media_encryption_optimistic_to_pjsip.py
	  (added), CHANGES, res/res_pjsip.c: res_pjsip_sdp_rtp: Add support
	  for optimistic SRTP. Optimistic SRTP is the ability to enable
	  SRTP but not have it be a fatal requirement. If SRTP can be used
	  it will be, if not it won't be. This gives you a better chance of
	  using it without having your sessions fail when it can't be.
	  Encrypt all the things! Review:
	  https://reviewboard.asterisk.org/r/3992/

	* res/res_pjsip_refer.c, /: res_pjsip_refer: Ensure Refer-To is
	  NULL terminated and parse it as a URI. There is no guarantee that
	  when we get a Refer-To that it will be NULL terminated. As the
	  URI parsing function requires it to be we now NULL terminate it.
	  Additionally parsing the Refer-To as a 'To' header is needless
	  and it can simply be done as a URI. This also fixes a problem
	  where certain Refer-To headers would not be parsed as a 'To'
	  header causing the REFER to fail. ASTERISK-24508 #close Reported
	  by: Beppo Mazzucato Review:
	  https://reviewboard.asterisk.org/r/4187/ ........ Merged
	  revisions 428195 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-18 18:54 +0000 [r428169]  Richard Mudgett <rmudgett@digium.com>

	* /, res/parking/parking_tests.c: parking_tests.c: Add missing
	  newline on a unit test message. ........ Merged revisions 428168
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-17 16:51 +0000 [r428145]  Mark Michelson <mmichelson@digium.com>

	* CHANGES, main/features_config.c,
	  configs/samples/features.conf.sample,
	  include/asterisk/features_config.h, main/bridge_basic.c: Allow
	  for transferer to retry when dialing an invalid extension. This
	  allows for a configurable number of attempts for a transferer to
	  dial an extension to transfer the call to. For Asterisk 13, the
	  default values are such that upgrading between versions will not
	  cause a behaivour change. For trunk, though, the defaults will be
	  changed to be more user-friendly. Review:
	  https://reviewboard.asterisk.org/r/4167

2014-11-17 16:00 +0000 [r428119]  Corey Farrell <git@cfware.com>

	* /, channels/chan_sip.c: chan_sip: Fix theoretical leak of
	  p->refer. If transmit_refer is called when p->refer is already
	  allocated, it leaks the previous allocation. Updated code to
	  always free previous allocation during a new allocation. Also
	  instead of checking if we have a previous allocation, always
	  create a clean record. ASTERISK-15242 #close Reported by: David
	  Woolley Review: https://reviewboard.asterisk.org/r/4160/ ........
	  Merged revisions 428117 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428118 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-17 15:27 +0000 [r428079-428115]  Matthew Jordan <mjordan@digium.com>

	* /, apps/confbridge/conf_state_multi_marked.c:
	  apps/app_confbridge: Ensure 'normal' users hear message when last
	  marked leaves When r428077 was made for ASTERISK-24522, it failed
	  to take into account users who are neither wait_marked nor
	  end_marked. These users are *also* supposed to hear the 'leader
	  has left the conference' message. Granted, this behaviour is a
	  bit odd; however, that is how it used to work... and behaviour
	  changes are not good. This patch ensures that if there are any
	  'normal' users present when the last marked user leaves the
	  conference, the message will still be played to them. Note that
	  this regression was caught by the Asterisk Test Suite's
	  confbridge_nominal test, which has a quirky combination of users.
	  ........ Merged revisions 428113 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428114 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/confbridge/conf_state_multi_marked.c: app_confbridge:
	  Don't play leader leaving prompt if no one will hear it Consider
	  the following: - A marked user in a conference - One or more
	  end_marked only users in the conference When the marked users
	  leaves, we will be in the conf_state_multi_marked state. This
	  currently will traverse the users, kicking out any who have the
	  end_marked flags. When they are kicked, a full ast_bridge_remove
	  is immediately called on the channels. At this time, we also
	  unilaterally set the need_prompt flag. When the need_prompt flag
	  is set, we then playback a sound to the bridge informing everyone
	  that the leader has left; however, no one is left in the bridge.
	  This causes some odd behaviour for the end_marked users - they
	  are stuck waiting for the bridge to be unlocked. This results in
	  them waiting for 5 or 6 seconds of dead air before hearing that
	  they've been kicked. Unfortunately, we do have to keep the bridge
	  locked while we're playing back the 'leader-has-left' prompt. If
	  there are any wait_marked users in the conference, this behaviour
	  can't be easily changed - but we do make the case of the
	  end_marked users better with this patch. Review:
	  https://reviewboard.asterisk.org/r/4184/ ASTERISK-24522 #close
	  Reported by: Matt Jordan ........ Merged revisions 428077 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 428078 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-16 21:12 +0000 [r427979-428052]  Joshua Colp <jcolp@digium.com>

	* channels/chan_pjsip.c, /: chan_pjsip: Remove AOR check when
	  dialing and one is specified. The AOR value may contain the name
	  of an AOR or a full SIP URI. Checking if the AOR exists can't be
	  done as a result of this. ........ Merged revisions 428051 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_pjsip.c: chan_pjsip: Add additional log message
	  when an AOR is specified when dialing and it does not exist.
	  ASTERISK-24499 #close Reported by: Rusty Newton ........ Merged
	  revisions 428007 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_motif.c, channels/chan_pjsip.c, /: chan_motif /
	  chan_pjsip: Fix incorrect "No such module" messages when
	  reloading. For chan_motif the direct return value of the
	  underlying config options framework was passed back. This can
	  relay various states which the module loader would not interpet
	  as success. It has been changed so only on errors will it report
	  back an error. For chan_pjsip the code implemented a dummy reload
	  function which always returned an error. This has been removed as
	  all configuration is held within res_pjsip instead.
	  ASTERISK-23651 #close Reported by: Rusty Newton ........ Merged
	  revisions 427981 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/pjsip_configuration.c: res_pjsip: Enforce
	  requirements for session timer minimum expiration period and
	  normal expiration period. This change enforces the requirements
	  in PJSIP for session timer configuration. The minimum expiration
	  period must be 90 seconds or higher and the normal expiration
	  period can not be lower than the minimum expiration period. If
	  either of these were done the code would assert at session setup
	  time. ASTERISK-24336 #close Reported by: Leon Rowland ........
	  Merged revisions 427978 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-15 16:56 +0000 [r427927-427954]  Matthew Jordan <mjordan@digium.com>

	* cel/cel_odbc.c, /: cel/cel_odbc: Provide microsecond precision in
	  'eventtime' column when possible This patch adds microsecond
	  precision when inserting a CEL record into a table with an
	  "eventtime" column of type timestamp, instead of second
	  precision. The documentation (configs/cel_odbc.conf.sample) was
	  already saying that the eventtime column included microseconds
	  precision, but that was not the case. Also, without this patch,
	  if you had a table with an "eventtime" column of type varchar,
	  you had millisecond precision. With this patch, you also get
	  microsecond precision in this case. Review:
	  https://reviewboard.asterisk.org/r/3980 ASTERISK-24283 #close
	  Reported by: Etienne Lessard patches:
	  cel_odbc_time_precision.patch uploaded by Etienne Lessard
	  (License 6394) ........ Merged revisions 427952 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427953 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* tests/test_cel.c: tests/test_cel: Unlock bridge on off nominal
	  paths If the test fails due to memory allocation errors, we may
	  as well attempt to unlock the bridge on the way out.

2014-11-14 17:45 +0000 [r427902]  Jonathan Rose <jrose@digium.com>

	* configs/samples/cdr.conf.sample, main/cdr.c, /: Documentation:
	  Revise explanation of cdr.conf option 'Unanswered' ASTERISK-24279
	  #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/4109/ ........ Merged
	  revisions 427901 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-14 15:51 +0000 [r427876]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, main/stun.c: stun: correct attribute string padding to match
	  rfc When sending the USERNAME attribute in an RTP STUN response,
	  the implementation in append_attr_string passed the actual
	  length, instead of padding it up to a multiple of four bytes as
	  required by the RFC 3489. This change adds separate variables for
	  the string and padded attributed lengths, and performs padding
	  correctly. Reported by: Thomas Arimont Review:
	  https://reviewboard.asterisk.org/r/4139/ ........ Merged
	  revisions 427874 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427875 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-14 15:24 +0000 [r427870]  Mark Michelson <mmichelson@digium.com>

	* main/bridge.c, main/bridge_basic.c,
	  include/asterisk/stasis_bridges.h, tests/test_cel.c,
	  apps/app_queue.c, main/cel.c, main/stasis_bridges.c, /,
	  res/stasis/app.c: Fix race condition that could result in ARI
	  transfer messages not being sent. From reviewboard: "During blind
	  transfer testing, it was noticed that tests were failing
	  occasionally because the ARI blind transfer event was not being
	  sent. After investigating, I detected a race condition in the
	  blind transfer code. When blind transferring a single channel,
	  the actual transfer operation (i.e. removing the transferee from
	  the bridge and directing them to the proper dialplan location) is
	  queued onto the transferee bridge channel. After queuing the
	  transfer operation, the blind transfer Stasis message is
	  published. At the time of publication, snapshots of the channels
	  and bridge involved are created. The ARI subscriber to the blind
	  transfer Stasis message then attempts to determine if the bridge
	  or any of the involved channels are subscribed to by ARI
	  applications. If so, then the blind transfer message is sent to
	  the applications. The way that the ARI blind transfer message
	  handler works is to first see if the transferer channel is
	  subscribed to. If not, then iterate over all the channel IDs in
	  the bridge snapshot and determine if any of those are subscribed
	  to. In the test we were running, the lone transferee channel was
	  subscribed to, so an ARI event should have been sent to our
	  application. Occasionally, though, the bridge snapshot did not
	  have any channels IDs on it at all. Why? The problem is that
	  since the blind transfer operation is handled by a separate
	  thread, it is possible that the transfer will have completed and
	  the channels removed from the bridge before we publish the blind
	  transfer Stasis message. Since the blind transfer has completed,
	  the bridge on which the transfer occurred no longer has any
	  channels on it, so the resulting bridge snapshot has no channels
	  on it. Through investigation of the code, I found that attended
	  transfers can have this issue too for the case where a transferee
	  is transferred to an application." The fix employed here is to
	  decouple the creation of snapshots for the transfer messages from
	  the publication of the transfer messages. This way, snapshots can
	  be created to reflect what they are at the time of the transfer
	  operation. Review: https://reviewboard.asterisk.org/r/4135
	  ........ Merged revisions 427848 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-14 14:56 +0000 [r427846]  Joshua Colp <jcolp@digium.com>

	* /, apps/confbridge/conf_state_multi_marked.c: app_confbridge:
	  Play "leader has left" sound even when musiconhold is enabled.
	  Currently if the leader of a conference bridge leaves any
	  participant that has musiconhold enabled will not hear the
	  "leader has left" sound. This is because musiconhold is started
	  and THEN the sound is played. This change makes it so that the
	  sound is played and THEN musiconhold is started. This provides a
	  better experience for users as they may not have known previously
	  why they went back to musiconhold. Review:
	  https://reviewboard.asterisk.org/r/4177/ ........ Merged
	  revisions 427844 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427845 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-14 14:24 +0000 [r427841]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip.c, res/res_pjsip_pubsub.c, res/res_pjsip_session.c,
	  include/asterisk/res_pjsip.h: Fix race condition where duplicated
	  requests may be handled by multiple threads. This is the Asterisk
	  13 version of the patch. The main difference is in the pubsub
	  code since it was completely refactored between Asterisk 12 and
	  13. Review: https://reviewboard.asterisk.org/r/4175

2014-11-13 22:03 +0000 [r427815]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_pjsip_outbound_registration.c: res_pjsip_exten_state:
	  PJSIPShowSubscriptionsInbound causes crash When using a
	  non-default sorcery wizard (in this instance realtime) for
	  outbound registrations and after adding in an appropriate call to
	  ast_sorcery_apply_config() (since it is missing) Asterisk will
	  crash after a stack overflow occurs due to the code infinitely
	  recursing. The fix entails removing the outbound registration
	  state dependency from the outbound registration sorcery object
	  and instead keeping an in memory container that can be used to
	  lookup the state when needed. ASTERISK-24514 Reported by: Mark
	  Michelson Review: https://reviewboard.asterisk.org/r/4164/
	  ........ Merged revisions 427814 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-13 15:44 +0000 [r427789]  Kinsey Moore <kmoore@digium.com>

	* include/asterisk/stasis.h, include/asterisk/stasis_app.h,
	  res/stasis/app.h, res/res_stasis.c, /, res/stasis/app.c,
	  res/stasis/stasis_bridge.c: Stasis: Fix StasisEnd message
	  ordering This change corrects message ordering in cases where a
	  channel-related message can be received after a Stasis/ARI
	  application has received the StasisEnd message. The StasisEnd
	  message was being passed to applications directly without waiting
	  for the channel topic to empty. As a result of this fix, other
	  bugs were also identified and fixed: * StasisStart messages were
	  also being sent directly to apps and are now routed through the
	  stasis message bus properly * Masquerade monitor datastores were
	  being removed at the incorrect time in some cases and were
	  causing StasisEnd messages to not be sent * General refactoring
	  where necessary for the above * Unsubscription on StasisEnd
	  timing changes to prevent additional messages from following the
	  StasisEnd when they shouldn't A channel sanitization function
	  pointer was added to reduce processing and AO2 lookups. Review:
	  https://reviewboard.asterisk.org/r/4163/ ASTERISK-24501 #close
	  Reported by: Matt Jordan ........ Merged revisions 427788 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-13 00:00 +0000 [r427763]  Matthew Jordan <mjordan@digium.com>

	* main/rtp_engine.c, /: main/rtp_engine: Fix crash when processing
	  more than one RTCP report info block Asterisk - in
	  res_rtp_asterisk - only understands a single RTCP report info
	  block. When the RTCP information was refactored in the RTP Engine
	  to be pushed over the Stasis message bus, I put in the hooks into
	  the engine to handle multiple RTCP report info blocks, in the
	  hope that a future RTP implementation would be able to provide
	  that data. Unfortunately, res_rtp_asterisk has a tendency to
	  "lie": (1) It will send RTCP reports with a
	  reception_report_count greater than 1 (which is pulled directly
	  from the RTCP packet itself, so that part is correct) (2) It will
	  only provide a single report block When the rtp_engine goes to
	  convert this to a JSON blob, hilarity ensues as it looks for a
	  report block that doesn't exist. This patch updates the
	  rtp_engine to be a bit more skeptical about what it is presented
	  with. While this could also be fixed in res_rtp_asterisk, this
	  patch prefers to fix it in the engine for two reasons: (1) The
	  engine is designed to work with multiple RTP implementation, and
	  hence having it be more robust is a good thing (tm) (2)
	  res_rtp_asterisk's handling of RTCP information is "fun". It
	  should report the correct reception_report_count; ideally it
	  should also be giving us all of the blocks - but it is
	  *definitely* not designed to do that. Going down that road is a
	  non-trivial effort. Review:
	  https://reviewboard.asterisk.org/r/4158/ ASTERISK-24489 #close
	  Reported by: Gregory Malsack Tested by: Gregory Malsack
	  ASTERISK-24498 #close Reported by: Beppo Mazzucato Tested by:
	  Beppo Maazucato ........ Merged revisions 427762 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-12 20:39 +0000 [r427737]  Corey Farrell <git@cfware.com>

	* /, main/features.c: Fix leak in AMI Action Bridge Add missing
	  reference cleanup for newly created bridge. ASTERISK-24281
	  Reported by: Stefan Engström Review:
	  https://reviewboard.asterisk.org/r/4154/ ........ Merged
	  revisions 427736 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-12 16:12 +0000 [r427711]  Joshua Colp <jcolp@digium.com>

	* main/pbx.c, /: pbx: Fix off-nominal case where a freed extension
	  may still be used. If during the operation of adding an extension
	  a priority is added but fails it is possible for the extension to
	  be freed but still exist in the PBX core. If this occurs
	  subsequent lookups may try to access the extension and end up in
	  freed memory. This change removes the extension from the PBX core
	  when the priority addition fails and then frees the extension.
	  ASTERISK-24444 #close Reported by: Leandro Dardini Review:
	  https://reviewboard.asterisk.org/r/4162/ ........ Merged
	  revisions 427709 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427710 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-12 13:46 +0000 [r427684]  Corey Farrell <git@cfware.com>

	* codecs/ilbc, /, tests, codecs/speex, apps/confbridge,
	  Makefile.rules: Fix compiler error when using ./configure
	  --enable-dev-mode --enable-coverage When DONT_OPTIMIZE is enabled
	  with dev-mode, it causes a shadow compilation to be done with
	  output to /dev/null. This can cause errors with coverage when GCC
	  attempts to write to /dev/null.gcno. This change disables
	  coverage for the shadow compilation. ASTERISK-24502 #close
	  Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4151/ ........ Merged
	  revisions 427682 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427683 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-09 08:00 +0000 [r427643]  Corey Farrell <git@cfware.com>

	* main/manager.c, /: manager: Fix HTTP connection reference leaks.
	  Fix reference leak that happens if (session && !blastaway).
	  ASTERISK-24505 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4153/ ........ Merged
	  revisions 427641 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427642 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-09 00:38 +0000 [r427583-427615]  Matthew Jordan <mjordan@digium.com>

	* channels/chan_mgcp.c, /: channels/chan_mgcp: Fix regression which
	  causes gateways to be skipped In r227276, a while loop was turned
	  into a for loop. Unfortunately, a portion of the while loop was
	  left in the code such that, when a static gateway is encountered
	  in the list of MGCP gateways, the next gateway would be skipped.
	  At best, we would simply flip past a gateway; at worst, this
	  could lead to a crash. ASTERISK-24500 #close Reported by: Xavier
	  Hienne patches: chan_mgcp.patch uploaded by Xavier Hienne
	  (License 6657) ........ Merged revisions 427613 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427614 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, addons/chan_mobile.c: addons/chan_mobile: Increase buffer size
	  of UCS2 encoded SMS messages When UCS2 character encoding is
	  used, one symbol in national language can be expanded to 4 bytes.
	  The current buffer used for receiving message in do_monitor_phone
	  is 256 bytes, which is not large enough for incoming messages.
	  For example: * AT+CMGR phone response prefix '+CMGR: "REC
	  UNREAD","+7**********",,"14/10/29,13:31:39+12"\r\n' - 60 bytes *
	  SMS body with UCS2 encoding (max) - 280 bytes * AT+CMGR phone
	  response suffix '\r\n\r\nOK\r\n' - 8 bytes * Terminating null
	  character - 1 byte This results in a needed buffer size of 349
	  bytes. Hence, this patch opts for a 350 byte buffer.
	  ASTERISK-24468 #close Reported by: Dmitriy Bubnov patches:
	  chan_mobile-1_8.diff uploaded by Dmitriy Bubnov (License 6651)
	  chan_mobile-trunk.diff uploaded by Dmitry Bubnov (License 6651)
	  ........ Merged revisions 427607 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427610 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_voicemail.c: app_voicemail: Fix enhancement that allowed
	  multiple recipients in To: header An issue existed in r420577,
	  which added multiple recipients to voicemail emails. The patch,
	  when looking at the intended recipients, looked ahead for the '|'
	  character inside a while loop which already had pulled out the
	  appropriate field parsing on the '|' character. This would cause
	  it to skip the recipients. This patch fixes it such that it
	  relies completely on the while loop to parse through the e-mail
	  fields. Note that the original author of the patch looked at this
	  fix and approved it. ASTERISK-24250 #close Reported by: abelbeck
	  patches: voicemail-420577-to-comma-fix.diff uploaded by abelbeck
	  (License 5903)

	* /, bridges/bridge_native_rtp.c: bridge_native_rtp: Fix T.38
	  issues with remote bridges After r425242 the
	  fax/sip/directmedia_reinvite_t38 test started failing due to the
	  surviving channel not being re-INVITEd back from T.38 to audio.
	  This patch fixes that bug - a deeper explanation of what happened
	  follows. When two RTP channels are in a native bridge, the
	  bridging layer will investigate each via the get_rtp_info glue
	  callback. This callback returns the native bridge preference of
	  the channel *at that moment in time* (that part is key). At
	  different points during the bridging, the native bridging layer
	  will inform the RTP capable channels of the status of the bridge
	  via the update_peer glue callback. In a T.38 scenario with audio
	  direct media, the sequence of events will often look like the
	  following: * SIP/A and SIP/B both have audio and enter a native
	  bridge. * Asterisk re-INVITEs audio between SIP/A and SIP/B
	  directly (via an update_peer callback). * SIP/A sends a re-INVITE
	  to T.38, which causes Asterisk to send a re-INVITE to T.38 to
	  SIP/B. Assuming everyone 200 OKs the process, the UDPTL stack
	  receives UDPTL packets in Asterisk from both endpoints. From the
	  perspective of the channels, we are now in a local bridge for
	  T.38, even though we are technically still in a remote bridge in
	  bridge_native_rtp. (YAY!) * When one side hangs up,
	  bridge_native_rtp is told to stop bridging. It then re-evaluates
	  the channels and asks them how they are bridged - and since T.38
	  is enabled, they reply with a Local bridge (which is correct),
	  but is wrong because the audio portion is still technically in a
	  remote bridge. * Asterisk releases the surviving channel, whose
	  audio is *not* re-INVITED back to Asterisk as bridge_native_rtp
	  incorrectly assumes that it was in a local bridge. Ironically,
	  prior to r425242, this used to work mostly due to a fluke in the
	  bridging layer. The purpose of the get_rtp_info callback
	  shouldn't be modified: it should tell the bridging layer what
	  kind of bridge the channel prefers at that moment in time. If you
	  have T.38 enabled, that *must* be a local bridge, as the UDPTPL
	  stack must be in the media path. As such, this patch does not
	  modify that part of the code. However, we have to tell the
	  channels to re-evaluate themselves when they come out of a native
	  bridge, since we can no longer trust the get_rtp_info callbacks
	  when the native bridge is being stopped. Something else may have
	  changed in the channels, and they may now be lying to us. As
	  such, this patch makes it so that we unilaterally tell the
	  channels that they are no longer bridged via the update_peer
	  callback. This is actually what the channels expect anyway: code
	  in both chan_sip and chan_pjsip's callbacks look at the T.38
	  state and - if they were in T.38 - send a re-INVITE to get the
	  audio back to Asterisk. Review:
	  https://reviewboard.asterisk.org/r/4157/ ........ Merged
	  revisions 427582 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-08 18:17 +0000 [r427557]  Corey Farrell <git@cfware.com>

	* /, channels/chan_console.c: chan_console: Fix reference leaks to
	  pvt. Fix a bunch of calls to get_active_pvt where the reference
	  is never released. ASTERISK-24504 #close Reported by: Corey
	  Farrell Review: https://reviewboard.asterisk.org/r/4152/ ........
	  Merged revisions 427554 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427555 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-06 19:22 +0000 [r427494-427512]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_agent_pool.c, /: app_agent_pool: Made agent alert
	  interruptable by DTMF. Made agent able to interrupt the alerting
	  beep playback with DTMF. Any digit can interrupt if the call does
	  not need to be acknowledged. Only the first digit of the
	  acknowledgement can interrupt if the call needs to be
	  acknowledged. The agent interrupting the alerting playback builds
	  on the ASTERISK-24447 patch because it knows what digit
	  interrupted the playback and needs to be able to pass that digit
	  to the DTMF hook digit collection code. ASTERISK-24257 #close
	  Reported by: Steve Pitts Review:
	  https://reviewboard.asterisk.org/r/4123/ ........ Merged
	  revisions 427508 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, include/asterisk/bridge_channel.h, main/bridge_channel.c:
	  Bridge DTMF hooks: Made audio pass from the bridge while waiting
	  for more matching digits. * Made collecting DTMF digits for the
	  DTMF feature hooks pass frames from the bridge. * Made collecting
	  DTMF digits possible by other bridge hooks if there is a need.
	  ASTERISK-24447 #close Reported by: Richard Mudgett Review:
	  https://reviewboard.asterisk.org/r/4123/ ........ Merged
	  revisions 427493 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-06 18:20 +0000 [r427491]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/pjsip_distributor.c: res_pjsip: Ensure in-dialog
	  responses have an endpoint associated. When handling incoming
	  messages we determine if it is associated with a dialog. If so we
	  use that to determine what serializer and endpoint to use for the
	  message. Previously this would pass the endpoint to the endpoint
	  lookup module to actually place the endpoint completely on the
	  message. For in-dialog responses, however, this did not occur as
	  dialog processing took over and the endpoint lookup did not
	  occur. This change just places the endpoint in the expected spot
	  immediately instead of relying on the endpoint lookup module.
	  In-dialog responses thus have the expected endpoint. AST-1459
	  #close Review: https://reviewboard.asterisk.org/r/4146/ ........
	  Merged revisions 427490 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-06 12:13 +0000 [r427384-427466]  Corey Farrell <git@cfware.com>

	* main/file.c, /: main/file.c: fix possible extra ast_module_unref
	  to format modules. fn_wrapper only adds a reference to the
	  format's module if the file was able to be opened. If not this
	  causes an unmatched ast_module_unref in filestream_destructor.
	  Move ast_module_ref to get_stream. ASTERISK-24492 #close Reported
	  by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4149/ ........ Merged
	  revisions 427464 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427465 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_hep.c, /: res_hep: fix major leak that occurs when config
	  is missing or enabled=no. Add missing unreference in
	  hepv3_send_packet. ASTERISK-24491 #close Reported by: Zane Conkle
	  Tested by: Zane Conkle Review:
	  https://reviewboard.asterisk.org/r/4150/ ........ Merged
	  revisions 427400 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/utils.c, include/asterisk/stringfields.h: Fix unintential
	  memory retention in stringfields. * Fix missing / unreachable
	  calls to __ast_string_field_release_active. * Reset pool->used to
	  zero when the current pool->active reaches zero. ASTERISK-24307
	  #close Reported by: Etienne Lessard Tested by: ibercom, Etienne
	  Lessard Review: https://reviewboard.asterisk.org/r/4114/ ........
	  Merged revisions 427380 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 427381 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427382 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-06 02:37 +0000 [r427356]  George Joseph <george.joseph@fairview5.com>

	* tests/test_strings.c, /: test_strings: Remove string tests that
	  exercise asserts. Since unit tests are run with DO_CRASH, those
	  tests were causing the test to fail. Tested-by: George Joseph
	  ........ Merged revisions 427354 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427355 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-05 19:52 +0000 [r427334]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip/config_system.c, configs/samples/pjsip.conf.sample,
	  res/res_pjsip.c: Make the disable_tcp_switch PJSIP system object
	  enabled by default. Testing has shown repeatedly that PJSIP's
	  default behavior of switching automatically to TCP for large
	  messages can cause issues. The most common issues are that
	  devices that we are communicating with do not handle the switch
	  to TCP gracefully, thus causing situations such as broken calls
	  or broken subscriptions. Now, in order to have this behavior
	  happen, you must opt into it. The sample file has been updated to
	  warn that enabling the TCP switch behavior may cause issues for
	  you, so use at your own risk.

2014-11-05 12:18 +0000 [r427303]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_multihomed.c, /: res_pjsip_multihomed: Add logging
	  during startup to aid debugging if local DNS is misbehaving. This
	  change adds a bit of logging so if the local DNS is misbehaving
	  it is easier to track down what is going on and where Asterisk
	  may be hanging. ASTERISK-24438 #close Reported by: Melissa
	  Shepherd Review: https://reviewboard.asterisk.org/r/4148/
	  ........ Merged revisions 427300 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-05 00:15 +0000 [r427228-427276]  George Joseph <george.joseph@fairview5.com>

	* pbx/pbx_config.c, main/config.c, tests/test_strings.c,
	  include/asterisk/utils.h, /, main/utils.c: config: Make
	  text_file_save and 'dialplan save' escape semicolons in values.
	  When a config file is read, an unescaped semicolon signals
	  comments which are stripped from the value before it's stored.
	  Escaped semicolons are then unescaped and become part of the
	  value. Both of these behaviors are normal and expected. When the
	  config is serialized either by 'dialplan save' or
	  AMI/UpdateConfig however, the now unescaped semicolons are
	  written as-is. If you actually reload the file just saved, the
	  unescaped semicolons are now treated as start of comments. Since
	  true comments are stripped on read, any semicolons in
	  ast_variable.value must have been escaped originally. This patch
	  re-escapes semicolons in ast_variable.values before they're
	  written to file either by 'dialplan save' or
	  config/ast_config_text_file_save which is called by
	  AMI/UpdateConfig. I also fixed a few pre-existing formatting
	  issues nearby in pbx_config.c Tested-by: George Joseph
	  ASTERISK-20127 #close Review:
	  https://reviewboard.asterisk.org/r/4132/ ........ Merged
	  revisions 427275 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/config.c, /: config: BUG: Restore ability for non-templ to
	  be used as base objs in config. My recent refactor of config.c
	  accidentally removed the capability for an object to inherit from
	  a non-template object. This patch restores the capability to
	  inherit from both template and non-template objects. Tested-by:
	  George Joseph Reported-by: Scott Griepentrog ASTERISK-24487
	  #close Review: https://reviewboard.asterisk.org/r/4147/ ........
	  Merged revisions 427227 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-04 19:44 +0000 [r427181-427204]  Corey Farrell <git@cfware.com>

	* funcs/func_talkdetect.c, /: func_talkdetect: Fix stasis message
	  leak in audiohook callback. ASTERISK-24482 #close Reported by:
	  Corey Farrell Review: https://reviewboard.asterisk.org/r/4142/
	  ........ Merged revisions 427203 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_http_websocket.c: res_http_websockets: Fix extra unref
	  of module In websocket_add_protocol_internal is used to add the
	  "echo" protocol, but ast_websocket_remove_protocol is used to
	  remove it. This causes an extra call to ast_module_unref.
	  ASTERISK-24480 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4140/ ........ Merged
	  revisions 427200 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/app.c: Fix crash caused by merge error on review 4138 When
	  merging from 12 to 13 there were conflicts, I mistakenly had the
	  loop run ast_closestream(others[0]) when it should be
	  ast_closestream(others[x]).

2014-11-03 18:15 +0000 [r427130]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_pjsip/config_system.c, UPGRADE.txt,
	  configs/samples/pjsip.conf.sample, res/res_pjsip.c: res_pjsip:
	  Add disable_tcp_switch option. When a packet exceeds the MTU,
	  pjproject will switch from UDP to TCP. In some circumstances (on
	  some networks), this can cause some issues with messages not
	  getting sent to the correct destination - and can also cause
	  connections to get dropped due to quirks in pjproject deciding to
	  terminate TCP connections with no messages. While fixing the
	  routing/messaging issues is important, having a configuration
	  option in Asterisk that tells pjproject to not switch over to TCP
	  would be useful. That way, if some glitch is discovered on some
	  other network/site, we can at least disable the behavior until a
	  fix is put into place. AFS-197 #close Review:
	  https://reviewboard.asterisk.org/r/4137/ ........ Merged
	  revisions 427129 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-03 02:34 +0000 [r427021-427089]  Corey Farrell <git@cfware.com>

	* apps/app_voicemail.c, /: Fix compile error caused by review 4138
	  There is no procedure called ast_closeframe, fix code to use
	  ast_closestream. Reported By: Matt Jordan ........ Merged
	  revisions 427087 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427088 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/app.c, apps/app_voicemail.c, /: Fix ast_writestream leaks
	  Fix cleanup in __ast_play_and_record where others[x] may be
	  leaked. This was caught where prepend != NULL && outmsg != NULL,
	  once realfile[x] == NULL any further others[x] would be leaked. A
	  cleanup block was also added for prepend != NULL && outmsg ==
	  NULL. 11+: Fix leak of ast_writestream recording_fs in
	  app_voicemail:leave_voicemail. ASTERISK-24476 #close Reported by:
	  Corey Farrell Review: https://reviewboard.asterisk.org/r/4138/
	  ........ Merged revisions 427023 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 427024 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427025 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/abstract_jb.c: func_jitterbuffer: fix frame leaks. Fix
	  code paths where it is possible for frames to leak. Fix
	  uninitialized variable in jb_get_fixed and jb_get_adaptive.
	  ASTERISK-22409 #related Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4128/ ........ Merged
	  revisions 427019 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 427020 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-11-02 01:01 +0000 [r426996]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_stasis.c: res/res_stasis: Fix crash on module unload
	  while performing operation When the res_stasis module is
	  unloaded, it will dispose of the apps_registry container. This is
	  a problem if an ARI operation is in flight that attempts to use
	  the registry, as the shutdown occurs in a separate thread. This
	  patch adds some sanity checks to the various routines that access
	  the registry which cause the operations to fail if the
	  apps_registry does not exist. Crash caught by the Asterisk Test
	  Suite. ........ Merged revisions 426995 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-31 16:50 +0000 [r426934]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* Makefile, /: install init.d files on GNU/kFreeBSD Review:
	  https://reviewboard.asterisk.org/r/4118/ ........ Merged
	  revisions 426926 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 426927 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426933 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-31 16:40 +0000 [r426924-426930]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, configs/samples/pjsip.conf.sample, res/res_pjsip.c: pjsip:
	  clarify tls cert and key file usage A question arose as to
	  whether a .pem file could be provided in place of the .crt and
	  .key files in a PJSIP TLS configuration. I tested this and
	  discovered that although a cert will be read from the pem file, a
	  key will not, and thus the priv_key_file entry is still required.
	  This update to the fine documentation clarifies the option usage.
	  AST-1448 #close Review: https://reviewboard.asterisk.org/r/4129/
	  Reported by: John Bigelow ........ Merged revisions 426928 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_outbound_registration.c: pjsip: Handle outbound
	  unregister correctly This updates the status of the outbound
	  registration to reflect when it has been unregistered. Since the
	  registration is unregistered but is not stopped, the registration
	  schedule remains active as before. The patch also updates the
	  documentation of both the AMI and CLI commands. ASTERISK-24411
	  #close Review: https://reviewboard.asterisk.org/r/4119/ Reported
	  by: John Bigelow patches: unregister-patch1.txt uploaded by John
	  Bigelow (License 5091) ........ Merged revisions 426923 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-31 03:26 +0000 [r426865]  Matthew Jordan <mjordan@digium.com>

	* /, channels/sip/reqresp_parser.c,
	  channels/sip/include/reqresp_parser.h:
	  channels/sip/reqresp_parser: Fix unit tests for r426594 When
	  r426594 was made, it did not take into account a unit test that
	  verified that the function properly populated the unsupported
	  buffer. The function would previously memset the buffer if it
	  detected it had any contents; since this function can now be
	  called iteratively on successive headers, the unit tests would
	  now fail. This patch updates the unit tests to reset the buffer
	  themselves between successive calls, and updates the
	  documentation of the function to note that this is now required.
	  ........ Merged revisions 426858 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 426860 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426863 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-31 03:08 +0000 [r426803-426833]  Corey Farrell <git@cfware.com>

	* contrib/Makefile (added), Makefile, /: REF_DEBUG: Install
	  refcounter.py to $(ASTDATADIR)/scripts This change ensures
	  refcounter.py is installed to a place where it can be found by
	  the Asterisk testsuite if REF_DEBUG is enabled. ASTERISK-24432
	  #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4094/ ........ Merged
	  revisions 426830 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 426831 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426832 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_queue.c: app_queue: fix a couple leaks to struct
	  call_queue in set_member_value set_member_value has a couple
	  leaks to references in the variable q found through testsuite
	  tests/queues/set_penalty. Also remove the REF_DEBUG_ONLY_QUEUES
	  compiler declaration, this is no longer possible with the updated
	  REF_DEBUG code. ASTERISK-24466 #close Reported by: Corey Farrell
	  Review: https://reviewboard.asterisk.org/r/4125/ ........ Merged
	  revisions 426805 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426806 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/audiohook.c: audiohooks: Clean references to formats Cleanup
	  references to in_translate[x].format and out_translate[x].format
	  in ast_audiohook_detach_list. ASTERISK-24465 #close Reported by:
	  Corey Farrell Review: https://reviewboard.asterisk.org/r/4124/

2014-10-30 21:13 +0000 [r426757-426780]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_exten_state.c, /: res_pjsip_exten_state:
	  PJSIPShowSubscriptionsInbound causes crash Currently, it is
	  possible for some subscriptions to get into a NULL state. When
	  this occurs and the PJSIPShowSubscriptionsInbound ami action is
	  issued and a device is subscribed for extension state then the
	  associated subscription state object can't be located. The code
	  then attempts to dereference a NULL object. Added a NULL check to
	  avoid the problem. Reported by: John Bigelow ........ Merged
	  revisions 426779 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip/pjsip_options.c, /: res_pjsip: incorrect qualify
	  statistics after disabling for contact When removing the
	  qualify_frequency from an AoR or a contact the statistics shown
	  when issuing "pjsip show aors" from the CLI are incorrect. This
	  patch deletes the contact's status object from sorcery,
	  disassociating it from the contact, if the qualify_freqency is
	  removed from configuration. ASTERISK-24462 #close Reported by:
	  Mark Michelson Review: https://reviewboard.asterisk.org/r/4116/
	  ........ Merged revisions 426755 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-30 09:20 +0000 [r426702]  Walter Doekes <walter+asterisk@wjd.nu>

	* apps/app_voicemail.c, /: app_voicemail: Fix unchecked bounds of
	  myArray in IMAP_STORAGE. In update_messages_by_imapuser(),
	  messages were appended to a finite array which resulted in a
	  crash when an IMAP mailbox contained more than 256 entries. This
	  memory is now dynamically increased as needed. Observe that this
	  patch adds a bunch of XXX's to questionable code. See the review
	  (url below) for more information. ASTERISK-24190 #close Reported
	  by: Nick Adams Tested by: Nick Adams Review:
	  https://reviewboard.asterisk.org/r/4126/ ........ Merged
	  revisions 426691 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 426692 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426696 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-30 06:09 +0000 [r426668]  Igor Goncharovskiy <igor.goncharovsky@gmail.com>

	* channels/chan_unistim.c, /: Add additional checks for NULL
	  pointers to fix several crashes reported. ASTERISK-24304 #close
	  Reported by: dhanapathy sathya ........ Merged revisions 426666
	  from http://svn.asterisk.org/svn/asterisk/branches/11 ........
	  Merged revisions 426667 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-30 01:59 +0000 [r426597-426602]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: channels/chan_sip: Add improved support
	  for 4xx error codes This patch adds support for 414, 493, 479,
	  and a stray 400 response in REGISTER response handling. This
	  helps interoperability in a number of scenarios. Review:
	  https://reviewboard.asterisk.org/r/3437 patches: rb3437.patch
	  uploaded by oej (License 5267) ........ Merged revisions 426599
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 426600 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426601 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/sip/reqresp_parser.c, /, channels/chan_sip.c:
	  channels/chan_sip: Support mutltiple Supported and Required
	  headers A SIP request may contain multiple Supported: and
	  Required: headers. Currently, chan_sip only parses the first
	  Supported/Required header it finds. This patch adds support for
	  multiple Supported/Required headers for INVITE requests. Review:
	  https://reviewboard.asterisk.org/r/2478 ASTERISK-21721 #close
	  Reported by: Olle Johansson patches: rb2478.patch uploaded by oej
	  (License 5267) ........ Merged revisions 426594 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 426595 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426596 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-29 10:33 +0000 [r426570]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* channels/chan_phone.c: Fix building chan_phone on big endian
	  systems A left over from the formats conversion (Corey Farrell).
	  ASTERISK-24458 #close Review:
	  https://reviewboard.asterisk.org/r/4117/

2014-10-28 21:26 +0000 [r426552]  Richard Mudgett <rmudgett@digium.com>

	* /, bridges/bridge_builtin_features.c: bridge_builtin_features:
	  Add missing channel locks around
	  ast_get_chan_features_general_config(). The feature_automonitor()
	  and feature_automixmonitor() functions were not locking the
	  channel around ast_get_chan_features_general_config(). Accessing
	  the channel datastore list without the channel locked is a good
	  way to corrupt the list or follow the pointer chain into
	  oblivion. ........ Merged revisions 426531 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-28 21:05 +0000 [r426525-426529]  Corey Farrell <git@cfware.com>

	* /, res/res_fax.c: res_fax: Resolve T38 gateway frame leak. When
	  frames are translated by a fax gateway they need to be freed. The
	  existing call to ast_frfree was unreachable. This change
	  reorganizes fax_gateway_framehook to ensure that ast_frfree is
	  called when needed. ASTERISK-24457 #close Reported by: Corey
	  Farrell Review: https://reviewboard.asterisk.org/r/4115/ ........
	  Merged revisions 426527 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426528 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/manager.c, /: manager: Unsubscribe from acl_change_sub at
	  shutdown. ASTERISK-24453 #close Reported by: Corey Farrell
	  Review: https://reviewboard.asterisk.org/r/4110/ ........ Merged
	  revisions 426524 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-28 18:09 +0000 [r426459]  mdavenport <mdavenport@localhost>:

	* configs/samples/manager.conf.sample: ASTERISK-23512, correct
	  inaccurate comment in manager.conf.sample

2014-10-28 16:40 +0000 [r426368-426432]  Matthew Jordan <mjordan@digium.com>

	* /, main/bridge.c: main/bridge: Destroy features struct on off
	  nominal path during bridge impart When a channel is imparted to a
	  bridge, the invocation of the function may provide an
	  ast_bridge_features struct. Upon passing this to
	  ast_bridge_impart, the caller must assume that ownership has
	  passed to the function, as in all paths the function destroys the
	  struct prior to returning (as its purpose is to configure the
	  behavior of the channel while in the bridge). On one off nominal
	  path - where the channel already has a PBX thread - the struct
	  was not being destroyed. This patch fixes that glitch.
	  ASTERISK-24437 #close Reported by: Scott Griepentrog ........
	  Merged revisions 426431 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/manager.c, /: main/manager: Fix typo in AMI event
	  documentation of "OriginateResponse" The parameter name is
	  "Response", not "Resonse". ASTERISK-24430 #close Reported by:
	  Dafi Ni ........ Merged revisions 426366 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426367 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-28 14:56 +0000 [r426294-426362]  mdavenport <mdavenport@localhost>:

	* res/res_agi.c: ASTERISK-24323, fix bug in documentation of AGI
	  STREAM FILE CONTROL

	* configs/samples/extensions.conf.sample: ASTERISK-24419, fix
	  incorrect syntax for setting language in extensions.conf.sample

2014-10-28 11:20 +0000 [r426252-426266]  Corey Farrell <git@cfware.com>

	* apps/app_queue.c, /: app_queue: Cleanup ao2_iterator Clean
	  ao2_iterator, resolving reference leak to queue members.
	  ASTERISK-24454 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4111/ ........ Merged
	  revisions 426255 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426260 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* funcs/func_cdr.c: func_cdr: Fix CDR_PROP payload leak Remove
	  duplicate allocation of payload, preventing leak. ASTERISK-24455
	  #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4113/

2014-10-27 17:54 +0000 [r426234]  Sean Bright <sean@malleable.com>

	* build_tools/menuselect-deps.in, configure,
	  include/asterisk/autoconfig.h.in, configure.ac, makeopts.in:
	  configure: Add autoconf check for libopus. Because opus
	  transcoding support cannot be included in the standard Asterisk
	  distribution, a few codec_opus implementations have popped up. To
	  make it easier for people to drop in opus support in their own
	  installations, this patch adds configure checks for libopus.
	  Review: https://reviewboard.asterisk.org/r/4106/

2014-10-27 02:46 +0000 [r426143-426211]  Matthew Jordan <mjordan@digium.com>

	* res/res_http_websocket.c, /: res/res_http_websocket: Fix minor
	  nits found by wdoekes on r409681 When Moises committed the fixes
	  for WSS (which was a great patch), wdoekes had a few style nits
	  that were on the review that got missed. This patch resolves what
	  I *think* were all of the ones that were still on the review.
	  Thanks to both moy for the patch, and wdoekes for the reviews.
	  Review: https://reviewboard.asterisk.org/r/3248/ ........ Merged
	  revisions 426209 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426210 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_phoneprov.c: res/res_phoneprov: Fix crash on shutdown
	  caused by container cleanup In res_phoneprov, unloading the
	  module first destroys the http_routes container, followed by the
	  users. However, users may have a route in the http_routes
	  container; the validity of this container is not checked in the
	  users destructor. Hence, we hit an assert as the container has
	  already been set to NULL. This patch does two things: (1) It adds
	  a sanity check in the user destructor (because why not) (2) It
	  switches the order of destruction, so that users are disposed of
	  prior to the HTTP routes they may hold a reference to. Note that
	  this crash was caught by the Test Suite (go go testing!) ........
	  Merged revisions 426174 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_srtp.c, /: res/res_srtp: Fix include issue for libsrtp
	  1.5.0 In libsrtp 1.5.0, crypto_get_random is no longer resolved
	  simply by including srtp.h. Now, one must include crypto_kernel.h
	  as well. As it turns out, this header file has been provided by
	  the library since 2006, so this is a relatively benign change.
	  ASTERISK-24436 #close Reported by: Patrick Laimbock ........
	  Merged revisions 426140 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 426141 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 426142 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-24 15:17 +0000 [r426120]  Jonathan Rose <jrose@digium.com>

	* main/manager.c: Documentation: Improve documentation for
	  ExtensionStatus AMI events Review:
	  https://reviewboard.asterisk.org/r/4085/

2014-10-24  Asterisk Development Team <asteriskteam@digium.com>

	* Asterisk 13.0.0 Released.

2014-10-22 21:27 +0000 [r426097]  Shaun Ruffell <sruffell@digium.com>

	* codecs/codec_dahdi.c: codec_dahdi: Cannot use struct
	  ast_translator.core_{src,src}_codec. This fixes a Segmentation
	  fault introduced in r419044 "media formats: re-architect handling
	  of media for performance improvements". The problem is that
	  codec_dahdi was using core_src_codec and core_dst_codec in the
	  ast_translator structure when these fields were never set. Now
	  instead of trying to map the new core codec descriptions to the
	  way DAHDI defines different codecs, we will store the DAHDI
	  specific formats in 'struct translator' directly so we can refer
	  to them without mapping. This also allows us to remove the
	  "global_format_map" structure, since we can now query the list of
	  translators directly to make sure we do not ever register a DAHDI
	  based translator for a specific path more than once and eliminate
	  the need to keep the list and the map in sync. ASTERISK-24435
	  #close Reported by: Marian Koniuszko Review:
	  https://reviewboard.asterisk.org/r/4105/

2014-10-21 17:47 +0000 [r426079]  Richard Mudgett <rmudgett@digium.com>

	* main/translate.c: translage.c: Fix regression when generating
	  translation path strings. Fix the AMI Status action read and
	  write translation path strings from growing for each channel in
	  the status event list by reseting the ast string given to
	  ast_translate_path_to_str() to fill in the given translation
	  path.

2014-10-20 14:15 +0000 [r425991]  Matthew Jordan <mjordan@digium.com>

	* res/res_xmpp.c, main/tcptls.c, /: AST-2014-011: Fix POODLE
	  security issues There are two aspects to the vulnerability: (1)
	  res_jabber/res_xmpp use SSLv3 only. This patch updates the module
	  to use TLSv1+. At this time, it does not refactor
	  res_jabber/res_xmpp to use the TCP/TLS core, which should be done
	  as an improvement at a latter date. (2) The TCP/TLS core, when
	  tlsclientmethod/sslclientmethod is left unspecified, will default
	  to the OpenSSL SSLv23_method. This method allows for all
	  encryption methods, including SSLv2/SSLv3. A MITM can exploit
	  this by forcing a fallback to SSLv3, which leaves the server
	  vulnerable to POODLE. This patch adds WARNINGS if a user uses
	  SSLv2/SSLv3 in their configuration, and explicitly disables
	  SSLv2/SSLv3 if using SSLv23_method. For TLS clients, Asterisk
	  will default to TLSv1+ and WARN if SSLv2 or SSLv3 is explicitly
	  chosen. For TLS servers, Asterisk will no longer support SSLv2 or
	  SSLv3. Much thanks to abelbeck for reporting the vulnerability
	  and providing a patch for the res_jabber/res_xmpp modules.
	  Review: https://reviewboard.asterisk.org/r/4096/ ASTERISK-24425
	  #close Reported by: abelbeck Tested by: abelbeck, opsmonitor,
	  gtjoseph patches: asterisk-1.8-jabber-tls.patch uploaded by
	  abelbeck (License 5903) asterisk-11-jabber-xmpp-tls.patch
	  uploaded by abelbeck (License 5903) AST-2014-011-1.8.diff
	  uploaded by mjordan (License 6283) AST-2014-011-11.diff uploaded
	  by mjordan (License 6283) ........ Merged revisions 425987 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-19 17:07 +0000 [r425965]  George Joseph <george.joseph@fairview5.com>

	* Makefile, /, configure, include/asterisk/autoconfig.h.in,
	  configure.ac, makeopts.in: build: Force -fsigned-char on
	  platforms where the default for char is unsigned gcc on the ARM
	  platform defaults 'char' to 'unsigned char' whereas Intel and
	  SPARC default to 'signed char'. This is only an issue in the rare
	  cases where negative values are assigned to a 'char' but this
	  this patch insures compatibility by detecting platforms that
	  default to 'unsigned' and adding an '-fsigned-char' flag to
	  _ASTCFLAGS. If compiling for ARM (native or cross-compile) be
	  sure to run ./bootstrap.sh and ./configure to regenerate the
	  build files. You shouldn't have to do this for Intel or SPARC.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4091/ ........ Merged
	  revisions 425964 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-19 04:01 +0000 [r425923-425944]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_sdp_rtp.c: res/res_pjsip_sdp_rtp: Revert 425922
	  This patch for r425922 introduced a bug, wherein sending an
	  INVITE request with no SDP would cause Asterisk to not send an
	  SDP Offer in the 200 OK. The current structure of
	  res_pjsip_sdp_rtp is a bit hard to deal with to fix this, as
	  create_outgoing_sdp has no knowledge of whether or not it is
	  creating an SDP as a new Offer or an Answer. This is something of
	  an oversight in the callback definition, as the caller of it does
	  have this information.

	* res/res_pjsip_sdp_rtp.c: res/res_pjsip_sdp_rtp: Remove left over
	  reference to override_prefs The usage of the local override_prefs
	  variable in create_outgoing_sdp_stream was previously to track an
	  override format preference set by PJSIP_MEDIA_OFFER. Now,
	  however, that function simply sets the joint capabilities
	  structure, session->req_caps. During the media format rework, the
	  override_prefs was instead used to check if there were any
	  formats in session->req_caps. However, this usage isn't useful in
	  create_outgoing_sdp_stream. session->req_caps contains the
	  negotiated formats for *all* streams, not just the current one
	  being created. Thus, so long as any stream of any type has
	  provided a format, override_prefs will be non-zero. Hence, its
	  usage in checking whether or not we should look at the formats on
	  the endpoint or the joint capabilities is generally useless.
	  There's only two things useful to check: (1) Does the endpoint
	  have a format for the media type? (2) Did we negotiate a format
	  for the media type? If either of those is a 'no', then we must
	  kill the media stream.

2014-10-17 22:43 +0000 [r425905]  Jonathan Rose <jrose@digium.com>

	* configs/samples/cli_aliases.conf.sample: Sample Configurations:
	  make 'pjsip reload' reload all reloadable pjsip modules AST-1432
	  #close Reported by: John Bigelow

2014-10-17 13:35 +0000 [r425821-425879]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_sdp_rtp.c, res/res_pjsip.c,
	  res/res_pjsip_session.c, /: res_pjsip_session/res_pjsip_sdp_rtp:
	  Be more tolerant of offers When an inbound SDP offer is received,
	  Asterisk currently makes a few incorrection assumptions: (1) If
	  the offer contains more than a single audio/video stream,
	  Asterisk will reject the entire stream with a 488. This is an
	  overly strict response; generally, Asterisk should accept the
	  media streams that it can accept and decline the others. (2) If
	  the offer contains a declined media stream, Asterisk will attempt
	  to process it anyway. This can result in attempting to match
	  format capabilities on a declined media stream, leading to a 488.
	  Asterisk should simply ignore declined media streams. (3)
	  Asterisk will currently attempt to handle offers with AVPF with
	  use_avpf=No/AVP with use_avpf=Yes. This mismatch results in
	  invalid SDP answers being sent in response. If there is a
	  mismatch between the media type being offered and the
	  configuration, Asterisk must reject the offer with a 488. This
	  patch does the following: * Asterisk will accept SDP offers with
	  at least one media stream that it can use. Some WARNING messages
	  have been dropped to NOTICEs as a result. * Asterisk will not
	  accept an offer with a media type that doesn't match its
	  configuration. * Asterisk will ignore declined media streams
	  properly. #SIPit31 Review:
	  https://reviewboard.asterisk.org/r/4063/ ASTERISK-24122 #close
	  Reported by: James Van Vleet ASTERISK-24381 #close Reported by:
	  Matt Jordan ........ Merged revisions 425868 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: channels/chan_sip: Respect outboundproxy
	  setting when sending qualify requests The outboundproxy setting
	  is currently ignored when sending OPTIONS requests as a result of
	  the qualify setting. This means that if an Asterisk server is
	  unable to send the packet directly to a peer, it is unable to
	  qualify any non-inbound registered peer (e.g. a peer SIP Trunk).
	  This patch grabs the outboundproxy information for a peer when a
	  qualify attempt is being constructed and, if it finds the
	  information, uses it when sending the OPTIONS request. Review:
	  https://reviewboard.asterisk.org/r/3948 ASTERISK-24063 #close
	  Reported by: Damian Ivereigh patches: outboundproxy-dai.patch
	  uploaded by Damian Ivereigh (License 6632) ........ Merged
	  revisions 425818 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425819 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425820 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-17 02:41 +0000 [r425783]  Richard Mudgett <rmudgett@digium.com>

	* main/core_unreal.c, main/channel.c, /: AMI: Add missing VarSet
	  events when a channel inherits variables. There should be AMI
	  VarSet events when channel variables are inherited by an outgoing
	  channel. Also local;2 should generate VarSet events when it gets
	  all of its channel variables from channel local;1. ASTERISK-24415
	  #close Reported by: Richard Mudgett Patches:
	  jira_asterisk_24415_v12.patch (license #5621) patch uploaded by
	  Richard Mudgett Review: https://reviewboard.asterisk.org/r/4074/
	  ........ Merged revisions 425782 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-17 01:57 +0000 [r425736-425761]  Matthew Jordan <mjordan@digium.com>

	* /, bridges/bridge_native_rtp.c: bridge_native_rtp: Fix audio
	  issues when moving from remote bridge to softmix When a native
	  RTP bridge that is remotely bridging its participants switches to
	  a softmix bridge, it may not properly re-INVITE the media for one
	  or both participants back to Asterisk. This is due to the current
	  bridge_native_rtp code only re-INVITEs if it believes the channel
	  will survive the bridge operation. Currently, that code is
	  failing, as it expects the channels to have a soft hangup flag
	  set on it indicating that a redirect has occurred or that the
	  channel is going to leave the bridge. (The code did not take into
	  account a smart bridge operation). This patch also renames a few
	  things to be more reflective of the underlying types. Review:
	  https://reviewboard.asterisk.org/r/3997/ ASTERISK-24327 #close
	  ........ Merged revisions 425760 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, tests/test_cel.c: test_cel: Update pickup test to expect
	  CANCEL instead of ANSWSER The CEL pickup test previously looked
	  for a disposition of ANSWER between the original caller/peer when
	  the call is picked up. This is actually incorrect: the
	  disposition should, at the very least, not be ANSWER as the call
	  was never ANSWERed. The disposition is now CANCEL; this patch
	  updates the test accordingly. ........ Merged revisions 425757
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: main/cdr: Use 'time' when rescheduling batched
	  CDRs as opposed to 'size' When refactoring CDRs to use the
	  configuration framework, a 'whoops' was introduced where the CDR
	  batch size was used when rescheduling a batch, as opposed to the
	  time duration. This patch corrects that obvious mistake.
	  ASTERISK-24426 #close Reported by: Shane Blaser ........ Merged
	  revisions 425735 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-16 17:30 +0000 [r425714]  George Joseph <george.joseph@fairview5.com>

	* include/asterisk/config.h, tests/test_config.c, main/config.c, /:
	  config: Fix inf loop using ast_category_browse and
	  ast_variable_retrieve Fix infinite loop when calling
	  ast_variable_retrieve inside an ast_category_browse loop when
	  there is more than 1 category with the same name. Tested-by:
	  George Joseph Review: https://reviewboard.asterisk.org/r/4089/
	  ........ Merged revisions 425713 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-16 14:35 +0000 [r425691]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip_t38.c, res/res_pjsip_registrar_expire.c,
	  res/res_pjsip_mwi_body_generator.c,
	  res/res_pjsip_endpoint_identifier_user.c,
	  res/res_pjsip_send_to_voicemail.c,
	  include/asterisk/res_pjsip_pubsub.h,
	  res/res_pjsip_outbound_authenticator_digest.c,
	  res/res_pjsip_outbound_registration.c,
	  res/res_pjsip_endpoint_identifier_anonymous.c,
	  res/res_pjsip_path.c, res/res_pjsip_one_touch_record_info.c,
	  res/res_pjsip_acl.c, res/res_pjsip_pubsub.c,
	  res/res_pjsip_diversion.c, res/res_pjsip_refer.c,
	  include/asterisk/res_pjsip.h,
	  res/res_pjsip_pidf_body_generator.c, res/res_pjsip_dtmf_info.c,
	  res/res_pjsip_multihomed.c, res/res_pjsip_authenticator_digest.c,
	  res/res_pjsip_sdp_rtp.c, res/res_hep_pjsip.c,
	  res/res_pjsip_messaging.c, res/res_pjsip_caller_id.c,
	  res/res_pjsip_logger.c, res/res_pjsip_nat.c,
	  res/res_pjsip_session.c, res/res_pjsip_exten_state.c,
	  res/res_pjsip_header_funcs.c, res/res_pjsip_rfc3326.c,
	  res/res_pjsip_phoneprov_provider.c, res/res_pjsip_mwi.c,
	  res/res_pjsip_dialog_info_body_generator.c,
	  res/res_pjsip_xpidf_body_generator.c, res/res_pjsip_registrar.c,
	  channels/chan_pjsip.c, res/res_pjsip_transport_websocket.c,
	  res/res_pjsip_pidf_eyebeam_body_supplement.c,
	  include/asterisk/res_pjsip_session.h, /, res/res_pjsip_notify.c,
	  res/res_pjsip_pidf_digium_body_supplement.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  res/res_pjsip_publish_asterisk.c: PJSIP: Enforce module load
	  dependencies This enforces that res_pjsip, res_pjsip_session, and
	  res_pjsip_pubsub have loaded properly before attempting to load
	  any modules that depend on them since the module loader system is
	  not currently capable of resolving module dependencies on its
	  own. ASTERISK-24312 #close Reported by: Dafi Ni Review:
	  https://reviewboard.asterisk.org/r/4062/ ........ Merged
	  revisions 425690 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-16 06:11 +0000 [r425669]  Igor Goncharovskiy <igor.goncharovsky@gmail.com>

	* channels/chan_unistim.c, /: Fix loss of voice after second call
	  drops (on a second line) in case using multiple lines on unistim
	  phones. There is regression was introduced in r391379. Reported
	  by: Rustam Khankishyiev (closes issue ASTERISK-23846) ........
	  Merged revisions 425667 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425668 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-16 01:25 +0000 [r425646]  Joshua Colp <jcolp@digium.com>

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Fix a bug where ICE
	  state would get reset when it shouldn't. In the case where the
	  ICE negotiation had not yet started current state would get wiped
	  when it shouldn't. This also removes channel binding as in
	  practice this does not work well with other implementations.
	  ........ Merged revisions 425644 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425645 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-15 19:31 +0000 [r425627]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_motif.c: chan_motif: Cleanup
	  jingle_tech.capabilities only once.

2014-10-15 19:05 +0000 [r425611]  Jonathan Rose <jrose@digium.com>

	* res/parking/parking_tests.c: parking_tests: Fix assertions and
	  possibly crashes in res_parking unit tests Assertions were caused
	  by attempting to play music on hold to a channel with no formats.
	  Parking unit test channels were given formats and a technology so
	  that they would be able to pretend to read/write frames.
	  ASTERISK-24413 #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/4075/

2014-10-15 09:59 +0000 [r425590]  Alexandr Anikin <may@telecom-service.ru>

	* addons/chan_ooh323.c, /: chan_ooh323: fix rtptimeout general
	  value checking correct condition to check rtptimeout in [general]
	  config section ASTERISK-24393 #close Reported by: Dmitry Melekhov
	  Tested by: Dmitry Melekhov Patches: ASTERISK-24393.patch ........
	  Merged revisions 425547 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425548 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425589 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-14 20:46 +0000 [r425526]  George Joseph <george.joseph@fairview5.com>

	* /, include/asterisk/config.h, tests/test_config.c, main/config.c:
	  config: Fix SEGV in unit test with MALLOC_DEBUG With MALLOC_DEBUG
	  the /main/config config_basic_ops test was causing a SEGV while
	  doing an ast_category_delete in an ast_category_browse loop.
	  Apparently this never worked but was also never tested. I removed
	  the test, added 2 notes to config.h indicating that it's not
	  supported and added a few lines of code to ast_category_delete to
	  prevent the SEGV should someone attempt it in the future.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4078/ ........ Merged
	  revisions 425525 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-14 19:00 +0000 [r425504]  Jonathan Rose <jrose@digium.com>

	* main/sched.c, /: Scheduler: Fix a nasty scheduler caching bug
	  which makes new tasks not execute Tasks that were marked for
	  pending deletion in the scheduler would be moved to the cache for
	  later reuse, but after being recycled the deleted mark wouldn't
	  be removed resulting in fresh tasks being deleted without
	  reason... and immediately moved back into the cache where they
	  could be reused again. This could cause horrendous things to
	  happen in just about anything that used a scheduler.
	  ASTERISK-24321 #close Reported by: Steve Pitts Review:
	  https://reviewboard.asterisk.org/r/4071/ ........ Merged
	  revisions 425503 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-14 18:12 +0000 [r425481]  George Joseph <george.joseph@fairview5.com>

	* res/res_phoneprov.c, include/asterisk/phoneprov.h, /,
	  res/res_pjsip_phoneprov_provider.c: res_phoneprov: Create
	  accessor for ast_phoneprov_std_variable_lookup Based on feedback
	  from Richard, I created an accessor for
	  res_phoneprov/ast_phoneprov_std_variable_lookup and added load
	  priority to AST_MODULE_INFO. Tested-by: George Joseph Tested-by:
	  Richard Mudgett Review: https://reviewboard.asterisk.org/r/4076/
	  ........ Merged revisions 425480 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-14 16:46 +0000 [r425459]  Corey Farrell <git@cfware.com>

	* /, res/res_fax.c: res_fax: Fix reference leak caused by gateway
	  sessions Fax gateway session objects can be re-used, causing the
	  same gateway session to be added to faxregistry.container more
	  than once. This change causes fax_session_new to remove the
	  reserved session from the container before it's id is changed,
	  ensuring it's possible for the session to be freed.
	  ASTERISK-24392 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4049/ ........ Merged
	  revisions 425457 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425458 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-14 16:35 +0000 [r425455]  Richard Mudgett <rmudgett@digium.com>

	* /, main/stasis_channels.c: stasis_channels.c: Resolve unfinished
	  Dials when doing masquerades (Part 2) Masquerades into and out of
	  channels that are involved in a dial operation don't create the
	  expected dial end event. The missing dial end event goes against
	  the model for things like CDRs and generating Dial end manager
	  actions and such. There are four cases: 1) A channel masquerades
	  into the caller channel. The case happens when performing a
	  blonde transfer using the channel driver's protocol. 2) A channel
	  masquerades into a callee channel. The case happens when
	  performing a directed call pickup. 3) The caller channel
	  masquerades out of dial. The case happens when using the Bridge
	  application on the caller channel. 4) A callee channel
	  masquerades out of dial. The case happens when using the Bridge
	  application on a peer channel. As it turned out, all four cases
	  need to be handled instead of just the first one. ASTERISK-24237
	  Reported by: Richard Mudgett ASTERISK-24394 #close Reported by:
	  Richard Mudgett Review: https://reviewboard.asterisk.org/r/4066/
	  ........ Merged revisions 425430 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-14 16:19 +0000 [r425415]  Corey Farrell <git@cfware.com>

	* /, res/res_fax.c: res_fax: Resolve module reference leak caused
	  by reserved sessions Remove reference to module providing
	  reserved session after adding a reference to the final module.
	  This re-reference is done to ensure that module references are
	  correct even if the final session selects a different module than
	  the reserved session. ASTERISK-18923 #close Reported by: Grigoriy
	  Puzankin Review: https://reviewboard.asterisk.org/r/4048/
	  ........ Merged revisions 425405 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425407 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425411 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-13 16:10 +0000 [r425384]  George Joseph <george.joseph@fairview5.com>

	* apps/app_directory.c, tests/test_sorcery.c, main/config.c,
	  tests/test_sorcery_realtime.c, res/res_sorcery_realtime.c,
	  apps/app_voicemail.c, res/res_sorcery_config.c, main/manager.c,
	  /, include/asterisk/config.h, pbx/pbx_realtime.c,
	  tests/test_config.c: manager/config: Support templates and
	  non-unique category names via AMI This patch provides the
	  capability to manipulate templates and categories with non-unique
	  names via AMI. Summary of changes: GetConfig and GetConfigJSON:
	  Added "Filter" parameter: A comma separated list of
	  name_regex=value_regex expressions which will cause only
	  categories whose variables match all expressions to be
	  considered. The special variable name TEMPLATES can be used to
	  control whether templates are included. Passing 'include' as the
	  value will include templates along with normal categories.
	  Passing 'restrict' as the value will restrict the operation to
	  ONLY templates. Not specifying a TEMPLATES expression results in
	  the current default behavior which is to not include templates.
	  UpdateConfig: NewCat now includes options for allowing duplicate
	  category names, indicating if the category should be created as a
	  template, and specifying templates the category should inherit
	  from. The rest of the actions now accept a filter string as
	  defined above. If there are non-unique category names, you can
	  now update specific ones based on variable values. To facilitate
	  the new capabilities in manager, corresponding changes had to be
	  made to config, most notably the addition of filter criteria to
	  many of the APIs. In some cases it was easy to change the
	  references to use the new prototype but others would have
	  required touching too many files for this patch so a wrapper with
	  the original prototype was created. Macros couldn't be used in
	  this case because it would break binary compatibility with
	  modules such as res_digium_phone that are linked to real symbols.
	  Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4033/ ........ Merged
	  revisions 425383 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-12 21:09 +0000 [r425362]  Joshua Colp <jcolp@digium.com>

	* /, res/res_rtp_asterisk.c: res_rtp_asterisk: Make the ICE
	  transport check case insensitive as some implementations use
	  'udp'. ........ Merged revisions 425360 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425361 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-12 08:15 +0000 [r425289-425299]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, channels/chan_sip.c: chan_sip: Fix so asterisk won't send
	  reINVITE after a BYE. After a reINVITE glare situation, Asterisk
	  would re-send the reINVITE even though the call had been hung up
	  in the mean time. This patch unschedules the reinvite when
	  handling the BYE. ASTERISK-22791 #close Reported by: Paolo
	  Compagnini Tested by: Paolo Compagnini Review:
	  https://reviewboard.asterisk.org/r/4056/ (testcase is in review
	  r4055) ........ Merged revisions 425296 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425297 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425298 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, Makefile: build: Relax badshell tilde test to allow for ~ in
	  middle of DESTDIR. The main Makefile has a target test called
	  'badshell' that tests if DESTDIR does not happen to have an
	  an-expanded tilde (~). This might be the case if you run: make
	  install DESTDIR=~/somewhere/ That test also disallowed valid
	  tildes in directory names. The test is now changed to only
	  trigger on a tilde at the start of the path. ASTERISK-13797
	  #close Reported by: Tzafrir Cohen Review:
	  https://reviewboard.asterisk.org/r/4064/ ........ Merged
	  revisions 425291 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425292 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425293 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_calendar_ews.c: res_calendar_ews: Relax neon version
	  check to work with 0.30 too. Allow res_calendar_ews to work not
	  only with libneon-0.29 but also with 0.30. ASTERISK-24325 #close
	  Reported by: Tzafrir Cohen Review:
	  https://reviewboard.asterisk.org/r/4068/ ........ Merged
	  revisions 425286 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425287 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425288 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-11 21:08 +0000 [r425265]  George Joseph <george.joseph@fairview5.com>

	* /, res/res_phoneprov.c: res_phoneprov: Cleanup module load error
	  handling Tested module load/reload interaction between
	  res_phoneprov and res_pjsip_phoneprov_provider in cases where
	  res_phoneprov didn't load correctly (usually misconfiguration or
	  missing phoneprov.conf) Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/4069/ ........ Merged
	  revisions 425264 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-10 20:48 +0000 [r425243]  Joshua Colp <jcolp@digium.com>

	* /, main/bridge.c, bridges/bridge_native_rtp.c: bridge: During a
	  smart bridge operation provide a more complete bridge to the old
	  technology. When a smart bridge operation occurs and a bridge
	  transitions from one technology to another the old technology is
	  provided the channels formerly in it and told that they are
	  leaving. Unfortunately the bridge provided along with them is
	  incomplete. The bridge, despite there being channels in it,
	  contains none. This forces technology implementations to have
	  additional logic when channels are leaving or to store their own
	  duplicated state. This change makes the bridge more complete so
	  it contains the expected channels. Now that the bridge is
	  complete special logic within bridge_native_rtp is no longer
	  needed and has been removed. Review:
	  https://reviewboard.asterisk.org/r/4057/ ........ Merged
	  revisions 425242 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-10 14:31 +0000 [r425221]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_phoneprov.c: res/res_phoneprov: Bail on registration
	  if res_phoneprov didn't load If res_phoneprov failed to fully
	  load (due to not being configured), the providers container will
	  be NULL. If a module attempts to register a phone provisioning
	  provider, it should check for the presence of the container. If
	  there is no providers container, it should return an error. This
	  patch makes the ast_phoneprov_provider_register function do
	  that... otherwise this would be a silly commit message. ........
	  Merged revisions 425220 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-10 14:23 +0000 [r425217]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_phoneprov_provider.c:
	  res_pjsip_phoneprov_provider: Add missing dependency on
	  pjproject. ........ Merged revisions 425216 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-10 13:01 +0000 [r425155]  Kinsey Moore <kmoore@digium.com>

	* /, tests/test_callerid.c, main/callerid.c: CallerID: Fix parsing
	  regression This fixes a regression in callerid parsing introduced
	  when another bug was fixed. This bug occurred when the name was
	  composed entirely of DTMF keys and quoted without a number
	  section (<>). ASTERISK-24406 #close Reported by: Etienne Lessard
	  Tested by: Etienne Lessard Patches: callerid_fix.diff uploaded by
	  Kinsey Moore Review: https://reviewboard.asterisk.org/r/4067/
	  ........ Merged revisions 425152 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425153 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425154 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-10 12:10 +0000 [r425132]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_nat.c, /: res_pjsip_nat: Place source port into
	  rport of responses if 'force_rport' is on. When the 'force_rport'
	  option is enabled the behavior should be the same as if the
	  remote side placed rport into the message themselves. Therefore
	  any responses we send should include the source port of the
	  request in the rport of the Via header. #SIPit31 ASTERISK-24387
	  #close Reported by: Matt Jordan ........ Merged revisions 425131
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-10 07:32 +0000 [r425071]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, channels/chan_sip.c: chan_sip: Fix dialog leak resulting from
	  missing ACK to re-INVITE. If a device re-INVITEs at the same time
	  as the dialog is hung up, and if then the ACK to the re-INVITE
	  never reaches Asterisk, chan_sip would fail to destroy the dialog
	  after a while. This resulted in (most prominently) file handle
	  leaks. (Patch reindented by me.) ASTERISK-20784 #close
	  ASTERISK-15879 #close Reported by: Torrey Searle, Nitesh Bansal
	  Patches: reinvite_ack_timeout.patch uploaded by Torrey Searle
	  (License #5334) patch_asterisk_20784.txt uploaded by Nitesh
	  Bansal (License #6418) Reviewboard:
	  https://reviewboard.asterisk.org/r/4052/ (testcase can be found
	  at r4051) ........ Merged revisions 425068 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 425069 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 425070 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-09 23:35 +0000 [r425052]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip_phoneprov_provider.c: res_pjsip_phoneprov_provider:
	  fix compile breakage on AST_VECTOR endpoint->inbound_auths was
	  changed to a vector in 13 and I committed the 12 patch instead of
	  the 13 patch. Tested-by: George Joseph

2014-10-09 21:38 +0000 [r425031]  Kevin Harwell <kharwell@digium.com>

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Crash if no
	  candidates received for component When starting ice if there is
	  not at least one remote ice candidate with an RTP component
	  asterisk will crash. This is due to an assertion in pjnath as it
	  expects at least one candidate with an RTP component. Added a
	  check to make sure at least one candidate contains an RTP
	  component and at least one candidate has an RTCP component.
	  ASTERISK-24383 #close Review:
	  https://reviewboard.asterisk.org/r/4039/ ........ Merged
	  revisions 425030 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-09 20:54 +0000 [r425008]  George Joseph <george.joseph@fairview5.com>

	* /, res/res_pjsip_phoneprov_provider.c (added),
	  configs/samples/pjsip.conf.sample: res_pjsip_phoneprov_provider:
	  Provides pjsip integration with res_phoneprov This module allows
	  res_pjsip to integrate with res_phoneprov. It handles the pjsip
	  'phoneprov' object type. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3976/ ........ Merged
	  revisions 425007 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-09 18:37 +0000 [r424986]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_phoneprov.c: res/res_phoneprov: Don't cancel Asterisk
	  load on module load failure ........ Merged revisions 424985 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-09 17:45 +0000 [r424964]  George Joseph <george.joseph@fairview5.com>

	* include/asterisk/phoneprov.h (added), /,
	  configs/samples/phoneprov.conf.sample,
	  include/asterisk/chanvars.h, res/res_phoneprov.c,
	  res/res_phoneprov.exports.in (added), main/chanvars.c:
	  res_phoneprov: Refactor phoneprov to allow pluggable config
	  providers This patch makes res_phoneprov more modular so other
	  modules (like pjsip) can provide configuration information
	  instead of res_phoneprov relying solely on users.conf and
	  sip.conf. To accomplish this a new ast_phoneprov public API is
	  now exposed which allows config providers to register themselves,
	  set defaults (server profile, etc) and add user extensions. *
	  ast_phoneprov_provider_register registers the provider and
	  provides callbacks for loading default settings and loading
	  users. * ast_phoneprov_provider_unregister clears the defaults
	  and users. * ast_phoneprov_add_extension should be called once
	  for each user/extension by the provider's load_users callback to
	  add them. * ast_phoneprov_delete_extension deletes one extension.
	  * ast_phoneprov_delete_extensions deletes all extensions for the
	  provider. Tested-by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3970/ ........ Merged
	  revisions 424963 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-09 16:36 +0000 [r424942]  Richard Mudgett <rmudgett@digium.com>

	* /, main/cdr.c: cdr.c: Make turning on CDR debug a one step
	  process instead of two. Now "cdr set debug on" doesn't also
	  require "core set verbose 1" to see CDR debug output. ........
	  Merged revisions 424941 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-09 08:08 +0000 [r424880]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, contrib/scripts/safe_asterisk: safe_asterisk: Don't
	  automatically exceed MAXFILES value of 2^20. On systems with lots
	  of RAM (e.g. 24GB) /proc/sys/fs/file-max divided by two can
	  exceed the per-process file limit of 2^20. This patch ensures the
	  value is capped. (Patch cleaned up by me.) ASTERISK-24011 #close
	  Reported by: Michael Myles Patches: safe_asterisk-ulimit.diff
	  uploaded by Michael Myles (License #6626) ........ Merged
	  revisions 424875 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 424878 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424879 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-08 18:46 +0000 [r424854]  Joshua Colp <jcolp@digium.com>

	* /, res/res_rtp_asterisk.c: res_rtp_asterisk: Allow only UDP ICE
	  candidates. The underlying library, pjnath, that res_rtp_asterisk
	  uses for ICE support does not have support for ICE-TCP. As
	  candidates are passed through directly to it this can cause error
	  messages to occur when it receives something unexpected (such as
	  a TCP candidate). This change merely ignores all non-UDP
	  candidates so they never reach pjnath. ASTERISK-24326 #close
	  Reported by: Joshua Colp ........ Merged revisions 424852 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424853 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-08 18:24 +0000 [r424769-424850]  Kinsey Moore <kmoore@digium.com>

	* main/stasis.c: Stasis: Relegate log message to dev-mode This
	  error message primarily applies to development tasks and will now
	  only show up when dev-mode is enabled via configure.

	* main/sounds_index.c: Indexer: Format message types may not exist
	  In Asterisk 13+, any given message type is not guaranteed to
	  exist even if Asterisk comes up correctly since creation of the
	  message type could be declined. The indexer should not prevent
	  Asterisk from starting under these conditions.

	* main/stasis.c: Stasis: Only log errors for non-declined types
	  When message type creation is declined via stasis.conf, certain
	  operations log errors assuming that the declined type is being
	  used before initialization or after destruction. These error
	  messages get quite spammy for oft used message types and should
	  not be logged in the first place since the message type is
	  validly NULL. Reported by: Matt DiMeo

2014-10-07 18:33 +0000 [r424752]  Joshua Colp <jcolp@digium.com>

	* main/data.c: data: Properly access formats in capabilities
	  structure when adding codecs. Formats within a capabilities
	  structure are addressed starting at 0, not 1. Assuming 1 causes
	  it to exceed an array. ASTERISK-24389 #close Reported by: Kevin
	  Harwell

2014-10-07 17:41 +0000 [r424692-424731]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_pjsip_outbound_registration.c:
	  res/res_pjsip_outbound_registration: Initialize
	  auth_reject_permanent parameter Prior to this patch, the
	  auth_reject_permanent parameter was not initialized on the
	  registration client state, leading to the parameter being
	  disabled regardless of the value specified in pjsip.conf. This
	  patch initialized the setting on the registration client state to
	  the provided configuration value. ASTERISK-24398 #close ........
	  Merged revisions 424730 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_pubsub.c: res/res_pjsip_pubsub: Fix typo in WARNING
	  message

	* main/message.c, /: message: Don't close an AMI connection on
	  SendMessage action error If SendMessage encounters an error (such
	  as incorrect input provided to the action), it will currently
	  return -1. Actions should only return -1 if the connection to the
	  AMI client should be closed. In this case, SendMessage causing
	  the client to disconnect is inappropriate. This patch causes the
	  action to return 0, which simply causes the action to fail.
	  Review: https://reviewboard.asterisk.org/r/4024 ASTERISK-24354
	  #close Reported by: Peter Katzmann patches: sendMessage.patch
	  uploaded by Peter Katzmann (License 5968) ........ Merged
	  revisions 424690 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424691 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-06 15:38 +0000 [r424669]  Richard Mudgett <rmudgett@digium.com>

	* main/features.c, /: features.c: Fix lingering channel ref while
	  Bridge() application is active. Using the Bridge application to
	  bridge a channel that is executing an applicaiton such as Wait
	  results in a lingering Surrogate channel in the CLI "core show
	  channels" output even though it has already hungup. * Fix
	  bridge_exec() to not hold onto the current_dest_chan ref once it
	  has been put into the bridge. * Eliminated bridge_exec()'s use of
	  RAII_VAR(). ASTERISK-24224 #close Reported by: Mark Michelson
	  Review: https://reviewboard.asterisk.org/r/4041/ ........ Merged
	  revisions 424668 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-06 12:38 +0000 [r424601-424647]  Matthew Jordan <mjordan@digium.com>

	* /, main/sdp_srtp.c: sdp_srtp: Add new lines to some WARNING
	  messages ........ Merged revisions 424646 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/pjsip_options.c: res_pjsip/pjsip_options: Do not
	  404 an OPTIONS request not sent to an endpoint An OPTIONS request
	  that is sent to Asterisk but not to a specific endpoint is
	  currently sent a 404 in response. This is because, not
	  surprisingly, an empty extension is never going to be found in
	  the dialplan. This patch makes it so that we only attempt to look
	  up the endpoint in the dialplan if it is specified in the OPTIONS
	  request URI. #SIPit31 ASTERISK-24370 #close Reported by: Matt
	  Jordan ........ Merged revisions 424624 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/pjsip/dialplan_functions.c, /: pjsip/dialplan_functions:
	  Handle PJSIP_MEDIA_OFFER called on non-PJSIP channels Calling
	  PJSIP_MEDIA_OFFER on a non-PJSIP channel is hazardous to your
	  health. It will treat the channels as a PJSIP channel, eventually
	  hitting an ao2 error, FRACKing on assertion error, and quite
	  likely crashing. This patch adds checks to the read/write
	  callbacks that ensure that the channel technology is of type
	  'PJSIP' before attempting to operate on the channel. #SIPit31
	  ASTERISK-24382 #close Reported by: Matt Jordan ........ Merged
	  revisions 424621 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_hep_pjsip.c, res/res_pjsip/pjsip_distributor.c,
	  res/res_pjsip_logger.c: res_pjsip: Prevent crashes when PJPROJECT
	  presents an rdata with no message When a message that exceeds the
	  PJ_MAX_PKT_SIZE is sent over a reliable transport, it is possible
	  (although it shouldn't occur) for pjproject to pass up an rdata
	  object with a NULL msg in the msg_info. Needless to say, things
	  that attempt to dereference this are in for a rough ride. In
	  particular, this caused crashes in three different locations, all
	  of which are 'low level' enough to intercept an rdata object
	  early in processing: (1) res_pjsip_logger (2) res_hep_pjsip (3)
	  res_pjsip/distributor Anything that can intercept an rdata object
	  before res_pjsip/distributor should be defensive when looking at
	  the received packet. #SIPit31 ASTERISK-24369 #close Reported by:
	  Matt Jordan ........ Merged revisions 424618 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_pubsub.c: res/res_pjsip_pubsub: Gracefully handle
	  errors when re-creating subscriptions A subscription that has
	  been persisted can - for various reasons - fail to be re-created
	  on startup. This patch resolves a number of crashes that occurred
	  when a subscription cannot be re-created on several off-nominal
	  paths. #SIPit31 ASTERISK-24368 #close Reported by: Matt Jordan

2014-10-05 00:48 +0000 [r424552-424580]  Corey Farrell <git@cfware.com>

	* main/manager.c, /: Release AMI connections on shutdown.
	  ASTERISK-24378 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4037/ ........ Merged
	  revisions 424578 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424579 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_motif.c: chan_motif: Correct last commit to use
	  ao2_cleanup to free format cap This fix applies to 13 and trunk.
	  ASTERISK-24384 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4043/

	* /, channels/chan_motif.c: chan_motif: Release format capabilities
	  and config on module load error ASTERISK-24384 #close Reported
	  by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/4043/ ........ Merged
	  revisions 424550 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424551 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-03 21:56 +0000 [r424472-424529]  Richard Mudgett <rmudgett@digium.com>

	* /, CHANGES, res/res_pjsip.c: res_pjsip: Fix XML typo and update
	  CHANGES. ASTERISK-24199 ........ Merged revisions 424528 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/audiohook.c, apps/app_chanspy.c, apps/app_mixmonitor.c, /,
	  main/framehook.c: audiohooks: Reevaluate the bridge technology
	  when an audiohook is added or removed. Adding a mixmonitor to a
	  channel causes the bridge to change technologies from native to
	  simple_bridge so the call can be recorded. However, when the
	  mixmonitor is stopped the bridge does not switch back to the
	  native technology. * Added unbridge requests to reevaluate the
	  bridge when a channel audiohook is removed. * Moved the unbridge
	  request into ast_audiohook_attach() ensure that the bridge
	  reevaluates whenever an audiohook is attached. This simplified
	  the mixmonitor and chan_spy start code as well. * Added defensive
	  code to stop_mixmonitor_full() in case additional arguments are
	  ever added to the StopMixMonitor application. * Made
	  ast_framehook_detach() not do an unbridge request if the
	  framehook does not exist. * Made ast_framehook_list_fixup() do an
	  unbridge request if there are any framehooks. Also simplified the
	  loop. ASTERISK-24195 #close Reported by: Jonathan Rose Review:
	  https://reviewboard.asterisk.org/r/4046/ ........ Merged
	  revisions 424506 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/core_unreal.c, main/taskprocessor.c, channels/chan_iax2.c,
	  res/res_pjsip_session.c, main/channel.c, channels/chan_misdn.c,
	  channels/chan_skinny.c, funcs/func_frame_trace.c,
	  channels/chan_motif.c, include/asterisk/frame.h,
	  main/bridge_channel.c, channels/chan_pjsip.c,
	  channels/chan_unistim.c, include/asterisk/res_pjsip_session.h,
	  addons/chan_ooh323.c, /, include/asterisk/taskprocessor.h,
	  channels/chan_sip.c, res/res_pjsip_session.exports.in:
	  chan_pjsip: Fix deadlock when masquerading PJSIP channels.
	  Performing a directed call pickup resulted in a deadlock when
	  PJSIP channels were involved. A masquerade needs to hold onto the
	  channel locks while it swaps channel information between the two
	  channels involved in the masquerade. With PJSIP channels, the
	  fixup routine needed to push a fixup task onto the PJSIP
	  channel's serializer. Unfortunately, if the serializer was also
	  processing a task that needed to lock the channel, you get
	  deadlock. * Added a new control frame that is used to notify the
	  channels that a masquerade is about to start and when it has
	  completed. * Added the ability to query taskprocessors if the
	  current thread is the taskprocessor thread. * Added the ability
	  to suspend/unsuspend the PJSIP serializer thread so a masquerade
	  could fixup the PJSIP channel without using the serializer.
	  ASTERISK-24356 #close Reported by: rmudgett Review:
	  https://reviewboard.asterisk.org/r/4034/ ........ Merged
	  revisions 424471 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-03 15:54 +0000 [r424448]  George Joseph <george.joseph@fairview5.com>

	* /, main/sorcery.c: sorcery: Prevent SEGV in sorcery_wizard_create
	  when there's no create function When you call
	  ast_sorcery_create() you don't necessarily know which wizard is
	  going to be invoked. If it happens to be a wizard like 'config'
	  that doesn't have a 'create' virtual function you get a segfault
	  in the sorcery_wizard_create callback. This patch catches the
	  null function pointer, does an ast_assert, and logs an error.
	  Review: https://reviewboard.asterisk.org/r/4044/ ........ Merged
	  revisions 424447 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-03 13:58 +0000 [r424424-424427]  Kinsey Moore <kmoore@digium.com>

	* configs/samples/pjsip.conf.sample, /,
	  res/res_pjsip/pjsip_configuration.c: PJSIP: Restore functional
	  default for callerid_privacy The pjsip config option default
	  fixups from r424263 altered the functional default from
	  "allowed_not_screened" to "allowed". This change restores the
	  functional default value when none is provided. ........ Merged
	  revisions 424426 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/manager.c, /: Manager: Add missing fields and documentation
	  for CoreShowChannels This corrects some issues introduced in the
	  responses to the CoreShowChannels AMI command as well as adding
	  documentation for the responses. The command in Asterisk 12 was
	  missing the following fields: Duration, Application,
	  ApplicationData, and BridgedChannel and BridgedUniqueID (replaced
	  with BridgeId). ASTERISK-24262 #close Reported by: Mitch Claborn
	  Review: https://reviewboard.asterisk.org/r/4040/ ........ Merged
	  revisions 424423 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-03 07:54 +0000 [r424415]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.c, /: res_pjsip_session: Reduce SDP size by
	  removing duplicate connection lines. Due to the architecture of
	  how media streams are handled each individual handler adds
	  connection details (IP address) for it. The first media stream is
	  then used as the top level SDP connection line. In practice each
	  line ends up being the same so to reduce the SDP size
	  stream-level connection information is also added to the SDP if
	  it differs from the top level SDP connection line. ........
	  Merged revisions 424414 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-02 21:52 +0000 [r424394]  Richard Mudgett <rmudgett@digium.com>

	* /, configs/samples/pjsip.conf.sample, res/res_pjsip.c,
	  res/res_pjsip/config_transport.c: res_pjsip: Make transport
	  cipher option accept a comma separated list of cipher names.
	  Improvements to the res_pjsip transport cipher option. * Made the
	  cipher option accept a comma separated list of OpenSSL cipher
	  names. Users of realtime will be glad if they have more than one
	  name to list. * Added the CLI command 'pjsip list ciphers' so a
	  user can know what OpenSSL names are available for the cipher
	  option. * Updated the cipher option online XML documentation to
	  specify what is expected for the value. * Updated
	  pjsip.conf.sample to not indicate that ALL is acceptable since
	  ALL does not imply a preference order for the ciphers and PJSIP
	  does not simply pass the string to OpenSSL for interpretation.
	  ASTERISK-24199 #close Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/4018/ ........ Merged
	  revisions 424393 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-02 20:15 +0000 [r424373]  Jonathan Rose <jrose@digium.com>

	* /,
	  contrib/ast-db-manage/config/versions/10aedae86a32_add_outgoing_enum_va.py
	  (added): Alembic: Add enumerator value to sippeers -> directmedia
	  - 'outgoing' The 'outgoing' value was left off of the enumerator
	  when first creating the column. This patch adds it, and should
	  gracefully upgrade keeping the existing data in tact.
	  ASTERISK-23781 #close Reported by: Stephen More Review:
	  https://reviewboard.asterisk.org/r/4013/ ........ Merged
	  revisions 424372 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-02 13:35 +0000 [r424338]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, configs/samples/pjsip.conf.sample: res_pjsip: document use of
	  rewrite_contact in sample conf Without setting rewrite_contact,
	  an invite to an endpoint behind NAT will not reach it - unless
	  the endpoint itself uses STUN or TURN to discover it's public
	  URI. Thus, the use of this should be in the sample documentation.
	  Review: https://reviewboard.asterisk.org/r/4036/ ........ Merged
	  revisions 424337 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-01 22:52 +0000 [r424333]  Jonathan Rose <jrose@digium.com>

	* channels/chan_pjsip.c: chan_pjsip: Fix an assertion for channels
	  that lack formats on creation ASTERISK-24222 #close Reported by:
	  Mark Michelson Review: https://reviewboard.asterisk.org/r/4017/

2014-10-01 20:36 +0000 [r424313]  Corey Farrell <git@cfware.com>

	* res/res_hep.c, /: res_hep: Release allocation reference to
	  configuration. ASTERISK-24362 #close Reported by: Corey Farrell
	  Review: https://reviewboard.asterisk.org/r/4026/ ........ Merged
	  revisions 424312 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-01 16:37 +0000 [r424288-424291]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/pjsip_configuration.c,
	  configs/samples/pjsip.conf.sample, res/res_pjsip.c: res_pjsip:
	  Add 'dtls_fingerprint' option to configure DTLS fingerprint hash.
	  During the latest update to DTLS-SRTP support the ability to
	  configure the hash used for fingerprints was added. This gave us
	  two supported ones: SHA-1 and SHA-256. The default was
	  accordingly updated to SHA-256. Unfortunately this configuration
	  ability was not exposed within res_pjsip. This change adds a
	  dtls_fingerprint option that controls it. #SIPit31 ........
	  Merged revisions 424290 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_sdp_rtp.c: res_pjsip_sdp_rtp: Accept DTLS
	  attributes in top level, not just media session. #SIPit31
	  ........ Merged revisions 424287 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-01 12:27 +0000 [r424245-424266]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip/config_transport.c, /, res/res_pjsip/location.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  res/res_pjsip/pjsip_configuration.c,
	  configs/samples/pjsip.conf.sample: PJSIP: Handle defaults
	  properly This updates the code behind PJSIP configuration options
	  with custom handlers to deal with the assigned default values
	  properly where it makes sense and adjusting the default value
	  where it doesn't. Before applying this patch, there were several
	  cases where the default value for an option would prevent that
	  config section from loading properly. Reported by: Thomas
	  Thompson Review: https://reviewboard.asterisk.org/r/4019/
	  ........ Merged revisions 424263 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_nat.c: PJSIP: Force transport on contact rewrite
	  If contact rewriting is enabled but the contact differs in
	  transport from what is actually being used, messages after the
	  initial INVITE transaction can be sent to an incorrect
	  transport/port combination. In the case where this bug occurred
	  the remote party never received a BYE since it was sent to the
	  remote party's TCP port over UDP. Review:
	  https://reviewboard.asterisk.org/r/4032/ ........ Merged
	  revisions 424244 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-10-01 10:09 +0000 [r424179-424184]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, channels/chan_sip.c: chan_sip: Simplify some unref code by
	  removing unlink_peer_from_tables. ASTERISK-22945 #related
	  Reported by: ibercom Patches:
	  asterisk11-chan_sip-simplifies.patch uploaded by ibercom (License
	  #6599) ........ Merged revisions 424181 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 424182 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424183 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: chan_sip: Remove excess ref of realtime
	  peer before sip_poke_peer. The peer is referenced at the end of
	  sip_poke_peer, it should not get an extra ref before the call to
	  sip_poke_peer. This fixes a memory leak. ASTERISK-22945 #close
	  Reported by: ibercom Tested by: Yuriy Gorlichenko Patches:
	  asterisk11.patch uploaded by ibercom (License #6599) Review:
	  https://reviewboard.asterisk.org/r/4031/ ........ Merged
	  revisions 424176 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 424177 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424178 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-30 11:40 +0000 [r424153-424156]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_sdp_rtp.c, /: res_pjsip_sdp_rtp: Don't place an
	  extra whitespace before 'rport' and don't put IPv6 addresses in
	  brackets. #SIPit31 ........ Merged revisions 424155 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Ensure that the base
	  and mapped address for candidates is present in SDP. This change
	  fixes an issue where ICE candidates put into the SDP did not
	  contain the 'raddr' and 'rport' information for server reflexive
	  and relay candidates. #SIPit31 ........ Merged revisions 424151
	  from http://svn.asterisk.org/svn/asterisk/branches/11 ........
	  Merged revisions 424152 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-29 21:59 +0000 [r424129]  George Joseph <george.joseph@fairview5.com>

	* /, res/res_pjsip/pjsip_cli.c: pjsip_cli: Suppress header print on
	  error or no objects If there's an error on the pjsip command line
	  or there are no objects, don't print the column headers.
	  ASTERISK-24350 #close Reported-by: Brad Latus Tested-by: George
	  Joseph Tested-by: Brad Latus Review:
	  https://reviewboard.asterisk.org/r/4025/ ........ Merged
	  revisions 424128 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-29 21:26 +0000 [r424126]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, contrib/scripts/autosupport: autosupport: Fix bashism. '==' is
	  bashism (bashspecific, fails when dash is /bin/sh). Anyway, a
	  'case' works better there. Originally committed in r375059 and
	  r375060 on 2012-10-16 21:13:08. ASTERISK-20567 #close Reported
	  by: Tzafrir Cohen ........ Merged revisions 424117 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 424125 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-29 21:17 +0000 [r424097-424105]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip.c, res/res_pjsip_pubsub.c, res/res_pjsip_session.c,
	  /, res/res_pjsip_authenticator_digest.c: Simplify UUID generation
	  in several places. Replace code using ast_uuid_generate() with
	  simpler and faster code using ast_uuid_generate_str(). The new
	  code avoids a malloc(), free(), and copy. ........ Merged
	  revisions 424103 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/threadpool.c: threadpool.c: Minor cleanup fixes. * Fix
	  threadpool_alloc() prototype. * Add missing off-nominal NULL
	  check of pool in threadpool_alloc(). * searializer_create() does
	  not need to create the object with a lock as the lock is not
	  used. ........ Merged revisions 424096 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-27 12:43 +0000 [r424057]  Joshua Colp <jcolp@digium.com>

	* channels/chan_pjsip.c, res/res_pjsip_session.c, /:
	  res_pjsip_session: Add additional checks for delaying session
	  refreshes. There are certain situations which no checks existed
	  for which need to prevent session refreshes. This includes
	  sending a session refresh with SDP before SDP negotiation has
	  completed and sending a session refresh before the dialog itself
	  has been established. Checks for these have been added.
	  Additionally COLP related UPDATEs were including SDP when it is
	  not needed. Review: https://reviewboard.asterisk.org/r/4008/
	  ........ Merged revisions 424056 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-26 15:21 +0000 [r423992]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_fax.c: res_fax: Fix out of bounds error in
	  update_modem_bits(). ASTERISK-24357 #close Reported by: Jeremy
	  Laine Patches: res_fax_bounds.patch (license #6561) patch
	  uploaded by Jeremy Laine Modified patch to not use magic numbers.
	  ........ Merged revisions 423979 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 423983 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423987 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-26 08:25 +0000 [r423918]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, doc/asterisk.8: docs: Escape unescaped minus sign in
	  asterisk.8 manpage. ASTERISK-23768 #close Reported by: Jeremy
	  Lainé Patches: escape_manpage_hyphen.patch uploaded by Jeremy
	  Lainé (License #6561) ........ Merged revisions 423915 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 423916 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423917 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-25 21:01 +0000 [r423895]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip.c, /: res_pjsip.c: Add missing off nominal cleanup
	  in ast_sip_push_task_synchronous(). * Made memset the std struct
	  in ast_sip_push_task_synchronous() because if DEBUG_THREADS is
	  enabled then uninitialized lock tracking data is used. ........
	  Merged revisions 423894 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-24 18:32 +0000 [r423867]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_pjsip/pjsip_options.c, res/res_pjsip.c:
	  pjsip_options.c: Fix race condition stopping periodic out of
	  dialog OPTIONS request. The crash on the issues is a result of an
	  invalid transport configuration change when asterisk is
	  restarted. The attempt to send the qualify request fails and we
	  cleaned up. However, the callback is also called which results in
	  a double unref of the objects involved. * Put a wrapper around
	  pjsip_endpt_send_request() to detect when the passed in callback
	  is called because of an error so callers can know to not cleanup.
	  * Made send_request_cb() able to handle repeated challenges (Up
	  to 10). * Fix periodic endpoint qualify OPTIONS sched deletion
	  race by avoiding it. The sched entry will no longer self stop and
	  must be externally stopped. * Added REF_DEBUG description tags to
	  struct sched_data in pjsip_options.c. * Fix some off-nominal ref
	  leaks in schedule_qualify(), qualify_and_schedule(). * Reordered
	  pjsip_options.c module start/stop code to cleanup better on
	  error. ASTERISK-24295 #close Reported by: Rogger Padilla Review:
	  https://reviewboard.asterisk.org/r/3954/ ........ Merged
	  revisions 423866 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-24 08:53 +0000 [r423803]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, channels/chan_sip.c: chan_sip: Unref outbound proxy structure
	  on dialog/pvt destruction. Make sure outbound proxy refs are
	  always unreffed on dialog destruction. Review:
	  https://reviewboard.asterisk.org/r/4016/ ........ Merged
	  revisions 423800 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 423801 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423802 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-23 14:29 +0000 [r423783]  Mark Michelson <mmichelson@digium.com>

	* tests/test_cel.c, tests/test_cdr.c: Make CDR and CEL unit tests
	  less FRACKy. Prior to this commit, CDR and CEL tests were
	  expected to trigger FRACKs (i.e. assertions) due to the fact that
	  the channels they create have no formats on them. Some code was
	  independently added recently that attempts to prevent FRACKs from
	  occurring by failing early when attempting to set up translation
	  paths if one or both channels support no formats. Unfortunately,
	  this attempt to be helpful made the CDR and CEL tests go from
	  simply FRACKing to outright failing and in some cases, failing so
	  badly as to crash Asterisk. This commit seeks to correct past
	  mistakes by adding the ulaw format to channels created by the CDR
	  and CEL unit tests. This makes setting up translation paths
	  succeed, eliminates previously-seen FRACKs, and ultimately causes
	  the unit tests to succeed again. Review:
	  https://reviewboard.asterisk.org/r/4014

2014-09-22 19:48 +0000 [r423660-423723]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, channels/chan_sip.c: chan_sip: On INVITE retransmission, don't
	  add an extra 503 response. INVITE arrives to asterisk, asterisk
	  responds Busy(). If the INVITE is retransmitted, asterisk would
	  generate a 503 in addition to the 486. Thanks Torrey Searle for
	  providing a working regression test. ASTERISK-24335 #close
	  Review: https://reviewboard.asterisk.org/r/4003/ Patches:
	  retrans_486_invite.patch uploaded by Torrey Searle (License
	  #5334) ........ Merged revisions 423720 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 423721 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423722 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/editline/readline.c: cli.c: Fix tab completion "module
	  load" when MALLOC_DEBUG is enabled. r421600 conflicted with
	  r155763. ASTERISK-24348 #close ........ Merged revisions 423657
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 423658 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423659 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-21 01:15 +0000 [r423618-423641]  Matthew Jordan <mjordan@digium.com>

	* main/channel.c: main/channel: Unlock channel in off-nominal path
	  In r423414 (13) / r423415 (trunk), an API call that determines if
	  a format capability structure is empty was added. This returns
	  true if the format capability structure is completely empty or
	  "none". A check for this was added in channel.c's set_format
	  call. Unfortunately, when this check was true, it returned from
	  the function while still holding the channel lock. This caused
	  the CDR unit tests - which have a tendency to create channels
	  with no formats - to deadlock. Whoops. This patch unlocks the
	  channel on the off-nominal path.

	* rest-api/api-docs/events.json, /: rest-api/api-docs/events.json:
	  Remove non-compliant 'extends' attribute Prior to the release of
	  Swagger 1.2, the attribute 'extends' was being promoted as a
	  possible way to show that a particular object extends an existing
	  object. Instead, the Swagger specification went with the
	  'subTypes' attribute in the base object. This patch removes the
	  unsupported attribute; the object that the offending objects
	  proposed to extend already lists them in its 'subTypes'
	  attribute. ASTERISK-24300 #close Reported by: Bradley Watkins
	  ........ Merged revisions 423620 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* rest-api/api-docs/channels.json, rest-api/api-docs/sounds.json,
	  rest-api/api-docs/bridges.json,
	  rest-api/api-docs/recordings.json,
	  rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/endpoints.json,
	  rest-api/api-docs/mailboxes.json, rest-api/api-docs/events.json,
	  /, rest-api/api-docs/asterisk.json,
	  rest-api/api-docs/applications.json,
	  rest-api/api-docs/playbacks.json: rest-api/api-docs: Correct
	  basePath in resources to match top resources file The
	  resources.json file that defines the resource JSON files used
	  with ARI references a basePath of 'http://localhost:8088/ari'.
	  This does not match what is defined in the resource files
	  themselves, 'http://localhost:8088/stasis'. The correct base path
	  is the one that includes 'ari' in the URL; this patch updates the
	  various resource JSON files to have the correct basePath.
	  ASTERISK-24339 #close Reported by: Bradley Watkins ........
	  Merged revisions 423617 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-19 19:51 +0000 [r423580]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_notify.c: res_pjsip_notify: Fix crash on
	  unload/load and don't say the module doesn't exist on reload.
	  When unloading the module did not unregister the CLI commands
	  causing a crash upon load when they were registered again. When
	  reloading the module the return value from the config options
	  framework was not checked to determine if an error occurred or
	  not. This caused a message to be output saying the module did not
	  exist when reloading if no changes were present. AST-1433 #close
	  AST-1434 #close ........ Merged revisions 423579 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-19 17:08 +0000 [r423561]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_pjsip.c, res/res_pjsip_sdp_rtp.c:
	  res_pjsip_sdp_rtp.c: Fix native formats containing formats that
	  were not negotiated. Outgoing PJSIP calls can result in
	  non-negotiated formats listed in the channel's native formats if
	  video formats are listed in the endpoint's configuration. The
	  resulting call could then use a non-negotiated format resulting
	  in one way audio. * Simplified the update of session->req_caps in
	  set_caps(). Why do something in five steps when only one is
	  needed? AFS-162 #close Review:
	  https://reviewboard.asterisk.org/r/4000/

2014-09-19 15:18 +0000 [r423524-423530]  Jonathan Rose <jrose@digium.com>

	* /, main/stasis_channels.c: Stasis_channels: Resolve unfinished
	  Dials when doing masquerades Masquerades into channels that are
	  in the dialing state don't end their dial and this goes against
	  the model for things like CDRs and generating Dial end manager
	  actions and such. ASTERISK-24237 #close Reported by: Richard
	  Mudgett Review: https://reviewboard.asterisk.org/r/3990/ ........
	  Merged revisions 423525 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_iax2.c: chan_iax2: Fix a crash when using chan_iax2
	  jitterbuffer settings Caused by format changes in Asterisk 13
	  ASTERISK-24265 #close Reported by: Dafi Ni Review:
	  https://reviewboard.asterisk.org/r/3999/

2014-09-19 12:45 +0000 [r423504]  Kinsey Moore <kmoore@digium.com>

	* include/asterisk/framehook.h, /, main/framehook.c,
	  res/res_pjsip_t38.c: PJSIP: Prevent T38 framehook being put on
	  wrong channel This change gives framehooks a reverse-direction
	  masquerade callback in addition to chan_fixup_cb similar to the
	  callback added to datastores to handle the same situation. The
	  new callback provides the same parameters as the fixup callback,
	  but is called on the new channel's framehooks before moving
	  framehooks from the old channel to the new channel. This gives
	  the framehooks an oppurtunity to decide whether they should
	  remain on the new channel or be removed. This new callback is
	  used to prevent the PJSIP T.38 framehook from remaining on a
	  masqueraded channel if the new channel is not also a PJSIP
	  channel. This was causing a crash when a local channel was
	  masqueraded into a PJSIP channel and the framehook was executed
	  on the local channel since the channel's tech private data was
	  not structured as expected. Review:
	  https://reviewboard.asterisk.org/r/4001/ ........ Merged
	  revisions 423503 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-18 19:30 +0000 [r423482]  Sean Bright <sean@malleable.com>

	* res/res_pjsip/config_auth.c, /: res_pjsip: Don't require a
	  password when doing userpass authentication. An empty password is
	  valid for username/password authentication so we should allow
	  password to be empty/not supplied. Review:
	  https://reviewboard.asterisk.org/r/3988 ........ Merged revisions
	  423481 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-18 19:22 +0000 [r423478]  George Joseph <george.joseph@fairview5.com>

	* tests/test_strings.c, /, main/utils.c,
	  include/asterisk/strings.h: utils: Create ast_strsep function
	  that ignores separators inside quotes This function acts like
	  strsep with three exceptions... * The separator is a single
	  character instead of a string. * Separators inside quotes are
	  treated literally instead of like separators. * You can elect to
	  have leading and trailing whitespace and quotes stripped from the
	  result and have '\' sequences unescaped. Like strsep, ast_strsep
	  maintains no internal state and you can call it recursively using
	  different separators on the same storage. Also like strsep, for
	  consistent results, consecutive separators are not collapsed so
	  you may get an empty string as a valid result. Tested by: George
	  Joseph Review: https://reviewboard.asterisk.org/r/3989/ ........
	  Merged revisions 423476 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-18 18:31 +0000 [r423462]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pubsub.c: Add subscription state test events. These
	  are needed for a set of batched notification RLS tests that are
	  about to be committed to the testsuite. Review:
	  https://reviewboard.asterisk.org/r/3967

2014-09-18 17:11 +0000 [r423425]  Jonathan Rose <jrose@digium.com>

	* res/res_pjsip_endpoint_identifier_ip.c, /:
	  res_pjsip_endpoint_identifier_ip: Fix parsing of match value with
	  CIDR Also fixes comma separates match lists ASTERISK-24290 #close
	  Reported by: Ray Crumrine Review:
	  https://reviewboard.asterisk.org/r/3995/ ........ Merged
	  revisions 423417 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-18 17:09 +0000 [r423418-423423]  Richard Mudgett <rmudgett@digium.com>

	* bridges/bridge_softmix.c: bridge_softmix.c: Made use
	  ao2_replace() instead of the inline equivalent. * Clarified some
	  read/write format comments. * Fixed a doxygen tag typo.

	* main/astobj2.c, contrib/scripts/refcounter.py, /:
	  astobj2.c/refcounter.py: Fix to deal with invalid object refs. *
	  Make astob2 REF_DEBUG output an invalid object line when an
	  invalid ao2 object ref/unref is attempted. This is similar to the
	  constructor/destructor lines. * Fixed refcounter.py to handle
	  skewed objects that have constructor/destructor states. * Made
	  refcounter.py highlight the invalid ao2 object refs by putting
	  them in their own section of the processed output file. * Made
	  refcounter.py highlight unreffing an object by more than one that
	  results in a negative ref count and the object being destroyed.
	  The abnormally destroyed object is reported in the invalid and
	  finalized object sections of the output. Review:
	  https://reviewboard.asterisk.org/r/3971/ ........ Merged
	  revisions 423349 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 423400 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423416 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-18 16:37 +0000 [r423348-423414]  Mark Michelson <mmichelson@digium.com>

	* include/asterisk/format_cap.h, main/channel.c, main/format_cap.c,
	  main/translate.c: Add API call to determine if format capability
	  structure is "empty". Empty here means that there are no formats
	  in the format_cap structure or the only format in it is the
	  "none" format. I've added calls to check the emptiness of a
	  format_cap in a few places in order to short-circuit operations
	  that would otherwise be pointless as well as to prevent some
	  assertions from being triggered in cases where channels with no
	  formats are used.

	* /, res/res_fax_spandsp.c: res_fax_spandsp: Properly handle
	  cleanup before starting FAXes. If faxing fails at a very early
	  stage, then it is possible for us to pass a NULL t30 state
	  pointer to spandsp, which spandsp is none too pleased with. This
	  patch ensures that we pass the correct pointer to spandsp in the
	  situation where we have not yet set our local t30 state pointer.
	  ASTERISK-24301 #close Reported by Matt Jordan Patches:
	  ASTERISK-24301-fax.diff Uploaded by Mark Michelson (License
	  #5049) ........ Merged revisions 423360 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423365 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_mwi.c,
	  res/res_pjsip_dialog_info_body_generator.c,
	  res/res_pjsip_xpidf_body_generator.c,
	  res/res_pjsip_mwi_body_generator.c, res/res_pjsip_pubsub.c,
	  res/res_pjsip_exten_state.c, include/asterisk/res_pjsip_pubsub.h,
	  res/res_pjsip_pidf_body_generator.c: res_pjsip_pubsub: Add some
	  type safety when generating NOTIFY bodies. res_pjsip_pubsub has
	  two separate checks that it makes when a SUBSCRIBE arrives. * It
	  checks that there is a subscription handler for the Event * It
	  checks that there are body generators for the types in the Accept
	  header The problem is, there's nothing that ensures that these
	  two things will actually mesh with each other. For instance,
	  Asterisk will accept a subscription to MWI that accepts pidf+xml
	  bodies. That doesn't make sense. With this commit, we add some
	  type information to the mix. Subscription handlers state they
	  generate data of type X, and body generators state that they
	  consume data of type X. This way, Asterisk doesn't end up in some
	  hilariously mismatched situation like the one in the previous
	  paragraph. ASTERISK-24136 #close Reported by Mark Michelson
	  Review: https://reviewboard.asterisk.org/r/3877 Review:
	  https://reviewboard.asterisk.org/r/3878 ........ Merged revisions
	  423344 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-18 15:13 +0000 [r423284]  George Joseph <george.joseph@fairview5.com>

	* /, res/res_pjsip/location.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip/config_transport.c,
	  include/asterisk/res_pjsip.h, res/res_pjsip/config_auth.c:
	  res_pjsip: ami: Fix error in AMI output when an endpoint has no
	  transport When no transport is associated to an endpoint, the AMI
	  output for PJSIPShowEndpoint indicates an error instead of
	  silently ignoring the missing transport. This patch causes the
	  error to appear only if a transport was specified on the endpoint
	  and the transport doesn't exist. It also fixes an issue with
	  counting the objects that were actually found. ASTERISK-24161
	  #close ASTERISK-24331 #close Tested by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3998/ ........ Merged
	  revisions 423282 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-18 15:00 +0000 [r423281]  David M. Lee <dlee@digium.com>

	* makeopts.in, Makefile: Only install dahdi_span_config_hook if
	  DAHDI is enabled This patch changes the install to only install
	  the hook script if DAHDI is enabled. It also adds the script to
	  the uninstall task, and moves the DAHDI_UDEV_HOOK_DIR variable so
	  that it's not between the _MAKEOPTS variables and their comment.
	  This allows installs which specify a --prefix to work normally,
	  as long as they don't enable DAHDI. Review:
	  https://reviewboard.asterisk.org/r/3972/

2014-09-18 14:45 +0000 [r423279]  George Joseph <george.joseph@fairview5.com>

	* main/manager.c, /, include/asterisk/config.h, main/config.c:
	  config: bug: Fix SEGV in ast_category_insert when matching
	  category isn't found If you call ast_category_insert with a match
	  category that doesn't exist, the list traverse runs out of 'next'
	  categories and you get a SEGV. This patch adds check for the
	  end-of-list condition and changes the signature to return an int
	  for success/failure indication instead of a void. The only
	  consumer of this function is manager and it was also changed to
	  use the return value. Tested by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3993/ ........ Merged
	  revisions 423276 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 423277 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423278 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-17 18:05 +0000 [r423209-423255]  Joshua Colp <jcolp@digium.com>

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Ensure that the
	  thread terminating pj stuff is registered. ........ Merged
	  revisions 423253 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423254 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Fix 100% CPU usage
	  due to timer heap thread spinning. Side note: I need a vacation.
	  ........ Merged revisions 423210 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423211 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Fix building when
	  pjproject is not used. ........ Merged revisions 423207 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423208 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-16 16:32 +0000 [r423192]  Scott Griepentrog <sgriepentrog@digium.com>

	* apps/app_voicemail.c, include/asterisk/file.h, main/file.c:
	  Voicemail: get correct duration when copying file to vm Changes
	  made during format improvements resulted in the recording to
	  voicemail option 'm' of the MixMonitor app writing a zero length
	  duration in the msgXXXX.txt file. This change introduces a new
	  function ast_ratestream(), which provides the sample rate of the
	  format associated with the stream, and updates the app_voicemail
	  function for ast_app_copy_recording_to_vm to calculate the right
	  duration. Review: https://reviewboard.asterisk.org/r/3996/
	  ASTERISK-24328 #close

2014-09-16 12:12 +0000 [r423152-423173]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.c, /: res_pjsip_session: Fix usage of wrong
	  memory pool when creating local SDP. ........ Merged revisions
	  423172 from http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/rtp_engine.h, res/res_rtp_asterisk.c, /:
	  res_rtp_asterisk: Fix a myriad of TURN client issues. 1. The
	  number of file descriptors an ioqueue instance can handle is
	  fixed, so we now spawn the required number to handle the load. 2.
	  Our transport identifiers were exceeding the range supported by
	  pjnath. 3. The TURN client did not set up client binding causing
	  needless bandwidth usage. 4. The code no longer updates address
	  information on each packet. 5. STUN traffic was getting looped
	  back to Asterisk instead of going through the TURN server. 6.
	  Synchronization now ensures things are completely setup or
	  destroyed. 7. Logging now reflects the target the TURN server is
	  sending to/receiving from on our behalf. ASTERISK-23577 #close
	  Reported by: Jay Jideliov ASTERISK-23634 #close Reported by:
	  Roman Skvirsky Review: https://reviewboard.asterisk.org/r/3982/
	  ........ Merged revisions 423150 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423151 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-15 10:49 +0000 [r423069-423129]  Walter Doekes <walter+asterisk@wjd.nu>

	* /,
	  contrib/ast-db-manage/config/versions/5950038a6ead_fix_pjsip_verifiy_typo.py
	  (added): contrib: Fix verifyi typo in alembic DB script
	  ps_transport table. Reported by: Zogot (on IRC) Patches: tmp.diff
	  uploaded by Zogot, cleaned up by me. ........ Merged revisions
	  423128 from http://svn.asterisk.org/svn/asterisk/branches/12

	* configs/samples/sip.conf.sample, /: chan_sip: Clarify that
	  sipdebug=yes cannot be undone by the CLI. Document it in
	  sip.conf. ASTERISK-24249 #close Reported by: Avinash Mohod
	  Review: https://reviewboard.asterisk.org/r/3926/ ........ Merged
	  revisions 423066 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 423067 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 423068 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-12 16:09 +0000 [r422985]  Jonathan Rose <jrose@digium.com>

	* main/config.c, /: Realtime: Fix a bug that caused realtime
	  destroy command to crash Also has could affect with anything that
	  goes through ast_destroy_realtime. If a CLI user used the command
	  'realtime destroy <family>' with only a single column/value pair,
	  Asterisk would crash when trying to create a variable list from a
	  NULL value. ASTERISK-24231 #close Reported by: Niklas Larsson
	  Review: https://reviewboard.asterisk.org/r/3985/ ........ Merged
	  revisions 422984 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-11 22:16 +0000 [r422965]  Mark Michelson <mmichelson@digium.com>

	* /, main/app.c: Remove undocumented default behavior of
	  ast_play_and_record_full acceptdtmf. ast_play_and_record_full()
	  has a parameter called "acceptdtmf" that is a string of
	  acceptable DTMF digits that may be pressed by a caller to end and
	  accept the recording. ARI uses this function in order to perform
	  recording, and it provides options for what is passed as
	  acceptdtmf to ast_play_and_record_full(). By default, ARI passes
	  an empty string, with the intention that no DTMF can be used to
	  end the recording. The problem is that ast_play_and_record_full()
	  attempts to be "helpful" by setting "#" as the acceptdtmf if an
	  empty string or NULL pointer has been passed in. With ARI, this
	  results in unexpected behavior occurring if you have attempted to
	  intercept "#" yourself in order to perform some other
	  manipulation of the live recording. This change removes the
	  "helpful" behavior by no longer accepting "#" as a default
	  acceptdtmf if none is specified by the caller of
	  ast_play_and_record_full(). This makes the ARI scenario work as
	  expected. The other callers of ast_play_and_record_full() are
	  app_voicemail and app_minivm, and in both cases, they pass an
	  explicit "#" to ast_play_and_record_full() as acceptdtmf, so they
	  are unaffected by this change. ........ Merged revisions 422964
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-10 16:04 +0000 [r422905]  George Joseph <george.joseph@fairview5.com>

	* /, main/config.c: config: bug: fix truncation of included config
	  files on permissions error ast_config_text_file_save() currently
	  truncates include files as they are processed. If a subsequent
	  include file or the main config file has a permissions error that
	  prevents writing, earlier include files are left truncated
	  resulting in a frantic search for backups. This patch causes
	  ast_config_text_file_save to check for write access on all files
	  before it truncates any of them. Will be applied 1.8 > trunk.
	  Tested by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3986/ ........ Merged
	  revisions 422900 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 422903 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422904 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-10 15:59 +0000 [r422901]  Sean Bright <sean@malleable.com>

	* res/res_pjsip/config_auth.c, /: pjsip/config_auth.c: Add missing
	  whitespace to log messages. The errors generated when validating
	  'auth' settings are missing a space which makes the messages a
	  little confusing. ........ Merged revisions 422899 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-09 20:01 +0000 [r422883]  Rusty Newton <rnewton@digium.com>

	* /, sounds/sounds.xml, sounds/Makefile: Sounds/BuildSystem:
	  Modifications to include new releases and Japanese language.
	  Modifying Makefile and sounds.xml to include new core 1.4.26 and
	  extra 1.4.15 sound prompt releases, plus the new Japanese core
	  sound prompts contributed by QLOOG. ASTERISK-23324 Reported by:
	  Kevin McCoy Tested by: Rusty Newton ........ Merged revisions
	  422789 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 422790 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422791 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-08 18:03 +0000 [r422851-422855]  Mark Michelson <mmichelson@digium.com>

	* configs/samples/pjsip.conf.sample: Add note about configuring
	  list_items on a single line.

	* configs/samples/pjsip.conf.sample: Add sample configuration for
	  resource lists. On review /r/3977, it was recommended to note in
	  the sample configuration about the size limitation for resource
	  lists. However, since there was no section in the sample
	  configuration at all for resource list subscriptions, I decided
	  to make a separate commit where I have added the necessary sample
	  configuration as well as the size limitation warning.

	* res/res_pjsip_pubsub.c: Pre-allocate transmission data buffer for
	  RLS NOTIFY requests. PJSIP, unless a constant is modified at
	  compilation time, limits SIP requests to 4000 bytes. Full-state
	  RLS notifications can easily exceed this limit with moderately
	  small lists. This changeset allows for Asterisk to work around
	  this size limit by performing its own allocation of the
	  transmission data buffer. This way, Asterisk can allocate a
	  buffer that exceeds the built-in maximum. We still impose our own
	  limit of 64000 bytes, mainly because making allocations larger
	  than that is a bit absurd. ASTERISK-24181 #close Reported by Mark
	  Michelson Review: https://reviewboard.asterisk.org/r/3977

2014-09-08 15:41 +0000 [r422836]  Jonathan Rose <jrose@digium.com>

	* res/res_pjsip_pubsub.c: res_pjsip_pubsub: Check supported headers
	  for eventlist when subscribing to resource list
	  https://wiki.asterisk.org/wiki/display/AST/Resource+List+Subscription+Test+Plan
	  According to the off-nominal plan, if evenlist support is not
	  specified in a SUBSCRIBE's supported header(s), that subscription
	  should be rejected with an error. ASTERISK-23871 Reported by:
	  Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/3960/diff/#index_header

2014-09-06 22:49 +0000 [r422767-422770]  Matthew Jordan <mjordan@digium.com>

	* /, main/cdr.c: main/cdr: Copy over location information during a
	  fork When a CDR is forked, a new CDR is created and appended to
	  the CDR chain for the Party A. The forked CDR starts life off as
	  a clone of the last non-finalized for the particular Party A. In
	  the past, merely copying over the snapshots for Party A/Party B
	  would be sufficient. However, as the CDRs now contain cached
	  information from Party A - specifically application/data,
	  context, and extension - we need to copy that over during a fork
	  as well. Huzzah for unit tests catching this when the
	  context/extension were derived from a cached value on the CDR
	  instead of on Party A. ........ Merged revisions 422769 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/rtp_engine.c, /: main/rtp_engine: Format NTP timestamps as
	  unsigned ints On some systems, a timeval's tv_sec/tv_usec will be
	  unsigned lont ints, as opposed to long ints. When the RTP engine
	  formats these as strings, it was previously formatting them as
	  signed integers, which can result in some odd negative timestamp
	  values (particularly on 32-bit systems). This patch formats the
	  values as unsigned long integers. ........ Merged revisions
	  422766 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-06 19:12 +0000 [r422747]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_sdp_rtp.c, /: res_pjsip_sdp_rtp: Fix retrieval of
	  "ice-pwd" attribute if in session and not media stream. ........
	  Merged revisions 422746 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-05 22:03 +0000 [r422716-422719]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, /, apps/app_macro.c, include/asterisk/channel.h,
	  apps/app_stack.c: main/cdrs: Preserve context/extension when
	  executing a Macro or GoSub The context/extension in a CDR is
	  generally considered the destination of a call. When looking at a
	  2-party call CDR, users will typically be presented with the
	  following: context exten channel dest_channel app data default
	  1000 SIP/8675309 SIP/1000 Dial SIP/1000,,20 However, if the Dial
	  actually takes place in a Macro, the current behaviour in 12 will
	  result in the following CDR: context exten channel dest_channel
	  app data macro-dial s SIP/8675309 SIP/1000 Dial SIP/1000,,20 The
	  same is true of a GoSub: context exten channel dest_channel app
	  data subs dial_stuff SIP/8675309 SIP/1000 Dial SIP/1000,,20 This
	  generally makes the context/exten fields less than useful. It
	  isn't hard to preserve these values in the CDR state machine;
	  however, we need to have something that informs us when a channel
	  is executing a subroutine. Prior to this patch, there isn't
	  anything that does this. This patch solves this problem by adding
	  a new channel flag, AST_FLAG_SUBROUTINE_EXEC. This flag is set on
	  a channel when it executes a Macro or a GoSub. The CDR engine
	  looks for this value when updating a Party A snapshot; if the
	  flag is present, we don't override the context/exten on the main
	  CDR object. In a funny quirk, executing a hangup handler must
	  *not* abide by this logic, as the endbeforehexten logic assumes
	  that the user wants to see data that occurs in hangup logic,
	  which includes those subroutines. Since those execute outside of
	  a typical Dial operation (and will typically have their own
	  dedicated CDR anyway), this is unlikely to cause any heartburn.
	  Review: https://reviewboard.asterisk.org/r/3962/ ASTERISK-24254
	  #close Reported by: tm1000, Tony Lewis Tested by: Tony Lewis
	  ........ Merged revisions 422718 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: main/cdr: Fix crash/memory consumption in CDRs in
	  multi-party bridge scenarios This patch fixes an issue where CDRs
	  would get stuck generating an infinite number of CDRs, eventually
	  crashing Asterisk (and consuming a lot of memory along the way).
	  When a channel enters into a multi-party bridge, the CDR engine
	  creates mappings of each participant to each other participant,
	  picking the 'A' party as it goes. So, if we have four channels in
	  a multi-party bridge (Alice, Bob, Charlie, Denise), we would have
	  something like: Alice => Bob Alice => Charlie Alice => Denise Bob
	  => Charlie Bob => Denise Charlie => Denise This works fine when
	  participants enter the bridge a single time. When a participant
	  leaves a bridge, the CDRs for that channel are transitioned to a
	  finalized state. The bug occurs if Bob rejoins. When the CDR
	  engine creates mappings between the channels, it walks through
	  all the participants currently in the bridge, and realizes that
	  no one in the bridge can create a CDR with the channel (Bob). As
	  such it creates a new CDR for the candidate and appends it to
	  that candidate's chain. Unfortunately, on this particular code
	  path, it doesn't stop traversing the candidate's chain. Since we
	  just added ourselves to the chain, this causes the loop to keep
	  going, constantly adding new CDRs. This patch makes it so the
	  engine bails when it creates a CDR match in this case. Review:
	  https://reviewboard.asterisk.org/r/3964/ ASTERISK-24241 #close
	  Reported by: Deepak Singh Rawat Tested by: Deepak Singh Rawat
	  ASTERISK-24208 Reported by: Frankie Chin ........ Merged
	  revisions 422715 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-05 20:35 +0000 [r422700]  Richard Mudgett <rmudgett@digium.com>

	* funcs/func_channel.c: func_channel.c: Add missing locking to some
	  CHANNEL() requests. * The CHANNEL() audionativeformat,
	  videonativeformat, audioreadformat, and audiowriteformat now need
	  locking since the media format rework when accessing the
	  channel's format pointers. * Increased the buffer size for
	  CHANNEL() audionativeformat and videonativeformat output strings
	  since the allow=all can be a lengthy list. * Tweaked the
	  CHANNEL() XML documentation for secure_bridge_signaling,
	  secure_bridge_media, and state. * Ensured the output buffer is
	  initialized for secure_bridge_signaling and secure_bridge_media.
	  * Made use the locked_copy_string() macro instead of inlining it
	  for trace and checkhangup.

2014-09-05 20:11 +0000 [r422665-422684]  Jonathan Rose <jrose@digium.com>

	* main/dial.c, include/asterisk/dial.h: Dial API: Add a dial option
	  to indicate the dialed channel will replace dialer Adds an option
	  to the dial API that marks an outgoing dial as replacing the
	  dialing channel for the purpose of propagating accountcode. When
	  it is used, AST_CHANNEL_REQUESTOR_REPLACEMENT is used instead of
	  AST_CHANNEL_REQUESTOR_BRIDGE_PEER when setting accountcodes on
	  the involved channels with ast_channel_req_accountcodes. Review:
	  https://reviewboard.asterisk.org/r/3968/

	* main/cli.c, /: Call IDs: Fix appearance of call ID in core show
	  channels when NULL NULL call IDs were meant to appear as '(none)'
	  but instead were showing the contents of an uninitialized
	  character buffer. ASTERISK-24223 Review:
	  https://reviewboard.asterisk.org/r/3979/ ........ Merged
	  revisions 422664 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-05 17:36 +0000 [r422661]  Richard Mudgett <rmudgett@digium.com>

	* main/devicestate.c, channels/chan_iax2.c: devicestate.c: Minor
	  tweaks * In ast_state_chan2dev() use ARRAY_LEN() instead of a
	  sentinel value in chan2dev[]. * Fix some comments in chan_iax2.c.

2014-09-05 13:28 +0000 [r422646]  Kinsey Moore <kmoore@digium.com>

	* menuselect/menuselect.c: Menuselect: Fix incorrect enabling on
	  failed deps This corrects a situation where menuselect can
	  incorrectly enable a module by default that has defaultenabled
	  set to "no" and has failed/non-selected dependencies. The bug is
	  due to an inverted test when checking for whether the given
	  module should be set to enabled by default on load. Review:
	  https://reviewboard.asterisk.org/r/3975/ Reported by: John
	  Bigelow

2014-09-04 21:23 +0000 [r422631]  Jonathan Rose <jrose@digium.com>

	* main/manager.c, /: Manager: Require read permission for SYSTEM in
	  order to send FullyBooted Review:
	  https://reviewboard.asterisk.org/r/3969/ ........ Merged
	  revisions 422584 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 422625 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422626 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-03 14:05 +0000 [r422558]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_transport_websocket.c, /:
	  res_pjsip_transport_websocket: Fix crash when the Contact header
	  is not a URI. The code for changing the Contact header wrongly
	  assumed that the Contact would always contain a URI. This is
	  incorrect. ASTERISK-24271 Reported by: Dafi Ni ........ Merged
	  revisions 422557 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-02 20:29 +0000 [r422542]  Mark Michelson <mmichelson@digium.com>

	* /, channels/chan_pjsip.c, res/res_pjsip_diversion.c,
	  res/res_pjsip_session.c, include/asterisk/res_pjsip_session.h:
	  Resolve race condition where channels enter dialplan application
	  before media has been negotiated. Testsuite tests will
	  occasionally fail because on reception of a 200 OK SIP response,
	  an AST_CONTROL_ANSWER frame is queued prior to when media has
	  finished being negotiated. This is because session supplements
	  are called into before PJSIP's inv_session code has told us that
	  media has been updated. Sometimes the queued answer frame is
	  handled by the PBX thread before the ensuing media negotiations
	  occur, causing a test failure. As it turns out, there is another
	  place that session supplements could be called into, which is
	  after media has finished getting negotiated. What this commit
	  introduces is a means for session supplements to indicate when
	  they wish to be called into when handling an incoming SIP
	  response. By default, all session supplements will be run at the
	  same point that they were prior to this commit. However, session
	  supplements may indicate that they wish to be handled earlier
	  than normal on redirects, or they may indicate they wish to be
	  handled after media has been negotiated. In this changeset, two
	  session supplements have been updated to indicate a preference
	  for when they should be run: res_pjsip_diversion executes before
	  handling redirection in order to get information from the
	  Diversion header, and chan_pjsip now handles responses to INVITEs
	  after media negotiation to fix the race condition mentioned
	  previously. ASTERISK-24212 #close Reported by Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3930 ........ Merged revisions
	  422536 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-09-01 14:16 +0000 [r422504-422507]  Matthew Jordan <mjordan@digium.com>

	* main/cli.c, /: main/cli: Do not attempt to show CDR data for
	  internal channels Internal channels don't have CDRs. Querying the
	  CDR engine for their variables will make it cranky. ........
	  Merged revisions 422506 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis.c, /, res/stasis/stasis_bridge.c: res_stasis:
	  Don't play MoH to channels by default when added to holding
	  bridges When ARI manipulates a bridge, it generally doesn't care
	  what the mixing technology is. Operations on a bridge initiated
	  through ARI should perform their action in generally the same
	  way, regardless of the bridge's mixing technology. While the
	  mixing technology may determine how media flows to channels, the
	  actual operations on a bridge themselves should be the same.
	  Currently, this isn't the case with holding bridges. When a
	  channel joins without a role, MoH is started on that channel
	  automatically. Subsequent bridge operations that would stop MoH
	  would fail (as there is no Announcer channel playing MoH to the
	  bridge). Starting MoH on the bridge will also create two MoH
	  streams: one from the MoH being played on the participant
	  channel, and one from the announcer channel. From the perspective
	  of ARI users, this is counter-intuitive - I would not expect MoH
	  to be started for me. The mixing technology determines how media
	  is shared between participants, not the application experience.
	  This patch does the following: * The Stasis bridge class now
	  inspects channels as they are going into a bridge. If the bridge
	  has a holding capability, and the channel has no roles, we give
	  it a participant role and mark the default behaviour to have no
	  entertainment. This allows addChannel operations to continue to
	  set a participant role with an entertainment option if it felt
	  like it (or could do it). * The music on hold channel is now
	  Stasis approved (tm) Review:
	  https://reviewboard.asterisk.org/r/3929/ ASTERISK-24264 #close
	  Reported by: Samuel Galarneau Tested by: Samuel Galarneau
	  ........ Merged revisions 422503 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-30 17:32 +0000 [r422442-422445]  George Joseph <george.joseph@fairview5.com>

	* apps/app_confbridge.c, /: confbridge: Add Duration to
	  ConfbridgeList event The ConfbridgeList event doesn't include how
	  long the user has been a member of the conference. This patch
	  adds Duration (seconds) which is based on user->chan->answertime.
	  Tested by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3955/ ........ Merged
	  revisions 422444 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/manager.c, /: manager: Make WaitEvent action respect
	  eventfilters A WaitEvent issued via an http session isn't
	  respecting eventfilters defined for the user. I just added a
	  match_filter to the predicate that controls astman_append. Tested
	  by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3958/ ........ Merged
	  revisions 422439 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 422440 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422441 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-29 19:40 +0000 [r422374-422379]  Matthew Jordan <mjordan@digium.com>

	* doc/smsq.8 (added), /: doc: Add a manpage for the smsq utility
	  This patch adds a manpage for the smsq utility. Note that this is
	  one of the patches the Debian distro applies for the Asterisk
	  project, as per ASTERISK-24191. Review:
	  https://reviewboard.asterisk.org/r/3895/ ASTERISK-24171 #close
	  Reported by: Jeremy Laine patches: smsq.8 uploaded by Jeremy
	  Laine (License 6561) ........ Merged revisions 422376 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 422377 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422378 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* doc/aelparse.8 (added), /: doc: Add a manpage for the aelparse
	  utility This patch adds a manpage for the aelparse utility. Note
	  that this is one of the patches the Debian distro applies for the
	  Asterisk project, as per ASTERISK-24191. Review:
	  https://reviewboard.asterisk.org/r/3896/ ASTERISK-24171 #close
	  Reported by: Jeremy Laine patches: aelparse.8 uploaded by Jeremy
	  Laine (License 6561) ........ Merged revisions 422371 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 422372 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422373 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-29 19:05 +0000 [r422359]  Scott Griepentrog <sgriepentrog@digium.com>

	* channels/chan_sip.c: The assertion that peer was not found on
	  final event message was being triggered on configuration reload.
	  This patch changes that case to just return instead. Review:
	  https://reviewboard.asterisk.org/r/3953/ Commited in trunk
	  revision 422358

2014-08-28 21:54 +0000 [r422296]  Matthew Jordan <mjordan@digium.com>

	* LICENSE, /: LICENSE: Clarify language in Asterisk's LICENSE to
	  allow for linking to UniMRCP The UniMRCP project distributes
	  Asterisk modules that integrate Asterisk with UniMRCP, and other
	  Asterisk users use the UniMRCP library as well. Unfortunately,
	  the UniMRCP license is Apache 2.0, which per the Free Software
	  Foundation, is not a compatible license with the GPLv2. "Please
	  note that this license is not compatible with GPL version 2,
	  because it has some requirements that are not in that GPL
	  version. These include certain patent termination and
	  indemnification provisions. The patent termination provision is a
	  good thing, which is why we recommend the Apache 2.0 license for
	  substantial programs over other lax permissive licenses." On the
	  other hand, UniMRCP is a great project and we'd like to let
	  people use it with Asterisk. This patch updates the LICENSE text
	  to allow users to link Asterisk with UniMRCP and distribute the
	  resulting binaries. ........ Merged revisions 422293 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 422294 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422295 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-28 20:30 +0000 [r422276]  Michael L. Young <elgueromexicano@gmail.com>

	* /, channels/chan_iax2.c: chan_iax2: Fix Dynamic IAX2
	  Registrations After Temporary DNS Failure The reporter on the
	  issue found some issues when upgrading from version 10 to 11 on
	  55 hosts. Two situations that can occur with dynamic
	  registrations. 1. With dnsmgr disabled, if the host is not
	  resolvable we are not trying to resolve the host again when it is
	  time to attempt to register again. This results in never
	  registering to the host. 2. With dnsmgr enabled, when the host is
	  temporarily not resolvable the address is set to 0.0.0.0:0 and
	  then when the host is resolvable the port is not being restored
	  and stays set to 0. This patch resolves these two issues by: *
	  Storing the hostname so that it can be used for resolving with
	  DNS. * Resolve the hostname on the next scheduled attempt to
	  register. * Storing the port used to reach the host so that when
	  the hostname is resolvable again, we can set the port again if
	  the port is still unset after looking up the host. ASTERISK-23767
	  #close Reported by: David Herselman Tested by: David Herselman,
	  Michael L. Young Patches:
	  asterisk-23767-dns_reg_retry_and_set_port_11_v3.diff uploaded by
	  Michael L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/3856/ ........ Merged
	  revisions 422274 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422275 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-28 17:25 +0000 [r422256]  Richard Mudgett <rmudgett@digium.com>

	* /, UPGRADE.txt: Added ConfBridge AMI event note to UPGRADE.txt.
	  ........ Merged revisions 422255 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-28 15:49 +0000 [r422239]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pubsub.c: Fix bug that did not allow for multiple
	  batched RLS notifications to be sent. A misunderstanding of how
	  the scheduler worked caused further batched notifications beyond
	  the first not to get scheduled. Now we reset our scheduler ID to
	  -1 after the batched notification is sent. This way, further
	  notifications can be scheduled when they arise.

2014-08-28 00:36 +0000 [r422200-422215]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip/pjsip_options.c, /: res/res_pjsip/pjsip_options.c:
	  Eliminate excessive RAII_VAR usage. * Fix off nominal ref leak in
	  find_or_create_contact_status(). * Add missing NULL check of
	  status in update_contact_status() and init_start_time(). ........
	  Merged revisions 422214 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/sched.c, include/asterisk/sched.h: sched: Fix typo and
	  whitespace change.

2014-08-27 17:29 +0000 [r422177]  George Joseph <george.joseph@fairview5.com>

	* /, apps/confbridge/confbridge_manager.c, apps/app_confbridge.c:
	  confbridge: Add 'Admin' param to join, leave, mute, unmute and
	  talking events Currently there's no way to tell if a user is an
	  admin or not when receiving the join, leave, mute, unmute and
	  talking events. This patch adds that capability. Tested by:
	  George Joseph Review: https://reviewboard.asterisk.org/r/3950/
	  ........ Merged revisions 422176 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-27 15:31 +0000 [r422154]  Kinsey Moore <kmoore@digium.com>

	* include/asterisk/utils.h, /, channels/chan_sip.c,
	  tests/test_callerid.c (added), tests/test_utils.c,
	  main/callerid.c, main/utils.c, res/res_pjsip_caller_id.c:
	  CallerID: Fix parsing of malformed callerid This allows the
	  callerid parsing function to handle malformed input strings and
	  strings containing escaped and unescaped double quotes. This also
	  adds a unittest to cover many of the cases where the parsing
	  algorithm previously failed. Review:
	  https://reviewboard.asterisk.org/r/3923/ Review:
	  https://reviewboard.asterisk.org/r/3933/ ........ Merged
	  revisions 422112 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 422113 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 422114 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-26 23:28 +0000 [r422091]  George Joseph <george.joseph@fairview5.com>

	* apps/app_confbridge.c, /: confbridge: Make kick, mute and unmute
	  handle channel targets consistently. Kick, mute and unmute were a
	  little inconsistent in their handling of channel targets. This
	  patch cleans that up by insuring they all handle the 'all' target
	  consistently and adds the 'participants' target which acts on
	  non-admins. Documentation for kick was also cleaned up as it
	  never supported partial channel names. Tested by: George Joseph
	  Review: https://reviewboard.asterisk.org/r/3944/ ........ Merged
	  revisions 422090 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-26 22:13 +0000 [r422071]  Mark Michelson <mmichelson@digium.com>

	* main/sched.c, /: Fix race condition in the scheduler when
	  deleting a running entry. When scheduled tasks run, they are
	  removed from the heap (or hashtab). When a scheduled task is
	  deleted, if the task can't be found in the heap (or hashtab), an
	  assertion is triggered. If DO_CRASH is enabled, this assertion
	  causes a crash. The problem is, sometimes it just so happens that
	  someone attempts to delete a scheduled task at the time that it
	  is running, leading to a crash. This change corrects the issue by
	  tracking which task is currently running. If that task is
	  attempted to be deleted, then we mark the task, and then wait for
	  the task to complete. This way, we can be sure to coordinate task
	  deletion and memory freeing. ASTERISK-24212 Reported by Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/3927 ........
	  Merged revisions 422070 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-25 16:44 +0000 [r421979-422037]  Richard Mudgett <rmudgett@digium.com>

	* res/res_musiconhold.c: res_musiconhold.c: Release any format refs
	  before memset(). * Clear the channel music_state pointer before
	  destroying the music_state object for safety.

	* res/res_musiconhold.c, /: res_musiconhold: Fix MOH restarting
	  where it left off from the last hold. Restore code removed by
	  https://reviewboard.asterisk.org/r/3536/ that introduced a
	  regression that prevents MOH from restarting were it left off the
	  last time. ASTERISK-24019 #close Reported by: Jason Richards
	  Patches: jira_asterisk_24019_v1.8.patch (license #5621) patch
	  uploaded by rmudgett Review:
	  https://reviewboard.asterisk.org/r/3928/ ........ Merged
	  revisions 421976 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421977 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421978 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-24 19:36 +0000 [r421911-421956]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_transport_websocket.c, /:
	  res_pjsip_transport_websocket: Attach the Websocket module on
	  outgoing INVITEs. In order to alter the Contact header on
	  in-dialog requests and responses the Websocket module must be
	  attached on outgoing INVITEs. The Contact header is modified so
	  that the PJSIP transport layer can find and use the existing
	  Websocket connection based on the source IP address, port, and
	  transport. ASTERISK-24143 #close Reported by: Aleksei Kulakov
	  ........ Merged revisions 421955 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_transport_websocket.c:
	  res_pjsip_transport_websocket: Fix a progressive memory growth.
	  The packet structure used to receive messages was using the
	  transport pool. This meant that for each parsing the pool would
	  grow accordingly. Since memory can not be reclaimed without
	  resetting it this would cause the memory pool to grow and grow.
	  This change uses a specific memory pool for the packet structure
	  and resets it to a fresh state after the message has been
	  received and handled. ........ Merged revisions 421939 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_transport_websocket.c:
	  res_pjsip_transport_websocket: Ensure secure Websocket clients
	  can be called. This change enforces the transport in the Contact
	  header for Websocket clients. Previously a client may provide a
	  transport of 'ws' when it is actually using a transport of 'wss'.
	  This would cause outgoing calls to fail as the existing
	  connection could not be found. ........ Merged revisions 421931
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: chan_sip: Use the server reflexive ICE
	  candidate RTCP port as provided. This code originally worked
	  around an issue within res_rtp_asterisk itself. The wrong socket
	  was being used for the STUN check for RTCP, causing the port to
	  be the same as RTP. This was subsequently fixed and the RTCP port
	  provided for the ICE candidate is correct and does not need to be
	  incremented. ASTERISK-23997 #close Reported by: Badalian
	  Vyacheslav Patches: plus1.diff submitted by Badalian Vyacheslav
	  (license 5249) ........ Merged revisions 421909 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421910 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-22 16:56 +0000 [r421882]  Mark Michelson <mmichelson@digium.com>

	* apps/app_mixmonitor.c: Fix a locking inversion in MixMonitor. We
	  need to unlock the audiohook before trying to lock the channel,
	  since the correct locking order is channel then audiohook.

2014-08-22 16:44 +0000 [r421880]  Jonathan Rose <jrose@digium.com>

	* res/res_stasis_answer.c, res/res_stasis.c, res/stasis/command.c,
	  res/res_stasis_playback.c, /, res/stasis/control.c,
	  res/stasis/stasis_bridge.c, res/stasis/command.h,
	  include/asterisk/stasis_app_impl.h, res/res_stasis_recording.c:
	  ARI: Fix a crash caused by hanging during playback to a channel
	  in a bridge ASTERISK-24147 #close Reported by: Edvin Vidmar
	  Review: https://reviewboard.asterisk.org/r/3908/ ........ Merged
	  revisions 421879 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-22 14:08 +0000 [r421860]  Matthew Jordan <mjordan@digium.com>

	* main/message.c, /: main/message: Add a new-line to a DEBUG
	  message ........ Merged revisions 421859 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-21 22:07 +0000 [r421802]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_musiconhold.c: res_musiconhold.c: Remove obsolete
	  REF_DEBUG code. Remove unneeded code that writes to the wrong
	  file location in an obsolete format. ........ Merged revisions
	  421799 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 421800 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421801 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-21 21:42 +0000 [r421790-421797]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_session.c, /: Switch from hostname to an IP address
	  in the SDP origin line. Using the hostname in the SDP origin line
	  may not satisfy the requirement of RFC 4566 that we use a FQDN or
	  IP address. This change has us use the same information from the
	  SDP connection line if possible. If not possible, we'll use the
	  configured media address. And if that's not possible, we use the
	  result of a PJLIB call to get the IP address of ourself.
	  ASTERISK-23994 #close Reported by Private Name Review:
	  https://reviewboard.asterisk.org/r/3925 ........ Merged revisions
	  421796 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/stasis/control.c: Ensure after-bridge behavior is correct
	  when moving from Stasis to a non-Stasis bridge. Because of the
	  departable state of channels that enter Stasis bridges, Stasis
	  has to take responsibility for directing the channel to its
	  intended after-bridge destination if the channel moves from a
	  Stasis bridge to a non-Stasis bridge. This change ensures that
	  when such a move occurs, when the channel leaves the bridging
	  system, any after bridge gotos are honored. Review:
	  https://reviewboard.asterisk.org/r/3920 ........ Merged revisions
	  421792 from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_caller_id.c, /: Let's try checking the name and
	  number, instead of the name twice. ........ Merged revisions
	  421789 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-21 21:25 +0000 [r421788]  Jonathan Rose <jrose@digium.com>

	* /, res/res_musiconhold.c: res_musiconhold: Fix reference leaks
	  caused when reloading with REF_DEBUG set Due to a faulty function
	  for debugging reference decrementing, it was possible to reduce
	  the refcount on the wrong object if two moh classes of the same
	  name were in the moh class container. (closes issue
	  ASTERISK-22252) Reported by: Walter Doekes Patches:
	  18_moh_debug_ref_patch.diff Uploaded by Jonathan Rose (license
	  6182) ........ Merged revisions 398937 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421777 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421779 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-21 21:18 +0000 [r421783]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_caller_id.c: Improve consistency of party ID
	  privacy usage. Prior to this change, the Remote-Party-ID header
	  took the position of "If caller name and number are not
	  explicitly allowed, then they are private" and
	  P-Asserted-Identity took the position of "Caller name and number
	  are only private if marked explicitly so" Now both mechanisms of
	  conveying party identification use the former approach. ........
	  Merged revisions 421778 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-21 17:34 +0000 [r421675-421720]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: chan_sip: Don't use port derived from
	  fromdomain if it isn't set If a user does not provide a port in
	  the fromdomain setting, chan_sip will set the fromdomainport to
	  STANDARD_SIP_PORT (5060). The fromdomainport value will then get
	  used unilaterally in certain places. This causes issues with TLS,
	  where the default port is expected to be 5061. This patch
	  modifies chan_sip such that fromdomainport is only used if it is
	  not the standard SIP port; otherwise, the port from the SIP pvt's
	  recorded self IP address is used. Review:
	  https://reviewboard.asterisk.org/r/3893/ ASTERISK-24178 #close
	  Reported by: Elazar Broad patches: fromdomainport_fix.diff
	  uploaded by Elazar Broad (License 5835) ........ Merged revisions
	  421717 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 421718 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421719 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, UPGRADE.txt, main/app.c: ARI: Fix implicit answer when
	  playback is initiated on unanswered channel When issuing a POST
	  /channels/{channel_id}/play on a channel that is not yet
	  answered, ARI is supposed to: * Queue up an AST_CONTROL_PROGRESS
	  on the channel * Start up the playback of the media Instead, we
	  sneak an answer on the channel right before starting playing
	  media. This is due to ARI's usage of control_streamfile. This
	  function implicitly answers the channel (and doesn't give ARI the
	  option to stop it). The answering of the channel here is probably
	  unnecessary: * app_voicemail, by far the biggest consumer of this
	  function, always answers the channels anyway * control stream
	  file (in res_agi) and ControlPlayback probably shouldn't be
	  implicitly answering the channel. Answering should not be tied
	  directly to playing back media. As it turns out, the answering of
	  the channel here is pretty old: 356042 twilson if
	  (ast_channel_state(chan) != AST_STATE_UP) { 3087 anthm res =
	  ast_answer(chan); 180259 tilghman } (As in, ancient?) Note that
	  others ran into this problem and commented about it on various
	  mailing lists. Review: https://reviewboard.asterisk.org/r/3907/
	  ASTERISK-24229 #close Reported by: Matt Jordan ........ Merged
	  revisions 421695 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/stasis/messaging.h, main/dns.c, /, main/format_cache.c: Clean
	  up files that do not end with newlines Trivial patch to add new
	  lines to several files missing them. This fixes warnings when
	  compiling with gcc 4.1.2 on CentOS 5. ASTERISK-24245 #close
	  Reported by: Shaun Ruffell patches:
	  0002-Trivial-addition-of-newlines-at-end-of-three-files.patch
	  uploaded by Shaun Ruffell (License 5417) ........ Merged
	  revisions 421677 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/uri.h, main/uri.c: uri: Quiet warning about type
	  qualifiers ignored on function return type This patch fixes gcc
	  warnings that occur due to the type qualifier 'const' being
	  ignored on a return type of int. ASTERISK-24246 #close Reported
	  by: Shaun Ruffell patches:
	  0001-main-uri-Quiet-warning-about-ignored-attribute-on-re.patch
	  uploaded by Shaun Ruffell (License 5417)

2014-08-20 22:49 +0000 [r421616-421645]  Richard Mudgett <rmudgett@digium.com>

	* main/bridge.c, res/res_pjsip_sdp_rtp.c, main/file.c,
	  main/bridge_channel.c, channels/chan_pjsip.c, main/channel.c:
	  chan_pjsip: Update media translation paths when new SDP
	  negotiated. On a SIP reinvite that changes media strams, the
	  PJSIP channel driver was flooding the log with "Asked to transmit
	  frame type %s, while native formats is %s" warnings. * Fixes
	  PJSIP not setting up translation paths when the formats change on
	  a reinvite. AFS-63 was effectively reintroduced because of the
	  media formats work. res_pjsip_sdp_rtp.c:set_caps() * Improved the
	  unexpected frame format WARNING message to include more
	  information. * Added protective locking while altering formats on
	  a channel. Reworked set_format() to simplify and protect the
	  formats under manipulation. * Restored some code that got lost in
	  the media_formats work. (channel.c:set_format() and
	  res_pjsip_sdp_rtp.c:set_caps()) AFS-137 #close Reported by: Mark
	  Michelson Review: https://reviewboard.asterisk.org/r/3906/

	* /, main/cli.c: cli.c: Fix tab completion of "module load" when
	  MALLOC_DEBUG is enabled. filename_completion_function() returns
	  memory that was not allocated by the MALLOC_DEBUG allocation
	  tracker so the memory must be freed by ast_std_free(). ........
	  Merged revisions 421600 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421602 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421608 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-20 20:40 +0000 [r421566-421585]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pubsub.c: Set the role for inbound subscriptions
	  correctly. This was causing the AMI show_subscriptions test in
	  the testsuite to fail since all subscriptions were being seen as
	  subscribers instead of notifiers.

	* /, channels/chan_pjsip.c: Move evaluation of set_var options in
	  pjsip to the end of channel initialization. This allows for
	  set_var to override certain defaults such as caller ID and codec
	  values. This also fixes a test suite regression. The "set_var"
	  test suite test attempted to use set_var to override caller ID,
	  but a recent change caused that to no longer work. ........
	  Merged revisions 421565 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-20 13:04 +0000 [r421538]  Kinsey Moore <kmoore@digium.com>

	* include/asterisk/stasis_bridges.h, tests/test_cel.c,
	  res/ari/ari_model_validators.c, main/stasis_bridges.c,
	  res/ari/ari_model_validators.h, rest-api/api-docs/events.json, /,
	  res/stasis/app.c, main/bridge.c: Stasis: Add information to blind
	  transfer event When a blind transfer occurs that is forced to
	  create a local channel pair to satisfy the transfer request,
	  information about the local channel pair is not published. This
	  adds a field to describe that channel to the blind transfer
	  message struct so that this information is conveyed properly to
	  consumers of the blind transfer message. This also fixes a bug in
	  which Stasis() was unable to properly identify the channel that
	  was replacing an existing Stasis-controlled channel due to a
	  blind transfer. Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3921/ ........ Merged
	  revisions 421537 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-19 20:28 +0000 [r421448-421488]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip.c: Alter documentation for callerid_privacy to
	  use correct values. ........ Merged revisions 421485 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis.c, /: Fix compilation error on certain versions of
	  GCC. ........ Merged revisions 421447 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-19 19:42 +0000 [r421445]  Kinsey Moore <kmoore@digium.com>

	* main/manager.c, /: AMI Docs: Fix Status channel parameter
	  optionality ........ Merged revisions 421442 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421443 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421444 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-19 16:28 +0000 [r421423]  Jonathan Rose <jrose@digium.com>

	* res/res_stasis.c, /: ARI: Fix a bug where
	  /channels/{channelID}/continue doesn't execute PBX If
	  /channels/{channelID}/continue is called on a channel that was
	  originated without a PBX (such as the ARI command POST channel
	  with a stasis application argument), the channel will not start
	  dialplan execution. This patch will now run the PBX out of the
	  stasis execution if the channel doesn't currently have an active
	  PBX upon continuing. ASTERISK-24043 #close Reported by: Krandon
	  Bruse Review: https://reviewboard.asterisk.org/r/3917/ Patches:
	  stasis-continue.diff submitted by Krandon Bruse (license 6631)
	  ........ Merged revisions 421416 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-19 16:11 +0000 [r421403]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_pjsip_caller_id.c, channels/chan_pjsip.c,
	  res/res_pjsip_session.c: chan_pjsip: Fix attended transfer
	  connected line name update. A calls B B answers B SIP attended
	  transfers to C C answers, B and C can see each other's connected
	  line information B completes the transfer A has number but no
	  name connected line information about C while C has the full
	  information about A I examined the incoming and outgoing party id
	  information handling of chan_pjsip and found several issues: *
	  Fixed ast_sip_session_create_outgoing() not setting up the
	  configured endpoint id as the new channel's caller id. This is
	  why party A got default connected line information. * Made
	  update_initial_connected_line() use the channel's CALLERID(id)
	  information. The core, app_dial, or predial routine may have
	  filled in or changed the endpoint caller id information. * Fixed
	  chan_pjsip_new() not setting the full party id information
	  available on the caller id and ANI party id. This includes the
	  configured callerid_tag string and other party id fields. * Fixed
	  accessing channel party id information without the channel lock
	  held. * Fixed using the effective connected line id without doing
	  a deep copy outside of holding the channel lock. Shallow copy
	  string pointers can become stale if the channel lock is not held.
	  * Made queue_connected_line_update() also update the channel's
	  CALLERID(id) information. Moving the channel to another bridge
	  would need the information there for the new bridge peer. * Fixed
	  off nominal memory leak in update_incoming_connected_line(). *
	  Added pjsip.conf callerid_tag string to party id information from
	  enabled trust_inbound endpoint in caller_id_incoming_request().
	  AFS-98 #close Reported by: Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/3913/ ........ Merged
	  revisions 421400 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-18 21:10 +0000 [r421376]  Damien Wedhorn <voip@facts.com.au>

	* channels/chan_skinny.c: Skinny: Fixup compile warning for non
	  dev-mode.

2014-08-18 20:19 +0000 [r421337]  George Joseph <george.joseph@fairview5.com>

	* funcs/func_config.c, /: func_config: Change 'Not Found' message
	  from ERROR to DEBUG When you call the CONFIG dialplan function
	  with the name of a variable that doesn't exist in the target
	  context you get an ERROR. This does nothing but clutter up the
	  logs with messages that may be perfectly acceptable. Just because
	  a variable wasn't in the context doesn't mean it's an error.
	  Maybei t's optional or just needs to be defaulted or ignored.
	  This patch changes the log level from ERROR to DEBUG. If a
	  dialplan developer wants to debug their dialplan they still canby
	  setting the console debug level as needed. Tested by: George
	  Joseph Review: https://reviewboard.asterisk.org/r/3919/ ........
	  Merged revisions 421327 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421328 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421329 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-18 01:13 +0000 [r421230-421312]  Matthew Jordan <mjordan@digium.com>

	* res/ari/resource_channels.c: res/ari/resource_channels: Fix
	  compilation issue Forgot a parameter. Whoops.

	* res/ari/resource_channels.c: res/ari/resource_channels: Don't
	  return allocation failure on failed function If a function fails
	  to execute, it is most likely due to one of two reasons: (1) The
	  function doesn't exist or can't be read from (2) The function is
	  dangerous and is restricted based on the user's permissions
	  Currently we return allocation failure, which is incorrect. This
	  updates the reason code to more accurately reflect why the
	  request failed. ASTERISK-24215

	* /, apps/app_meetme.c: apps/app_meetme: Fix crash when publishing
	  MeetMe messages with no channel The same function,
	  meetme_stasis_generate_msg, handles creating and publishing
	  Stasis message both when there are channels in the MeetMe
	  conference and when there are no channels in the conference. When
	  the performance improvement was made to use cached snapshots,
	  this created a situation where Asterisk would crash: obtaining a
	  cached snapshot is not NULL tolerant. This patch restores the
	  previous implementation, which used a NULL safe set of routines
	  to produce a blob containing the channel snapshot (if available)
	  and information about the MeetMe conference. ASTERISK-24234
	  #close Reported by: Shaun Ruffell Tested by: Shaun Ruffell
	  ........ Merged revisions 421270 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_dial.c, /: apps/app_dial: Fix Dial 'z' option The 'z'
	  option is supposed to disable the dial timeout in the case of a
	  call forward. Unfortunately, the wrong timeout timer was passed
	  to the do_forward function, resulting in the option not working.
	  ASTERISK-24225 #close Reported by: dimitripietro Tested by:
	  dimitripietro patches: jira_asterisk_24225_v1.8.patch uploaded by
	  rmudgett (License 5621) jira_asterisk_24225_v11.patch uploaded by
	  rmudgett (License 5621) ........ Merged revisions 421232 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421233 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421234 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, configure, configure.ac: configure: Undefine FORTIFY_SOURCE
	  prior to defining it for patched gcc Some distributions of Linux
	  patch gcc to define FORTIFY_SOURCE when gcc is executed with
	  optimization. This "help" unfortunately results in re-definition
	  warnings when FORTIFY_SOURCE is later defined in Asterisk's build
	  system. This patch undefines FORTIFY_SOURCE prior to defining it
	  to prevent this warning. Review:
	  https://reviewboard.asterisk.org/r/3912/ ASTERISK-24032 #close
	  Reported by: Kilburn Tested by: Kilburn, wdoekes patches:
	  1.8.diff uploaded by cloos (License 5956) 10.diff uploaded by
	  cloos (License 5956) 11.diff uploaded by cloos (License 5956)
	  12.diff uploaded by cloos (License 5956) 13.diff uploaded by
	  cloos (License 5956) ........ Merged revisions 421227 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421228 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421229 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-17 16:10 +0000 [r421210]  Joshua Colp <jcolp@digium.com>

	* res/res_http_websocket.c: res_http_websocket: Include query
	  parameters in client connection requests. Review:
	  https://reviewboard.asterisk.org/r/3914/

2014-08-15 17:08 +0000 [r421187]  Jonathan Rose <jrose@digium.com>

	* main/channel.c, /: Bridging: Fix a behavioral change when
	  checking if a channel is leaving a bridge r420934 introduced some
	  failures in the test suite. Upon investigating, it was discovered
	  that differences in the way we were evaluating whether a channel
	  was in the process of leaving a bridge were causing some
	  reinvites not to occur (mostly reinvites back to Asterisk when
	  ending a call). This patch fixes that behavioral change.
	  ASTERISK-24027 #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3910/ ........ Merged
	  revisions 421186 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-15 15:45 +0000 [r421042-421166]  Matthew Jordan <mjordan@digium.com>

	* apps/app_voicemail.c, /, main/app.c: app_voicemail/app: Remove
	  test events that were duplicated by r421059 Moving the test event
	  raised when a file is played back (which occurred in r421059)
	  broke the ever loving snot out of the voicemail tests. This
	  caused duplicate test events to get raised, as app_voicemail and
	  main/app were raising events prior to call ast_streamfile. The
	  voicemail tests did not enjoy getting multiple events. Since
	  raising the playback event in ast_streamfile is far more useful
	  to the vast majority of tests, this patch keeps the call there
	  and simply removes the extraneous calls that duplicated the
	  event. ........ Merged revisions 421125 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421164 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421165 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_hep_rtcp.c, /: res/res_hep_rtcp: Remove dependency on
	  PJSIP The res_hep_rtcp module was incorrectly including
	  <pjsip.h>. This didn't need to be included, as the module does
	  not using PJPROJECT any fashion. Unfortunately, because
	  res_hep_rtcp did not include pjsip in its MODULEINFO as a
	  dependency, this also meant that res_hep_rtcp will fail to
	  compile on a system without PJPROJECT. This patch removes the
	  include. Thanks to Damien Wedhorn for pointing this out in
	  #asterisk-dev. ASTERISK-24236 #close Reported by: Damien Wedhorn,
	  Matt Jordan Tested by: Damien Wedhorn ........ Merged revisions
	  421064 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/file.c, main/app.c: main/file: Move test event to emit
	  PLAYBACK event more consistently This is being done in advance of
	  the test for ASTERISK-23953 ........ Merged revisions 421059 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 421060 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 421061 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* tests/test_cel.c, main/cel.c, /: cel: Make sure channels in extra
	  fields include their unique IDs as well CEL typically tracks a
	  lot of information using the unique ID of the channel. This is
	  typically needed due to tying events together using the linked ID
	  of the various channels involved in a "call", which is derived
	  from the channel ID of the oldest channel involved in a bridge
	  (or in the case of a Dial, the parent channel). Previously, we
	  had updated the extra fields to include the involved channel
	  names, but forgot to put in the unique ID. This patch corrects
	  that error. ........ Merged revisions 421037 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-14 16:32 +0000 [r420957-421010]  Richard Mudgett <rmudgett@digium.com>

	* /, res/ari/resource_channels.c: ARI: Originate to app local
	  channel subscription code optimization. Reduce the scope of
	  local_peer and only get it if the ARI originate is subscribing to
	  the channels. Review: https://reviewboard.asterisk.org/r/3905/
	  ........ Merged revisions 421009 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/channel_internal_api.c, main/channel.c:
	  channel_internal_api.c: Replace some code with ao2_replace(). Use
	  ao2_replace() instead of ao2_cleanup(); ao2_bump(). ao2_replace()
	  has the advantange of not altering the ref count if the replaced
	  pointer is the same. Review:
	  https://reviewboard.asterisk.org/r/3904/

	* /, res/res_pjsip_send_to_voicemail.c:
	  res_pjsip_send_to_voicemail.c: Fix svn file properties. ........
	  Merged revisions 420956 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-13 16:53 +0000 [r420950]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip.c, /: PJSIP: Prevent crash no-URI contacts This
	  prevents a crash from occurring when a contact with no URI is
	  used for the creation of an outbound out-of-dialog request with
	  no associated endpoint. ........ Merged revisions 420949 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-13 16:07 +0000 [r420940]  Jonathan Rose <jrose@digium.com>

	* main/bridge_after.c, main/channel_internal_api.c,
	  include/asterisk/channel.h, apps/app_chanspy.c,
	  apps/app_mixmonitor.c, apps/app_stack.c, main/bridge_channel.c,
	  main/channel.c, main/pbx.c, /, main/framehook.c: Bridges: Fix
	  feature interruption/unintended kick caused by external actions
	  If a manager or CLI user attached a mixmonitor to a call running
	  a dynamic bridge feature while in a bridge, the feature would be
	  interrupted and the channel would be forcibly kicked out of the
	  bridge (usually ending the call during a simple 1 to 1 call).
	  This would also occur during any similar action that could set
	  the unbridge soft hangup flag, so the fix for this was to remove
	  unbridge from the soft hangup flags and make it a separate thing
	  all together. ASTERISK-24027 #close Reported by: mjordan Review:
	  https://reviewboard.asterisk.org/r/3900/ ........ Merged
	  revisions 420934 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-13 14:24 +0000 [r420919]  Kinsey Moore <kmoore@digium.com>

	* main/manager.c: AMI: Improve documentation for Status action

2014-08-13 07:52 +0000 [r420899]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, main/logger.c: logger: Don't store verbose-magic in the log
	  files. In r399267, the verbose2magic stuff was edited. This time
	  it results in magic characters in the log files for multiline
	  messages. In trunk (and 13) this was fixed by the "stripping" of
	  those characters from multiline messages (in r414798). This fix
	  is altered to actually strip the characters and not replace them
	  with blanks. Review: https://reviewboard.asterisk.org/r/3901/
	  Review: https://reviewboard.asterisk.org/r/3902/ ........ Merged
	  revisions 420897 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 420898 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-12 23:43 +0000 [r420879-420881]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_sip.c: chan_sip: Fix type mismatch when the format
	  is changed. Symptom is most likely an invalid ao2 object bad
	  magic number message or a less likely crash.

	* res/res_stasis_snoop.c: res_stasis_snoop.c: Fix off nominial exit
	  path leaving Snoop channel locked and not hungup. * Made use
	  ast_copy_string() instead of strcpy() for snoop uniqueid for
	  safety. There is no guarantee that the max channel uniqueid
	  length will remain the same as the snoop uniqueid space.

2014-08-12 11:17 +0000 [r420856]  Joshua Colp <jcolp@digium.com>

	* apps/app_voicemail.c: app_voicemail: Fix the
	  "test_voicemail_vm_info" unit test.

2014-08-11 20:53 +0000 [r420837]  Richard Mudgett <rmudgett@digium.com>

	* res/stasis/command.c, /: res/stasis/command.c: Fix recent commit
	  using spaces instead of tabs. ........ Merged revisions 420836
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-11 18:50 +0000 [r420808]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/playbacks.json,
	  rest-api/api-docs/channels.json, rest-api/api-docs/sounds.json,
	  rest-api/resources.json, include/asterisk/manager.h,
	  rest-api/api-docs/bridges.json,
	  rest-api/api-docs/recordings.json,
	  rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/endpoints.json,
	  rest-api/api-docs/mailboxes.json, rest-api/api-docs/events.json,
	  /, rest-api/api-docs/asterisk.json,
	  rest-api/api-docs/applications.json: AMI/ARI: Update version to
	  2.5.0/1.5.0 respectively This is to support the backwards
	  compatible changes made in the next version of Asterisk. ........
	  Merged revisions 420805 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-11 18:46 +0000 [r420796-420803]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_stasis.c: Stasis: Use the correct return value Return
	  the correct value instead of always returning 0 when setting
	  internal status on unreal channels. Reported by: Richard Mudgett
	  ........ Merged revisions 420802 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis.c, res/ari/resource_bridges.c, /,
	  res/stasis/stasis_bridge.c, include/asterisk/stasis_app.h:
	  Stasis: Allow internal channels directly into bridges The patch
	  to catch channels being shoehorned into Stasis() via external
	  mechanisms also happens to catch Announcer and Recorder channels
	  because they aren't known to be stasis-controlled channels in the
	  usual sense. This marks those channels as Stasis()-internal
	  channels and allows them directly into bridges. Review:
	  https://reviewboard.asterisk.org/r/3903/ ........ Merged
	  revisions 420795 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-11 18:32 +0000 [r420758-420794]  Mark Michelson <mmichelson@digium.com>

	* include/asterisk/stasis_app.h, main/stasis_channels.c,
	  res/ari/resource_channels.c, CHANGES, res/res_pjsip_pubsub.c,
	  main/manager_channels.c, apps/app_dial.c, res/stasis/app.c,
	  res/stasis/control.c: Improve call forwarding reporting,
	  especially with regards to ARI. This patch addresses a few
	  issues: 1) The order of Dial events have been changed when
	  performing a call forward. The order has now been altered to 1)
	  Dial begins dialing channel A. 2) When A forwards the call to B,
	  we issue the dial end event to channel A, indicating the dial is
	  being canceled due to a forward to B. 3) When the call to channel
	  B occurs, we then issue a new dial begin to channel B. 2) Call
	  forwards are now reported on the calling channel, not the peer
	  channel. 3) AMI DialEnd events have been altered to display the
	  extension the call is being forwarded to when relevant. 4) You
	  can now get the values of channel variables for channels that are
	  not currently in the Stasis application. This brings the
	  retrieval of channel variables more in line with the rest of
	  channel read operations since they may be performed on channels
	  not in Stasis. ASTERISK-24134 #close Reported by Matt Jordan
	  ASTERISK-24138 #close Reported by Matt Jordan Patches:
	  forward-shenanigans.diff uploaded by Matt Jordan (License #6283)
	  Review: https://reviewboard.asterisk.org/r/3899

	* res/res_pjsip_pubsub.c: Fix crashing unit tests with regards to
	  RLS. The unit tests require a sorcery.conf file that has been set
	  up to store resource lists in memory rather than retrieving from
	  configuration. With a setup that is not conducive to running the
	  tests, a fault in sorcery currently causes Asterisk to crash when
	  attempting to run any of the tests. To get around the crash, this
	  adds a function that verifies the current environment and marks
	  the tests as "not run" if the setup is not correct.

	* res/res_pjsip_pubsub.c: Fix crash encountered by the testsuite.
	  Running testsuite tests locally produced no errors, but when run
	  using the continuous integration framework, crashes occurred. The
	  crashes occurred due to a refcounting error that had been fixed
	  for a similar situation.

2014-08-11 13:57 +0000 [r420742]  Matthew Jordan <mjordan@digium.com>

	* res/res_hep.c, res/res_hep_pjsip.c, res/res_hep_rtcp.c: res_hep:
	  Remove disabling of modules These modules were originally
	  specified as being disabled, as they were introduced midstream in
	  Asterisk 12. That makes it nicer for folks who are upgrading to a
	  new release in the middle of Asterisk 12. That's not the case for
	  Asterisk 13: it's a brand new release. There's no reason to have
	  the modules disabled by default in that case.

2014-08-11 10:40 +0000 [r420657-420717]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, main/utils.c: general: Fix memory Corruption in
	  __ast_string_field_ptr_build_va. If the space left in a
	  stringfield is between 0 and
	  (alignof(ast_string_field_allocation)-1) adding new data would
	  cause memory corruption, because we would assume enough space
	  (unsigned underrun). Thanks Arnd Schmitter for reporting and
	  finding out the cause! ASTERISK-23508 #close Reported by: Arnd
	  Schmitter Tested by: Arnd Schmitter, JoshE Review:
	  https://reviewboard.asterisk.org/r/3898/ ........ Merged
	  revisions 420680 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 420715 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 420716 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/tcptls.c, /: tcptls: Avoid compiler warning on non-dev-mode.
	  ........ Merged revisions 420654 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 420655 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 420656 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-11 01:31 +0000 [r420607-420639]  Matthew Jordan <mjordan@digium.com>

	* funcs/func_jitterbuffer.c: funcs/func_jitterbuffer: Tweak
	  documentation This patch merely reformats and cleans up a bit of
	  the jitterbuffer documentation for the wiki.

	* UPGRADE.txt, configs/samples/extconfig.conf.sample, CHANGES,
	  apps/app_queue.c,
	  contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py
	  (added), configs/samples/queuerules.conf.sample: app_queue: Add
	  RealTime support for queue rules This patch gives the optional
	  ability to keep queue rules in RealTime. It is important to note
	  that with this patch: (a) Queue rules in RealTime are only
	  examined on module load/reload (b) Queue rules are loaded both
	  from the queuerules.conf file as well as the RealTime backend To
	  inform app_queue to examine RealTime for queue rules, a new
	  setting has been added to queuerules.conf's general section
	  "realtime_rules". RealTime queue rules will only be used when
	  this setting is set to "yes". The schema for the database table
	  supports a rule_name, time, min_penalty, and max_penalty columns.
	  min_penalty and max_penalty can be relative, if a '-' or '+'
	  literal is provided. Otherwise, the penalties are treated as
	  constants. For example: rule_name, time, min_penalty, max_penalty
	  'default', '10', '20', '30' 'test2', '20', '30', '55' 'test2',
	  '25', '-11', '+1111' 'test2', '400', '112', '333' 'test3', '0',
	  '4564', '46546' 'test_rule', '40', '15', '50' which would result
	  in : Rule: default - After 10 seconds, adjust QUEUE_MAX_PENALTY
	  to 30 and adjust QUEUE_MIN_PENALTY to 20 Rule: test2 - After 20
	  seconds, adjust QUEUE_MAX_PENALTY to 55 and adjust
	  QUEUE_MIN_PENALTY to 30 - After 25 seconds, adjust
	  QUEUE_MAX_PENALTY by 1111 and adjust QUEUE_MIN_PENALTY by -11 -
	  After 400 seconds, adjust QUEUE_MAX_PENALTY to 333 and adjust
	  QUEUE_MIN_PENALTY to 112 Rule: test3 - After 0 seconds, adjust
	  QUEUE_MAX_PENALTY to 46546 and adjust QUEUE_MIN_PENALTY to 4564
	  Rule: test_rule - After 40 seconds, adjust QUEUE_MAX_PENALTY to
	  50 and adjust QUEUE_MIN_PENALTY to 15 If you use RealTime, the
	  queue rules will be always reloaded on a module reload, even if
	  the underlying file did not change. With the option disabled, the
	  rules will only be reloaded if the file was modified. Review:
	  https://reviewboard.asterisk.org/r/3607/ ASTERISK-23823 #close
	  Reported by: Michael K patches: app_queue.c_realtime_trunk.patch
	  uploaded by Michael K (License 6621)

	* CHANGES: Update CHANGES file

	* UPGRADE.txt: Update UPGRADE.txt file

2014-08-08 20:08 +0000 [r420577-420592]  Jason Parker <jparker@digium.com>

	* apps/app_voicemail.c: Fix build in devmode.

	* CHANGES, configs/samples/voicemail.conf.sample,
	  apps/app_voicemail.c: app_voicemail: Add the ability to specify
	  multiple email addresses. ASTERISK-24045 Reported by: Jacob
	  Barber Review: https://reviewboard.asterisk.org/r/3833/

2014-08-08 17:53 +0000 [r420534-420562]  Matthew Jordan <mjordan@digium.com>

	* channels/chan_sip.c, channels/sip/security_events.c,
	  channels/sip/dialplan_functions.c, channels/sip/reqresp_parser.c,
	  channels/sip/route.c, channels/sip/utils.c,
	  channels/sip/config_parser.c: chan_sip: Mark chan_sip and its
	  files as extended support

	* rest-api-templates/make_ari_stubs.py: make_ari_stubs: Update wiki
	  prefix to '13'

	* rest-api-templates/res_ari_resource.c.mustache:
	  res_ari_resource.c.mustache: Update template to emit module
	  support level

	* main/message.c, /: main/message: remove debug message ........
	  Merged revisions 420533 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-08 03:03 +0000 [r420514]  Kinsey Moore <kmoore@digium.com>

	* tests/test_cel.c, /: CEL: Update unit tests for additional
	  information This updates the CEL unit tests for the new
	  information contained in the attended transfer CEL extra field.
	  ........ Merged revisions 420513 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-08 01:31 +0000 [r420494-420496]  Matthew Jordan <mjordan@digium.com>

	* UPGRADE.txt: Update UPGRADE file for 13 branch

	* /: Remove old properties

	* / (added): ___ _ _ _ __ _____ / _ \ | | (_) | | / ||____ | / /_\
	  \___| |_ ___ _ __ _ ___| | __ `| | / / | _ / __| __/ _ | '__| /
	  __| |/ / | | \ \ | | | \__ | || __| | | \__ | < _| |.___/ / \_|
	  |_|___/\__\___|_| |_|___|_|\_\ \___\____/

2014-08-07 21:58 +0000 [r420437]  Richard Mudgett <rmudgett@digium.com>

	* /, channels/chan_sip.c: chan_sip: Replace sip_tls_read() and
	  resolve the large SDP poll issue. Replace sip_tls_read() and
	  sip_tcp_read() with a single function and resolve the poll/wait
	  issue with large SDP payloads. ASTERISK-18345 #close Reported by:
	  Stephane Chazelas Patches: tcptls_pollv4.diff (license #5835)
	  patch uploaded by Elazar Broad Review:
	  https://reviewboard.asterisk.org/r/3882/ ........ Merged
	  revisions 420434 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 420435 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 420436 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-07 21:17 +0000 [r420389-420415]  Kinsey Moore <kmoore@digium.com>

	* main/stasis_bridges.c, /: Stasis: Correct blind transfer message
	  generation This fixes the json object creation format string and
	  key name for the BridgeBlindTransfer Stasis event allowing it to
	  be published properly. ........ Merged revisions 420414 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis_bridges.c, /: Stasis: Ensure transfer messages follow
	  validation rules This makes Stasis() event generation for
	  transfer messages follow validation rules. Currently,
	  ast_json_null() is being used in place of omitting a key entirely
	  which falls afoul of these validation rules.
	  https://reviewboard.asterisk.org/r/3892/ ........ Merged
	  revisions 420408 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_pubsub.c: Fix build in dev mode

2014-08-07 19:44 +0000 [r420384-420388]  Mark Michelson <mmichelson@digium.com>

	* /, main/bridge.c: Ensure bridges exist when trying to determine
	  bridged parties when publishing transfer information. ........
	  Merged revisions 420387 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/strings.c, include/asterisk/res_pjsip_presence_xml.h,
	  res/res_pjsip_mwi.c, res/res_pjsip_dialog_info_body_generator.c,
	  res/res_pjsip_xpidf_body_generator.c, include/asterisk/strings.h,
	  res/res_pjsip_pubsub.c, res/res_pjsip_exten_state.c,
	  include/asterisk/res_pjsip_pubsub.h,
	  res/res_pjsip_pidf_body_generator.c: Add support for RFC 4662
	  resource list subscriptions. This commit adds the ability for a
	  user to configure a resource list in pjsip.conf. Subscribing to
	  this list simultaneously subscribes the subscriber to all
	  resources listed. This has the potential to reduce the amount of
	  SIP traffic when loads of subscribers on a system attempt to
	  subscribe to each others' states.

2014-08-07 18:51 +0000 [r420364]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/format_compatibility.h,
	  channels/iax2/format_compatibility.c,
	  channels/iax2/include/codec_pref.h, main/format_compatibility.c,
	  channels/chan_iax2.c, channels/iax2/codec_pref.c,
	  channels/iax2/include/format_compatibility.h: chan_iax2: Several
	  media format fixes. * Fixed the iax.conf bandwidth option. This
	  is the root cause of ASTERISK-24150. * Added checks in
	  iax2_request() to ensure that there are actual formats requested
	  for the new channel to prevent any more fracks from issues like
	  ASTERISK-24150. This is a consequence of the iax.conf bandwidth
	  option not working. * Fixed struct iax2_codec_pref.order member
	  size mismatch issue when converting to and from the codec
	  preference order list passed over the wire. In addition the
	  values sent over the wire are now compatible with previous
	  Asterisk versions. * Fixed several issues dealing with the struct
	  iax2_codec_pref members. Off-by-one, array limit errors, and the
	  order/framing members always need to be updated together. * Made
	  iax2_request() setup the channel's native format preference order
	  according to the user's wishes. The new media format strategy
	  needs the order specified earler. * Fixed usage of
	  ast_format_compatibility_bitfield2format(). The function can
	  return NULL if the bitfield was not associated with a function. *
	  Deleted dead code iax2_codec_pref_getsize() and
	  iax2_codec_pref_setsize(). * Made iax2_parse_allow_disallow() and
	  iax2_codec_pref_string() call iax2_codec_pref_to_cap() instead of
	  inlining it. * Made IAX_CAPABILITY_MEDBANDWIDTH,
	  IAX_CAPABILITY_LOWBANDWIDTH, and IAX_CAPABILITY_LOWFREE constants
	  again as they were in Asterisk v1.8. * Renamed prefs to
	  prefs_global so it won't get confused with the local pref
	  versions. * Fixed too small buffer in
	  handle_cli_iax2_show_peer(). * Fixed ast_cli() calls in
	  handle_cli_iax2_show_peer() to output complete lines. * Changed
	  struct create_addr_info.prefs to be struct iax2_codec_pref as an
	  optimization so iax2_request() and iax2_call() do less work. *
	  Fixed a potential deadlock in ast_iax2_new() on an off-nominal
	  path when the pbx could not get started. * Made set_config()
	  setup a local prefs list along side the local capability format
	  bitfield. Once the config is loaded, then the local copies are
	  put into the global versions. * Fix unininialized codec_buf in
	  function_iaxpeer(). ASTERISK-24150 #close Reported by: Scott
	  Griepentrog Review: https://reviewboard.asterisk.org/r/3890/

2014-08-07 15:30 +0000 [r420338]  Kinsey Moore <kmoore@digium.com>

	* include/asterisk/bridge_features.h, res/res_stasis.c,
	  res/stasis/command.c, rest-api/api-docs/events.json, /,
	  res/stasis/app.c, res/stasis/control.c, main/bridge.c,
	  main/bridge_basic.c, res/stasis/stasis_bridge.c,
	  include/asterisk/stasis_bridges.h, res/stasis/command.h,
	  include/asterisk/stasis_app.h, res/stasis/app.h,
	  res/stasis/control.h, apps/app_queue.c,
	  res/ari/ari_model_validators.c, main/cel.c,
	  main/stasis_bridges.c, res/ari/ari_model_validators.h,
	  main/channel.c, include/asterisk/datastore.h, tests/test_cel.c:
	  Stasis: Convey transfer information to applications This fixes a
	  class of issues where Stasis applications were not made aware
	  that their channels were being manipulated or replaced by
	  external entitiessuch as transfers, AMI commands, or dialplan
	  applications such as Bridge(). Inconsistent information such as
	  StasisEnd events with unknown channels as a result of masquerades
	  has also been corrected. To accomplish these fixes, several new
	  fields were added to blind and attended transfer messages as well
	  as StasisStart and BridgeAttendedTransfer Stasis events.
	  ASTERISK-23941 #close Review:
	  https://reviewboard.asterisk.org/r/3865/ Review:
	  https://reviewboard.asterisk.org/r/3857/ Review:
	  https://reviewboard.asterisk.org/r/3852/ Review:
	  https://reviewboard.asterisk.org/r/3816/ Review:
	  https://reviewboard.asterisk.org/r/3731/ Review:
	  https://reviewboard.asterisk.org/r/3729/ Review:
	  https://reviewboard.asterisk.org/r/3728/ ........ Merged
	  revisions 420325 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-07 14:37 +0000 [r420314-420315]  Joshua Colp <jcolp@digium.com>

	* include/asterisk/res_pjsip_pubsub.h,
	  res/res_pjsip_pubsub.exports.in, res/res_pjsip_publish_asterisk.c
	  (added), res/res_pjsip_pubsub.c: res_pjsip_publish_asterisk: Add
	  support for exchanging device and mailbox state using SIP. This
	  module uses the inbound and outbound PUBLISH support to exchange
	  device and mailbox state between Asterisk instances. Each
	  instance is configured to publish to the other and requires no
	  intermediary server. The functionality provided is similar to the
	  XMPP and Corosync support. Review:
	  https://reviewboard.asterisk.org/r/3780/

	* include/asterisk/res_pjsip_outbound_publish.h (added),
	  res/res_pjsip_outbound_publish.exports.in (added),
	  res/res_pjsip_outbound_publish.c (added):
	  res_pjsip_outbound_publish: Add module which provides outbound
	  PUBLISH support. This module implements the core parts required
	  for doing outbound PUBLISH. It takes care of configuration,
	  lifetime management, and authentication. Additional modules
	  implement the specific events that are published. Review:
	  https://reviewboard.asterisk.org/r/3780/

2014-08-07 14:17 +0000 [r420289-420309]  Matthew Jordan <mjordan@digium.com>

	* main/pbx.c: pbx: Filter out pattern matching hints in responses
	  sent to ExtensionStateList Hints that are a pattern match are
	  technically stored in the hint container in the same fashion as
	  concrete implementations of hints. The pattern matching hints,
	  however, are not "real" in the sense that things can subscribe to
	  them: rather, they are stored in the hints container so that when
	  a subscription is made a "real" hint can be generated for the
	  subscription if one does not yet exist. The extension state core
	  takes care of this correctly by matching against non-pattern
	  matching extensions prior to pattern matching extensions. Because
	  of this, however, the ExtensionStateList AMI action was returning
	  pattern matching hints when executed. These hints are meaningless
	  from the perspective of AMI clients: their state will never
	  change, they cannot be subscribed to, and events would never
	  normally be generated from them. As such, we now filter these out
	  of the response.

	* build_tools/post_process_documentation.py: build_tools: Skip
	  managerEvent combining for AMI action responses AMI action
	  responses can (and will) reference AMI events that they return.
	  These event references and definitions should not be combined
	  with AMI events raised elsewhere in the code, as they are
	  specifically tied to the AMI action that raised them.
	  ASTERISK-24156 #close Reported by: Rusty Newton

2014-08-06 18:12 +0000 [r420212-420237]  Richard Mudgett <rmudgett@digium.com>

	* contrib/ast-db-manage/config/versions/2fc7930b41b3_add_pjsip_endpoint_options_for_12_1.py,
	  /: Fix alembic script to work properly in offline mode. When run
	  in offline mode, this would attempt to check the database for the
	  presence of a type it was going to try to create. I now check the
	  context to see if we're running in offline mode and change a
	  parameter accordingly. ........ Merged revisions 407567 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* contrib/ast-db-manage/config/versions/3855ee4e5f85_add_missing_pjsip_options.py
	  (added), /: Add alembic script that adds contact user_agent and
	  endpoint message_context. ........ Merged revisions 411514 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py
	  (added), /,
	  contrib/ast-db-manage/config/versions/43956d550a44_add_tables_for_pjsip.py,
	  contrib/ast-db-manage/config.ini.sample,
	  contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py
	  (added),
	  contrib/ast-db-manage/config/versions/5139253c0423_make_q_member_uniqueid_autoinc.py
	  (added), contrib/ast-db-manage/cdr.ini.sample,
	  contrib/ast-db-manage/voicemail.ini.sample: alembic: Adjust
	  sippeers, queue_members, and voicemail_messages tables. *
	  Increased the sippeers useragent max string size to 255. *
	  Changed the queue_members uniqueid to an auto incremented integer
	  instead of a string. * Increased the voicemail_messages BLOB size
	  to LONGBLOB on mysql. * Fixed the add_tables_for_pjsip config
	  change version downgrade actions to drop a table it created. *
	  Adjusted the sample alembic.ini files cdr.ini.sample,
	  config.ini.sample, and voicemail.ini.sample to give a mysql and
	  postgres sqlalchemy.url lines. ASTERISK-23847 #close Reported by:
	  Stephen More ASTERISK-23825 #close Reported by: Stephen More
	  ASTERISK-23909 #close Reported by: Stephen More Review:
	  https://reviewboard.asterisk.org/r/3870/ ........ Merged
	  revisions 420211 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-06 16:12 +0000 [r420149]  George Joseph <george.joseph@fairview5.com>

	* /, pbx/pbx_lua.c, main/pbx.c: pbx_lua: fix regression with global
	  sym export and context clash by pbx_config. ASTERISK-23818 (lua
	  contexts being overwritten by contexts of the same name in
	  pbx_config) surfaced because pbx_lua, having the
	  AST_MODFLAG_GLOBAL_SYMBOLS set, was always force loaded before
	  pbx_config. Since I couldn't find any reason for pbx_lua to
	  export it's symbols to the rest of Asterisk, I simply changed the
	  flag to AST_MODFLAG_DEFAULT. Problem solved. What I didn't
	  realize was that the symbols need to be exported not because
	  Asterisk needs them but because any external Lua modules like
	  luasql.mysql need the base Lua language APIs exported
	  (ASTERISK-17279). Back to ASTERISK-23818... It looks like there's
	  an issue in pbx.c where context_merge was only merging includes,
	  switches and ignore patterns if the context was already existing
	  AND has extensions, or if the context was brand new. If pbx_lua
	  is loaded before pbx_config, the context will exist BUT pbx_lua,
	  being implemented as a switch, will never place extensions in it,
	  just the switch statement. The result is that when pbx_config
	  loads, it never merges the switch statement created by pbx_lua
	  into the final context. This patch sets pbx_lua's modflag back to
	  AST_MODFLAG_GLOBAL_SYMBOLS and adds an "else if" in context_merge
	  that catches the case where an existing context has includes,
	  switchs or ingore patterns but no actual extensions.
	  ASTERISK-23818 #close Reported by: Dennis Guse Reported by: Timo
	  Teräs Tested by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3891/ ........ Merged
	  revisions 420146 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 420147 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 420148 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-06 15:32 +0000 [r420144]  Walter Doekes <walter+asterisk@wjd.nu>

	* funcs/func_channel.c: Add documentation to the ability to
	  retrieve the source port of a SIP call. (belongs with r419970)
	  ASTERISK-24040 #close Patches: func_channel.c.diff uploaded by
	  dtryba Review: https://reviewboard.asterisk.org/r/3781/

2014-08-06 12:55 +0000 [r420124]  Kinsey Moore <kmoore@digium.com>

	* configs/samples/stasis.conf.sample (added), main/named_acl.c,
	  apps/app_queue.c, main/stasis_bridges.c, main/loader.c,
	  main/stasis.c, apps/app_forkcdr.c, main/stasis_message.c,
	  funcs/func_cdr.c, res/res_corosync.c, res/res_stun_monitor.c,
	  res/res_stasis_test.c, res/res_stasis.c, apps/app_chanspy.c,
	  main/stasis_cache.c, main/pickup.c, main/security_events.c,
	  include/asterisk/stasis.h, main/devicestate.c, main/core_local.c,
	  res/res_stasis_snoop.c, main/endpoints.c, main/presencestate.c,
	  main/cdr.c, main/channel.c, main/stasis_system.c, main/manager.c,
	  main/test.c, main/file.c, main/app.c, pbx/pbx_realtime.c,
	  main/stasis_channels.c, tests/test_stasis.c,
	  res/parking/parking_manager.c, main/stasis_endpoints.c,
	  main/rtp_engine.c, main/ccss.c, main/bridge.c,
	  tests/test_stasis_channels.c: Stasis: Allow message types to be
	  blocked This introduces stasis.conf and a mechanism to prevent
	  certain message types from being published. Internally, this
	  works by preventing the chosen message types from being created
	  which ensures that those message types can never be published.
	  This patch also adjusts message publishers such that message
	  payloads are not created if the related message type is not
	  available. ASTERISK-23943 #close Review:
	  https://reviewboard.asterisk.org/r/3823/

2014-08-05 21:48 +0000 [r420098-420100]  Matthew Jordan <mjordan@digium.com>

	* res/stasis/messaging.c, /: stasis: Fix compilation issue with ao2
	  tagged objects ........ Merged revisions 420099 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/ari/resource_endpoints.c, rest-api/api-docs/events.json, /,
	  channels/chan_sip.c, res/stasis/app.c, res/stasis/messaging.h
	  (added), res/ari/resource_endpoints.h, res/res_pjsip_messaging.c,
	  tests/test_message.c (added), res/res_xmpp.c,
	  include/asterisk/json.h, CHANGES, include/asterisk/manager.h,
	  res/ari/ari_model_validators.c, res/ari/ari_model_validators.h,
	  main/json.c, res/res_ari_endpoints.c, include/asterisk/message.h,
	  res/ari/resource_channels.c, main/message.c, res/res_stasis.c,
	  res/stasis/messaging.c (added), rest-api/api-docs/endpoints.json:
	  Multiple revisions 420089-420090,420097 ........ r420089 |
	  mjordan | 2014-08-05 15:10:52 -0500 (Tue, 05 Aug 2014) | 72 lines
	  ARI: Add channel technology agnostic out of call text messaging
	  This patch adds the ability to send and receive text messages
	  from various technology stacks in Asterisk through ARI. This
	  includes chan_sip (sip), res_pjsip_messaging (pjsip), and
	  res_xmpp (xmpp). Messages are sent using the endpoints resource,
	  and can be sent directly through that resource, or to a
	  particular endpoint. For example, the following would send the
	  message "Hello there" to PJSIP endpoint alice with a display URI
	  of sip:asterisk@mycooldomain.org:
	  ari/endpoints/sendMessage?to=pjsip:alice&from=sip:asterisk@mycooldomain.org&body=Hello+There
	  This is equivalent to the following as well:
	  ari/endpoints/PJSIP/alice/sendMessage?from=sip:asterisk@mycooldomain.org&body=Hello+There
	  Both forms are available for message technologies that allow for
	  arbitrary destinations, such as chan_sip. Inbound messages can
	  now be received over ARI as well. An ARI application that
	  subscribes to endpoints will receive messages from those
	  endpoints: { "type": "TextMessageReceived", "timestamp":
	  "2014-07-12T22:53:13.494-0500", "endpoint": { "technology":
	  "PJSIP", "resource": "alice", "state": "online", "channel_ids":
	  [] }, "message": { "from": "\"alice\" <sip:alice@127.0.0.1>",
	  "to": "pjsip:asterisk@127.0.0.1", "body": "Watson, come here.",
	  "variables": [] }, "application": "testsuite" } The above was
	  made possible due to some rather major changes in the message
	  core. This includes (but is not limited to): - Users of the
	  message API can now register message handlers. A handler has two
	  callbacks: one to determine if the handler has a destination for
	  the message, and another to handle it. - All dialplan
	  functionality of handling a message was moved into a message
	  handler provided by the message API. - Messages can now have the
	  technology/endpoint associated with them. Various other
	  properties are also now more easily accessible. - A number of ao2
	  containers that weren't really needed were replaced with vectors.
	  Iteration over ao2_containers is expensive and pointless when the
	  lifetime of things is well defined and the number of things is
	  very small. res_stasis now has a new file that makes up its
	  structure, messaging. The messaging functionality implements a
	  message handler, and passes received messages that match an
	  interested endpoint over to the app for processing. Note that
	  inadvertently while testing this, I reproduced ASTERISK-23969.
	  res_pjsip_messaging was incorrectly parsing out the 'to' field,
	  such that arbitrary SIP URIs mangled the endpoint lookup. This
	  patch includes the fix for that as well. Review:
	  https://reviewboard.asterisk.org/r/3726 ASTERISK-23692 #close
	  Reported by: Matt Jordan ASTERISK-23969 #close Reported by:
	  Andrew Nagy ........ r420090 | mjordan | 2014-08-05 15:16:37
	  -0500 (Tue, 05 Aug 2014) | 2 lines Remove automerge properties
	  :-( ........ r420097 | mjordan | 2014-08-05 16:36:25 -0500 (Tue,
	  05 Aug 2014) | 2 lines test_message: Fix strict-aliasing
	  compilation issue ........ Merged revisions 420089-420090,420097
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-05 13:59 +0000 [r420028]  Jonathan Rose <jrose@digium.com>

	* main/format.c: chan_iax2: Fix a crash that occurs when using
	  allow=all for an IAX2 peer Or any combination of codecs that
	  includes Opus. ASTERISK-24107 #close Review:
	  https://reviewboard.asterisk.org/r/3885/

2014-08-04 21:00 +0000 [r420007]  Richard Mudgett <rmudgett@digium.com>

	* main/format_cache.c, include/asterisk/format_cache.h: Remove
	  duplicate definitions of ast_format_vp8.

2014-08-04 20:25 +0000 [r419970]  Mark Michelson <mmichelson@digium.com>

	* channels/sip/dialplan_functions.c: Add the ability to retrieve
	  the source port of a SIP call. This adds the ability to call
	  CHANNEL(recvport) on chan_sip channels to see the port on which
	  an INVITE was received. ASTERISK-24040 #close Reported by dtryba
	  Patches: dialplan_functions.patch uploaded by dtryba (License
	  #6628) Review: https://reviewboard.asterisk.org/r/3781

2014-08-04 19:47 +0000 [r419945]  Rusty Newton <rnewton@digium.com>

	* main/manager.c, /: Manager - Improve documentation for manager
	  commands Getvar and Setvar. The documentation for these commands
	  did not make it clear that they could accept expressions and
	  functions. Modified to make this clear, but tried not to be
	  overly explicit. ASTERISK-21178 #close Reported by: Rusty Newton
	  Tested by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/3854 ........ Merged revisions
	  419942 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 419943 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 419944 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-08-02 03:37 +0000 [r419914]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip.c: Manager: Add PJSIPShowEndpoint[s] documentation
	  This adds a large swath of response documentation for
	  PJSIPShowEndpoint and PJSIPShowEndpoints AMI commands. It relies
	  heavily on the existing text in the configInfo documentation via
	  xi:include tags to avoid documentation duplication. Review:
	  https://reviewboard.asterisk.org/r/3888/

2014-08-01 14:48 +0000 [r419888]  Mark Michelson <mmichelson@digium.com>

	* CHANGES, res/res_pjsip/pjsip_options.c: Add ContactStatusDetail
	  to PJSIPShowEndpoint AMI output. Now when running
	  PJSIPShowEndpoint, you will receive a ContactStatusDetail for
	  each bound contact that Asterisk is qualifying. This information
	  includes the URI of the contact, current reachability, and
	  roundtrip time. AFS-91 #close Reported by Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/3797

2014-07-31 16:19 +0000 [r419851]  Jonathan Rose <jrose@digium.com>

	* CHANGES, res/res_pjsip_notify.c: PJSIP: Send Notify AMI and CLI
	  commands can now send to URI instead of endpoint Review:
	  https://reviewboard.asterisk.org/r/3817/

2014-07-31 11:57 +0000 [r419822-419825]  Matthew Jordan <mjordan@digium.com>

	* main/rtp_engine.c, /, res/res_hep_rtcp.c (added), CHANGES,
	  channels/chan_pjsip.c, res/res_rtp_asterisk.c: res_hep_rtcp: Add
	  module that sends RTCP information to a Homer Server This patch
	  adds a new module to Asterisk, res_hep_rtcp. The module
	  subscribes to the RTCP topics in Stasis and receives RTCP
	  information back from the message bus. It encodes into HEPv3
	  packets and sends the information to the res_hep module for
	  transmission. Using this, someone with a Homer server can get
	  live call quality monitoring for all RTP-based channels in their
	  Asterisk 12+ systems. In addition, there were a few bugs in the
	  RTP engine, res_rtp_asterisk, and chan_pjsip that were uncovered
	  by the tests written for the Asterisk Test Suite. This patch
	  fixes the following: 1) chan_pjsip failed to set its channel
	  unique ids on its RTP instance on outbound calls. It now does
	  this in the appropriate location, in the serialized call
	  callback. 2) The rtp_engine was overflowing some values when
	  packed into JSON. Specifically, some longs and unsigned ints
	  can't be be packed into integer values, for obvious reasons.
	  Since libjansson only supports integers, floats, strings,
	  booleans, and objects, we print these values into strings. 3)
	  res_rtp_asterisk had a few problems: (a) it would emit a source
	  IP address of 0.0.0.0 if bound to that IP address. We now use
	  ast_find_ourip to get a better IP address, and properly marshal
	  the result into an ast_strdupa'd string. (b) Reports can be
	  generated with no report bodies. In particular, this occurs when
	  a sender is transmitting information to a receiver (who will send
	  no RTP back to the sender). As such, the sender has no report
	  body for what it received. We now properly handle this case, and
	  the sender will emit SR reports with no body. Likewise, if we
	  receive an RTCP packet with no report body, we will still
	  generate the appropriate events. ASTERISK-24119 #close ........
	  Merged revisions 419823 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* funcs/func_jitterbuffer.c, doc/appdocsxml.dtd, main/xmldoc.c:
	  xmldocs: Add support for an <example> tag in the Asterisk XML
	  Documentation This patch adds support for an <example /> tag in
	  the XML documentation schema. For CLI help, this doesn't change
	  the formatting too much: - Preceeding white space is removed -
	  Unlike with para elements, new lines are preserved However,
	  having an <example /> tag in the XML schema allows for the wiki
	  documentation generation script to surround the documentation
	  with {code} or {noformat} tags, generating much better content
	  for the wiki - and allowing us to put dialplan examples (and
	  other code snippets, if desired) into the documentation for an
	  application/function/AMI command/etc. Review:
	  https://reviewboard.asterisk.org/r/3807/

2014-07-30 18:32 +0000 [r419806]  Kinsey Moore <kmoore@digium.com>

	* main/manager.c, res/res_manager_presencestate.c,
	  res/res_manager_devicestate.c, main/pbx.c: manager: Add state
	  list commands This patch adds three new AMI commands: *
	  ExtensionStateList (pbx.c) - list all known extension state hints
	  and their current statuses. Events emitted by the list action are
	  equivalent to the ExtensionStatus events. * PresenceStateList
	  (res_manager_presencestate) - list all known presence state
	  values. Events emitted are generated by the stasis message type,
	  and hence are PresenceStateChange events. * DeviceStateList
	  (res_manager_devicestate) - list all known device state values.
	  Events emitted are generated by the stasis message type, and
	  hence are DeviceStateChange events. Patch-by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3799/

2014-07-29 19:41 +0000 [r419789]  Mark Michelson <mmichelson@digium.com>

	* main/manager.c: Do not omit the first header of a UserEvent AMI
	  action from the corresponding emitted UserEvent. ASTERISK-24124
	  #close Reported by Matt Jordan AFS-131 #close Reported by Matt
	  Jordan Patches: userevent.patch uploaded by Matt Jordan (License
	  #6283)

2014-07-29 10:56 +0000 [r419751-419766]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.c, /: res_pjsip_session: Fix race condition
	  where redirecting information may not be set. Since the PJSIP
	  INVITE session module is invoked before any session supplements
	  it was possible for it to handle a redirect before the
	  res_pjsip_diversion module interpreted and set redirecting
	  information on the channel. This would cause the redirecting
	  information to get lost. This patch ensures that session
	  supplements are *always* invoked before a redirect occurs by
	  explicitly calling them in the redirect handler. Review:
	  https://reviewboard.asterisk.org/r/3850/ ........ Merged
	  revisions 419764 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_xpidf_body_generator.c,
	  res/res_pjsip_pidf_body_generator.c:
	  res_pjsip_pidf_body_generator / res_pjsip_xpidf_body_generator:
	  Ensure local entity is unquoted. The local entity as provided by
	  PJSIP is quoted within '<' and '>'. As a result placing this
	  value into XML will result in malformed XML being produced. This
	  patch now unquotes the local entity so it can go safely into the
	  XML. Review: https://reviewboard.asterisk.org/r/3851/ ........
	  Merged revisions 419750 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-28 18:58 +0000 [r419688]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_speech_utils.c, main/channel.c, /,
	  funcs/func_frame_trace.c, main/abstract_jb.c: datastores: Audit
	  ast_channel_datastore_remove usage. Audit of v1.8 usage of
	  ast_channel_datastore_remove() for datastore memory leaks. *
	  Fixed leaks in app_speech_utils and func_frame_trace. * Fixed
	  app_speech_utils not locking the channel when accessing the
	  channel datastore list. Review:
	  https://reviewboard.asterisk.org/r/3859/ Audit of v11 usage of
	  ast_channel_datastore_remove() for datastore memory leaks. *
	  Fixed leak in func_jitterbuffer. (Was not in v12) Review:
	  https://reviewboard.asterisk.org/r/3860/ Audit of v12 usage of
	  ast_channel_datastore_remove() for datastore memory leaks. *
	  Fixed leaks in abstract_jb. * Fixed leak in
	  ast_channel_unsuppress(). Used by ARI mute control and
	  res_mutestream. * Fixed ref leak in ast_channel_suppress(). Used
	  by ARI mute control and res_mutestream. Review:
	  https://reviewboard.asterisk.org/r/3861/ ........ Merged
	  revisions 419684 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 419685 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 419686 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-25 18:09 +0000 [r419612]  Joshua Colp <jcolp@digium.com>

	* main/loader.c: loader: Fix an infinite loop when printing modules
	  using "module show". When creating the alphabetical sorted list
	  each module is added to a list temporarily. On the second
	  iteration each module already has a pointer to another module,
	  causing stuff to go into a loop. ASTERISK-24123 #close Reported
	  by: Malcolm Davenport

2014-07-25 16:47 +0000 [r419592]  Mark Michelson <mmichelson@digium.com>

	* res/res_ari_sounds.c, res/res_stasis.c, res/res_fax_spandsp.c,
	  res/res_timing_kqueue.c, res/res_odbc.c,
	  res/res_pjsip_transport_websocket.c, apps/app_voicemail.c,
	  res/res_calendar.c, channels/chan_unistim.c, cel/cel_radius.c,
	  channels/chan_multicast_rtp.c, res/res_pjsip_notify.c,
	  res/res_snmp.c, formats/format_sln.c, apps/app_meetme.c,
	  apps/app_dictate.c, codecs/codec_gsm.c, res/res_stasis_snoop.c,
	  res/res_musiconhold.c, res/res_format_attr_h264.c,
	  res/res_http_websocket.c, apps/app_followme.c,
	  res/res_config_sqlite.c, formats/format_siren7.c, cdr/cdr_csv.c,
	  formats/format_ilbc.c, channels/chan_phone.c,
	  apps/app_setcallerid.c, apps/app_osplookup.c, cel/cel_custom.c,
	  apps/app_mp3.c, res/res_agi.c, channels/chan_motif.c,
	  res/res_timing_timerfd.c, apps/app_confbridge.c,
	  res/res_format_attr_silk.c, formats/format_siren14.c,
	  res/res_sorcery_realtime.c, channels/chan_mgcp.c,
	  apps/app_jack.c, codecs/codec_lpc10.c,
	  res/res_pjsip_pidf_body_generator.c, res/res_config_pgsql.c,
	  funcs/func_dialplan.c, apps/app_nbscat.c, cdr/cdr_syslog.c,
	  res/res_pjsip_authenticator_digest.c, apps/app_festival.c,
	  res/res_fax.c, apps/app_waitforsilence.c, res/res_adsi.c,
	  res/res_crypto.c, res/res_ari_applications.c,
	  res/res_hep_pjsip.c, pbx/pbx_lua.c, res/res_pjsip_messaging.c,
	  res/res_pjsip_caller_id.c, channels/chan_console.c,
	  apps/app_getcpeid.c, res/res_stasis_answer.c,
	  channels/chan_oss.c, res/res_pjsip_nat.c,
	  res/res_pjsip_session.c, cdr/cdr_tds.c,
	  res/res_pjsip_header_funcs.c, res/res_parking.c,
	  formats/format_vox.c, res/res_pjsip_rfc3326.c,
	  res/res_ari_endpoints.c, res/res_stun_monitor.c,
	  res/res_pjsip_mwi.c, res/res_stasis_recording.c,
	  res/res_pjsip_xpidf_body_generator.c, apps/app_sms.c,
	  codecs/codec_ulaw.c, channels/chan_nbs.c, apps/app_stack.c,
	  channels/chan_pjsip.c, formats/format_g729.c, cel/cel_pgsql.c,
	  res/res_sorcery_config.c, res/res_ari.c, addons/chan_ooh323.c,
	  cdr/cdr_sqlite3_custom.c, codecs/codec_adpcm.c,
	  res/res_ari_asterisk.c, res/res_calendar_caldav.c,
	  apps/app_image.c, apps/app_ices.c, formats/format_wav_gsm.c,
	  main/cli.c, res/res_format_attr_celt.c, res/res_rtp_multicast.c,
	  channels/chan_dahdi.c, funcs/func_pitchshift.c, res/res_smdi.c,
	  res/res_pjsip_one_touch_record_info.c, pbx/pbx_ael.c,
	  pbx/pbx_realtime.c, apps/app_amd.c, channels/chan_alsa.c,
	  formats/format_h263.c, apps/app_url.c, res/res_pjsip_acl.c,
	  apps/app_externalivr.c, res/res_curl.c, formats/format_gsm.c,
	  res/res_speech.c, cdr/cdr_manager.c, res/res_calendar_exchange.c,
	  codecs/codec_g722.c, res/res_pjsip_multihomed.c,
	  res/res_ari_mailboxes.c, cel/cel_tds.c, res/res_sorcery_memory.c,
	  apps/app_fax.c, codecs/codec_speex.c, res/res_pjsip_sdp_rtp.c,
	  codecs/codec_g726.c, formats/format_ogg_vorbis.c,
	  apps/app_talkdetect.c, res/res_ari_channels.c,
	  res/res_pjsip_exten_state.c, apps/app_speech_utils.c,
	  apps/app_agent_pool.c, apps/app_waitforring.c, res/res_statsd.c,
	  addons/cdr_mysql.c, formats/format_g726.c, res/res_ari_bridges.c,
	  addons/app_mysql.c, res/res_stasis_playback.c,
	  addons/format_mp3.c, res/res_pjsip_endpoint_identifier_ip.c,
	  res/res_phoneprov.c, res/res_pjsip_t38.c,
	  res/res_pjsip_registrar_expire.c, cdr/cdr_pgsql.c,
	  cdr/cdr_radius.c, res/res_chan_stats.c,
	  res/res_format_attr_opus.c, res/res_config_odbc.c,
	  funcs/func_audiohookinherit.c,
	  res/res_pjsip_outbound_registration.c, cel/cel_manager.c,
	  funcs/func_odbc.c, res/res_pjsip_endpoint_identifier_anonymous.c,
	  funcs/func_frame_trace.c, funcs/func_aes.c, cdr/cdr_sqlite.c,
	  apps/app_minivm.c, res/res_pjsip_log_forwarder.c,
	  formats/format_h264.c, res/res_config_ldap.c, apps/app_ivrdemo.c,
	  addons/chan_mobile.c, apps/app_stasis.c,
	  res/res_pjsip_diversion.c, cdr/cdr_custom.c, apps/app_adsiprog.c,
	  res/res_pjsip_dtmf_info.c, res/res_rtp_asterisk.c,
	  res/res_calendar_icalendar.c, res/res_hep.c, channels/chan_sip.c,
	  channels/chan_bridge_media.c, codecs/codec_alaw.c,
	  apps/app_queue.c, res/res_srtp.c, funcs/func_presencestate.c,
	  res/res_timing_pthread.c, res/res_manager_presencestate.c,
	  res/res_corosync.c, apps/app_celgenuserevent.c,
	  cel/cel_sqlite3_custom.c, res/snmp/agent.c, pbx/pbx_dundi.c,
	  formats/format_g723.c, funcs/func_devstate.c,
	  res/res_pjsip_registrar.c,
	  res/res_pjsip_pidf_eyebeam_body_supplement.c,
	  addons/res_config_mysql.c,
	  res/res_pjsip_pidf_digium_body_supplement.c, apps/app_test.c,
	  res/res_timing_dahdi.c, cdr/cdr_adaptive_odbc.c,
	  apps/app_alarmreceiver.c, apps/app_chanisavail.c,
	  res/res_format_attr_h263.c, res/res_pjsip_mwi_body_generator.c,
	  res/res_xmpp.c, res/res_http_post.c, channels/chan_iax2.c,
	  res/res_pjsip_endpoint_identifier_user.c, res/res_pjsip.c,
	  res/res_pktccops.c, res/res_pjsip_send_to_voicemail.c,
	  main/loader.c, cel/cel_odbc.c, res/res_ari_model.c,
	  channels/chan_skinny.c,
	  res/res_pjsip_outbound_authenticator_digest.c,
	  res/res_mwi_external.c, apps/app_skel.c, formats/format_pcm.c,
	  include/asterisk/module.h, res/res_pjsip_path.c,
	  res/res_ari_playbacks.c, res/res_pjsip_pubsub.c, cdr/cdr_odbc.c,
	  funcs/func_periodic_hook.c, res/res_stasis_test.c,
	  formats/format_jpeg.c, res/res_pjsip_refer.c,
	  formats/format_g719.c, res/res_clialiases.c,
	  res/res_config_sqlite3.c, res/res_ari_device_states.c,
	  formats/format_wav.c, apps/app_saycounted.c, apps/app_dahdiras.c,
	  apps/app_morsecode.c, res/res_stasis_mailbox.c,
	  res/res_ael_share.c, res/res_mwi_external_ami.c,
	  res/res_pjsip_logger.c, res/res_stasis_device_state.c,
	  res/res_calendar_ews.c, res/res_monitor.c, apps/app_playback.c,
	  res/res_ari_recordings.c, res/res_manager_devicestate.c,
	  res/res_config_curl.c, channels/chan_misdn.c, funcs/func_curl.c,
	  res/res_ari_events.c, res/res_pjsip_dialog_info_body_generator.c,
	  res/res_sorcery_astdb.c, codecs/codec_dahdi.c,
	  apps/app_zapateller.c, pbx/pbx_config.c: Add module support level
	  to ast_module_info structure. Print it in CLI "module show" .
	  ASTERISK-23919 #close Reported by Malcolm Davenport Review:
	  https://reviewboard.asterisk.org/r/3802

2014-07-25 14:47 +0000 [r419563-419567]  Matthew Jordan <mjordan@digium.com>

	* CHANGES, res/ari/ari_model_validators.c,
	  rest-api/api-docs/recordings.json,
	  res/ari/ari_model_validators.h, /, res/res_stasis_recording.c:
	  Multiple revisions 419565-419566 ........ r419565 | mjordan |
	  2014-07-25 09:41:23 -0500 (Fri, 25 Jul 2014) | 21 lines ARI:
	  report duration values in LiveRecording objects This patch adds
	  three new fields to the LiveRecording model: - total_duration:
	  the total length of the live recording - talking_duration:
	  optional. The duration of talking energy that was detected while
	  the recording was made. - silence_duration: optional. The
	  duration of silence that was detected while the recording was
	  made. These values are reported in the RecordingFinished ARI
	  event. When a DSP is enabled on the channel during the recording
	  - which occurs when the recording is created with
	  max_silence_seconds (indicating that the user actually cares
	  about how much silence is in the file), we will report the
	  talking_duration and silence_duration in addition to the
	  total_duration. Review: https://reviewboard.asterisk.org/r/3770/
	  ASTERISK-24037 #close Reported by: Samuel Galarneau ........
	  r419566 | mjordan | 2014-07-25 09:46:15 -0500 (Fri, 25 Jul 2014)
	  | 1 line Update CHANGES for r419565 ........ Merged revisions
	  419565-419566 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/loader.c, res/res_calendar.c: module loader: Unload modules
	  in reverse order of their start order When Asterisk starts a
	  module (calling its load_module function), it re-orders the
	  module list, sorting it alphabetically. Ostensibly, this was done
	  so that the output of 'module show' listed modules in alphabetic
	  order. This had the unfortunate side effect of making modules
	  with complex usage patterns unloadable. A module that has a large
	  number of modules that depend on it is typically abandoned during
	  the unloading process. This results in its memory not being
	  reclaimed during exit. Generally, this isn't harmful - when the
	  process is destroyed, the operating system will reclaim all
	  memory allocated by the process. Prior to Asterisk 12, we also
	  didn't have many modules with complex dependencies. However, with
	  the advent of ARI and PJSIP, this can make make unloading those
	  modules successfully nearly impossible, and thus tracking memory
	  leaks or ref debug leaks a real pain. While this patch is not a
	  complete overhaul of the module loader - such an effort would be
	  beyond the scope of what could be done for Asterisk 13 - this
	  does make some marginal improvements to the loader such that
	  modules like res_pjsip or res_stasis *may* be made properly
	  un-loadable in the future. 1. The linked list of modules has been
	  replaced with a doubly linked list. This allows traversal of the
	  module list to occur backwards. The module shutdown routine now
	  walks the global list backwards when it attempts to unload
	  modules. 2. The alphabetic reorganization of the module list on
	  startup has been removed. Instead, a started module is placed at
	  the end of the module list. 3. The ast_update_module_list
	  function - which is used by the CLI to display the modules - now
	  does the sorting alphabetically itself. It creates its own linked
	  list and inserts the modules into it in alphabetic order. This
	  allows for the intent of the previous code to be maintained. This
	  patch also contains a fix for res_calendar. Without
	  calendar.conf, the calendar modules were improperly bumping the
	  use count of res_calendar, then failing to load themselves. This
	  patch makes it so that we detect whether or not calendaring is
	  enabled before altering the use count. Review:
	  https://reviewboard.asterisk.org/r/3777/

2014-07-25 10:54 +0000 [r419537-419539]  Joshua Colp <jcolp@digium.com>

	* apps/app_bridgewait.c, /: app_bridgewait: Remove possibility of
	  race condition between channels leaving/joining. Bridges created
	  by app_bridgewait previously had the "dissolve when empty" flag
	  set. This caused the bridge core to destroy them when the last
	  channel had left. This introduced a race condition where we may
	  have a reference to the bridge but it is not actually joinable
	  when we try to join it. This flag has now been removed and the
	  bridge is guaranteed to be joinable at all times. ASTERISK-23987
	  #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3836/ ........ Merged
	  revisions 419538 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/bridge.c: bridge: Make "bridge destroy" only available in
	  developer mode and add "all" to "bridge kick". The "bridge
	  destroy" CLI command is invasive to bridges and can leave them in
	  an unexpected state for the users of them. Since this command may
	  be useful for developers it is now only available when developer
	  mode is available. To take its place "all" has been added as a
	  valid option to the "bridge kick" CLI command. It will kick all
	  of the channels in the bridge out. ASTERISK-23987 Reported by:
	  Matt Jordan Review: https://reviewboard.asterisk.org/r/3840/
	  ........ Merged revisions 419536 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-24 22:48 +0000 [r419520]  Richard Mudgett <rmudgett@digium.com>

	* main/bridge.c, main/bridge_basic.c, main/core_unreal.c,
	  UPGRADE.txt, include/asterisk/channel.h, CHANGES,
	  apps/app_followme.c, apps/app_queue.c, main/cel.c,
	  res/parking/parking_bridge_features.c, apps/app_dial.c,
	  main/channel.c, main/dial.c, main/pbx.c: accountcode: Slightly
	  change accountcode propagation. The previous behavior was to
	  simply set the accountcode of an outgoing channel to the
	  accountcode of the channel initiating the call. It was done this
	  way a long time ago to allow the accountcode set on the SIP/100
	  channel to be propagated to a local channel so the dialplan
	  execution on the Local;2 channel would have the SIP/100
	  accountcode available. SIP/100 -> Local;1/Local;2 -> SIP/200
	  Propagating the SIP/100 accountcode to the local channels is very
	  useful. Without any dialplan manipulation, all channels in this
	  call would have the same accountcode. Using dialplan, you can set
	  a different accountcode on the SIP/200 channel either by setting
	  the accountcode on the Local;2 channel or by the Dial
	  application's b(pre-dial), M(macro) or U(gosub) options, or by
	  the FollowMe application's b(pre-dial) option, or by the Queue
	  application's macro or gosub options. Before Asterisk v12, the
	  altered accountcode on SIP/200 will remain until the local
	  channels optimize out and the accountcode would change to the
	  SIP/100 accountcode. Asterisk v1.8 attempted to add peeraccount
	  support but ultimately had to punt on the support. The
	  peeraccount support was rendered useless because of how the CDR
	  code needed to unconditionally force the caller's accountcode
	  onto the peer channel's accountcode. The CEL events were thus
	  intentionally made to always use the channel's accountcode as the
	  peeraccount value. With the arrival of Asterisk v12, the
	  situation has improved somewhat so peeraccount support can be
	  made to work. Using the indicated example, the the accountcode
	  values become as follows when the peeraccount is set on SIP/100
	  before calling SIP/200: SIP/100 ---> Local;1 ---- Local;2 --->
	  SIP/200 acct: 100 \/ acct: 200 \/ acct: 100 \/ acct: 200 peer:
	  200 /\ peer: 100 /\ peer: 200 /\ peer: 100 If a channel already
	  has an accountcode it can only change by the following explicit
	  user actions: 1) A channel originate method that can specify an
	  accountcode to use. 2) The calling channel propagating its
	  non-empty peeraccount or its non-empty accountcode if the
	  peeraccount was empty to the outgoing channel's accountcode
	  before initiating the dial. e.g., Dial and FollowMe. The
	  exception to this propagation method is Queue. Queue will only
	  propagate peeraccounts this way only if the outgoing channel does
	  not have an accountcode. 3) Dialplan using CHANNEL(accountcode).
	  4) Dialplan using CHANNEL(peeraccount) on the other end of a
	  local channel pair. If a channel does not have an accountcode it
	  can get one from the following places: 1) The channel driver's
	  configuration at channel creation. 2) Explicit user action as
	  already indicated. 3) Entering a basic or stasis-mixing bridge
	  from a peer channel's peeraccount value. You can specify the
	  accountcode for an outgoing channel by setting the
	  CHANNEL(peeraccount) before using the Dial, FollowMe, and Queue
	  applications. Queue adds the wrinkle that it will not overwrite
	  an existing accountcode on the outgoing channel with the calling
	  channels values. Accountcode and peeraccount values propagate to
	  an outgoing channel before dialing. Accountcodes also propagate
	  when channels enter or leave a basic or stasis-mixing bridge. The
	  peeraccount value only makes sense for mixing bridges with two
	  channels; it is meaningless otherwise. * Made peeraccount
	  functional by changing accountcode propagation as described
	  above. * Fixed CEL extracting the wrong ie value for the
	  peeraccount. This was done intentionally in Asterisk v1.8 when
	  that version had to punt on peeraccount. * Fixed a few places
	  dealing with accountcodes that were reading from channels without
	  the lock held. AFS-65 #close Review:
	  https://reviewboard.asterisk.org/r/3601/

2014-07-24 21:01 +0000 [r419504]  Michael L. Young <elgueromexicano@gmail.com>

	* main/db.c, include/asterisk/astdb.h: core/db: Revert Patch Added
	  In Attempt To Improve I/O Performance Reverting the patch since
	  it was causing a regression and after fixing the regression,
	  there were no performance gains. At least based on my method for
	  measurement. ASTERISK-24050 Review:
	  https://reviewboard.asterisk.org/r/3841/

2014-07-24 17:50 +0000 [r419438-419439]  Corey Farrell <git@cfware.com>

	* include/asterisk/astobj.h: Deprecate astobj.h This flags astobj.h
	  as deprecated, warns people to use astobj2.h instead. Only
	  netsock.c (also deprecated) still uses astobj.h. ASTERISK-24069
	  #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3818/

	* channels/sip/include/sip.h, channels/chan_sip.c: chan_sip:
	  complete upgrade to ao2 This change upgrades sip_registry and
	  sip_subscription_mwi to astobj2. ASTERISK-24067 #close Reported
	  by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3759/

2014-07-24 16:52 +0000 [r419377]  Jason Parker <jparker@digium.com>

	* addons/chan_ooh323.c, /: Don't cause Asterisk to exit if
	  ooh323.conf not found. (closes issue ASTERISK-23814) ........
	  Merged revisions 419374 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 419375 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 419376 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-24 15:20 +0000 [r419358]  Matthew Jordan <mjordan@digium.com>

	* main/devicestate.c, channels/chan_pjsip.c: device state: Update
	  the core to report ONHOLD if a channel is on hold In Asterisk, it
	  is possible for a device to have a status of ONHOLD. This is not
	  typically an easy thing to determine, as a channel being on hold
	  is not a direct channel state. Typically, this has to be
	  calculated outside of the core independently in channel drivers,
	  notably, chan_sip and chan_pjsip. Both of these channel drivers
	  already have to calculate device state in a fashion more complex
	  than the core can handle, as they aggregate all state of all
	  channels associated with a peer/endpoint; they also independently
	  track whether or not one of those channels is currently on hold
	  and mark the device state appropriately. In 12+, we now have the
	  ability to report an AST_DEVICE_ONHOLD state for all channels
	  that defer their device state to the core. This is due to channel
	  hold state actually now being tracked on the channel itself. If a
	  channel driver defers its device state to the core (which many,
	  such as DAHDI, IAX2, and others do in most situations), the
	  device state core already goes out to get a channel associated
	  with the device. As such, it can now also factor the channel hold
	  state in its calculation. This patch adds this logic to the
	  device state core. It also uses an existing mapping between
	  device state and channel state to handle more channel states.
	  chan_pjsip has been updated slightly as well to make use of this
	  (as it was, for some reason, reporting a channel state of BUSY as
	  a device state of INUSE, which feels slightly wrong). Review:
	  https://reviewboard.asterisk.org/r/3771/ ASTERISK-24038 #close

2014-07-24 13:00 +0000 [r419342]  Kinsey Moore <kmoore@digium.com>

	* include/asterisk/manager.h, doc/appdocsxml.dtd, main/xmldoc.c,
	  main/manager_bridges.c, main/manager.c,
	  include/asterisk/xmldoc.h, main/config_options.c: AMI: Allow for
	  command response documentation Allow for responses to AMI
	  actions/commands to be documented properly in XML and displayed
	  via the CLI. Response events are documented exactly as standard
	  AMI events are documented. Review:
	  https://reviewboard.asterisk.org/r/3812/

2014-07-23 16:46 +0000 [r419319]  Matthew Jordan <mjordan@digium.com>

	* main/endpoints.c, tests/test_stasis_endpoints.c, /: endpoints:
	  Fix failing unit tests from r419196 This patch does two things:
	  (1) It updates the unit tests to expect additional stasis
	  messages. More messages are now sent to the endpoint topic, due
	  to forwarding all channel messages and the forwarding
	  relationship set up between endpoints themselves. (2) Remove the
	  technology forwarding subscription during ast_endpoint_shutdown.
	  This prevents an improper double shutdown of an endpoint from
	  occurring. ........ Merged revisions 419318 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-23 14:00 +0000 [r419286]  Scott Griepentrog <sgriepentrog@digium.com>

	* apps/app_voicemail.c, /: app_voicemail: use a consistent
	  generator string When updating voicemail.conf when a user changes
	  their pin, change the generator string to be the same as the
	  module name when reading so that the same config_hook will be
	  called. Review: https://reviewboard.asterisk.org/r/3837/ ........
	  Merged revisions 419284 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 419285 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-23 01:28 +0000 [r419268]  Corey Farrell <git@cfware.com>

	* main/manager.c, res/res_fax.c: res_fax: unregister manager
	  actions on unload * Unregister manager actions FAXSessions,
	  FAXSession and FAXStats at unload. * Update ast_manager_register2
	  use ao2_t_alloc tagged with the action name. ASTERISK-24058
	  #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3831/

2014-07-22 20:22 +0000 [r419222-419252]  Michael L. Young <elgueromexicano@gmail.com>

	* CHANGES, main/bridge_channel.c: core/bridge_channel: Substitute
	  Variables In Features Application Map Say you wanted to include
	  variables in an application map and have those variables
	  substituted and passed along to the application being executed;
	  currently this does not happen. This patch adds this ability to
	  pass channel variable values to an application before being
	  executed. ASTERISK-22608 #close Reported by: Michael L. Young
	  patches: features_substitute_arguments_v2.diff uploaded by
	  Michael L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/3819/

	* CHANGES, apps/app_mixmonitor.c: apps/app_mixmonitor: Add Options
	  To Play Beep At Start Or Stop We have a new periodic beep feature
	  but sometimes a user needs some sort of feedback, without the
	  need to have a periodic beep during the recording, to let them
	  know that MixMonitor started recording or ended the recording.
	  The use case where this patch is being used is when using Dynamic
	  Features to start and end MixMonitor. This patch adds an option
	  to play a beep when MixMonitor starts and an option to play a
	  beep when MixMonitor ends. ASTERISK-24051 #close Reported by:
	  Michael L. Young patches: mixmonitor-play-beep-start-stop.diff
	  uploaded by Michael L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/3820/

	* main/db.c, include/asterisk/astdb.h: core/db: Improve I/O When
	  Updating Rows When updating a row, we are currently doing an
	  INSERT OR REPLACE INTO. The downside to this is that the row is
	  deleted if it exists and then a new row is inserted. So, we are
	  hitting the disk twice. One for the deletion and one for the
	  insertion. This patch changes this statement to an INSERT INTO
	  and if the insert fails because a row with that key exists, we
	  will IGNORE the failure. Then we will attempt to perform an
	  UPDATE on the existing row if that row wasn't just INSERTed.
	  ASTERISK-24050 #close Reported by: Michael L. Young patches:
	  astdb-insert-update-io-help_trunk_v2.diff uploaded by Michael L.
	  Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/3815/

2014-07-22 17:10 +0000 [r419206]  Richard Mudgett <rmudgett@digium.com>

	* codecs/codec_speex.c: codec_speex: Fix trashing normal static
	  frame for AST_FRAME_CNG. Made use a local static frame to
	  generate the AST_FRAME_CNG frame when silence starts. I don't
	  think the handling of the AST_FRAME_CNG has ever really worked
	  because there doesn't seem to be any consumers of it. Review:
	  https://reviewboard.asterisk.org/r/3813/

2014-07-22 16:20 +0000 [r419203]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/endpoints.h,
	  rest-api/api-docs/applications.json, include/asterisk/xmpp.h,
	  main/channel_internal_api.c, channels/chan_motif.c,
	  include/asterisk/channel.h, res/ari/resource_applications.h,
	  res/res_xmpp.c, channels/chan_iax2.c, main/endpoints.c,
	  channels/chan_pjsip.c, main/channel.c,
	  res/ari/resource_endpoints.c, /, channels/chan_sip.c: ARI: Fix
	  endpoint/channel subscription issues; allow for subscriptions to
	  tech This patch serves two purposes: (1) It fixes some bugs with
	  endpoint subscriptions not reporting all of the channel events
	  (2) It serves as the preliminary work needed for ASTERISK-23692,
	  which allows for sending/receiving arbitrary out of call text
	  messages through ARI in a technology agnostic fashion. The
	  messaging functionality described on ASTERISK-23692 requires two
	  things: (1) The ability to send/receive messages associated with
	  an endpoint. This is relatively straight forwards with the
	  endpoint core in Asterisk now. (2) The ability to send/receive
	  messages associated with a technology and an arbitrary technology
	  defined URI. This is less straight forward, as endpoints are
	  formed from a tech + resource pair. We don't have a mechanism to
	  note that a technology that *may* have endpoints exists. This
	  patch provides such a mechanism, and fixes a few bugs along the
	  way. The first major bug this patch fixes is the forwarding of
	  channel messages to their respective endpoints. Prior to this
	  patch, there were two problems: (1) Channel caching messages
	  weren't forwarded. Thus, the endpoints missed most of the
	  interesting bits (such as channel creation, destruction, state
	  changes, etc.) (2) Channels weren't associated with their
	  endpoint until after creation. This resulted in endpoints missing
	  the channel creation message, which limited the usefulness of the
	  subscription in the first place (a major use case being 'tell me
	  when this endpoint has a channel'). Unfortunately, this meant
	  another parameter to ast_channel_alloc. Since not all channel
	  technologies support an ast_endpoint, this patch makes such a
	  call optional and opts for a new function,
	  ast_channel_alloc_with_endpoint. When endpoints are created, they
	  will implicitly create a technology endpoint for their technology
	  (if one does not already exist). A technology endpoint is special
	  in that it has no state, cannot have channels created for it,
	  cannot be created explicitly, and cannot be destroyed except on
	  shutdown. It does, however, have all messages from other
	  endpoints in its technology forwarded to it. Combined with the
	  bug fixes, we now have Stasis messages being properly forwarded.
	  Consider the following scenario: two PJSIP endpoints (foo and
	  bar), where bar has a single channel associated with it and foo
	  has two channels associated with it. The messages would be
	  forwarded as follows: channel PJSIP/foo-1 -- \ --> endpoint
	  PJSIP/foo -- / \ channel PJSIP/foo-2 -- \ ---- > endpoint PJSIP /
	  channel PJSIP/bar-1 -----> endpoint PJSIP/bar -- ARI, through the
	  applications resource, can: - subscribe to endpoint:PJSIP/foo and
	  get notifications for channels PJSIP/foo-1,PJSIP/foo-2 and
	  endpoint PJSIP/foo - subscribe to endpoint:PJSIP/bar and get
	  notifications for channels PJSIP/bar-1 and endpoint PJSIP/bar -
	  subscribe to endpoint:PJSIP and get notifications for channels
	  PJSIP/foo-1,PJSIP/foo-2,PJSIP/bar-1 and endpoints
	  PJSIP/foo,PJSIP/bar Note that since endpoint PJSIP never changes,
	  it never has events itself. It merely provides an aggregation
	  point for all other endpoints in its technology (which in turn
	  aggregate all channel messages associated with that endpoint).
	  This patch also adds endpoints to res_xmpp and chan_motif,
	  because the actual messaging work will need it (messaging without
	  XMPP is just sad). Review:
	  https://reviewboard.asterisk.org/r/3760/ ASTERISK-23692 ........
	  Merged revisions 419196 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-22 14:36 +0000 [r419180]  Joshua Colp <jcolp@digium.com>

	* channels/chan_iax2.c: chan_iax2: Restore previous behavior of
	  iax2_best_codec. The iax2_best_codec function was changed to
	  convert the formats into a format compatibilities structure and
	  grab the first format from it. The resulting order differs from
	  the previous order of iax2_best_codec which causes unexpected
	  formats to get chosen (such as g723). This commit brings back the
	  old behavior of iax2_best_codec by having a specified preference
	  list. Review: https://reviewboard.asterisk.org/r/3835/

2014-07-22 14:22 +0000 [r419110-419175]  Kinsey Moore <kmoore@digium.com>

	* addons/ooh323c/src/printHandler.c, tests/test_sorcery_realtime.c,
	  tests/test_json.c, addons/ooh323c/src/ooq931.c,
	  tests/test_astobj2_thrash.c, addons/chan_ooh323.c, /,
	  tests/test_optional_api.c, tests/test_abstract_jb.c,
	  apps/app_meetme.c, tests/test_logger.c, tests/test_event.c,
	  tests/test_hashtab_thrash.c, res/res_mwi_external_ami.c,
	  tests/test_sorcery.c, res/res_corosync.c,
	  tests/test_voicemail_api.c, tests/test_aoc.c,
	  tests/test_astobj2.c, tests/test_config.c: Fix more dev-mode
	  build issues ........ Merged revisions 419129 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 419162 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 419163 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/dial.c: Dial API: Prevent crash on NULL cap This prevents a
	  crash in the Dial API triggered by use of the Page() application
	  where a format capability struct was used before checking whether
	  it was NULL. ASTERISK-24074 #close

	* channels/chan_skinny.c, tests/test_core_format.c: Fix build in
	  dev-mode

2014-07-21 16:26 +0000 [r419109]  Jonathan Rose <jrose@digium.com>

	* channels/chan_iax2.c: chan_iax2: Restore codec choice behavior
	  from media formats branch After merging the media formats branch,
	  chan_iax2 was discarding codec preferences for the purpose of
	  choosing which codec a channel would use once a call started.
	  This patch restores the Asterisk 1.8-12 codec choice behaviors.
	  ASTERISK-23958 #close Review:
	  https://reviewboard.asterisk.org/r/3800/

2014-07-21 16:09 +0000 [r419093]  Joshua Colp <jcolp@digium.com>

	* channels/chan_iax2.c: chan_iax2: Only send mini frames if the
	  underlying format has not changed, not if it has. ASTERISK-24072
	  #close Reported by: Matt Jordan

2014-07-21 14:49 +0000 [r419077]  Sean Bright <sean@malleable.com>

	* configure, configure.ac: Fix build when pjproject is installed in
	  a non-standard location. When configuring Asterisk to build
	  against a version of pjproject installed in a non-standard
	  location, the checks for "PJSIP Transaction Group Lock Support"
	  and "PJSIP Media Stream Replacement Support" fail. This is
	  because these secondary checks are not taking the CFLAGS and LIBS
	  returned by the pkg-config check into account. Review:
	  https://reviewboard.asterisk.org/r/3830

2014-07-21 08:41 +0000 [r419060]  Corey Farrell <git@cfware.com>

	* channels/sig_analog.c, res/res_smdi.c, channels/chan_motif.c,
	  include/asterisk/smdi.h, apps/app_voicemail.c,
	  channels/chan_dahdi.c: res_smdi: convert to astobj2 Remove
	  functions: ast_smdi_interface_unref ast_smdi_md_message_putback
	  ast_smdi_mwi_message_putback ast_smdi_md_message destructor
	  ast_smdi_mwi_message destructor Includes for astobj.h are removed
	  everywhere it's possible. ASTERISK-24066 #close Review:
	  https://reviewboard.asterisk.org/r/3758/

2014-07-20 22:06 +0000 [r419044]  Matthew Jordan <mjordan@digium.com>

	* apps/app_confbridge.c, res/ari/resource_channels.c,
	  include/asterisk/rtp_engine.h, include/asterisk/slinfactory.h,
	  res/res_calendar.c, codecs/codec_g722.c,
	  include/asterisk/res_pjsip_session.h, main/frame.c,
	  codecs/ex_lpc10.h, apps/app_dictate.c, res/res_fax.c,
	  apps/app_echo.c, include/asterisk/slin.h, codecs/codec_g726.c,
	  formats/format_ogg_vorbis.c, codecs/codec_gsm.c,
	  codecs/ex_alaw.h, formats/format_wav_gsm.c,
	  channels/iax2/provision.c, channels/chan_iax2.c,
	  res/res_format_attr_h264.c, main/data.c, main/manager.c,
	  include/asterisk/audiohook.h, formats/format_pcm.c,
	  main/config_options.c, res/res_format_attr_silk.c,
	  main/bridge_channel.c, res/res_speech.c, channels/chan_pjsip.c,
	  res/res_clioriginate.c, formats/format_g729.c,
	  channels/chan_unistim.c, res/res_rtp_asterisk.c,
	  include/asterisk/smoother.h (added), main/rtp_engine.c,
	  addons/format_mp3.c, formats/format_wav.c,
	  apps/confbridge/conf_chan_record.c, include/asterisk/speech.h,
	  codecs/ex_adpcm.h, channels/iax2/codec_pref.c (added),
	  include/asterisk/codec.h (added), formats/format_siren7.c,
	  include/asterisk/file.h, channels/chan_dahdi.c,
	  include/asterisk/image.h, funcs/func_channel.c,
	  main/abstract_jb.c, formats/format_h263.c, codecs/codec_dahdi.c,
	  main/dsp.c, apps/app_voicemail.c, apps/app_jack.c,
	  funcs/func_talkdetect.c, channels/chan_vpb.cc,
	  channels/chan_sip.c, formats/format_sln.c,
	  tests/test_abstract_jb.c, codecs/codec_alaw.c, UPGRADE.txt,
	  main/smoother.c (added), codecs/ex_speex.h,
	  channels/chan_console.c, apps/app_talkdetect.c,
	  main/format_pref.c (removed), main/indications.c,
	  include/asterisk/format_cap.h, main/media_index.c,
	  apps/app_agent_pool.c, res/res_pjsip_session.c, main/cli.c,
	  res/res_format_attr_celt.c, channels/chan_skinny.c,
	  tests/test_core_format.c (added), funcs/func_frame_trace.c,
	  res/res_pjsip/pjsip_configuration.c, main/file.c,
	  include/asterisk/frame.h, formats/format_g726.c,
	  apps/app_mixmonitor.c, channels/chan_mgcp.c, main/sorcery.c,
	  codecs/ex_ilbc.h, codecs/codec_lpc10.c, tests/test_format_cache.c
	  (added), apps/app_meetme.c, main/translate.c,
	  apps/app_originate.c, res/parking/parking_applications.c,
	  apps/app_ices.c, channels/iax2/parser.c, res/res_rtp_multicast.c,
	  pbx/pbx_spool.c, funcs/func_pitchshift.c, formats/format_vox.c,
	  main/format_cap.c, tests/test_cel.c, include/asterisk/format.h,
	  formats/format_h264.c, apps/app_chanspy.c, apps/app_nbscat.c,
	  addons/chan_ooh323.c, bridges/bridge_holding.c,
	  channels/iax2/include/codec_pref.h (added), codecs/codec_adpcm.c,
	  apps/app_waitforsilence.c, res/res_pjsip_sdp_rtp.c,
	  addons/chan_ooh323.h, bridges/bridge_simple.c,
	  apps/app_alarmreceiver.c, bridges/bridge_softmix.c,
	  res/res_stasis_snoop.c, main/sounds_index.c, main/core_local.c,
	  main/codec_builtin.c (added), include/asterisk/format_cache.h
	  (added), apps/app_speech_utils.c, res/res_format_attr_opus.c,
	  include/asterisk/abstract_jb.h, main/channel.c,
	  include/asterisk/format_compatibility.h (added), apps/app_mp3.c,
	  tests/test_voicemail_api.c, channels/chan_alsa.c, main/app.c,
	  formats/format_g723.c, codecs/codec_ilbc.c, tests/test_config.c,
	  formats/format_gsm.c, apps/app_milliwatt.c, codecs/ex_ulaw.h,
	  main/asterisk.c, include/asterisk/res_pjsip.h, main/format.c,
	  main/ccss.c, main/bridge.c, codecs/codec_speex.c,
	  include/asterisk/format_pref.h (removed), apps/app_record.c,
	  main/slinfactory.c, res/res_adsi.c, main/core_unreal.c,
	  res/ari/resource_bridges.c, include/asterisk/callerid.h,
	  channels/pjsip/dialplan_functions.c, main/dial.c,
	  channels/dahdi/bridge_native_dahdi.c, main/format_cache.c
	  (added), include/asterisk/mod_format.h, apps/app_sms.c,
	  codecs/codec_resample.c, main/format_compatibility.c (added),
	  main/audiohook.c, formats/format_jpeg.c, res/res_stasis.c,
	  formats/format_g719.c, include/asterisk/translate.h,
	  funcs/func_speex.c, codecs/codec_a_mu.c,
	  channels/iax2/format_compatibility.c (added),
	  apps/app_festival.c, main/channel_internal_api.c,
	  tests/test_format_api.c (removed), codecs/ex_g722.h,
	  main/utils.c, res/ari/resource_sounds.c,
	  res/res_format_attr_h263.c, codecs/ex_g726.h,
	  include/asterisk/_private.h, channels/chan_oss.c,
	  channels/chan_misdn.c, main/codec.c (added), main/callerid.c,
	  addons/ooh323cDriver.c, apps/app_amd.c, codecs/codec_ulaw.c,
	  main/image.c, channels/chan_nbs.c, bridges/bridge_native_rtp.c,
	  channels/iax2/include/format_compatibility.h (added),
	  formats/format_siren14.c, res/res_fax_spandsp.c,
	  addons/chan_mobile.c, addons/ooh323cDriver.h,
	  channels/sip/include/sip.h, tests/test_format_cap.c (added),
	  channels/chan_multicast_rtp.c, include/asterisk/vector.h,
	  channels/chan_bridge_media.c, apps/app_fax.c,
	  main/bridge_basic.c, apps/app_test.c, include/asterisk/channel.h,
	  include/asterisk/data.h, tests/test_core_codec.c (added),
	  res/res_musiconhold.c, codecs/ex_gsm.h, formats/format_ilbc.c,
	  include/asterisk/config_options.h, channels/chan_phone.c,
	  include/asterisk/bridge_channel.h, apps/app_dumpchan.c,
	  channels/chan_motif.c, res/res_agi.c: media formats: re-architect
	  handling of media for performance improvements In the old times
	  media formats were represented using a bit field. This was fast
	  but had a few limitations. 1. Asterisk was limited in how many
	  formats it could handle. 2. Formats, being a bit field, could not
	  include any attribute information. A format was strictly its
	  type, e.g., "this is ulaw". This was changed in Asterisk 10 (see
	  https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal
	  for notes on that work) which led to the creation of the
	  ast_format structure. This structure allowed Asterisk to handle
	  attributes and bundle information with a format. Additionally,
	  ast_format_cap was created to act as a container for multiple
	  formats that, together, formed the capability of some entity.
	  Another mechanism was added to allow logic to be registered which
	  performed format attribute negotiation. Everywhere throughout the
	  codebase Asterisk was changed to use this strategy.
	  Unfortunately, in software, there is no free lunch. These new
	  capabilities came at a cost. Performance analysis and profiling
	  showed that we spend an inordinate amount of time comparing,
	  copying, and generally manipulating formats and their related
	  structures. Basic prototyping has shown that a reasonably large
	  performance improvement could be made in this area. This patch is
	  the result of that project, which overhauled the media format
	  architecture and its usage in Asterisk to improve performance.
	  Generally, the new philosophy for handling formats is as follows:
	  * The ast_format structure is reference counted. This removed a
	  large amount of the memory allocations and copying that was done
	  in prior versions. * In order to prevent race conditions while
	  keeping things performant, the ast_format structure is immutable
	  by convention and lock-free. Violate this tenet at your peril! *
	  Because formats are reference counted, codecs are also reference
	  counted. The Asterisk core generally provides built-in codecs and
	  caches the ast_format structures created to represent them.
	  Generally, to prevent inordinate amounts of module reference
	  bumping, codecs and formats can be added at run-time but cannot
	  be removed. * All compatibility with the bit field representation
	  of codecs/formats has been moved to a compatibility API. The
	  primary user of this representation is chan_iax2, which must
	  continue to maintain its bit-field usage of formats for
	  interoperability concerns. * When a format is negotiated with
	  attributes, or when a format cannot be represented by one of the
	  cached formats, a new format object is created or cloned from an
	  existing format. That format may have the same codec underlying
	  it, but is a different format than a version of the format with
	  different attributes or without attributes. * While formats are
	  reference counted objects, the reference count maintained on the
	  format should be manipulated with care. Formats are generally
	  cached and will persist for the lifetime of Asterisk and do not
	  explicitly need to have their lifetime modified. An exception to
	  this is when the user of a format does not know where the format
	  came from *and* the user may outlive the provider of the format.
	  This occurs, for example, when a format is read from a channel:
	  the channel may have a format with attributes (hence, non-cached)
	  and the user of the format may last longer than the channel (if
	  the reference to the channel is released prior to the format's
	  reference). For more information on this work, see the API design
	  notes:
	  https://wiki.asterisk.org/wiki/display/AST/Media+Format+Rewrite
	  Finally, this work was the culmination of a large number of
	  developer's efforts. Extra thanks goes to Corey Farrell, who took
	  on a large amount of the work in the Asterisk core, chan_sip, and
	  was an invaluable resource in peer reviews throughout this
	  project. There were a substantial number of patches contributed
	  during this work; the following issues/patch names simply reflect
	  some of the work (and will cause the release scripts to give
	  attribution to the individuals who work on them). Reviews:
	  https://reviewboard.asterisk.org/r/3814
	  https://reviewboard.asterisk.org/r/3808
	  https://reviewboard.asterisk.org/r/3805
	  https://reviewboard.asterisk.org/r/3803
	  https://reviewboard.asterisk.org/r/3801
	  https://reviewboard.asterisk.org/r/3798
	  https://reviewboard.asterisk.org/r/3800
	  https://reviewboard.asterisk.org/r/3794
	  https://reviewboard.asterisk.org/r/3793
	  https://reviewboard.asterisk.org/r/3792
	  https://reviewboard.asterisk.org/r/3791
	  https://reviewboard.asterisk.org/r/3790
	  https://reviewboard.asterisk.org/r/3789
	  https://reviewboard.asterisk.org/r/3788
	  https://reviewboard.asterisk.org/r/3787
	  https://reviewboard.asterisk.org/r/3786
	  https://reviewboard.asterisk.org/r/3784
	  https://reviewboard.asterisk.org/r/3783
	  https://reviewboard.asterisk.org/r/3778
	  https://reviewboard.asterisk.org/r/3774
	  https://reviewboard.asterisk.org/r/3775
	  https://reviewboard.asterisk.org/r/3772
	  https://reviewboard.asterisk.org/r/3761
	  https://reviewboard.asterisk.org/r/3754
	  https://reviewboard.asterisk.org/r/3753
	  https://reviewboard.asterisk.org/r/3751
	  https://reviewboard.asterisk.org/r/3750
	  https://reviewboard.asterisk.org/r/3748
	  https://reviewboard.asterisk.org/r/3747
	  https://reviewboard.asterisk.org/r/3746
	  https://reviewboard.asterisk.org/r/3742
	  https://reviewboard.asterisk.org/r/3740
	  https://reviewboard.asterisk.org/r/3739
	  https://reviewboard.asterisk.org/r/3738
	  https://reviewboard.asterisk.org/r/3737
	  https://reviewboard.asterisk.org/r/3736
	  https://reviewboard.asterisk.org/r/3734
	  https://reviewboard.asterisk.org/r/3722
	  https://reviewboard.asterisk.org/r/3713
	  https://reviewboard.asterisk.org/r/3703
	  https://reviewboard.asterisk.org/r/3689
	  https://reviewboard.asterisk.org/r/3687
	  https://reviewboard.asterisk.org/r/3674
	  https://reviewboard.asterisk.org/r/3671
	  https://reviewboard.asterisk.org/r/3667
	  https://reviewboard.asterisk.org/r/3665
	  https://reviewboard.asterisk.org/r/3625
	  https://reviewboard.asterisk.org/r/3602
	  https://reviewboard.asterisk.org/r/3519
	  https://reviewboard.asterisk.org/r/3518
	  https://reviewboard.asterisk.org/r/3516
	  https://reviewboard.asterisk.org/r/3515
	  https://reviewboard.asterisk.org/r/3512
	  https://reviewboard.asterisk.org/r/3506
	  https://reviewboard.asterisk.org/r/3413
	  https://reviewboard.asterisk.org/r/3410
	  https://reviewboard.asterisk.org/r/3387
	  https://reviewboard.asterisk.org/r/3388
	  https://reviewboard.asterisk.org/r/3389
	  https://reviewboard.asterisk.org/r/3390
	  https://reviewboard.asterisk.org/r/3321
	  https://reviewboard.asterisk.org/r/3320
	  https://reviewboard.asterisk.org/r/3319
	  https://reviewboard.asterisk.org/r/3318
	  https://reviewboard.asterisk.org/r/3266
	  https://reviewboard.asterisk.org/r/3265
	  https://reviewboard.asterisk.org/r/3234
	  https://reviewboard.asterisk.org/r/3178 ASTERISK-23114 #close
	  Reported by: mjordan media_formats_translation_core.diff uploaded
	  by kharwell (License 6464) rb3506.diff uploaded by mjordan
	  (License 6283) media_format_app_file.diff uploaded by kharwell
	  (License 6464) misc-2.diff uploaded by file (License 5000)
	  chan_mild-3.diff uploaded by file (License 5000)
	  chan_obscure.diff uploaded by file (License 5000) jingle.diff
	  uploaded by file (License 5000) funcs.diff uploaded by file
	  (License 5000) formats.diff uploaded by file (License 5000)
	  core.diff uploaded by file (License 5000) bridges.diff uploaded
	  by file (License 5000) mf-codecs-2.diff uploaded by file (License
	  5000) mf-app_fax.diff uploaded by file (License 5000)
	  mf-apps-3.diff uploaded by file (License 5000)
	  media-formats-3.diff uploaded by file (License 5000)
	  ASTERISK-23715 rb3713.patch uploaded by coreyfarrell (License
	  5909) rb3689.patch uploaded by mjordan (License 6283)
	  ASTERISK-23957 rb3722.patch uploaded by mjordan (License 6283)
	  mf-attributes-3.diff uploaded by file (License 5000)
	  ASTERISK-23958 Tested by: jrose rb3822.patch uploaded by
	  coreyfarrell (License 5909) rb3800.patch uploaded by jrose
	  (License 6182) chan_sip.diff uploaded by mjordan (License 6283)
	  rb3747.patch uploaded by jrose (License 6182) ASTERISK-23959
	  #close Tested by: sgriepentrog, mjordan, coreyfarrell
	  sip_cleanup.diff uploaded by opticron (License 6273)
	  chan_sip_caps.diff uploaded by mjordan (License 6283)
	  rb3751.patch uploaded by coreyfarrell (License 5909)
	  chan_sip-3.diff uploaded by file (License 5000) ASTERISK-23960
	  #close Tested by: opticron direct_media.diff uploaded by opticron
	  (License 6273) pjsip-direct-media.diff uploaded by file (License
	  5000) format_cap_remove.diff uploaded by opticron (License 6273)
	  media_format_fixes.diff uploaded by opticron (License 6273)
	  chan_pjsip-2.diff uploaded by file (License 5000) ASTERISK-23966
	  #close Tested by: rmudgett rb3803.patch uploaded by rmudgetti
	  (License 5621) chan_dahdi.diff uploaded by file (License 5000)
	  ASTERISK-24064 #close Tested by: coreyfarrell, mjordan, opticron,
	  file, rmudgett, sgriepentrog, jrose rb3814.patch uploaded by
	  rmudgett (License 5621) moh_cleanup.diff uploaded by opticron
	  (License 6273) bridge_leak.diff uploaded by opticron (License
	  6273) translate.diff uploaded by file (License 5000) rb3795.patch
	  uploaded by rmudgett (License 5621) tls_fix.diff uploaded by
	  mjordan (License 6283) fax-mf-fix-2.diff uploaded by file
	  (License 5000) rtp_transfer_stuff uploaded by mjordan (License
	  6283) rb3787.patch uploaded by rmudgett (License 5621)
	  media-formats-explicit-translate-format-3.diff uploaded by file
	  (License 5000) format_cache_case_fix.diff uploaded by opticron
	  (License 6273) rb3774.patch uploaded by rmudgett (License 5621)
	  rb3775.patch uploaded by rmudgett (License 5621)
	  rtp_engine_fix.diff uploaded by opticron (License 6273)
	  rtp_crash_fix.diff uploaded by opticron (License 6273)
	  rb3753.patch uploaded by mjordan (License 6283) rb3750.patch
	  uploaded by mjordan (License 6283) rb3748.patch uploaded by
	  rmudgett (License 5621) media_format_fixes.diff uploaded by
	  opticron (License 6273) rb3740.patch uploaded by mjordan (License
	  6283) rb3739.patch uploaded by mjordan (License 6283)
	  rb3734.patch uploaded by mjordan (License 6283) rb3689.patch
	  uploaded by mjordan (License 6283) rb3674.patch uploaded by
	  coreyfarrell (License 5909) rb3671.patch uploaded by coreyfarrell
	  (License 5909) rb3667.patch uploaded by coreyfarrell (License
	  5909) rb3665.patch uploaded by mjordan (License 6283)
	  rb3625.patch uploaded by coreyfarrell (License 5909) rb3602.patch
	  uploaded by coreyfarrell (License 5909)
	  format_compatibility-2.diff uploaded by file (License 5000)
	  core.diff uploaded by file (License 5000)

2014-07-18 21:48 +0000 [r419022]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/recordings.json, res/ari/resource_recordings.c,
	  res/stasis_recording/stored.c, res/res_ari_recordings.c, /,
	  include/asterisk/stasis_app_recording.h,
	  res/ari/resource_recordings.h, CHANGES: ari: Add a copy operation
	  for stored recordings This patch adds a new operation for stored
	  recordings, copy. It takes an existing stored recording and makes
	  a copy of it in the same directory or a relative directory under
	  the stored recording directory.
	  /ari/recordings/stored/{recordingName}/copy?destinationRecordingName={copy_name}
	  This is particularly useful for voicemail-esque applications,
	  which may need to copy or move recordings around a directory
	  structure. Review: https://reviewboard.asterisk.org/r/3768/
	  ASTERISK-24036 #close Reported by: Sam Galarneau Tested by: Sam
	  Galarneau ........ Merged revisions 419021 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-18 21:25 +0000 [r418997-419020]  Corey Farrell <git@cfware.com>

	* main/stasis_message_router.c, /: stasis: fix call to ao2_t_alloc
	  for stasis_message_router_create This fixes a build failure
	  introduced by r3821. struct stasis_topic is opaque, so
	  topic->name is unavailable. Switch to using stasis_topic_name().
	  ........ Merged revisions 419019 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis.c, main/stasis_cache_pattern.c,
	  main/stasis_message.c, main/stasis_message_router.c, /: stasis:
	  use ao2_t_alloc for certain object allocators Add tags to stasis
	  objects using the name. This makes it easier to track the source
	  of certain stasis ref leaks. Review:
	  https://reviewboard.asterisk.org/r/3821/ ........ Merged
	  revisions 418996 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-18 19:07 +0000 [r418980]  Kinsey Moore <kmoore@digium.com>

	* res/res_fax_spandsp.c: Fix build in dev-mode

2014-07-18 17:55 +0000 [r418961-418963]  Scott Griepentrog <sgriepentrog@digium.com>

	* res/res_pjsip_pubsub.c, main/astobj2.c,
	  include/asterisk/astobj2.h, main/logger.c, main/utils.c: astobj2:
	  assert on invalid ref and backtrace cleanup If a reference count
	  goes negative, instead of just logging that fact, be more helpful
	  with a backtrace and an assert that will DO_CRASH. This patch
	  also removes the duplicate ao2_bt() function and cleans up
	  extraneous usage of the ast_log_backtrace() call. Review:
	  https://reviewboard.asterisk.org/r/3765/

	* /, channels/chan_sip.c: media formats: fix ref leak of peer for
	  mwi subscription Holding a reference to the peer during mwi
	  subscriptions resulted in a circular reference because the final
	  event message would not be sent until destruction of the peer.
	  Instead, pass the name of the peer to the event callback so that
	  it can fail gracefully after the peer has gone. ASTERISK-23959
	  Review: https://reviewboard.asterisk.org/r/3754/ ........ Merged
	  revisions 418636 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/features_config.c: feature_config: insure featuregroups
	  and applicationmaps are initialized If the features.conf is
	  missing, the cfg->featurgroups and cfg->applicationmaps is not
	  initialized, resulting in assert on ao2_find of a null container.
	  This patch changes the initialization call and adds asserts for a
	  safeguard. Review: https://reviewboard.asterisk.org/r/3809/
	  ........ Merged revisions 418886 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-18 16:47 +0000 [r418938]  Richard Mudgett <rmudgett@digium.com>

	* funcs/func_audiohookinherit.c, /: func_audiohookinherit.c: Fixup
	  some XML documentation wording. ........ Merged revisions 418937
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-18 16:28 +0000 [r418911-418936]  Jonathan Rose <jrose@digium.com>

	* main/channel.c, funcs/func_audiohookinherit.c, /,
	  include/asterisk/audiohook.h, main/framehook.c, res/res_fax.c,
	  main/bridge_basic.c, include/asterisk/res_fax.h,
	  bridges/bridge_native_rtp.c, main/audiohook.c, CHANGES,
	  include/asterisk/framehook.h, res/res_pjsip_refer.c: Channels:
	  Masquerades to automatically move frame/audio hooks Whenever
	  possible, audiohooks and framehooks will now be copied over to
	  the channel that the masquerading channel gets cloned into. This
	  should occur for all audiohooks and most framehooks. As a result,
	  in Asterisk 12.5 and up, the AUDIOHOOK_INHERIT function is now
	  deprecated and its behavior is essentially the new default for
	  all audiohooks, plus some additional audiohooks/framehooks.
	  Review: https://reviewboard.asterisk.org/r/3721/ ........ Merged
	  revisions 418914 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_fax.c, include/asterisk/res_fax.h, CHANGES,
	  res/res_fax.exports.in, res/res_fax_spandsp.c: res_fax: Provide
	  AMI equivalents for fax CLI commands Specifically the following
	  equivalents were created: fax show session -> FAXSession fax show
	  sessions -> FAXSessions fax show stats -> FAXStats Review:
	  https://reviewboard.asterisk.org/r/3666/

2014-07-18 00:11 +0000 [r418893-418895]  Sean Bright <sean@malleable.com>

	* config.sub, menuselect/config.guess, menuselect/config.sub,
	  config.guess: Update config.guess and config.sub

	* autoconf/ast_ext_tool_check.m4: Add missing file from previous
	  commit.

	* menuselect/aclocal.m4, menuselect/configure,
	  menuselect/acinclude.m4 (removed), menuselect/bootstrap.sh,
	  menuselect/autoconfig.h.in: Import Asterisk's autoconf magic
	  instead of using our own.

2014-07-17 21:17 +0000 [r418832-418870]  Matthew Jordan <mjordan@digium.com>

	* configs/samples/acl.conf.sample (added),
	  configs/samples/extensions.conf.sample (added),
	  configs/res_parking.conf.sample (removed),
	  configs/samples/cel_sqlite3_custom.conf.sample (added),
	  configs/cdr_sqlite3_custom.conf.sample (removed),
	  configs/modules.conf.sample (removed),
	  configs/samples/cli_aliases.conf.sample (added),
	  configs/meetme.conf.sample (removed),
	  configs/cdr_pgsql.conf.sample (removed),
	  configs/samples/extensions.ael.sample (added),
	  configs/samples/cdr_adaptive_odbc.conf.sample (added),
	  configs/samples/motif.conf.sample (added),
	  configs/samples/extensions_minivm.conf.sample (added),
	  configs/samples/res_curl.conf.sample (added),
	  configs/res_config_sqlite3.conf.sample (removed),
	  configs/mgcp.conf.sample (removed), configs/dsp.conf.sample
	  (removed), configs/udptl.conf.sample (removed),
	  configs/sip.conf.sample (removed), configs/dbsep.conf.sample
	  (removed), configs/queuerules.conf.sample (removed),
	  configs/samples/cdr_mysql.conf.sample (added),
	  configs/confbridge.conf.sample (removed),
	  configs/samples/cdr_odbc.conf.sample (added),
	  configs/samples/minivm.conf.sample (added),
	  configs/enum.conf.sample (removed),
	  configs/samples/codecs.conf.sample (added),
	  configs/samples/chan_dahdi.conf.sample (added),
	  configs/samples/cdr_custom.conf.sample (added),
	  configs/samples/res_config_mysql.conf.sample (added),
	  configs/samples/dundi.conf.sample (added),
	  configs/samples/oss.conf.sample (added),
	  configs/samples/app_mysql.conf.sample (added),
	  configs/samples/queues.conf.sample (added),
	  configs/samples/cdr.conf.sample (added),
	  configs/samples/cdr_syslog.conf.sample (added),
	  configs/festival.conf.sample (removed),
	  configs/samples/cel_pgsql.conf.sample (added),
	  configs/http.conf.sample (removed), configs/phoneprov.conf.sample
	  (removed), configs/alarmreceiver.conf.sample (removed),
	  configs/samples/features.conf.sample (added),
	  configs/cdr_tds.conf.sample (removed),
	  configs/func_odbc.conf.sample (removed),
	  configs/samples/logger.conf.sample (added),
	  configs/samples/res_odbc.conf.sample (added),
	  configs/samples/agents.conf.sample (added),
	  configs/res_fax.conf.sample (removed),
	  configs/samples/xmpp.conf.sample (added),
	  configs/iaxprov.conf.sample (removed),
	  configs/res_pgsql.conf.sample (removed),
	  configs/extensions.conf.sample (removed),
	  configs/chan_mobile.conf.sample (removed), configs/asterisk.adsi
	  (removed), configs/cel_sqlite3_custom.conf.sample (removed),
	  configs/users.conf.sample (removed),
	  configs/samples/res_pktccops.conf.sample (added),
	  configs/samples/amd.conf.sample (added), configs/rtp.conf.sample
	  (removed), configs/samples/res_parking.conf.sample (added),
	  configs/hep.conf.sample (removed),
	  configs/samples/modules.conf.sample (added),
	  configs/cel_tds.conf.sample (removed),
	  configs/res_curl.conf.sample (removed),
	  configs/samples/skinny.conf.sample (added),
	  configs/samples/cdr_pgsql.conf.sample (added),
	  configs/samples/sip_notify.conf.sample (added),
	  configs/samples/test_sorcery.conf.sample (added),
	  configs/samples/dsp.conf.sample (added),
	  configs/ss7.timers.sample (removed),
	  configs/samples/udptl.conf.sample (added),
	  configs/cdr_odbc.conf.sample (removed),
	  configs/samples/sip.conf.sample (added),
	  configs/minivm.conf.sample (removed),
	  configs/res_config_sqlite.conf.sample (removed),
	  configs/codecs.conf.sample (removed), configs/osp.conf.sample
	  (removed), configs/samples/cel_custom.conf.sample (added),
	  configs/samples/dbsep.conf.sample (added),
	  configs/samples/app_skel.conf.sample (added),
	  configs/console.conf.sample (removed),
	  configs/cdr_manager.conf.sample (removed),
	  configs/cdr_custom.conf.sample (removed),
	  configs/chan_dahdi.conf.sample (removed),
	  configs/res_config_mysql.conf.sample (removed),
	  configs/samples/statsd.conf.sample (added),
	  configs/cli.conf.sample (removed), configs/queues.conf.sample
	  (removed), configs/cdr_syslog.conf.sample (removed), UPGRADE.txt,
	  configs/manager.conf.sample (removed),
	  configs/samples/res_corosync.conf.sample (added),
	  configs/features.conf.sample (removed), configs/sla.conf.sample
	  (removed), configs/logger.conf.sample (removed),
	  configs/res_odbc.conf.sample (removed),
	  configs/agents.conf.sample (removed),
	  configs/samples/ooh323.conf.sample (added), Makefile,
	  configs/xmpp.conf.sample (removed),
	  configs/samples/phoneprov.conf.sample (added),
	  configs/samples/alarmreceiver.conf.sample (added),
	  configs/samples/cdr_tds.conf.sample (added),
	  configs/extconfig.conf.sample (removed),
	  configs/samples/func_odbc.conf.sample (added),
	  configs/samples/res_fax.conf.sample (added),
	  configs/samples/iaxprov.conf.sample (added),
	  configs/samples/res_ldap.conf.sample (added),
	  configs/samples/dnsmgr.conf.sample (added),
	  configs/res_pktccops.conf.sample (removed),
	  configs/cel.conf.sample (removed),
	  configs/samples/res_pgsql.conf.sample (added),
	  configs/samples/chan_mobile.conf.sample (added),
	  configs/samples/asterisk.adsi (added),
	  configs/samples/users.conf.sample (added),
	  configs/samples/rtp.conf.sample (added),
	  configs/phone.conf.sample (removed), configs/skinny.conf.sample
	  (removed), configs/muted.conf.sample (removed),
	  configs/samples/hep.conf.sample (added), configs/iax.conf.sample
	  (removed), configs/samples/cel_tds.conf.sample (added),
	  configs/sip_notify.conf.sample (removed),
	  configs/samples/telcordia-1.adsi (added),
	  configs/samples/alsa.conf.sample (added),
	  configs/samples/adsi.conf.sample (added),
	  configs/test_sorcery.conf.sample (removed),
	  configs/samples/followme.conf.sample (added),
	  configs/samples/asterisk.conf.sample (added),
	  configs/extensions.lua.sample (removed), configs/say.conf.sample
	  (removed), configs/cel_custom.conf.sample (removed),
	  configs/samples/ss7.timers.sample (added),
	  configs/samples/cel_odbc.conf.sample (added),
	  configs/app_skel.conf.sample (removed),
	  configs/samples/ccss.conf.sample (added),
	  configs/cli_permissions.conf.sample (removed),
	  configs/statsd.conf.sample (removed),
	  configs/samples/res_config_sqlite.conf.sample (added),
	  configs/config_test.conf.sample (removed),
	  configs/indications.conf.sample (removed),
	  configs/samples/osp.conf.sample (added),
	  configs/samples/cdr_manager.conf.sample (added),
	  configs/samples/console.conf.sample (added),
	  configs/voicemail.conf.sample (removed),
	  configs/res_corosync.conf.sample (removed),
	  configs/misdn.conf.sample (removed),
	  configs/samples/cli.conf.sample (added), configs/ari.conf.sample
	  (removed), configs/ooh323.conf.sample (removed),
	  configs/samples/calendar.conf.sample (added),
	  configs/samples/res_stun_monitor.conf.sample (added),
	  configs/samples/manager.conf.sample (added),
	  configs/samples/pjsip_notify.conf.sample (added),
	  configs/samples/sla.conf.sample (added),
	  configs/musiconhold.conf.sample (removed),
	  configs/pjsip.conf.sample (removed), configs/sorcery.conf.sample
	  (removed), configs/vpb.conf.sample (removed),
	  configs/unistim.conf.sample (removed),
	  configs/res_ldap.conf.sample (removed),
	  configs/dnsmgr.conf.sample (removed),
	  configs/samples/extconfig.conf.sample (added),
	  configs/samples/res_snmp.conf.sample (added),
	  configs/acl.conf.sample (removed),
	  configs/samples/smdi.conf.sample (added),
	  configs/samples/cel.conf.sample (added),
	  configs/cli_aliases.conf.sample (removed),
	  configs/samples/cdr_sqlite3_custom.conf.sample (added),
	  configs/extensions.ael.sample (removed),
	  configs/cdr_adaptive_odbc.conf.sample (removed),
	  configs/samples/phone.conf.sample (added),
	  configs/extensions_minivm.conf.sample (removed),
	  configs/motif.conf.sample (removed), configs/telcordia-1.adsi
	  (removed), configs/samples/meetme.conf.sample (added),
	  configs/adsi.conf.sample (removed), configs/alsa.conf.sample
	  (removed), configs/samples/muted.conf.sample (added),
	  configs/followme.conf.sample (removed),
	  configs/asterisk.conf.sample (removed),
	  configs/samples/iax.conf.sample (added),
	  configs/samples/res_config_sqlite3.conf.sample (added),
	  configs/samples/mgcp.conf.sample (added),
	  configs/cel_odbc.conf.sample (removed), configs/ccss.conf.sample
	  (removed), configs/cdr_mysql.conf.sample (removed),
	  configs/samples/extensions.lua.sample (added),
	  configs/samples/say.conf.sample (added),
	  configs/dundi.conf.sample (removed),
	  configs/samples/queuerules.conf.sample (added),
	  configs/oss.conf.sample (removed), configs/app_mysql.conf.sample
	  (removed), configs/samples/confbridge.conf.sample (added),
	  configs/samples/cli_permissions.conf.sample (added),
	  configs/samples/enum.conf.sample (added),
	  configs/samples/config_test.conf.sample (added),
	  configs/cdr.conf.sample (removed),
	  configs/samples/indications.conf.sample (added),
	  configs/cel_pgsql.conf.sample (removed),
	  configs/res_stun_monitor.conf.sample (removed),
	  configs/calendar.conf.sample (removed),
	  configs/samples/voicemail.conf.sample (added),
	  configs/pjsip_notify.conf.sample (removed),
	  configs/samples/misdn.conf.sample (added),
	  configs/samples/ari.conf.sample (added),
	  configs/samples/festival.conf.sample (added),
	  configs/samples/http.conf.sample (added),
	  configs/res_snmp.conf.sample (removed),
	  configs/samples/musiconhold.conf.sample (added),
	  configs/samples/pjsip.conf.sample (added),
	  configs/samples/sorcery.conf.sample (added),
	  configs/samples/vpb.conf.sample (added), configs/smdi.conf.sample
	  (removed), configs/samples/unistim.conf.sample (added),
	  configs/samples (added), configs/amd.conf.sample (removed):
	  configs: Move sample config files into a subdirectory of configs
	  This moves all samples configs from configs/ to configs/samples.
	  This allows for additional sets of sample configuration files to
	  be added in the future. Review:
	  https://reviewboard.asterisk.org/r/3804/

	* channels/chan_sip.c, UPGRADE.txt: chan_sip: Make
	  progressinband=never really mean 'never' progressinband=never in
	  sip.conf is easily defeated if an onward trunk sends a progress
	  indication of its own. This is almost certain to happen if the
	  onward trunk is ISDN or IAX as these technologies send a progress
	  indication even if early media is not required. This progress
	  message is passed to the caller, and causes the "never" option to
	  be rather badly named. This patch changes the behaviour of this
	  setting in the following ways: 1) In sip_write(), do not pass the
	  media unless we have either progressed beyond INV_EARLY_MEDIA, or
	  we are in INV_EARLY_MEDIA state, and early media is both set-up
	  and wanted. This helps resolve double-ringing on some buggy
	  handsets. 2) In sip_indicate(), if we see AST_CONTROL_PROGRESS,
	  but SIP_PROG_INBAND_NEVER is set, send a 180 Ringing instead to
	  avoid implicitly enabling early media. Avoid sending double ring
	  indications. NOTE: the meaning of the SIP_PROGRESS_SENT flag
	  changes slightly in this patch to also encapsulate the fact that
	  a channel has *sent or received* a 183 Progress indication. This
	  makes the updated code in sip_write() much more simple. Review:
	  https://reviewboard.asterisk.org/r/3700 ASTERISK-23972 #close
	  Reported by: Steve Davies patches:
	  inband_never_present_early_media2 uploaded by Steve Davies
	  (License 5012)

	* menuselect: Add svn:ignore property

	* UPGRADE.txt, menuselect/configure, menuselect/configure.ac,
	  configure, configure.ac: configure: Fix libxml2 development
	  library dependency checking The commit that added libxml2 support
	  didn't fully check for the libxml2 development script in the
	  Asterisk configure file. As a result, Asterisk could be
	  configured, then fail on menuselect. This patch fixes it so that
	  Asterisk should detect the libxml2 dependency failure first.

	* menuselect/makeopts.in, menuselect/autoconfig.h.in,
	  menuselect/menuselect.h, menuselect/example_menuselect-tree,
	  configure, include/asterisk/autoconfig.h.in, menuselect/Makefile,
	  menuselect/README, menuselect/aclocal.m4, configure.ac,
	  UPGRADE.txt, menuselect/configure, menuselect/configure.ac,
	  menuselect/menuselect.c, menuselect/acinclude.m4: menuselect: Add
	  libxml2 support (Patch 3) This is the final patch in adding
	  menuselect to Asterisk. - The first patch (r418832) added
	  menuselect along with mxml - The second patch (r418833) removed
	  mxml from menuselect This patch adds support for libxml2 to
	  menuselect, and makes libxml2 a required library for Asterisk.
	  Note that the libxml2 portion of this patch was written by Sean
	  Bright, and was made available on a team branch:
	  http://svn.digium.com/svn/menuselect/team/seanbright/libxml2/
	  Review: https://reviewboard.asterisk.org/r/3773/ ASTERISK-20703
	  #close patches: some_mysterious_team_branch uploaded by
	  seanbright (License 5060)

	* menuselect/mxml (removed): menuselect: Remove mxml from
	  menuselect (Patch 2) This is the second patch that adds
	  menuselect to Asterisk trunk. The previous commit (r418832) added
	  menuselect along with mxml; this patch removes mxml completely
	  from Menuselect. A subsequent patch will switch menuselect over
	  to using libxml2, and make libxml2 a required dependency for
	  Asterisk. ASTERISK-20703

	* menuselect/mxml/configure.in (added), menuselect/acinclude.m4
	  (added), menuselect/mxml/mxml.list.in (added),
	  menuselect/mxml/README (added), menuselect/linkedlists.h (added),
	  menuselect/mxml (added), menuselect/mxml/config.h.in (added),
	  menuselect/aclocal.m4 (added), menuselect/install-sh (added),
	  menuselect/mxml/mxml-string.c (added),
	  menuselect/menuselect_stub.c (added), menuselect/make_version
	  (added), menuselect/mxml/mxml-entity.c (added),
	  menuselect/bootstrap.sh (added), menuselect/makeopts.in (added),
	  menuselect/autoconfig.h.in (added), menuselect/config.guess
	  (added), menuselect/mxml/install-sh (added),
	  menuselect/test/build_tools/menuselect-deps (added), /,
	  menuselect/contrib/menuselect-dummy (added),
	  menuselect/config.sub (added), menuselect/mxml/configure (added),
	  menuselect/mxml/Makefile.in (added), menuselect (added),
	  menuselect/contrib (added), menuselect/mxml/mxml.pc.in (added),
	  menuselect/configure.ac (added), menuselect/mxml/mxml-set.c
	  (added), menuselect/contrib/Makefile-dummy (added),
	  menuselect/mxml/ANNOUNCEMENT (added), menuselect/missing (added),
	  menuselect/menuselect_curses.c (added),
	  menuselect/example_menuselect-tree (added), menuselect/Makefile
	  (added), menuselect/mxml/mxml-search.c (added), menuselect/test
	  (added), menuselect/test/menuselect-tree (added),
	  menuselect/mxml/mxml.h (added), menuselect/mxml/mxml-index.c
	  (added), menuselect/configure (added),
	  menuselect/menuselect_newt.c (added), menuselect/mxml/mxml-attr.c
	  (added), menuselect/mxml/mxml-private.c (added),
	  menuselect/menuselect.c (added), menuselect/mxml/CHANGES (added),
	  menuselect/mxml/COPYING (added), menuselect/mxml/mxml-file.c
	  (added), menuselect/menuselect.h (added),
	  menuselect/menuselect_gtk.c (added), menuselect/README (added),
	  menuselect/strcompat.c (added), menuselect/mxml/mxml-node.c
	  (added), menuselect/test/build_tools (added): menuselect: Add
	  menuselect to Asterisk trunk (Patch 1) This is the first patch
	  that adds menuselect to Asterisk trunk, and removes the
	  svn:externals property. This is being done for two reasons: (1)
	  The removal of external repositories eases a future migration to
	  git (2) Asterisk is now the only thing that uses menuselect; as a
	  result, there's little need to keep it in an external repository
	  Subsequent patches will remove the mxml dependency from
	  menuselect and tidy up the build system. ASTERISK-20703

2014-07-17 14:28 +0000 [r418811]  Kinsey Moore <kmoore@digium.com>

	* /, main/bridge_channel.c: TEST_FRAMEWORK: Fix threewaytransfer
	  reporting Ensure that three-way transfers can be reported even if
	  featuremap is non-NULL. ........ Merged revisions 418810 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-16 23:08 +0000 [r418788]  Corey Farrell <git@cfware.com>

	* /, channels/dahdi/bridge_native_dahdi.c: Remove include of
	  astobj.h from channels/dahdi/bridge_native_dahdi.c. The include
	  was unneeded, this is split off from r3758 as it applies to 12.
	  ........ Merged revisions 418787 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-16 14:03 +0000 [r418717-418757]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip/pjsip_configuration.c, CHANGES, res/res_pjsip.c,
	  channels/chan_pjsip.c, include/asterisk/res_pjsip.h,
	  contrib/ast-db-manage/config/versions/1d50859ed02e_create_accountcode.py
	  (added), /, configs/pjsip.conf.sample: res_pjsip: Support setting
	  a default accountcode on endpoints Most channel drivers let you
	  specify a default accountcode to be set on channels associated
	  with a particular peer/endpoint/object. Prior to this patch,
	  chan_pjsip/res_pjsip did not support such a setting. This patch
	  adds a new setting to the res_pjsip endpoint object,
	  'accountcode'. When a channel is created that is associated with
	  an endpoint with this value set, the channel will automatically
	  have its accountcode property set to the value configured for the
	  endpoint. Review: https://reviewboard.asterisk.org/r/3724/
	  ASTERISK-24000 #close Reported by: Matt Jordan ........ Merged
	  revisions 418756 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* cdr/cdr_pgsql.c, CHANGES, configs/cdr_pgsql.conf.sample,
	  configs/res_pgsql.conf.sample, cel/cel_pgsql.c,
	  res/res_config_pgsql.c, configs/cel_pgsql.conf.sample: cel_pgsql,
	  cdr_pgsql, res_config_pgsql: Add PostgreSQL application_name
	  support This patch adds support for the PostgreSQL
	  application_name connection setting. When the appropriate
	  PostgreSQL module's configuration is set with an application
	  name, the name will be passed to PostgreSQL on connection and
	  displayed in the database's pg_stat_activity view, as well as in
	  CSV logs. This aids in managing which applications/servers are
	  connected to a PostgreSQL database, as well as tracing the
	  activity of those connections. Review:
	  https://reviewboard.asterisk.org/r/3591 ASTERISK-23737 #close
	  Reported by: Gergely Domodi patches: pgsql_application_name.patch
	  uploaded by Gergely Domodi (License 6610)

	* codecs/codec_adpcm.c, main/format.c: codec_adpcm: Change
	  description of codec "ADPCM" to "Dialogic ADPCM" Technically,
	  ADPCM is a method that can be applied to several codecs.
	  Asterisk's ADPCM codec is the Dialogic ADPCM or VOX codec. See
	  http://en.wikipedia.org/wiki/Dialogic_ADPCM for more information
	  about said codec. Review: https://reviewboard.asterisk.org/r/3744
	  patches: rb3744.patch uploaded by dennis.guse (License 6513)

	* UPGRADE.txt, main/manager.c, /: manager: Return ActionID on
	  nominal responses to PresenceState action When the PresenceState
	  action is executed, the nominal path fails to include the
	  ActionID in the successful response. This patch adds a call to
	  astman_start_ack, which guarantees that an ActionID (if provided)
	  will be sent back to the AMI client. Unlike the Asterisk 11 and
	  12 patches, this patch also deprecates the duplicate Message key
	  in the response to the action, replacing it with the key
	  'PresenceMessage'. Review:
	  https://reviewboard.asterisk.org/r/3776/ ASTERISK-23985 #close
	  ........ Merged revisions 418713 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 418714 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-15 23:03 +0000 [r418716]  Kinsey Moore <kmoore@digium.com>

	* /, main/bridge_channel.c: TEST_FRAMEWORK: Fix ref leak in feature
	  activation This fixes two reference leaks that would occur when
	  TEST_FRAMEWORK was enabled and features were successfully
	  executed. ........ Merged revisions 418715 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-15 17:57 +0000 [r418654]  Jonathan Rose <jrose@digium.com>

	* funcs/func_uri.c, /: func_uri: URIENCODE/URIDECODE - allow empty
	  strings as argument Previously these two dialplan functions would
	  issue warnings and return failure when an empty string is used as
	  the argument. Now they will not issue a warning and will
	  successfully return an empty string. ASTERISK-23911 #close
	  Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3745/ ........ Merged
	  revisions 418641 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 418649 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 418650 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-15 12:11 +0000 [r418616]  Sean Bright <sean@malleable.com>

	* main/asterisk.c: Update Asterisk copyright year in
	  main/asterisk.c It's been 2014 for like... 6 months.

2014-07-14 14:55 +0000 [r418566-418587]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/logger.h, /: logger.h: Extract DEBUG_ATLEAST()
	  to complement VERBOSITY_ATLEAST(). ........ Merged revisions
	  418586 from http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/jabber.h (removed), include/asterisk/jingle.h
	  (removed), include/asterisk/frame_defs.h (removed),
	  configs/h323.conf.sample (removed): Actually delete the removed
	  files.

2014-07-13 21:57 +0000 [r418507]  Corey Farrell <git@cfware.com>

	* /, main/astobj2.c, contrib/scripts/refcounter.py: astobj2: work
	  around REF_DEBUG race which causes out of order log entries *
	  Update refcounter.py to use delta's to track the current
	  reference count. * Use result from internal_ao2_ref to write
	  old_refcount to refs_log. Review:
	  https://reviewboard.asterisk.org/r/3756/ ........ Merged
	  revisions 418504 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 418505 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 418506 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-13 20:08 +0000 [r418488]  Scott Griepentrog <sgriepentrog@digium.com>

	* include/asterisk/astobj2.h: astobj2: correct define for
	  ao2_t_cleanup This change maps the ao2_t_cleanup() function to
	  the correct debug function so that it can be used. Review:
	  https://reviewboard.asterisk.org/r/3764/

2014-07-13 16:48 +0000 [r418448-418467]  Corey Farrell <git@cfware.com>

	* main/manager.c, /, apps/app_skel.c: Fix minor reference leaks in
	  app_skel and TEST_FRAMEWORK * Cleanup games object in app_skel. *
	  Cleanup stasis subscription to TEST_FRAMEWORK in manager.c (12+).
	  Review: https://reviewboard.asterisk.org/r/3757/ ........ Merged
	  revisions 418465 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 418466 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/jabber.h, include/asterisk/jingle.h,
	  configs/h323.conf.sample: Remove files left behind on removal of
	  h323, jingle and jabber. This change removes h323.conf.sample,
	  jingle.h, jabber.h left behind by r3698. Review:
	  https://reviewboard.asterisk.org/r/3755/

2014-07-11 23:00 +0000 [r418419]  Matthew Jordan <mjordan@digium.com>

	* main/astobj2.c, include/asterisk/astobj2.h: astobj2: Add tag
	  variants for ao2_bump, ao2_cleanup, and ao2_replace Tags are
	  useful in hunting down ref imbalances; this patch adds tag
	  variants for these commonly used macros/functions. Review:
	  https://reviewboard.asterisk.org/r/3750/

2014-07-11 21:10 +0000 [r418397]  Corey Farrell <git@cfware.com>

	* /, include/asterisk/astobj2.h: astobj2: tweak ao2_replace to do
	  nothing when it would be a NoOp This change causes ao2_replace to
	  do nothing when src == dst. This avoids REF_DEBUG logging when
	  we're not actually doing anything. Review:
	  https://reviewboard.asterisk.org/r/3743/ ........ Merged
	  revisions 418396 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-11 16:42 +0000 [r418370]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, main/config.c: config: inform config hook of change when
	  writing file When updated configuration is written back to the
	  conf file - for example when a user changes their voicemail pin,
	  make sure that any config hook that wants to know of changes is
	  informed. Review: https://reviewboard.asterisk.org/r/3708/
	  ........ Merged revisions 418366 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 418369 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-10 15:36 +0000 [r418325]  Matthew Jordan <mjordan@digium.com>

	* /, include/asterisk/xmpp.h: include/asterisk/xmpp.h: Convert
	  indentation to tabs This is a whitespace only change. ........
	  Merged revisions 418323 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 418324 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-10 01:59 +0000 [r418226-418264]  Richard Mudgett <rmudgett@digium.com>

	* channels/sig_pri.c, /: chan_dahdi/sig_pri: Fix type mismatch in
	  the idledial feature's channel creation. Square pegs in round
	  holes don't work very well. ........ Merged revisions 418261 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 418262 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 418263 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/stasis/stasis_bridge.h (added), main/bridge_channel.c,
	  res/res_stasis.c, /, res/stasis/stasis_bridge.c (added),
	  include/asterisk/bridge_channel.h, main/bridge_basic.c: ARI: Make
	  mixing bridges propagate linkedids and accountcodes. * Create a
	  Stasis bridge sub-class to propagate linkedids and accountcodes.
	  * Fixed the basic bridge sub-class to update peeraccount codes
	  when the number of channels in the bridge drops back down to two
	  parties. * Refactored ast_bridge_channel_update_accountcodes() to
	  handle channels joining/leaving the bridge. * Fixed the basic
	  bridge sub-class to not call the base bridge class pull method
	  twice. AFS-105 #close ASTERISK-23852 #close Reported by: Richard
	  Mudgett Review: https://reviewboard.asterisk.org/r/3720/ ........
	  Merged revisions 418225 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-08 14:48 +0000 [r418174-418183]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/endpoints.json,
	  rest-api/api-docs/mailboxes.json, rest-api/api-docs/events.json,
	  /, rest-api/api-docs/asterisk.json,
	  rest-api/api-docs/applications.json,
	  rest-api/api-docs/playbacks.json,
	  rest-api/api-docs/channels.json, rest-api/api-docs/sounds.json,
	  rest-api/resources.json, include/asterisk/manager.h,
	  rest-api/api-docs/bridges.json,
	  rest-api/api-docs/recordings.json: manager/ARI: Update version to
	  2.4.0/1.4.0; Update UPGRADE.txt ........ Merged revisions 418182
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Fix undefined
	  function when PJPROJECT is not installed The
	  dtls_perform_handshake function was mistakenly placed under the
	  guards for USE_PJPROJECT. If PJPROJECT was not installed, the
	  function would not be defined, while other functions would
	  attempt to still use it. This prevented res_rtp_asterisk from
	  being loaded. ASTERISK-24001 #close Reported by: Don Fanning
	  ........ Merged revisions 418172 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-07 16:08 +0000 [r418117]  Joshua Colp <jcolp@digium.com>

	* include/asterisk/res_pjsip_body_generator_types.h,
	  res/res_pjsip_dialog_info_body_generator.c (added),
	  res/res_pjsip_exten_state.c, res/res_pjsip/presence_xml.c, /,
	  include/asterisk/res_pjsip_presence_xml.h:
	  res_pjsip_dialog_info_body_generator: Add dialog-info+xml support
	  for presence. This module implements dialog-info+xml for the
	  purposes of presence. This means that phones such as Grandstreams
	  can now subscribe to receive presence information for an
	  extension. ASTERISK-21443 #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3705/ ........ Merged
	  revisions 418116 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-07 02:15 +0000 [r418090]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/stasis_app.h, res/ari/resource_channels.c,
	  res/res_stasis.c, /, res/stasis/app.c: ARI/res_stasis: Subscribe
	  to both Local channel halves when originating to app This patch
	  fixes two bugs: 1. When originating a channel into a Stasis
	  application, we already create a subscription for the channel
	  that is going into our Stasis app. Unfortunately, when you create
	  a Local channel and pass it off to a Stasis app, you really
	  aren't creating just one channel: you're creating two. This patch
	  snags the second half of the Local channel pair (assuming it is a
	  Local channel pair, but luckily core_local is kind about such
	  assumptions) and subscribes to it as well. 2. Subscriptions are a
	  bit sticky right now. If a subscription is made, the 'interest'
	  count gets bumped on the Stasis subscription - but unless
	  something explicitly unsubscribes the channel, said subscription
	  sticks around. This is not much of a problem is a user is
	  creating the subscription - if they made it, they must want it.
	  However, when we are creating implicit subscriptions, we need to
	  make sure something clears them out. This patch takes a
	  pessimistic approach: it watches the cache updates coming from
	  Stasis and, if we notice that the cache just cleared out an
	  object, we delete our subscription object. This keeps our ao2
	  container of Stasis forwards in an application from growing out
	  of hand; it also is a bit more forgiving for end users who may
	  not realize they were supposed to unsubscribe from that channel
	  that just hung up. Review:
	  https://reviewboard.asterisk.org/r/3710/ #ASTERISK-23939 #close
	  ........ Merged revisions 418089 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-07 01:22 +0000 [r418067-418084]  Kinsey Moore <kmoore@digium.com>

	* tests/test_cel.c, main/cel.c, channels/chan_pjsip.c,
	  res/res_pjsip_session.c, /: CEL: Fix incorrect/missing extra
	  field information This corrects two issues with the extra field
	  information in Asterisk 12+ in channel event logs. It is possible
	  to inject custom values into the dialstatus provided by
	  ast_channel_dial_type() Stasis messages that fall outside the
	  enumeration allowed for the DIALSTATUS channel variable. CEL now
	  filters for the allowed values and ignores other values. The
	  "hangupsource" extra field key is always blank if the far end
	  channel is a chan_pjsip channel. This is because the hangupsource
	  is never set for the pjsip channel driver. This change sets the
	  hangupsource whenever a hangup is queued for chan_pjsip channels.
	  This corrects an issue with the pjsip channel driver where the
	  hangupcause information was not being set properly. Review:
	  https://reviewboard.asterisk.org/r/3690/ ........ Merged
	  revisions 418071 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/http.c: HTTP: Fix build for gcc 4.10 ........ Merged
	  revisions 418066 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-04 15:26 +0000 [r418019-418050]  Matthew Jordan <mjordan@digium.com>

	* main/Makefile: main/Makefile: fix compilation error of buildinfo
	  occurring on 'make install' Egads. Another bad deletion of too
	  much when attempting to remove h323 stuff.

	* configure.ac, build_tools/menuselect-deps.in, configure,
	  main/Makefile: configure: Remove last vestiges of h323; DO create
	  menuselect-deps The previous patch (r418034) fixed the 'glitch'
	  that the channels/h323 Makefile no longer existed. Unfortunately,
	  removing the entire line was a bit of a blunder, as it meant that
	  build_tools/menuselect-deps was never generated. Hilarity ensued
	  when actually trying to compile. But hey! At least configure
	  worked. This patch fixes *that* glitch, and removes some more of
	  the vestiges of h323. (It had tendrils in the main Makefile?
	  Crazy.)

	* configure.ac, configure: configure: Update script to pass if
	  channels/h323/Makefile.in does not exist This simply removes that
	  check from the configure script, as r418019 removed chan_h323.

	* apps/app_dahdibarge.c (removed), configs/gtalk.conf.sample
	  (removed), main/pbx.c, apps/app_readfile.c (removed),
	  channels/chan_sip.c, configs/jingle.conf.sample (removed),
	  UPGRADE.txt, res/res_musiconhold.c, channels/chan_gtalk.c
	  (removed), channels/Makefile, CHANGES, res/res_jabber.c
	  (removed), channels/h323 (removed), utils/conf2ael.c,
	  channels/chan_jingle.c (removed), res/ael/pval.c,
	  configs/jabber.conf.sample (removed),
	  configs/asterisk.conf.sample, res/res_agi.c, channels/chan_h323.c
	  (removed), addons/Makefile, pbx/pbx_realtime.c, utils/ael_main.c,
	  include/asterisk/options.h, main/asterisk.c,
	  addons/app_saycountpl.c (removed): Remove many deprecated modules
	  Billing records are fair, To get paid is quite bright, You should
	  really use ODBC; Good-bye cdr_sqlite. Microsoft did once push
	  H.323, Hell, we all remember NetMeeting. But try to compile
	  chan_h323 now And you will take quite a beating. The XMPP and SIP
	  war was fierce, And in the distant fray Was birthed
	  res_jabber/chan_jingle; But neither to stay. For everyone did
	  care and chase what Google professed. "Free Internet Calling" was
	  what devotees cried, But Google did change the specs so often
	  That the developers were happy the day chan_gtalk died. And then
	  there was that odd application Dedicated to the Polish tongue.
	  app_saycountpl was subsumed by Say; One could say its bell was
	  rung. To read and parse a file from the dialplan You could (I
	  guess) use an application. app_readfile did fill that purpose,
	  but I think A function is perhaps better in its creation. Barging
	  is rude, I'm not sure why we do it. Inwardly, the caller will
	  probably sigh. But if you really must do it, Don't use
	  app_dahdibarge, use ChanSpy. We all despise the sound of tinny
	  robots It makes our queues so cold. To control such an
	  abomination It's better to not use Wait/SetMusicOnHold. It's
	  often nice to know properties of a channel It makes our calls
	  right We have a nice function called CHANNEL And so SIPCHANINFO
	  is sent off into the night. And now things get odd; Apparently
	  one could delimit with a colon Properties from the SIPPEER
	  function! Commas are in; all others are done. Finally, a word on
	  pipes and commas. We're sorry. We can't say it enough. But those
	  compatibility options in asterisk.conf; To maintain them forever
	  was just too tough. This patch removes: * cdr_sqlite * chan_gtalk
	  * chan_jingle * chan_h323 * res_jabber * app_saycountpl *
	  app_readfile * app_dahdibarge It removes the following
	  applications/functions: * WaitMusicOnHold * SetMusicOnHold *
	  SIPCHANINFO It removes the colon delimiter from the SIPPEER
	  function. Finally, it also removes all compatibility options that
	  were configurable from asterisk.conf, as these all applied to
	  compatibility with Asterisk 1.4 systems. Review:
	  https://reviewboard.asterisk.org/r/3698/

2014-07-03 22:22 +0000 [r417933-417976]  Richard Mudgett <rmudgett@digium.com>

	* channels/sig_pri.h, channels/chan_dahdi.c,
	  configs/chan_dahdi.conf.sample, /, UPGRADE.txt,
	  channels/sig_pri.c: chan_dahdi: Add inband_on_setup_ack
	  compatibility option. The new inband_on_setup_ack option causes
	  Asterisk to assume inband audio may be present when a
	  SETUP_ACKNOWLEDGE message is received. Q.931 Section 5.1.3 says
	  that in scenarios with overlap dialing, when a dialtone is sent
	  from the network side, progress indicator 8 "Inband info now
	  available" MAY be sent to the CPE if no digits were received with
	  the SETUP. It is thus implied that the ie is mandatory if digits
	  came with the SETUP and dialtone is needed. This option should be
	  enabled, when the network sends dialtone and you want to hear it,
	  but the network doesn't send the progress indicator when needed.
	  NOTE: For Q.SIG setups this option should be enabled when
	  outgoing overlap dialing is also enabled because Q.SIG does not
	  send the progress indicator with the SETUP ACK. The commit
	  -r413714 (AST-1338) which causes this issue was dealing with a
	  SIP-to-ISDN interoperability issue. This commit is a merge of the
	  two patches indicated below. ASTERISK-23897 #close Reported by:
	  Pavel Troller Patches: pri-4.diff (license #6302) patch uploaded
	  by Pavel Troller jira_asterisk_23897_v11.patch (license #5621)
	  patch uploaded by rmudgett Review:
	  https://reviewboard.asterisk.org/r/3633/ ........ Merged
	  revisions 417956 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 417957 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417958 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/ari/resource_channels.c, res/res_ari.c, main/manager.c, /:
	  res_ari: Fix some off-nominal paths just dropping the HTTP
	  connection. * Removed some incorrect newlines on ast_http_error()
	  messages in manager.c. * Removed an incorrect newline in
	  res_ari_channels.c. Addendum to ASTERISK-23552 ........ Merged
	  revisions 417932 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-03 17:34 +0000 [r417910-417916]  Jonathan Rose <jrose@digium.com>

	* CHANGES, channels/chan_dahdi.c: chan_dahdi: Add AMI commands for
	  controlling PRI debugging output Adds the following AMI commands:
	  PRIDebugSet - Set PRI debug levels for a specific span
	  PRIDebugFileSet - Set the file used for PRI debug message output
	  PRIDebugFileUnset - Disables file output for PRI debug messages
	  Review: https://reviewboard.asterisk.org/r/3681/

	* CHANGES, pbx/pbx_config.c, main/pbx.c: pbx_config: Add manager
	  actions to add/remove extensions Adds two new manager commands to
	  pbx_config - DialplanExtensionAdd and DialplanExtensionRemove
	  which allow manager users to create and delete extensions
	  respectively. Review: https://reviewboard.asterisk.org/r/3650/

2014-07-03 17:16 +0000 [r417901]  Richard Mudgett <rmudgett@digium.com>

	* res/res_phoneprov.c, main/http.c, UPGRADE.txt,
	  include/asterisk/tcptls.h, res/res_http_post.c,
	  res/res_http_websocket.c, configs/http.conf.sample,
	  include/asterisk/http.h, main/tcptls.c, res/res_ari.c,
	  main/manager.c, /: HTTP: Add persistent connection support.
	  Persistent HTTP connection support is needed due to the increased
	  usage of the Asterisk core HTTP transport and the frequency at
	  which REST API calls are going to be issued. * Add http.conf
	  session_keep_alive option to enable persistent connections. *
	  Parse and discard optional chunked body extension information and
	  trailing request headers. * Increased the maximum
	  application/json and application/x-www-form-urlencoded body size
	  allowed to 4k. The previous 1k was kind of small. * Removed a
	  couple inlined versions of ast_http_manid_from_vars() by calling
	  the function. manager.c:generic_http_callback() and
	  res_http_post.c:http_post_callback() * Add missing va_end() in
	  ast_ari_response_error(). * Eliminated unnecessary RAII_VAR() use
	  in http.c:auth_create(). ASTERISK-23552 #close Reported by: Scott
	  Griepentrog Review: https://reviewboard.asterisk.org/r/3691/
	  ........ Merged revisions 417880 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-03 16:55 +0000 [r417900]  Matthew Jordan <mjordan@digium.com>

	* main/tcptls.c, configure, include/asterisk/autoconfig.h.in,
	  configure.ac: main/tcptls: Add checks for OpenSSL Elliptic Curve
	  support The patch for ASTERISK-23905 that added PFS support in
	  Asterisk depends on the elliptic curve library support being
	  present in OpenSSL. As it turns out, some versions of OpenSSL
	  don't have this library - notably the version running on our
	  build agents. This patch fixes the build by providing a configure
	  check for the specific library calls that the PFS patch relies
	  on. Review: https://reviewboard.asterisk.org/r/3709/

2014-07-03 16:14 +0000 [r417877-417879]  sgalarneau <sgalarneau@localhost>:

	* res/ari/resource_events.h, rest-api/api-docs/channels.json,
	  res/ari/resource_channels.h, rest-api/api-docs/events.json, /:
	  ARI: Improvements to body parameters documentation The variables
	  body parameter under the originate and originate with id
	  operations of the channel resource showed invalid JSON in its
	  description. The variables body parameter under the userEvent
	  operation of the event resource made no mention that the custom
	  key/value pairs should be wrapped in a variables key in order to
	  be added to the custom user event. ASTERISK-23975 #close Review:
	  https://reviewboard.asterisk.org/r/3692/ ........ Merged
	  revisions 417878 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* rest-api-templates/api.wiki.mustache,
	  rest-api-templates/swagger_model.py, /: api.wiki.mustache: Update
	  wiki template to support body parameters This patch updates the
	  api.wiki.mustache template and the swagger_model python script to
	  understand if an operation has a body parameter. If an operation
	  does have a body parameter, it will now be displayed in the
	  corresponding wiki entry. ........ Merged revisions 407389 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-03 14:08 +0000 [r417863]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* Makefile, contrib/scripts/dahdi_span_config_hook (added):
	  dahdi_span_config_hook: automatically register new dahdi channels
	  Install a hook script for DAHDI to register new spans with
	  Asterisk automatically by running: asterisk -rx 'dahdi create
	  channel FIRST LAST' Review:
	  https://reviewboard.asterisk.org/r/3157/

2014-07-03 12:10 +0000 [r417800-417803]  Matthew Jordan <mjordan@digium.com>

	* main/tcptls.c, CHANGES: main/tcptls: Add support for Perfect
	  Forward Secrecy This patch enables Perfect Forward Secrecy (PFS)
	  in Asterisk's core TLS API. Modules that wish to enable PFS
	  should consider the following: - Ephemeral ECDH (ECDHE) is
	  enabled by default. To disable it, do not specify a ECDHE cipher
	  suite in a module's configuration, for example:
	  tlscipher=AES128-SHA:DES-CBC3-SHA - Ephemeral DH (DHE) is
	  disabled by default. To enable it, add DH parameters into the
	  private key file, i.e., tlsprivatekey. For an example, see the
	  default dh2048.pem at
	  http://www.opensource.apple.com/source/OpenSSL098/OpenSSL098-35.1/src/apps/dh2048.pem?txt
	  - Because clients expect the server to prefer PFS, and because
	  OpenSSL sorts its cipher suites by bit strength, (see "openssl
	  ciphers -v DEFAULT") consider re-ordering your cipher suites in
	  the conf file. For example:
	  tlscipher=AES128+kEECDH:AES128+kEDH:3DES+kEDH:AES128-SHA:DES-CBC3-SHA:-ADH:-AECDH
	  will use PFS when offered by the client. Clients which do not
	  offer PFS fall-back to AES-128 (or even 3DES as recommend by RFC
	  3261). Review: https://reviewboard.asterisk.org/r/3647/
	  ASTERISK-23905 #close Reported by: Alexander Traud patches:
	  tlsPFS_for_HEAD.patch uploaded by Alexander Traud (License 6520)
	  tlsPFS.patch uploaded by Alexander Traud (License 6520)

	* /, main/utils.c: main/untils: Prevent potential infinite loop in
	  ast_careful_fwrite A loop in ast_careful_fwrite exists that will
	  continually attempt to write to a file stream, even in the
	  presence of EAGAIN/EINTR errors. However, if a connection that
	  uses ast_careful_fwrite closes suddenly, ast_careful_fwrite's
	  call to fflush may return EAGAIN/EINTER along with EOF. A
	  subsequent call to fflush will return EOF but not clear errno,
	  resulting in an infinite loop. This patch clears errno after it
	  is detected and handled the loop, such that any subsequent call
	  to fflush will not get erroneously stuck. Review:
	  https://reviewboard.asterisk.org/r/3704 #ASTERISK-23984 #close
	  Reported by: Steve Davies patches: fflush_loop_fix uploaded by
	  one47 (License 5012) ........ Merged revisions 417797 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 417798 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417799 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-02 21:13 +0000 [r417770]  Jonathan Rose <jrose@digium.com>

	* res/ari/resource_events.h, res/ari/resource_asterisk.h,
	  res/ari/resource_applications.h, res/ari/resource_playbacks.h,
	  res/ari/resource_channels.h, res/ari/resource_sounds.h, /,
	  res/ari/resource_bridges.h, res/ari/resource_recordings.h,
	  rest-api-templates/ari_resource.h.mustache,
	  res/ari/resource_device_states.h, res/ari/resource_endpoints.h,
	  res/ari/resource_mailboxes.h: ARI: Remove unnecessary \briefs
	  from automatically generated documentation Review:
	  https://reviewboard.asterisk.org/r/3440/ ........ Merged
	  revisions 412653 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-07-01 14:42 +0000 [r417679-417706]  Joshua Colp <jcolp@digium.com>

	* /, res/res_rtp_asterisk.c: res_rtp_asterisk: Don't leak memory or
	  reset state if DTLS configuration is set multiple times. ........
	  Merged revisions 417705 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_rtp_asterisk.c,
	  contrib/ast-db-manage/config/versions/51f8cb66540e_add_further_dtls_options.py
	  (added), include/asterisk/res_pjsip_session.h, main/rtp_engine.c,
	  /, channels/chan_sip.c, main/sdp_srtp.c, res/res_pjsip_sdp_rtp.c,
	  res/res_pjsip/pjsip_configuration.c, configs/sip.conf.sample,
	  include/asterisk/rtp_engine.h, res/res_pjsip.c,
	  channels/sip/include/sip.h, include/asterisk/res_pjsip.h,
	  include/asterisk/sdp_srtp.h: Recorded merge of revisions 417677
	  from http://svn.asterisk.org/svn/asterisk/branches/11 ........
	  res_rtp_asterisk: Add SHA-256 support for DTLS and perform DTLS
	  negotiation on RTCP. This change fixes up DTLS support in
	  res_rtp_asterisk so it can accept and provide a SHA-256
	  fingerprint, so it occurs on RTCP, and so it occurs after ICE
	  negotiation completes. Configuration options to chan_sip and
	  chan_pjsip have also been added to allow behavior to be tweaked
	  (such as forcing the AVP type media transports in SDP).
	  ASTERISK-22961 #close Reported by: Jay Jideliov Review:
	  https://reviewboard.asterisk.org/r/3679/ Review:
	  https://reviewboard.asterisk.org/r/3686/ ........ Merged
	  revisions 417678 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-30 18:39 +0000 [r417663]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pubsub.c: Reverse logic during subscription
	  persistence recreation. In the abstraction effort, this bit of
	  logic got messed up. We want to recreate the persistence if
	  things go well, not if things fail.

2014-06-30 13:02 +0000 [r417590-417649]  Matthew Jordan <mjordan@digium.com>

	* apps/app_voicemail.c: apps/app_voicemail: Fix compilation error
	  introduced in r417591 Not sure why that change to
	  ast_channel_alloc was made but ... okay.

	* apps/app_voicemail.c, main/say.c, CHANGES: app_voicemail, say:
	  Add support for Japanese Language This patch adds support for the
	  Japanese language to both the say family of applications, as well
	  as for VoiceMail and VoiceMailMain. A new pack of language sounds
	  will be released at the same time as the next major version of
	  Asterisk to support the new language features. The language
	  features can be enabled using a language code of 'ja'. Review:
	  https://reviewboard.asterisk.org/r/3477 ASTERISK-23324 #close
	  Reported by: Kevin McCoy patches:
	  app_voicemail.c.20140226.jb.patch uploaded by Kevin McCoy
	  (License 6586) say.c.20140226.jb.patch uploaded by Kevin McCoy
	  (License 6586)

	* /, channels/chan_sip.c: chan_sip: be more tolerant of whitespace
	  between attributes in SDP fmtp line This patch is essentially a
	  backport of a small portion of r397526 from ASTERISK-21981. In
	  that patch, pass through support and format attribute negotiation
	  was added for Opus. Part of that included being more tolerant to
	  whitespace in the fmtp line of an SDP; that part of the patch is
	  being applied here. As the author of the backport pointed out, in
	  SDP, the fmtp line is allowed to include whitespace between
	  attributes. RFC 3267 chapter 8.3 (from 2001) includes an example
	  for this. This was not removed in the updated RFC 4867 in 2007.
	  Review: https://reviewboard.asterisk.org/r/3658 #ASTERISK-23916
	  #close Reported by: Alexander Traud patches:
	  sdpFMTPspace_Asterisk11.patch uploaded by Alexander Traud
	  (License 6520) ........ Merged revisions 417587 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 417588 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417589 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-27 23:21 +0000 [r417571]  Richard Mudgett <rmudgett@digium.com>

	* /, main/event.c: event.c: Fix type mismatch errors in ie_maps[].
	  In v12+ the type values from the table are only used by the CEL
	  unit tests. Since the unit tests were only comparing a generated
	  expected event with a real event to see if the ie contents
	  matched and using the same table IE_PLTYPE values to read the
	  event contents, the type mismatches were not detected. ........
	  Merged revisions 417565 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-27 19:27 +0000 [r417485-417511]  Corey Farrell <git@cfware.com>

	* /, main/astobj2.c: Ensure REF_DEBUG records entrys for attempts
	  to ao2_ref an invalid object This change ensures that
	  __ao2_ref_debug writes to ref_log when given a non-NULL pointer
	  to an invalid ao2 object. This is to ensure that we record any
	  attempt manipulate references of already freed objects.
	  ASTERISK-23948 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3677/ ........ Merged
	  revisions 417500 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 417505 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417509 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, contrib/scripts/refcounter.py: refcounter.py: prevent use of
	  excessive RAM with large refs logs When processing a 212MB refs
	  file, refcounter.py used over 3GB of RAM. This change greatly
	  reduces memory usage in two ways: * Saving object history in
	  whole lines instead of separated values. * Not saving
	  normal/skewed/leaked object lists unless they are requested.
	  ASTERISK-23921 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3668/ ........ Merged
	  revisions 417480 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 417481 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417483 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-27 13:50 +0000 [r417461]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip/pjsip_configuration.c, res/res_pjsip_pubsub.c,
	  res/res_pjsip_registrar.c, include/asterisk/res_pjsip.h, /,
	  res/res_pjsip_outbound_registration.c: res_pjsip: Add ActionID to
	  events created as a result of PJSIP AMI actions A number of
	  various PJSIP AMI actions were failing to parse out and place the
	  ActionID into their responses. This patch updates the various
	  PJSIP actions such that the passed in ActionID is emitted on any
	  event list complete events, as well as any intermediate events
	  created as a result of the action. #ASTERISK-23947 #close
	  Reported by: Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/3675/ ........ Merged
	  revisions 417460 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-27 02:04 +0000 [r417423-417447]  Kinsey Moore <kmoore@digium.com>

	* tests/test_cel.c: CEL: Update unit tests for bridge tech field
	  Update the CEL unit tests that handle BRIDGE_ENTER and
	  BRIDGE_EXIT events to expect the "bridge_technology" extra field
	  key.

	* CHANGES: CHANGES: Add missing changes Add missing CHANGES changes
	  from r417361 and r417383.

2014-06-26 18:27 +0000 [r417400-417421]  Matthew Jordan <mjordan@digium.com>

	* res/res_http_websocket.exports.in, /: res_http_websocket: Export
	  symbol for ast_websocket_set_timeout Thanks to Sean Bright for
	  pointing out that this was missed in #asterisk-dev. ........
	  Merged revisions 417419 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417420 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_pjsip.c, /: chan_pjsip: Add a test event for fast
	  picture updates This will drive the test on review r3419. Note
	  that the patch for this was done by Ben Ford, although it was
	  slightly modified for this commit. ASTERISK-23562 Reported by:
	  Matt Jordan ........ Merged revisions 417399 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-26 14:48 +0000 [r417361-417383]  Kinsey Moore <kmoore@digium.com>

	* main/cel.c: CEL: Add bridge tech to relevant CEL records Add the
	  "bridge_technology" extra field key to BRIDGE_ENTER and
	  BRIDGE_EXIT CEL events to convey the bridge technology in use at
	  the time the record was generated.

	* main/bridge.c, include/asterisk/channel.h,
	  include/asterisk/bridge_features.h,
	  tests/test_channel_feature_hooks.c (added),
	  main/bridge_channel.c, main/channel.c: Bridging: Allow channels
	  to define bridging hooks This patch allows the current owner of a
	  channel to define various feature hooks to be made available once
	  the channel has entered a bridge. This includes any hooks that
	  are setup on the ast_bridge_features struct such as DTMF hooks,
	  bridge event hooks (join, leave, etc.), and interval hooks.
	  Review: https://reviewboard.asterisk.org/r/3649/

2014-06-26 12:43 +0000 [r417317-417360]  Matthew Jordan <mjordan@digium.com>

	* CHANGES, apps/app_jack.c: app_jack: Support audio with a sampling
	  rate higher than 8kHz This patch enables the jack-audiohook to
	  cope with dynamic sampling rates from and to Asterisk.
	  Information from the channel is taken to derive the channel's
	  sampling rate, suiting SLINxx format and frame->datalen. There
	  are stil a few limitations after this patch: * Required
	  information is taken from the channel during initialization as
	  the audiohook does not provide this information.
	  Audiohook.internal_sampl_rate(...) is set later, but no callback
	  is available to inform app_jack. * Frame.datalen is computed
	  using "rate / 50" assuming a ptime of 20ms. There is no internal
	  API available to determine datalen for a SLINxx. * Ringbuffer
	  size is now dynamic depending on the value of frame.datalen (see
	  above) and the number of frames, which are in
	  RINGBUFFER_FRAME_CAPACITY, that need to fit. Review:
	  https://reviewboard.asterisk.org/r/3618 Note that the patch being
	  committed here is based on the patch posted on ASTERISK-23836.
	  However, Matthis Schmieder also provided a patch to enable this
	  functionality, and that patch is noted below. ASTERISK-20696
	  #close Reported by: Matthis Schmieder patches: app_jack.patch
	  uploaded by Matthis Schmieder (License 6445) ASTERISK-23836
	  #close Reported by: Dennis Guse patches: patch-app_jack.c
	  uploaded by Dennis Guse (License 6513)

	* main/udptl.c, /: udptl: Correct FEC to not consider negative
	  sequence numbers as missing When using FEC, with span=3 and
	  entries=4 Asterisk will attempt to repair the packet with
	  sequence number 5, as it will see that packet -4 is missing. The
	  result is Asterisk sending garbage packets that can kill a fax.
	  This patch adds a check to see if the sequence number is valid
	  before checking if the packet is missing. Review:
	  https://reviewboard.asterisk.org/r/3657/ #ASTERISK-23908 #close
	  Reported by: Torrey Searle patches: udptl_fec.patch uploaded by
	  Torrey Searle (License 5334) ........ Merged revisions 417318
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 417320 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417324 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/ari/internal.h, configs/ari.conf.sample,
	  res/res_http_websocket.c, res/res_pjsip.c,
	  configs/pjsip.conf.sample, include/asterisk/http_websocket.h,
	  configs/sip.conf.sample, res/res_pjsip/config_transport.c,
	  res/ari/ari_websockets.c, res/res_pjsip_transport_websocket.c,
	  res/ari/config.c, channels/sip/include/sip.h,
	  include/asterisk/res_pjsip.h, res/res_ari.c, /,
	  channels/chan_sip.c, UPGRADE.txt: res_http_websocket: Close
	  websocket correctly and use careful fwrite When a client takes a
	  long time to process information received from Asterisk, a write
	  operation using fwrite may fail to write all information. This
	  causes the underlying file stream to be in an unknown state, such
	  that the socket must be disconnected. Unfortunately, there are
	  two problems with this in Asterisk's existing websocket code: 1.
	  Periodically, during the read loop, Asterisk must write to the
	  connected websocket to respond to pings. As such, Asterisk
	  maintains a reference to the session during the loop. When
	  ast_http_websocket_write fails, it may cause the session to
	  decrement its ref count, but this in and of itself does not break
	  the read loop. The read loop's write, on the other hand, does not
	  break the loop if it fails. This causes the socket to get in a
	  'stuck' state, preventing the client from reconnecting to the
	  server. 2. More importantly, however, is that the fwrite in
	  ast_http_websocket_write fails with a large volume of data when
	  the client takes awhile to process the information. When it does
	  fail, it fails writing only a portion of the bytes. With some
	  debugging, it was shown that this was failing in a similar
	  fashion to ASTERISK-12767. Switching this over to
	  ast_careful_fwrite with a long enough timeout solved the problem.
	  Note that this version of the patch, unlike r417310 in Asterisk
	  11, exposes configuration options beyond just chan_sip's
	  sip.conf. Configuration options to configure the write timeout
	  have also been added to pjsip.conf and ari.conf. #ASTERISK-23917
	  #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3624/ ........ Merged
	  revisions 417310 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417311 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-26 10:06 +0000 [r417251]  Corey Farrell <git@cfware.com>

	* /, channels/chan_sip.c: chan_sip: Fix handling of "From" headers
	  longer than 256 characters From headers were processed using a
	  256 character buffer on the stack. This change replaces that with
	  a heap allocation by ast_strdup. ASTERISK-23790 #close Reported
	  by: uniken1 Tested by: uniken1 Review:
	  https://reviewboard.asterisk.org/r/3669/ Patches:
	  chan_sip-large-from-header-1.8-r3.patch uploaded by wdoekes
	  (license 5674) ........ Merged revisions 417248 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 417249 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 417250 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-25 20:57 +0000 [r417233]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pubsub.c, res/res_pjsip_exten_state.c,
	  include/asterisk/res_pjsip_pubsub.h,
	  res/res_pjsip_pidf_body_generator.c,
	  res/res_pjsip_pubsub.exports.in, res/res_pjsip_mwi.c,
	  res/res_pjsip_xpidf_body_generator.c: Abstract PJSIP-specific
	  elements from the pubsub API. This helps to pave the way for RLS
	  work that is to come. Since this is a self-contained change and
	  subscription tests still pass, this work is being committed
	  directly to trunk instead of a working branch. ASTERISK-23865
	  #close Review: https://reviewboard.asterisk.org/r/3628

2014-06-25 18:57 +0000 [r417213]  Corey Farrell <git@cfware.com>

	* main/astobj2_container.c, /: ao2_container node object ignores
	  REF_DEBUG in all places except one Almost every reference
	  operation against container node's uses __ao2_alloc or __ao2_ref,
	  thereby preventing ref logging for the nodes. One node reference
	  is released with ao2_t_ref, causing refcounter.py to falsely
	  report skews and leaks for many nodes. ASTERISK-23922 #close
	  Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3670/ ........ Merged
	  revisions 417212 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-25 00:45 +0000 [r417193]  Damien Wedhorn <voip@facts.com.au>

	* channels/chan_skinny.c: Skinny: cleanup some log messages around
	  sessions.

2014-06-24 02:50 +0000 [r417167]  Corey Farrell <git@cfware.com>

	* include/asterisk/netsock.h, main/utils.c, main/netsock.c,
	  include/asterisk/res_pjsip_session.h: Move eid functions to
	  utils.c, mark netsock.h deprecated Move eid functions from
	  netsock.c to utils.c. These functions were already published by
	  utils.h. Flag netsock.h as deprecated and switch
	  res_pjsip_session.h to use netsock2.h. The only code that still
	  uses netsock.h is chan_iax2. ASTERISK-23920 #close Reported by:
	  Corey Farrell Review: https://reviewboard.asterisk.org/r/3661/

2014-06-23 18:50 +0000 [r417143]  Joshua Colp <jcolp@digium.com>

	* /, res/res_rtp_asterisk.c: res_rtp_asterisk: Return the length of
	  data written when sending via ICE instead of 0. ASTERISK-23834
	  #close Reported by: Richard Kenner ........ Merged revisions
	  417141 from http://svn.asterisk.org/svn/asterisk/branches/11
	  ........ Merged revisions 417142 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-23 16:04 +0000 [r417120]  Richard Mudgett <rmudgett@digium.com>

	* /, main/core_unreal.c: core_unreal: Fix off by one buffer
	  overwrite error. Appending the ;2 to the user supplied ;1
	  uniqueid to create the ;2 version if the user did not also supply
	  an extra uniqueid for the ;2 channel resulted in allocating a
	  buffer that was one byte too small. * Fix off by one error in
	  ast_unreal_new_channels() when generating the ;2 uniqueid from
	  the user suppled ;1 version. * Pulled some long assignment lines
	  from if tests to improve line break readability in
	  ast_unreal_new_channels(). ........ Merged revisions 417119 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-23 07:44 +0000 [r417059]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* channels/sig_pri.c, channels/sig_pri.h, channels/chan_dahdi.c:
	  suspended destructions of pri spans on events If a DAHDI span
	  disappears, we wish for its representation in Asterisk to be
	  destroyed as well. The information about the span's removal may
	  come from several paths: 1. DAHDI sends DAHDI_EVENT_REMOVE on
	  every channel. 2. An extra DAHDI_EVENT_REMOVED is sent on every
	  subsequent call to DAHDI_GET_EVENT. 3. Every read (including the
	  internal one by libpri on the D-channel) returns -ENODEV.
	  Asterisk responsds to DAHDI_EVENT_REMOVE on a channel by
	  destroying it. Destroying a channel requires holding the channel
	  list lock (iflock). Destroying a channel that is part of a span
	  requires holding the span's lock. Destroying a channel from a
	  context that holds the span lock, while at the same time another
	  channel is destroyed directly, leads to a deadlock. Solution:
	  don't destroy span while holding the channels list lock. Thus
	  changes in this patch: * Deferring removal of PRI spans in
	  response to events: doomed spans are collected on a list. *
	  Doomed spans are removed periodically by the monitor thread. *
	  ENODEV reads from the D-channel will warant the same deferred
	  removal. Review: https://reviewboard.asterisk.org/r/3548/

2014-06-22 18:53 +0000 [r416996]  George Joseph <george.joseph@fairview5.com>

	* include/asterisk/astobj2.h, Makefile.rules, Makefile, /: astobj2:
	  Add an ao2_replace macro to astobj2.h This macro replaces one
	  object reference with another cleaning up the original. param dst
	  Pointer to the object that will be cleaned up. param src Pointer
	  to the object replacing it. src's ref count is bumped if it's
	  non-NULL. dst's ref count is decremented if it's non-NULL. src is
	  assigned to dst, This patch was reviewed on IRC by coreyfarrell
	  and mjordan. Tested by: George Joseph ........ Merged revisions
	  416995 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-20 23:18 +0000 [r416872-416935]  George Joseph <george.joseph@fairview5.com>

	* /, configure, include/asterisk/autoconfig.h.in: build: Allow
	  autoconf/ast_ext_tool_check to handle cross-compiling better.
	  ast_ext_tool_check.m4 isn't handling cases where a path to a
	  package is provided (E.G. --with-mysqlclient=/some/sysroot) and
	  the package has a config tool (E.G. mysql_config) and the package
	  has its own subdirectories in include or lib. For example,
	  mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql but
	  ast_ext_tool_check sets MYSQLCLIENT_LIB to
	  ${MYSQLCLIENT_DIR}/usr/lib. libxml2 has the same problem with its
	  includes. They're in ${LIBXML2_DIR}/usr/include/libxml2 not
	  directly in ${LIBXML2_DIR}/usr/include. Both cause configure to
	  fail and there are others in the same boat. The problem is caused
	  by logic in ast_ext_tool_check that overrides the result of the
	  config tool's --cflags and --libs options if package_DIR is set.
	  This patch prepends package_DIR (if specified) to the -L and -I
	  results from the package's config tool instead of overriding
	  them. A regenerated ./configure and
	  include/asterisk/autoconfig.h.in are included but can be
	  regenerated by running ./bootstrap.sh at any time. Tested by:
	  George Joseph Tested by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3550/ ........ Merged
	  revisions 416929 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 416930 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416931 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* autoconf/ast_ext_tool_check.m4, /: build: Allow
	  autoconf/ast_ext_tool_check to handle cross-compiling better.
	  ast_ext_tool_check.m4 isn't handling cases where a path to a
	  package is provided (E.G. --with-mysqlclient=/some/sysroot) and
	  the package has a config tool (E.G. mysql_config) and the package
	  has its own subdirectories in include or lib. For example,
	  mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql but
	  ast_ext_tool_check sets MYSQLCLIENT_LIB to
	  ${MYSQLCLIENT_DIR}/usr/lib. libxml2 has the same problem with its
	  includes. They're in ${LIBXML2_DIR}/usr/include/libxml2 not
	  directly in ${LIBXML2_DIR}/usr/include. Both cause configure to
	  fail and there are others in the same boat. The problem is caused
	  by logic in ast_ext_tool_check that overrides the result of the
	  config tool's --cflags and --libs options if package_DIR is set.
	  This patch prepends package_DIR (if specified) to the -L and -I
	  results from the package's config tool instead of overriding
	  them. Tested by: George Joseph Tested by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3550/ ........ Merged
	  revisions 416870 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416871 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-20 20:57 +0000 [r416848-416850]  Jonathan Rose <jrose@digium.com>

	* res/parking/parking_manager.c, /: res_parking: Make manager
	  commands register with module information Previously module
	  information was not included due to an oversight. Review:
	  https://reviewboard.asterisk.org/r/3626/ ........ Merged
	  revisions 416849 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/logger.c, CHANGES, include/asterisk/logger.h,
	  main/manager.c: Logger: Add manager command 'LoggerRotate' to
	  rotate logger Part of a series of AMI command equivalents to
	  existing CLI commands Review:
	  https://reviewboard.asterisk.org/r/3651/

2014-06-20 17:06 +0000 [r416830]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_voicemail.c, include/asterisk/app.h, main/app.c,
	  apps/app_directory.c, apps/app_chanspy.c: voicemail API
	  callbacks: Extract the sayname API call to its own registerd
	  callback. * Extract the sayname API call to its own registerd
	  callback. This allows the app_directory and app_chanspy
	  applications to say a mailbox owner's name using an alternate
	  provider when app_voicemail is not available because you are
	  using res_mwi_external. app_directory still uses the
	  voicemail.conf file. AFS-64 #close Reported by: Mark Michelson

2014-06-20 15:27 +0000 [r416738-416807]  George Joseph <george.joseph@fairview5.com>

	* main/astobj2_private.h, main/astobj2_container_private.h,
	  main/astobj2_container.c, main/astobj2_hash.c,
	  main/astobj2_rbtree.c, build_tools/cflags.xml, /,
	  tests/test_astobj2.c: astobj2: Additional refactoring to push
	  impl specific code down into the impls. Move some implementation
	  specific code from astobj2_container.c into astobj2_hash.c and
	  astobj2_rbtree.c. This completely removes the need for
	  astobj2_container to switch on RTTI and it no longer has any
	  knowledge of the implementation details. Also adds AO2_DEBUG as a
	  new compile option in menuselect which controls astobj2 debugging
	  independently of AST_DEVMODE and REF_DEBUG. Tested by: George
	  Joseph Review: https://reviewboard.asterisk.org/r/3593/ ........
	  Merged revisions 416806 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_endpoint_identifier_ip.c, main/acl.c,
	  include/asterisk/netsock2.h, include/asterisk/acl.h,
	  main/netsock2.c: pjsip cli: Change Identify to show CIDR notation
	  instead of netmasks. * Added ast_sockaddr_cidr_bits() to count
	  the 1 bits in an ast_sockaddr. * Added ast_ha_join_cidr() which
	  uses ast_sockaddr_cidr_bits() for the netmask instead of
	  ast_sockaddr_stringify_addr. * Changed
	  res_pjsip_endpoint_identifier_ip to call ast_ha_join_cidr()
	  instead of ast_ha_join() for the CLI output. This is a CLI change
	  only. AMI was not affected. Tested by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3652/ ........ Merged
	  revisions 416737 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-19 19:40 +0000 [r416736]  Kinsey Moore <kmoore@digium.com>

	* /, main/bridge.c, res/parking/parking_tests.c,
	  channels/sip/reqresp_parser.c, main/logger.c, main/test.c: Fix
	  build warnings with TEST_FRAMEWORK enabled ........ Merged
	  revisions 416732 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 416733 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416734 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-19 16:04 +0000 [r416589-416670]  George Joseph <george.joseph@fairview5.com>

	* pbx/pbx_lua.c, /: Remove the problematic and unneeded
	  AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
	  AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be
	  incorrectly loaded before pbx_config. pbx_config was therefore
	  blowing away contexts that were created by pbx_lua. With
	  AST_MODFLAG_DEFAULT the load order is now correct and contexs are
	  being properly merged. AST_MODFLAG_GLOBAL_SYMBOLS was not needed
	  anyway since no other modules needed its global symbols that
	  early. ASTERISK-23818 #close Reported by: Dennis Guse Tested by:
	  Dennis Guse Tested by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3629/ ........ Merged
	  revisions 416668 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416669 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* configs/extensions.lua.sample, /: Update extensions.lua.sample
	  with naming conflict guidance. The sample extensions.lua was
	  causing pbx_lua to fail to load when parsing 'app.goto("default",
	  "s", 1)' because in Lua 5.2, 'goto' is now a reserved word. This
	  patch adds guidance to extensions.lua.sample and changed
	  'app.goto("default", "s", 1)' to 'app.['goto']("default", "s",
	  1)'. ASTERISK-23844 #close Reported by: rnewton Tested by:
	  gtjoseph Review: https://reviewboard.asterisk.org/r/3627/
	  ........ Merged revisions 416581 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416582 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-18 04:22 +0000 [r416561]  Matthew Jordan <mjordan@digium.com>

	* /, main/stasis_channels.c: stasis_channels: Update the stasis
	  cache if manager variables are needed In r416211, the publishing
	  of variable changes was modified such that a cached channel
	  snapshot was used if manager variables were not requested with
	  each AMI event. This was done to reduce the amount of channel
	  snapshots created. However, an assumption was made that
	  generating a channel snapshot and publishing the snapshot to the
	  channel topic was sufficient to ensure that the cache would be
	  updated; this is not the case. The channel snapshot type must be
	  used to force a snapshot update. This patch updates the
	  publication of channel variables such that the cache is updated
	  prior to publication of the channel variable message if manager
	  variables are in use. This ensures that all AMI events receive
	  the variable update when they are supposed to. Note that this
	  issue was caught by the Asterisk Test Suite (go go testing)
	  ........ Merged revisions 416557 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-17 18:45 +0000 [r416444-416503]  Mark Michelson <mmichelson@digium.com>

	* /, funcs/func_strings.c: Allow the PUSH and UNSHIFT functions to
	  set inheritable channel variables. ........ Merged revisions
	  416500 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 416501 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416502 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_pidf_body_generator.c, /,
	  res/res_pjsip_xpidf_body_generator.c: Fix string growth algorithm
	  for XML presence bodies. pjpidf_print() does not return < 0 if
	  there is not enough room for the document to be printed. Rather,
	  it returns 39, the length of the XML prolog. The algorithm also
	  had a bug in that it would return if it attempted to grow the
	  string larger. ........ Merged revisions 416442 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-17 16:33 +0000 [r416443]  Kinsey Moore <kmoore@digium.com>

	* res/res_musiconhold.c, /: MoH: Don't restart stream on repeated
	  start calls Currently, music on hold will stop and then start
	  again from the beginning if ast_moh_start() is called multiple
	  times. This can happen if a call is put on hold repeatedly (the
	  channel receives multiple HOLD control frames) and can be
	  triggered from ARI by starting MoH on a channel multiple times.
	  This is fairly jarring/annoying to users. This change prevents
	  MoH from being restarted if the requested music class is the same
	  as the one currently playing. This includes an extra check to
	  prevent the errors previously experienced in the testsuite and
	  has 100+ test runs behind it. Review:
	  https://reviewboard.asterisk.org/r/3615/ ........ Merged
	  revisions 416439 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 416440 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416441 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-16 18:27 +0000 [r416416]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_dahdi.c, configs/chan_dahdi.conf.sample,
	  channels/sig_ss7.h, configure, channels/chan_dahdi.h,
	  configure.ac, UPGRADE.txt, configs/ss7.timers.sample (added),
	  CHANGES, channels/sig_ss7.c: chan_dahdi: Adds support for major
	  update to libss7. * SS7 support now requires libss7 v2.0 or
	  later. The new libss7 is not backwards compatible. * Added SS7
	  support for connected line and redirecting. * Most SS7 CLI
	  commands are reworked as well as new SS7 commands added. See
	  online CLI help. * Added several SS7 config option parameters
	  described in chan_dahdi.conf.sample. * ISUP timer support
	  reworked and now requires explicit configuration. See
	  ss7.timers.sample. Special thanks to Kaloyan Kovachev for his
	  support and persistence in getting the original patch by adomjan
	  updated and ready for release. SS7-27 #close Reported by: adomjan

2014-06-16 16:22 +0000 [r416394]  Kevin Harwell <kharwell@digium.com>

	* include/asterisk/http_websocket.h, tests/test_websocket_client.c,
	  res/res_http_websocket.c: res_http_websocket: read/write string
	  fixup There was a problem when reading a string from the
	  websocket. It assumed the received data had a null terminator and
	  tried to write the data to an ast_str. This of course could/would
	  read past the end of the given buffer while writing the data to
	  the internal buffer of ast_str. Modified the the code to
	  correctly place a null terminator on the result string.

2014-06-16 09:04 +0000 [r416339]  Igor Goncharovskiy <igor.goncharovsky@gmail.com>

	* cel/cel_sqlite3_custom.c, main/db.c, res/res_config_sqlite3.c,
	  cdr/cdr_sqlite3_custom.c, /: We have faced situation when using
	  CDR and CEL by sqlite3 modules. With system having high load
	  (~100 concurrent calls created by sipp) we found many cdr and cel
	  records missed. There is special finction in sqlite3, that make
	  able to fix this situation - sqlite3_wait_timeout, that also can
	  replace awful code cdr_sqlite3 ad cel_sqlite3 modules. Also this
	  function can be used for aastdb and res_config_sqlite3 to avoid
	  missed writes to sqlite db. #ASTERISK-23766 #close Reported by:
	  Igor Goncharovsky Review:
	  https://reviewboard.asterisk.org/r/3559/ ........ Merged
	  revisions 416336 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 416337 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416338 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-16 02:40 +0000 [r416267-416319]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: channels/chan_sip: Forbid remote bridging
	  if T.38 is negotiated When a framehook is removed - such as the
	  fax gateway framehook - the bridge framework will re-evaluate the
	  bridge mixing technologies to see if it can improve the bridging.
	  When this occurs, get_rtp_info will be called to determine if
	  local or remote bridging can be used. Using remote bridging will
	  cause a fax to fail, as direct media negotiation will cause some
	  small number of packets to not arrive at the remote endpoint.
	  This patch forces local native bridging if T.38 negotiation is in
	  progress or has been established. ........ Merged revisions
	  416318 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/channel_internal_api.c: channel_internal_api: Publish a
	  snapshot change when linkedids change Snapshots are now not
	  published *quite* as much as they used to. One instance where
	  they are not published any longer is during bridge enter and exit
	  - the state of the channel doesn't change, the bridge does.
	  However, channels are changed when a linkedid is propagated;
	  previously, the channel's state would be updated and published
	  during the bridge enter event. Now this must be explicitly done.
	  ........ Merged revisions 416300 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, tests/test_stasis_endpoints.c: test_stasis_endpoints: Remove
	  expected channel snapshot We no longer publish a channel snapshot
	  when it is associated with an endpoint; after all, the channel
	  itself hasn't changed - the endpoint state has changed. This
	  updates the channel_messages unit test accordingly. ........
	  Merged revisions 416298 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_musiconhold.c: MoH: Undo commit r416150 (1.8) This
	  patch reverts r416150. When the comparison between mohclass->name
	  and state->class->name is made, you are not guaranteed that (a)
	  state->class is non-NULL or that state or state->class are in a
	  safe state. Crashes caught by the bridges/transfer_capabilities
	  test. ........ Merged revisions 416251 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 416252 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416255 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-14 19:26 +0000 [r416237]  Corey Farrell <git@cfware.com>

	* res/res_manager_devicestate.c, res/res_manager_presencestate.c:
	  res_manager_devicestate and res_manager_presencestate missing
	  support level Add MODULEINFO comment block to define support
	  level core for these new modules. Review:
	  https://reviewboard.asterisk.org/r/3620/

2014-06-13 18:24 +0000 [r416216]  Matthew Jordan <mjordan@digium.com>

	* res/res_agi.c, res/res_pjsip/pjsip_configuration.c,
	  main/stasis_channels.c, res/ari/resource_channels.c,
	  main/bridge_channel.c, main/pbx.c, main/stasis_cache.c, /,
	  apps/app_meetme.c, main/pickup.c, main/channel_internal_api.c,
	  include/asterisk/channel.h, main/core_local.c, main/aoc.c,
	  main/endpoints.c, main/cel.c, apps/app_queue.c,
	  main/stasis_bridges.c, apps/app_agent_pool.c, main/cli.c,
	  main/channel.c, main/dial.c, main/manager.c,
	  include/asterisk/stasis_channels.h: stasis: Reduce creation of
	  channel snapshots to improve performance During some performance
	  testing of Asterisk with AGI, ARI, and lots of Local channels, we
	  noticed that there's quite a hit in performance during channel
	  creation and releasing to the dialplan (ARI continue). After
	  investigating the performance spike that occurs during channel
	  creation, we discovered that we create a lot of channel snapshots
	  that are technically unnecessary. This includes creating
	  snapshots during: * AGI execution * Returning objects for ARI
	  commands * During some Local channel operations * During some
	  dialling operations * During variable setting * During some
	  bridging operations And more. This patch does the following: - It
	  removes a number of fields from channel snapshots. These fields
	  were rarely used, were expensive to have on the snapshot, and
	  hurt performance. This included formats, translation paths, Log
	  Call ID, callgroup, pickup group, and all channel variables. As a
	  result, AMI Status, "core show channel", "core show channelvar",
	  and "pjsip show channel" were modified to either hit the live
	  channel or not show certain pieces of data. While this is
	  unfortunate, the performance gain from this patch is worth the
	  loss in behaviour. - It adds a mechanism to publish a cached
	  snapshot + blob. A large number of publications were changed to
	  use this, including: - During Dial begin - During Variable
	  assignment (if no AMI variables are emitted - if AMI variables
	  are set, we have to make snapshots when a variable is changed) -
	  During channel pickup - When a channel is put on hold/unhold -
	  When a DTMF digit is begun/ended - When creating a bridge
	  snapshot - When an AOC event is raised - During Local channel
	  optimization/Local bridging - When endpoint snapshots are
	  generated - All AGI events - All ARI responses that return a
	  channel - Events in the AgentPool, MeetMe, and some in Queue -
	  Additionally, some extraneous channel snapshots were being made
	  that were unnecessary. These were removed. - The result of
	  ast_hashtab_hash_string is now cached in stasis_cache. This
	  reduces a large number of calls to ast_hashtab_hash_string, which
	  reduced the amount of time spent in this function in gprof by
	  around 50%. #ASTERISK-23811 #close Reported by: Matt Jordan
	  Review: https://reviewboard.asterisk.org/r/3568/ ........ Merged
	  revisions 416211 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-13 13:11 +0000 [r416149-416153]  Kinsey Moore <kmoore@digium.com>

	* res/res_musiconhold.c, /: MoH: Don't restart stream on repeated
	  start calls Currently, music on hold will stop and then start
	  again from the beginning if ast_moh_start() is called multiple
	  times. This can happen if a call is put on hold repeatedly (the
	  channel receives multiple HOLD control frames) and can be
	  triggered from ARI by starting MoH on a channel multiple times.
	  This is fairly jarring/annoying to users. This change prevents
	  MoH from being restarted if the requested music class is the same
	  as the one currently playing. Review:
	  https://reviewboard.asterisk.org/r/3615/ ........ Merged
	  revisions 416150 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 416151 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416152 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cel.c, /: CEL: Expose parking retreiver in extra field This
	  exposes the retreiver of a parked call under the "retreiver" key
	  of the extra field when this information is available. Review:
	  https://reviewboard.asterisk.org/r/3608/ ........ Merged
	  revisions 416148 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-13 05:16 +0000 [r416071]  Richard Mudgett <rmudgett@digium.com>

	* main/http.c, include/asterisk/tcptls.h, main/tcptls.c,
	  main/manager.c, /, channels/chan_sip.c: AST-2014-007: Fix of fix
	  to allow AMI and SIP TCP to send messages. ASTERISK-23673 #close
	  Reported by: Richard Mudgett Review:
	  https://reviewboard.asterisk.org/r/3617/ ........ Merged
	  revisions 416066 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 416067 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 416070 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 21:27 +0000 [r416024]  Rusty Newton <rnewton@digium.com>

	* main/pbx.c: main/pbx - documentation - enhance 'core show hints'
	  and 'core show hint' help text Adds descriptive help text to
	  'core show hints' and 'core show hint'. The text describes the
	  various columns for the sake of clarity. It takes into account
	  recent changes to the content displayed by the commands
	  https://reviewboard.asterisk.org/r/3604/ and
	  https://reviewboard.asterisk.org/r/3611/. ASTERISK-23764 Review:
	  https://reviewboard.asterisk.org/r/3610/

2014-06-12 20:17 +0000 [r415982]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip_pubsub.c, /: Fix build in devmode for GCC 4.10
	  ........ Merged revisions 415980 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 17:00 +0000 [r415907]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/utils.h, main/tcptls.c, main/manager.c, /,
	  channels/chan_sip.c, main/http.c, UPGRADE.txt, main/utils.c,
	  include/asterisk/tcptls.h, res/res_http_websocket.c,
	  configs/http.conf.sample: AST-2014-007: Fix DOS by consuming the
	  number of allowed HTTP connections. Simply establishing a TCP
	  connection and never sending anything to the configured HTTP port
	  in http.conf will tie up a HTTP connection. Since there is a
	  maximum number of open HTTP sessions allowed at a time you can
	  block legitimate connections. A similar problem exists if a HTTP
	  request is started but never finished. * Added http.conf
	  session_inactivity timer option to close HTTP connections that
	  aren't doing anything. Defaults to 30000 ms. * Removed the
	  undocumented manager.conf block-sockets option. It interferes
	  with TCP/TLS inactivity timeouts. * AMI and SIP TLS connections
	  now have better authentication timeout protection. Though I
	  didn't remove the bizzare TLS timeout polling code from chan_sip.
	  * chan_sip can now handle SSL certificate renegotiations in the
	  middle of a session. It couldn't do that before because the
	  socket was non-blocking and the SSL calls were not restarted as
	  documented by the OpenSSL documentation. * Fixed an off nominal
	  leak of the ssl struct in handle_tcptls_connection() if the FILE
	  stream failed to open and the SSL certificate negotiations
	  failed. The patch creates a custom FILE stream handler to give
	  the created FILE streams inactivity timeout and timeout after a
	  specific moment in time capability. This approach eliminates the
	  need for code using the FILE stream to be redesigned to deal with
	  the timeouts. This patch indirectly fixes most of ASTERISK-18345
	  by fixing the usage of the SSL_read/SSL_write operations.
	  ASTERISK-23673 #close Reported by: Richard Mudgett ........
	  Merged revisions 415841 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415854 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415896 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 15:50 +0000 [r415839]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, apps/app_queue.c: app_queue: delayed state can cause early
	  leavewhenempty ringing In app_queue, device state changes arrive
	  in event messages and update the queue member status value. That
	  value is checked in get_member_status() to decide that the caller
	  should leave when there are no available members. Although event
	  messages can be delayed by other activity, there is no adverse
	  affect by lagged status except in one specific case: there is
	  only one available member, it was just rung, and leavewhenempty
	  is enabled set for ringing members. This change adds a direct
	  check of the device state only under this condition where the
	  caller may be dropped incorrectly, resolving this issue without
	  affecting performance of app_queue normally. AST-1248 #close
	  Review: https://reviewboard.asterisk.org/r/3595/ Reported by:
	  Thomas Arimont ........ Merged revisions 415833 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415835 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415836 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 15:39 +0000 [r415834]  Jonathan Rose <jrose@digium.com>

	* apps/app_mixmonitor.c, /, UPGRADE.txt: MixMontior: Add class
	  authorization requirements to MixMonitor AMI commands MixMonitor
	  AMI commands StartMixMonitor and StopMixMonitor lacked class
	  authorization. StopMixMonitor now requires that the manager user
	  either have the call or system class authorization.
	  StartMixMonitor is a slightly larger issue since it can execute
	  shell commands if the right arguments are passed into it, and we
	  consider this a permission escalation. A security release will be
	  issued for problem this shortly. ASTERISK-23609 #close Reported
	  by: Corey Farrell ........ Merged revisions 415825 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415832 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 14:39 +0000 [r415813]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_pubsub.c, /: res_pjsip_pubsub: unauthenticated
	  remote crash in PJSIP pub/sub framework A remotely exploitable
	  crash vulnerability exists in the PJSIP channel driver's pub/sub
	  framework. If an attempt is made to unsubscribe when not
	  currently subscribed and the endpoint's "sub_min_expiry" is set
	  to zero, Asterisk tries to create an expiration timer with zero
	  seconds, which is not allowed, so an assertion raised. The fix
	  was to reject a subscription that is attempting to unsubscribe
	  when not being already subscribed. Asterisk now checks for this
	  situation appropriately and responds with a 400 instead of
	  crashing. AST-2014-005 ASTERISK-23489 #close ........ Merged
	  revisions 415812 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 14:15 +0000 [r415795]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip.c, /: Fix potential deadlock situation in
	  res_pjsip. SIP transaction timeouts are handled in the PJSIP
	  monitor thread. When this happens on a subscription, and the
	  subscription is destroyed, the subscription destruction is
	  dispatched synchronously to the threadpool. The issue is that the
	  PJSIP dialog is locked by the monitor thread, and then the
	  dispatched task attempts to lock the dialog. This leads to a
	  deadlock that causes SIP traffic to no longer be accepted on the
	  Asterisk server. The fix here is to treat the monitor thread as
	  if it were a threadpool thread when it attempts to dispatch
	  synchronous tasks. This way, the dispatched task turns into a
	  simple function call within the same thread, and the locking
	  issue is averted. AST-2014-008 ASTERISK-23802 #close ........
	  Merged revisions 415794 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 11:34 +0000 [r415767]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip.c, res/res_pjsip_pubsub.c,
	  res/res_pjsip_exten_state.c, include/asterisk/res_pjsip.h,
	  include/asterisk/res_pjsip_pubsub.h,
	  res/res_pjsip_pubsub.exports.in, /,
	  contrib/ast-db-manage/config/versions/c6d929b23a8_create_pjsip_subscription_persistence_.py
	  (added), res/res_pjsip_mwi.c: res_pjsip_pubsub: Persist
	  subscriptions in sorcery so they are recreated on startup. This
	  change makes res_pjsip_pubsub persist inbound subscriptions in
	  sorcery. By default this uses the local astdb but it can also be
	  configured to store within an outside database. When Asterisk is
	  started these subscriptions are recreated if they have not
	  expired. Notifications are sent to the devices which have
	  subscribed and they are none the wiser that the system has
	  restarted. Review: https://reviewboard.asterisk.org/r/3598/
	  ........ Merged revisions 415766 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-12 07:52 +0000 [r415749]  Walter Doekes <walter+asterisk@wjd.nu>

	* UPGRADE.txt, contrib/scripts/safe_asterisk, Makefile, /:
	  safe_asterisk: Overwrite old safe_asterisk on make install. From
	  now on, make install will overwrite safe_asterisk with the latest
	  version. You need to move any local modifications to files inside
	  /etc/asterisk/startup.d, if you have any. See also commits
	  r394939 and r397938. ASTERISK-21965 #close Patches:
	  safe_asterisk.patch uploaded by jkister (License 6232, modified
	  by me) ........ Merged revisions 415748 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-11 23:01 +0000 [r415730]  Richard Mudgett <rmudgett@digium.com>

	* main/format.c, /: format.c: Fix misuse of hash container
	  function. The supplied hash function to a container must be
	  idempotent given the object's key value to figure out which
	  container bucket the object belongs in. Returning a random number
	  or the current container count is not idempotent. The "computed
	  hash" value doesn't help find the object later in those cases. *
	  Fixed the format_list container to actually be a list since that
	  is how the container is used. Conceptually, if more than 283
	  formats were added to the format_list then odd things may have
	  happened before the fix. ........ Merged revisions 415728 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415729 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-11 20:22 +0000 [r415698-415715]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/pbx.c: CLI: correct presence information on core show hints
	  Adds presence to core show hint and changes presence string
	  conversion to use the correct function. ASTERISK-23858 #close
	  Review: https://reviewboard.asterisk.org/r/3611/

	* main/pbx.c: CLI: add presence information to core show hints Adds
	  presence state value to output of core show hints. Also reformats
	  the output slightly so it doesn't use as much space as it would
	  otherwise. Was: 1000@demo : SIP/1000 State:Unavailable Watchers 0
	  Now: 1000@demo : SIP/1000 State:Unavailable Presence:Idle
	  Watchers 0 AFS-53 #close Review:
	  https://reviewboard.asterisk.org/r/3604/

2014-06-10 18:32 +0000 [r415679]  Kinsey Moore <kmoore@digium.com>

	* main/channel.c, /: Fix build in dev mode due to signed/unsigned
	  mismatch ........ Merged revisions 415678 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-10 16:06 +0000 [r415659]  Jonathan Rose <jrose@digium.com>

	* main/message.c, /, res/res_pjsip_notify.c: PJSIP: PJSIPNotify -
	  Strip content-length headers and add documentation Documentation
	  for how to add custom headers/content to notifies created with
	  the PJSIPNotify manager action was a little sparse and it also
	  wasn't vetting application of Content-length headers like its
	  chan_sip equivalent was (so two Content-length headers could be
	  applied... and PJSIP determines the content length anyway, so it
	  just opens people up for error). This patch also flips the
	  variable order so that the variables are interpreted in the same
	  order as they are put in the AMI action. Review:
	  https://reviewboard.asterisk.org/r/3587/ ........ Merged
	  revisions 415658 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-10 09:28 +0000 [r415630]  Alexandr Anikin <may@telecom-service.ru>

	* addons/chan_ooh323.c, /: chan_ooh323: fix loading module failure
	  if there no accessible h323_log or ooh323 config file change
	  return 1 to return AST_MODULE_LOAD_FAILURE on module load routine
	  few cosmetic changes ASTERISK-23814 #close (closes issue
	  ASTERISK-23814) Reported by: Igor Goncharovsky Patches:
	  ASTERISK-23814-ast11.patch ........ Merged revisions 415599 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415602 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-09 20:21 +0000 [r415580]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_header_funcs.c, /: chan_pjsip: Fix bug where custom
	  SIP headers could be duplicated on outgoing INVITEs. When using
	  PJSIP_HEADER() to add custom headers to outgoing INVITE requests,
	  certain situations could result in the headers being duplicated.
	  For instance, if the request were retransmitted, or if the INVITE
	  were re-sent with authentication credentials, the custom headers
	  would be re-added to the request. The fix here is to, after
	  adding the custom headers to the outbound INVITE, remove the
	  datastore that holds the custom headers to add. This way, there
	  is no risk in accidentally adding them if the session supplement
	  is called into a second or third time. ........ Merged revisions
	  415579 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-09 12:12 +0000 [r415524]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, UPGRADE.txt, contrib/scripts/safe_asterisk: safe_asterisk:
	  Cleanup additions to r415132. * Replaced a stray echo that
	  should've been a message call in safe_asterisk. This replaces a
	  conditional log message by a slightly different message. Please
	  update your log parsing scripts. * Made the $NOTIFY mail Subject
	  more verbose by adding the machine name and exitstatus. (Note
	  that a 'make install' still won't overwrite your old
	  safe_asterisk if it exists. See ASTERISK-21965.) ASTERISK-23492
	  #close ........ Merged revisions 415521 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415522 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415523 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-09 03:50 +0000 [r415466]  Corey Farrell <git@cfware.com>

	* /, main/autoservice.c: autoservice: stop thread on graceful
	  shutdown This change adds thread shutdown to autoservice for
	  graceful shutdowns only. ast_register_cleanup is backported to
	  1.8 to allow this. The logger callid is also released on shutdown
	  in 11+. ASTERISK-23827 #close Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3594/ ........ Merged
	  revisions 415463 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415464 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415465 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-08 18:12 +0000 [r415444]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/channel.h, bridges/bridge_native_rtp.c,
	  main/bridge_channel.c, main/channel.c, main/pbx.c, /,
	  main/framehook.c, main/bridge_after.c: bridges/bridge_native_rtp:
	  Reconfigure bridge on removal of framehook This patch is a re-do
	  of r414122. When r414122 was merged, a major problem with it was
	  uncovered. UNBRIDGE soft hangup flags have a catastrophic effect
	  on the pbx core if they leak out from the bridge layer: the
	  channel gets hung up. With the number of threads involved in a
	  blind transfer, and with the initial patch, it was likely that
	  this would occur. This caused a large number of test failures
	  This patch is nearly identical with the one proposed in r414122,
	  save for the following changes: - We explicitly clear the
	  UNBRIDGE flag when setting an after goto on a channel in a bridge
	  - Defensively, if we encounter an UNBRIDGE flag in the pbx core,
	  we handle it https://reviewboard.asterisk.org/r/3585/ ........
	  Merged revisions 415443 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-07 00:42 +0000 [r415428]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/bridge.h, /: bridge.h: Remove redundant struct
	  ast_bridge_channel forward declaration. ........ Merged revisions
	  415427 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-06 21:44 +0000 [r415411]  Jonathan Rose <jrose@digium.com>

	* include/asterisk/manager.h, main/config.c, main/manager.c, /,
	  channels/chan_sip.c, include/asterisk/config.h: chan_sip: Fix
	  order of variables specified in SIPNotify action Prior to this
	  patch, sequential variables would be ordered in reverse from the
	  order specified in the manager action. Review:
	  https://reviewboard.asterisk.org/r/3588/ ........ Merged
	  revisions 415359 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415390 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415410 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-06 20:45 +0000 [r415358]  Kevin Harwell <kharwell@digium.com>

	* main/uri.c, tests/test_websocket_client.c: core uri: Custom uri
	  parsing error when no query parameters If using the custom URI
	  parsing code (not external uriparser lib) and there was no query
	  parameters the resulting pointer would be NULL and then an
	  attempt was made to subtract from it. The pointer is now set to a
	  valid value if there is no query parameter(s). Also, in the
	  'ast_uri_make_host_with_port' function when setting the
	  terminator on the resulting string it was writing it one past the
	  end of allocated memory. It now writes the string terminator
	  appropriately.

2014-06-06 19:13 +0000 [r415343]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip_sdp_rtp.c: PJSIP: Remove premature write of raw
	  formats Currently, there are situations that can occur when using
	  chan_pjsip and certain dialplan applications (notably ChanSpy())
	  that can cause the channel to get no audio with scrolling
	  warnings about format mismatches. This is caused by a failure to
	  update translation paths on a mid-call native format update since
	  the raw formats have already been updated by res_pjsip_sdp_rtp.c
	  in set_caps(). Removing the premature raw format updates allows
	  the translation paths to be setup correctly and the raw read and
	  write formats with them. AFS-63 #close ........ Merged revisions
	  415342 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-06 14:12 +0000 [r415319]  George Joseph <george.joseph@fairview5.com>

	* tests/test_astobj2.c, main/astobj2_private.h (added),
	  main/astobj2.c, main/astobj2_container_private.h (added),
	  main/astobj2_container.c (added), main/astobj2_hash.c (added),
	  main/astobj2_rbtree.c (added), /, include/asterisk/astobj2.h:
	  Split astobj2.c into more maintainable components. Split
	  astobj2.c into the following files to improve maintainability.
	  astobj2.c - object primitives, object primitive misc and
	  initialization code. astobj2_private.h - internal object
	  declarations needed by the containers. astobj2_container.c -
	  generic conainer and container misc code.
	  astobj2_container_hash.c - hash container specific code.
	  astobj2_container_rbtree.c - rbtree container specific code.
	  astobj2_container_private.h - generic container definitions and
	  rtti prototypes. https://reviewboard.asterisk.org/r/3576/
	  ........ Merged revisions 415317 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-06 12:49 +0000 [r415302]  Rusty Newton <rnewton@digium.com>

	* /, configs/cli_aliases.conf.sample: configs/cli_aliases.conf: Two
	  new aliases, plus enhancements for context names. Changed naming
	  of included alias templates to avoid confusion between version
	  names. For example, asterisk12 was for asterisk 1.2, so I changed
	  it to asterisk_1dot2, so that later we can use asterisk_12 for
	  Asterisk 12. Added alias for "features reload" to the template
	  for Asterisk 11 style syntax template, as features reload was
	  removed in 12, but you can still do "module reload features"
	  Added alias for "pjsip reload" to the friendly template. It is
	  shorter than "module reload res_pjsip.so" and if some are like
	  me; I constantly forget that reloading chan_pjsip doesn't parse
	  config. Remembering "pjsip reload" is just easier. ASTERISK-23654
	  #close ASTERISK-23654 #comment Fixed by adding two new aliases
	  and enhancements for context names. Review:
	  https://reviewboard.asterisk.org/r/3572/ ........ Merged
	  revisions 415301 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-05 19:04 +0000 [r415231-415288]  Richard Mudgett <rmudgett@digium.com>

	* main/config.c: config: Fix indentation and missing curlies in
	  config_text_file_load().

	* main/config.c, /: config: Fix config files not reloading when
	  only an included file changes. The twisted logic determining if a
	  config file should be reloaded was mostly broken and disabled.
	  The incorrect test that ASTERISK-23383 fixed actually reenabled
	  the broken logic. The incorrect test was causing the timestamp to
	  always be cleared which caused config files with includes to
	  always be reloaded. * Made wildcard includes always cause a
	  reload. Determining if a file was deleted cannot be determined
	  without restructuring the cache to determine if any files are
	  missing from the last files actually loaded. Also without
	  refactoring config_text_file_load(), the glob loop couldn't check
	  more than one file for changes anyway. * Made remove the cache
	  entry if the file no longer exists when trying to get its
	  timestamp or it is no longer a regular file. This fixes the
	  corner case where the file was loaded, then deleted, then the
	  config reloaded, then the file restored with the same timestamp,
	  and then the config reloaded again. * Made remove the cache entry
	  include list when actually loading the file. This gets rid of any
	  stale includes the file had from the last time the file was
	  loaded. ASTERISK-23683 #close Reported by: tootai Review:
	  https://reviewboard.asterisk.org/r/3575/ ........ Merged
	  revisions 415225 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415229 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415230 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-05 17:22 +0000 [r415223]  Kevin Harwell <kharwell@digium.com>

	* tests/test_uri.c (added), include/asterisk/http_websocket.h,
	  main/http.c, main/uri.c (added), tests/test_websocket_client.c
	  (added), res/res_http_websocket.c, include/asterisk/http.h,
	  include/asterisk/uri.h (added),
	  res/res_http_websocket.exports.in: res_http_websocket: Create a
	  websocket client Added a websocket server client in Asterisk.
	  Asterisk has a websocket server, but not a client. The ability to
	  have Asterisk be able to connect to a websocket server can
	  potentially be useful for future work (for instance this could
	  allow ARI to connect back to some external system, although more
	  work would be needed in order to incorporate that). Also a couple
	  of things to note - proxy connection support has not been
	  implemented and there is limited http response code handling
	  (basically, it is connect or not). Also added an initial new URI
	  handling mechanism to core. Internet type URI's are parsed into a
	  data structure that contains pointers to the various parts of the
	  URI. (closes issue ASTERISK-23742) Reported by: Kevin Harwell
	  Review: https://reviewboard.asterisk.org/r/3541/

2014-06-05 14:49 +0000 [r415208]  Matthew Jordan <mjordan@digium.com>

	* /, apps/app_confbridge.c: app_confbridge: Allow muting of users
	  waiting to enter a ConfBridge Prior to this patch, users waiting
	  to enter a ConfBridge were not considered when muted via the CLI
	  or via AMI. Instead, a confusing message would be emitted stating
	  that the channel did not exist. This patch allows a user to be
	  muted when waiting to enter a ConfBridge conference. This is
	  equivalent to start when muted, only toggled via the CLI or AMI.
	  Review: https://reviewboard.asterisk.org/r/3582 #ASTERISK-23824
	  #close patches: rb3582.patch uploaded by tm1000 (License 6524)
	  ........ Merged revisions 415206 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415207 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-05 11:59 +0000 [r415192]  Kinsey Moore <kmoore@digium.com>

	* /, channels/chan_pjsip.c: PJSIP: Send initial connected line
	  information This makes chan_pjsip send connected line information
	  when it is called so that connected line information is available
	  on the connected channel. (closes issue DPMA-442) Reported by:
	  John Bigelow Review: https://reviewboard.asterisk.org/r/3584/
	  ........ Merged revisions 415191 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-04 20:16 +0000 [r415173]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, contrib/scripts/safe_asterisk: safe_asterisk: Cleanup and
	  debian compatibility. Cleans up the safe_asterisk script and adds
	  the ASTSAFE_FOREGROUND option that allows the debian asterisk
	  init script to capture the right pid. * Drop the vim #modeline
	  which wasn't used. Use test consistently without the odd
	  configure xno syntax. Double quote all paths. General cleanup. *
	  Don't output message()s to the console but only to TTY if set. *
	  Allow TTY to be "no" as well as empty (debian compatibility with
	  debian/patches/safe_asterisk-config). * Add option to export
	  ASTSAFE_FOREGROUND=1 from the init script that calls this to
	  disable backgrounding. Debian uses a similar method in
	  debian/patches/safe_asterisk-nobg). ASTERISK-23492 #close Review:
	  https://reviewboard.asterisk.org/r/3574/ ........ Merged
	  revisions 415132 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415171 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415172 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-04 14:13 +0000 [r415116-415118]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_pjsip.c: chan_pjsip: Add debug in RTP Engine
	  glue callback This patch adds some debug statements that aid with
	  determining why a direct media request may or may not be
	  initiated. ........ Merged revisions 415117 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_session.c, /: res_pjsip_session: Add debug
	  statement for session refreshes This small patch adds a debug
	  level 3 statement indicating how a session refresh is being sent
	  - either as a re-INVITE or as an UPDATE - and where the session
	  refresh is going. ........ Merged revisions 415115 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-04 07:27 +0000 [r415080]  Corey Farrell <git@cfware.com>

	* /, apps/confbridge/include/confbridge.h, apps/app_confbridge.c:
	  app_confbridge: Correct verification of conference name length
	  Conference names were not checked for maximum length, allowing
	  unexpected behaviour. This change adds checking to ensure the
	  maximum length is not exceeded. The maximum length is also
	  changed from 32 to AST_MAX_EXTENSION. ASTERISK-23035 #close
	  Reported by: Iñaki Cívico Tested by: Iñaki Cívico Patches:
	  confbridge-enforce_max-1.8.patch uploaded by coreyfarrell
	  (license 5909) confbridge-enforce_max-11up.patch uploaded by
	  coreyfarrell (license 5909) ........ Merged revisions 415060 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 415066 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 415078 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-03 07:36 +0000 [r415000]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, funcs/func_odbc.c: func_odbc: Fix fixed size buffers fix
	  (r414968). The change that removed the fixed size buffers in
	  odbc-related code -- removing arbitrary column width limits --
	  was incomplete. This change adds: no segfault on writesql without
	  insertsql and return value checks after strdup. While I was in
	  the vicinity I cleaned up the linefeeds in the odbc function
	  descriptions, moved some code for clarity, removed some blobs and
	  noted (but didn't fix) that the 'odbc write ... exec' CLI command
	  doesn't behave as the dialplan equivalent when insertsql= is
	  used. ASTERISK-23582 #close Review:
	  https://reviewboard.asterisk.org/r/3579/ ........ Merged
	  revisions 414997 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414998 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414999 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-06-01 15:32 +0000 [r414976]  Joshua Colp <jcolp@digium.com>

	* /, bridges/bridge_native_rtp.c: bridge_native_rtp: Take the
	  bridge type choice of both channels into account. The
	  bridge_native_rtp module currently uses the bridge result of the
	  first channel that joins a bridge as the ultimate result. This
	  means that if the first channel has direct media enabled but the
	  second does not a direct media bridge will still occur. This
	  change makes it so that both sides are taken into account. If
	  either side forbids the bridge or responds with a local bridge
	  result then either a generic or local bridge occurs.
	  ASTERISK-23541 #close Reported by: Justin E Review:
	  https://reviewboard.asterisk.org/r/3577/ ........ Merged
	  revisions 414975 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-30 14:53 +0000 [r414949]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip_refer.c, /: PJSIP: Prevent crash on blind transfer
	  Blind transfers don't go too well with NULL channels which can
	  occur if the channel has already been transferred away. (closes
	  issue ASTERISK-23718) Reported by: Jonathan Rose ........ Merged
	  revisions 414948 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-30 12:42 +0000 [r414883-414935]  Matthew Jordan <mjordan@digium.com>

	* main/audiohook.c, CHANGES, res/ari/ari_model_validators.c,
	  res/ari/ari_model_validators.h, funcs/func_talkdetect.c (added),
	  include/asterisk/stasis_channels.h,
	  rest-api/api-docs/events.json, /, main/stasis_channels.c:
	  TALK_DETECT: A channel function that raises events when talking
	  is detected This patch adds a new channel function TALK_DETECT
	  that, when set on a channel, causes events indicating the
	  start/stop of talking on a channel to be emitted to both AMI and
	  ARI clients. The function allows setting both the silence
	  threshold (the length of silence after which we decide no one is
	  talking) as well as the talking threshold (the amount of energy
	  that counts as talking). Parameters can be updated on a channel
	  after talk detection has been enabled, and talk detection can be
	  removed at any time. The events raised by the function use a
	  nomenclature similar to existing AMI/ARI events. For AMI:
	  ChannelTalkingStart/ChannelTalkingStop For ARI:
	  ChannelTalkingStarted/ChannelTalkingFinished Review:
	  https://reviewboard.asterisk.org/r/3563/ #ASTERISK-23786 #close
	  Reported by: Matt Jordan ........ Merged revisions 414934 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/config.c, /: main/config.c: AMI action UpdateConfig EmptyCat
	  clears all categories When invoking UpdateConfig AMI action with
	  Action set to EmptyCat, Asterisk will make all categories empty
	  in the config but the one requested with a Cat variable. This is
	  due to a bug in ast_category_empty (main/config.c) that makes an
	  incorrect comparison for a category name. This patch corrects the
	  comparison such that only the requested category is cleared.
	  Review: https://reviewboard.asterisk.org/r/3573/ #ASTERISK-23803
	  #close Reported by: zvision patches: manager.c.diff uploaded by
	  zvision (License 5755) ........ Merged revisions 414880 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414881 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414882 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-29 18:51 +0000 [r414861]  Kinsey Moore <kmoore@digium.com>

	* main/pbx.c, /: PBX: Prevent incorrect hint parsing Dynamic and
	  pattern matching hints should not be checked for their last known
	  state until they are instantiated by subscribers. (closes issue
	  AFS-56) Reported by: John Hardin Patch AFS-56-pbx.diff submitted
	  by Matt Jordan (license 6283) ........ Merged revisions 414813
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 414859 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414860 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-28 22:54 +0000 [r414798]  Matthew Jordan <mjordan@digium.com>

	* main/loader.c, include/asterisk/logger.h, res/res_config_curl.c,
	  cel/cel_odbc.c, res/res_config_odbc.c,
	  bridges/bridge_builtin_features.c, main/optional_api.c,
	  main/logger.c, main/config_options.c, cdr/cdr_odbc.c,
	  apps/app_mixmonitor.c, main/asterisk.c, res/res_odbc.c,
	  main/xmldoc.c, apps/app_voicemail.c, cel/cel_pgsql.c,
	  channels/chan_unistim.c, res/res_config_pgsql.c, main/pbx.c,
	  cdr/cdr_sqlite3_custom.c, res/res_fax.c, main/bridge.c,
	  apps/app_waitforsilence.c, cdr/cdr_adaptive_odbc.c,
	  res/parking/parking_applications.c, cdr/cdr_pgsql.c,
	  res/res_jabber.c: Logger/CLI/etc.: Fix some aesthetic issues;
	  reduce chatty verbose messages This patch addresses some
	  aesthetic issues in Asterisk. These are all just minor tweaks to
	  improve the look of the CLI when used in a variety of settings.
	  Specifically: * A number of chatty verbose messages were removed
	  or demoted to DEBUG messages. Verbose messages with a verbosity
	  level of 5 or higher were - if kept as verbose messages - demoted
	  to level 4. Several messages that were emitted at verbose level 3
	  were demoted to 4, as announcement of dialplan applications being
	  executed occur at level 3 (and so the effects of those
	  applications should generally be less). * Some verbose messages
	  that only appear when their respective 'debug' options are
	  enabled were bumped up to always be displayed. *
	  Prefix/timestamping of verbose messages were moved to the
	  verboser handlers. This was done to prevent duplication of
	  prefixes when the timestamp option (-T) is used with the CLI. *
	  Verbose magic is removed from messages before being emitted to
	  non-verboser handlers. This prevents the magic in multi-line
	  verbose messages (such as SIP debug traces or the output of
	  DumpChan) from being written to files. * _Slightly_ better
	  support for the "light background" option (-W) was added. This
	  includes using ast_term_quit in the output of XML documentation
	  help, as well as changing the "Asterisk Ready" prompt to bright
	  green on the default background (which stands a better chance of
	  being displayed properly than bright white). Review:
	  https://reviewboard.asterisk.org/r/3547/

2014-05-28 20:53 +0000 [r414781]  Rusty Newton <rnewton@digium.com>

	* /, configs/pjsip.conf.sample: pjsip.conf: privkey_file should be
	  priv_key_file, mediaencryption=yes should be mediaencryption=sdes
	  privkey_file was missed in the snake case update. An example
	  included an invalid value for the mediaencryption option.
	  ........ Merged revisions 414780 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-28 17:46 +0000 [r414764-414766]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/endpoints.json,
	  rest-api/api-docs/mailboxes.json, rest-api/api-docs/events.json,
	  /, rest-api/api-docs/asterisk.json,
	  rest-api/api-docs/applications.json,
	  rest-api/api-docs/playbacks.json,
	  rest-api/api-docs/channels.json, rest-api/api-docs/sounds.json,
	  rest-api/resources.json, include/asterisk/manager.h,
	  rest-api/api-docs/bridges.json,
	  rest-api/api-docs/recordings.json: AMI/ARI: Update version
	  numbers Update the semantic versioning of ARI to 1.3.0 and AMI to
	  2.3.0 to account for backwards compatible changes going from
	  12.2.0 to 12.3.0. ........ Merged revisions 414765 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* contrib/ast-db-manage/cdr/env.py, /: ast-db-manage/cdr/env.py:
	  Don't fail if a config file can't be loaded When generating SQL
	  files via the repotools alembic_creator.py script, a
	  configuration object is used programatically with SQLAlechemy, as
	  opposed to a configuration file. This patch ignores failures to
	  interpret a config file, as ... there isn't one in this case.
	  ........ Merged revisions 414763 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-28 16:56 +0000 [r414748-414750]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_session.c, include/asterisk/res_pjsip_session.h, /,
	  res/res_pjsip_t38.c: res_pjsip_session: Fix leaked video RTP
	  ports. Simply enabling PJSIP to negotiage a video codec (e.g.,
	  h264) would leak video RTP ports if the codec were not negotiated
	  by an incoming call. * Made add_sdp_streams() associate the
	  handler with the media stream if the handler handled the media
	  stream. Otherwise, when the ast_sip_session_media object was
	  destroyed it didn't know how to clean up the RTP resources. *
	  Fixed sdp_requires_deferral() associating the handler with the
	  media stream when deciding if the SDP processing needs to be
	  deferred for T.38. Like the leaked video RTP ports, the T.38
	  handler needs to clean up allocated resources from deciding if
	  SDP processing needs to be deffered. * Cleaned up some dead code
	  in handle_incoming_sdp() and sdp_requires_deferral().
	  ASTERISK-23721 #close Reported by: cervajs Review:
	  https://reviewboard.asterisk.org/r/3571/ ........ Merged
	  revisions 414749 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, CHANGES, apps/app_agent_pool.c: app_agent_pool: Return to
	  dialplan if the agent fails to ack the call. Improvements to the
	  agent pool functionality. * AgentRequest no longer hangs up the
	  caller if the agent fails to connect with the caller. It now
	  continues in the dialplan. * AgentRequest returns AGENT_STATUS
	  set to NOT_CONNECTED if the agent failed to connect with the
	  call. Most likely because the agent did not acknowledge the call
	  in time or got disconnected. * The agent alerting play file
	  configured by the agent.conf custom_beep option can now be
	  disabled by setting the option to an empty string. The agent is
	  effectively alerted to a call presence when MOH stops. * Fixed
	  bridge reference leak when the agent connects with a caller.
	  ASTERISK-23499 #close Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3551/ ........ Merged
	  revisions 414747 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-28 11:37 +0000 [r414696]  Joshua Colp <jcolp@digium.com>

	* res/res_config_odbc.c, /, funcs/func_odbc.c: res_config_odbc: Use
	  dynamically sized buffers to store row data so values do not get
	  truncated. ASTERISK-23582 #close ASTERISk-23582 #comment Reported
	  by: Walter Doekes Review:
	  https://reviewboard.asterisk.org/r/3557/ ........ Merged
	  revisions 414693 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414694 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414695 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-28 09:43 +0000 [r414567-414679]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, channels/chan_unistim.c: chan_unistim: Unlock mutex in rare
	  OOM condition. #ASTERISK-23792 #close Reported by: Peter Whisker
	  Review: https://reviewboard.asterisk.org/r/3567/ ........ Merged
	  revisions 414677 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414678 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: chan_sip: Start session timer at 200, not
	  at INVITE. Asterisk started counting the session timer at INVITE
	  while the other end correctly started at 200. This meant that for
	  short session-expiries (90 seconds) combined with long ringing
	  times (e.g. 30 seconds), asterisk would wrongly assume that the
	  timer was hit before the other end thought it was time to send a
	  session refresh. This resulted in prematurely ended calls. This
	  changes the session timer to start counting first at 200 like RFC
	  says it should. (Also removed a few excess NULL checks that would
	  never hit, because if they did, asterisk would have crashed
	  already.) ASTERISK-22551 #close Reported by: i2045 Review:
	  https://reviewboard.asterisk.org/r/3562/ ........ Merged
	  revisions 414620 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414628 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414636 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_config_odbc.c, /: res_config_odbc: Fix old and new
	  ast_string_field memory leaks. The ODBC realtime driver uses ^NN
	  parameter encoding to cope with the special meaning of the
	  semi-colon. A semi-colon in a field is interpreted as if the key
	  was supplied twice, something which isn't otherwise possible with
	  fixed database columns. E.g. allow=alaw;ulaw is parsed as
	  allow=alaw and allow=ulaw. A literal semi-colon is rewritten to
	  ^3B when stored in the database. The module uses a stringfield to
	  efficiently store the encoded parameters. However, this
	  stringfield wasn't always freed in some off-nominal cases. Commit
	  r413241 fixed initialization so the encoding for INSERT and
	  DELETE queries wouldn't crash. (Only SELECTs and UPDATEs worked
	  apparently.) But that commit forgot the frees. This change cleans
	  that up. Review: https://reviewboard.asterisk.org/r/3555/
	  ........ Merged revisions 414564 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414565 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414566 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-25 02:37 +0000 [r414543]  Matthew Jordan <mjordan@digium.com>

	* /, main/core_unreal.c: core_unreal: Prevent double free of
	  core_unreal pvt When a channel is destroyed (such as via
	  ast_channel_release in off nominal paths in core_unreal), it will
	  attempt to free (via ast_free) the channel tech pvt. This is
	  problematic for a few reasons: 1. The channel tech pvt is an ao2
	  object in core_unreal. Free'ing the pvt directly is no good. 2.
	  The channel tech pvt's reference count is dropped just prior to
	  calling ast_channel_release, resulting in the pvt's destruction.
	  Hence, the channel destructor is free'ing an invalid pointer.
	  This patch keeps the dropping of the reference count, but sets
	  the pvt to NULL on the channel prior to releasing it. This models
	  what would occur if the channel was hung up directly. ........
	  Merged revisions 414542 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-23 17:36 +0000 [r414529]  Matthew Jordan <mjordan@digium.com>

	* tests/test_cel.c, /: test_cel: Fix unit tests broken due to event
	  def changes from res_corosync This patch instructs test_cel to
	  skip any IE types it doesn't care about. The addition of the raw
	  and bitfield types caused the tests to fail. ........ Merged
	  revisions 414528 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-23 14:36 +0000 [r414475]  Kinsey Moore <kmoore@digium.com>

	* main/event.c, /: Fix signed/unsigned build warnings ........
	  Merged revisions 414474 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-22 16:19 +0000 [r414417]  Richard Mudgett <rmudgett@digium.com>

	* /, apps/app_meetme.c: app_meetme: Don't interrupt MOH for
	  waitmarked users. Occasionally, when the last marked user leaves
	  the conference, waitmarked users don't get MOH if MOH is supposed
	  to be played while a waitmarked user is waiting for another
	  marked user. * Made not interrupt MOH when the user is a
	  waitmarked user. The waitmarked user doesn't need to hear any
	  leave announcements from the conference as the user would have
	  already heard different leave announcements if they were enabled.
	  Apparently DAHDI occasionally sends unending non-silent streams
	  to these users or a normal user still in the conference has
	  continuous high background noise. These non-silent streams cause
	  MOH to be suspended while the never ending "announcement" is
	  played. Issue caused by ASTERISK-13680. AST-1349 #close Reported
	  by: Tyler Stewart Review:
	  https://reviewboard.asterisk.org/r/3543/ ........ Merged
	  revisions 414401 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414402 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414404 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-22 16:09 +0000 [r414406]  Scott Griepentrog <sgriepentrog@digium.com>

	* rest-api/api-docs/events.json, /, res/stasis/app.c,
	  res/ari/resource_events.c, include/asterisk/stasis_app.h,
	  include/asterisk/stasis.h, apps/app_userevent.c,
	  res/ari/resource_events.h, res/ari/ari_model_validators.c,
	  CHANGES, main/stasis.c, res/ari/ari_model_validators.h,
	  include/asterisk/stasis_channels.h, res/res_ari_events.c,
	  main/stasis_channels.c, res/res_stasis.c,
	  main/manager_channels.c, main/stasis_endpoints.c: ARI: Add
	  ability to raise arbitrary User Events User events can now be
	  generated from ARI. Events can be signalled with arbitrary json
	  variables, and include one or more of channel, bridge, or
	  endpoint snapshots. An application must be specified which will
	  receive the event message (other applications can subscribe to
	  it). The message will also be delivered via AMI provided a
	  channel is attached. Dialplan generated user event messages are
	  still transmitted via the channel, and will only be received by a
	  stasis application they are attached to or if the channel is
	  subscribed to. This change also introduces the multi object blob
	  mechanism used to send multiple snapshot types in a single
	  message. The dialplan app UserEvent was also changed to use multi
	  object blob, and a new stasis message type created to handle
	  them. ASTERISK-22697 #close Review:
	  https://reviewboard.asterisk.org/r/3494/ ........ Merged
	  revisions 414405 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-22 15:52 +0000 [r414403]  Jonathan Rose <jrose@digium.com>

	* include/asterisk/bridge.h, res/parking/parking_bridge_features.c,
	  channels/chan_mgcp.c, res/res_pjsip_refer.c,
	  channels/chan_dahdi.c, channels/sig_analog.c, /,
	  channels/chan_sip.c, main/parking.c, main/bridge.c,
	  main/bridge_basic.c, res/parking/parking_applications.c,
	  include/asterisk/parking.h: res_pjsip_refer: Fix bugs involving
	  Parking/PJSIP/transfers PJSIP would never send the final 200
	  Notify for a blind transfer when transferring to parking. This
	  patch fixes that. In addition, it fixes a reference leak when
	  performing blind transfers to non-bridging extensions. Review:
	  https://reviewboard.asterisk.org/r/3485/ ........ Merged
	  revisions 414400 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-22 14:02 +0000 [r414331-414348]  Matthew Jordan <mjordan@digium.com>

	* /, UPGRADE.txt: UPGRADE: Add note for REF_DEBUG flag ........
	  Merged revisions 414345 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414346 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414347 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_corosync.c, include/asterisk/stasis.h, main/app.c,
	  main/devicestate.c, main/event.c, main/stasis.c,
	  include/asterisk/devicestate.h, include/asterisk/event.h,
	  main/stasis_message.c, /, include/asterisk/event_defs.h:
	  res_corosync: Update module to work with Stasis (and compile)
	  This patch fixes res_corosync such that it works with Asterisk
	  12. This restores the functionality that was present in previous
	  versions of Asterisk, and ensures compatibility with those
	  versions by restoring the binary message format needed to pass
	  information from/to them. The following changes were made in the
	  core to support this: * The event system has been partially
	  restored. All event definition and event types in this patch were
	  pulled from Asterisk 11. Previously, we had hoped that this
	  information would live in res_corosync; however, the approach in
	  this patch seems to be better for a few reasons: (1)
	  Theoretically, ast_events can be used by any module as a binary
	  representation of a Stasis message. Given the structure of an
	  ast_event object, that information has to live in the core to be
	  used universally. For example, defining the payload of a device
	  state ast_event in res_corosync could result in an incompatible
	  device state representation in another module. (2) Much of this
	  representation already lived in the core, and was not easily
	  extensible. (3) The code already existed. :-) * Stasis message
	  types now have a message formatter that converts their payload to
	  an ast_event object. * Stasis message forwarders now handle
	  forwarding to themselves. Previously this would result in an
	  infinite recursive call. Now, this simply creates a new
	  forwarding object with no forwards set up (as it is the thing it
	  is forwarding to). This is advantageous for res_corosync, as
	  returning NULL would also imply an unrecoverable error. Returning
	  a subscription in this case allows for easier handling of message
	  types that are published directly to an aggregate topic that has
	  forwarders. Review: https://reviewboard.asterisk.org/r/3486/
	  ASTERISK-22912 #close ASTERISK-22372 #close ........ Merged
	  revisions 414330 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-21 22:24 +0000 [r414297]  Richard Mudgett <rmudgett@digium.com>

	* /, main/core_unreal.c: core_unreal: Only block media frames when
	  a generator is on both ends of an unreal channel. The fix for
	  ASTERISK-12292 was a bit too aggressive. You could have
	  generators pointed at each other on local channels but need to
	  get other kinds of frames such as DTMF or CONNECTED_LINE frames
	  accross. ........ Merged revisions 414269 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414270 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414272 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-21 19:08 +0000 [r414217]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, funcs/func_strings.c: pbx.c: prevent potential crash from
	  recursive replace() Recurisve usage of replace() resulted in
	  corruption of the temporary string storage and potential crash.
	  By changing the string to be allocated separtely per instance,
	  this is eliminated. ASTERISK-23650 #comment Reported by: Roel van
	  Meer ASTERISK-23650 #close Review:
	  https://reviewboard.asterisk.org/r/3539/ ........ Merged
	  revisions 414214 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414215 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414216 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-19 19:52 +0000 [r414196]  Paul Belanger <paul.belanger@polybeacon.com>

	* res/res_stasis_answer.c, /: Replace __ast_answer with
	  ast_raw_answer in app_control_answer While load testing an ARI
	  application, I noticed asterisk was returning HTTP 500 internal
	  server errors on channels/:id/answer. After talking to
	  #asterisk-dev, the issue appeared to be a lack of media flowing
	  after __ast_answer() was called. So now, we call ast_raw_answer
	  instead and no longer wait for media. ASTERISK-23758 #close
	  Review: https://reviewboard.asterisk.org/r/3549/ ........ Merged
	  revisions 414195 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-19 01:10 +0000 [r414123-414138]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/channel.h, bridges/bridge_native_rtp.c,
	  main/bridge_channel.c, res/res_pjsip_refer.c,
	  res/res_pjsip_session.c, main/channel.c, /, main/framehook.c:
	  Undo r414123 The Test Suite caught a few problems, undoing until
	  those are resolved

	* include/asterisk/channel.h, bridges/bridge_native_rtp.c,
	  main/bridge_channel.c, res/res_pjsip_session.c, main/channel.c,
	  /, main/framehook.c: bridge_native_rtp/bridge_channel: Fix direct
	  media issues due to frame hook This patch fixes issues with
	  direct media bridges that occur after a blind transfer. These
	  issues were caught by the (currently failing)
	  pjsip/transfers/blind_transfer/caller_direct_media test. The test
	  currently fails primarily for two reasons: (1) When Bob and
	  Charlie (the transfer target and the transfer destination) enter
	  a bridge together, the framehook remains on the transfer target
	  channel until both channels are in the bridge. As it consumes
	  voice frames, the initial bridge type is a simple bridge. The
	  framehook is removed when both channels are in the bridge;
	  however, this does not currently cause the bridging framework to
	  re-evaluate the bridge. This patch adds a AST_SOFTHANGUP_UNBRIDGE
	  poke to the transfer target channel when a framehook is removed
	  so the bridge can re-evaluate itself. (2) When a channel leaves a
	  native RTP bridge, it may be leaving due to being hung up.
	  Sending a re-INVITE to a channel that is about to be hung up is
	  not nice - in fact, there's a good chance we'll send the BYE
	  request before the channel has had a chance to send back a 200
	  OK. To be somewhat nicer, this patch adds a function to channel.h
	  that allows the bridging framework to query for exactly why a
	  channel is leaving a bridge via the channel's soft hangup flags.
	  This allows it to only send the re-INVITE if there's a chance the
	  channel will survive the native bridging experience. Review:
	  https://reviewboard.asterisk.org/r/3535/ ........ Merged
	  revisions 414122 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-16 20:06 +0000 [r413994-414070]  Richard Mudgett <rmudgett@digium.com>

	* /, channels/chan_dahdi.c: chan_dahdi: Fix analog dialtone
	  detection. * Check if waitingfordt (waitfordialtone) is enabled
	  in dahdi_read() to allow the DSP to operate early enough to
	  detect dialtone. * Made use the correct variable in
	  my_check_waitingfordt(). ASTERISK-23709 #close Reported by: Steve
	  Davies Patches: dialtone_detect_fix (license #5012) patch
	  uploaded by Steve Davies Review:
	  https://reviewboard.asterisk.org/r/3534/ ........ Merged
	  revisions 414067 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 414068 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414069 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/sig_pri.c, /: sig_pri.c: Pull the pri_dchannel()
	  PRI_EVENT_RING case into its own function. * Populate the
	  CALLERID(ani2) value (and the special CALLINGANI2 channel
	  variable) with the ANI2 value in addition to the PRI specific
	  ANI2 channel variable. * Made complete snapshot staging with the
	  channel lock held. All channel snapshots need to be done while
	  the channel lock is held. ........ Merged revisions 414050 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 414051 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_meetme.c: app_meetme: Fix overwrite of DAHDI
	  conference data structure. Starting a conference recording using
	  the admin menu overwrites the DAHDI conference data structure
	  used to modify the admin user's conference mute mode. * Made no
	  longer pass the user's DAHDI conference data structure into the
	  menu functions. The menu now uses its own DAHDI conference data
	  structure to start the recording channel. * Moved the unlock
	  conf->playlock to before playing the conf-full message. No sense
	  keeping the lock while that prompt is playing. The user is never
	  going to get into the conference at that point. ........ Merged
	  revisions 413991 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413992 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413993 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-14 15:41 +0000 [r413897]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, res/res_musiconhold.c: res_musiconhold: Minor cleanup. Fix a
	  few free()'s that should be ast_free()'s. Reverted an old
	  workaround that isn't necessary. Reorder a tiny bit of code.
	  Remove a bit of commented-out code. Review:
	  https://reviewboard.asterisk.org/r/3536/ ........ Merged
	  revisions 413894 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413895 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413896 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-13 18:09 +0000 [r413878]  Jonathan Rose <jrose@digium.com>

	* main/netsock2.c, /, channels/chan_sip.c,
	  include/asterisk/netsock2.h: chan_sip: Add TLS and SRTP status to
	  CLI command 'sip show channel' ASTERISK-23564 #close Reported by:
	  Patrick Laimbock Review: https://reviewboard.asterisk.org/r/3474/
	  ........ Merged revisions 413876 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413877 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-13 13:53 +0000 [r413790-413793]  Walter Doekes <walter+asterisk@wjd.nu>

	* res/res_format_attr_h264.c, /: h264: Fix H264 SDP payload format.
	  https://tools.ietf.org/html/rfc3984#section-8.1 says
	  profile-level-id takes 3 bytes in base16 (6 hex digits). This
	  fixes video setup in certain cases. ASTERISK-23664 #close
	  ASTERISK-23664 #comment Patch r3530.patch uploaded by Guillaume
	  Maudoux. Review: https://reviewboard.asterisk.org/r/3530/
	  ........ Merged revisions 413791 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413792 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/rtp_engine.c: rtp: Fix case typo in H263+ mime.
	  http://tools.ietf.org/html/rfc3555#section-4.2.6 says the
	  canonical mime subtype is "H263-1998", not "h263-1998". Original
	  code was added in r183101 on 2009-03-19 02:26:50 +0100. This
	  fixes issues with Polycom phones. ASTERISK-23665 #close
	  ASTERISK-23665 #comment Patch r3529.patch uploaded by Guillaume
	  Maudoux, backported by me. Review:
	  https://reviewboard.asterisk.org/r/3529/ ........ Merged
	  revisions 413787 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413788 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413789 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-13 00:35 +0000 [r413770-413772]  Richard Mudgett <rmudgett@digium.com>

	* configure.ac, channels/sig_pri.c, /, configure,
	  include/asterisk/autoconfig.h.in: chan_dahdi/sig_pri: Prevent
	  unnecessary PROGRESS events when overlap dialing is enabled. When
	  overlap dialing is enabled, the lack of inband audio available
	  information in the SETUP_ACKNOWLEDGE events causes an
	  interoperability problem with SIP. sig_pri doesn't know if there
	  is dialtone present when a SETUP_ACKNOWLEDGE is received so it
	  assumes it is there and posts an AST_CONTROL_PROGRESS frame. The
	  SIP channel driver then sends out a 183 Session Progress and
	  blocks the desired 180 Ringing message when the ALERTING message
	  comes in. * Made the configure script detect if the installed
	  version of libpri supports the SETUP_ACKNOWLEDGE enhancements. *
	  Using the new API, made generate an AST_CONTROL_PROGRESS frame on
	  an incoming SETUP_ACKNOWLEDGE message when the message indicates
	  inband audio is present instead of assuming that dialtone is
	  present. * Using the new API, made SETUP_ACKNOWLEDGE send out an
	  inband audio available indication only if dialtone is expected.
	  The change also makes the fallback behaviour of sending the
	  PROGRESS message better by sending it only if dialtone is
	  expected. * Changed receiving a PROCEEDING message to not
	  generate an AST_CONTROL_PROGRESS frame if the progress indication
	  ie indicates non-end-to-end-ISDN. This helps interoperability
	  with SIP. * Changed sending a PROCEEDING message in response to
	  an AST_CONTROL_PROCEEDING frame to not indicate inband audio
	  available. It was silly to do so anyway because the channel
	  driver doesn't know if inband audio is even available. This helps
	  interoperability with SIP. This patch and a corresponding change
	  in libpri work together to allow Asterisk to control the inband
	  audio available progress indication ie on the SETUP_ACKNOWLEDGE
	  message when dialtone is present. AST-1338 #close Reported by:
	  Tyler Stewart Review: https://reviewboard.asterisk.org/r/3521/
	  ........ Merged revisions 413714 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413765 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413771 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/sig_pri.c: Fix compiler warning from GCC 4.10 fixup.
	  ........ Merged revisions 413766 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-12 22:33 +0000 [r413713]  Jonathan Rose <jrose@digium.com>

	* apps/app_chanspy.c, /: app_chanspy: Fix a test that was failing
	  on account of r413551 ASTERISK-23381 #close ASTERISK-23381
	  #comment Reported by: Robert Moss Review:
	  https://reviewboard.asterisk.org/r/3505/ ........ Merged
	  revisions 413710 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413712 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-11 02:09 +0000 [r413651-413682]  Joshua Colp <jcolp@digium.com>

	* main/bridge_basic.c, include/asterisk/channel.h,
	  bridges/bridge_native_rtp.c, include/asterisk/framehook.h,
	  main/channel.c, /, main/framehook.c: framehooks: Add callback for
	  determining if a hook is consuming frames of a specific type. In
	  the past framehooks have had no capability to determine what
	  frame types a hook is actually interested in consuming. This has
	  meant that code has had to assume they want all frames, thus
	  preventing native bridging. This change adds a callback which
	  allows a framehook to be queried for whether it is consuming a
	  frame of a specific type. The native RTP bridging module has also
	  been updated to take advantange of this, allowing native bridging
	  to occur when previously it would not. ASTERISK-23497 #comment
	  Reported by: Etienne Lessard ASTERISK-23497 #close Review:
	  https://reviewboard.asterisk.org/r/3522/ ........ Merged
	  revisions 413681 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/channel.h, bridges/bridge_native_rtp.c,
	  include/asterisk/framehook.h, main/channel.c, /,
	  main/framehook.c, main/bridge_basic.c: Undoing framehook support.
	  Issues were uncovered by Bamboo.

	* /, main/framehook.c, main/bridge_basic.c,
	  include/asterisk/channel.h, bridges/bridge_native_rtp.c,
	  include/asterisk/framehook.h, main/channel.c: framehooks: Add
	  callback for determining if a hook is consuming frames of a
	  specific type. In the past framehooks have had no capability to
	  determine what frame types a hook is actually interested in
	  consuming. This has meant that code has had to assume they want
	  all frames, thus preventing native bridging. This change adds a
	  callback which allows a framehook to be queried for whether it is
	  consuming a frame of a specific type. The native RTP bridging
	  module has also been updated to take advantange of this, allowing
	  native bridging to occur when previously it would not.
	  ASTERISK-23497 #comment Reported by: Etienne Lessard
	  ASTERISK-23497 #close Review:
	  https://reviewboard.asterisk.org/r/3522/ ........ Merged
	  revisions 413650 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-09 23:18 +0000 [r413589-413599]  Kinsey Moore <kmoore@digium.com>

	* /, funcs/func_env.c: Fix 32bit build for func_env ........ Merged
	  revisions 413592 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413595 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413597 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_festival.c, pbx/dundi-parser.c, apps/app_getcpeid.c,
	  main/netsock.c, funcs/func_channel.c, main/audiohook.c,
	  pbx/pbx_config.c, res/res_pjsip_registrar.c, main/xmldoc.c,
	  channels/iax2/firmware.c, apps/app_voicemail.c, main/format.c,
	  cel/cel_pgsql.c, main/rtp_engine.c, main/parking.c,
	  main/bridge.c, res/res_jabber.c, res/res_http_websocket.c,
	  main/config.c, res/res_format_attr_opus.c, main/loader.c,
	  res/parking/parking_bridge.c, main/cdr.c, main/manager.c,
	  include/asterisk/astobj.h, main/bucket.c, apps/app_dumpchan.c,
	  main/app.c, res/res_pjsip/config_transport.c,
	  res/res_pjsip_refer.c, channels/chan_mgcp.c,
	  res/res_rtp_asterisk.c, main/slinfactory.c, main/core_unreal.c,
	  res/res_pjsip_sdp_rtp.c, res/res_crypto.c, main/acl.c,
	  channels/sig_pri.c, res/res_monitor.c, res/res_srtp.c,
	  main/data.c, res/res_corosync.c, channels/sip/config_parser.c,
	  res/res_fax_spandsp.c, apps/app_stack.c, main/asterisk.c,
	  main/udptl.c, res/res_sorcery_config.c, main/security_events.c,
	  res/res_timing_dahdi.c, res/res_pjsip_t38.c,
	  res/res_musiconhold.c, main/taskprocessor.c,
	  res/res_format_attr_h263.c, res/res_xmpp.c, res/res_pktccops.c,
	  funcs/func_hangupcause.c, channels/chan_phone.c,
	  main/manager_bridges.c, cel/cel_odbc.c, channels/chan_skinny.c,
	  channels/chan_motif.c, res/res_agi.c, main/logger.c,
	  funcs/func_srv.c, channels/chan_alsa.c, apps/app_confbridge.c,
	  res/res_pjsip_pubsub.c, channels/sip/include/sip.h, main/sched.c,
	  apps/app_adsiprog.c, main/pbx.c, channels/chan_sip.c,
	  res/res_fax.c, main/aoc.c, res/res_calendar_ews.c,
	  res/parking/parking_bridge_features.c, channels/iax2/parser.c,
	  main/callerid.c, main/file.c,
	  res/res_pjsip/pjsip_configuration.c, main/adsi.c,
	  main/config_options.c, pbx/pbx_dundi.c, funcs/func_iconv.c,
	  main/bridge_channel.c, res/res_odbc.c, channels/chan_pjsip.c,
	  res/parking/parking_manager.c, res/res_calendar.c, /,
	  funcs/func_sysinfo.c, main/utils.c, cdr/cdr_adaptive_odbc.c,
	  res/res_calendar_caldav.c, res/res_stasis_snoop.c,
	  res/res_format_attr_h264.c, main/channel.c, res/ael/pval.c,
	  res/res_ari_model.c, channels/chan_dahdi.c,
	  channels/sig_analog.c, funcs/func_frame_trace.c,
	  res/res_format_attr_silk.c, main/manager_channels.c,
	  apps/app_dial.c, res/res_calendar_icalendar.c, main/translate.c,
	  apps/app_queue.c, channels/chan_jingle.c, res/res_stun_monitor.c,
	  main/abstract_jb.c, res/res_stasis_recording.c, apps/app_sms.c,
	  main/event.c, apps/app_verbose.c, main/dsp.c,
	  channels/chan_unistim.c, main/frame.c, res/res_stasis_playback.c,
	  main/ccss.c, funcs/func_env.c, main/devicestate.c,
	  bridges/bridge_softmix.c, channels/chan_gtalk.c,
	  channels/chan_iax2.c, main/enum.c, main/cli.c,
	  res/res_format_attr_celt.c, apps/confbridge/conf_config_parser.c,
	  main/io.c, channels/pjsip/dialplan_functions.c,
	  res/res_config_odbc.c, res/res_pjsip/location.c,
	  res/res_pjsip_outbound_registration.c, formats/format_pcm.c,
	  apps/app_minivm.c, main/stdtime/localtime.c, main/stun.c: Allow
	  Asterisk to compile under GCC 4.10 This resolves a large number
	  of compiler warnings from GCC 4.10 which cause the build to fail
	  under dev mode. The vast majority are signed/unsigned mismatches
	  in printf-style format strings. ........ Merged revisions 413586
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 413587 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413588 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-09 18:15 +0000 [r413572]  Richard Mudgett <rmudgett@digium.com>

	* main/http.c: http.c: Remove dead code.

2014-05-09 17:03 +0000 [r413557]  Jonathan Rose <jrose@digium.com>

	* apps/app_chanspy.c, /: app_chanspy: Fix a bug where Barge mode
	  could fail If the barge audiohook was attached prior to the spyee
	  and its peer actually being bridged, the audiohook would not be
	  applied and the connected peer would not be able to hear audio
	  from the spy when the spy is in barge mode. (closes issue
	  ASTERISK-23381) Reported by: Robert Moss Review:
	  https://reviewboard.asterisk.org/r/3505/ ........ Merged
	  revisions 413551 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413556 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-08 00:36 +0000 [r413488]  Joshua Colp <jcolp@digium.com>

	* apps/app_queue.c, main/manager.c, /: app_queue: Extend
	  documentation for various Manager actions and events. ........
	  Merged revisions 413485 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413486 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413487 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-07 21:58 +0000 [r413469]  Mark Michelson <mmichelson@digium.com>

	* funcs/func_presencestate.c: Ensure that presence state is decoded
	  properly on Asterisk startup. The CustomPresence provider
	  callback will automatically base64 decode stored data if the 'e'
	  option was present when the state was set. However, since the
	  provider callback was bypassed on Asterisk startup, encoded
	  presence subtypes and messages were being sent instead. This fix
	  makes it so the provider callback is always used when providing
	  presence state updates.

2014-05-07 20:59 +0000 [r413453-413455]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_confbridge.c, /: app_confbridge: Fixed "CBAnn" channels
	  not going away. Fixed a ref leak in conf_handle_talker_cb()
	  everytime the conference bridge was found to report a channel's
	  talker status change. The resulting leak caused the "CBAnn"
	  channels and the conference bridge to never be destroyed. Thanks
	  to Richard Kenner on the asterisk-user's list for locating the
	  problem. Reported by: Richard Kenner ........ Merged revisions
	  413454 from http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_confbridge.c, /: app_confbridge: Fix ref leak in CLI
	  "confbridge kick" command. Fixed ref leak in the CLI "confbridge
	  kick" command when the channel to be kicked was not in the
	  conference. ........ Merged revisions 413451 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413452 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-07 17:56 +0000 [r413307-413399]  Mark Michelson <mmichelson@digium.com>

	* res/res_config_odbc.c, /: Fix encoding of custom prepare extra
	  data. Patches: res_config_odbc-take2.patch by John Hardin
	  (License #6512) ........ Merged revisions 413396 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413397 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413398 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip/presence_xml.c, /,
	  res/res_pjsip_pidf_digium_body_supplement.c: Improve XML
	  sanitization in NOTIFYs, especially for presence subtypes and
	  messages. Embedded carriage return line feed combinations may
	  appear in presence subtypes and messages since they may be
	  derived from user input in an instant messenger client. As such,
	  they need to be properly escaped so that XML parsers do not vomit
	  when the messages are received. ........ Merged revisions 413372
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_registrar.c, /: Check for an act on failures to
	  update contacts during registration. There was an underlying
	  issue in a realtime backend where database updates would fail.
	  Since we were not checking for failure, we would end up in a
	  strange state where the old database entry was still present but
	  Asterisk thought that it had been updated. Now when an entry
	  fails to update, we print a warning and delete the old contact
	  from sorcery so there is no mismatch between foreground and
	  backend state. Patches: res_pjsip_registrar.patch by John Hardin
	  (License #6512) ........ Merged revisions 413358 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_config_odbc.c, /: Ensure that all parts of SQL UPDATEs
	  and DELETEs are encoded. Patches: res_config_odbc.patch by John
	  Hardin (License #6512) ........ Merged revisions 413304 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413305 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413306 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-02 20:28 +0000 [r413227-413263]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_config_odbc.c: Prevent crashes in res_config_odbc due
	  to uninitialized string fields. Patches: odbc-crash.patch by John
	  Hardin (License #6512) ........ Merged revisions 413241 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413251 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413258 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_config_pgsql.c, /: Return the number of rows affected by
	  a SQL insert, rather than an object ID. The realtime API
	  specifies that the store callback is supposed to return the
	  number of rows affected. res_config_pgsql was instead returning
	  an Oid cast as an int, which during any nominal execution would
	  be cast to 0. Returning 0 when more than 0 rows were inserted
	  causes problems to the function's callers. To give an idea of how
	  strange code can be, this is the necessary code change to fix a
	  device state issue reported against chan_pjsip in Asterisk 12+.
	  The issue was that the registrar would attempt to insert contacts
	  into the database. Because of the 0 return from res_config_pgsql,
	  the registrar would think that the contact was not successfully
	  inserted, even though it actually was. As such, even though the
	  contact was query-able and it was possible to call the endpoint,
	  Asterisk would "think" the endpoint was unregistered, meaning it
	  would report the device state as UNAVAILABLE instead of
	  NOT_INUSE. The necessary fix applies to all versions of Asterisk,
	  so even though the bug reported only applies to Asterisk 12+, the
	  code correction is being inserted into 1.8+. Closes issue
	  ASTERISK-23707 Reported by Mark Michelson ........ Merged
	  revisions 413224 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 413225 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413226 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-02 16:39 +0000 [r413211]  Richard Mudgett <rmudgett@digium.com>

	* UPGRADE.txt, res/res_pjsip_refer.c, /, channels/chan_sip.c:
	  res_pjsip_refer: Add Referred-By header on INVITE for blind
	  transfers. Per rfc3892, the Referred-By header in a REFER must be
	  copied into the referenced request (IE. The outgoing INVITE to
	  the transfer target). * Automatically put the Referred-By header
	  in the outgoing INVITE message if the SIPREFERREDBYHDR channel
	  variable is defined with a value. * Made
	  chan_sip.c:get_refer_info() set SIPREFERREDBYHDR for inheritance
	  so chan_pjsip has a better chance to interoperate. * Fixed
	  refer_blind_callback() and refer_incoming_refer_request() to not
	  modify the data in the pointer returned by
	  pjsip_msg_find_hdr_by_name(). It seems wrong to modify that data
	  since the calling routine doesn't own the buffer. ASTERISK-23501
	  #close Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/3514/ ........ Merged
	  revisions 413210 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-02 16:06 +0000 [r413197]  Jonathan Rose <jrose@digium.com>

	* res/parking/res_parking.h, /, CHANGES,
	  res/parking/parking_bridge_features.c,
	  res/parking/parking_manager.c: Parking: Add 'AnnounceChannel'
	  argument to manager action 'Park' (closes ASTERISK-23397)
	  Reported by: Denis Review:
	  https://reviewboard.asterisk.org/r/3446/ ........ Merged
	  revisions 413196 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-01 16:21 +0000 [r413174-413183]  Mark Michelson <mmichelson@digium.com>

	* funcs/func_presencestate.c: Make behavior of the PRESENCE_STATE
	  'e' option more consistent. When writing presence state, if 'e'
	  is specified, then the presence state will be stored in the astdb
	  encoded. However, consumers of presence state events or those
	  that query for the presence state will be given decoded
	  information. If base64 encoding is desired for consumers, then
	  the information can be base64-encoded manually and the 'e' option
	  can be omitted. closes issue ASTERISK-23671 Reported by Mark
	  Michelson Review: https://reviewboard.asterisk.org/r/3482

	* res/res_pjsip_exten_state.c, /: Remove unnecessary repetition
	  checks from res_pjsip_exten_state The PBX core already takes care
	  of ensuring that repeated state changes are not communicated to
	  exten state consumers. Because the check in res_pjsip_exten_state
	  was incomplete, it was causing valid presence state changes not
	  to be sent out. For instance, if the presence state did not
	  change but the message or subtype did, then no presence-related
	  NOTIFY request would be sent out. closes issue ASTERISK-23672
	  Reported by Mark Michelson ........ Merged revisions 413173 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-05-01 12:31 +0000 [r413160]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip/config_transport.c, /: res_pjsip: Add the ability
	  to configure ciphers based on name. Previously this code would
	  only accept the OpenSSL identifier instead of the documented
	  name. ASTERISK-23498 #close ASTERISK-23498 #comment Reported by:
	  Anthony Messina Review: https://reviewboard.asterisk.org/r/3491/
	  ........ Merged revisions 413159 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-30 21:03 +0000 [r413144]  Richard Mudgett <rmudgett@digium.com>

	* main/message.c, /, channels/chan_sip.c,
	  include/asterisk/message.h, res/res_pjsip_messaging.c:
	  chan_sip.c: Fixed off-nominal message iterator ref count and
	  alloc fail issues. * Fixed early exit in sip_msg_send() not
	  destroying the message iterator. * Made
	  ast_msg_var_iterator_next() and ast_msg_var_iterator_destroy()
	  tolerant of a NULL iter parameter in case
	  ast_msg_var_iterator_init() fails. * Made
	  ast_msg_var_iterator_destroy() clean up any current message data
	  ref. * Made struct ast_msg_var_iterator,
	  ast_msg_var_iterator_init(), ast_msg_var_iterator_next(),
	  ast_msg_var_unref_current(), and ast_msg_var_iterator_destroy()
	  use iter instead of i. * Eliminated RAII_VAR usage in
	  res_pjsip_messaging.c:vars_to_headers(). ........ Merged
	  revisions 413139 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413142 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-30 20:39 +0000 [r413141]  Joshua Colp <jcolp@digium.com>

	* /, channels/chan_pjsip.c: chan_pjsip: Fix deadlock when
	  retrieving call-id of channel. If a task was in-flight which
	  required the channel or bridge lock it was possible for the
	  synchronous task retrieving the call-id to deadlock as it holds
	  those locks. After discussing with Mark Michelson the synchronous
	  task was removed and the call-id accessed directly. This should
	  be safe as each object involved is guaranteed to exist and the
	  call-id will never change. ........ Merged revisions 413140 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-30 13:08 +0000 [r413125]  Kinsey Moore <kmoore@digium.com>

	* res/res_http_websocket.c, /: Websocket: Add session locking and
	  delay close This resolves a race condition where data could be
	  written to a NULL FILE pointer causing a crash as a websocket
	  connection was in the process of shutting down by adding locking
	  to websocket session writes and by deferring session teardown
	  until session destruction. (closes issue ASTERISK-23605) Review:
	  https://reviewboard.asterisk.org/r/3481/ Reported by: Matt Jordan
	  ........ Merged revisions 413123 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413124 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-30 12:42 +0000 [r413118-413122]  Joshua Colp <jcolp@digium.com>

	* /, res/stasis/control.c: res_stasis: Add progress indications to
	  operations which perform media. This change fixes operations
	  which did not account for the fact that they may be executed on
	  channels which have not been answered. These operations will now
	  indicate progress when invoked. ASTERISK-23560 #close
	  ASTERISk-23560 #comment Reported by: Jan Svoboda Review:
	  https://reviewboard.asterisk.org/r/3495/ ........ Merged
	  revisions 413121 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_sdp_rtp.c: res_pjsip_sdp_rtp: Fix issue where
	  sending a hold SDP twice could cause an unhold. This change fixes
	  a bug where if an SDP with media address and sendonly was
	  received twice the underlying call would go off hold, instead of
	  remaining on hold. This occured because the code did not properly
	  take into account that the SDP may contain both a valid media
	  address and the sendonly attribute. The code now examines the
	  sendonly attribute and media address first, so if the SDP is
	  received again no change will occur. ASTERISK-23558 #comment
	  Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/3472/ ........ Merged
	  revisions 413119 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_pjsip.c, res/res_pjsip_session.c, /: chan_pjsip:
	  Add support for picking up calls in the configured pickup group.
	  AST-1363 Review: https://reviewboard.asterisk.org/r/3478/
	  ........ Merged revisions 413117 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-29 15:10 +0000 [r413103]  George Joseph <george.joseph@fairview5.com>

	* /, include/asterisk/spinlock.h: Add "destroy" implementation for
	  spinlock. The original commit for spinlock was missing "destroy"
	  implementations. Most of them are no-ops but phtread_spin and
	  pthread_mutex do need their locks destroyed. ........ Merged
	  revisions 413102 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-29 11:27 +0000 [r413089]  Joshua Colp <jcolp@digium.com>

	* channels/chan_pjsip.c, /: chan_pjsip: Implement core ability to
	  get Call-ID of a channel. This changes implement the
	  "get_pvt_uniqueid" which is used to return the technology
	  specific unique identifier. In the case of SIP this is the
	  Call-ID of the dialog. Review:
	  https://reviewboard.asterisk.org/r/3480/ ........ Merged
	  revisions 413088 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-28 20:07 +0000 [r413074]  Kinsey Moore <kmoore@digium.com>

	* /, main/bridge.c, main/bridge_basic.c: Bridging: Don't lock NULL
	  bridges When bridge locking was added for bridge snapshot
	  creation, some locations where bridge locking was added were not
	  guaranteed to actually have a bridge and locking NULL AO2 objects
	  tends to cause segfaults. This ensures that NULL bridges aren't
	  locked. ........ Merged revisions 413073 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-28 14:40 +0000 [r413060]  Mark Michelson <mmichelson@digium.com>

	* res/res_manager_presencestate.c (added), main/devicestate.c,
	  CHANGES, main/presencestate.c, res/res_manager_devicestate.c
	  (added): Add DeviceStateChanged and PresenceStateChanged AMI
	  events. These events are controlled by two new modules,
	  res_manager_devicestate and res_manager_presencestate. Review:
	  https://reviewboard.asterisk.org/r/3417

2014-04-28 07:43 +0000 [r413048]  Igor Goncharovskiy <igor.goncharovsky@gmail.com>

	* UPGRADE.txt, CHANGES, channels/chan_unistim.c,
	  configs/unistim.conf.sample: Introducing changes proposed to
	  chan_unistim driver: 1) Added the unistim.conf variable
	  dtmf_duration which can select the DTMF playback duration from
	  0ms to 150ms (0 is off and is the new default) 2) Enabled the
	  transmission of month names, which are sent with the date and
	  changed the dateformat variable to accept the values 0-3 as per
	  the UNISTIM standard (2 & 3 match the previous 1 & 2 formats). 3)
	  Enabled the "Mute" packet so muting microphone works as expected
	  and microphone muted for all calls while LED light on 4) Changed
	  Duree to Timer on i2004 display (closes issue ASTERISK-23592)

2014-04-27 19:29 +0000 [r413036]  Olle Johansson <oej@edvina.net>

	* main/tcptls.c: tcptls.c : Log errors as ERROR, not warning or
	  something else.

2014-04-25 19:26 +0000 [r413012]  Matthew Jordan <mjordan@digium.com>

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Add support for DTLS
	  handshake retransmissions On congested networks, it is possible
	  for the DTLS handshake messages to get lost. This patch adds a
	  timer to res_rtp_asterisk that will periodically check to see if
	  the handshake has succeeded. If not, it will retransmit the DTLS
	  handshake. Review: https://reviewboard.asterisk.org/r/3337
	  ASTERISK-23649 #close Reported by: Nitesh Bansal patches:
	  dtls_retransmission.patch uploaded by Nitesh Bansal (License
	  6418) ........ Merged revisions 413008 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 413009 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-24 14:37 +0000 [r412993]  Kevin Harwell <kharwell@digium.com>

	* /,
	  contrib/ast-db-manage/config/versions/e96a0b8071c_increase_pjsip_column_size.py
	  (added): pjsip realtime: increase the size of some columns The
	  string lengths on certain columns created through alembic for
	  PJSIP were too short. For instance, columns containing URIs are
	  currently set to 40 characters, but this can be too small and
	  result in truncated values. Added an alembic migration script
	  that increases the size of these columns and a few others to 255.
	  ASTERISK-23639 #close Reported by: Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/3475/ ........ Merged
	  revisions 412992 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-23 20:13 +0000 [r412977]  George Joseph <george.joseph@fairview5.com>

	* include/asterisk/spinlock.h (added), /, configure,
	  include/asterisk/autoconfig.h.in, configure.ac: This patch adds
	  support for spinlocks in Asterisk. There are cases in Asterisk
	  where it might be desirable to lock a short critical code section
	  but not incur the context switch and yield penalty of a mutex or
	  rwlock. The primary spinlock implementations execute exclusively
	  in userspace and therefore don't incur those penalties. Spinlocks
	  are NOT meant to be a general replacement for mutexes. They
	  should be used only for protecting short blocks of critical code
	  such as simple compares and assignments. Operations that may
	  block, hold a lock, or cause the thread to give up it's timeslice
	  should NEVER be attempted in a spinlock. The first use case for
	  spinlocks is in astobj2 - internal_ao2_ref. Currently the
	  manipulation of the reference counter is done with an
	  ast_atomic_fetchadd_int which works fine. When weak reference
	  containers are introduced however, there's an additional
	  comparison and assignment that'll need to be done while the lock
	  is held. A mutex would be way too expensive here, hence the
	  spinlock. Given that lock contention in this situation would be
	  infrequent, the overhead of the spinlock is only a few more
	  machine instructions than the current ast_atomic_fetchadd_int
	  call. ASTERISK-23553 #close Review:
	  https://reviewboard.asterisk.org/r/3405/ ........ Merged
	  revisions 412976 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-23 18:03 +0000 [r412925]  Richard Mudgett <rmudgett@digium.com>

	* /, main/http.c: http: Fix spurious ERROR message in responses
	  with no content. Backport -r411687 and fix the fix because
	  content_length is the length of out plus the length of the file
	  controlled by fd. When a response has an out content length of 0,
	  fwrite would be called to write a buffer with no data in it. This
	  resulted in the following classic error message: [Apr 3 11:49:17]
	  ERROR[26421] http.c: fwrite() failed: Success This patch makes it
	  so that we only attempt to write the content of out if the out
	  string is non-zero. ........ Merged revisions 412922 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 412923 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412924 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-23 15:02 +0000 [r412910]  Russell Bryant <russell@russellbryant.com>

	* res/res_monitor.c, funcs/func_periodic_hook.exports.in (added),
	  main/asterisk.dynamics, funcs/func_periodic_hook.c: Fix error
	  loading res_monitor. For some odd reason, loading app_mixmonitor
	  was fine, but res_monitor was not. This patch fixes a set of
	  issues related to func_periodic_hook exporting the beep functions
	  that gets res_monitor working again.

2014-04-22 10:09 +0000 [r412883]  Joshua Colp <jcolp@digium.com>

	* /, res/stasis/app.c: res_stasis: Fix crash when handling a failed
	  blind transfer message. This changes fixes a crash that occurs
	  when stasis determines if it should send a message out to an
	  application or not. The code incorrectly assumed that a bridge
	  snapshot would always be present when in reality for failure
	  cases it may not be. ASTERISK-23573 #close ........ Merged
	  revisions 412882 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-21 17:56 +0000 [r412759-412824]  Jonathan Rose <jrose@digium.com>

	* CHANGES, /: chan_sip: trust_id_outbound CHANGES message
	  improvement (closes issue AST-1301) (closes issue ASTERISK-19465)
	  Reported by: Krzysztof Chmielewski ........ Merged revisions
	  412821 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 412822 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412823 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c, configs/sip.conf.sample, CHANGES,
	  channels/sip/include/sip.h: chan_sip: Add sendrpid trust options
	  In r411189, some behavior was changed which made sendrpid
	  behavior act in a more trusting manner by sending full user data
	  for peers set with private caller presence in P-Asserted-Identity
	  headers. Since this changed long time expected behaviors, we
	  decided to pull that patch when that was pointed out by the
	  community. Instead, this patch provides a trust_id_outbound
	  setting which will expose the data per RFC-3325 if set to 'yes'
	  and simply not send the PAI/RPID headers at all if set to 'no'.
	  By default trust_id_outbound will be set to 'legacy' which will
	  preserve the behavior prior to these patches. Extra special
	  thanks to Walter Doekes for providing advice and feedback.
	  (closes issue AST-1301) (closes issue ASTERISK-19465) Reported
	  by: Krzysztof Chmielewski Review:
	  https://reviewboard.asterisk.org/r/3447/ ........ Merged
	  revisions 412744 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 412746 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412747 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-21 16:16 +0000 [r412729-412750]  Kinsey Moore <kmoore@digium.com>

	* main/http.c, main/manager.c, /: HTTP: Add TCP_NODELAY to accepted
	  connections This adds the TCP_NODELAY option to accepted
	  connections on the HTTP server built into Asterisk. This option
	  disables the Nagle algorithm which controls queueing of outbound
	  data and in some cases can cause delays on receipt of response by
	  the client due to how the Nagle algorithm interacts with TCP
	  delayed ACK. This option is already set on all non-HTTP AMI
	  connections and this change would cover standard HTTP requests,
	  manager HTTP connections, and ARI HTTP requests and websockets in
	  Asterisk 12+ along with any future use of the HTTP server.
	  Review: https://reviewboard.asterisk.org/r/3466/ ........ Merged
	  revisions 412745 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 412748 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412749 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_confbridge.c, /: Confbridge: Fix ConfbridgeKick AMI
	  documentation This adds documentation for the "all" channel
	  option for the ConfbridgeKick AMI action and adjusts AMI
	  responses accordingly. (issue ASTERISK-23282) Reported by: Dorian
	  Logan ........ Merged revisions 412730 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_confbridge.c: Confbridge: Add references for kick all
	  option After the ability to kick all attendees from a conference
	  was added, a rework removed the comment about that feature from
	  the CLI documentation. This adds that documentation and adds
	  "all" to the participant tab completion list for the confbridge
	  kick command. (closes issue ASTERISK-23282) Reported by: Dorian
	  Logan ........ Merged revisions 412728 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-21 08:36 +0000 [r412714]  Igor Goncharovskiy <igor.goncharovsky@gmail.com>

	* /, channels/chan_unistim.c: Fix wrong dialtone. The "modulation"
	  should not be referenced for tone+tone as it refers to the on-off
	  characteristic - this often resulted in a single tone rather than
	  the multitone as in the UK. ........ Merged revisions 412712 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412713 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-19 02:14 +0000 [r412697-412699]  Matthew Jordan <mjordan@digium.com>

	* /, main/asterisk.c: main/asterisk: Fix startup sequence for
	  realtime features When ASTERISK-23265/ASTERISK-23320 was fixed,
	  it inadvertently led to realtime features breaking. This was due
	  to features loading prior to realtime. This patch fixes this by
	  loading features after loading dynamic modules. ASTERISK-23487
	  #close Reported by: Denis Tested by: Denis ........ Merged
	  revisions 412698 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_sms.c: app_sms: Fix uninitialized values; hangup
	  channel when REL is sent successfully This patch fixes two issues
	  in app_sms: (1) Firstly, the 'flags' field on the stack in
	  sms_exec() is uninitialised, causing it to use the wrong protocol
	  in some cases. This patch correctly initializes the flags fields.
	  (2) Secondly, when disconnect supervision is not working or
	  inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was
	  failing to terminate the call after it sent the REL(ease) message
	  and the peer stopped talking to it. This patch fixes the code to
	  handle the 'bad stop bit' message more gracefully in that case,
	  and hang up the call. Review:
	  https://reviewboard.asterisk.org/r/1392/ ASTERISK-18331 #close
	  Reported by: David Woodhouse patches: asterisk-fix-sms.patch
	  uploaded by David Woodhouse (License 5754) ........ Merged
	  revisions 412655 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 412656 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412657 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-18 20:09 +0000 [r412641]  Jonathan Rose <jrose@digium.com>

	* /, res/ari/resource_bridges.h, res/stasis/control.c,
	  include/asterisk/stasis_app.h, res/stasis/control.h,
	  res/ari/resource_channels.c, CHANGES, res/res_stasis.c,
	  rest-api/api-docs/bridges.json, res/ari/resource_bridges.c,
	  res/res_ari_bridges.c, res/res_stasis_playback.c: ARI: Make
	  bridges/{bridgeID}/play queue sound files Previously multiple
	  play actions against a bridge at one time would cause the sounds
	  to play simultaneously on the bridge. Now if a sound is already
	  playing, the play action will queue playback to occur after the
	  completion of other sounds currently on the queue. (closes issue
	  ASTERISK-22677) Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/3379/ ........ Merged
	  revisions 412639 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-18 17:17 +0000 [r412589]  Rusty Newton <rnewton@digium.com>

	* sounds/sounds.xml, sounds/Makefile, /: sounds: Fix Sounds
	  Makefile and XML that didn't support new sound prompt sets In
	  sounds/Makefile 1 Adds and moves some lines necessary for the
	  en_GB core set. I'm just following how the other sets are defined
	  here. 2 removes the ES extra sounds related lines as we don't
	  have ES extra sound sets. In sounds/sounds.xml 3 Adds member
	  definitons for EN_AU, EN_GB, IT for core sound sets, and EN_GB in
	  extra sound sets ASTERISK-23550 #close Review:
	  https://reviewboard.asterisk.org/r/3464/ ........ Merged
	  revisions 412586 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412587 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-18 17:02 +0000 [r412584]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip/location.c: Allow for multiple contacts to be
	  configured in a single contact= line. This is useful for
	  configuring multiple permanent contacts for an AOR when using
	  realtime AORs. Review: https://reviewboard.asterisk.org/r/3462
	  ........ Merged revisions 412582 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-18 16:44 +0000 [r412580-412583]  Richard Mudgett <rmudgett@digium.com>

	* main/dial.c, main/pbx.c, /, apps/app_originate.c,
	  include/asterisk/pbx.h: Originated calls: Fix several originate
	  call problems. * Restore the reason value set by
	  pbx_outgoing_attempt() to use AST_CONTROL_xxx values as all the
	  consumers were expecting rather than cause codes. * Fixed the
	  dial routines to set cause codes for more than just ast_request()
	  so pbx_outgoing_attempt() reason codes will function. * Fix
	  inconsistent locked_channel return status in
	  pbx_outgoing_attempt(). The chanel may not have been locked or
	  the channel may have been a stale pointer. * Fixed the
	  OutgoingSpoolFailed channel to run dialplan whenever the dialing
	  fails for an originate exten and 1 < synchronous. * Fix incorrect
	  ast_cond_wait() usage in pbx_outgoing_attempt(). Indroduced by
	  issue ASTERISK-22212 patch. * Made struct pbx_outgoing use the
	  ao2 lock instead of its own lock for the cond wait mutex. No
	  sense in having two locks associated with the same struct when
	  only one is needed. Review:
	  https://reviewboard.asterisk.org/r/3421/ ........ Merged
	  revisions 412581 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis_channels.c, apps/app_queue.c, apps/app_dial.c, /:
	  app_dial and app_queue: Make lock the forwarding channel while
	  taking the channel snapshot. * Fixed
	  ast_channel_publish_dial_forward() not locking the forwarded
	  channel when taking the channel snapshot. * Fixed
	  app_dial.c:do_forward() using the wrong channel to get the
	  original call forwarding string. * Removed unnecessary locking
	  when calling ast_channel_publish_dial() and
	  ast_channel_publish_dial_forward() in app_dial and app_queue.
	  Holding channel locks when calling
	  ast_channel_publish_dial_forward() with a forwarded channel could
	  result in pausing the system while the stasis bus completes
	  processsing a forwarded channel subscription. Review:
	  https://reviewboard.asterisk.org/r/3451/ ........ Merged
	  revisions 412579 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-18 14:25 +0000 [r412566]  Kinsey Moore <kmoore@digium.com>

	* res/ari/ari_websockets.c, res/res_ari.c, main/manager.c, /: ARI:
	  Add debug logging for events and responses This adds DEBUG level
	  logging for ARI websocket events and HTTP responses similar to
	  what is available for AMI. Logging for ARI HTTP requests is
	  already adequate for debugging purposes. ........ Merged
	  revisions 412565 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-17 22:50 +0000 [r412552]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/location.c, res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip.c,
	  res/res_pjsip_registrar.c: res_pjsip: Handle reloading when
	  permanent contacts exist and qualify is configured. This change
	  fixes a problem where permanent contacts being qualified were not
	  being updated. This was caused by the permanent contacts getting
	  a uuid and not a known identifier, causing an inability to look
	  them up when updating in the qualify code. A bug also existed
	  where the new configuration may not be available immediately when
	  updating qualifies. (closes issue ASTERISK-23514) Reported by:
	  Richard Mudgett Review: https://reviewboard.asterisk.org/r/3448/
	  ........ Merged revisions 412551 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-17 22:42 +0000 [r412536-412550]  Jonathan Rose <jrose@digium.com>

	* /, main/app.c: Fix a silly shadowed variable mistake that was
	  missed from play tones patch ........ Merged revisions 412549
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/ari/resource_bridges.h, main/app.c,
	  rest-api/api-docs/channels.json, CHANGES,
	  rest-api/api-docs/bridges.json, res/ari/resource_channels.h,
	  include/asterisk/app.h, res/res_stasis_playback.c: ARI: Add tones
	  playback resource Adds a tones URI type to the playback resource.
	  The tone can be specified by name (from indications.conf) or by a
	  tone pattern. In addition, tonezone can be specified in the URI
	  (by appending ;tonezone=<zone>). Tones must be stopped manually
	  in order for a stasis control to move on from playback of the
	  tone. Tones may be paused, resumed, restarted, and stopped. They
	  may not be rewound or fast forwarded (tones can't be controlled
	  in a way that lets you skip around from note to note and pausing
	  and resuming will also restart the tone from the beginning).
	  Tests are currently in development for this feature
	  (https://reviewboard.asterisk.org/r/3428/). (closes issue
	  ASTERISK-23433) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3427/ ........ Merged
	  revisions 412535 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-17 20:25 +0000 [r412467-412484]  Matthew Jordan <mjordan@digium.com>

	* channels/chan_oss.c, /, main/Makefile: main/Makefile: Fix build
	  failure on SmartOS/Illumos/SunOS This patch fixes two issues when
	  building on SmartOS: - channels/chan_oss.c: it makes sure
	  soundcard.h is found - main/Makefile: only use
	  "-Wl,--version-script" when GNU LD is used as the Sun Linker
	  doesn't support that. Similar checks are already used elswhere in
	  the Makefile Review: https://reviewboard.asterisk.org/r/3426
	  ASTERISK-23576 #close Reported by: Sebastian Wiedenroth patches:
	  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)
	  ........ Merged revisions 412468 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412483 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/sip/include/sip.h, channels/chan_sip.c, CHANGES:
	  chan_sip: Add SIPURIPHONECONTEXT channel variable for Request TEL
	  URIs This patch is a continuation of
	  https://reviewboard.asterisk.org/r/3349/, committed in r412303.
	  It resolves a finding oej had that the phone-context be available
	  in a channel variable separate from SIPDOMAIN. This patch adds
	  that variable as SIPURIPHONECONTEXT. It also allows a local
	  number (or global number specified in the TEL URI) to be used to
	  look up as a peer. (issue ASTERISK-17179) Review:
	  https://reviewboard.asterisk.org/r/3349/

2014-04-17 15:17 +0000 [r412454]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_refer.c, /: res_pjsip_refer: Channel variable
	  SIPREFERTOHDR not being set during blind transfer The
	  SIPREFERTOHDR channel variable is not being set on any channel
	  when performing a blind transfer using PJSIP. The
	  'refer->refer_to' was not being set during a blind transfer.
	  Updated so the 'refer_to' is set to the target uri on a blind
	  transfer. (closes issue ASTERISK-23502) Reported by: John Bigelow
	  Review: https://reviewboard.asterisk.org/r/3445/ ........ Merged
	  revisions 412453 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-16 19:14 +0000 [r412440]  Kinsey Moore <kmoore@digium.com>

	* /, include/asterisk/stasis_app.h: Stasis: Add a usage note on
	  stasis_app_get_bridge This function returns an ast_bridge without
	  a refcount bump and the caller must increment the count if it
	  intends to hold the pointer. (closes issue ASTERISK-23588)
	  Review: https://reviewboard.asterisk.org/r/3450/ Reported by:
	  Matt Jordan ........ Merged revisions 412439 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-15 23:21 +0000 [r412427]  Russell Bryant <russell@russellbryant.com>

	* bridges/bridge_builtin_features.c, include/asterisk/monitor.h,
	  CHANGES, apps/app_queue.c, funcs/func_periodic_hook.c,
	  apps/app_mixmonitor.c, include/asterisk/beep.h (added),
	  res/res_monitor.c: (mix)monitor: Add options to enable a periodic
	  beep Add an option to enable a periodic beep to be played into a
	  call if it is being recorded. If enabled, it uses the
	  PERIODIC_HOOK() function internally to play the 'beep' prompt
	  into the call at a specified interval. This option is provided
	  for both Monitor() and MixMonitor(). Review:
	  https://reviewboard.asterisk.org/r/3424/

2014-04-15 18:30 +0000 [r412384-412414]  Richard Mudgett <rmudgett@digium.com>

	* main/stasis_channels.c, main/features_config.c,
	  res/res_parking.c, main/rtp_engine.c, /: Eliminate some more
	  unnecessary RAII_VAR() uses. RAII_VAR() is not a hammer
	  appropriate to pound all nails. ........ Merged revisions 412413
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis_playback.c, /, res/stasis/app.c, res/res_fax.c,
	  res/res_pjsip/security_events.c,
	  res/parking/parking_applications.c, channels/chan_oss.c,
	  main/stasis_bridges.c, res/res_pjsip_session.c,
	  res/stasis_recording/stored.c, main/cdr.c, res/res_parking.c,
	  channels/chan_skinny.c, res/res_pjsip/location.c,
	  res/res_stasis_recording.c, main/stasis_channels.c,
	  res/ari/resource_channels.c, res/parking/parking_manager.c,
	  res/ari/resource_recordings.c, res/res_pjsip_refer.c,
	  res/res_ari.c, main/pbx.c: Remove unused RAII_VAR() declarations.
	  * Remove unused RAII_VAR() declarations. The compiler cannot
	  catch these because the cleanup function "references" the unused
	  variable. Some actually allocated and released resources that
	  were never used. * Fixed some whitespace issues in
	  stasis_bridges.c. ........ Merged revisions 412399 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/rtp_engine.h, main/rtp_engine.c, /,
	  channels/chan_sip.c: chan_sip.c: Fix channel staging assertion
	  failure. The failing assertion ensures that the final snapshot
	  gets generated so CDR records can get finalized. The only place
	  where a channel staging snapshot flag could be left set is in
	  chan_sip.c:handle_request_bye(). The function could return before
	  clearing the flag because the channel could dissappear while the
	  function had to have the channel unlocked. * Fixed
	  handle_request_bye() channel snapshot staging coverage area to
	  not have a return in the middle of it and be unable to clear the
	  staging flag. * Pushed the channel snapshot staging coverage area
	  into ast_rtp_instance_set_stats_vars() to ensure that the staging
	  is not interrutped. * Made callers of
	  ast_rtp_instance_set_stats_vars() not call it with any channels
	  or channel driver private locks held to eliminate the deadlock
	  potential. The callers must hold references to the passed in
	  channel and rtp objects. * Eliminated sip_hangup() trying to get
	  the bridge peer. It is futile at this point because the channel
	  could never be in a bridge. Review:
	  https://reviewboard.asterisk.org/r/3431/ ........ Merged
	  revisions 412385 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: chan_sip.c: Moved some sip_pvt unrefs
	  after their last use. * Moved sip_pvt unref in ast_hangup() and
	  handle_request_do() to the end of the function. The unref needs
	  to happen after the last use of the pointer. ........ Merged
	  revisions 412348 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412383 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-15 16:13 +0000 [r412331]  Jonathan Rose <jrose@digium.com>

	* configs/sip.conf.sample, /, channels/chan_sip.c: Reverting
	  r411189 so that it can be put up for public review --- r411189 |
	  jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines
	  chan_sip: Send real CallerID information with
	  P-Assserted-Identity (RFC-3325) Prior to this patch, the
	  P-Asserted-Identity header would include anonymous caller id
	  information which seems to go against the point of the
	  P-Asserted-Identity header. Now the real caller ID information
	  will be included in this header. Also, no privacy header would be
	  included. This patch adds 'Privacy: id' to outgoing SIP messages
	  that include the P-Asserted-Identity header. (closes issue
	  AST-1301) --- ........ Merged revisions 412328 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 412329 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412330 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-14 15:54 +0000 [r412307]  Corey Farrell <git@cfware.com>

	* main/autoservice.c, /: autoservice: fix reference leak of logger
	  callid. autoservice acquires a local reference to the logger
	  callid of each channel in a loop. This local reference was not
	  released, causing the callid of every channel in autoservice to
	  leak. This change moves the callid unref inside the loop.
	  ASTERISK-23616 #close Reported by: ibercom ........ Merged
	  revisions 412305 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412306 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-12 02:27 +0000 [r412292]  Matthew Jordan <mjordan@digium.com>

	* channels/sip/reqresp_parser.c, CHANGES, channels/chan_sip.c:
	  chan_sip: Support RFC-3966 TEL URIs in inbound INVITE requests
	  This patch adds support for handling TEL URIs in inbound INVITE
	  requests. This includes the Request URI and the From URI. The
	  number specified in the Request URI will be the destination of
	  the inbound channel in the dialplan. The phone-context specified
	  in the Request URI will be stored in the TELPHONECONTEXT channel
	  variable. Review: https://reviewboard.asterisk.org/r/3349
	  ASTERISK-17179 #close Reported by: Geert Van Pamel Tested by:
	  Geert Van Pamel patches:
	  asterisk-12.0.0-chan_sip-RFC3966_patch.txt uploaded by Geert Van
	  Pamel (License 6140)
	  asterisk-12.0.0-reqresp_parser-RFC3966_patch.txt uploaded by
	  Geert Van Pamel (License 6140)

2014-04-12 01:35 +0000 [r412279-412280]  Russell Bryant <russell@russellbryant.com>

	* funcs/func_periodic_hook.c: func_periodic_hook: move module ref
	  The previous code left one error path where the module would be
	  unref'd twice instead of once. It was done once in the error
	  handling block, and again inside of datastore destruction. Now
	  the module ref is only released in the datastore destructor and
	  only acquired when the datastore has been successfully allocated.

	* funcs/func_periodic_hook.c: func_periodic_hook: add module ref
	  counting This module lacked necessary module ref count
	  incrementing and decrementing when used. This patch adds it.
	  There's already a datastore used, so doing the ref counting along
	  with the lifetime of the datastore provides a convenient place to
	  do it.

2014-04-11 21:43 +0000 [r412213-412228]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_stack.c, /: app_stack: Add missing unlock in off-nominal
	  path of STACK_PEEK function. ASTERISK-23620 #close Reported by:
	  Bradley Watkins Patches: ASTERISK-23620_unlock_oldlist.patch
	  (license #5021) patch uploaded by Bradley Watkins ........ Merged
	  revisions 412225 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 412226 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412227 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* utils/Makefile, utils: utils dir: Remove no longer needed traces
	  of refcounter except in the clean make target. * Removed no
	  longer needed files from the svn:ignore property to make them
	  visible.

2014-04-11 12:43 +0000 [r412194]  Kinsey Moore <kmoore@digium.com>

	* /, main/bridge.c, main/bridge_basic.c,
	  include/asterisk/stasis_bridges.h, tests/test_cel.c,
	  apps/app_confbridge.c, res/ari/resource_bridges.c: bridging:
	  Ensure locking during snapshot creation While the vast majority
	  of bridge snapshot creation is locked properly, there are
	  currently some instances that are not. This adds the missing
	  locking to ensure bridge state is not malleable during snapshot
	  creation. (closes issue ASTERISK-22904) Review:
	  https://reviewboard.asterisk.org/r/3415/ Reported by: Matt Jordan
	  ........ Merged revisions 412193 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-11 08:28 +0000 [r412168-412180]  Olle Johansson <oej@edvina.net>

	* main/audiohook.c: Formatting: Remove invisible characters

	* main/audiohook.c: Formatting only.

2014-04-11 02:59 +0000 [r412154]  Matthew Jordan <mjordan@digium.com>

	* main/astobj2.c, contrib/scripts/refcounter.py (added),
	  main/asterisk.c, utils/refcounter.c (removed),
	  build_tools/cflags.xml, utils/utils.xml, /, channels/chan_sip.c,
	  channels/sip/security_events.c, include/asterisk/astobj2.h,
	  UPGRADE.txt: main/astobj2: Make REF_DEBUG a menuselect item;
	  improve REF_DEBUG output This patch does the following: (1) It
	  makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables
	  REF_DEBUG globally throughout Asterisk. (2) The ref debug log
	  file is now created in the AST_LOG_DIR directory. Every run will
	  now blow away the previous run (as large ref files sometimes
	  caused issues). We now also no longer open/close the file on each
	  write, instead relying on fflush to make sure data gets written
	  to the file (in case the ao2 call being performed is about to
	  cause a crash) (3) It goes with a comma delineated format for the
	  ref debug file. This makes parsing much easier. This also now
	  includes the thread ID of the thread that caused ref change. (4)
	  A new python script instead for refcounting has been added in the
	  contrib/scripts folder. (5) The old refcounter implementation in
	  utils/ has been removed. Review:
	  https://reviewboard.asterisk.org/r/3377/ ........ Merged
	  revisions 412114 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 412115 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 412153 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-11 01:12 +0000 [r412102]  Russell Bryant <russell@russellbryant.com>

	* res/res_monitor.c: monitor: use app options parsing helper code
	  This app is pretty ancient, so it was never converted to use the
	  option parsing helper code. I'd like to add an option to this app
	  that takes an argument, and that's a pain to do when not using
	  this helper, so start by doing this conversion. Review:
	  https://reviewboard.asterisk.org/r/3429/

2014-04-10 21:28 +0000 [r412089]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_hep_pjsip.c: res_hep_pjsip: Use the channel name
	  instead of the call ID when it is available During discussions
	  with Alexandr Dubovikov at Kamailio World, it became apparent
	  that while the SIP call ID is a useful identifier prior to an
	  Asterisk channel being created, it is far more preferable to use
	  the channel name (or some channel based identifier) when the
	  channel is available. Homer is smart enough to tie the various
	  messages together. This patch opts to use the channel name when
	  it is available, falling back to the call ID otherwise. ........
	  Merged revisions 412088 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-10 21:10 +0000 [r412075]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_pjsip_pubsub.c: res_pjsip_pubsub: Set the body
	  generation result to 0 for a valid path The result of the
	  "ast_sip_pubsub_generate_body_content" was not set/initialized.
	  Consequently, the nominal path potentially returned an invalid
	  value, thus not sending mwi notifications. ........ Merged
	  revisions 412074 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-09 21:43 +0000 [r412050]  Mark Michelson <mmichelson@digium.com>

	* /, CHANGES, apps/app_mixmonitor.c: Add a Command header to the
	  AMI Mixmonitor action. This fixes a parsing error that occurred
	  during the processing of the AMI action. The error did not result
	  in MixMonitor itself misbehaving, but it could result in the AMI
	  response not giving correct information back. The new header
	  allows for one to specify a post-process command to run when
	  recording finishes. Previously, in order to do this, the
	  post-process command would have to be placed at the end of the
	  Options: header. Patches: mixmonitor_command_2.patch by jhardin
	  (License #6512) ........ Merged revisions 412048 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-09 18:17 +0000 [r412035]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_stasis_answer.c: res_stasis_answer: Add missing
	  newlines ........ Merged revisions 412034 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-08 21:25 +0000 [r411946-411990]  Richard Mudgett <rmudgett@digium.com>

	* /, main/asterisk.c: Internal timing: Add notice that the -I and
	  internal_timing option are no longer needed. Add notice messages
	  during execution that the -I command line option and the
	  astersik.conf internal_timing option are no longer needed. The
	  internal timing functionality is now always enabled if there is a
	  timing module loaded. NOTE: Since the command line options and
	  the asterisk.conf config file are processed before the logging
	  system is initialized, the messages are output to stderr. Change
	  requested as a result of asterisk-dev list comments about the
	  commit for ASTERISK-22846 that removed the -I and internal_timing
	  options. Review: https://reviewboard.asterisk.org/r/3423/
	  ........ Merged revisions 411964 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411974 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411985 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/config.c, /: config: Fix CB_ADD_LEN() to work as originally
	  intended. Fix a long standing bug in CB_ADD_LEN() behaving like
	  CB_ADD(). ASTERISK-23546 #close Reported by: Walter Doekes
	  ........ Merged revisions 411960 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411961 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411962 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/confbridge/conf_config_parser.c, /: app_confbridge: Fix
	  confbridge.conf dsp_talking_threshold option setting wrong
	  parameter. Fixed copy pasta error. ASTERISK-23545 #close Reported
	  by: John Knott ........ Merged revisions 411944 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411945 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-08 14:49 +0000 [r411928]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip.c: res_pjsip: Ignore explicit transport
	  configuration if a WebSocket transport is specified. This change
	  makes it so if a transport is configured on an endpoint that is a
	  WebSocket type the option will be ignored. In practice this is
	  fine because the WebSocket transport can not create outgoing
	  connections, it can only reuse existing ones. By ignoring the
	  option the existing PJSIP logic for using the existing connection
	  will be invoked and stuff will proceed. (closes issue
	  ASTERISK-23584) Reported by: Rusty Newton ........ Merged
	  revisions 411927 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-08 00:26 +0000 [r411897]  Russell Bryant <russell@russellbryant.com>

	* funcs/func_periodic_hook.c: func_periodic_hook: List more modules
	  as dependencies This module makes use of some existing Asterisk
	  components. app_chanspy was already listed as a dependency. There
	  are a few function modules used, as well, so list them.

2014-04-07 20:41 +0000 [r411884]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip_pubsub.c: PJSIP: Ensure test event has new state
	  The change that fixed the pubsub test event's use of a dangling
	  pointer also changed when it was processed relative to the pjsip
	  subscription state change processing. This change corrects the
	  order of events while holding a reference to the pointer that was
	  previously dangling. ........ Merged revisions 411883 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-07 16:15 +0000 [r411870]  Jonathan Rose <jrose@digium.com>

	* main/manager_channels.c, /: AGI/Manager: Prevent multiple
	  NewExten events during AGI application changes AGI applications
	  would trigger NewExten events every time the state of the AGI
	  application changed. This has historically not been the behavior
	  and this behavior was introduced with a CDR patch. This patch
	  corrects that. (closes issue ASTERISK-23390) Reported by:
	  Benjamin Keith Ford Review:
	  https://reviewboard.asterisk.org/r/3406/ ........ Merged
	  revisions 411868 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-07 14:57 +0000 [r411812]  Walter Doekes <walter+asterisk@wjd.nu>

	* apps/app_queue.c, /: app_queue: Re-add HoldTime to
	  QueueCallerAbandon event (simple typo during ast12 refactor).
	  Reported by: Ibrahim22 (on IRC) Tested by: Ibrahim22 ........
	  Merged revisions 411811 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-07 14:29 +0000 [r411791-411806]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_stasis.c: Stasis: Fix Stasis() bridge refcount issue
	  The Stasis() dialplan application monitors what bridge a channel
	  is in and so necessarily holds on to a bridge pointer. This
	  change ensures that it also holds on to a reference for that
	  bridge to prevent the bridge pointer from becoming a dangling
	  pointer. ........ Merged revisions 411804 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_pubsub.c, /: PJSIP: Fix crash introduced in r411671
	  The test event introduced in revision 411671 uses a dangling
	  pointer to access information about pubsub state changes. This
	  moves the event to within the lifetime of the pointer. ........
	  Merged revisions 411790 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-05 13:06 +0000 [r411768]  Russell Bryant <russell@russellbryant.com>

	* CHANGES, funcs/func_periodic_hook.c (added): func_periodic_hook:
	  New function for periodic hooks. This commit introduces a new
	  dialplan function, PERIODIC_HOOK(). It allows you run to a
	  dialplan hook on a channel periodically. The original use case
	  that inspired this was the ability to play a beep periodically
	  into a call being recorded. The implementation is much more
	  generic though and could be used for many other things. The
	  implementation makes heavy use of existing Asterisk components.
	  It uses a combination of Local channels and ChanSpy() to run some
	  custom dialplan and inject any audio it generates into an active
	  call. The other important bit of the implementation is how it
	  figures out when to trigger the beep playback. This
	  implementation uses the audiohook API, even though it's not
	  actually touching the audio in any way. It's a convenient way to
	  get a callback and check if it's time to kick off another beep.
	  It would be nice if this was timer event based instead of polling
	  based, but unfortunately I don't see a way to do it that won't
	  interfere with other things. Review:
	  https://reviewboard.asterisk.org/r/3362/

2014-04-04 19:19 +0000 [r411702-411724]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/options.h, main/asterisk.c, main/channel.c, /,
	  channels/chan_sip.c, configs/asterisk.conf.sample, UPGRADE.txt,
	  include/asterisk/channel.h, utils/extconf.c: internal_timing:
	  Remove the option and always make it enabled if a timing module
	  is loaded. The masquerade supertest frequently fails because
	  either the local channel chain doesn't completely optimize out or
	  the DTMF handshake doesn't completely get accross. Local channel
	  optimization requires frames flowing to trigger when optimization
	  can happen. When optimization happens the media frame that
	  triggered the optimization is dropped. Sending DTMF requires
	  frames to flow in the other direction for timing purposes while
	  sending nothing. If internal timing is not enabled when MOH is
	  playing, Asterisk switches to received timing when an audio frame
	  is received. With optimization dropping media frames and MOH not
	  sending frames unless it receives frames, occasionaly there are
	  no more frames being passed and the test fails. * The asterisk
	  command line -I option and the asterisk.conf internal_timing
	  option are removed. Asterisk now always uses internal timing when
	  needed if any timing module is loaded. The issue ASTERISK-14861
	  did this quite awhile ago in v1.4 but effectively is broken if
	  other internal timing modules besides DAHDI are used. The
	  ast_read_generator_actions() now only does received timing if it
	  has no choice for frame generators like MOH, silence, and
	  playback streaming. * Cleaned up some code dealing with frame
	  generators in ast_deactivate_generator(),
	  generator_write_format_change(), ast_activate_generator(), and
	  ast_channel_stop_silence_generator(). * Removed
	  ast_internal_timing_enabled(), AST_OPT_FLAG_INTERNAL_TIMING, and
	  ast_opt_internal_timing. ASTERISK-22846 #close Reported by: Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/3414/ ........
	  Merged revisions 411715 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411716 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411717 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/utils.c, res/res_musiconhold.c, main/channel.c,
	  main/stasis_cache.c, /: Add some asserts that were handy when
	  looking for a stasis cache problem. * Assert if a channel is
	  destroyed but has the snapshot staging flag set. In this case the
	  final channel destruction snapshot would never get taken. *
	  Assert if what we just got out of the stasis cache is not what we
	  were looking for. This assert would have saved several days
	  searching for a bug and a lot of my hair. * Assert if the music
	  on hold message posts could not find the associated channel. A
	  crash will happen later when manager tries to send the MOH AMI
	  message. This assert catches the problem when the stasis message
	  is posted instead of by the thread processing the defective
	  message. * Always generate a backtrace when an ast_assert()
	  fails. Review: https://reviewboard.asterisk.org/r/3411/ ........
	  Merged revisions 411701 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-04 15:13 +0000 [r411688]  Matthew Jordan <mjordan@digium.com>

	* /, main/http.c: http: Fix spurious ERROR message in responses
	  with no content When a response has a content length of 0, fwrite
	  would be called to write a buffer with no data in it. This
	  resulted in the following classic error message: [Apr 3 11:49:17]
	  ERROR[26421] http.c: fwrite() failed: Success This patch makes it
	  so that we only attempt to write out the content if the
	  calculated content_length is non-zero. ........ Merged revisions
	  411687 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-03 12:06 +0000 [r411671]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip_pubsub.c: res_pjsip_pubsub: Add test event for
	  state change This adds a test event when subscription state
	  changes so that integration tests may trigger new actions at the
	  appropriate times. Review:
	  https://reviewboard.asterisk.org/r/3383/ ........ Merged
	  revisions 411670 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-03 11:47 +0000 [r411669]  Matthew Jordan <mjordan@digium.com>

	* res/res_hep.c, /: res_hep: Fix crash when hep.conf not available
	  Parts of res_hep properly checked for a valid configuration
	  object before attempting to access the configuration. A check,
	  however, was missed when a packet is sent. This patch fixes the
	  crash caused by not checking if the configuration object is
	  valid. ........ Merged revisions 411668 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-02 18:57 +0000 [r411656]  Mark Michelson <mmichelson@digium.com>

	* main/sorcery.c, /, res/res_mwi_external.c,
	  res/res_pjsip/config_system.c, configs/sorcery.conf.sample,
	  main/bucket.c, include/asterisk/sorcery.h,
	  res/res_pjsip/pjsip_configuration.c, tests/test_sorcery_astdb.c,
	  tests/test_sorcery.c, tests/test_sorcery_realtime.c: Prevent
	  duplicate sorcery wizards from being applied to sorcery object
	  types. This commit contains several changes to sorcery: 1)
	  Application of sorcery configuration based on module name is
	  automatically performed when sorcery is opened for a module. 2)
	  Sorcery will not attempt to apply the same wizard to an object
	  type more than once. 3) Sorcery gives more exact results when
	  attempting to apply a wizard, whether as the default or based on
	  configuration. Sorcery unit tests still pass for me after making
	  these changes. Review: https://reviewboard.asterisk.org/r/3326
	  ........ Merged revisions 411159 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-01 22:42 +0000 [r411637-411639]  Richard Mudgett <rmudgett@digium.com>

	* res/parking/parking_bridge.c, /: res_parking: Minor tweaks. * Use
	  ast_bridge_channel_lock()/ast_bridge_channel_unlock() instead of
	  ao2_lock()/ao2_unlock() for struct ast_bridge_channel variables.
	  * Use ast_copy_string() instead of inlining it. * Remove an
	  already done TODO comment. * Some whitespace tweaks. ........
	  Merged revisions 411638 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis_channels.c, /: stasis_channels.c: Eliminate another
	  overuse of RAII_VAR(). ........ Merged revisions 411636 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-04-01 16:52 +0000 [r411587]  Joshua Colp <jcolp@digium.com>

	* /, apps/app_queue.c: app_queue: Fix a bug where realtime members
	  would be deleted during reload causing waiting callers to get
	  ejected. This patch causes realtime queue members to remain in
	  queues during the reload process. Previously these members would
	  be removed causing any waiting callers to be ejected from the
	  queue with a reason of "EXITEMPTY". ASTERISK-23547 #close
	  ASTERISK-23547 #comment Patch
	  app_queue_fix_realtime_reload_1.8_trunk.patch submitted by Italo
	  Rossi (license 6409) Review:
	  https://reviewboard.asterisk.org/r/3404/ ........ Merged
	  revisions 411584 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411585 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411586 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-28 18:32 +0000 [r411556]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/res_hep.h (added), res/res_hep_pjsip.c (added),
	  res/res_hep.exports.in (added), configs/hep.conf.sample (added),
	  CHANGES, res/res_hep.c (added), /: res_hep/res_hep_pjsip: Add a
	  HEPv3 capture agent module and a logger for PJSIP This patch adds
	  the following: (1) A new module, res_hep, which implements a
	  generic packet capture agent for the Homer Encapsulation Protocol
	  (HEP) version 3. Note that this code is based on a patch provided
	  by Alexandr Dubovikov; I basically just wrapped it up, added
	  configuration via the configuration framework, and threw in a
	  taskprocessor. (2) A new module, res_hep_pjsip, which forwards
	  all SIP message traffic that passes through the res_pjsip stack
	  over to res_hep for encapsulation and transmission to a HEPv3
	  capture server. Much thanks to Alexandr for his Asterisk patch
	  for this code and for a *lot* of patience waiting for me to port
	  it to 12/trunk. Due to some dithering on my part, this has taken
	  the better part of a year to port forward (I still blame CDRs for
	  the delay). ASTERISK-23557 #close Review:
	  https://reviewboard.asterisk.org/r/3207/ ........ Merged
	  revisions 411534 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-28 18:00 +0000 [r411533]  Alexandr Anikin <may@telecom-service.ru>

	* addons/ooh323c/src/ooh323.c, addons/ooh323c/src/ooGkClient.c,
	  addons/chan_ooh323.c, /, addons/ooh323c/src/oochannels.c,
	  addons/ooh323c/src/ooCmdChannel.c, addons/ooh323c/src/ooq931.c:
	  process stack command even if gatekeeper client isn't register
	  don't destroy gatekeeper client if it is not started don't
	  destroy gatekeeper client in some sort of gatekeeper errors
	  signal rtp create condition when call cleared before rtp
	  structure created (closes issue ASTERISK-23460) Reported by:
	  Dmitry Melekhov Patches: ASTERISK-23460-2.patch Tested by: Dmitry
	  Melekhov ........ Merged revisions 411531 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411532 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-28 17:41 +0000 [r411515-411530]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/channels.json,
	  rest-api/api-docs/recordings.json,
	  rest-api/api-docs/endpoints.json, rest-api/api-docs/events.json,
	  /, rest-api/api-docs/playbacks.json, UPGRADE.txt,
	  rest-api/api-docs/sounds.json, rest-api/resources.json, CHANGES,
	  include/asterisk/manager.h, rest-api/api-docs/bridges.json,
	  rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/mailboxes.json,
	  rest-api/api-docs/asterisk.json,
	  rest-api/api-docs/applications.json: Update API versions and
	  UPGRADE/CHANGES for 12.2.0 This patch does the following: * It
	  updates the AMI version to 2.2.0 to indicate backwards compatible
	  changes have been made since the last release * It updates the
	  ARI version to 1.2.0 to indicate backwards compatible changes
	  have been made since the last release * It updates the
	  UPGRADE/CHANGES files with changes that were not mentioned
	  ........ Merged revisions 411529 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* UPGRADE.txt, res/res_config_odbc.c: res_config_odbc: Fix for
	  nullable integer columns and keyfield existence check in
	  update_odbc. This patch fixes setting nullable integer columns to
	  NULL instead of an empty string, which fails for PostgreSQL, for
	  example. The current code is supposed to do so, but the check is
	  broken. The patch also allows the first column in the list to be
	  a nullable integer. Also, the check for existence of a mandatory
	  column checked for the first column in the list instead of the
	  key field lookup column. This patch fixes that issue as well.
	  Finally, the compatibility option allow_empty_string_in_nontext,
	  which was added to previous revisions to allow for some database
	  backends with certain schemas to function, has been removed.
	  Review: https://reviewboard.asterisk.org/r/3335 ASTERISK-23459
	  #close ASTERISK-23351 #close (closes issue ASTERISK-23459)
	  Reported by: zvision patches: res_config_odbc.diff uploaded by
	  zvision (License 5755)

2014-03-28 16:18 +0000 [r411469]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/tcptls.c, main/manager.c, /, main/http.c: http: response
	  body often missing after specific request This patch works around
	  a problem with the HTTP body being dropped from the response to a
	  specific client and under specific circumstances: a) Client
	  request comes from node.js user agent "Shred" via use of
	  swagger-client library. b) Asterisk and Client are *not* on the
	  same host or TCP/IP stack In testing this problem, it has been
	  determined that the write of the HTTP body is lost, even if the
	  data is written using low level write function. The only solution
	  found is to instruct the TCP stack with the shutdown function to
	  flush the last write and finish the transmission. See review for
	  more details. ASTERISK-23548 #close (closes issue ASTERISK-23548)
	  Reported by: Sam Galarneau Review:
	  https://reviewboard.asterisk.org/r/3402/ ........ Merged
	  revisions 411462 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411463 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411465 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-28 15:48 +0000 [r411375-411460]  Matthew Jordan <mjordan@digium.com>

	* UPGRADE.txt, /: UPGRADE: Note IAX2 compatibility issue between
	  1.4 and 1.8+ systems. ........ Merged revisions 411457 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411458 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411459 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* contrib/realtime/mysql/voicemail_messages.sql (removed),
	  contrib/realtime/postgresql/realtime.sql (removed),
	  contrib/realtime/mysql/voicemail_data.sql (removed),
	  contrib/realtime/mysql/musiconhold.sql (removed),
	  contrib/realtime/mysql/queue_log.sql (removed),
	  contrib/realtime/mysql/voicemail.sql (removed),
	  contrib/realtime/mysql/sippeers.sql (removed), /,
	  contrib/realtime/mysql/iaxfriends.sql (removed),
	  contrib/realtime/mysql/meetme.sql (removed): contrib/realtime:
	  Remove empty SQL script files Since the relatime scripts are now
	  managed by Alembic, the previous realtime scripts were previously
	  removed. However, the removal process messed up, as the files
	  were still in the repository. The contents were just empty. This
	  removes the files from the tree. ........ Merged revisions 411442
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/sip/include/sip.h: chan_sip: Add MESSAGE request to
	  allowed methods The allowed methods advertised by chan_sip did
	  not previously note the MESSAGE request. Even in Asterisk 1.8, we
	  do accept in-dialog MESSAGE requests; we should advertise that we
	  support MESSAGE requests. ASTERISK-23504 #close ASTERISK-23504
	  #comment Reported by: Martin Kontsek ASTERISK-23504 #comment
	  Patch sip.h_patch.diff uploaded by Martin Kontsek (license 6587)
	  Review: https://reviewboard.asterisk.org/r/3396/ ........ Merged
	  revisions 411372 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411373 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411374 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-27 19:21 +0000 [r411312-411328]  Corey Farrell <git@cfware.com>

	* funcs/func_global.c, apps/app_speech_utils.c,
	  apps/confbridge/conf_config_parser.c,
	  funcs/func_callcompletion.c, funcs/func_frame_trace.c,
	  funcs/func_callerid.c, main/message.c, /, res/res_mutestream.c,
	  channels/pjsip/dialplan_functions.c,
	  res/res_pjsip_header_funcs.c, funcs/func_pitchshift.c,
	  funcs/func_groupcount.c, funcs/func_volume.c, funcs/func_odbc.c,
	  funcs/func_channel.c, funcs/func_cdr.c, funcs/func_blacklist.c,
	  apps/app_stack.c, apps/app_voicemail.c, res/res_calendar.c,
	  apps/app_jack.c, funcs/func_dialplan.c, funcs/func_speex.c,
	  channels/chan_sip.c, funcs/func_math.c, funcs/func_strings.c,
	  funcs/func_jitterbuffer.c, res/res_xmpp.c, channels/chan_iax2.c,
	  main/features_config.c, res/res_jabber.c: Fix dialplan function
	  NULL channel safety issues (closes issue ASTERISK-23391) Reported
	  by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3386/ ........ Merged
	  revisions 411313 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411314 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411315 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/format.c, include/asterisk.h, /: main/formats: Fix crash in
	  ast_format_cmp during non-clean shutdown. * Update asterisk.h to
	  reflect availability of ast_register_cleanup in 11.9. * Use
	  ast_register_cleanup for format_attr_shutdown. (closes issue
	  ASTERISK-23103) Reported by: JoshE ........ Merged revisions
	  411310 from http://svn.asterisk.org/svn/asterisk/branches/11
	  ........ Merged revisions 411311 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-27 14:21 +0000 [r411296]  Mark Michelson <mmichelson@digium.com>

	* main/sorcery.c, /: Give sorcery instances a reference to their
	  wizards. On graceful shutdown, sorcery wizards are all killed
	  off, but it is possible for sorcery instances to still have
	  dangling pointers after this, possibly causing a crash. Giving
	  the sorcery instances a reference to their wizards ensures that
	  the wizard reference will remain valid for the lifetime of the
	  sorcery instance. Review: https://reviewboard.asterisk.org/r/3401
	  ........ Merged revisions 411295 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-26 22:45 +0000 [r411246]  Joshua Colp <jcolp@digium.com>

	* /, main/say.c: say: Fix a bug where SayNumber in Polish tries to
	  play incorrect sound. This change fixes a bug where calling
	  SayNumber with a number divisible by 100 using the Polish
	  language would cause the code to attempt to play a sound file
	  with an empty name. (closes issue ASTERISK-23509) Reported by:
	  zvision Review: https://reviewboard.asterisk.org/r/3378/ ........
	  Merged revisions 411243 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411244 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411245 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-26 16:15 +0000 [r411194]  Jonathan Rose <jrose@digium.com>

	* /, channels/chan_sip.c, configs/sip.conf.sample: chan_sip: Send
	  real CallerID information with P-Assserted-Identity (RFC-3325)
	  Prior too this patch, the P-Asserted-Identity header would
	  include anonymous caller id information which seems to go against
	  the point of the P-Asserted-Identity header. Now the real caller
	  ID information will be included in this header. Also, no privacy
	  header would be included. This patch adds 'Privacy: id' to
	  outgoing SIP messages that include the P-Asserted-Identity
	  header. (closes issue AST-1301) ........ Merged revisions 411189
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 411190 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411193 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-26 16:05 +0000 [r411192]  Richard Mudgett <rmudgett@digium.com>

	* /,
	  contrib/ast-db-manage/config/versions/4c573e7135bd_fix_tos_field_types.py:
	  Fix 'alembic branches' merge conflict as described by the web
	  page. ........ Merged revisions 411191 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-25 18:44 +0000 [r411174]  Sean Bright <sean@malleable.com>

	* /, res/ari/config.c: ARI: Don't complain about missing ARI users
	  when we aren't enabled Currently, if ARI is not enabled it will
	  still complain that there are no configured users. This patch
	  checks to see if ARI is enabled before logging and error or
	  iterating the container to validate the users. Review:
	  https://reviewboard.asterisk.org/r/3391/ ........ Merged
	  revisions 411173 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-25 17:40 +0000 [r411158]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip/pjsip_configuration.c, UPGRADE.txt,
	  res/res_pjsip_messaging.c, res/res_pjsip.c,
	  include/asterisk/res_pjsip.h: Add a "message_context" option for
	  PJSIP endpoints. ........ Merged revisions 411157 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-25 16:57 +0000 [r411142]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip/pjsip_options.c, res/res_pjsip.c,
	  include/asterisk/res_pjsip.h, /: res_pjsip: Fix contact
	  authenticate_qualify endpoint lookup when qualifing a contact. *
	  Fixed bad use of ao2_find() in on_endpoint(). * Replaced use of
	  find_endpoints() with find_an_endpoint() since only the first
	  found endpoint is ever needed. * Fixed qualify_contact_cb() to
	  update the contact with the aor authenticate_qualify setting.
	  Otherwise, permanent contacts in the aor type sections would have
	  a config line order dependancy. * Fixed off nominal path contact
	  ref leak in qualify_contact(). The comment saying the unref is
	  not needed was wrong. * Fixed off nominal path use of the
	  endpoint parameter if it is NULL in send_out_of_dialog_request().
	  * Added missing off nominal path unref of pjsip tdata in
	  send_out_of_dialog_request(). * Fixed off nominal path failing to
	  call the callback in send_request_cb() when the request is
	  challenged for authentication. * Eliminated silly RAII_VAR() use
	  in qualify_contact_cb(). * Updated ast_sip_send_request() doxygen
	  to better reflect reality. (closes issue ASTERISK-23254) Reported
	  by: rmudgett Review: https://reviewboard.asterisk.org/r/3381/
	  ........ Merged revisions 411141 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-25 16:06 +0000 [r411092]  Kinsey Moore <kmoore@digium.com>

	* /, channels/chan_sip.c: chan_sip: Fix incorrect use of timers If
	  update_provisional_keepalive() is called while
	  send_provisional_keepalive_full() is waiting on the PVT lock,
	  then pvt->provisional_keepalive_sched_id will be changed to a new
	  sched_id value by update_provisional_keepalive(), but that new
	  sched_id then may be overwritten with -1 by
	  send_provisional_keepalive_full(), killing the pvt's reference to
	  a schedule and "leaking" the reference. (closes issue
	  ASTERISK-22079) Review: https://reviewboard.asterisk.org/r/3368/
	  Reported by: Jamuel Starkey, Matteo, Leif Madsen, Steve Davies
	  Patches: provisional_keepalive_fix.diff uploaded by Steve Davies
	  (license 5012) ........ Merged revisions 411088 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411089 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411091 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-25 15:56 +0000 [r411090]  Jonathan Rose <jrose@digium.com>

	* /, res/res_stasis.c: ARI: Resolve a subscription leak against
	  implicit bridge subscriptions When a channel in a stasis
	  application is joined to a bridge, a subscription for that bridge
	  is created implicitly for the stasis application serving the
	  channel. Prior to this patch, subsequent removals of the channel
	  from the bridge would leave the subscription open. Review:
	  https://reviewboard.asterisk.org/r/3380/ ........ Merged
	  revisions 411086 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-25 15:47 +0000 [r411073-411087]  Richard Mudgett <rmudgett@digium.com>

	* utils/conf2ael.c, main/lock.c, utils/ael_main.c: Revert -r411073.
	  It didn't help and blew up the system.

	* utils/ael_main.c, utils/conf2ael.c, main/lock.c: locking: Add
	  temporary sanity checks. Add some temporary sanity checks to hunt
	  for locking problems with the masquerade supertest.

2014-03-24 21:39 +0000 [r411024]  Joshua Colp <jcolp@digium.com>

	* /, channels/chan_sip.c: chan_sip: Always use fromdomain if set
	  for domain, even if callerid is set to restricted. (closes issue
	  ASTERISK-20841) Reported by: Kelly Goedert ........ Merged
	  revisions 411021 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 411022 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 411023 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-21 16:04 +0000 [r410996]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_pjsip_registrar.c: res_pjsip_registrar.c:
	  Miscellaneous cleanup in rx_task(). * Fix variable shadowing of
	  'updated' by renaming it to 'contact_update'. * Checked
	  'contact_update' for ast_sorcery_copy() failure. * Removed silly
	  use of RAII_VAR() for 'contact_update'. ........ Merged revisions
	  410995 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-21 15:50 +0000 [r410981-410994]  Sean Bright <sean@malleable.com>

	* res/ael/ael.flex, utils/Makefile, pbx/pbx_ael.c,
	  res/ael/ael_lex.c: Make the AEL load process less chatty.
	  Switched a bunch of LOG_NOTICEs to ast_debug. This time without
	  breaking the build.

	* pbx/pbx_ael.c, res/ael/ael_lex.c, res/ael/ael.flex: Revert
	  r410981. aelparse blew up.

	* main/config.c: Remove a LOG_NOTICE from
	  ast_config_engine_register. There is enough indication from the
	  CLI that we are loading a realtime engine as it is.

	* pbx/pbx_ael.c, res/ael/ael_lex.c, res/ael/ael.flex: Make the AEL
	  load process less chatty. Switched a bunch of LOG_NOTICEs to
	  ast_debug.

2014-03-20 23:02 +0000 [r410967]  Jonathan Rose <jrose@digium.com>

	* apps/app_confbridge.c, /: app_confbridge: Fix bug - users with
	  startmuted set don't start muted (closes issue ASTERISK-23461)
	  Reported by: Chico Manobela Review:
	  https://reviewboard.asterisk.org/r/3373/ ........ Merged
	  revisions 410965 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410966 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-20 16:35 +0000 [r410950]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/rtp_engine.h, main/dial.c, main/manager.c, /,
	  main/channel_internal_api.c, main/core_unreal.c,
	  include/asterisk/channel.h, res/ari/resource_channels.c,
	  res/res_stasis_snoop.c: assigned-uniqueids: Miscellaneous cleanup
	  and fixes. * Fix memory leak in ast_unreal_new_channels(). Made
	  it generate the ;2 uniqueid on a stack variable instead of
	  mallocing it. * Made send error response to ARI and AMI requests
	  instead of just logging excessive uniqueid length and allowing
	  truncation. action_originate() and
	  ari_channels_handle_originate_with_id(). * Fixed minor truncating
	  uniqueid hole when generating the ;2 uniqueid string length.
	  Created public and internal lengths of uniqueid. The internal
	  length can handle a max public uniqueid plus an appended ;2. *
	  free() and ast_free() are NULL tolerant so they don't need a NULL
	  test before calling. * Made use better struct initialization
	  format instead of the position dependent initialization format.
	  Also anything not explicitly initialized in the struct is
	  initialized to zero by the compiler. * Made
	  ast_channel_internal_set_fake_ids() use the safer
	  ast_copy_string() instead of strncpy(). Review:
	  https://reviewboard.asterisk.org/r/3371/ ........ Merged
	  revisions 410949 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-19 17:27 +0000 [r410934]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_endpoint_identifier_ip.c: PJSIP: Allow for
	  identify sections to be specified in sorcery.conf. "identify" is
	  a special type of configuration object in PJSIP because unlike
	  the other objects, it is not provided by the base res_pjsip
	  module. Instead, it is provided by the
	  res_pjsip_endpoint_identifier_ip module. If using the default
	  sorcery wizard (config,criteria=type=identify) then things work
	  because the module that applies the default wizard is the correct
	  module. However, if attempting to use sorcery.conf to apply an
	  alternate wizard, it was not possible. If you attempted to
	  specify the identify object type in the res_pjsip section, then
	  the object could not be registered since the object was
	  undocumented for the res_pjsip module. There was no alternate
	  configuration section defined for it, so you were out of luck if
	  you wanted to override the default wizard. With this change, the
	  identify section will properly have a sorcery.conf-based wizard
	  applied when the identify definition is within the
	  res_pjsip_endpoint_identifier_ip section. ........ Merged
	  revisions 410933 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-19 14:25 +0000 [r410905-410919]  Joshua Colp <jcolp@digium.com>

	* res/res_stasis.c, /: res_stasis: Fix a bug where the default
	  bridge type was not set. ........ Merged revisions 410918 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* CHANGES, res/res_stasis.c, rest-api/api-docs/bridges.json, /,
	  res/ari/resource_bridges.h: res_stasis: Extend bridge type to be
	  a comma separated list of bridge attributes. This change turns
	  the bridge type field into a comma separated list of attributes.
	  These attributes include: mixing, holding, dtmf_events, and
	  proxy_media. By setting the various attributes a user can control
	  the type of bridge created with the behavior they need for their
	  application. (closes issue ASTERISK-23437) Reported by: Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/3359/ ........
	  Merged revisions 410904 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-19 02:33 +0000 [r410891]  Matthew Jordan <mjordan@digium.com>

	* res/res_ari.c, /: res_ari: Fix documentation schema error
	  ........ Merged revisions 410890 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-18 23:32 +0000 [r410877]  Rusty Newton <rnewton@digium.com>

	* res/res_ari.c, /: res_ari: Add notes about Asterisk HTTP server
	  to the "enabled" config option for the res_ari general section
	  Added note and see-also reminding user to enable the HTTP server.
	  (closes issue ASTERISK-22499) Reported by: Rusty Newton ........
	  Merged revisions 410876 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-18 15:45 +0000 [r410863]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, main/http.c: ARI: allow json content type with zero length
	  body When a request was received with a Content-type of json, the
	  body was sent for json parsing - even if it was zero length. This
	  resulted in ARI requests failing that were valid, such as a
	  channel DELETE with no parameters. The code has now been changed
	  to skip json parsing with zero content length. (closes issue
	  SWP-6748) Reported by: Samuel Galarneau Review:
	  https://reviewboard.asterisk.org/r/3360/ ........ Merged
	  revisions 410858 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-18 15:28 +0000 [r410862]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, /: cdr: Add asserts for when we don't know about a
	  CDR for a channel In the CDR core, every channel should either be
	  filtered out (due to being an 'internal' channel used as an
	  implementation detail, such as playing media back into a bridge)
	  or it should get a CDR. Even if that CDR ends up being discarded,
	  we still give the channel a CDR in case we end up needing it. If
	  we hit a situation where a channel does not have a CDR, we should
	  blow up in -dev-mode. Asserts are appropriate for that. This
	  patch adds those asserts, as they would have quickly caught the
	  error fixed by r410814. ........ Merged revisions 410861 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-18 12:45 +0000 [r410845]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/config_system.c: res_pjsip: Fix memory leak of
	  nameservers in off-nominal resolver creation failure. Thanks
	  Walter Doekes! ........ Merged revisions 410844 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-18 11:52 +0000 [r410831]  Sean Bright <sean@malleable.com>

	* res/res_fax_spandsp.c, /: res_fax_spandsp: Use g711_free() when
	  available. Per Johann Steinwendtner on the asterisk-dev mailing
	  list:
	  http://lists.digium.com/pipermail/asterisk-dev/2014-March/066102.html
	  g711_free() was introduced in spandsp 0.0.6pre4 and
	  g711_release() became a noop. I opted not to remove the call to
	  g711_release() since it is harmless and to call g711_free() if we
	  have a sufficiently recent version of spandsp. (issue
	  ASTERISK-20149) Reported by: Alexandr Gordeev ........ Merged
	  revisions 410829 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410830 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-18 02:09 +0000 [r410814]  Richard Mudgett <rmudgett@digium.com>

	* main/stasis_cache.c, /: stasis_cache: Use the right variable in
	  the cache entry ao2 cmp function. ........ Merged revisions
	  410813 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-17 22:54 +0000 [r410794-410796]  Joshua Colp <jcolp@digium.com>

	* include/asterisk/dns.h, CHANGES,
	  res/res_pjsip/include/res_pjsip_private.h, res/res_pjsip.c,
	  main/dns.c, /, res/res_pjsip/config_system.c: res_pjsip: Enable
	  PJSIP DNS client support. This change enables DNS client support
	  within PJSIP. System nameservers are automatically discovered
	  using res_init or res_ninit. If this fails then PJSIP will resort
	  to using gethostbyname for resolution. By enabling this support
	  we gain SRV support, failover, and weight support. (closes issue
	  ASTERISK-23435) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3343/ ........ Merged
	  revisions 410795 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_multihomed.c, /: res_pjsip_multihomed: Make address
	  replacement less aggressive. This change makes the
	  res_pjsip_multihomed module less aggressive when changing the
	  address in messages. It will now only occur if the transport in
	  use is bound to the any address OR if the system determined
	  source address matches the bound address of the transport in use.
	  Review: https://reviewboard.asterisk.org/r/3369/ ........ Merged
	  revisions 410793 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-17 22:24 +0000 [r410775]  Russ Meyerriecks <rmeyerreicks@digium.com>

	* /, main/callerid.c: callerid: Logic error in checksum processing
	  Callerid checksum-ing was being handled incorrectly here. When
	  the checksum is calculated to be 0x00, it will perform 0x100-0x00
	  which results in 0x100. This value will then fail the otherwise
	  correct callerid message. This patch changes the logic to simply
	  add the calculated checksum to the transmitted 2's compliment
	  checksum. Review: https://reviewboard.asterisk.org/r/3356/
	  (closes issue ASTERISK-23488) ........ This is a merge of merged
	  revisions 410750 410747 from
	  http://svn.asterisk.org/svn/asterisk/branches/12 I didn't want a
	  broken patch to be comitted to trunk so I pre-merge merged them.

2014-03-17 19:35 +0000 [r410684-410699]  Mark Michelson <mmichelson@digium.com>

	* res/res_mwi_external.c, res/res_pjsip/config_system.c,
	  configs/sorcery.conf.sample, include/asterisk/sorcery.h,
	  res/res_pjsip/pjsip_configuration.c, tests/test_sorcery_astdb.c,
	  tests/test_sorcery.c, tests/test_sorcery_realtime.c,
	  main/sorcery.c, /: Revert changes to sorcery that accidentally
	  got committed. These changes were still up for review and have
	  not been approved yet. I must have had the changes in my working
	  copy when making a different change. ........ Merged revisions
	  410696 from http://svn.asterisk.org/svn/asterisk/branches/12

	* bridges/bridge_softmix.c, tests/test_sorcery.c, main/channel.c,
	  res/res_pjsip/config_system.c, res/res_mwi_external.c,
	  include/asterisk/bridge_channel.h, funcs/func_frame_trace.c,
	  configs/sorcery.conf.sample, res/res_pjsip/pjsip_configuration.c,
	  include/asterisk/sorcery.h, tests/test_sorcery_astdb.c,
	  include/asterisk/frame.h, main/bridge_channel.c,
	  tests/test_sorcery_realtime.c, main/sorcery.c,
	  res/res_stasis_playback.c, main/frame.c, /: Fix stuck channel in
	  ARI through the introduction of synchronous bridge actions.
	  Playing back a file to a channel in an ARI bridge would attempt
	  to wait until the playback concluded before returning. The method
	  used involved signaling the waiting thread in the ARI custom
	  playback function. The problem with this is that there were some
	  corner cases that were not accounted for: * If a bridge channel
	  could not be found, then we never would attempt the playback but
	  would still attempt to wait for the playback to complete. * If
	  the bridge playfile action failed to queue, we would still
	  attempt to wait for the playback to complete. * If the bridge
	  playfile action were queued but some circumstance caused the
	  playback not to occur (the bridge dies, the channel is removed
	  from the bridge), then we would never be notified. The solution
	  to this is to move the waiting logic into the bridge code. A new
	  bridge API function is added to queue a synchronous action on a
	  bridge. The waiting thread is notified when the queued frame has
	  been freed, either due to an error occurring or due to successful
	  playback. As a failsafe, the waiting thread has a 10 minute
	  timeout just in case there is a frame leak somewhere. Review:
	  https://reviewboard.asterisk.org/r/3338 ........ Merged revisions
	  410673 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-17 16:48 +0000 [r410672]  Richard Mudgett <rmudgett@digium.com>

	* /, apps/confbridge/conf_chan_announce.c: app_confbridge: Add
	  missing destructor call to announcer channel destructor. ........
	  Merged revisions 410671 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-16 20:27 +0000 [r410651]  Matthew Jordan <mjordan@digium.com>

	* /, res/stasis/app.c: stasis/app.c: Add some extra debugging for
	  subscription counts Events are sent to a connected ARI
	  application based on the things that ARI application cares about.
	  These subscriptions can be set up implicitly - such as when that
	  ARI application creates a new object - or explicitly, via the
	  application resource's subscription operations. Debugging *why*
	  something was being sent to an application - or why something was
	  not being sent to an application - was a bit tricky, as there was
	  no debug information for the subscriptions. This patch adds some
	  debug level 3 statements that show the subscription counts for
	  applications. (Level 3 was chosen as it matches the verbose level
	  3 statements elsewhere) ........ Merged revisions 410650 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-15 15:24 +0000 [r410639]  Russell Bryant <russell@russellbryant.com>

	* include/asterisk/framehook.h: framehook.h: Fix some doc typos.
	  There were a number of instances in this header file where
	  "function all" was intended to be "function call". This patch
	  fixes that up.

2014-03-14 21:56 +0000 [r410626]  Mark Michelson <mmichelson@digium.com>

	* /, tests/test_sorcery_realtime.c: Fix failing realtime sorcery
	  tests. The store realtime callback needs to return a positive
	  value for sorcery to treat the store as a success. ........
	  Merged revisions 410625 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-14 21:36 +0000 [r410624]  Jonathan Rose <jrose@digium.com>

	* main/manager.c, /: manager: fix memory leak in manager_add_filter
	  function (closes issue ASTERISK-23420) Reported by: Etienne
	  Lessard Patches: manager_eventfilter_leak uploaded by Etienne
	  Lessard (license 6394) ........ Merged revisions 410609 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410623 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-14 20:55 +0000 [r410591-410608]  Mark Michelson <mmichelson@digium.com>

	* /, main/db.c: Remove an extra ast_cond_wait() that slipped
	  through the patch. ........ Merged revisions 410606 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410607 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/config.c, res/res_sorcery_realtime.c: Handle the return
	  values of realtime updates and stores more accurately. Realtime
	  backends' update and store callbacks return the number of rows
	  affected, or -1 if there was a failure. There were a couple of
	  issues: * The config API was treating 0 as a successful return,
	  and positive values as a failure. Now the config API treats
	  anything >= 0 as a success. * res_sorcery_realtime was treating 0
	  as a successful return from the store procedure, and any positive
	  values as a failure. Now sorcery treats anything > 0 as a
	  success. It still considers 0 a "failure" since there is no
	  change to report to observers. Review:
	  https://reviewboard.asterisk.org/r/3341 ........ Merged revisions
	  410592 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_mwi.c: Prevent conflicts regarding unsolicited
	  and solicited MWI to an endpoint. If an endpoint is receiving
	  unsolicited MWI for a mailbox and then attempts to subscribe to
	  an AOR that provides MWI for the same mailbox, then the SUBSCRIBE
	  is rejected with a 500 response. Review:
	  https://reviewboard.asterisk.org/r/3345 ........ Merged revisions
	  410590 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-14 17:56 +0000 [r410589]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, CHANGES: uniqueid: Update CHANGES to reflect new features Note
	  the new features provided by uniqueid in the CHANGES file. (issue
	  ASTERISK-23120) Review: https://reviewboard.asterisk.org/r/3316/
	  ........ Merged revisions 410588 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-14 16:42 +0000 [r410575]  Jonathan Rose <jrose@digium.com>

	* /, main/acl.c, res/res_pjsip/pjsip_configuration.c,
	  contrib/ast-db-manage/config/versions/4c573e7135bd_fix_tos_field_types.py,
	  CHANGES, res/res_pjsip/config_transport.c,
	  include/asterisk/acl.h: PJSIP: TOS values should be represented
	  as decimals in sorcery objects (closes issue ASTERISK-23235)
	  Reported by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3324/ ........ Merged
	  revisions 410574 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-14 16:19 +0000 [r410567]  Mark Michelson <mmichelson@digium.com>

	* /, main/db.c: Prevent delayed astdb syncs. The syncing thread
	  sleeps for a second before waiting to be told to attempt to sync
	  again. If a signal were sent during this sleeping period, we
	  would end up having to wait until the next sync signal occurred
	  in order to sync up the astdb. This code rearrangement also
	  ensures that any pending transactions will be synced prior to
	  Asterisk shutting down. Patches: db_sync.patch by John Hardin
	  (License #6512) ........ Merged revisions 410556 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410559 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-14 16:17 +0000 [r410560]  Jonathan Rose <jrose@digium.com>

	* res/ari/resource_bridges.c, /: ARI/bridges: Forward
	  Playback/Recording Started/Finished to bridge topic (closes issue
	  ASTERISK-23444) Reported by: Ben Merrills Review:
	  https://reviewboard.asterisk.org/r/3340/ ........ Merged
	  revisions 410558 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-14 16:01 +0000 [r410542-410557]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/app.h, /, res/res_mwi_external.c, main/app.c:
	  res_mwi_external: Clear the stasis cache entry when the external
	  MWI is deleted. One of the things missing when external MWI
	  support was added was the ability to clear the stasis cache entry
	  of deleted external MWI mailboxes. Review:
	  https://reviewboard.asterisk.org/r/3325/ ........ Merged
	  revisions 410555 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/cdr.c: cdr.c: Add missing aow_unlock(cdr) in off nominal
	  path of handle_dial_message(). * Trivial common code hoisting in
	  handle_bridge_leave_message(). * Some whitespace fixing. ........
	  Merged revisions 410541 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-13 19:33 +0000 [r410528]  Kinsey Moore <kmoore@digium.com>

	* res/stasis/control.h, res/res_stasis.c, /, res/stasis/control.c:
	  ARI: Ensure managing application receives ChannelEnteredBridge
	  messages This fixes an issue where a Stasis application running
	  over ARI and subscribed to ari/events could miss the
	  ChannelEnteredBridge event because it did not subscribe to the
	  new bridge fast enough. To accomplish this, it subscribes the
	  application controlling the channel to the new bridge before
	  adding it to that bridge which required the stasis_app_control
	  structure to maintain a reference to the stasis_app. (closes
	  issue ASTERISK-23295) Review:
	  https://reviewboard.asterisk.org/r/3336/ ........ Merged
	  revisions 410527 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-13 13:25 +0000 [r410511]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_multihomed.c, /: Multiple revisions 410509-410510
	  ........ r410509 | file | 2014-03-13 06:23:14 -0700 (Thu, 13 Mar
	  2014) | 2 lines res_pjsip_multihomed: Fix a bug where the 200 OK
	  for a REGISTER would contain the wrong contact. ........ r410510
	  | file | 2014-03-13 06:24:17 -0700 (Thu, 13 Mar 2014) | 2 lines
	  res_pjsip_multihomed: Remove change for testing fix. ........
	  Merged revisions 410509-410510 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-12 19:06 +0000 [r410492-410494]  Richard Mudgett <rmudgett@digium.com>

	* res/res_musiconhold.c, main/channel.c, /: res_musiconhold.c:
	  Generate MOH start/stop events whenever the MOH stream is
	  started/stopped. * Made res_musiconhold.c always post the
	  MusicOnHoldStart/MusicOnHoldStop events when it actually
	  starts/stops the music streams. This allows the events to always
	  happen when MOH starts/stops. The event posting code was moved to
	  the MOH alloc/release routines. * Made channel_do_masquerade()
	  stop any MOH on the original channel before masquerading so the
	  original channel will get a stop event with correct information.
	  * Cleaned up a couple odd codings in moh_files_alloc() and
	  moh_alloc() dealing with the music state variable. (issue
	  ASTERISK-23311) Reported by: Benjamin Keith Ford Review:
	  https://reviewboard.asterisk.org/r/3306/ ........ Merged
	  revisions 410493 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/confbridge/conf_state.c,
	  apps/confbridge/conf_state_single.c,
	  apps/confbridge/conf_state_inactive.c,
	  apps/confbridge/conf_state_single_marked.c, /: app_confbridge:
	  Make explicitly stop MOH if a user is kicked or hangs up while
	  MOH is playing. When MOH is playing to a user in a conference and
	  the user is kicked or hangs up from the conference then the AMI
	  MusicOnHoldStop events didn't happen. (Asterisk v11 AMI event:
	  MusicOnHold, state:Stop) (closes issue ASTERISK-23311) Reported
	  by: Benjamin Keith Ford Review:
	  https://reviewboard.asterisk.org/r/3306/ ........ Merged
	  revisions 410490 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410491 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-12 12:51 +0000 [r410452-410472]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_multihomed.c, /: res_pjsip_multihomed: Fix a bug
	  where outgoing messages for TCP would go out using UDP. This
	  change fixes a bug where the code which changes the transport did
	  not check whether the message is going out over UDP or not before
	  changing it. For TCP and TLS transports we don't need to change
	  the transport as the correct one is already chosen. ........
	  Merged revisions 410471 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_multihomed.c (added), /: res_pjsip_multihomed: Add
	  module which places the correct address within messages. Due to
	  how messages are handled within PJSIP it is not until a message
	  is actually sent that the destination is reliably known. This
	  means that the addresses placed within the message may not be of
	  the interface the message is being sent out on. This module
	  determines what interface a message is being sent on and updates
	  the message to contain the correct address if applicable. This
	  module was tested by myself in a virtualized environment with
	  multiple interfaces and also by Kinsey Moore in the following
	  configuration: Networks: * 10.24.16.0/21 ** hard phone ** default
	  gateway * 10.24.64.0/21 ** softphone with pjsip-based stack
	  Transport details: bind address: 0.0.0.0 protocol: UDP All
	  endpoints were tested with explicitly configured transports and
	  unconfigured transports. This was tested with inbound and
	  outbound calls, both of which were experiencing detrimental
	  effects from incorrect IP addresses in SIP messages. These
	  effects were only experienced by the soft phone on the 10.24.64.0
	  network since the messages to the hard phone on the 10.24.16.0
	  network had the correct IP address. (closes issue ASTERISK-23020)
	  Reported by: xrobau Review:
	  https://reviewboard.asterisk.org/r/3102/ ........ Merged
	  revisions 410451 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-10 17:21 +0000 [r410395]  Richard Mudgett <rmudgett@digium.com>

	* /, main/http.c: AST-2014-001: Stack overflow in HTTP processing
	  of Cookie headers. Sending a HTTP request that is handled by
	  Asterisk with a large number of Cookie headers could overflow the
	  stack. Another vulnerability along similar lines is any HTTP
	  request with a ridiculous number of headers in the request could
	  exhaust system memory. (closes issue ASTERISK-23340) Reported by:
	  Lucas Molas, researcher at Programa STIC, Fundacion; and Dr.
	  Manuel Sadosky, Buenos Aires, Argentina ........ Merged revisions
	  410380 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 410381 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410383 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-10 16:33 +0000 [r410369]  Scott Griepentrog <sgriepentrog@digium.com>

	* res/ari/resource_channels.c, main/manager.c, /: unqiueid: correct
	  max uniqueid length test This patch adds null string test prior
	  to checking for a max uniqueid value that was added in r410157.
	  ........ Merged revisions 410368 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-10 13:30 +0000 [r410346]  Kinsey Moore <kmoore@digium.com>

	* /, channels/chan_sip.c: AST-2014-002: chan_sip: Exit early on bad
	  session timers request This change allows chan_sip to avoid
	  creation of the channel and consumption of associated file
	  descriptors altogether if the inbound request is going to be
	  rejected anyway. (closes issue ASTERISK-23373) Reported by: Corey
	  Farrell Patches: chan_sip-earlier-st-1.8.patch uploaded by Corey
	  Farrell (license 5909) chan_sip-earlier-st-11.patch uploaded by
	  Corey Farrell (license 5909) ........ Merged revisions 410308
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 410311 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410329 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-10 12:53 +0000 [r410307]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/pjsip_options.c, res/res_pjsip.c: AST-2014-003:
	  res_pjsip: When handling 401/407 responses don't assume a request
	  will have an endpoint. This change removes the assumption that an
	  outgoing request will always have an endpoint and makes the
	  authenticate_qualify option work once again. (closes issue
	  ASTERISK-23210) Reported by: Joshua Colp ........ Merged
	  revisions 410306 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-08 16:50 +0000 [r410288]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip/config_auth.c, /, res/res_pjsip/location.c,
	  res/res_pjsip_outbound_registration.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  include/asterisk/res_pjsip_cli.h, include/asterisk/sorcery.h,
	  res/res_pjsip/pjsip_cli.c, res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/config_transport.c, main/sorcery.c,
	  include/asterisk/res_pjsip.h: pjsip_cli: Create pjsip show
	  channel and contact, and general cli code cleanup. Created the
	  'pjsip show channel' and 'pjsip show contact' commands.
	  Refactored out the hated ast_hashtab. Replaced with
	  ao2_container. Cleaned up function naming. Internal only, no
	  public name changes. Cleaned up whitespace and brace formatting
	  in cli code. Changed some NULL checking from "if"s to
	  ast_asserts. Fixed some register/unregister ordering to reduce
	  deadlock potential. Fixed ast_sip_location_add_contact where the
	  'name' buffer was too short. Fixed some self-assignment issues in
	  res_pjsip_outbound_registration. (closes issue ASTERISK-23276)
	  Review: http://reviewboard.asterisk.org/r/3283/ ........ Merged
	  revisions 410287 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-08 15:45 +0000 [r410275]  Matthew Jordan <mjordan@digium.com>

	* /, res/ari/resource_channels.c: resource_channels: Check if a
	  passed in ID is NULL before checking its length Calling strlen on
	  a NULL string is explosive. This patch checks whether or not the
	  passed in string is NULL or zero length before checking to see if
	  the string is too long. ........ Merged revisions 410274 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 22:56 +0000 [r410227]  Corey Farrell <git@cfware.com>

	* /, channels/chan_sip.c: chan_sip: Fix deadlock of monlock between
	  unload_module and do_monitor Release monlock before calling
	  pthread_join. This ensures do_monitor cannot freeze by locking
	  monlock during module unload. (closes issue ASTERISK-21406)
	  Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3284/ ........ Merged
	  revisions 410224 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 410225 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410226 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 22:08 +0000 [r410212]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, include/asterisk/sorcery.h: sorcery: correct field register
	  argument list This fixes mistakes I previously made in merging
	  gtjoseph's changes with mine. ........ Merged revisions 410211
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 21:54 +0000 [r410208-410210]  Matthew Jordan <mjordan@digium.com>

	* /, main/config_options.c: config_options: Display the see-also
	  information for CLI config option help The config option help
	  information has always parsed the <see-also> tags in the XML
	  documentation. Unfortunately, it just never bothered displaying
	  them on the CLI. With this patch, when you execute 'config show
	  help [module] [obj] [option]', it will display what other options
	  are useful to you. (closes issue ASTERISK-22008) Reported by:
	  Richard Mudgett ........ Merged revisions 410209 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip.c, /: res_pjsip: Fix documentation for one touch
	  recording see-also links The one touch recording options have
	  several see-also links between the various configuration options.
	  These were 'broken' by the snake casing of those options. This
	  patch corrects the see-also links such that they reference the
	  correct option names. ........ Merged revisions 410194 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 21:23 +0000 [r410207]  Mark Michelson <mmichelson@digium.com>

	* main/sorcery.c, res/res_sorcery_realtime.c, /,
	  include/asterisk/sorcery.h, tests/test_sorcery_realtime.c: Make
	  res_sorcery_realtime filter unknown retrieved results. When
	  retrieving data from a database or other realtime backend, it's
	  quite possible to retrieve variables that Asterisk does not care
	  about but that are legitimate to exist. Asterisk does not need to
	  throw a hissy fit when these variables are encountered but rather
	  just filter them out. Review:
	  https://reviewboard.asterisk.org/r/3305 ........ Merged revisions
	  410187 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 21:11 +0000 [r410191]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/sorcery.c, /, include/asterisk/sorcery.h,
	  res/res_pjsip/pjsip_configuration.c: pjsip: allow and disallow
	  show same codecs In order to prevent confusion over the allow and
	  disallow list of codecs being the same an option for registering
	  a field as an alias is added. The alias field will be read from
	  the configuration file, but afterwards is not listed as a known
	  field. With disallow set as an alias, the CLI command pjsip show
	  endpoint # will list the allow= field, but not the disallow
	  field. (closes issue ASTERISK-23092) Review:
	  https://reviewboard.asterisk.org/r/3193/ ........ Merged
	  revisions 410190 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 20:41 +0000 [r410174-410185]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/devicestate.h, main/stasis_cache.c,
	  main/stasis_message.c, /, tests/test_devicestate.c,
	  include/asterisk/stasis.h, main/app.c, main/devicestate.c,
	  tests/test_stasis.c: stasis cache: Enhance to keep track of an
	  item from different entities. A stasis cache entry now contains
	  more than a single message/snapshot. It contains
	  messages/snapshots for the local entity as well as any remote
	  entities that post to the cached item. In addition callbacks can
	  be supplied when the cache is created to compute and post the
	  aggregate message/snapshot representing all entities stored in
	  the cache entry. * All stasis messages now have an eid to
	  indicate what entity posted it. * The stasis cache enhancements
	  allow device state to cache and aggregate the device states from
	  local and remote entities in a single operation. The cached
	  aggregate device state is available immediately after it is
	  posted to the stasis bus. This improves performance by
	  eliminating a cache dump and associated ao2 container traversals
	  to calculate the aggregate state. (closes issue ASTERISK-23204)
	  Reported by: Mark Michelson Review:
	  https://reviewboard.asterisk.org/r/3281/ ........ Merged
	  revisions 410184 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* tests/test_cel.c, channels/sig_pri.c, channels/sig_ss7.c,
	  include/asterisk/bridge.h, tests/test_cdr.c, channels/sig_pri.h,
	  channels/chan_dahdi.c, channels/sig_ss7.h, /: uniqueid: Fix
	  chan_dahdi, sig_pri, sig_ss7, test_cdr, and test_cel compiler
	  errors. (issue ASTERISK-23120) ........ Merged revisions 410171
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 15:47 +0000 [r410158]  Scott Griepentrog <sgriepentrog@digium.com>

	* tests/test_cdr.c, res/res_clioriginate.c, res/res_ari_bridges.c,
	  tests/test_substitution.c, res/res_stasis_playback.c,
	  channels/chan_multicast_rtp.c, apps/app_meetme.c, /,
	  main/bridge_basic.c, include/asterisk/channel_internal.h,
	  tests/test_app.c, apps/confbridge/conf_chan_record.c,
	  main/core_unreal.c, channels/chan_gtalk.c,
	  include/asterisk/stasis_app_playback.h,
	  res/ari/resource_bridges.c, channels/chan_jingle.c,
	  channels/chan_phone.c, pbx/pbx_spool.c,
	  res/ari/resource_bridges.h, res/parking/parking_tests.c,
	  channels/chan_motif.c, apps/app_confbridge.c,
	  res/ari/resource_channels.c, include/asterisk/pbx.h,
	  res/res_stasis.c, include/asterisk/bridge.h,
	  apps/app_voicemail.c, res/ari/resource_channels.h,
	  apps/app_dial.c, res/res_calendar_exchange.c,
	  channels/chan_vpb.cc, apps/app_page.c, apps/app_chanisavail.c,
	  include/asterisk/dial.h, main/core_local.c,
	  res/parking/parking_bridge_features.c,
	  tests/test_stasis_endpoints.c, res/parking/parking_bridge.c,
	  channels/chan_skinny.c, include/asterisk/stasis_app_snoop.h,
	  addons/chan_mobile.c, main/bridge_channel.c,
	  channels/chan_pjsip.c, channels/chan_mgcp.c,
	  channels/chan_unistim.c, main/pbx.c,
	  res/res_calendar_icalendar.c, main/ccss.c,
	  channels/chan_bridge_media.c, main/bridge.c,
	  tests/test_stasis_channels.c, apps/app_bridgewait.c,
	  apps/app_originate.c, res/res_calendar_caldav.c,
	  include/asterisk/channel.h, res/parking/parking_applications.c,
	  apps/app_followme.c, main/cel.c, apps/app_queue.c,
	  res/res_ari_channels.c, res/res_calendar_ews.c,
	  rest-api/api-docs/bridges.json, main/dial.c,
	  channels/chan_dahdi.c, channels/chan_h323.c, tests/test_cel.c,
	  rest-api/api-docs/channels.json,
	  include/asterisk/bridge_internal.h,
	  apps/confbridge/conf_chan_announce.c, res/res_calendar.c,
	  include/asterisk/core_unreal.h, addons/chan_ooh323.c,
	  res/stasis/control.c, channels/chan_sip.c,
	  main/channel_internal_api.c, include/asterisk/stasis_app.h,
	  res/res_stasis_snoop.c, channels/chan_console.c,
	  channels/chan_iax2.c, channels/chan_oss.c, apps/app_agent_pool.c,
	  main/channel.c, main/manager.c, channels/chan_misdn.c,
	  tests/test_voicemail_api.c, channels/chan_alsa.c,
	  channels/chan_nbs.c, main/message.c: uniqueid: channel linkedid,
	  ami, ari object creation with id's Much needed was a way to
	  assign id to objects on creation, and much change was necessary
	  to accomplish it. Channel uniqueids and linkedids are split into
	  separate string and creation time components without breaking
	  linkedid propgation. This allowed the uniqueid to be specified by
	  the user interface - and those values are now carried through to
	  channel creation, adding the assignedids value to every function
	  in the chain including the channel drivers. For local channels,
	  the second channel can be specified or left to default to a ;2
	  suffix of first. In ARI, bridge, playback, and snoop objects can
	  also be created with a specified uniqueid. Along the way, the
	  args order to allocating channels was fixed in chan_mgcp and
	  chan_gtalk, and linkedid is no longer lost as masquerade occurs.
	  (closes issue ASTERISK-23120) Review:
	  https://reviewboard.asterisk.org/r/3191/ ........ Merged
	  revisions 410157 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-07 05:04 +0000 [r410108]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: chan_sip: Allow static realtime members
	  to be qualified during module load. When a static realtime peer
	  with qualify=yes is loaded, Asterisk will fail to send an OPTIONS
	  request due to the lastms being equal to 0. This results in the
	  peer being unable to receive calls from Asterisk because the
	  status is permanently UNKNOWN. This patch allows an OPTIONS
	  request to be sent during module load by ignoring the lastms
	  value on startup only. Review:
	  https://reviewboard.asterisk.org/r/3294/ (closes issue
	  ASTERISK-17523) Reported by: Maciej Krajewski Tested by:
	  wushumasters patches: realtime_fix_11.7.0.txt uploaded by Trevor
	  Peirce (license 6112) ........ Merged revisions 410105 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 410106 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410107 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-06 23:47 +0000 [r410092]  Richard Mudgett <rmudgett@digium.com>

	* main/sorcery.c, /: sorcery.c: Fix off-nominal path ref and memory
	  leak in ast_sorcery_objectset_json_create(). * Made exit a loop
	  early on error in ast_sorcery_objectset_json_create(). * Removed
	  some dead code in ast_sorcery_objectset_create2(). ........
	  Merged revisions 410089 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-06 23:43 +0000 [r410091]  Russell Bryant <russell@russellbryant.com>

	* /, res/res_musiconhold.c: moh: fix a refcount error with realtime
	  MOH I observed a crash in res_musiconhold on an Asterisk 11
	  system using realtime MOH. Investigation of the backtrace showed
	  a corrupt mohclass, implying that it got destroyed before the
	  code expected it to. I went looking for reference counting errors
	  that could have caused this crash and this patch this result. It
	  contains 2 changes. 1) Remove a usless block of code that was
	  impossible to reach. There was even a comment indicating that it
	  was impossible to reach. The conditional includes
	  "!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's
	  inside of an if block with the opposite check
	  "ast_test_flag(global_flags, MOH_CACHERTCLASSES)". There's no
	  good reason to keep it around. 2) A similar block to #1 contained
	  a reference counting error. It stores state->class in the local
	  variable mohclass without increasing its reference count. The
	  reference count on mohclass is decremented at the end of the
	  function. This block of code probably very rarely runs, which
	  would help explain why this system was working fine for many
	  months before experiencing a crash. Review:
	  https://reviewboard.asterisk.org/r/3282/ ........ Merged
	  revisions 410043 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 410044 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 410090 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-06 22:39 +0000 [r410042]  George Joseph <george.joseph@fairview5.com>

	* res/res_pjsip/config_auth.c, funcs/func_sorcery.c (added),
	  res/res_pjsip/location.c, res/res_pjsip_outbound_registration.c,
	  main/bucket.c, res/res_pjsip_endpoint_identifier_ip.c,
	  include/asterisk/config.h, include/asterisk/sorcery.h,
	  res/res_pjsip/pjsip_configuration.c, res/res_pjsip_acl.c,
	  CHANGES, tests/test_sorcery.c, res/res_pjsip/config_transport.c,
	  main/config.c, main/sorcery.c: sorcery: Create AST_SORCERY
	  dialplan function. This patch creates the AST_SORCERY dialplan
	  function which allows someone to retrieve any value from a
	  sorcery-based config file. It's similar to AST_CONFIG. The
	  creation of the function itself was fairly straightforward but it
	  required changes to the underlying sorcery infrastructure that
	  rippled into individual sorcery objects. The changes stemmed from
	  inconsistencies in how sorcery created ast_variable objectsets
	  from sorcery objects and the inconsistency in how individual
	  objects used that feature especially when it came to parameters
	  that can be specified multiple times like contact in aor and
	  match in identify. You can read more here...
	  http://lists.digium.com/pipermail/asterisk-dev/2014-February/065202.html
	  So, what this patch does, besides actually creating the
	  AST_SORCERY function, is the following... * Creates
	  ast_variable_list_append which is a helper to append one
	  ast_variable list to another. * Modifies the
	  ast_sorcery_object_field_register functions to accept the
	  already-defined sorcery_fields_handler callback. * Modifies
	  ast_sorcery_objectset_create to accept a parameter indicating
	  return type preference...a single ast_variable with all values
	  concatenated or an ast_variable list with multiple entries. Also
	  fixed a few bugs. * Modifies individual sorcery object
	  implementations to use the new function definition of the
	  ast_sorcery_object_field_register functions. * Modifies
	  location.c and res_pjsip_endpoint_identifier_ip.c to implement
	  sorcery_fields_handler handlers so they return multiple
	  occurrences as an ast_variable_list. * Added a whole bunch of
	  tests to test_sorcery. (closes issue ASTERISK-22537) Review:
	  http://reviewboard.asterisk.org/r/3254/

2014-03-06 19:04 +0000 [r410029]  Jonathan Rose <jrose@digium.com>

	* include/asterisk/acl.h, /, main/acl.c,
	  res/res_pjsip/pjsip_configuration.c, UPGRADE.txt,
	  contrib/ast-db-manage/config/versions/4c573e7135bd_fix_tos_field_types.py
	  (added), res/res_pjsip/config_transport.c: pjsip configuration:
	  Make transport TOS values consistent with endpoints Transport TOS
	  values were interpreted as DSCP values without being documented
	  as such. Endpoint TOS values (tos_audio/tos_video) behaved
	  normally as TOS values have historically. This patch makes the
	  transport TOS values behave as TOS values and makes all TOS
	  values readable as string values (e.g. AF11). In addition,
	  alembic scripts have been updated to use the proper field types
	  for all TOS/COS values. (issue ASTERISK-23235) Reported by:
	  George Joseph Review: https://reviewboard.asterisk.org/r/3304/
	  ........ Merged revisions 410028 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-06 18:20 +0000 [r410027]  Joshua Colp <jcolp@digium.com>

	* res/ari/resource_channels.c, CHANGES,
	  res/ari/ari_model_validators.c,
	  rest-api/api-docs/recordings.json, res/ari/resource_bridges.c,
	  res/ari/ari_model_validators.h, /,
	  include/asterisk/stasis_app_recording.h,
	  res/res_stasis_recording.c: res_stasis_recording: Add a
	  "target_uri" field to recording events. This change adds a
	  target_uri field to the live recording object. It contains the
	  URI of what is being recorded. (closes issue ASTERISK-23258)
	  Reported by: Ben Merrills Review:
	  https://reviewboard.asterisk.org/r/3299/ ........ Merged
	  revisions 410025 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-06 15:58 +0000 [r410012]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_mwi.c, /: Don't attempt to link in an aggregate MWI
	  subscription if an endpoint does not aggregate MWI. Attempting to
	  link a NULL object into an ao2 container had been benign
	  previously, but since enabling DO_CRASH in the testsuite, this is
	  now causing a crash. It's better to be right here anyway.
	  ........ Merged revisions 410011 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-06 02:22 +0000 [r409996]  Matthew Jordan <mjordan@digium.com>

	* res/res_fax_spandsp.c, /: res_fax_spandsp: Fix crash when passing
	  ulaw/alaw data to spandsp When acting as a T.38 fax gateway,
	  res_fax_spandsp would at times cause a crash in libspandsp. This
	  would occur when, during fax tone detection, a ulaw/alaw frame
	  would be passed to modem_connect_tones_rx. That particular
	  routine expects the data to be in slin format. This patch looks
	  at the frame type and, if the data is ulaw/alaw, converts the
	  format to slin before passing it to modem_connect_tones_rx.
	  Review: https://reviewboard.asterisk.org/r/3296 (closes issue
	  ASTERISK-20149) Reported by: Alexandr Gordeev Tested by: Michal
	  Rybarik patches: spandsp_g711decode.diff uploaded by Michal
	  Rybarik (license 6578) ........ Merged revisions 409990 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409991 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-06 00:33 +0000 [r409970-409977]  Richard Mudgett <rmudgett@digium.com>

	* apps/confbridge/conf_state_multi.c,
	  apps/confbridge/conf_state_inactive.c, /: app_confbridge: Remove
	  some noop code. ........ Merged revisions 409976 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_musiconhold.c: res_musiconhold.c: Remove some
	  unnecessary RAII_VAR() usage. * Made the moh_register() define
	  use useful parameter names. ........ Merged revisions 409967 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-05 20:41 +0000 [r409904-409919]  Kinsey Moore <kmoore@digium.com>

	* main/config.c, /: config: Fix inverted test The test of the
	  result of the stat() call was inverted such that its output was
	  only used if the call failed. This inverts the test so that the
	  output of stat() is used correctly. This was causing full reloads
	  on unchanged files. (closes issue ASTERISK-23383) Reported by:
	  David Woolley ........ Merged revisions 409916 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409917 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409918 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* bridges/bridge_native_rtp.c, /: bridge_native_rtp: Fix crash
	  involving masquerade It is possible for a channel to be
	  masqueraded out of a bridge which means it may no longer have RTP
	  glue to check upon leaving said bridge. If this situation
	  occurred (it's possible at least during dial and call pickup)
	  then Asterisk would crash. This change makes sure the glue is
	  checked before use. (closes issue AST-1290) Reported by: John
	  Bigelow ........ Merged revisions 409900 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-05 18:51 +0000 [r409889]  Richard Mudgett <rmudgett@digium.com>

	* contrib/ast-db-manage/cdr/versions,
	  contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py,
	  /,
	  contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py
	  (added), contrib/ast-db-manage/cdr.ini.sample (added),
	  contrib/ast-db-manage/cdr/env.py, contrib/ast-db-manage/cdr
	  (added), contrib/ast-db-manage/cdr/script.py.mako: alembic: Add
	  missing queue and CDR table creation scripts. * Added the queues
	  and queue_members tables to the config alembic scripts. * Added
	  the CDR table alembic creation script. The CDR table is more of
	  an example for new setups since the actual table can be fully
	  customized in cdr_adaptive_odbc.conf. (closes issue
	  ASTERISK-23233) Reported by: jmls Review:
	  https://reviewboard.asterisk.org/r/3227/ ........ Merged
	  revisions 409885 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-05 18:47 +0000 [r409888]  Mark Michelson <mmichelson@digium.com>

	* funcs/func_presencestate.c, /: Fix documentation for
	  PRESENCE_STATE to properly illustrate how to create a presence
	  hint. There was a missing comma. This was discovered by Dan
	  Kaplan. ........ Merged revisions 409886 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409887 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-05 16:58 +0000 [r409836]  David M. Lee <dlee@digium.com>

	* main/config.c, /, configure, include/asterisk/autoconfig.h.in,
	  configure.ac: Corrected cross-platform stat nanosecond code When
	  nanosecond time resolution was added for identifying config file
	  changes, it didn't cover all of the myriad of ways that one might
	  obtain nanosecond time resolution off of struct stat. Rather than
	  complicate the #if even further figuring out one system from the
	  next, this patch directly tests for the three struct members I
	  know about today, and #ifdef's accordingly. Review:
	  https://reviewboard.asterisk.org/r/3273/ ........ Merged
	  revisions 409833 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409834 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409835 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-05 16:26 +0000 [r409831-409832]  Moises Silva <moises.silva@gmail.com>

	* res/res_http_websocket.c: Fix res/res_http_websocket.c build
	  failure in 32bit due to incorrect print format for uint64_t

	* res/res_http_websocket.c, /: Fix WebRTC over WSS not working
	  Several fixes for the WebSockets implementation in
	  res/res_http_websocket.c * Flush the websocket session FILE* as
	  fwrite() may not actually guarantee sending the data to the
	  network. If we do not flush, it seems that buffering on the SSL
	  socket for outbound messages causes issues * Refactored
	  ast_websocket_read to take into account that SSL file descriptors
	  may be ready to read via fread() but poll() will not actually say
	  so because the data was already read from the network buffers and
	  is now in the libc buffers (closes issue ASTERISK-23099) (closes
	  issue ASTERISK-21930) Review:
	  https://reviewboard.asterisk.org/r/3248/ ........ Merged
	  revisions 409681 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409697 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-05 12:06 +0000 [r409780]  Sean Bright <sean@malleable.com>

	* contrib/scripts/astgenkey, contrib/scripts/astgenkey.8, /: Fix
	  references to 'keys' CLI commands in astgenkey ........ Merged
	  revisions 409777 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409778 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409779 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-05 06:17 +0000 [r409747]  Igor Goncharovskiy <igor.goncharovsky@gmail.com>

	* channels/chan_unistim.c: Add update_peer function to
	  unistim_rtp_glue, improve other unistim_rtp_glue functions
	  conforming to other channel drivers. Do not forget auto-detected
	  and user-selected phone settings on 'unistim reload' ........
	  Merged revisions 409705 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409745 from
	  http://svn.asterisk.org/svn/asterisk/branches/11

2014-03-05 01:05 +0000 [r409683]  Richard Mudgett <rmudgett@digium.com>

	* /, include/asterisk/stasis_internal.h: stasis: Made
	  internal_stasis_subscribe() prototype and definition match
	  exactly. ........ Merged revisions 409682 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-04 19:34 +0000 [r409627]  Michael L. Young <elgueromexicano@gmail.com>

	* funcs/func_audiohookinherit.c, /: func_audiohookinheritance:
	  Check If A Channel Was Specified This patch prevents a crash when
	  using the function audiohookinheritance without setting the
	  channel. (closes issue ASTERISK-23104) Reported by: Joel Vandal
	  Tested by: Joel Vandal Patches:
	  asterisk-23104_audiohook_inherit_no_channel-11.diff uploaded by
	  Michael L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/3272/ ........ Merged
	  revisions 409623 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409625 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409626 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-04 17:22 +0000 [r409587]  Jonathan Rose <jrose@digium.com>

	* /, res/res_rtp_asterisk.c: res_rtp_asterisk: Fix one way audio
	  problems with hold/unhold when using ICE ICE sessions will now be
	  restarted if sessions are changed to use new sets of remote
	  candidates. (closes issue ASTERISK-22911) Reported by: Vytis
	  Valentinavičius Review: https://reviewboard.asterisk.org/r/3275/
	  ........ Merged revisions 409565 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409570 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-04 16:55 +0000 [r409569]  Kinsey Moore <kmoore@digium.com>

	* /, main/astobj2.c: AO2: Add an assert for bad objects This adds
	  an assert that will only be active if Asterisk is compiled with
	  DO_CRASH and allows the testsuite to fail tests that would
	  otherwise require log file parsing. ........ Merged revisions
	  409566 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 409567 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409568 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-04 14:55 +0000 [r409475]  Sean Bright <sean@malleable.com>

	* /, channels/chan_sip.c: Minor whitespace change to 'sip show
	  peers' output. (closes issue ASTERISK-23406) Reported by: ibercom
	  Tested by: ibercom Patches: asterisk-11.patch uploaded by ibercom
	  ........ Merged revisions 409472 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409473 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409474 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-03 19:44 +0000 [r409423]  Joshua Colp <jcolp@digium.com>

	* /, res/res_stasis_recording.c: res_stasis_recording: Fix memory
	  leak of the absolute name. ........ Merged revisions 409422 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-03 02:08 +0000 [r409364]  Matthew Jordan <mjordan@digium.com>

	* main/asterisk.c, /: doxygen: Tweak the link back to ye olde
	  Digium website ........ Merged revisions 409361 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409362 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409363 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-02 17:03 +0000 [r409350]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* /, Makefile.rules: Makefile: replace -O6 with -O3 -O6 is not a
	  legal option of gcc. Unofficially gcc considers it to be
	  equivalent of -O3. clang chalks on it, though. This commit sets
	  the default optimization flag to be -O3, like gcc actually
	  considered it. Review: https://reviewboard.asterisk.org/r/3280/
	  ........ Merged revisions 409308 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409344 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409346 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-01 20:28 +0000 [r409288]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.c, /: res_pjsip_session: Set options
	  (100rel, timers) on incoming sessions. This change passes options
	  to the UAS creation function. This in turn sets up 100rel and
	  session timer properties on the incoming session. Reported by
	  Julian Russell on asterisk-users mailing list. ........ Merged
	  revisions 409287 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-03-01 00:05 +0000 [r409257-409275]  Richard Mudgett <rmudgett@digium.com>

	* /, main/devicestate.c: devicestate.c: Simplified some logic in
	  _ast_device_state(). ........ Merged revisions 409274 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis_cache.c, /: stasis_cache.c: Remove some unnecessary
	  RAII_VAR() usage. ........ Merged revisions 409272 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis.c, /: stasis.c: Misc code cleanups. * Remove some
	  unnecessary RAII_VAR() usage. * Made the struct
	  stasis_subscription ao2 object use the ao2 lock instead of a
	  redundant join_lock in the struct for ast_cond_wait(). * Removed
	  locks on some ao2 objects that don't need the lock. * Made the
	  topic pool entries container use the ao2 template functions. *
	  Add some missing allocation failure checks. * Add missing cleanup
	  in off nominal path of dispatch_message(). ........ Merged
	  revisions 409270 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: chan_sip: Add precautionary p->owner
	  checks. * Add precautionary p->owner checks in sip_hangup(),
	  get_refer_info(), get_also_info(), and
	  interpret_t38_parameters(). * Simplify some tangled logic in
	  get_refer_info(), get_also_info(), and add_rpid(). * Removed some
	  dead code in handle_request_invite(). (closes issue
	  ASTERISK-23323) Reported by: Walter Doekes Patches:
	  issueA23323-more_p_owner_checks-1.8.x.patch (license #5674)
	  uploaded by wdoekes (modified)
	  issueA23323-more_p_owner_checks-11.x.patch (license #5674)
	  uploaded by wdoekes (modified)
	  issueA23323-more_p_owner_checks-12.x.patch (license #5674)
	  uploaded by wdoekes (modified)
	  issueA23323-more_p_owner_checks-trunk.patch (license #5674)
	  uploaded by wdoekes (modified) ........ Merged revisions 409207
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 409255 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409256 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-28 21:24 +0000 [r409237]  Kinsey Moore <kmoore@digium.com>

	* apps/app_queue.c, /: app_queue: Fix documented AMI event name
	  During the rewrite of AMI events to use the Stasis bus, the name
	  of the QueueMemberPaused event was changed to QueueMemberPause.
	  This corrects documentation to reflect that. ........ Merged
	  revisions 409234 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-28 18:03 +0000 [r409159]  Richard Mudgett <rmudgett@digium.com>

	* /, channels/chan_sip.c: chan_sip: Fix crash in
	  ast_channel_hangupcause_set(). * Fix crash in
	  ast_channel_hangupcause_set() because p->owner not checked before
	  calling. Regression introduced by the fix for ASTERISK-22621.
	  (closes issue ASTERISK-23135) Reported by: OK (issue
	  ASTERISK-23323) Reported by: Walter Doekes ........ Merged
	  revisions 409156 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409157 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409158 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-27 19:54 +0000 [r409132]  Jonathan Rose <jrose@digium.com>

	* res/res_rtp_asterisk.c, /: Multiple revisions 409129-409130
	  ........ r409129 | jrose | 2014-02-27 13:19:02 -0600 (Thu, 27 Feb
	  2014) | 15 lines res_rtp_asterisk: Fix checklist creating
	  problems in ICE sessions Prior to this patch, local candidate
	  lists including SRFLX would fail to start properly when building
	  ICE candidate check lists. This patch fixes that problem by
	  making sure that each SRFLX candidate is associated with the
	  proper base address so that the check list can create matches
	  properly. This patch was written by jcolp. The issue will be left
	  open to await testing by the issue participants. (issue
	  ASTERISK-23213) Reported by: Andrea Suisani Review:
	  https://reviewboard.asterisk.org/r/3256/ ........ r409130 | jrose
	  | 2014-02-27 13:38:10 -0600 (Thu, 27 Feb 2014) | 8 lines
	  res_rtp_asterisk: correct build error from r409129 Accidentally
	  placed a declaration below functional code (issue ASTERISK-23213)
	  Reported by: Andrea Suisani Review:
	  https://reviewboard.asterisk.org/r/3256/ ........ Merged
	  revisions 409129-409130 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409131 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-27 16:26 +0000 [r409091]  David M. Lee <dlee@digium.com>

	* utils/astman.c, /: Fix memory stomping bug in astman. This memset
	  complained in dev mod on my Ubuntu box. The memset is both
	  unnecessary and dangerous. At this point, m hasn't been
	  initialized yet, so the memset will write off to whatever address
	  happens to be on the stack at the time. ........ Merged revisions
	  409077 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 409083 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409087 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-27 16:08 +0000 [r409055]  Corey Farrell <git@cfware.com>

	* /, configs/res_fax.conf.sample: res_fax: Comment out default
	  settings from res_fax.conf. Comment out many settings in
	  res_fax.conf.sample. The defaults are set in res_fax.c, so
	  setting the same value in sample config does nothing but make the
	  sample config more fragile. (closes issue ASTERISK-23231)
	  Reported by: David Brillert Review:
	  https://reviewboard.asterisk.org/r/3261/ ........ Merged
	  revisions 409052 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 409053 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 409054 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-27 12:29 +0000 [r409000]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_pjsip_sdp_rtp.c: res_pjsip_sdp_rtp: Apply
	  packetization rules on inbound SDP handling The setting
	  'use_ptime' is supposed to tell Asterisk to honour the ptime
	  attribute in an offer, preferring it to whatever packetization
	  preferences have been set internally. Currently, however,
	  something rather quirky will happen: (1) The SDP answer will be
	  constructed in create_outgoing_sdp_stream. This will use the
	  preferences from the endpoint, such that the 200 OK response will
	  add the packetization preferences from the endpoint, and not what
	  was offered. (2) When the 200 response is issued,
	  apply_negotiated_sdp_stream is called. This will call
	  apply_packetization, which will use the ptime attribute from the
	  offer internally. We end up telling the offerer to use the
	  internal ptime attribute, but we end up using the offered ptime
	  attribute. Hilarity ensues. This patch modifies the behaviour by
	  calling apply_packetization from negotiate_incoming_sdp_stream,
	  which is called prior to create_outgoing_sdp_stream. This causes
	  the format preferences on the session's media object to be set to
	  the inbound ptime value (if 'use_ptime' is enabled), such that
	  the construction of the answer gets the right value immediately.
	  Review: https://reviewboard.asterisk.org/r/3244/ ........ Merged
	  revisions 408999 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-26 23:35 +0000 [r408984]  Richard Mudgett <rmudgett@digium.com>

	* /, tests/test_stasis.c: test_stasis.c: Misc cleanups. * Make the
	  consumer ao2 object use the ao2 lock instead of a redundant lock
	  in the struct for ast_cond_wait(). * Fixed some curly brace
	  placements. * Fixed use of malloc(0). malloc(0) has variant
	  behavior. It is up to the implementation to determine if it
	  returns NULL or a valid pointer that can be later passed to
	  free(). ........ Merged revisions 408983 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-26 19:00 +0000 [r408971]  Scott Griepentrog <sgriepentrog@digium.com>

	* channels/chan_pjsip.c, /: pjsip: avoid edge case potential crash
	  in answer() When accidentally compiling against a wrong version
	  of pjsip headers with a different pjsip_inv_session size, the
	  invite_tsx structure could be null in the answer() function. This
	  led to a crash because it attempted to send the session response
	  with an uninitialized packet pointer. This patch presets packet
	  to null and adds a diagnostic log message to explain why the call
	  fails. Review: https://reviewboard.asterisk.org/r/3267/ ........
	  Merged revisions 408970 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-26 17:04 +0000 [r408958]  Joshua Colp <jcolp@digium.com>

	* res/res_ari.c, /: res_ari: Make some additional error responses
	  consistent with the rest of the system. This change makes some
	  error cases use ast_ari_response_error to construct their error
	  responses instead of manually doing it. This ensures they are
	  consistent with the other error responses. Based on the original
	  patch as done by Paul Belanger on the associated review. Review:
	  https://reviewboard.asterisk.org/r/2904/ ........ Merged
	  revisions 408957 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-26 13:47 +0000 [r408942-408944]  Kinsey Moore <kmoore@digium.com>

	* include/asterisk/res_pjsip_session.h, /: PJSIP: Fix some bad
	  spacing ........ Merged revisions 408943 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_refer.c: PJSIP: Prevent crash if channel has
	  gone away It is currently possible for an ast_sip_session to
	  exist without an associated channel as is the case when a new
	  invite is coming in or just after a hangup is issued on a
	  chan_pjsip channel. Part of the attended transfer code assumed
	  the channel would be non-NULL and used it as such causing a
	  crash. This bug was exposed thanks to the attended transfer ARI
	  test in the test suite. (closes issue ASTERISK-23287) Reported
	  by: Matt Jordan ........ Merged revisions 408941 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-26 08:57 +0000 [r408932]  Igor Goncharovskiy <igor.goncharovsky@gmail.com>

	* channels/chan_unistim.c: Implement functions handling keypress,
	  display icons and text for i2004 KEM support.

2014-02-25 17:51 +0000 [r408881-408883]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_exten_state.c, /,
	  res/res_pjsip_pidf_digium_body_supplement.c (added),
	  include/asterisk/res_pjsip_body_generator_types.h:
	  res_pjsip_exten_state: Presence for digium phones Added presence
	  support for digium phones. Review:
	  https://reviewboard.asterisk.org/r/3239/ ........ Merged
	  revisions 408882 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_send_to_voicemail.c (added),
	  res/res_pjsip_header_funcs.c: res_pjsip_send_to_voicemail:
	  transferring to voicemail for digium phones Added the ability for
	  transferring directly to voicemail on digium phones. Added a new
	  module that checks for the presence of a custom header and/or
	  diversion header within a sip REFER. If either is found and they
	  specify a sending to voicemail action then variables are added to
	  the channel allowing the user access to them in the dialplan.
	  Dialplan can then be written that branches based upon these
	  values allowing, for instace, for a single number to be used for
	  dialing and/or accessing voicemail directly. Also fixed a problem
	  where the PJSIP_HEADER function was allowing non pjsip channels
	  through (checked to make sure it has the correct channel type
	  before proceeding). Review:
	  https://reviewboard.asterisk.org/r/3245/ ........ Merged
	  revisions 408880 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-25 17:44 +0000 [r408879]  Rusty Newton <rnewton@digium.com>

	* configs/voicemail.conf.sample, /: configs/voicemail.conf.sample -
	  Make mailcmd sample text more explicit Made the wording a bit
	  more explicit. Didn't really change the meaning. ........ Merged
	  revisions 408876 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408877 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408878 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-22 23:31 +0000 [r408859]  Matthew Jordan <mjordan@digium.com>

	* /, main/asterisk.c: main: Initialize dialplan providing core
	  components prior to module pre-load It is possible to pre-load
	  pbx_config. As a result, pbx_config - which will load and parse
	  the dialplan - will attempt to use various dialplan components,
	  such as device state providers and presence state providers,
	  prior to them being initialized by the core. This would lead to a
	  crash, as the components had not created their Stasis cache
	  entries. This patch moves a number of core component
	  initializations before the module pre-load. This guarantees that
	  if someone does pre-load pbx_config - or other pbx modules - that
	  the Stasis caches for the various core components are created.
	  (closes issue ASTERISK-23320) Reported by: xrobau (closes issue
	  ASTERISK-23265) Reported by: Andrew Nagy Tested by: Andrew Nagy,
	  Rusty Newton ........ Merged revisions 408855 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-22 18:01 +0000 [r408840]  Alexandr Anikin <may@telecom-service.ru>

	* addons/chan_ooh323.c, /: ignore AST_CONTROL_PVT_CAUSE_CODE
	  without any messages (closes issue ASTERISK-23336) Reported by:
	  Alexander Semych ........ Merged revisions 408838 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408839 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-22 02:31 +0000 [r408788]  Corey Farrell <git@cfware.com>

	* /, utils/extconf.c, utils/conf2ael.c, res/ael/pval.c, main/pbx.c:
	  Remove extra defines of AST_PBX_MAX_STACK. * Ensure
	  AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h. * Fix
	  incorrect function parameters in utils/extconf.c. (closes issue
	  ASTERISK-23141) Reported by: Maxim Review:
	  https://reviewboard.asterisk.org/r/3241/ ........ Merged
	  revisions 408785 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408786 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408787 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-21 18:37 +0000 [r408731]  Kevin Harwell <kharwell@digium.com>

	* main/rtp_engine.c, /: rtp_engine: Dynamic payload change in rtp
	  mapping not supported Asterisk didn't support the dynamic payload
	  change in rtp mapping in the 200 OK response. Scenario: Asterisk
	  sends the INVITE proposing alaw and telephone-event, it proposes
	  rtpmap:101 for telephone-event. Peer responds with 2xx, it
	  answers with alaw and telephone-event also, but it proposes a
	  different rtpmap number (rtpmap:103) for telephone-event.
	  Expected Behaviour: Asterisk should honour the rtpmapping in the
	  response and send DTMF packets using 103 as payload type for
	  DTMF. Actual Behaviour: Asterisk sends DTMF packets using payload
	  type 101. With this patch asterisk now supports changes that can
	  occur in the rtp mapping in the response. (closes issue
	  ASTERISK-23279) Reported by: NITESH BANSAL Review:
	  https://reviewboard.asterisk.org/r/3225/ Patches:
	  dynamic_payload_change.patch uploaded by nbansal (license 6418)
	  ........ Merged revisions 408729 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408730 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-21 18:19 +0000 [r408712-408723]  Richard Mudgett <rmudgett@digium.com>

	* main/manager.c, /: manager: Fix AMI Status action of a single
	  channel. Fixed use of uninitialized ao2 container iterator in an
	  off-nominal condition. Either a memory allocation error or the
	  requested channel is an internal channel not exposed to the
	  outside. ........ Merged revisions 408715 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/sorcery.c, res/ari/resource_endpoints.c, /,
	  apps/app_meetme.c, res/res_fax.c, res/res_stasis_recording.c,
	  main/stasis_channels.c, res/res_sorcery_astdb.c,
	  include/asterisk/json.h: json: Fix off-nominal json ref counting
	  issues. * Fixed off-nominal json ref counting issue with using
	  the following API calls: ast_json_object_set() and
	  ast_json_array_append(). * Fixed off-nominal error reporting in
	  ast_ari_endpoints_list(). * Fixed some miscellaneous off-nominal
	  json ref counting issues in report_receive_fax_status() and
	  dial_to_json(). ........ Merged revisions 408713 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/json.c, /: json: Fix json API wrapper code for json library
	  versions earlier than 2.3.0. * Fixed json ref counting issue with
	  json API wrapper code for ast_json_object_update_existing() and
	  ast_json_object_update_missing() when the json library is earlier
	  than version 2.3.0. ........ Merged revisions 408711 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-21 16:49 +0000 [r408699]  Corey Farrell <git@cfware.com>

	* channels/chan_sip.c: chan_sip: prevent add_route from adding
	  empty header. Fix regression caused by ASTERISK-22582. Empty
	  Route headers were added when the route had a single strict hop.
	  (closes issue ASTERISK-23306) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3236/

2014-02-21 16:27 +0000 [r408645-408652]  Kevin Harwell <kharwell@digium.com>

	* main/rtp_engine.c, /: rtp_engine: Output mixup in
	  ${CHANNEL(rtpqos,audio,all)} Fixed the output of
	  CHANNEL(rtpqos,audio,all) to use txjitter instead of rxjitter.
	  (closes issue ASTERISK-23261) Reported by: rsw686 Patches:
	  rtpqos.patch uploaded by rsw686 (license 5887) ........ Merged
	  revisions 408646 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408647 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408649 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/channel.c, /: channel.c: MOH is not working for transferee
	  after attended transfer Updated the code to check to see if MOH
	  is playing on the transferor and if so then start it on the
	  channel that replaces it during a masquerade. Example scenario of
	  the problem: Alice calls Bob and then Bob begins the attended
	  transfer process into a queue. Upon going on hold Alice hears
	  music and so does Bob once he is in the queue. Bob then transfers
	  Alice into the queue and then music for Alice stops even though
	  she should be hearing it since has now replaced Bob in the queue.
	  The problem that was occurring is that once the channel was
	  masqueraded the app (queues, confbridge, etc...) had no way of
	  knowing that the channel had just been swapped out thus it did
	  not start music for the present channel. Credit to Olle Johansson
	  for pointing me in the right direction on this issue. (closes
	  issue ASTERISK-19499) Reported by: Timo Teräs Review:
	  https://reviewboard.asterisk.org/r/3226/ ........ Merged
	  revisions 408642 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408643 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408644 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-21 10:45 +0000 [r408592]  Alexandr Anikin <may@telecom-service.ru>

	* /, addons/ooh323c/src/ooCalls.h: Fix type of roundTripDelay
	  variables ........ Merged revisions 408589 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408590 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408591 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-21 00:50 +0000 [r408539]  Michael L. Young <elgueromexicano@gmail.com>

	* /, apps/app_chanspy.c: app_chanspy: Documentation Update To
	  Clarify "x" Option When using the "x" option (specify a DTMF
	  digit to exit the application), it is not obvious in the
	  documentation that this only works when spying on a channel. If a
	  channel being used to spy on other channels is waiting to connect
	  to a channel or is no longer attached to a channel, the DTMF is
	  ignored. As noted on the issue tracker, since there are
	  workarounds available and this is a rarely used option we are
	  opting for a documentation change here. (closes issue
	  ASTERISK-22661) Reported by: Chris Hillman Patches:
	  asterisk-22661-doc-clarify-chan_spy.diff uploaded by Michael L.
	  Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/2990/ ........ Merged
	  revisions 408536 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408537 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408538 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-20 21:12 +0000 [r408519-408523]  George Joseph <george.joseph@fairview5.com>

	* /, res/res_pjsip/location.c,
	  res/res_pjsip_outbound_registration.c: pjsip_cli: Add pjsip
	  commands 'show registrations' and 'show contacts'. Added 'show
	  registrations' and 'show contacts' to pjsip cli to make things a
	  little more consistent. The output is exactly the same as the
	  list command. Just needed to add entries to their respective
	  ast_cli_entry structures. (closes issue ASTERISK-23275) Review:
	  http://reviewboard.asterisk.org/r/3210/ ........ Merged revisions
	  408522 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/pjsip_cli.c, main/config.c: pjsip_cli: Fix
	  memory leak in ast_sip_cli_print_sorcery_objectset. Fixed memory
	  leaks in ast_sip_cli_print_sorcery_objectset and
	  ast_variable_list_sort. (closes issue ASTERISK-23266) Review:
	  http://reviewboard.asterisk.org/r/3200/ ........ Merged revisions
	  408520 from http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/sorcery.h,
	  res/res_pjsip/include/res_pjsip_private.h, res/res_pjsip.c,
	  tests/test_sorcery.c, main/sorcery.c, /,
	  res/res_pjsip/config_system.c: sorcery: Create sorcery instance
	  registry. In order to retrieve an arbitrary sorcery instance from
	  a dialplan function (or any place else) there needs to be a
	  registry of sorcery instances. ast_sorcery_init now creates a
	  hashtab as a registry. ast_sorcery_open now checks the hashtab
	  for an existing sorcery instance matching the caller's module
	  name. If it finds one, it bumps the refcount and returns it. If
	  not, it creates a new sorcery instance, adds it to the hashtab,
	  then returns it. ast_sorcery_retrieve_by_module_name is a new
	  function that does a hashtab lookup by module name. It can be
	  called by the future dialplan function. res_pjsip/config_system
	  needed a small change to share the main res_pjsip sorcery
	  instance. tests/test_sorcery was updated to include a test for
	  the registry. (closes issue ASTERISK-22537) Review:
	  http://reviewboard.asterisk.org/r/3184/ ........ Merged revisions
	  408518 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-20 19:02 +0000 [r408503]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip.c, /: res_pjsip: Update documentation for
	  'use_avpf' option When 'use_avpf' is set to True, inbound offers
	  must use the AVPF/SAVPF RTP profile. However, when 'use_avpf' is
	  set to False, Asterisk will accept both AVP/SAVP or AVPF/SAVPF
	  RTP profiles in inbound offers. The documentation previously
	  implied that Asterisk would reject AVPF/SAVPF if 'use_avpf' was
	  set to False and a UA offered said profile in an INVITE request.
	  ........ Merged revisions 408502 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-20 02:44 +0000 [r408450]  Rusty Newton <rnewton@digium.com>

	* /, apps/app_queue.c: apps/app_queue - Fix incorrect Macro
	  parameter documentation Macro is executed on the called channel,
	  not the calling channel. (closes issue ASTERISK-23069) Reported
	  By: Bryan Anderson ........ Merged revisions 408447 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408448 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408449 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-19 19:09 +0000 [r408386-408390]  Richard Mudgett <rmudgett@digium.com>

	* /, main/config.c: config: Add file size and nanosecond resolution
	  fields to the cached modified config file information. Repeatedly
	  modifying config files and reloading too fast sometimes fails to
	  reload the configuration because the cached modification
	  timestamp has one second resolution. * Added file size and
	  nanosecond resolution fields to the cached config file
	  modification timestamp information. Now if the file size changes
	  or the file system supports nanosecond resolution the modified
	  file has a better chance of being detected for reload. * Added a
	  missing unlock in an off-nominal code path. (closes issue
	  AST-1303) Review: https://reviewboard.asterisk.org/r/3235/
	  ........ Merged revisions 408387 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408388 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408389 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_sorcery_astdb.c: res_sorcery_astdb.c: Fix regex
	  handling and keep simple prefix matching performance. The sorcery
	  astDB wizzard does not handle regex correctly if the pattern
	  begins with an anchor character. This patch attempts to convert
	  the anchored regex pattern to a prefix pattern supported by astDB
	  for performance reasons. If it is not able to convert the pattern
	  it falls back to getting all astDB members of the family and
	  doing a normal regex pattern matching on the retrieved records.
	  Review: https://reviewboard.asterisk.org/r/3161/ ........ Merged
	  revisions 408385 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-19 12:04 +0000 [r408315-408332]  Alexandr Anikin <may@telecom-service.ru>

	* addons/ooh323c/src/ooCapability.c, /,
	  addons/ooh323c/src/ooh245.c: process receiveAndTransmit user
	  input remote caps instead of receive only send receiveAndTransmit
	  user input our caps instead of receive only ........ Merged
	  revisions 408328 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408330 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408331 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* addons/ooh323c/src/ooh323.c, /: Allow different socket and
	  signalling ip on h.323 connection if gk mode is active Reported
	  by: Gabriele Odone Patches: ASTERISK-22738-1.patch Tested by:
	  Gabriele Odone (closes issue ASTERISK-22738) ........ Merged
	  revisions 408312 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408314 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-18 19:19 +0000 [r408299]  Richard Mudgett <rmudgett@digium.com>

	* contrib/ast-db-manage/config/env.py,
	  contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py,
	  contrib/ast-db-manage/config,
	  contrib/ast-db-manage/voicemail/env.py,
	  contrib/ast-db-manage/voicemail,
	  contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py,
	  contrib/ast-db-manage/config/versions,
	  contrib/ast-db-manage/config/versions/21e526ad3040_add_pjsip_debug_option.py,
	  contrib/ast-db-manage/voicemail/versions/a2e9769475e_create_tables.py,
	  contrib/ast-db-manage/voicemail/versions, contrib/ast-db-manage,
	  /: alembic: Add svn:ignore *.pyc to directories and
	  svn:executable to *.py files. ........ Merged revisions 408297
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-17 15:36 +0000 [r408272]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip/location.c, UPGRADE.txt, res/res_pjsip.c,
	  res/res_pjsip_registrar.c, include/asterisk/res_pjsip.h: Store
	  SIP User-Agent information in contacts. When an endpoint sends a
	  REGISTER request to Asterisk, we now will associate the
	  User-Agent header with all contacts that were bound in that
	  REGISTER request. ........ Merged revisions 408270 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-16 03:25 +0000 [r408199-408227]  Matthew Jordan <mjordan@digium.com>

	* /, main/pbx.c: pbx: Handle a completely empty dialplan during a
	  context merge It is highly unlikely, but - at least in Asterisk
	  12 - theoretically possible to load Asterisk with no dialplan
	  whatsoever. If that occurs, and some other module (that is not a
	  pbx module) attempts to merge its contexts into the dialplan, the
	  existing merge routine will crash. This is because it is not
	  insane, and rightly believes that you provided some sort of
	  dialplan, somewhere. This patch will gracefully merge the
	  contexts in such a case. Note that this is highly unlikely to
	  occur in 1.8/11, as features will most likely provide some
	  dialplan via parking. However, in Asterisk 12, parking is now
	  provided by res_parking, and hence may create its dialplan later.
	  (closes issue ASTERISK-23297) Reported by: CJ Oster Review:
	  https://reviewboard.asterisk.org/r/3222 ........ Merged revisions
	  408200 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 408201 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408220 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, Makefile: buildsystem: Unbreak the build (infloop) on Asterisk
	  11+ Apparently r408084 ( https://reviewboard.asterisk.org/r/3212/
	  ) broke the build. This patch fixes it by ignoring the .lastclean
	  dependencies if the MENUSELECT_EMBED variable is not defined.
	  patches: tmp.diff uploaded by wdoekes (License 5674) Review:
	  https://reviewboard.asterisk.org/r/3228/ ........ Merged
	  revisions 408193 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408194 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-14 21:44 +0000 [r408139-408141]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/stasis_endpoints.c, /: ARI: correct upper/lower case URI
	  discrepancies URI's are supposed to be case sensitive and all
	  lower case. In practice some portions of URI's in ARI are case
	  insensitive and others are not, such as TECH, which in one
	  instance would match a lower case name and in another would not.
	  In this patch, the ast_endpoint_lastest_snapshot() function is
	  modified to change the TECH portion to full upper case before
	  lookup. This resolves the discrepancy noted by the reporter.
	  However I chose to avoid forcing the /ari prefix of the URI's to
	  be lower case for now. Except for the two cases here, all URI's
	  should be lower case, unless they are part of a resource name or
	  id. Review: https://reviewboard.asterisk.org/r/3211/ Reported by:
	  Zane Conkle (closes issue ASTERISK-23125) ........ Merged
	  revisions 408140 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/format.c, /: format.c: correct possible null pointer
	  dereference In ast_format_sdp_parse and ast_format_sdp_generate
	  the check checks for a valid interface and function were
	  potentially confusing, and hid an error in the test of the
	  presence of the function that is called later. This patch clears
	  up and corrects the test. Review:
	  https://reviewboard.asterisk.org/r/3208/ (closes issue
	  ASTERISK-23098) Reported by: marcelloceschia Patches:
	  main_format.patch uploaded by marcelloceschia (license 6036)
	  ASTERISK-23098.patch uploaded by coreyfarrell (license 5909)
	  ........ Merged revisions 408137 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408138 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-14 13:31 +0000 [r408086]  Walter Doekes <walter+asterisk@wjd.nu>

	* Makefile, /: buildsystem: Don't force main to depend on
	  everything else. Directory 'main' only needs to depend on
	  embedded modules. If no module embedding is selected, the
	  dependency is dropped. Review:
	  https://reviewboard.asterisk.org/r/3212/ ........ Merged
	  revisions 408083 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 408084 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 408085 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-14 12:41 +0000 [r408070]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: chnan_sip: Set SIP_DEFER_BYE_ON_TRANSFER
	  prior to calling bridge blind transfer This patch moves setting
	  SIP_DEFER_BY_ON_TRANSFER prior to calling
	  ast_bridge_transfer_blind. This prevents a BYE from being sent
	  prior to the NOTIFY request that informs the transferor if the
	  transfer succeeded or failed. This patch also clears said flag
	  from the off nominal NOTIFY paths in the local_attended_transfer
	  code, as once we've sent the NOTIFY request it is safe to send by
	  the BYE request. This was caught by the
	  blind-transfer-accountcode test in the Asterisk Test Suite.
	  (closes issue ASTERISK-23290) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3214/ ........ Merged
	  revisions 408069 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-14 08:52 +0000 [r408059]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* Makefile, build_tools/install_subst (added): install_subst:
	  helper script for installing with path substitution A helper
	  script to copy a source file substituting any
	  __ASTERISK_<foo>_DIR__ with the content of $AST<foo>DIR. Review:
	  https://reviewboard.asterisk.org/r/3202/

2014-02-13 18:52 +0000 [r407990-408006]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pubsub.c, /, res/res_pjsip_mwi.c: Remove all PJSIP
	  MWI-specific use from our MWI code. PJSIP has built-in MWI code
	  that could be useful to some degree, but our utilization of the
	  API actually made our code a bit more cluttered since we had to
	  have special cases peppered throughout. With this change, we move
	  to using the pjsip_evsub API instead, which streamlines the code
	  by removing special cases. Review:
	  https://reviewboard.asterisk.org/r/3205 ........ Merged revisions
	  408005 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/location.c: Fix crash in AMI PJSIPShowEndpoint
	  action. If an AOR has no permanent contacts, then the
	  permanent_contacts container is never allocated. This makes the
	  code safe in the face of NULLs. I also changed the variable that
	  counts contacts from "num" to "total_contacts" since there are
	  now two variables that are indicate numbers of things. ........
	  Merged revisions 407988 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-13 15:51 +0000 [r407989]  Kinsey Moore <kmoore@digium.com>

	* main/logger.c, CHANGES: Logger: Add dynamic logger channels This
	  adds the ability to dynamically add and remove logger channels
	  from Asterisk via the CLI. (closes issue AST-1150) Review:
	  https://reviewboard.asterisk.org/r/3185/

2014-02-12 08:25 +0000 [r407970]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, main/config.c: realtime: Fix ast_update2_realtime() on
	  raspberry pi. The old code depended on undefined va_arg
	  behaviour: calling a function twice with the same va_list
	  parameter and expecting it to continue where it left off. The
	  changed code behaves like the manpage says it should. Also added
	  a bunch of early returns to trap errors (e.g. OOM) instead of
	  crashing. The problem was found by Julian Lyndon-Smith. The
	  deviant behaviour on the raspberry PI also uncovered another bug
	  (fixed in r407875) in the res_config_pgsql.so driver. Reported
	  by: jmls Tested by: jmls Review:
	  https://reviewboard.asterisk.org/r/3201/ ........ Merged
	  revisions 407968 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-11 20:17 +0000 [r407958]  Joshua Colp <jcolp@digium.com>

	* main/sched.c: scheduler: Remove hashtab usage. This is a first
	  stab at tweaking the performance profile of the scheduler.
	  Removing the hashtab usage removes an extra memory allocation
	  when scheduling something and makes it so rescheduling does not
	  incur any memory allocation at all. Review:
	  https://reviewboard.asterisk.org/r/3199/

2014-02-11 03:18 +0000 [r407940]  Matthew Jordan <mjordan@digium.com>

	* res/ari/resource_channels.c, /: ari/resource_channels: Add
	  channel variables earlier in the creation process This patch
	  tweaks the behaviour of POST /channels with channel variables
	  such that the variables are passed into the pbx.c routines that
	  perform the origination. This allows the variables to be assigned
	  to the newly created channels immediately upon their
	  construction, as opposed to be assigned after the originate has
	  completed. The upshot of this is that the variables are available
	  on the channels if they execute in the dialplan, as opposed to
	  only being available once the channels are answered. Review:
	  https://reviewboard.asterisk.org/r/3183/ ........ Merged
	  revisions 407937 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-10 18:28 +0000 [r407926]  Corey Farrell <git@cfware.com>

	* channels/sip/include/reqresp_parser.h,
	  channels/sip/include/route.h (added), channels/chan_sip.c,
	  channels/sip/route.c (added), channels/sip/include/sip.h:
	  chan_sip: Isolate code that manages struct sip_route. * Move
	  route code to sip/route.c + sip/include/route.h * Rename
	  functions to sip_route_* * Replace ad-hoc list code with macro's
	  from linkedlists.h * Create sip_route_process_header() to
	  processes Path and Record-Route headers (previously done with
	  different code in build_route and build_path) * Add use of const
	  where possible * Move struct uriparams, struct contact and
	  contactliststruct from sip.h to reqresp_parser.h. sip/route.c
	  uses reqresp_parser.h but not sip.h, this was a problem. These
	  moved declares are not used outside of reqresp_parser. * While
	  modifying reqprep() the lack of {} caused me trouble. I added
	  them. * Code outside route.c treats sip_route as an opaque
	  structure, using macro's or procedures for all access. (closes
	  issue ASTERISK-22582) Reported by: Corey Farrell Review:
	  https://reviewboard.asterisk.org/r/3173/

2014-02-10 16:49 +0000 [r407876]  Walter Doekes <walter+asterisk@wjd.nu>

	* res/res_config_pgsql.c, /: res_config_pgsql: Fix
	  ast_update2_realtime calls. Fix so multiple updates from a single
	  call works (add missing ','). Remove bogus ast_free's that
	  weren't supposed to be there. Moved a few spaces for readability.
	  Review: https://reviewboard.asterisk.org/r/3194/ ........ Merged
	  revisions 407873 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407874 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407875 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-10 16:01 +0000 [r407859]  Kinsey Moore <kmoore@digium.com>

	* apps/app_confbridge.c, apps/confbridge/conf_state_multi_marked.c,
	  apps/confbridge/conf_state_empty.c,
	  apps/confbridge/conf_config_parser.c,
	  configs/confbridge.conf.sample, /,
	  apps/confbridge/include/confbridge.h, UPGRADE.txt: ConfBridge:
	  Correct prompt playback target Currently, when the first marked
	  user enters the conference that contains waitmarked users, a
	  prompt is played indicating that the user is being placed into
	  the conference. Unfortunately, this prompt is played to the
	  marked user and not the waitmarked users which is not very
	  helpful. This patch changes that behavior to play a prompt
	  stating "The conference will now begin" to the entire conference
	  after adding and unmuting the waitmarked users since the design
	  of confbridge is not conducive to playing a prompt to a subset of
	  users in a conference in an asynchronous manner. (closes issue
	  PQ-1396) Review: https://reviewboard.asterisk.org/r/3155/
	  Reported by: Steve Pitts ........ Merged revisions 407857 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407858 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-07 20:52 +0000 [r407767]  Richard Mudgett <rmudgett@digium.com>

	* /, channels/chan_iax2.c: chan_iax2: Add some more iaxs[] NULL
	  checks to a routine already full of them. ........ Merged
	  revisions 407764 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407765 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407766 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-07 20:17 +0000 [r407752]  Matthew Jordan <mjordan@digium.com>

	* /, main/security_events.c: security_events: Fix assertion failure
	  in dev-mode on optional IE parsing When formatting an optional
	  IE, the value is, of course, optional. As such, it is entirely
	  appropriate for ast_json_object_get to return NULL. If that
	  occurs, we now simply skip the IE that was requested, as it was
	  not provided by the entity that raised the event. Thanks to
	  George Joseph (gtjoseph) for catching this and reporting it in
	  #asterisk-dev ........ Merged revisions 407750 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-07 20:01 +0000 [r407749]  Joshua Colp <jcolp@digium.com>

	* main/timing.c, res/res_timing_pthread.c, res/res_timing_dahdi.c,
	  res/res_timing_timerfd.c, include/asterisk/timing.h,
	  res/res_timing_kqueue.c: timing: Improve performance for most
	  timing implementations. This change allows timing implementation
	  data to be stored directly on the timer itself thus removing the
	  requirement for many implementations to do a container lookup for
	  the same information. This means that API calls into timing
	  implementations can directly access the information they need
	  instead of having to find it. Review:
	  https://reviewboard.asterisk.org/r/3175/

2014-02-07 19:40 +0000 [r407748]  Matthew Jordan <mjordan@digium.com>

	* /, funcs/func_cdr.c: funcs/func_cdr: Handle empty time values
	  when extracting parsed values When extracting timestamps that are
	  parsed, time stamp values that are not set (time values of
	  0.000000) should not actually result in a parsed string. The
	  value should be skipped, and the result of the CDR function
	  should be an empty string. Prior to this patch, the result was
	  fed to the time formatting, which would result in an output of a
	  date/time in 1969. ........ Merged revisions 407747 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-07 18:29 +0000 [r407731]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_iax2.c, include/asterisk/frame.h,
	  configs/iax.conf.sample, /: chan_iax2: Block unnecessary control
	  frames to/from the wire. Establishing an IAX2 call between
	  Asterisk v1.4 and v1.8 (or later) results in an unexpected call
	  disconnect. The problem happens because newer values in the enum
	  ast_control_frame_type are not consistent between the branch
	  versions of Asterisk. For example: 1) v1.4 calls v1.8 (or later)
	  using IAX2 2) v1.8 answers and sends a connected line update
	  control frame. (on v1.8 AST_CONTROL_CONNECTED_LINE = 22) 3) v1.4
	  receives the control frame as an end-of-q (on v1.4
	  AST_CONTROL_END_OF_Q = 22) 4) v1.4 disconnects the call once the
	  receive queue becomes empty. Several things are done by this
	  patch to fix the problem and attempt to prevent it from happening
	  again in the future: * Added a warning at the definition of enum
	  ast_control_frame_type about how to add new control frame values.
	  * Made block sending and receiving control frames that have no
	  reason to go over the wire. * Extended the connectedline iax.conf
	  parameter to also include the redirecting information updates. *
	  Updated the connectedline iax.conf parameter documentation to
	  include a notice that the parameter must be "no" when the peer is
	  an Asterisk v1.4 instance. (closes issue AST-1302) Review:
	  https://reviewboard.asterisk.org/r/3174/ ........ Merged
	  revisions 407678 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407727 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407729 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-07 16:47 +0000 [r407677]  Matthew Jordan <mjordan@digium.com>

	* /, main/security_events.c: security_events: Fix error caused by
	  DTD validation error The appdocsxml.dtd specifies that a
	  "required" attribute in a parameter may have a value of yes, no,
	  true, or false. On some systems, specifying "False" instead of
	  "false" would cause a validation error. This patch fixes the
	  casing to explicitly match the DTD. ........ Merged revisions
	  407676 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-07 13:15 +0000 [r407625]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* /, configs/indications.conf.sample: indications.conf: add stutter
	  tone; end properly * If the "stutter" (voicemail indication) tone
	  is indeed a stutter tone, and it ends with a constant tone, make
	  sure that it is the dial tone. This was done for India (in),
	  Mexico (mx) and the Philippines (ph). * If no "stutter" tone
	  exists for a country, provide one. This was done for Spain (es),
	  Malaysia (my) and Venezuela (ve). Review:
	  https://reviewboard.asterisk.org/r/3158/ ........ Merged
	  revisions 407622 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407623 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407624 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-06 21:24 +0000 [r407602]  Matthew Jordan <mjordan@digium.com>

	* /, main/security_events.c, UPGRADE.txt, CHANGES: security_events:
	  Add AMI documentation; output optional fields This patch adds
	  documentation for the Security Events that are emited over AMI.
	  It also notes these events in the UPGRADE/CHANGES file. ........
	  Merged revisions 407589 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-06 19:58 +0000 [r407588]  Rusty Newton <rnewton@digium.com>

	* /, configs/pjsip.conf.sample: configs/pjsip.conf.sample:
	  Configuration section naming in pjsip.conf.sample needs a little
	  clarification There is a bit of nuance to how you name things in
	  pjsip.conf. This is a documentation patch to at least clear it up
	  a little for users. Review:
	  https://reviewboard.asterisk.org/r/3180/ ........ Merged
	  revisions 407587 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-06 18:11 +0000 [r407574]  Kevin Harwell <kharwell@digium.com>

	* /,
	  contrib/ast-db-manage/config/versions/2fc7930b41b3_add_pjsip_endpoint_options_for_12_1.py:
	  pjsip realtime: already created enum failure for postgresql If an
	  enum had been previously created the alembic script would attempt
	  to re-create it and an error would be generated while running
	  migrations for a postgresql server. The work around for this is
	  to use the ENUM object type for postgres as opposed to the
	  generic enum type used by sqlalchemy. Using this type in the
	  script seems to work properly for both postgres and mysql.
	  ........ Merged revisions 407572 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-06 17:55 +0000 [r407573]  Richard Mudgett <rmudgett@digium.com>

	* res/res_pjsip_logger.c,
	  res/res_pjsip/include/res_pjsip_private.h,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip/config_transport.c,
	  include/asterisk/res_pjsip.h, res/res_pjsip/config_global.c,
	  res/res_pjsip/config_auth.c, /, res/res_pjsip/location.c,
	  res/res_pjsip_outbound_registration.c,
	  res/res_pjsip_endpoint_identifier_ip.c,
	  include/asterisk/res_pjsip_cli.h, res/res_pjsip/pjsip_cli.c,
	  res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/config_domain_aliases.c: res_pjsip: Updates and
	  adds more PJSIP CLI commands. * Adds identify, transport, and
	  registration support to the PJSIP CLI. * Creates three additional
	  callbacks, one for an iterator, one for a comparator, and one for
	  a container. This eliminates the link dependency from higher
	  level modules to lower level ones. * Eliminates duplicate sorting
	  in PJSIP CLI commands. * Cleans up PJSIP CLI output formatting. *
	  Pushes CLI command registration down to the implementing source
	  file. * Adds several ast_sip_destroy_sorcery functions to
	  complement existing ast_sip_sorcery_initialize functions. The
	  destroy functions unregister PJSIP CLI commands and PJSIP CLI
	  formatters. Reported by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3104/ ........ Merged
	  revisions 407568 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-05 23:04 +0000 [r407514]  Rusty Newton <rnewton@digium.com>

	* /, formats/format_wav.c: formats/format_wav: enhancing log
	  message "Not a wav file" to be clear on what is supported
	  Modifying the log message to be more specific as to what is
	  supported. Specifically it seems format_wav supports only PCM
	  encoded versions with a lower-case '.wav' extension. (closes
	  issues ASTERISK-22310) Reported by: Jim Credland Review:
	  https://reviewboard.asterisk.org/r/3188/ ........ Merged
	  revisions 407511 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407512 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407513 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-05 20:56 +0000 [r407462]  Jonathan Rose <jrose@digium.com>

	* CHANGES, /: CHANGES: Improved description of Name/Creator changes
	  to bridge ARI, adds AMI The changes log was written with language
	  that was a little too internal Asterisk specific, so it's been
	  changed to be more in the frame of reference of an ARI user.
	  Also, previously the AMI event changes were omitted from the
	  change log as well as the ability to include a bridge name in the
	  ARI post bridges command. ........ Merged revisions 407461 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-05 20:43 +0000 [r407459]  Kinsey Moore <kmoore@digium.com>

	* main/logger.c, /: Logger: Fix handling of absolute paths This
	  fixes path handling for log files so that an extra / is not
	  appended to the file path when the path is absolute (begins with
	  /). This would previously result in different but functionally
	  equivalent paths in the output of 'logger show channels'.
	  ........ Merged revisions 407455 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407456 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407458 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-05 19:42 +0000 [r407443]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip/config_global.c, /: res_pjsip: When no global type
	  the debug option defaults to "yes" If the global section was not
	  specified in pjsip.conf then the configuration object does not
	  exist in sorcery so when retrieving "debug" option it would
	  return NULL. Then the NULL result was passed to ast_false utils
	  function which would return false because it wasn't set to some
	  representation of false, thus enabling sip debug logging. Made it
	  so if the global config object does not exist then it will return
	  a default of "no" for sip debugging. (issue ASTERISK-23038)
	  Reported by: Rusty Newton ........ Merged revisions 407442 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-05 17:42 +0000 [r407422-407425]  Jonathan Rose <jrose@digium.com>

	* CHANGES: CHANGES: Update changes log to include r403414 entry
	  Adds note of additional 0 for operator option on app_record

	* CHANGES, /: CHANGES: Update changes log to include new bridge
	  fields added in r404042 ........ Merged revisions 407419 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-05 15:29 +0000 [r407407]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/playbacks.json, UPGRADE.txt,
	  rest-api/api-docs/sounds.json, rest-api/resources.json, CHANGES,
	  include/asterisk/manager.h, rest-api/api-docs/bridges.json,
	  rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/mailboxes.json,
	  rest-api/api-docs/asterisk.json,
	  rest-api/api-docs/applications.json,
	  rest-api/api-docs/channels.json,
	  rest-api/api-docs/recordings.json,
	  rest-api/api-docs/endpoints.json, rest-api/api-docs/events.json,
	  /: ARI/AMI: Update versions; update UPGRADE/CHANGES notes for
	  12.1.0 changes Due to backwards compatible changes made to
	  AMI/ARI, the version needs to be bumped to 1.1.0/2.1.0,
	  respectively. ........ Merged revisions 407402 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-04 20:15 +0000 [r407275-407340]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/devicestate.h, /, main/devicestate.c:
	  devicestate: Make ast_devstate_changed_literal() return value and
	  doxygen consistent. Nothing actually cares about the value
	  anyway. (closes issue ASTERISK-23178) Reported by: Jonathan Rose
	  ........ Merged revisions 407337 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407338 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407339 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/pjsip_configuration.c: res_pjsip: Fix assertion
	  for pjsip.conf authorization list options. (closes issue
	  ASTERISK-23168) Reported by: George Joseph Review:
	  https://reviewboard.asterisk.org/r/3143/ ........ Merged
	  revisions 407324 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* configs/sip.conf.sample, main/tcptls.c, /: tcptls.c: Made TLS
	  handle a certificate chain file. Thanks to Guillaume Martres for
	  doing the necessary research to validate the change. (closes
	  issue ASTERISK-17727) Reported by: LN Patches:
	  use_certificate_chain.patch (license #5864) patch uploaded by st
	  documente_certificate_chain.patch (license #6576) patch uploaded
	  by Guillaume Martres ........ Merged revisions 407272 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407273 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407274 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-04 16:55 +0000 [r407260]  Matthew Jordan <mjordan@digium.com>

	* /, funcs/func_cdr.c: funcs/func_cdr: Fix non-epoch timestamps
	  broken by improper char array deref Thanks to snuffy for pointing
	  this issue out and fixing it. (closes issue ASTERISK-23250)
	  Reported by: snuffy patches: func_cdr-fix.diff uploaded by snuffy
	  (License 5024) ........ Merged revisions 407259 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-04 02:22 +0000 [r407217]  Joshua Colp <jcolp@digium.com>

	* res/res_clialiases.c, /: res_clialiases: Fix crash when reloading
	  and re-aliasing an alias that is in use. The code assumed that
	  unregistering the alias would always succeed while in practice
	  this is not actually true. A common case is the "reload" command
	  itself. If the cli_aliases.conf configuration file was changed
	  and reload executed the command would fail to unregister and
	  ultimately point to freed memory. The reload process now checks
	  whether unregistering succeeded or not and if not the old CLI
	  alias is retained. (closes issue ASTERISK-19773) Reported by:
	  Joel Vandal (closes issue ASTERISK-22757) Reported by: Gareth
	  Blades ........ Merged revisions 407205 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407210 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407213 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-04 02:07 +0000 [r407198]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Skinny - Fix deadlock when pickup of
	  no call. Locking issues in skinny when picking up a call that
	  doesn't exist. Cleaned up sub locking by fully removing and using
	  the chan lock instead. Also changed ast_call_pickup to check
	  whether chan was masq'd. (closes issue ASTERISK-23249) Reported
	  by: wedhorn Tested by: snuffy, myself Patches:
	  skinny-locking01.diff uploaded by wedhorn (license 5019) ........
	  Merged revisions 407197 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-03 01:31 +0000 [r407169]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, /: cdrs: Check for applications to lock onto during
	  dial begin handling This patch brings CDR processing further in
	  line with r407085. During some dial operations, the application
	  would not be locked to the Dial application and would instead
	  continue to show the previously known application. In particular,
	  this would occur when a Parked call would time out. This was due
	  to a previous snapshot already locking the application to Park -
	  processing this in a Dial Begin allows the Dial application to
	  reassert its rightful place. (CDRs. Ugh.) But hooray for the
	  Parked Call tests for catching this in the Asterisk Test Suite.
	  ........ Merged revisions 407166 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-01 16:26 +0000 [r407154]  Joshua Colp <jcolp@digium.com>

	* res/ari/ari_model_validators.h, rest-api/api-docs/events.json, /,
	  res/stasis/app.c, res/ari/ari_model_validators.c,
	  res/res_stasis.c, main/stasis_bridges.c: res_stasis: Enable
	  transfers and provide events when they occur. This change enables
	  transfers within ARI created bridges and adds events for when
	  they occur. Unlike other events these will be received if *any*
	  subscribed object is involved in the transfer. (closes issue
	  ASTERISK-22984) Reported by: David M. Lee Review:
	  https://reviewboard.asterisk.org/r/3120/ ........ Merged
	  revisions 407153 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-02-01 00:25 +0000 [r407105]  Corey Farrell <git@cfware.com>

	* apps/app_stack.c, /: app_stack: protect against missing
	  parameters to STACK_PEEK and LOCAL_PEEK STACK_PEEK requires 2
	  parameters and LOCAL_PEEK requires 1 parameter. This protects
	  against situations where those parameters are blank or missing by
	  logging an error and returning. (closes issue ASTERISK-23220)
	  Reported by: James Sharp ........ Merged revisions 407100 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 407103 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407104 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-31 23:40 +0000 [r407083-407085]  Matthew Jordan <mjordan@digium.com>

	* apps/app_dial.c, main/cdr.c, main/pbx.c, /, main/bridge_after.c,
	  UPGRADE.txt, main/manager_channels.c: CDRs: fix a variety of dial
	  status problems, h/hangup handler creating CDRs This patch fixes
	  a number of small-ish problems that were noticed when witnessing
	  the records that the FreePBX dialplan produces: (1) Mid-call
	  events (as well as privacy options) have the ability to change
	  the overall state of the Dial operation after the called party
	  answers. This means that publishing the DialEnd event when the
	  called party is premature; we have to wait for the execution of
	  these subroutines to complete before we can signal the overall
	  status of the DialEnd. This patch moves that publication and adds
	  handlers for the mid-call events. (2) The AST_FLAG_OUTGOING
	  channel flag is cleared if an after bridge goto datastore is
	  detected. This flag was preventing CDRs from being recorded for
	  all outbound channels that had a 'continue' option enabled on
	  them by the Dial application. (3) The CDR engine now locks the
	  'Dial' application as being the CDR application if it detects
	  that the current CDR has entered that app. This is similar to the
	  logic that is done for Parking. In general, if we entered into
	  Dial, then we want that CDR to record the application as such -
	  this prevents pre-dial handlers, mid-call handlers, and other
	  shenaniganry from changing the application value. (4) The CDR
	  engine now checks for the AST_SOFTHANGUP_HANGUP_EXEC in more
	  places to determine if the channel is in hangup logic or dead. In
	  either case, we don't want to record changes in the channel. (5)
	  The default option for "endbeforehexten" has been changed to
	  "yes". In general, you don't want to see CDRs in the 'h' exten or
	  in hangup logic. Since the semantics of that option changed in
	  12, it made sense to update the default value as well. (6)
	  Finally, because we now have the ability to synchronize on the
	  messages published to the CDR topic, on shutdown the CDR engine
	  will now synchronize to the messages currently in flight. This
	  helps to ensure that all in-flight CDRs are written before
	  shutting down. (closes issue ASTERISK-23164) Reported by: Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/3154 ........
	  Merged revisions 407084 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_dial.c, /: app_dial: Allow macro/gosub pre-bridge
	  execution to occur on priorities The parsing for the destination
	  of the macro/gosub uses the '^' character to separate out
	  context, extension, and priority. However, the logic for the
	  macro/gosub execution was written such that it would only do the
	  actual macro/gosub jump if a '^' character existed. This doesn't
	  apply when the macro/gosub jump occurs in a priority/priority
	  label. This patch changes the logic so that the parsing still
	  occurs, but the jump will occur even for priorities/priority
	  labels. (issue ASTERISK-23164) Review:
	  https://reviewboard.asterisk.org/r/3154 ........ Merged revisions
	  407041 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 407074 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 407082 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-31 23:15 +0000 [r407035-407037]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_logger.c, CHANGES, res/res_pjsip.c,
	  include/asterisk/res_pjsip.h, res/res_pjsip/config_global.c,
	  contrib/ast-db-manage/config/versions/21e526ad3040_add_pjsip_debug_option.py
	  (added), /, configs/pjsip.conf.sample, UPGRADE.txt: res_pjsip:
	  Config option to enable PJSIP logger at load time. Added a
	  "debug" configuration option for res_pjsip that when set to "yes"
	  enables SIP messages to be logged. It is specified under the
	  "system" type. Also added an alembic script to add the option to
	  realtime. (closes issue ASTERISK-23038) Reported by: Rusty Newton
	  Review: https://reviewboard.asterisk.org/r/3148/ ........ Merged
	  revisions 407036 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_exten_state.c, /: res_pjsip_exten_state: Exporting
	  global symbols caused load order issues Removed the exportation
	  of global symbols from the module as it is no longer needed and
	  it could potentially cause load problems as on some systems it
	  would try to load before res_pjsip_pubsub ........ Merged
	  revisions 407034 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-31 23:04 +0000 [r407033]  Richard Mudgett <rmudgett@digium.com>

	* CHANGES, apps/app_chanspy.c: ChanSpy: Add ability to specify
	  channel uniqueids as well as channel names. * Made ChanSpy accept
	  a channel uniqueid or a fully specified channel name as the
	  chanprefix parameter if the 'u' option is specified. (closes
	  issue AFS-42) Review: https://reviewboard.asterisk.org/r/3160/

2014-01-31 22:39 +0000 [r407030-407032]  Mark Michelson <mmichelson@digium.com>

	* include/asterisk/res_pjsip_presence_xml.h (added), /: Add file
	  that apparently got missed in the merge. ........ Merged
	  revisions 407031 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_pidf_body_generator.c (added),
	  include/asterisk/res_pjsip_exten_state.h (removed),
	  res/res_pjsip_pubsub.exports.in, /,
	  include/asterisk/res_pjsip_body_generator_types.h (added),
	  res/res_pjsip_mwi.c, res/res_pjsip_xpidf_body_generator.c
	  (added), res/res_pjsip_mwi_body_generator.c (added),
	  res/res_pjsip_pubsub.c, res/res_pjsip_pidf.c (removed),
	  res/res_pjsip_pidf_eyebeam_body_supplement.c (added),
	  res/res_pjsip_exten_state.c, res/res_pjsip/presence_xml.c
	  (added), include/asterisk/res_pjsip_pubsub.h: Decouple
	  subscription handling from NOTIFY/PUBLISH body generation. When
	  the PJSIP pubsub framework was created, subscription handlers
	  were required to state what event they handled along with what
	  body types they knew how to generate. While this serves well when
	  implementing a base RFC, it has problems when trying to extend
	  the body to support non-standard or proprietary body elements.
	  The code also was NOTIFY-specific, meaning that when the time
	  comes that we start writing code to send out PUBLISH requests
	  with MWI or presence bodies, we would likely find ourselves
	  duplicating code that had previously been written. This changeset
	  introduces the concept of body generators and body supplements. A
	  body generator is responsible for allocating a native structure
	  for a given body type, providing the primary body content,
	  converting the native structure to a string, and deallocating
	  resources. A body supplement takes the primary body content (the
	  native structure, not a string) generated by the body generator
	  and adds nonstandard elements to the body. With these elements
	  living in their own module, it becomes easy to extend our support
	  for body types and to re-use resources when sending a PUBLISH
	  request. Body generators and body supplements register themselves
	  with the pubsub core, similar to how subscription and publish
	  handlers had done. Now, subscription handlers do not need to know
	  what type of body content they generate, but they still need to
	  inform the pubsub core about what the default body type for a
	  given event package is. The pubsub core keeps track of what body
	  generators and body supplements have been registered. When a
	  SUBSCRIBE arrives, the pubsub core will check that there is a
	  subscription handler for the event in the SUBSCRIBE, then it will
	  check that there is a body generator that can provide the content
	  specified in the Accept header(s). Because of the nature of body
	  generators and supplements, it means res_pjsip_exten_state and
	  res_pjsip_mwi have been completely gutted. They no longer worry
	  about body types, instead calling
	  ast_sip_pubsub_generate_body_content() when they need to generate
	  a NOTIFY body. Review: https://reviewboard.asterisk.org/r/3150
	  ........ Merged revisions 407016 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-31 22:23 +0000 [r407015-407029]  Kevin Harwell <kharwell@digium.com>

	* contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py,
	  contrib/ast-db-manage/config/versions/2fc7930b41b3_add_pjsip_endpoint_options_for_12_1.py,
	  /, UPGRADE.txt: alembic: script modifications due to errors A
	  couple of the scripts had errors that would not allow a full
	  migration to take place. The extensions table needed to make its
	  'id' column a primary key in order to work with mysql. The other
	  script ...add_endpoints... was missing tables that it was trying
	  to add columns to. Added the primary key on id for extensions and
	  added the tables in for the missing pjsip configuration options.
	  While it is not ideal to modify already released scripts this was
	  a case where it had to be done due to errors in the script and
	  lacking a better alternative. Review:
	  https://reviewboard.asterisk.org/r/3167/ ........ Merged
	  revisions 407019 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_mwi.c: res_pjsip_mwi: Subscribe fails when
	  missing aor name When subscribing to MWI (res_pjsip_mwi) and the
	  sip uri did not contain a name (ex: sip:<ip address>) then the
	  subscription would fail since it would be unable to locate an
	  associated aor. This patch makes it so that when a subscribe
	  comes with no aor name then it will subscribe to all aors on the
	  located endpoint. (closes issue ASTERISK-23072) Reported by: Bob
	  M Review: https://reviewboard.asterisk.org/r/3164/ ........
	  Merged revisions 407014 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-31 15:08 +0000 [r407001]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip_nat.c, /: PJSIP: Fix address for ACK in NAT
	  situations In NAT scenarios where a call is placed to a
	  Grandstream phone, res_pjsip will sometimes send the ACK to a 200
	  OK to the private address of the device behind the NAT instead of
	  the address of the NAT device. This corrects that behavior by
	  rewriting the address in the Contact header in the incoming 200
	  OK and the dialog's target address if necessary (since it has
	  already been rewritten to the incorrect private address). (closes
	  issue ASTERISK-23106) Review:
	  https://reviewboard.asterisk.org/r/3168/ Reported by: Matt Jordan
	  ........ Merged revisions 407000 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-31 05:31 +0000 [r406988]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Skinny: fix up possible double unlock
	  of chan. Return before chan is possibly unlocked a second time
	  when hanging up a channel in SUBSTATE_OFFHOOK. ........ Merged
	  revisions 406987 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-30 20:36 +0000 [r406936]  Corey Farrell <git@cfware.com>

	* main/udptl.c, res/res_rtp_asterisk.c, /: res_rtp_asterisk &
	  udptl: fix port selection to work with SELinux restrictions
	  ast_bind to a port reserved for another program by SELinux causes
	  errno == EACCES. This caused random failures when binding rtp or
	  udptl sockets. Treat EACCES as a non-fatal error, try next port.
	  (closes issue ASTERISK-23134) Reported by: Corey Farrell ........
	  Merged revisions 406933 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406934 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406935 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-30 17:35 +0000 [r406920]  Sean Bright <sean@malleable.com>

	* main/manager.c, /: Make a NOTICE about an invalid channel name
	  more useful. ........ Merged revisions 406918 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406919 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-29 00:44 +0000 [r406863]  Russell Bryant <russell@russellbryant.com>

	* /, configs/queues.conf.sample: queues.conf.sample Fix documented
	  default for persistentmembers Closes issue ASTERISK-22662
	  ........ Merged revisions 406860 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406861 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406862 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-28 23:40 +0000 [r406789-406848]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_pubsub.c, /: res_pjsip_pubsub: potential crash on
	  timeout What seems to be happening is if a subscription has been
	  terminated and the subscription timeout/expires is less than the
	  time it takes for all pending transactions (currently on the
	  subscription) to end then the subscription timer will not have
	  been canceled yet and sub will be null. Since the subscription
	  has already been canceled nothing needs to be done so a null
	  check in the asterisk code is sufficient in working around this
	  problem. (closes issue ASTERISK-23129) Reported by: Dan Jenkins
	  ........ Merged revisions 406847 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* cdr/cdr_radius.c, cel/cel_radius.c, /, configure,
	  include/asterisk/autoconfig.h.in, configure.ac: cdr_radius,
	  cel_radius: build agains libfreeradius-client Asterisk's RADIUS
	  module currently build against libradiusclient-ng, but this
	  project has been superseeded by libfreeradius-client. The API is
	  99% compatible except that the header name has changed, the
	  library name has changed, and the configuration file location has
	  changed. (closes issue ASTERISK-22980) Reported by: Jeremy Lainé
	  Patches: freeradius-client.patch uploaded by sharky (license
	  6561) ........ Merged revisions 406801 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406802 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406803 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip/include/res_pjsip_private.h, /,
	  include/asterisk/compat.h: res_pjsip,compat: INFINITY and NAN
	  undefined On some systems the values for INFINITY and NAN are not
	  defined thus causing a build error on those systems. Added
	  definitions for those if they had not previously been defined.
	  (closes issue ASTERISK-23056) Reported by: capouch Patches:
	  inf-nan-patch.txt uploaded by capouch (license 6564) ........
	  Merged revisions 406788 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-28 19:19 +0000 [r406778]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_stasis_device_state.c: ARI: Make double subscribe
	  respond with success Currently, attempting to subscribe an
	  application to a device state that it has already subscribed to
	  will generate a 500 error response. This will now be treated as a
	  subscription refresh even though ARI subscriptions don't
	  currently support lifetimes and will respond with the normal
	  response for a successful subscription (200 OK). (closes issue
	  ASTERISK-23143) Reported by: Matt Jordan ........ Merged
	  revisions 406775 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-28 16:43 +0000 [r406724]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/rtp_engine.c, /: rtp_engine: improved handling of
	  get_rtp_info failure In ast_rtp_instance_make_compatible(), after
	  a failure of channel tech call get_rtp_info() to return
	  peer_instance, the null pointer would be passed to ao2_ref,
	  producing an error that looked like a refernce counting problem
	  but is not. This patch corrects that and adds helpful LOG_ERROR
	  messages to indicate which failure path occurred. (issue
	  AST-1276) Review: https://reviewboard.asterisk.org/r/3156/
	  ........ Merged revisions 406721 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406722 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406723 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-28 00:20 +0000 [r406710]  Richard Mudgett <rmudgett@digium.com>

	* /, tests/test_cel.c, tests/test_cdr.c: test_cdr.c, test_cel.c:
	  Correctly destroy created bridges. * Fixed the
	  test_cel_attended_transfer_bridges_link unit test to also account
	  for the local channel link being destroyed now that the bridges
	  are actually destroyed. * Made CDR unit test use its own version
	  of do_sleep() from the CEL unit tests. ........ Merged revisions
	  406707 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-27 22:54 +0000 [r406647-406696]  Kevin Harwell <kharwell@digium.com>

	* CHANGES: manager: ExtensionStatus event status human readable
	  Added a note in the changes file about the new 'StatusText' field
	  that was added to the 'ExtensionStatus' event. (issue
	  ASTERISK-23154) Reported by: Jonathan Rose

	* main/manager.c: manager: ExtensionStatus event status human
	  readable When an 'ExtensionStatus' event was raised it included
	  the status as a numerical value, but did not include a text
	  description of the status. Added a 'StatusText' field to the
	  event which is a string representation of the extension status.
	  Also added this to the 'Extension State' command response.
	  (closes issue ASTERISK-23154) Reported by: Jonathan Rose

2014-01-27 20:38 +0000 [r406646]  Russell Bryant <russell@russellbryant.com>

	* main/config.c, /: Allow nested #includes in extconfig.conf
	  extconfig.conf was hard-coded to not allow nested includes for
	  some reason. The code has been this way since a patch was merged
	  for ASTERISK-3333 (revision 4889), which was a significant update
	  to this code ("Merge config updates"). I can't figure out any
	  good reason why this should be limited. This patch just removes
	  the limit and uses the default nesting depth limit. Closes issue
	  ASTERISK-17837 Review: https://reviewboard.asterisk.org/r/3159/
	  ........ Merged revisions 406643 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406644 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406645 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-27 08:17 +0000 [r406618]  Walter Doekes <walter+asterisk@wjd.nu>

	* main/manager.c, UPGRADE.txt, configs/manager.conf.sample:
	  manager: The eventfilter= option now takes an extended regex. In
	  pre-trunk versions (...12) it accepts a basic regex, which is
	  confusing because all other regexes in asterisk are of the
	  extended kind. Review: https://reviewboard.asterisk.org/r/3147/

2014-01-27 01:25 +0000 [r406595]  Russell Bryant <russell@russellbryant.com>

	* main/file.c, include/asterisk/channel.h, main/channel.c, /:
	  Protect ast_filestream object when on a channel The
	  ast_filestream object gets tacked on to a channel via
	  chan->timingdata. It's a reference counted object, but the
	  reference count isn't used when putting it on a channel. It's
	  theoretically possible for another thread to interfere with the
	  channel while it's unlocked and cause the filestream to get
	  destroyed. Use the astobj2 reference count to make sure that as
	  long as this code path is holding on the ast_filestream and
	  passing it into the file.c playback code, that it knows it's
	  valid. Bug reported by Leif Madsen. Review:
	  https://reviewboard.asterisk.org/r/3135/ ........ Merged
	  revisions 406566 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406567 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406574 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-26 23:04 +0000 [r406517]  Richard Mudgett <rmudgett@digium.com>

	* /, main/tcptls.c: tcptls.c: Add missing cleanup on off nominal
	  path. ........ Merged revisions 406514 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406515 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406516 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-26 14:19 +0000 [r406503]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* contrib/scripts/live_ast: live_ast: run wrapped programs with
	  exec live_ast can be used as a wrapper script to run asterisk,
	  gdb or valgrind. In those cases it runs them and returns the
	  result. It is more useful to use 'exec' to avoid having another
	  odd process in the chain. Review:
	  https://reviewboard.asterisk.org/r/3110/

2014-01-26 02:11 +0000 [r406490]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.c, /: res_pjsip_session: Be less strict
	  with core requested outgoing capabilities. The core may
	  (depending on circumstances) request a single codec on outgoing
	  calls. Many channel drivers ignore or treat this as a suggestion
	  while still including configured codecs. The res_pjsip_session
	  logic treated this as an explicit request, leaving out other
	  configured codecs. This change makes res_pjsip_session behave
	  like other channel driver and simply adds the requested codec to
	  the list. (closes issue ASTERISK-23082) Reported by: xrobau
	  Review: https://reviewboard.asterisk.org/r/3140/ ........ Merged
	  revisions 406489 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-24 23:33 +0000 [r406466]  Richard Mudgett <rmudgett@digium.com>

	* /, main/cel.c: CEL: Protect data structures during reload and
	  shutdown. The CEL data structures need to be protected during a
	  configuration reload and shutdown. Asterisk crashed during a
	  shutdown because CEL events were still in flight and the CEL data
	  structures were already destroyed. * Protected the cel_backends,
	  cel_dialstatus_store, and cel_linkedids ao2 containers with a
	  global ao2 object wrapper. * Added NULL checks before use of the
	  cel_backends, cel_dialstatus_store, and cel_linkedids ao2
	  containers in case the CEL module is already shutdown. * Fixed
	  overloading of the cel_linkedids held objects reference count.
	  During shutdown any held objects would be leaked. * Fixed memory
	  leak of cel_linkedids held objects if the LINKEDID_END is not
	  being tracked. The objects in the cel_linkedids container were
	  not removed if the LINKEDID_END event is not used. * Added access
	  protection to the cel_backends container during the CLI "cel show
	  status" command. * Made cel_backends, cel_dialstatus_store, and
	  cel_linkedids use the standard ao2 callback templates for the
	  hash and cmp functions. * Eliminated unnecessary uses of
	  RAII_VAR(). * Made ast_cel_engine_init() cleanup alocated
	  resources on failure. (closes issue AST-1253) Reported by:
	  Guenther Kelleter Review:
	  https://reviewboard.asterisk.org/r/3128/ ........ Merged
	  revisions 406417 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406418 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406465 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-24 22:34 +0000 [r406416]  Jonathan Rose <jrose@digium.com>

	* main/utils.c, CHANGES: Thread Debugging: Add LWP to core show
	  locks output This patch adds the LWP to core show locks output if
	  it is available. Review: https://reviewboard.asterisk.org/r/3142/

2014-01-24 22:18 +0000 [r406407]  Richard Mudgett <rmudgett@digium.com>

	* main/manager.c, /: manager: Register atexit shutdown routine only
	  once. * Made register atexit shutdown routine only once in
	  __init_manager(). * Fixed some initial load failure conditions in
	  __init_manager(). * Made reset options to defaults on reload when
	  the reload will actually happen. * Removed unnecessary container
	  traversals of the white/black filters during manager_free_user().
	  * ast_free() does not need a NULL check before calling. ........
	  Merged revisions 406359 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406400 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406401 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-24 21:46 +0000 [r406399]  Jonathan Rose <jrose@digium.com>

	* res/res_config_pgsql.c, /: res_config_pgsql: Fix a memory leak
	  and use RAII_VAR for cleanup when practical Review:
	  https://reviewboard.asterisk.org/r/3141/ ........ Merged
	  revisions 406360 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406361 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406389 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-24 18:13 +0000 [r406343]  Richard Mudgett <rmudgett@digium.com>

	* main/manager.c, /: manager: Protect data structures during
	  shutdown. Occasionally, the manager module would get an
	  "INTERNAL_OBJ: bad magic number" error on a "core restart
	  gracefully" command if an AMI connection is established. * Added
	  ao2_global_obj protection to the sessions global container. *
	  Fixed the order of unreferencing a session object in
	  session_destroy(). * Removed unnecessary container traversals of
	  the white/black filters during session_destructor(). (closes
	  issue AST-1242) Reported by: Guenther Kelleter Review:
	  https://reviewboard.asterisk.org/r/3144/ ........ Merged
	  revisions 406341 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406342 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-23 23:43 +0000 [r406328]  Mark Michelson <mmichelson@digium.com>

	* /: Today is not my day for writing code that compiles. ........
	  Merged revisions 406327 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-23 22:56 +0000 [r406312]  Michael L. Young <elgueromexicano@gmail.com>

	* /, addons/res_config_mysql.c: res_config_mysql: Fix Setting The
	  Column Name Incorrectly When support for a realtime sorcery
	  module was added in revision 386731, the wrong property was
	  accidentally used for setting the column name to be updated in
	  the database table. This patch fixes the typo. (closes issue
	  ASTERISK-23177) Reported by: Denis Tested by: Denis Patches:
	  asterisk-23177-use-field-name.diff by Michael L. Young (license
	  5026) ........ Merged revisions 406311 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-23 21:18 +0000 [r406298]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pidf.c, /: Multiple revisions 406294-406295
	  ........ r406294 | mmichelson | 2014-01-23 15:00:24 -0600 (Thu,
	  23 Jan 2014) | 11 lines Fix presence body errors found during
	  testing: * PIDF bodies were reporting an "open" state in many
	  cases where it should have been reporting "closed" * XPIDF bodies
	  had XML nodes placed incorrectly within the hierarchy. * SIP URIs
	  in XPIDF bodies did not go through XML sanitization * XML
	  sanitization had some errors: * Right angle bracket was being
	  replaced with "&rt;" instead of "&gt;" * Double quote,
	  apostrophe, and ampersand were not being escaped. ........
	  r406295 | mmichelson | 2014-01-23 15:09:35 -0600 (Thu, 23 Jan
	  2014) | 11 lines Fix presence body errors found during testing: *
	  PIDF bodies were reporting an "open" state in many cases where it
	  should have been reporting "closed" * XPIDF bodies had XML nodes
	  placed incorrectly within the hierarchy. * SIP URIs in XPIDF
	  bodies did not go through XML sanitization * XML sanitization had
	  some errors: * Right angle bracket was being replaced with "&rt;"
	  instead of "&gt;" * Double quote, apostrophe, and ampersand were
	  not being escaped. ........ Merged revisions 406294-406295 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-22 22:24 +0000 [r406269]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/pbx.c, /, utils/extconf.c: pbx.c: Pre-initialize timezone to
	  avoid crash on destroy In ast_build_timing, initialize the
	  timezone value to NULL in order to avoid deferencing an
	  uninitialized value later when calling ast_destroy_timing. The
	  timezone value could be uninitialized if ast_build_timing were to
	  fail due to a zero length time string. (closes issue
	  ASTERISK-22861) Reported by: Sebastian Murray-Roberts Review:
	  https://reviewboard.asterisk.org/r/3134/ Patches:
	  ast_build_timing-initialize-timezone.patch uploaded by
	  coreyfarrell (license 5909) ........ Merged revisions 406241 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406245 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406264 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-22 19:36 +0000 [r406153-406224]  Kinsey Moore <kmoore@digium.com>

	* /, apps/app_confbridge.c: ConfBridge: Fix channel parameter
	  documentation Confbridge AMI and CLI commands for mute, unmute,
	  and setting the single video source can accept channel prefixes
	  in lieu of a full channel name, but documentation states only
	  that it is required and is a channel name. This corrects the
	  documentation. (closes issue PQ-1397) Reported by: Steve Pitts
	  ........ Merged revisions 406217 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406223 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: chan_sip: Decline image streams on
	  unsupported transports This change allows chan_sip to decline
	  individual image streams over unsupported transports in the SDP
	  of the 200 response. Previously, an image stream offer with
	  RTP/AVP as the transport would cause chan_sip to respond with a
	  488. (closes issue ASTERISK-22988) Reported by: adomjan Original
	  patch by: adomjan ........ Merged revisions 406170 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406171 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406172 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis_playback.c, /: res_stasis_playback: Correct error
	  argument order Several of the playback error messages for invalid
	  media input in res_stasis_playback.c had the media name and
	  channel name reversed. They now correctly identify the channel
	  name and media name. Reported by: skrusty ........ Merged
	  revisions 406152 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-21 21:48 +0000 [r406134]  Rusty Newton <rnewton@digium.com>

	* /, res/res_pjsip.c: res_pjsip: Documentation improvement for
	  Endpoint and AOR mailbox options. Making the help text for both
	  more explicit regarding the format of mailbox identifiers. i.e.
	  clarifying the format for app_voicemail mailboxes vs mailboxes
	  from external MWI sources through modules such as
	  res_external_mwi. ........ Merged revisions 406133 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-21 21:08 +0000 [r406082]  Walter Doekes <walter+asterisk@wjd.nu>

	* main/manager.c, /, configs/manager.conf.sample: manager: Clarify
	  eventfilter documentation. Textual changes only. Review:
	  https://reviewboard.asterisk.org/r/3133/ ........ Merged
	  revisions 406079 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406080 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406081 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-21 20:28 +0000 [r406006-406078]  Kinsey Moore <kmoore@digium.com>

	* channels/chan_mgcp.c, /: chan_mgcp: Enforce locking for oseq This
	  restricts direct usage of global oseq so that all accesses are
	  locked and threads are not racing to get oseq values that they
	  did not claim. This also fixes a build error in res_pktccops
	  under dev mode. (closes issue ASTERISK-23100) Reported by:
	  adomjan Patch by: adomjan ........ Merged revisions 406037 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 406038 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 406049 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_outbound_registration.c, res/res_pjsip.c: PJSIP:
	  Handle headers in a list appropriately The PJSIP header parsing
	  function (pjsip_parse_hdr) can generate more than one header
	  instance from a single header field. These header instances exist
	  as a list attached to the returned header and must be handled
	  appropriately when they are added to a message or else only the
	  first header instance will be used. This changes the linked list
	  functions used in outbound proxy code to merge the lists
	  properly. ........ Merged revisions 406020 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/ari/resource_sounds.h, res/ari/resource_bridges.h,
	  res/ari/resource_device_states.h, res/ari/resource_mailboxes.h,
	  res/ari/resource_asterisk.h, rest-api/api-docs/channels.json,
	  res/ari/resource_applications.h, res/ari/resource_channels.c,
	  res/res_ari_playbacks.c, res/res_ari_sounds.c,
	  rest-api-templates/asterisk_processor.py,
	  res/ari/resource_channels.h, res/res_ari_bridges.c, /,
	  res/res_ari_device_states.c,
	  rest-api-templates/ari_resource.h.mustache,
	  res/res_ari_mailboxes.c, res/res_ari_asterisk.c,
	  res/res_ari_applications.c,
	  rest-api-templates/res_ari_resource.c.mustache,
	  rest-api-templates/body_parsing.mustache (added),
	  res/res_ari_channels.c, res/ari/resource_playbacks.h,
	  rest-api-templates/param_parsing.mustache: ARI: Support channel
	  variables in originate This adds back in support for specifying
	  channel variables during an originate without compromising the
	  ability to specify query parameters in the JSON body. This was
	  accomplished by generating the body-parsing code in a separate
	  function instead of being integrated with the URI query parameter
	  parsing code such that it could be called by paths with body
	  parameters. This is transparent to the user of the API and
	  prevents manual duplication of code or data structures. (closes
	  issue ASTERISK-23051) Review:
	  https://reviewboard.asterisk.org/r/3122/ Reported by: Matt Jordan
	  ........ Merged revisions 406003 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-20 23:25 +0000 [r405985]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Skinny: fix up handling of fragmented
	  packets. Bad offset in reading second or more fragment of skinny
	  packets. Fixed to offset by char (single byte) rather than size
	  of req. ........ Merged revisions 405982 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-20 22:23 +0000 [r405947]  Richard Mudgett <rmudgett@digium.com>

	* channels/sig_pri.c, /: chan_dahdi/PRI: Suppress CONNECTED_LINE
	  updates when nothing in the udpate is valid. * Also simplified
	  some subddress handling code. (closes issue ASTERISK-23008)
	  Reported by: Michael Cargile ........ Merged revisions 405926
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 405927 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405928 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-20 21:56 +0000 [r405925]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Skinny: fix up session logging.
	  Logging from the skinny session loop was providing some incorrect
	  reasons for exiting the loop. Cleaned up messages and handling so
	  correct reason displayed. ........ Merged revisions 405924 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-20 18:18 +0000 [r405910]  Jonathan Rose <jrose@digium.com>

	* channels/chan_pjsip.c, /: chan_pjsip: Provide a means for
	  tracking device state when holding/unholding Previously PJSIP did
	  not track hold/unhold and it would always simply be 'inuse'. This
	  patch fixes that. review:
	  https://reviewboard.asterisk.org/r/3129/ ........ Merged
	  revisions 405908 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-19 00:01 +0000 [r405894]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Skinny: fix reversed device reset from
	  CLI. Existing code would do a full device restart when "skinny
	  reset device" was entered at the CLI and do a reset when "skinny
	  reset device restart" entered. ........ Merged revisions 405893
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-17 22:09 +0000 [r405878]  Sean Bright <sean@malleable.com>

	* /, channels/chan_sip.c: Make sure the maxptime attribute is added
	  to the correct offers. ........ Merged revisions 405877 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-17 21:33 +0000 [r405862-405876]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/format_pref.c, main/sorcery.c, main/frame.c, /,
	  include/asterisk/format_pref.h, res/res_pjsip_sdp_rtp.c: pjsip:
	  fix support for allow=all This change adds improvements to
	  support for allow=all in pjsip.conf so that it functions as
	  intended. Previously, the allow/disallow socery configuration
	  would set & clear codecs from the media.codecs and media.prefs
	  list, but if all was specified the prefs list was not updated.
	  Then a call would fail when create_outgoing_sdp_stream() created
	  an SDP with no audio codecs. A new function
	  ast_codec_pref_append_all() is provided to add all codecs to the
	  prefs list - only those not already on the list. This enables the
	  configuration to specify a codec preference, but still add all
	  codecs, and even then remove some codecs, as shown in this
	  example: allow = ulaw, alaw, all, !g729, !g723 Also, the display
	  order of allow in cli output is updated to match the
	  configuration by using prefs instead of caps when generating a
	  human readable string. Finally, a change to
	  create_outgoing_sdp_stream() skips a codec when it does not have
	  a payload code instead of the call failing. (closes issue
	  ASTERISK-23018) Reported by: xrobau Review:
	  https://reviewboard.asterisk.org/r/3131/ ........ Merged
	  revisions 405875 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/http.c: http: supported chunked Transfer-Encoding This
	  change implements support for HTTP Transfer-Encoding chunked in
	  both JSON and Form (post vars) body content. A new function
	  ast_http_get_contents() handles both regular and chunked mode
	  body, returning after the entire body is received. (closes issue
	  ASTERISK-23068) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3125/ ........ Merged
	  revisions 405861 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-17 18:55 +0000 [r405778-405844]  Rusty Newton <rnewton@digium.com>

	* res/res_pjsip.c, /: Fixing some XML syntax issues with my
	  previous commit at r405777 for ASTERISK-23071 ........ Merged
	  revisions 405843 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c, doc/asterisk.8, main/features.c,
	  configs/sip.conf.sample, apps/app_queue.c, apps/app_transfer.c,
	  channels/chan_iax2.c: Documentation: doc fixes across various
	  parts of the code for ASTERISK issues 23061,23028,23046,23027
	  Fixes typos of "transfered" instead of "transferred" in various
	  code. Fixes incorrect gosub param help text for app_queue. Fixes
	  Asterisk man pages containing unquoted minus signs. Adds note
	  about the "textsupport" option in sip.conf.sample. (issue
	  ASTERISK-23061) (issue ASTERISK-23028) (issue ASTERISK-23046)
	  (issue ASTERISK-23027) (closes issue ASTERISK-23061) (closes
	  issue ASTERISK-23028) (closes issue ASTERISK-23046) (closes issue
	  ASTERISK-23027) Reported by: Eugene, Jeremy Laine, Denis
	  Pantsyrev Patches: transferred.patch uploaded by Jeremy Laine
	  (license 6561) hyphen.patch uploaded by Jeremy Laine (license
	  6561) sip.conf.sample.patch uploaded by Eugene (license 6360)
	  ........ Merged revisions 405791 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 405792 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405829 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip.c, /: res_pjsip: enhance documentation for
	  mailboxes options, for both endpoints and aors Made documentation
	  more explicit as to the use of the both options. (issue
	  ASTERISK-23071) (closes issue ASTERISK-23071) Reported by: Matt
	  Jordan ........ Merged revisions 405777 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-17 14:17 +0000 [r405766]  Walter Doekes <walter+asterisk@wjd.nu>

	* res/res_musiconhold.c, CHANGES: Enable wide band audio in
	  musiconhold streams. Review:
	  https://reviewboard.asterisk.org/r/3112/

2014-01-16 20:06 +0000 [r405747-405749]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip/pjsip_options.c, /: res_pjsip: AOR option
	  qualify_frequency not respected on startup If an endpoint had
	  previously dynamically registered a contact and the contact
	  information was successfully stored in astdb then upon restart
	  the qualify notifications would not be sent out if the
	  qualify_frequency was set. This was due to the fact that only
	  permanent contacts were being checked and scheduled for qualifies
	  on startup. Modified the code to check and schedule all
	  registered contacts at startup. (closes issue ASTERISK-23062)
	  Reported by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/3124/ ........ Merged
	  revisions 405748 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/manager.c, /: manager: Originate doesn't abort on failed
	  format_cap allocation action_originate responds to the remote
	  system with an error when cap==NULL, but doesn't return (abort
	  the originate). Patched to return. (closes issue ASTERISK-23034)
	  Reported by: Corey Farrell Patches: ASTERISK-23034.patch uploaded
	  by coreyfarrell (license 5909) ........ Merged revisions 405745
	  from http://svn.asterisk.org/svn/asterisk/branches/11 ........
	  Merged revisions 405746 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-16 19:33 +0000 [r405744]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip.c: PJSIP: Fix outbound OPTIONS support When path
	  support was added and contacts were made available during request
	  creation and transmission, the code path used by outbound qualify
	  support was not modified correctly and was causing request
	  creation to fail. This ensures that outbound request creation
	  with only a contact and no dialog, endpoint, or uri can succeed
	  which restores qualify support. Reported by: gtjoseph Reported
	  by: kharwell ........ Merged revisions 405743 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-16 19:13 +0000 [r405644-405695]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_fax.c, configs/res_fax.conf.sample: res_fax:
	  check_modem_rate() returned incorrect rate for V.27 According to
	  the new standard for V.27 and V.32 they are able to transmit at a
	  bit rate of 4,800 or 9,600. The check_mode_rate function needed
	  to be updated to reflect this. Also, because of this change the
	  default 'minrate' value was updated to be 4800. (closes issue
	  ASTERISK-22790) Reported by: Paolo Compagnini Patches:
	  res_fax.txt uploaded by looserouting (license 6548) ........
	  Merged revisions 405656 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 405693 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405694 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_pjsip.c: chan_pjsip: initial device state on
	  endpoints is INVALID When endpoints get loaded their device state
	  gets set to 'INVALID' because the channel driver has not been
	  loaded yet. Fixed by updating the device state for every endpoint
	  upon load of the channel driver. (closes issue ASTERISK-23065)
	  Reported by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/3123/ ........ Merged
	  revisions 405643 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-15 16:51 +0000 [r405586-405589]  Jonathan Rose <jrose@digium.com>

	* CHANGES: Make 12 - 12.1 CHANGES log the same as in 12

	* CHANGES, /: Include CHANGES info for r405553 ........ Merged
	  revisions 405585 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-15 16:36 +0000 [r405584]  Joshua Colp <jcolp@digium.com>

	* /, cel/cel_manager.c: cel_manager: Don't crash if configuration
	  file is invalid. The cel_manager module did not properly handle
	  the case where the configuration file was invalid. The module
	  will now output a warning message and disable itself if this
	  occurs. Reported by: Bryan Walters ........ Merged revisions
	  405581 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 405582 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405583 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-15 13:16 +0000 [r405566]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip/location.c, res/res_pjsip_outbound_registration.c,
	  res/res_pjsip_path.c (added), res/res_pjsip_mwi.c,
	  res/res_pjsip/pjsip_distributor.c, res/res_pjsip_diversion.c,
	  channels/chan_pjsip.c, res/res_pjsip_registrar.c,
	  res/res_pjsip_refer.c, include/asterisk/res_pjsip.h,
	  include/asterisk/res_pjsip_session.h, res/res_pjsip_notify.c, /,
	  res/res_pjsip_messaging.c, res/res_pjsip_caller_id.c,
	  res/res_pjsip_t38.c, res/res_pjsip.c,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip_nat.c,
	  res/res_pjsip_session.c,
	  contrib/ast-db-manage/config/versions/2fc7930b41b3_add_pjsip_endpoint_options_for_12_1.py
	  (added), res/res_pjsip_header_funcs.c: PJSIP: Add Path header
	  support This adds Path support to chan_pjsip in res_pjsip_path.c
	  with minimal additions in res_pjsip_registrar.c to store the path
	  and additions in res_pjsip_outbound_registration.c to enable
	  advertisement of path support to registrars and intervening
	  proxies. Path information is stored on contacts and is enabled
	  via Address of Record (AoRs) and Registration configuration
	  sections. While adding path support, it became necessary to be
	  able to add SIP supplements that handled messages outside of
	  sessions, so a framework for handling these types of hooks was
	  added in parallel to the already-existing session supplements and
	  several senders of out-of-dialog requests were refactored as a
	  result. (closes issue ASTERISK-21084) Review:
	  https://reviewboard.asterisk.org/r/3050/ ........ Merged
	  revisions 405565 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-14 23:44 +0000 [r405554]  Jonathan Rose <jrose@digium.com>

	* res/res_stasis_mailbox.exports.in (added),
	  res/ari/ari_model_validators.h, rest-api/api-docs/mailboxes.json
	  (added), include/asterisk/stasis_app_mailbox.h (added),
	  res/ari/resource_mailboxes.c (added), /, res/ari.make,
	  res/res_ari_mailboxes.c (added), res/ari/resource_mailboxes.h
	  (added), res/res_stasis_mailbox.c (added),
	  rest-api/resources.json, res/ari/ari_model_validators.c: ARI: Add
	  mailboxes resource for controlling and polling external MWI Adds
	  the following AMI commands: PUT mailboxes/mailboxName modifies
	  mailbox state and implicitly creates new mailboxes GET
	  mailboxes/mailboxName retrieves a JSON representation of a single
	  mailbox if it exists GET mailboxes retrieves a JSON array of all
	  mailboxes DELETE mailbox/mailboxName deletes a mailbox Note that
	  res_mwi_external must be loaded for these functions to actually
	  do anything. Review: https://reviewboard.asterisk.org/r/3117/
	  ........ Merged revisions 405553 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-14 21:46 +0000 [r405542]  Richard Mudgett <rmudgett@digium.com>

	* main/strings.c, /: string container: Remove unnecessary RAII_VAR
	  usage and string object lock. ........ Merged revisions 405541
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-14 18:15 +0000 [r405437]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, channels/chan_sip.c: chan_sip: fix Local From tag on outbound
	  register regression In ASTERISK-12117, an improvement to insure
	  consistant local from tags on outbound registrations resulted in
	  an undesirable behavior - caused by leftover unexpired sip_pvt
	  dialogs (with the previous cseq number), resulting in many
	  uncessary REGISTER requests. Instead of significant rework of
	  transmit_register(), this change deletes the dialogs after a 200
	  OK response indiciating a successful registration, keeping the
	  old dialogs from interfering with normal operation. (closes issue
	  ASTERISK-22946) Reported by: Stephan Eisvogel Review:
	  https://reviewboard.asterisk.org/r/3109/ ........ Merged
	  revisions 405433 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 405434 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405435 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-14 18:14 +0000 [r405436]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_verbose.c, main/asterisk.c, configs/logger.conf.sample,
	  main/cli.c, include/asterisk/logger.h, main/pbx.c,
	  main/manager.c, /, funcs/func_timeout.c, apps/app_dumpchan.c,
	  main/logger.c, UPGRADE.txt: verbosity: Fix performance of console
	  verbose messages. The per console verbose level feature as
	  previously implemented caused a large performance penalty. The
	  fix required some minor incompatibilities if the new rasterisk is
	  used to connect to an earlier version. If the new rasterisk
	  connects to an older Asterisk version then the root console
	  verbose level is always affected by the "core set verbose"
	  command of the remote console even though it may appear to only
	  affect the current console. If an older version of rasterisk
	  connects to the new version then the "core set verbose" command
	  will have no effect. * Fixed the verbose performance by not
	  generating a verbose message if nothing is going to use it and
	  then filtered any generated verbose messages before actually
	  sending them to the remote consoles. * Split the "core set debug"
	  and "core set verbose" CLI commands to remove the per module
	  verbose support that cannot work with the per console verbose
	  level. * Added a silent option to the "core set verbose" command.
	  * Fixed "core set debug off" tab completion. * Made "core show
	  settings" list the current console verbosity in addition to the
	  root console verbosity. * Changed the default verbose level of
	  the 'verbose' setting in the logger.conf [logfiles] section. The
	  default is now to once again follow the current root console
	  level. As a result, using the AMI Command action with "core set
	  verbose" could again set the root console verbose level and
	  affect the verbose level logged. (closes issue AST-1252) Reported
	  by: Guenther Kelleter Review:
	  https://reviewboard.asterisk.org/r/3114/ ........ Merged
	  revisions 405431 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405432 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-14 16:43 +0000 [r405420]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip/pjsip_distributor.c: Fix erroneous behavior when
	  sending auth rejection to artificial endpoint. We were not
	  including an authentication challenge when sending a 401 response
	  to unmatched endpoints. This was due to the conversion to use a
	  vector for authentication section names on an endpoint. The
	  vector for artificial endpoints was empty, resulting in the
	  challenge being sent back containing no challenges. This is
	  worked around by placing a bogus value in the artificial
	  endpoint's auth vector. This value is never looked up by
	  anything, since they instead will directly call
	  ast_sip_get_artificial_auth().

2014-01-14 03:27 +0000 [r405369]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Skinny: do not add call to missed
	  calls list if answered elsewhere. Patch updates skinny devices
	  with a SKINNY_CONNECTED callstate if an inbound ringing or
	  callwaiting call is answered elsewhere. ........ Merged revisions
	  405367 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-13 13:34 +0000 [r405339]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip/pjsip_cli.c: res_pjsip: Fix CLI tab completion
	  issues This fixes several issues with the new res_pjsip CLI tab
	  completion such as output of headers during tab completion and
	  being able to tab-complete more items than the code actually
	  handled (further items would simply be ignored). (closes issue
	  ASTERISK-23081) Review: https://reviewboard.asterisk.org/r/3115/
	  Reported by: xrobau ........ Merged revisions 405338 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-12 22:24 +0000 [r405326]  Joshua Colp <jcolp@digium.com>

	* res/ari/resource_playbacks.c, res/ari/resource_channels.c,
	  include/asterisk/ari.h, res/ari/resource_bridges.c,
	  res/ari/resource_recordings.c, res/ari/resource_device_states.c,
	  res/res_ari.c, res/ari/resource_endpoints.c, /,
	  res/ari/resource_applications.c: res_ari: Fix various memory
	  leaks. This change fixes a few memory leaks that were found based
	  on a mailing list post. 1. Some JSON response messages were never
	  freed. This was caused by the documentation stating that message
	  references were stolen when in reality they were not. The code
	  now follows the documentation and usage has been updated. 2. HTTP
	  response headers were never freed. 3. The variable list for
	  wildcards paths was never freed. (closes issue ASTERISK-23128)
	  Reported by: Kenneth Watson (on list) Review:
	  https://reviewboard.asterisk.org/r/3119/ ........ Merged
	  revisions 405325 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-12 22:13 +0000 [r405313-405314]  Matthew Jordan <mjordan@digium.com>

	* apps/app_forkcdr.c, /, funcs/func_cdr.c, include/asterisk/cdr.h,
	  apps/app_cdr.c, main/cdr.c: CDRs: Synchronize dialplan
	  applications that manipulate CDRs with the engine In
	  https://reviewboard.asterisk.org/r/3057/, applications and
	  functions that manipulate CDRs were made to interact over Stasis.
	  This was done to synchronize manipulations of CDRs from the
	  dialplan with the updates the engine itself receives over the
	  message bus. This change rested on a faulty premise: that
	  messages published to the CDR topic or to a topic that forwards
	  to the CDR topic are synchronized with the messages handled by
	  the CDR topic subscription in the CDR engine. This is not the
	  case. There is no ordering guaranteed for two messages published
	  to the same topic; ordering is only guaranteed if a message is
	  published to the same subscriber. Stasis was modified in r405311
	  to allow a publisher to synchronize on the subscriber. This patch
	  uses that API to synchronize the CDR publishers with the CDR
	  engine message router, which maintains the overall topic
	  subscription. (closes issue ASTERISK-22884) Reported by: Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/3099/ ........
	  Merged revisions 405312 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis.c, main/stasis_message_router.c, /,
	  include/asterisk/stasis.h,
	  include/asterisk/stasis_message_router.h, tests/test_stasis.c:
	  stasis: Add methods to allow for synchronous publishing to
	  subscriber This patch adds an API call to Stasis that allows a
	  publisher to publish a stasis message that will not return until
	  a specific subscriber handles the message. Since a subscriber can
	  have their own forwarding topic which orders messages from many
	  topics, this allows a publisher who knows of that subscriber to
	  synchronize to that subscriber regardless of the forwarding
	  relationships between topics. This is of particular use for
	  dialplan applications that need to synchronize on a particular
	  subscriber's handling of a message. (issue ASTERISK-22884)
	  Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3099/ ........ Merged
	  revisions 405311 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-10 20:00 +0000 [r405299]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip/security_events.c: Print "<unknown>" for
	  artificial endpoint in PJSIP security events. Previously, this
	  printed a UUID, which was not very clear when dealing with an
	  artificial endpoint. Review:
	  https://reviewboard.asterisk.org/r/3113 ........ Merged revisions
	  405298 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-10 18:17 +0000 [r405284]  Richard Mudgett <rmudgett@digium.com>

	* /, main/logger.c: Logging callid: Fix some sizeof() references
	  per coding guidelines. ........ Merged revisions 405281 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405282 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-09 23:52 +0000 [r405270]  Jonathan Rose <jrose@digium.com>

	* res/res_pjsip_session.c: PJSIP: Add unhold on reinvite without
	  SDP behavior Review: https://reviewboard.asterisk.org/r/3106/

2014-01-09 23:50 +0000 [r405269]  Damien Wedhorn <voip@facts.com.au>

	* channels/chan_dahdi.c, /: Fix chan_dahdi copile issue in
	  dev-mode. Error "unused variable i in dahdi_create_channel_range"
	  when compiling in dev-mode. Small restructure to
	  dahdi_create_channel_range to move the for(x) loop and int i,x to
	  a block within the IFDEF. ........ Merged revisions 405268 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-09 23:39 +0000 [r405267]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip.c, /, res/res_pjsip_messaging.c:
	  res_pjsip_messaging: potential for field values in from/to
	  headers to be missing Added in ability to specify display name
	  format ("name" <sip:name@ipaddr:port>) for a given URI and made
	  sure it was fully propagated to the outgoing message. Also made
	  it so outoing messages in res_pjsip always send as "sip:".
	  (closes issue ASTERISK-22924) Reported by: Anthony Messina
	  Review: https://reviewboard.asterisk.org/r/3094/ ........ Merged
	  revisions 405266 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-09 20:34 +0000 [r405254]  Kinsey Moore <kmoore@digium.com>

	* main/astobj2.c, res/res_pjsip_session.c, /,
	  include/asterisk/astobj2.h: astobj2: Correct ao2_iterator opacity
	  violations This corrects the ao2_iterator opacity violations in
	  res_pjsip_session.c by adding a global function to get the number
	  of elements inside the container hidden behind the iterator.
	  (closes issue ASTERISK-23053) Review:
	  https://reviewboard.asterisk.org/r/3111/ Reported by: Richard
	  Mudgett ........ Merged revisions 405253 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-09 16:52 +0000 [r405236]  Kevin Harwell <kharwell@digium.com>

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Fails to resume
	  WebRTC call from hold In ast_rtp_ice_start if the ice session
	  create check list failed, start check was never initiated and
	  ice_started was never set to true. Upon re-entering the function
	  (for instance, [un]hold) it would try to create the check list
	  again with duplicate remote candidates. Fixed so that if the
	  create check list fails the necessary data structures are
	  properly re-initialized for any subsequent retries. Note, it was
	  decided to not stop ice support (by calling ast_rtp_ice_stop) on
	  a check list failure because it possible things might still work.
	  However, a debug message was added to help with any future
	  troubleshooting. (closes issue ASTERISK-22911) Reported by: Vytis
	  Valentinavičius Patches: works_on_my_machine.patch uploaded by
	  xytis (license 6558) ........ Merged revisions 405234 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405235 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-09 15:50 +0000 [r405217]  Matthew Jordan <mjordan@digium.com>

	* /, apps/app_confbridge.c,
	  apps/confbridge/conf_state_multi_marked.c: app_confbridge: Fix
	  crash caused when waitmarked/marked users leave together When
	  waitmarked users join a ConfBridge, the conference state is
	  transitioned from EMPTY -> INACTIVE. In this state, the users are
	  maintined in a waiting users list. When a marked user joins, the
	  ConfBridge conference transitions from INACTIVE -> MULTI_MARKED,
	  and all users are put onto the active list of users. This process
	  works correctly. When the marked user leaves, if they are the
	  last marked user, the MULTI_MARKED state does the following: (1)
	  It plays back a message to the bridge stating that the leader has
	  left the conference. This requires an unlocking of the bridge.
	  (2) It moves waitmarked users back to the waiting list (3) It
	  transitions to the appropriate state: in this case, INACTIVE
	  However, because it plays the prompt back to the bridge before
	  moving the users and before finishing the state transition, this
	  creates a race condition: with the bridge unlocked, waitmarked
	  users who leave the conference (or are kicked from it) can cause
	  a state transition of the bridge to another state before the
	  conference is transitioned to the INACTIVE state. This causes the
	  state machine to get a bit wonky, often leading to a crash when
	  the MULTI_MARKED state attempts to conclude its processing. This
	  patch fixes this problem: (1) It prevents kicked users from being
	  kicked again. That's just a nicety. (2) More importantly, it
	  fixes the race condition by only playing the prompt once the
	  state has transitioned correctly to INACTIVE. If waitmarked users
	  sneak out during the prompt being played, no harm no foul.
	  Review: https://reviewboard.asterisk.org/r/3108/ Note that the
	  patch committed here is essentially the same as uploaded by Simon
	  Moxon on ASTERISK-22740, with the addition of the double kick
	  prevention. (closes issue AST-1258) Reported by: Steve Pitts
	  (closes issue ASTERISK-22740) Reported by: Simon Moxon patches:
	  ASTERISK-22740.diff uploaded by Simon Moxon (license 6546)
	  ........ Merged revisions 405215 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405216 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-09 14:15 +0000 [r405163]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, apps/app_dumpchan.c: "Minimun" typo. ........ Merged revisions
	  405160 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 405161 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405162 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-08 17:23 +0000 [r405144]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip/security_events.c: Use proper case for checking
	  if digest authentication is used. ........ Merged revisions
	  405131 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-08 16:34 +0000 [r405129-405130]  Kinsey Moore <kmoore@digium.com>

	* /, configure, configure.ac, pbx/pbx_lua.c: pbx_lua: Add support
	  for Lua 5.2 This adds support for Lua 5.2 in pbx_lua which is
	  available on newer operating systems. (closes issue
	  ASTERISK-23011) Review: https://reviewboard.asterisk.org/r/3075/
	  Reported by: George Joseph Patch by: George Joseph ........
	  Merged revisions 405090 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 405091 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405124 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: Add the missing part of r400140 When the
	  patch to add retry-on-forbidden-response was committed, part of
	  the patch for chan_sip was not committed which caused the feature
	  to be entirely nonfunctional. This corrects the code in question.
	  (closes issue ASTERISK-17138) Review:
	  https://reviewboard.asterisk.org/r/2874 ........ Merged revisions
	  405033 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 405081 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 405083 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-07 19:56 +0000 [r405020-405035]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_acl.c: res_pjsip_acl: Fix another case of
	  assuming a contact will always contain a URI. ........ Merged
	  revisions 405034 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_nat.c: res_pjsip_nat: Don't assume a Contact
	  header will always contain a URI. If the 'rewrite_contact' option
	  was enabled and a Contact header was received which contained a
	  '*' a crash would occur. This change makes the res_pjsip_nat
	  module ignore the Contact header if it contains only a '*'.
	  (closes issue ASTERISK-23101) Reported by: Matt Jordan ........
	  Merged revisions 405019 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-06 21:55 +0000 [r404953-405007]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_voicemail.c, /: app_voicemail: Explicitly set
	  defaultenabled=yes ........ Merged revisions 405006 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_mwi_external_ami.c (added): External MWI AMI support.
	  The external MWI AMI interface provides a thin wrapper around the
	  core external MWI resource. The resource adds the following AMI
	  actions: MWIGet, MWIDelete, and MWIUpdate. (closes issue AFS-46)
	  Review: https://reviewboard.asterisk.org/r/3061/ ........ Merged
	  revisions 404954 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_mwi_external.c (added), configs/sorcery.conf.sample,
	  include/asterisk/res_mwi_external.h (added),
	  res/res_mwi_external.exports.in (added), apps/app_voicemail.c:
	  External MWI core support. * The core external MWI resource
	  provides for MWI message counts persistence using sorcery. With
	  sorcery, the user is able to configure which sorcery wizzard
	  backend to use if the default astdb is not desired. * The core
	  external MWI resoruce provides some debugging CLI commands
	  enabled by defining MWI_DEBUG_CLI. The debugging CLI commands
	  are: "mwi delete all", "mwi delete like <regex>", "mwi delete
	  mailbox <mailbox>", "mwi list all", "mwi list like <regex>", "mwi
	  show mailbox <mailbox>", and "mwi update mailbox <mailbox> [<new>
	  [<old>]]". (closes issue AFS-43) Review:
	  https://reviewboard.asterisk.org/r/3061/ ........ Merged
	  revisions 404952 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-05 16:01 +0000 [r404924-404936]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration: Don't assume that a registration
	  client will always exist. ........ Merged revisions 404935 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration: Create registration client in pj
	  thread. Depending on which threading was loading the outbound
	  registration it was possible for the registration client to be
	  allocated outside of a pj thread. This change moves the creation
	  inside the synchronous task where it is guaranteed it will occur
	  in a pj thread. Reported by: Rob Thomas ........ Merged revisions
	  404923 from http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-04 10:52 +0000 [r404912]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* main/asterisk.c, /: asterisk.c: suppress live_dangerously warning
	  on rasterisk Even since the fixes of AST-2013-007, Asterisk
	  prints the following warning on startup if the user decided to
	  live dangerously: Privilege escalation protection disabled! See
	  https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. This
	  message is intended for the logs and interactive startup. No need
	  for it to appear on a remote console. This commit removes it from
	  there. (closes issue ASTERISK-23084) Review:
	  https://reviewboard.asterisk.org/r/3101/ ........ Merged
	  revisions 404861 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404888 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404911 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-03 22:00 +0000 [r404860]  Kevin Harwell <kharwell@digium.com>

	* cel/cel_pgsql.c, /: cel_pgsql: module not correctly reloading
	  Upon reload the module unconditionally "unloaded" the module
	  (freeing memory and setting pointers to NULL) and then when
	  attempting a "load" if the config file had not changed then
	  nothing would be reinitialized. By moving the "unload" to occur
	  conditionally (reload only) after an attempted configuration
	  load, but before module "loading" alleviates the issue. The
	  module now loads/unloads/reloads correctly. (closes issue
	  ASTERISK-22871) Reported by: Matteo ........ Merged revisions
	  404857 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 404858 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404859 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-03 21:45 +0000 [r404844-404856]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_pjsip_logger.c: res_pjsip_logger: Add the
	  ASTERISK_FILE_VERSION macro Registering yourself with the
	  Asterisk core is the nice thing to do, even when you're a logging
	  module. ........ Merged revisions 404855 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_authenticator_digest.c, tests/test_utils.c:
	  res_pjsip_authenticator_digest: Fix md5 hash buffer An md5 hash
	  is 32 bytes long. The char buffer must be at least 33 bytes to
	  avoid clobbering of the stack. This patch also fixes a potential
	  clobbering in test_utils.c. Thanks to Andrew Nagy for reporting
	  and testing this out in #asterisk-dev Reported by: Andrew Nagy
	  Tested by: Andrew Nagy ........ Merged revisions 404843 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-03 20:02 +0000 [r404787-404832]  Kevin Harwell <kharwell@digium.com>

	* main/manager.c: manager: UserEvent including action on output AMI
	  action UserEvent event response would include the action header
	  in its keyvalue pairs list. Adjusted the start of the header loop
	  to skip over the action part. (closes issue ASTERISK-22899)
	  Reported by: outtolunc Patches:
	  svn_manager.c.skip_action.diff.txt uploaded by outtolunc (license
	  5198)

	* channels/chan_dahdi.c, /: chan_dahdi: dahdi show channels slices
	  PRI channel dnid on output dahdi show channels output slices the
	  callerid (which is dnid copied over on PRI channels). If the
	  channel naming structures look like: 'DAHDI/i1/1408409XXXX-6'
	  then the output slices 1408409XXXX down to 1408409XXX. This patch
	  just opens it up to 15 chars so you can see the whole thing.
	  (closes issue ASTERISK-22918) Reported by: outtolunc Patches:
	  svn_chan_dahdi.c.format12_15.diff.txt uploaded by outtolunc
	  (license 5198) ........ Merged revisions 404784 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404785 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404786 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-03 18:33 +0000 [r404783]  Richard Mudgett <rmudgett@digium.com>

	* tests/test_stasis.c, /: test_stasis.c: Fix ref leak in normal
	  execution path. ........ Merged revisions 404764 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-03 18:31 +0000 [r404782]  Kevin Harwell <kharwell@digium.com>

	* /, apps/app_meetme.c: app_meetme: compiler warning Fixed a
	  compiler warning (errors in 'dev-mode') given by gcc version
	  4.8.1. The one in app_meetme involved the
	  'sizeof-pointer-memaccess' (see:
	  http://gcc.gnu.org/gcc-4.8/porting_to.html) warning. Fixed so it
	  would no longer issue a warning and can compile again in
	  'dev-mode'. Review: https://reviewboard.asterisk.org/r/3098/
	  ........ Merged revisions 404742 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404773 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404781 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-03 17:27 +0000 [r404726-404738]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip/pjsip_configuration.c, /, res/res_pjsip/location.c:
	  res_pjsip: Ensure more URI validation happens in pj threads.
	  ........ Merged revisions 404737 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_outbound_registration.c:
	  res_pjsip_outbound_registration: Ensure URI validation happens in
	  a pjlib thread. This change moves outbound registration URI
	  validation into the task executed within a pjlib thread. Reported
	  by: Andrew Nagy ........ Merged revisions 404725 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-02 19:38 +0000 [r404677]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, funcs/func_strings.c: func_strings: use memmove to prevent
	  overlapping memory on strcpy When calling REPLACE() with an empty
	  replace-char argument, strcpy is used to overwrite the the
	  matching <find-char>. However as the src and dest arguments to
	  strcpy must not overlap, it causes other parts of the string to
	  be overwritten with adjacent characters and the result is
	  mangled. Patch replaces call to strcpy with memmove and adds a
	  test suite case for REPLACE. (closes issue ASTERISK-22910)
	  Reported by: Gareth Palmer Review:
	  https://reviewboard.asterisk.org/r/3083/ Patches:
	  func_strings.patch uploaded by Gareth Palmer (license 5169)
	  ........ Merged revisions 404674 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404675 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404676 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2014-01-02 19:08 +0000 [r404664]  Kevin Harwell <kharwell@digium.com>

	* channels/chan_pjsip.c, include/asterisk/res_pjsip.h, /,
	  configs/pjsip.conf.sample, res/res_pjsip/pjsip_configuration.c,
	  CHANGES, res/res_pjsip.c: res_pjsip: add 'set_var' support on
	  endpoints Added a new 'set_var' option for ast_sip_endpoint(s).
	  For each variable specified that variable gets set upon creation
	  of a pjsip channel involving the endpoint. (closes issue
	  ASTERISK-22868) Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/3095/ ........ Merged
	  revisions 404663 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-31 22:51 +0000 [r404620-404653]  Joshua Colp <jcolp@digium.com>

	* channels/chan_pjsip.c, res/res_pjsip_session.c, /: chan_pjsip:
	  Handle hanging up before calling. Channel creation in Asterisk is
	  broken up into two steps: requesting and calling. In some cases a
	  channel may be requested but never called. This happens in the
	  ChanIsAvail dialplan application for determining if something is
	  reachable or not. The PJSIP channel driver did not take this
	  situation into account and attempted to end a session that was
	  never called out on. The code now checks the session state to
	  determine if the session has been called out on and if not
	  terminates it instead of ending it. (closes issue ASTERISK-23074)
	  Reported by: Kilburn ........ Merged revisions 404652 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_endpoint_identifier_ip.c:
	  res_pjsip_endpoint_identifier_ip: Accept hostnames in the 'match'
	  field. Hostnames specified in the 'match' field will be resolved
	  and all addresses returned. Each address will be added to the
	  endpoint identifier for the matching process. Reported by: Rob
	  Thomas ........ Merged revisions 404613 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-31 21:39 +0000 [r404606]  Kevin Harwell <kharwell@digium.com>

	* cel/cel_pgsql.c, /: cel_pgsql: deadlock on unload and
	  core_event_dispatcher A deadlock can happen between a thread
	  unloading or reloading the cel_pgsql module and the
	  core_event_dispatcher taskprocessor thread. Description of what
	  is happening: Thread 1 (for example, a netconsole thread): a
	  "module reload cel_pgsql" is launched the thread enter the
	  "my_unload_module" function (cel_pgsql.c) the thread acquire the
	  write lock on psql_columns the thread enter the
	  "ast_event_unsubscribe" function (event.c) the thread try to
	  acquire the write lock on ast_event_subs[sub->type] Thread 2
	  (core_event_dispatcher taskprocessor thread): the taskprocessor
	  pop a CEL event the thread enter the "handle_event" function
	  (event.c) the thread acquire the read lock on
	  ast_event_subs[sub->type] the thread callback the "pgsql_log"
	  function (cel_pgsql.c), since it's a subscriber of CEL events the
	  thread try to acquire a read lock on psql_columns (closes issue
	  ASTERISK-22854) Reported by: Etienne Lessard Patches:
	  cel_pgsql_fix_deadlock_event.patch uploaded by hexanol (license
	  6394) ........ Merged revisions 404603 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404604 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404605 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-31 20:27 +0000 [r404593]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_outbound_registration.c, /:
	  res_pjsip_outbound_registration: Add validation for 'server_uri'
	  and 'client_uri'. When applying configuration for outbound
	  registrations the 'server_uri' and 'client_uri' fields were not
	  validated. The code will now confirm that they exist and that
	  they contain parseable SIP URIs. Reported by: Andrew Nagy
	  ........ Merged revisions 404592 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-30 23:25 +0000 [r404582]  Kevin Harwell <kharwell@digium.com>

	* main/channel.c, /: channels.c: core show channeltypes slicing
	  'core show channeltypes' type column is being sliced, resulting
	  in incomplete type names. (closes issue ASTERISK-22919) Reported
	  by: outtolunc Patches: svn_channel.c.format_15.diff.txt uploaded
	  by outtolunc (license 5198) ........ Merged revisions 404579 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404581 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-24 17:12 +0000 [r404567-404569]  David M. Lee <dlee@digium.com>

	* UPGRADE-12.txt, /: Added note to UPGRADE.txt about the default
	  value of live_dangerously changing ........ Merged revisions
	  404568 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/http.c: http: Properly reject requests with
	  Transfer-Encoding set Asterisk does not support any of the
	  transfer encodings specified in HTTP/1.1, other than the default
	  "identity" encoding. According to RFC 2616: A server which
	  receives an entity-body with a transfer-coding it does not
	  understand SHOULD return 501 (Unimplemented), and close the
	  connection. A server MUST NOT send transfer-codings to an
	  HTTP/1.0 client. This patch adds the 501 Unimplemented response,
	  instead of the hard work of actually implementing other
	  recordings. This behavior is especially problematic for Node.js
	  clients, which use chunked encoding by default. (closes issue
	  ASTERISK-22486) Review: https://reviewboard.asterisk.org/r/3092/
	  ........ Merged revisions 404565 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-24 02:20 +0000 [r404554]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_pubsub.c: res_pjsip_pubsub: Ensure dialog
	  manipulation happens on proper thread. When destroying a
	  subscription we remove the serializer from its dialog and
	  decrease its reference count. Depending on which thread dropped
	  the subscription reference count to 0 it was possible for this to
	  occur in a thread where it is not possible. (closes issue
	  ASTERISK-22952) Reported by: Matt Jordan ........ Merged
	  revisions 404553 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-23 16:38 +0000 [r404542]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* channels/chan_dahdi.c, configs/chan_dahdi.conf.sample,
	  UPGRADE-12.txt: chan_dahdi: enable ignore_failed_channels by
	  default If ignore_failed_channels is set to "true" for a channel,
	  the channel will continue to be configured even if configuring it
	  has failed. This allows Asterisk to start before all the DAHDI
	  initialization is done and thus not force the starting order
	  dahdi -> asterisk. Review:
	  https://reviewboard.asterisk.org/r/3063/

2013-12-21 03:35 +0000 [r404532]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_pjsip/pjsip_cli.c: res_pjsip/pjsip_cli: fix
	  compilation error caused by passing ast_free When wanting to pass
	  *free as a function pointer, ast_free_ptr has to be used instead
	  of ast_free. This allows it to be compiled with MALLOC_DEBUG
	  enabled. ........ Merged revisions 404531 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 22:04 +0000 [r404511-404512]  David M. Lee <dlee@digium.com>

	* rest-api/api-docs/channels.json, res/ari/resource_channels.c,
	  res/res_ari_channels.c, res/ari/resource_channels.h, /,
	  rest-api/api-docs/applications.json: ari: Remove support for
	  specifying channel vars during origination. When we added support
	  for specifying channel variables for an origination, we didn't
	  consider how that would interact with another feature, namely
	  specifying request parameters in a JSON request body. The method
	  of specifying channel variables (as a flat JSON object passed in
	  the JSON body) interferes with parsing parameters out of the
	  request body. Unfortunately, fixing this would be a backward
	  incompatible change. In the interest of keeping the API sane and
	  keeping our release schedule, we're dropping the feature for
	  specifying channel variables in the origination request. We will
	  bring the feature back soon, as a backward compatible addition to
	  the API. (closes issue ASTERISK-23051) Review:
	  https://reviewboard.asterisk.org/r/3088 ........ Merged revisions
	  404509 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /: Remove automerge properties ........ Merged revisions 404488
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 21:32 +0000 [r404507]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/config.h, main/config.c, main/channel.c,
	  res/res_pjsip/location.c, include/asterisk/res_pjsip_cli.h
	  (added), res/res_pjsip/pjsip_cli.c (added),
	  include/asterisk/sorcery.h, res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/include/res_pjsip_private.h,
	  res/res_pjsip_registrar.c, main/sorcery.c,
	  include/asterisk/res_pjsip.h, CREDITS,
	  res/res_pjsip/config_auth.c, /,
	  res/res_pjsip_endpoint_identifier_ip.c: res_pjsip: Add PJSIP CLI
	  commands Implements the following cli commands: pjsip list aors
	  pjsip list auths pjsip list channels pjsip list contacts pjsip
	  list endpoints pjsip show aor(s) pjsip show auth(s) pjsip show
	  channels pjsip show endpoint(s) Also... Minor modifications made
	  to the AMI command implementations to facilitate reuse. New
	  function ast_variable_list_sort added to config.c and config.h to
	  implement variable list sorting. (issue ASTERISK-22610) patches:
	  pjsip_cli_v2.patch uploaded by george.joseph (License 6322)
	  ........ Merged revisions 404480 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 21:18 +0000 [r404461]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, main/say.c: say.c: correct time for polish In
	  ast_say_date_with_format_pl(), change ast_say_number() to use
	  tm_sec instead of tm_mn. (closes issue ASTERISK-22856) Reported
	  by: Robert Mordec Review:
	  https://reviewboard.asterisk.org/r/3082/ Patches: say.c.patch
	  uploaded by veilen (license 6555) ........ Merged revisions
	  404456 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 404457 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404458 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 20:28 +0000 [r404452]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_refer.c: Fix issue where PJSIP blind transferer
	  dialog may not complete as planned. When transferring to a
	  dialplan extension that will not place any outbound calls, the
	  only control frames that the PJSIP REFER framehook will receive
	  are inconsequential (such as unhold or srcchange). As such, we
	  shouldn't allow for the reception of those types of frames
	  prevent us from signaling to the transferring party that the
	  transfer has completed successfully once voice frames are read.
	  Thanks to Jonathan Rose for pointing this out. ........ Merged
	  revisions 404439 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 20:05 +0000 [r404438]  Matthew Jordan <mjordan@digium.com>

	* /, res/ari/resource_applications.h,
	  res/res_stasis_device_state.c: res_stasis_device_state: Set
	  resource type for subscriptions to deviceState The documentation
	  for ARI already specifies that the device state resource when
	  used for subscribing for events is "deviceState", not
	  "device_state". The code, however, used "device_state"; although
	  this was inconsistent as well in doxygen comments in
	  resource_applications. Because the actual resource being
	  subscribed to is /deviceStates/{device}/, it makes sense for the
	  resource type specifier to be deviceState. Note that the key
	  value in the events is still "device_state". ........ Merged
	  revisions 404437 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 20:00 +0000 [r404436]  Richard Mudgett <rmudgett@digium.com>

	* res/ari/resource_channels.c, tests/test_scoped_lock.c,
	  tests/test_stasis.c, res/parking/parking_manager.c,
	  res/ari/resource_bridges.c, res/ari/resource_endpoints.c, /,
	  res/res_pjsip/location.c, tests/test_cel.c: ao2_iterator:
	  Mini-audit of the ao2_iterator loops in the new code files. *
	  Fixed several places where ao2_iterator_destroy() was not called.
	  * Fixed several iterator loop object variable reference problems.
	  * Fixed res_parking AMI actions returning non-zero. Only the AMI
	  logoff action can return non-zero. Review:
	  https://reviewboard.asterisk.org/r/3087/ ........ Merged
	  revisions 404434 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 19:25 +0000 [r404433]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/manager.h, /: manager: bump version to 2.0.0 AMI
	  has received substantial updates over the past year. Not only has
	  the syntax been vastly improved and made consistent (which
	  entails many event changes), but the underlying things that those
	  events convey have changed substantially as well. After some
	  conversation in #asterisk-dev, it was agreed that this is a good
	  time to jump to 2. At the same time, since ARI will most likely
	  use semantic versioning, we might as well use that for AMI as
	  well. That also affords us greater meaning for the AMI version.
	  ........ Merged revisions 404421 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 19:06 +0000 [r404420]  Richard Mudgett <rmudgett@digium.com>

	* /, main/sounds_index.c: Whitespace fixes. ........ Merged
	  revisions 404419 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-20 17:22 +0000 [r404406]  Rusty Newton <rnewton@digium.com>

	* /, configs/pjsip.conf.sample: Documentation: Updates for info
	  about NAT-related settings and fixes for pjsip.conf.sample Added
	  another NAT example to pjsip.conf.sample. We had a few mentions
	  of NAT configuration throughout the sample, but I added another
	  for a little bit more clarity. Additionally many pjsip options
	  were affected by the change to snake case, so I fixed any
	  instances of those options in pjsip.conf. I regenerated the
	  config option list (at the bottom of the file) from a new xml
	  config doc dump, so all the snake case changes should be
	  reflected there, as well as any other changes to those options.
	  (issue ASTERISK-23004) (closes issue ASTERISK-23004) Reported by:
	  Matt Jordan Review: https://reviewboard.asterisk.org/r/3086/
	  ........ Merged revisions 404405 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 20:48 +0000 [r404387]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/security_events.c: security_events: log events with
	  descriptive names This patch updates the log messages to include
	  descriptive names for event types. This is an improvement over
	  having only cryptic type numbers. (closes issue ASTERISK-22909)
	  Reported by: outtolunc Review:
	  https://reviewboard.asterisk.org/r/3081/ Patches:
	  svn_security_events.c.names.diff.txt uploaded by outtolunc
	  (license 5198)

2013-12-19 18:16 +0000 [r404376]  Richard Mudgett <rmudgett@digium.com>

	* /, CHANGES: Put notice in CHANGES as well as UPGRADE.txt.
	  ........ Merged revisions 404375 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 18:00 +0000 [r404370-404372]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip/pjsip_outbound_auth.c, /: res_pjsip: Ignore 401/407
	  responses for transactions and dialogs we don't know about. Under
	  normal conditions it is unlikely we will ever receive a response
	  for a transaction or dialog we don't know about but if any are
	  received ignore them. ........ Merged revisions 404371 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_session.c: res_pjsip_session: Fix SDP
	  negotiation when resending an INVITE with authentication. The
	  process for resending an INVITE with authentication involves
	  restarting the UAC session. We were incorrectly passing in that a
	  new offer is being sent, causing the SDP negotiation to get into
	  a (technically speaking) funky state. ........ Merged revisions
	  404369 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 17:45 +0000 [r404368]  Mark Michelson <mmichelson@digium.com>

	* include/asterisk/channel.h, res/res_pjsip.c, main/channel.c, /,
	  include/asterisk/autochan.h: Fix a deadlock that occurred due to
	  a conflict of masquerades. For the explanation, here is a
	  copy-paste of the review board explanation: Initially, it was
	  discovered that performing an attended transfer of a multiparty
	  bridge with a PJSIP channel would cause a deadlock. A PBX thread
	  started a masquerade and reached the point where it was calling
	  the fixup() callback on the "original" channel. For chan_pjsip,
	  this involves pushing a synchronous task to the session's
	  serializer. The problem was that a task ahead of the fixup task
	  was also attempting to perform a channel masquerade. However,
	  since masquerades are designed in a way to only allow for one to
	  occur at a time, the task ahead of the fixup could not continue
	  until the masquerade already in progress had completed. And of
	  course, the masquerade in progress could not complete until the
	  task ahead of the fixup task had completed. Deadlock. The initial
	  fix was to change the fixup task to be asynchronous. While this
	  prevented the deadlock from occurring, it had the frightful side
	  effect of potentially allowing for tasks in the session's
	  serializer to operate on a zombie channel. Taking a step back
	  from this particular deadlock, it became clear that the problem
	  was not really this one particular issue but that masquerades
	  themselves needed to be addressed. A PJSIP attended transfer
	  operation calls ast_channel_move(), which attempts to both set up
	  and execute a masquerade. The problem was that after it had set
	  up the masquerade, the PBX thread had swooped in and tried to
	  actually perform the masquerade. Looking at changes that had been
	  made to Asterisk 12, it became clear that there never is any time
	  now that anyone ever wants to set up a masquerade and allow for
	  the channel thread to actually perform the masquerade. Everyone
	  always is calling ast_channel_move(), performs the masquerade
	  itself before returning. In this patch, I have removed all blocks
	  of code from channel.c that will attempt to perform a masquerade
	  if ast_channel_masq() returns true. Now, there is no distinction
	  between setting up a masquerade and performing the masquerade. It
	  is one operation. The only remaining checks for
	  ast_channel_masq() and ast_channel_masqr() are in ast_hangup()
	  since we do not want to interrupt a masquerade by hanging up the
	  channel. Instead, now ast_hangup() will wait for a masquerade to
	  complete before moving forward with its operation. The
	  ast_channel_move() function has been modified to basically
	  in-line the logic that used to be in ast_channel_masquerade().
	  ast_channel_masquerade() has been killed off for real.
	  ast_channel_move() now has a lock associated with it that is used
	  to prevent any simultaneous moves from occurring at once. This
	  means there is no need to make sure that ast_channel_masq() or
	  ast_channel_masqr() are already set on a channel when
	  ast_channel_move() is called. It also means the channel container
	  lock is not pulling double duty by both keeping the container
	  locked and preventing multiple masquerades from occurring
	  simultaneously. The ast_do_masquerade() function has been renamed
	  to do_channel_masquerade() and is now internal to channel.c. The
	  function now takes explicit arguments of which channels are
	  involved in the masquerade instead of a single channel. While it
	  probably is possible to do some further refactoring of this
	  method, I feel that I would be treading dangerously. Instead, all
	  I did was change some comments that no longer are true after this
	  changeset. The other more minor change introduced in this patch
	  is to res_pjsip.c to make ast_sip_push_task_synchronous() run the
	  task in-place if we are already a SIP servant thread. This is
	  related to this patch because even when we isolate the channel
	  masquerade to only running in the SIP servant thread, we would
	  still deadlock when the fixup() callback is reached since we
	  would essentially be waiting forever for ourselves to finish
	  before actually running the fixup. This makes it so the fixup is
	  run without having to push a task into a serializer at all.
	  (closes issue ASTERISK-22936) Reported by Jonathan Rose Review:
	  https://reviewboard.asterisk.org/r/3069 ........ Merged revisions
	  404356 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 17:13 +0000 [r404355]  Richard Mudgett <rmudgett@digium.com>

	* main/udptl.c, addons/chan_ooh323.c, /, channels/chan_sip.c,
	  include/asterisk/udptl.h: udptl: Dead code elimination.
	  ast_udptl_bridge was not used. Removing dead code starting with
	  ast_udptl_bridge() eliminated the code in this change. Note: This
	  code has actually been dead since Asterisk v1.4 when it was first
	  put in. Review: https://reviewboard.asterisk.org/r/3079/ ........
	  Merged revisions 404354 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 17:03 +0000 [r404353]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, res/res_fax.c: res_fax.c: crash on framehook with no dsp in
	  fax detect In fax_detect_framehook() a null pointer reference can
	  occur where a voice frame is processed but no dsp is attached to
	  the fax detection structure. The code block that rejects frames
	  that detection cannot be processed on is checking for dsp but
	  falls through when it should instead return, as this change
	  implements. (closes issue ASTERISK-22942) Reported by: adomjan
	  Review: https://reviewboard.asterisk.org/r/3076/ ........ Merged
	  revisions 404351 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404352 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 16:52 +0000 [r404350]  Richard Mudgett <rmudgett@digium.com>

	* configs/skinny.conf.sample, res/res_xmpp.c, res/res_jabber.c,
	  CHANGES, channels/chan_iax2.c, channels/sig_pri.c,
	  channels/h323/chan_h323.h, configs/iax.conf.sample,
	  channels/sig_pri.h, channels/chan_dahdi.c,
	  include/asterisk/app.h, channels/chan_skinny.c,
	  channels/chan_dahdi.h, channels/chan_h323.c, main/app.c,
	  UPGRADE-12.txt, configs/sip.conf.sample,
	  channels/sip/include/sip.h, channels/chan_mgcp.c,
	  apps/app_voicemail.c, channels/chan_unistim.c,
	  configs/chan_dahdi.conf.sample, /, channels/chan_sip.c,
	  configs/voicemail.conf.sample, funcs/func_vmcount.c: Voicemail:
	  Remove mailbox identifier format (box@context) assumptions in the
	  system. This change is in preparation for external MWI support.
	  Removed code from the system for normal mailbox handling that
	  appends @default to the mailbox identifier if it does not have a
	  context. The only exception is the legacy hasvoicemail users.conf
	  option. The legacy option will only work for app_voicemail
	  mailboxes. The system cannot make any assumptions about the
	  format of the mailbox identifer used by app_voicemail. chan_sip
	  and chan_dahdi/sig_pri had the most changes because they both
	  tried to interpret the mailbox identifier. chan_sip just stored
	  and compared the two components. chan_dahdi actually used the box
	  information. The ISDN MWI support configuration options had to be
	  reworked because chan_dahdi was parsing the box@context format to
	  get the box number. As a result the mwi_vm_boxes chan_dahdi.conf
	  option was added and is documented in the chan_dahdi.conf.sample
	  file. Review: https://reviewboard.asterisk.org/r/3072/ ........
	  Merged revisions 404348 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 16:33 +0000 [r404346]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/db.c, /: astdb: crash in sqlite3 during shutdown When
	  Asterisk is shut down, the astdb_atexit() function releases
	  (finalize) the previously initiated (prepared) SQL statements in
	  sqlite3. Another thread making a subsequent request can cause a
	  crash in sqlite3. This patch eliminates that issue by resetting
	  the statement pointer after it is released/cleared. The sqlite3
	  code detects the null pointer, and aborts the operation cleanly.
	  (closes issue AST-1265) Reported by: Alexander Hömig (closes
	  issue ASTERISK-22350) Reported by: Birger "WIMPy" Harzenetter
	  Review: https://reviewboard.asterisk.org/r/3078/ ........ Merged
	  revisions 404344 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404345 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 12:18 +0000 [r404333]  Joshua Colp <jcolp@digium.com>

	* main/channel.c, /: channel: Add a missing ast_channel_unlock when
	  allocating a Surrogate channel. ........ Merged revisions 404332
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 08:35 +0000 [r404321]  Alexandr Anikin <may@telecom-service.ru>

	* addons/ooh323c/src/oochannels.c, addons/ooh323c/src/ooGkClient.c,
	  addons/chan_ooh323.c, /, addons/ooh323c/src/ooGkClient.h: Handle
	  temporary failures on gk registration Introduce new 'stopped'
	  state for gk client and restart gk client on failures Remove
	  ooh323 stack command lock as it is not need now. (closes issue
	  ASTERISK-21960) Reported by: Dmitry Melekhov Patches:
	  ASTERISK-21960.patch ASTERISK-21960-stacklockup-2.patch Tested
	  by: Dmitry Melekhov ........ Merged revisions 404318 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404320 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 02:59 +0000 [r404307]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Fixup some skinny bugs causing Fracks
	  and ao2 cleanup issues. Moved channel locking into setsubstate so
	  that a process can complete working on a sub before another
	  starts changing it. The existing code was causing some Fracks
	  with schedule deletion. Removed multiple rtp cleanup. Now only
	  cleansup up once, fixing ao2 object cleanup issues. ........
	  Merged revisions 404306 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 00:50 +0000 [r404295]  Matthew Jordan <mjordan@digium.com>

	* include/asterisk/cdr.h, CHANGES, apps/app_cdr.c, main/cdr.c,
	  apps/app_forkcdr.c, main/pbx.c, /, funcs/func_cdr.c,
	  apps/app_disa.c, UPGRADE-12.txt: app_cdr,app_forkcdr,func_cdr:
	  Synchronize with engine when manipulating state When doing the
	  rework of the CDR engine that pushed all of the logic into cdr.c
	  and made it respond to changes in channel state over Stasis, we
	  knew that accessing the CDR engine from the dialplan would be
	  "slightly" non-deterministic. Dialplan threads would be accessing
	  CDRs while Stasis threads would be updating the state of said
	  CDRs - whereas in the past, everything happened on the dialplan
	  threads. Tests have shown that "slightly" is in reality "very".
	  This patch synchronizes things by making the dialplan
	  applications/functions that manipulate CDRs do so over Stasis.
	  ForkCDR, NoCDR, ResetCDR, CDR, and CDR_PROP now all use Stasis to
	  send their requests over to the CDR engine, and synchronize on
	  the channel Stasis topic via a subscription so that they return
	  their values/control to the dialplan at the appropriate time.
	  While going through this, the following changes were also made: *
	  DISA, which can reset the CDR when a user successfully
	  authenticates, now just uses the ResetCDR app to do this. This
	  prevents having to duplicate the same Stasis synchronization
	  logic in that application. * Answer no longer disables CDRs. It
	  actually didn't work anyway - calling DISABLE on the channel's
	  CDR doesn't stop the CDR from getting the Answer time - it just
	  kills all CDRs on that channel, which isn't what the caller would
	  intend. (closes issue ASTERISK-22884) (closes issue
	  ASTERISK-22886) Review: https://reviewboard.asterisk.org/r/3057/
	  ........ Merged revisions 404294 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-19 00:32 +0000 [r404293]  Damien Wedhorn <voip@facts.com.au>

	* /, channels/chan_skinny.c: Fixup skinny registration following
	  network issues. On session registration, if device is already
	  reporting that it is connected to a device, an innocuous packet
	  (update time) is sent to the already connected device. If the tcp
	  connection is down, the device will be unregistered and the new
	  connection allowed. Without this patch, network issues can see a
	  situation where a device can not reregister until after
	  3*timeout. ........ Merged revisions 404292 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 23:00 +0000 [r404280]  Jason Parker <jparker@digium.com>

	* main/manager.c, /: Add AMI event for presence state. Review:
	  https://reviewboard.asterisk.org/r/3039/ ........ Merged
	  revisions 404275 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404279 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 21:12 +0000 [r404264]  Richard Mudgett <rmudgett@digium.com>

	* addons/ooh323c/src/ooTimer.c, /: ooh323c: Fix gcc 4.6.3 compiler
	  warnings. ........ Merged revisions 404212 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404219 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404263 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 20:48 +0000 [r404260-404262]  Kevin Harwell <kharwell@digium.com>

	* channels/chan_oss.c, /: chan_oss.c: channel being locked twice
	  and unlocked once Removed channel lock as it is now being down in
	  ast_channel_alloc ........ Merged revisions 404261 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* pbx/pbx_realtime.c, channels/chan_alsa.c, main/stasis_channels.c,
	  addons/chan_mobile.c, main/bridge_channel.c, tests/test_cdr.c,
	  channels/chan_pjsip.c, res/parking/parking_manager.c,
	  channels/chan_mgcp.c, channels/chan_unistim.c, main/pbx.c,
	  funcs/func_timeout.c, /, apps/app_meetme.c, main/bridge.c,
	  tests/test_stasis_channels.c, include/asterisk/channel.h,
	  channels/chan_gtalk.c, channels/sig_pri.c, apps/app_queue.c,
	  main/cel.c, main/stasis_bridges.c, channels/chan_jingle.c,
	  channels/chan_phone.c, channels/chan_dahdi.c, main/dial.c,
	  channels/sig_analog.c, include/asterisk/stasis_channels.h,
	  res/res_agi.c, channels/chan_motif.c, tests/test_cel.c,
	  apps/app_confbridge.c, res/res_stasis.c, res/res_pjsip_refer.c,
	  apps/app_voicemail.c, apps/app_dial.c, channels/chan_vpb.cc,
	  addons/chan_ooh323.c, main/pickup.c, include/asterisk/aoc.h,
	  include/asterisk/stasis_bridges.h, apps/app_userevent.c,
	  apps/app_disa.c, channels/chan_console.c,
	  include/asterisk/channelstate.h, main/core_local.c,
	  channels/chan_iax2.c, main/endpoints.c, channels/chan_oss.c,
	  res/parking/parking_bridge_features.c, apps/app_agent_pool.c,
	  main/channel.c, channels/chan_misdn.c, channels/chan_skinny.c:
	  channel locking: Add locking for channel snapshot creation
	  Original commit message by mmichelson (asterisk 12 r403311):
	  "This adds channel locks around calls to create channel snapshots
	  as well as other functions which operate on a channel and then
	  end up creating a channel snapshot. Functions that expect the
	  channel to be locked prior to being called have had their
	  documentation updated to indicate such." The above was initially
	  committed and then reverted at r403398. The problem was found to
	  be in core_local.c in the publish_local_bridge_message function.
	  The ast_unreal_lock_all function locks and adds a reference to
	  the returned channels and while they were being unlocked they
	  were not being unreffed when no longer needed. Fixed by unreffing
	  the channels. Also in bridge.c a lock was obtained on
	  "other->chan", but then an attempt was made to unlock "other" and
	  not the previously locked channel. Fixed by unlocking
	  "other->chan" (closes issue ASTERISK-22709) Reported by: John
	  Bigelow ........ Merged revisions 404237 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 19:36 +0000 [r404211]  Alexandr Anikin <may@telecom-service.ru>

	* addons/chan_ooh323.c, configs/ooh323.conf.sample: Introduce new
	  config option 'aniasdni'. If yes then asterisk set dialed number
	  as own id back to the caller on incoming h.323 calls. Option can
	  be set globally or per user section. (closes issue
	  ASTERISK-22020) Reported by: Ross Beer

2013-12-18 19:28 +0000 [r404210]  Joshua Colp <jcolp@digium.com>

	* channels/chan_mgcp.c, main/pbx.c, channels/chan_sip.c,
	  apps/confbridge/conf_chan_record.c, tests/test_app.c,
	  tests/test_stasis_channels.c, main/core_unreal.c,
	  include/asterisk/channel.h, channels/chan_console.c,
	  channels/chan_oss.c, channels/chan_jingle.c,
	  channels/chan_misdn.c, channels/chan_h323.c, tests/test_cel.c,
	  channels/chan_nbs.c, channels/chan_pjsip.c, res/res_calendar.c,
	  apps/app_voicemail.c, channels/chan_unistim.c,
	  tests/test_substitution.c, channels/chan_vpb.cc,
	  addons/chan_ooh323.c, channels/chan_multicast_rtp.c, /,
	  apps/app_meetme.c, res/res_stasis_snoop.c, channels/chan_gtalk.c,
	  channels/chan_iax2.c, main/channel.c, channels/chan_dahdi.c,
	  channels/chan_phone.c, channels/chan_skinny.c,
	  res/parking/parking_tests.c, channels/chan_motif.c,
	  tests/test_voicemail_api.c, channels/chan_alsa.c, main/message.c,
	  addons/chan_mobile.c, tests/test_cdr.c: channels: Return
	  allocated channels locked. This change makes ast_channel_alloc
	  return allocated channels locked. By doing so no other thread can
	  acquire, lock, and manipulate the channel before it is completely
	  set up. (closes issue AST-1256) Review:
	  https://reviewboard.asterisk.org/r/3067/ ........ Merged
	  revisions 404204 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 19:10 +0000 [r404198]  Alexandr Anikin <may@telecom-service.ru>

	* addons/chan_ooh323.c: Implement module reload command for
	  chan_ooh323 (close issue ASTERISK-22817) Patches:
	  ooh323_module_reload.patch

2013-12-18 12:46 +0000 [r404185]  Matthew Jordan <mjordan@digium.com>

	* rest-api/api-docs/applications.json,
	  rest-api/api-docs/playbacks.json,
	  rest-api/api-docs/channels.json, rest-api/api-docs/sounds.json,
	  rest-api/resources.json, rest-api/api-docs/bridges.json,
	  rest-api/api-docs/recordings.json,
	  rest-api/api-docs/deviceStates.json,
	  rest-api/api-docs/endpoints.json, rest-api/api-docs/events.json,
	  /, rest-api/api-docs/asterisk.json: ari: Bump the version of ARI
	  to 1.0.0 (closes issue ASTERISK-23007) ........ Merged revisions
	  404184 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 12:01 +0000 [r404138]  Joshua Colp <jcolp@digium.com>

	* res/res_calendar.c, /: res_calendar: Protect channel when adding
	  datastore. This change adds a missing channel lock when adding a
	  datastore to a channel. ........ Merged revisions 404135 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404136 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404137 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 00:36 +0000 [r404100]  Rusty Newton <rnewton@digium.com>

	* /, funcs/func_strings.c: func_strings: Documentation fix for
	  QUOTE() Example output was inaccurate. (issue ASTERISK-22970)
	  (closes issue ASTERISK-22970) Reported by: Gareth Palmer Patches:
	  func_strings.patch uploaded by Gareth Palmer (license 5169)
	  ........ Merged revisions 404081 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 404087 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 404099 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-18 00:17 +0000 [r404051]  Matthew Jordan <mjordan@digium.com>

	* /, LICENSE: LICENSE: Update language to include ARI ........
	  Merged revisions 404050 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-17 23:57 +0000 [r404049]  Jonathan Rose <jrose@digium.com>

	* /, tests/test_cel.c, tests/test_cdr.c: tests: fix
	  ast_bridge_base_new calls not using the additional arguments
	  r404042 gave ast_bridge_base_new two new arguments for setting a
	  bridge creator and name. Unfortunately since a couple test
	  modules aren't compiled by default, I missed the fact that this
	  change impacted those tests and caused compilation failures
	  against them. ........ Merged revisions 404048 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-17 23:38 +0000 [r404047]  Rusty Newton <rnewton@digium.com>

	* include/asterisk/test.h, main/channel.c, main/rtp_engine.c, /,
	  channels/chan_iax2.c, apps/app_chanspy.c, apps/app_mixmonitor.c:
	  Several components: fixing Typos in comments and code,
	  "avaliable" instead of "available" (issue ASTERISK-23021) (closes
	  issue ASTERISK-23021) Reported by: Jeremy Lainé Tested by: Rusty
	  Newton Patches: available.patch uploaded by Jeremy Lainé (license
	  6561) ........ Merged revisions 404046 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-17 23:25 +0000 [r404043]  Jonathan Rose <jrose@digium.com>

	* apps/app_bridgewait.c, res/ari/ari_model_validators.c,
	  doc/appdocsxml.xslt, main/stasis_bridges.c,
	  rest-api/api-docs/bridges.json, res/ari/resource_bridges.c,
	  apps/app_agent_pool.c, res/parking/parking_bridge.c,
	  res/ari/ari_model_validators.h, main/manager_bridges.c,
	  res/ari/resource_bridges.h, include/asterisk/bridge_internal.h,
	  apps/app_confbridge.c, res/res_stasis.c,
	  include/asterisk/bridge.h, res/res_ari_bridges.c, /,
	  main/bridge.c, main/bridge_basic.c,
	  include/asterisk/stasis_bridges.h, include/asterisk/stasis_app.h:
	  bridging: Give bridges a name and a known creator Bridges have
	  two new optional properties, a creator and a name. Certain
	  consumers of bridges will automatically provide bridges that they
	  create with these properties. Examples include app_bridgewait,
	  res_parking, app_confbridge, and app_agent_pool. In addition, a
	  name may now be provided as an argument to the POST function for
	  creating new bridges via ARI. (closes issue AFS-47) Review:
	  https://reviewboard.asterisk.org/r/3070/ ........ Merged
	  revisions 404042 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-17 18:35 +0000 [r404028-404030]  Joshua Colp <jcolp@digium.com>

	* res/res_sorcery_config.c, /: res_sorcery_config: Output an error
	  message when an object can't be created. If object creation fails
	  an error message will now be output with the id, type, and
	  configuration file. ........ Merged revisions 404029 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/framehook.c: framehooks: Re-iterate if framehook provides
	  different frame. Framehooks can be used in a reactive manner to
	  execute specific logic when a frame is received with a certain
	  type and payload. Since it is possible for framehooks to provide
	  frames it was possible for this reactive framehook to be unaware
	  of frames it is looking for. This change makes it so that when
	  framehooks return a modified frame the code will now re-iterate
	  (from the beginning) and call any previous framehooks that have
	  not provided a modified frame themselves. Review:
	  https://reviewboard.asterisk.org/r/3046/ ........ Merged
	  revisions 404027 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-17 14:41 +0000 [r404008-404009]  David M. Lee <dlee@digium.com>

	* /, configs/asterisk.conf.sample, main/asterisk.c: Changed the
	  default for live_dangerously to no ........ Merged revisions
	  404006 from http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/pjsip, /: Setting svn:ignore ........ Merged revisions
	  403748 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-17 12:59 +0000 [r403994]  Matthew Jordan <mjordan@digium.com>

	* /, res/ari/resource_channels.c: ari/resource_channels: When
	  creating a channel, specify a default format (SLIN) When creating
	  channels via ARI, the current code fails to provide any default
	  format capabilities. For non-virtual channels this isn't really a
	  problem - the channels typically receive their capabilities as a
	  result of the underlying channel driver configuration. For
	  virtual channels (such as Local channels), the lack of any format
	  capabilities causes the Asterisk core to make some 'odd' choices
	  with respect to the translation paths. The issue reporter had
	  some paths that had 3 hops on each channel leg, causing multiple
	  transcodings and some really crappy audio/performance. By
	  specifying a baseline of SLIN, we prevent that from occurring.
	  Note that this is what AMI does when it performs an Originate, as
	  does res_clioriginate. Review:
	  https://reviewboard.asterisk.org/r/3068/ (issue ASTERISK-22962)
	  Reported by: Matt DiMeo ........ Merged revisions 403993 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-16 19:11 +0000 [r403960]  David M. Lee <dlee@digium.com>

	* include/asterisk/pbx.h, main/asterisk.c, funcs/func_realtime.c,
	  main/pbx.c, main/tcptls.c, funcs/func_db.c, /,
	  README-SERIOUSLY.bestpractices.txt, configs/asterisk.conf.sample,
	  funcs/func_shell.c, funcs/func_env.c, funcs/func_lock.c,
	  UPGRADE-12.txt: security: Inhibit execution of privilege
	  escalating functions This patch allows individual dialplan
	  functions to be marked as 'dangerous', to inhibit their execution
	  from external sources. A 'dangerous' function is one which
	  results in a privilege escalation. For example, if one were to
	  read the channel variable SHELL(rm -rf /) Bad Things(TM) could
	  happen; even if the external source has only read permissions.
	  Execution from external sources may be enabled by setting
	  'live_dangerously' to 'yes' in the [options] section of
	  asterisk.conf. Although doing so is not recommended. Also, the
	  ABI was changed to something more reasonable, since Asterisk 12
	  does not yet have a public release. (closes issue ASTERISK-22905)
	  Review: http://reviewboard.digium.internal/r/432/ ........ Merged
	  revisions 403913 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 403917 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 403959 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-16 18:31 +0000 [r403958]  Jonathan Rose <jrose@digium.com>

	* /, main/bridge.c: transfers: Fix bug setting both BLINDTRANSFER
	  and ATTENDEDTRANSFER The ast_bridge_set_transfer_variables
	  function is supposed to wipe whichever variable isn't being set.
	  Instead it was setting both to the new value. Oops. (issue
	  AFS-24) ........ Merged revisions 403957 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-16 16:12 +0000 [r403857-403865]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/pbx.c, /: pbx.c: put copy of ast_exten.data on stack to
	  prevent memory corruption During dialplan execution in
	  pbx_extension_helper(), the contexts global read lock prevents
	  link list corruption, but was released with a pointer to the
	  ast_exten and data later used in variable substitution. Instead,
	  this patch removes pbx_substitute_variables() and locates a copy
	  of the ast_exten data on the stack before releasing the lock,
	  where ast_exten could get free'd by another thread performing a
	  module reload. (issue AST-1179) Reported by: Thomas Arimont
	  (issue AST-1246) Reported by: Alexander Hömig Review:
	  https://reviewboard.asterisk.org/r/3055/ ........ Merged
	  revisions 403862 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 403863 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 403864 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_sms.c: app_sms: BufferOverflow when receiving odd
	  length 16 bit message This patch prevents an infinite loop
	  overwriting memory when a message is received into the
	  unpacksms16() function, where the length of the message is an odd
	  number of bytes. (closes issue ASTERISK-22590) Reported by: Jan
	  Juergens Tested by: Jan Juergens ........ Merged revisions 403856
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-15 01:39 +0000 [r403824]  Matthew Jordan <mjordan@digium.com>

	* channels/pjsip/dialplan_functions.c, /: pjsip/dialplan_functions:
	  Use the right buffer length when printing URIs While
	  entertaining, sizeof(buflen) is not the same as buflen. Doh.
	  ........ Merged revisions 403823 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-14 17:28 +0000 [r403810-403812]  Joshua Colp <jcolp@digium.com>

	* include/asterisk/res_pjsip.h, /, res/res_pjsip/location.c,
	  res/res_pjsip/pjsip_options.c, res/res_pjsip.c: res_pjsip: Apply
	  outbound proxy to all SIP requests. Objects which are involved in
	  SIP request creation and sending now allow an outbound proxy to
	  be specified. For cases where an endpoint is used the outbound
	  proxy specified there will be applied. (closes issue
	  ASTERISK-22673) Reported by: Antti Yrjola Review:
	  https://reviewboard.asterisk.org/r/3022/ ........ Merged
	  revisions 403811 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis_channels.c, apps/app_queue.c,
	  res/ari/ari_model_validators.c, apps/app_dial.c,
	  res/ari/ari_model_validators.h, main/dial.c,
	  include/asterisk/stasis_channels.h,
	  rest-api/api-docs/events.json, /, res/stasis/app.c: res_stasis:
	  Expose event for call forwarding and follow forwarded channel.
	  This change adds an event for when an originated call is
	  redirected to another target. This event contains the original
	  channel and the newly created channel. If a stasis subscription
	  exists on the original originated channel for a stasis
	  application then a new subscription will also be created on the
	  stasis application to the redirected channel. This allows the
	  application to follow the call path completely. (closes issue
	  ASTERISK-22719) Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/3054/ ........ Merged
	  revisions 403808 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-13 21:35 +0000 [r403797]  Jonathan Rose <jrose@digium.com>

	* /, res/res_pjsip_messaging.c, main/message.c: documentation: Add
	  PJSIP technology to messaging documentation ........ Merged
	  revisions 403796 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-13 20:17 +0000 [r403784]  Richard Mudgett <rmudgett@digium.com>

	* /, main/test.c: test.c: Fix too sticky unit test failed status.
	  Rerunning a failed unit test after loading any required modules
	  should allow the test to report a pass status if it now passes.
	  ........ Merged revisions 403782 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-13 20:13 +0000 [r403783]  Jonathan Rose <jrose@digium.com>

	* /, main/bridge.c, main/bridge_basic.c, include/asterisk/bridge.h,
	  res/parking/parking_bridge_features.c,
	  res/parking/parking_manager.c: Transfers: Make Asterisk set
	  ATTENDEDTRANSFER/BLINDTRANSFER more reliably There were still a
	  few cases in which ATTENDEDTRANSFER and BLINDTRANSFER wouldn't be
	  set on channels involved with blind and attended transfers. This
	  would happen with features that were initialized by channel
	  driver specific mechanisms in multiparty calls. This patch
	  resolves those cases while attempted to keep the behavior for
	  setting those variables as consistent as possible. (closes issue
	  AFS-24) Review: https://reviewboard.asterisk.org/r/3040/ ........
	  Merged revisions 403781 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-13 18:33 +0000 [r403750-403768]  Kevin Harwell <kharwell@digium.com>

	* main/channel.c, /, channels/chan_sip.c,
	  include/asterisk/channel.h, bridges/bridge_native_rtp.c,
	  channels/chan_pjsip.c: bridge_native_rtp: Deadlock during 4-way
	  conference creation The change contains a slightly adjusted patch
	  that was on the issue (submitted by kmoore). A fix was made by
	  adding in a bridge lock while calling bridge_start/stop from the
	  framehook callback. Since the framehook callback is not called
	  from the bridging core the bridge is not locked, but needs to be
	  before calling bridge_start. (closes issue ASTERISK-22749)
	  Reported by: Kinsey Moore Review:
	  https://reviewboard.asterisk.org/r/3066/ Patches:
	  lock_inversion.diff uploaded by kmoore (license 6273) ........
	  Merged revisions 403767 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* rest-api/api-docs/channels.json, res/ari/resource_channels.c,
	  res/res_ari_channels.c, res/ari/resource_channels.h, /,
	  main/http.c: ARI: Allow specifying channel variables during a
	  POST /channels Added the ability to specify channel variables
	  when creating/originating a channel in ARI. The variables are
	  sent in the body of the request and should be formatted as a
	  single level JSON object. No nested objects allowed. For example:
	  {"variable1": "foo", "variable2": "bar"}. (closes issue
	  ASTERISK-22872) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3052/ ........ Merged
	  revisions 403752 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis_answer.c, rest-api/api-docs/bridges.json,
	  res/ari/resource_bridges.c, res/res_ari_bridges.c,
	  res/stasis/command.c, res/res_stasis_playback.c, /,
	  res/stasis/control.c, res/stasis/command.h,
	  include/asterisk/stasis_app.h,
	  include/asterisk/stasis_app_impl.h, res/res_stasis_recording.c:
	  ARI: Adding a channel to a bridge while a live recording is
	  active blocks Added the ability to have rules that are checked
	  when adding and/or removing channels to/from a bridge. In this
	  case, if a channel is currently recording and someone attempts to
	  add it to a bridge an "is recording" rule is checked, fails, and
	  a 409 conflict is returned. Also command functions now return an
	  integer value that can be descriptive of what kind of problems,
	  if any, occurred before or during execution. (closes issue
	  ASTERISK-22624) Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/2947/ ........ Merged
	  revisions 403749 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-13 05:00 +0000 [r403737]  Matthew Jordan <mjordan@digium.com>

	* /, channels/Makefile: channels/Makefile: clean pjsip directory
	  ........ Merged revisions 403736 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-13 00:40 +0000 [r403726]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/app.h, tests/test_voicemail_api.c, main/app.c:
	  test_voicemail_api: Add check for a registered voicemail provider
	  before tests. It is much nicer diagnosing a test failure if
	  app_voicemail is actually loaded.

2013-12-12 19:46 +0000 [r403714]  Scott Griepentrog <sgriepentrog@digium.com>

	* contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py
	  (added), /: realtime: Create extensions in alembic ast-db-manage
	  contribution When the alembic scripts were written for creating
	  Asterisk realtime databases the extensions table for dialplan
	  wasn't included. This update creates the extensions table.
	  (closes issue ASTERISK-22815) Reported by: Zone Conkle Review:
	  https://reviewboard.asterisk.org/r/3064/ ........ Merged
	  revisions 403713 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-12 19:18 +0000 [r403707]  Jonathan Rose <jrose@digium.com>

	* /, channels/chan_pjsip.c: chan_pjsip: Revert r403587 This patch
	  was intended to eliminate a deadlock that occurs when masquerades
	  occur in pjsip channels, but has some potential side effects.
	  Mark Michelson is currently working on addressing this problem
	  from another angle. (issue ASTERISK-22936) Reported by: Jonathan
	  Rose ........ Merged revisions 403705 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-11 20:24 +0000 [r403687]  Kevin Harwell <kharwell@digium.com>

	* include/asterisk/res_pjsip.h, res/res_pjsip/config_global.c, /,
	  configs/pjsip.conf.sample, res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip_messaging.c,
	  res/res_pjsip/include/res_pjsip_private.h, res/res_pjsip.c:
	  res_pjsip_messaging: send message to a default outbound endpoint
	  In some cases messages need to be sent to a direct URI (sip:<ip
	  address>). This patch adds in that support by using a default
	  outbound endpoint. When sending messages, if no endpoint can be
	  found then the default one is used. To facilitate this a new
	  default_outbound_endpoint option was added to the globals section
	  for pjsip.conf. Review: https://reviewboard.asterisk.org/r/2944/
	  ........ Merged revisions 403680 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-11 19:22 +0000 [r403652]  Russell Bryant <russell@russellbryant.com>

	* /, channels/chan_sip.c: Reset peer outboundproxy on sip.conf
	  reload If you set a peer's outboundproxy and then removed it from
	  the config, this would not get picked up in a config reload. This
	  patch fixes that by resetting it in set_peer_defaults(). Closes
	  ASTERISK-19454 Review: https://reviewboard.asterisk.org/r/3065/
	  ........ Merged revisions 403634 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 403635 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 403639 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-11 19:19 +0000 [r403643]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_voicemail.c, include/asterisk/app.h,
	  include/asterisk/doxyref.h, main/app.c: app_voicemail: Voicemail
	  callback registration/unregistration function improvements. * The
	  voicemail registration/unregistration functions now take a struct
	  of callbacks instead of a lengthy parameter list of callbacks. *
	  The voicemail registration/unregistration functions now prevent a
	  competing module from interfering with an already registered
	  callback supplying module.

2013-12-11 13:06 +0000 [r403617-403619]  Matthew Jordan <mjordan@digium.com>

	* channels/pjsip/dialplan_functions.c,
	  include/asterisk/res_pjsip_session.h, channels/pjsip (added), /,
	  funcs/func_channel.c, channels/pjsip/include,
	  channels/pjsip/include/dialplan_functions.h, res/res_pjsip_t38.c,
	  channels/pjsip/include/chan_pjsip.h, channels/Makefile,
	  channels/chan_pjsip.c, main/xmldoc.c: func_channel, chan_pjsip:
	  Add CHANNEL read function support for chan_pjsip This patch adds
	  CHANNEL read support for chan_pjsip. This allows the dialplan to
	  use the CHANNEL function on a chan_pjsip channel to obtain
	  run-time information about the channel from the PJSIP channel
	  driver and the PJSIP stack. This includes: * RTP information,
	  including source/destination media addresses, whether or not the
	  media is secure, held, and other properties. * RTCP information.
	  This includes sets of parseable information, as well as
	  individual statistic attriutes. * PJSIP information. This
	  includes URIs, local/remote signalling addresses, whether or not
	  the signalling is secure, and other properties. * The endpoint
	  name. This can be used in conjunction with the PJSIP_ENDPOINT
	  function to obtain more detailed endpoint information. Review:
	  https://reviewboard.asterisk.org/r/3038/ ........ Merged
	  revisions 403618 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* Makefile, funcs/func_pjsip_endpoint.c (added), doc/snapshots.xslt
	  (removed), /, doc/appdocsxml.xslt (added), doc/appdocsxml.dtd,
	  main/sorcery.c: func_pjsip_endpoint: Add PJSIP_ENDPOINT function
	  for querying endpoint details This patch adds a new function,
	  PJSIP_ENDPOINT, which lets the dialplan query, for any endpoint,
	  any property configured on an endpoint. This function is a
	  companion to the CHANNEL function, which can be used to extract
	  the endpoint name for a channel. Review:
	  https://reviewboard.asterisk.org/r/3035 ........ Merged revisions
	  403616 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-10 15:15 +0000 [r403605]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_authenticator_digest.c: Fix correct authentication
	  behavior for artificial endpoint. When switching to using a
	  vector for authentication, I initialized the vector for the
	  artificial endpoint to be of size 1. However, this does not
	  result in AST_VECTOR_SIZE() returning 1 since there isn't
	  actually anything in the vector. Rather than trifle with the
	  vector by putting unnecessary elements in, I simply changed the
	  callback in res_pjsip_authenticator_digest.c to explicitly report
	  that the artificial endpoint requires authentication. Thanks to
	  Joshua Colp for pointing this out.

2013-12-09 22:59 +0000 [r403576-403588]  Jonathan Rose <jrose@digium.com>

	* /, channels/chan_pjsip.c: chan_pjsip: Fix a sticking channel lock
	  caused by channel masquerades (closes issue ASTERISK-22936)
	  Reported by: Jonathan Rose Review:
	  https://reviewboard.asterisk.org/r/3042/ ........ Merged
	  revisions 403587 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* CHANGES, main/dial.c, apps/app_page.c, include/asterisk/dial.h:
	  app_page: Add predial handlers for app_page. (closes issue
	  AFS-14) Review: https://reviewboard.asterisk.org/r/3045/

2013-12-09 19:24 +0000 [r403544-403560]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_sorcery_astdb.c: Reverting regex part of -r403545 at
	  request of file. res_sorcery_astdb.c: Fix get multiple records by
	  regex. * Fix sorcery_astdb_retrieve_regex() pattern matching. Let
	  the regexec() function match the stored key values instead of
	  having astdb prefilter them. Previoiusly you could only use a
	  simple regex pattern when the pattern began with '^'. ........
	  Merged revisions 403559 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_sorcery_astdb.c: res_sorcery_astdb.c: Fix get multiple
	  records by regex. * Fix sorcery_astdb_retrieve_regex() pattern
	  matching. Let the regexec() function match the stored key values
	  instead of having astdb prefilter them. Previoiusly you could
	  only use a simple regex pattern when the pattern began with '^'.
	  * Fix off nominal memory leak in sorcery_astdb_retrieve_regex().
	  ........ Merged revisions 403545 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/sorcery.c, /: sorcery: Eliminate shadowing a varaible that
	  caused confusion. * Eliminated shadowing of the
	  __ast_sorcery_apply_config() name parameter causing confusion. *
	  Fix potential crash from sorcery.conf user input in
	  __ast_sorcery_apply_config() if the user supplied a malformed
	  config line that is missing the sorcery object type name. *
	  Remove redundant test in __ast_sorcery_apply_config(). !config
	  and config == CONFIGS_STATUS_FILEMISSING are identical. ........
	  Merged revisions 403541 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-09 18:32 +0000 [r403543]  Joshua Colp <jcolp@digium.com>

	* /, main/endpoints.c: endpoints: Keep a reference to channel ids
	  when creating snapshot. The snapshot process for endpoints uses
	  the channel ids present on the endpoint itself. Without keeping a
	  reference it was possible for the strings to be freed underneath
	  any consumer of an endpoint snapshot. A reference is now held by
	  the snapshot to the channel ids and released when the snapshot is
	  destroyed. (issue ASTERISK-22801) Reported by: Matt Jordan
	  ........ Merged revisions 403542 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-09 18:14 +0000 [r403528]  Richard Mudgett <rmudgett@digium.com>

	* main/sorcery.c, /: sorcery: Whitespace You would think that a new
	  file would start off without any whitespace oddities. ........
	  Merged revisions 403527 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-09 17:29 +0000 [r403512-403526]  Mark Michelson <mmichelson@digium.com>

	* apps/app_confbridge.c, CHANGES,
	  apps/confbridge/conf_state_multi_marked.c: Add a
	  CONFBRIDGE_RESULT channel variable to discern why a channel left
	  a ConfBridge. Review: https://reviewboard.asterisk.org/r/3009

	* CHANGES, apps/app_mixmonitor.c: Create function for retrieving
	  Mixmonitor instance data. For the time, this is only useful for
	  retrieving the filename. The purpose of this function is to
	  better facilitate multiple mixmonitors per channel. Setting a
	  MIXMONITOR_FILENAME channel variable is not conducive to such
	  behavior, so allowing finer grained access to individual
	  mixmonitor properties improves the situation. The
	  MIXMONITOR_FILENAME channel variable is still set, though, so
	  there is no worry about backwards compatibility. Review:
	  https://reviewboard.asterisk.org/r/3023

2013-12-09 16:41 +0000 [r403511]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_nat.c, /: res_pjsip_nat: Add NAT module to session
	  dialogs. Due to the way pjproject internally works it was
	  possible for the NAT module to not be invoked on messages with-in
	  a session dialog. This means that the various parts of the
	  message would not get rewritten with the source IP address and
	  port. This change uses a session supplement to add the NAT module
	  to the dialog on the first incoming or outgoing INVITE. (closes
	  issue ASTERISK-22941) Reported by: Leif Madsen ........ Merged
	  revisions 403510 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-09 16:10 +0000 [r403499]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip/config_auth.c,
	  res/res_pjsip_outbound_authenticator_digest.c,
	  res/res_pjsip_authenticator_digest.c,
	  res/res_pjsip_outbound_registration.c,
	  res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip/pjsip_distributor.c, res/res_pjsip.c,
	  include/asterisk/res_pjsip.h: Switch PJSIP auth to use a vector.
	  Since Asterisk has a vector API now, places where arrays are
	  manually resized don't really make sense any more. Since the auth
	  work in PJSIP was freshly-written, it was easy to reform it to
	  use a vector. Review: https://reviewboard.asterisk.org/r/3044

2013-12-09 03:21 +0000 [r403436-403466]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_fax_spandsp.c: res_fax_spandsp: Always init T.38
	  session to avoid crashes during state change Prior to this patch,
	  res_fax_spandsp was conservative with how it initialized the
	  spandsp T.38 context. It would only initialize it if the driver
	  thought the current state was a T.38 fax. While this works fine
	  in nominal situations, in certain off nominal situations,
	  res_fax_spandsp can believe that a T.38 fax will not occur when
	  in fact one has started. In particular, this was discovered when
	  res_fax would fall back to audio after timing out on a T.38
	  upgrade. The SIP channel driver would continue to retry the
	  re-INVITE and - if the remote end responded after res_fax timed
	  out with a 200 OK - a T.38 frame would be delivered to the
	  res_fax stack when it no longer expected it. As it turns out,
	  there does not appear to be any downside to always initializing
	  the T.38 context, other than the actual memory allocation. Since
	  that avoids this off nominal situation (and others which are
	  equally likely hard to predict), this is the safest way to avoid
	  this problem. Much thanks to Torrey as well for providing a
	  scenario that reproduces this issue. (closes issue
	  ASTERISK-21242) Reported by: Ashley Winters Tested by: Torrey
	  Searle patches: always-init-t38.patch uploaded by awinters
	  (License 6477) A_PARTY.xml uploaded by tsearle (License 5334)
	  ........ Merged revisions 403449 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 403450 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 403458 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_config_sqlite.c: res_config_sqlite: Check for CDR
	  unregistration failures If the CDR unregistration fails due to an
	  inflight CDR, the res_config_sqlite module needs to bail on
	  unloading itself. Otherwise, the config could be unloaded
	  (including the CDR table name) while the CDR engine posts a CDR
	  to the still registered backend, resulting in a crash. ........
	  Merged revisions 403435 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-05 23:40 +0000 [r403414]  Jonathan Rose <jrose@digium.com>

	* apps/app_record.c: app_record: Add an option that allows DTMF '0'
	  to act as an additional terminator Using this terminator when
	  active results in ${RECORD_STATUS} being set to 'OPERATOR'
	  instead of 'DTMF' (closes issue AFS-7) Review:
	  https://reviewboard.asterisk.org/r/3041/

2013-12-05 22:10 +0000 [r403402-403404]  David M. Lee <dlee@digium.com>

	* addons/chan_mobile.c, main/bridge_channel.c, tests/test_cdr.c,
	  channels/chan_pjsip.c, res/parking/parking_manager.c,
	  channels/chan_mgcp.c, channels/chan_unistim.c, main/pbx.c, /,
	  apps/app_meetme.c, funcs/func_timeout.c, main/bridge.c,
	  tests/test_stasis_channels.c, main/core_unreal.c,
	  include/asterisk/channel.h, channels/chan_gtalk.c, main/cel.c,
	  apps/app_queue.c, channels/sig_pri.c, main/stasis_bridges.c,
	  channels/chan_jingle.c, channels/chan_phone.c,
	  channels/chan_dahdi.c, main/dial.c, channels/sig_analog.c,
	  include/asterisk/stasis_channels.h, res/res_agi.c,
	  channels/chan_motif.c, channels/chan_h323.c, tests/test_cel.c,
	  apps/app_confbridge.c, res/res_stasis.c, res/res_pjsip_refer.c,
	  apps/app_voicemail.c, apps/app_dial.c, channels/chan_vpb.cc,
	  addons/chan_ooh323.c, channels/chan_sip.c, main/pickup.c,
	  include/asterisk/aoc.h, include/asterisk/stasis_bridges.h,
	  apps/app_userevent.c, apps/app_disa.c, main/core_local.c,
	  include/asterisk/channelstate.h, channels/chan_console.c,
	  channels/chan_iax2.c, main/endpoints.c, channels/chan_oss.c,
	  res/parking/parking_bridge_features.c, apps/app_agent_pool.c,
	  main/channel.c, channels/chan_misdn.c, channels/chan_skinny.c,
	  pbx/pbx_realtime.c, channels/chan_alsa.c, main/stasis_channels.c,
	  channels/chan_nbs.c: Reverting r403311. It's causing ARI tests to
	  hang. ........ Merged revisions 403398 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/stasis/control.c: ari: Fix deadlock problem with functions
	  that use autoservice. The code for getting channel variables from
	  ARI assumed that you needed to lock the channel in order to
	  properly execute functions and read channel variables.
	  Apparently, this is not the case, since any dialplan function
	  that puts the channel into autoservice deadlocks when attempting
	  to remove the channel from autoservice. ........ Merged revisions
	  403342 from http://svn.asterisk.org/svn/asterisk/branches/12

	* /: Multiple revisions 403304,403310 ........ r403304 | dlee |
	  2013-12-02 12:34:50 -0600 (Mon, 02 Dec 2013) | 1 line Fixed the
	  filename for the ari.conf docs ........ r403310 | file |
	  2013-12-03 10:32:12 -0600 (Tue, 03 Dec 2013) | 5 lines Revert
	  revision 403304: Fixed the filename for the ari.conf docs The
	  changed value refers to the name of the module. The name of the
	  configuration file is specified in the configFile section.
	  ........ Merged revisions 403304,403310 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-04 21:42 +0000 [r403378]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_pjsip_registrar.c: res_pjsip_registrar: undefined
	  function pointer symbol Used a static wrapper around the
	  offending function to alleviate the issue. Reported by: rmudgett
	  ........ Merged revisions 403377 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-04 20:54 +0000 [r403365]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_t38.c, /: res_pjsip_t38: Don't pass T.38 control
	  frames through to other hooks. This crept up during gateway
	  testing where the gateway would receive the request to negotiate
	  and assume it came from the remote side, causing the gateway
	  state machine to go a little, to a use a technical term, "wonky".
	  ........ Merged revisions 403364 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-04 18:41 +0000 [r403350]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip.c: Initialize the hash value argument to
	  pj_hash_get() to 0. Passing a non-zero value causes PJLIB to use
	  the given input as the hash value. Passing zero causes the
	  parameter to become an output parameter that receives the hash
	  value that was computed based on the given key. This change
	  essentially makes ast_sip_dict_get() properly retrieve the
	  desired value. ........ Merged revisions 403349 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-03 18:01 +0000 [r403330]  Joshua Colp <jcolp@digium.com>

	* /, configure, include/asterisk/autoconfig.h.in, configure.ac,
	  res/res_pjsip_session.c: res_pjsip_session: Add support for
	  PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE flag. Newer versions of PJSIP
	  have changed to using a flag for the
	  PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE instead of a define. This adds
	  a configure check to detect the presence of the flag and use it
	  if found. ........ Merged revisions 403329 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-03 17:35 +0000 [r403327]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/sorcery.h, res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip_registrar_expire.c, res/res_pjsip/pjsip_options.c,
	  tests/test_sorcery.c, include/asterisk/bucket.h, main/sorcery.c,
	  /, main/bucket.c: sorcery, bucket: Change observer remove calls
	  to take const callbacks struct. * Make
	  ast_sorcery_observer_remove() accept a const callbacks struct. *
	  Make ast_sorcery_observer_remove() tolerant of the sorcery
	  parameter being NULL. Now it can be called within a module unload
	  routine if the sorcery initialization fails. * Fix
	  ast_sorcery_observer_add() to fail if the container link fails.
	  ........ Merged revisions 403324 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-03 17:07 +0000 [r403314]  Mark Michelson <mmichelson@digium.com>

	* channels/chan_nbs.c, main/bridge_channel.c, res/res_stasis.c,
	  channels/chan_pjsip.c, res/parking/parking_manager.c,
	  apps/app_voicemail.c, channels/chan_unistim.c,
	  channels/chan_vpb.cc, addons/chan_ooh323.c, /,
	  include/asterisk/aoc.h, apps/app_meetme.c, main/bridge.c,
	  apps/app_userevent.c, channels/chan_gtalk.c,
	  channels/chan_iax2.c, main/endpoints.c, main/stasis_bridges.c,
	  main/channel.c, channels/chan_phone.c, channels/chan_dahdi.c,
	  main/dial.c, channels/sig_analog.c, channels/chan_skinny.c,
	  res/res_agi.c, channels/chan_motif.c, pbx/pbx_realtime.c,
	  channels/chan_alsa.c, main/stasis_channels.c,
	  apps/app_confbridge.c, addons/chan_mobile.c, tests/test_cdr.c,
	  res/res_pjsip_refer.c, channels/chan_mgcp.c, apps/app_dial.c,
	  main/pbx.c, channels/chan_sip.c, main/pickup.c,
	  funcs/func_timeout.c, tests/test_stasis_channels.c,
	  main/core_unreal.c, include/asterisk/stasis_bridges.h,
	  apps/app_disa.c, include/asterisk/channel.h, main/core_local.c,
	  include/asterisk/channelstate.h, channels/chan_console.c,
	  main/cel.c, apps/app_queue.c, channels/sig_pri.c,
	  channels/chan_oss.c, res/parking/parking_bridge_features.c,
	  apps/app_agent_pool.c, channels/chan_jingle.c,
	  channels/chan_misdn.c, include/asterisk/stasis_channels.h,
	  channels/chan_h323.c, tests/test_cel.c: Add channel locking for
	  channel snapshot creation. This adds channel locks around calls
	  to create channel snapshots as well as other functions which
	  operate on a channel and then end up creating a channel snapshot.
	  Functions that expect the channel to be locked prior to being
	  called have had their documentation updated to indicate such.
	  ........ Merged revisions 403311 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-03 16:39 +0000 [r403313]  Joshua Colp <jcolp@digium.com>

	* main/media_index.c, /: media_index: Make media indexing tolerable
	  of bad symlinks. Media indexing will now skip over files and
	  directories that stat will not return information about. This can
	  occur under normal conditions when a symbolic link points to a
	  location that no longer exists. ........ Merged revisions 403312
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-02 18:12 +0000 [r403292]  Alexandr Anikin <may@telecom-service.ru>

	* addons/chan_ooh323.c, /: Check and reject non-digits e164 values
	  on peers and general sections in ooh323.conf Regenerate e164
	  endpoint list on reload ooh323 (issue ASTERISK-22901) Reported
	  by: Cyril CONSTANTIN Patches: ASTERISK-22901.patch ........
	  Merged revisions 403288 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 403290 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-12-01 21:13 +0000 [r403257-403272]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_session.c: res_pjsip_session: Apply fromuser and
	  fromdomain to all requests as documented. ........ Merged
	  revisions 403271 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_t38.c, /: res_pjsip_t38: Add the framehook to the
	  channel only on first INVITE. The check for determining whether
	  the T.38 framehook should be added to the channel or not has now
	  been changed to guarantee adding only occurs on the first
	  incoming or outgoing INVITE. ........ Merged revisions 403258
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip/security_events.c, res/res_pjsip/pjsip_options.c,
	  res/res_pjsip.c, res/res_pjsip_transport_websocket.c,
	  include/asterisk/res_pjsip.h, /, res/res_pjsip/location.c:
	  res_pjsip_transport_websocket: Fix security events and simplify
	  implementation. Transport type determination for security events
	  has been simplified to use the type present on the message itself
	  instead of searching through configured transports to find the
	  transport used. The actual WebSocket transport has also been
	  simplified. It now leverages the existing PJSIP transport manager
	  for finding the active WebSocket transport for outgoing messages.
	  This removes the need for res_pjsip_transport_websocket to store
	  a mapping itself. (closes issue ASTERISK-22897) Reported by: Max
	  E. Reyes Vera J. Review: https://reviewboard.asterisk.org/r/3036/
	  ........ Merged revisions 403256 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-30 14:12 +0000 [r403241]  Joshua Colp <jcolp@digium.com>

	* res/ari/ari_model_validators.h, rest-api/api-docs/events.json, /,
	  res/ari/ari_model_validators.c: res_ari: Add Recording events to
	  the validator. ........ Merged revisions 403240 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-28 02:12 +0000 [r403208-403224]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_sdp_rtp.c, /: res_pjsip_sdp_rtp: Don't produce an
	  invalid media stream with no formats. Depending on configuration
	  it was possible for a media stream to be created without any
	  media formats. The produced SDP would fail internal validation
	  and cause a crash. The code will now no longer add media streams
	  with no formats to the SDP, allowing it to pass validation and
	  work. (closes issue ASTERISK-22858) Reported by: Anthony Messina
	  ........ Merged revisions 403223 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_header_funcs.c, /: res_pjsip_header_funcs: Don't
	  add headers to re-INVITEs. When sending a re-INVITE to an
	  endpoint it was possible for received headers to be added as well
	  (since they are stored for retrieval using the PJSIP_HEADER
	  dialplan function). This caused a broken (and potentially large)
	  SIP INVITE to be produced and sent. This changes the module so it
	  will no longer add headers to re-INVITEs. (closes issue
	  ASTERISK-22882) Reported by: David M. Lee ........ Merged
	  revisions 403221 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis_playback.c, /: res_stasis_playback: Add 'number',
	  'digits', and 'characters' URI scheme implementations. This
	  change adds new URI scheme implementations for playing numbers,
	  digits, and characters. This is done as part of the normal
	  playback mechanism and can be used with queueing to create a
	  combined sentence. Review:
	  https://reviewboard.asterisk.org/r/3028/ ........ Merged
	  revisions 403209 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/pjsip_configuration.c, res/res_pjsip.c,
	  res/res_pjsip_session.c, include/asterisk/res_pjsip.h:
	  res_pjsip_session: Add configurable behavior for redirects. The
	  action taken when a redirect occurs is now configurable on a
	  per-endpoint basis. The redirect can either be treated as a
	  redirect to a local extension, to a URI that is dialed through
	  the Asterisk core, or to a URI that is dialed within PJSIP
	  itself. (closes issue ASTERISK-21710) Reported by: Matt Jordan
	  Review: https://reviewboard.asterisk.org/r/2963/ ........ Merged
	  revisions 403207 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-27 17:32 +0000 [r403192]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/astdb.h: astdb: Tweak some doxygen comments.

2013-11-27 16:12 +0000 [r403180]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/pjsip_configuration.c: res_pjsip: Fix crash when
	  reloading certain configurations. Certain options available that
	  specify a SIP URI perform validation on the provided URI using
	  the PJSIP URI parser. This operation requires that the thread
	  executing it be registered with the PJLIB library. During reloads
	  this was done on a thread which was NOT registered with it. This
	  fixes the problem by creating a task which reloads the
	  configuration on a PJSIP thread. (closes issue ASTERISK-22923)
	  Reported by: Anthony Messina ........ Merged revisions 403179
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-27 15:48 +0000 [r403177]  David M. Lee <dlee@digium.com>

	* res/res_ari_channels.c, include/asterisk/ari.h,
	  rest-api-templates/param_parsing.mustache,
	  include/asterisk/http.h, res/res_ari_recordings.c,
	  res/res_ari_endpoints.c, main/http.c,
	  rest-api-templates/swagger_model.py, res/res_ari_playbacks.c,
	  res/res_ari_sounds.c, rest-api-templates/asterisk_processor.py,
	  res/res_ari_bridges.c, tests/test_ari.c, res/res_ari.c, /,
	  res/res_ari_device_states.c, res/res_ari_asterisk.c,
	  rest-api-templates/res_ari_resource.c.mustache,
	  res/res_ari_applications.c: ari:Add application/json parameter
	  support The patch allows ARI to parse request parameters from an
	  incoming JSON request body, instead of requiring the request to
	  come in as query parameters (which is just weird for POST and
	  DELETE) or form parameters (which is okay, but a bit asymmetric
	  given that all of our responses are JSON). For any operation that
	  does _not_ have a parameter defined of type body (i.e.
	  "paramType": "body" in the API declaration), if a request
	  provides a request body with a Content type of
	  "application/json", the provided JSON document is parsed and
	  searched for parameters. The expected fields in the provided JSON
	  document should match the query parameters defined for the
	  operation. If the parameter has 'allowMultiple' set, then the
	  field in the JSON document may optionally be an array of values.
	  (closes issue ASTERISK-22685) Review:
	  https://reviewboard.asterisk.org/r/2994/

2013-11-27 15:31 +0000 [r403161-403174]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/pjsip_configuration.c: res_pjsip: Update
	  handling of some options to work with new option names. Some
	  options (such as call_group and pickup_group) share the same
	  configuration handler and decide what logic to use based on the
	  name of the option. These handlers were not updated to check for
	  the new option names and were treating the options as invalid.
	  This change simply updates the handlers with the proper names of
	  the options. (closes issue ASTERISK-22922) Reported by: Anthony
	  Messina ........ Merged revisions 403173 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, configure, include/asterisk/autoconfig.h.in, configure.ac: Fix
	  a configure issue with PJSIP transaction group lock detection.
	  The configure check did not use the provided paths for pjproject
	  if provided when looking for transaction group lock support.
	  ........ Merged revisions 403160 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-23 17:48 +0000 [r403133-403135]  Kevin Harwell <kharwell@digium.com>

	* res/ari.make, rest-api/api-docs/applications.json,
	  res/ari/resource_device_states.h (added),
	  include/asterisk/stasis_app_device_state.h (added),
	  res/ari/resource_applications.h, res/res_stasis.c,
	  include/asterisk/devicestate.h, rest-api/api-docs/events.json,
	  res/res_stasis_device_state.exports.in (added), res/stasis/app.c,
	  res/res_ari_device_states.c (added), /,
	  include/asterisk/stasis_app.h, main/devicestate.c,
	  res/stasis/app.h, rest-api/resources.json,
	  res/res_stasis_device_state.c (added),
	  res/ari/ari_model_validators.c, res/ari/ari_model_validators.h,
	  res/ari/resource_device_states.c (added),
	  rest-api/api-docs/deviceStates.json (added),
	  rest-api-templates/ari.make.mustache: ARI: Implement device state
	  API Created a data model and implemented functionality for an ARI
	  device state resource. The following operations have been added
	  that allow a user to manipulate an ARI controlled device:
	  Create/Change the state of an ARI controlled device PUT
	  /deviceStates/{deviceName}&{deviceState} Retrieve all ARI
	  controlled devices GET /deviceStates Retrieve the current state
	  of a device GET /deviceStates/{deviceName} Destroy a device-state
	  controlled by ARI DELETE /deviceStates/{deviceName} The ARI
	  controlled device must begin with 'Stasis:'. An example
	  controlled device name would be Stasis:Example. A
	  'DeviceStateChanged' event has also been added so that an
	  application can subscribe and receive device change events. Any
	  device state, ARI controlled or not, can be subscribed to. While
	  adding the event, the underlying subscription control mechanism
	  was refactored so that all current and future resource
	  subscriptions would be the same. Each event resource must now
	  register itself in order to be able to properly handle
	  [un]subscribes. (issue ASTERISK-22838) Reported by: Matt Jordan
	  Review: https://reviewboard.asterisk.org/r/3025/ ........ Merged
	  revisions 403134 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_registrar.c, main/sorcery.c,
	  include/asterisk/res_pjsip.h, include/asterisk/acl.h,
	  res/res_pjsip/config_auth.c, include/asterisk/utils.h,
	  res/res_pjsip.exports.in, /,
	  res/res_pjsip_endpoint_identifier_ip.c, main/acl.c, main/utils.c,
	  res/res_pjsip.c, res/res_pjsip_exten_state.c,
	  include/asterisk/res_pjsip_pubsub.h, res/res_pjsip/location.c,
	  res/res_pjsip_outbound_registration.c, res/res_pjsip_mwi.c,
	  res/res_pjsip/pjsip_configuration.c, include/asterisk/sorcery.h,
	  include/asterisk/strings.h,
	  res/res_pjsip/include/res_pjsip_private.h,
	  res/res_pjsip_pubsub.c, res/res_pjsip/config_transport.c:
	  res_pjsip: AMI commands and events. Created the following AMI
	  commands and corresponding events for res_pjsip:
	  PJSIPShowEndpoints - Provides a listing of all pjsip endpoints
	  and a few select attributes on each. Events: EndpointList - for
	  each endpoint a few attributes. EndpointlistComplete - after all
	  endpoints have been listed. PJSIPShowEndpoint - Provides a detail
	  list of attributes for a specified endpoint. Events:
	  EndpointDetail - attributes on an endpoint. AorDetail - raised
	  for each AOR on an endpoint. AuthDetail - raised for each
	  associated inbound and outbound auth TransportDetail - transport
	  attributes. IdentifyDetail - attributes for the identify object
	  associated with the endpoint. EndpointDetailComplete - last event
	  raised after all detail events. PJSIPShowRegistrationsInbound -
	  Provides a detail listing of all inbound registrations. Events:
	  InboundRegistrationDetail - inbound registration attributes for
	  each registration. InboundRegistrationDetailComplete - raised
	  after all detail records have been listed.
	  PJSIPShowRegistrationsOutbound - Provides a detail listing of all
	  outbound registrations. Events: OutboundRegistrationDetail -
	  outbound registration attributes for each registration.
	  OutboundRegistrationDetailComplete - raised after all detail
	  records have been listed. PJSIPShowSubscriptionsInbound - A
	  detail listing of all inbound subscriptions and their attributes.
	  Events: SubscriptionDetail - on each subscription detailed
	  attributes SubscriptionDetailComplete - raised after all detail
	  records have been listed. PJSIPShowSubscriptionsOutbound - A
	  detail listing of all outboundbound subscriptions and their
	  attributes. Events: SubscriptionDetail - on each subscription
	  detailed attributes SubscriptionDetailComplete - raised after all
	  detail records have been listed. (issue ASTERISK-22609) Reported
	  by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2959/
	  ........ Merged revisions 403131 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-23 12:52 +0000 [r403118-403120]  Joshua Colp <jcolp@digium.com>

	* res/res_stasis_playback.c, rest-api/api-docs/events.json, /,
	  res/res_stasis_recording.c, res/ari/ari_model_validators.c,
	  rest-api/api-docs/recordings.json,
	  res/ari/ari_model_validators.h: ari: Add events for playback and
	  recording. While there were events defined for playback and
	  recording these were not actually sent. This change implements
	  the to_json handlers which produces them. (closes issue
	  ASTERISK-22710) Reported by: Jonathan Rose Review:
	  https://reviewboard.asterisk.org/r/3026/ ........ Merged
	  revisions 403119 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis_snoop.exports.in (added), /,
	  include/asterisk/stasis_app_snoop.h (added),
	  rest-api/api-docs/channels.json, res/res_stasis_snoop.c (added),
	  main/audiohook.c, res/ari/resource_channels.c,
	  res/res_ari_channels.c, res/ari/resource_channels.h: ari: Add
	  Snoop operation for spying/whispering on channels. The Snoop
	  operation can be invoked on a channel to spy or whisper on it. It
	  returns a channel that any channel operations can then be invoked
	  on (such as record to do monitoring). (closes issue
	  ASTERISK-22780) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/3003/ ........ Merged
	  revisions 403117 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-23 00:22 +0000 [r403106]  Rusty Newton <rnewton@digium.com>

	* apps/app_voicemail.c: app_voicemail: when forwarding a message,
	  play vm-msgforwarded instead of vm-msgsaved In the last release
	  of sounds, 1.4.25 we added a vm-msgforwarded prompt for various
	  core languages. Now we use that prompt. (issue ASTERISK-21413)
	  (closes issue ASTERISK-21413) Reported by: netwrkr Tested by:
	  newtonr

2013-11-22 23:57 +0000 [r403095]  Kinsey Moore <kmoore@digium.com>

	* tests/test_stasis.c, /, tests/test_stasis_channels.c: Make sure
	  unit tests compile This fixes the unit tests that were broken by
	  r403069 and several functions requiring a new parameter for
	  sanitization of JSON messages generated from object snapshots.
	  ........ Merged revisions 403094 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-22 22:37 +0000 [r403083]  Kevin Harwell <kharwell@digium.com>

	* /,
	  contrib/ast-db-manage/config/versions/43956d550a44_add_tables_for_pjsip.py,
	  res/res_pjsip/pjsip_configuration.c: res_pjsip: convert
	  configuration settings names to snake case some more Updated the
	  alembic script for pjsip. Also, the dtls config parsing stuff was
	  expecting strings with no underscores, so removed the underscores
	  from the option name before passing it to the parser. ........
	  Merged revisions 403082 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-22 20:10 +0000 [r403070]  Kinsey Moore <kmoore@digium.com>

	* res/res_stasis.c, main/stasis_endpoints.c,
	  res/ari/resource_endpoints.c, main/rtp_engine.c, /,
	  res/stasis/app.c, include/asterisk/stasis_bridges.h,
	  include/asterisk/stasis.h, include/asterisk/stasis_app.h,
	  main/stasis_bridges.c, res/ari/resource_bridges.c, main/json.c,
	  main/stasis_message.c, include/asterisk/stasis_channels.h,
	  main/stasis_channels.c, res/ari/resource_channels.c,
	  include/asterisk/stasis_endpoints.h: ARI: Don't leak
	  implementation details This change prevents channels used as
	  implementation details from leaking out to ARI. It does this by
	  preventing creation of JSON blobs of channel snapshots created
	  from those channels and sanitizing JSON blobs of bridge snapshots
	  as they are created. This introduces a framework for excluding
	  information from output targeted at Stasis applications on a
	  consumer-by-consumer basis using channel sanitization callbacks
	  which could be extended to bridges or endpoints if necessary.
	  This prevents unhelpful error messages from being generated by
	  ast_json_pack. This also corrects a bug where BridgeCreated
	  events would not be created. (closes issue ASTERISK-22744)
	  Review: https://reviewboard.asterisk.org/r/2987/ Reported by:
	  David M. Lee ........ Merged revisions 403069 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-22 17:27 +0000 [r403051]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_acl.c, res/res_pjsip.c,
	  res/res_pjsip/config_transport.c, res/res_pjsip/config_global.c,
	  /, configs/pjsip.conf.sample, res/res_pjsip/config_system.c,
	  contrib/scripts/sip_to_pjsip/sip_to_pjsip.py,
	  res/res_pjsip/pjsip_configuration.c: res_pjsip: convert
	  configuration settings names to snake case Renamed, where
	  appropriate, the configuration options for chan/res_pjsip to use
	  snake case (compound words separated by an underscore). For
	  example, faxdetect will become fax_detect, recordofffeature will
	  become record_off_feature, etc... Review:
	  https://reviewboard.asterisk.org/r/3002/ ........ Merged
	  revisions 403022 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-22 17:12 +0000 [r403017]  Joshua Colp <jcolp@digium.com>

	* /, main/translate.c: translate: Move freeing of frame to after it
	  is used. When translating from one format to another it is
	  possible to inform the translation function that the source frame
	  should be freed. This was previously done immediately but shortly
	  afterwards the frame that was freed was accessed and used again.
	  This change moves code around a bit so that the frame is now
	  freed after it has been completely used. (closes issue
	  ASTERISK-22788) Reported by: Corey Farrell Patches:
	  translate-access-after-free-11up.patch uploaded by coreyfarrell
	  (license 5909) translate-access-after-free-1.8.patch uploaded by
	  coreyfarrell (license 5909) ........ Merged revisions 403014 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 403015 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 403016 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-22 16:43 +0000 [r403013]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_directed_pickup.c, CHANGES: PickupChan: Add ability to
	  specify channel uniqueids as well as channel names. * Made
	  PickupChan() search by channel uniqueids if the search could not
	  find a channel by name. * Ensured PickupChan() never considers
	  the picking channel for pickup. * Made PickupChan() option p use
	  a common search by name routine. The original search was
	  erroneously case sensitive. (issue AFS-42) Review:
	  https://reviewboard.asterisk.org/r/3017/

2013-11-21 22:38 +0000 [r402995]  Jonathan Rose <jrose@digium.com>

	* CHANGES, apps/app_directory.c: app_directory: Set variable
	  indicating reason directory exited By the time the directory
	  application exits, a channel variable DIRECTORY_RESULT will be
	  set for the channel that invoked it which can be used to
	  determine the reason for exit. The changes log and the
	  app_directory documentation contain specific details about each
	  of the possible values for DIRECTORY_RESULT. Review:
	  https://reviewboard.asterisk.org/r/3016/

2013-11-21 22:36 +0000 [r402982-402994]  David M. Lee <dlee@digium.com>

	* rest-api-templates/ari_resource.c.mustache, /,
	  rest-api-templates/res_ari_resource.c.mustache: ari: Fix #include
	  to match generated headers for snakeCase resource files ........
	  Merged revisions 402993 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* rest-api-templates/make_ari_stubs.py, /: ari: Fix generators for
	  resources with camelCase names. For the new deviceState resource,
	  we need to properly generate device_state.[ch] files. ........
	  Merged revisions 402981 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-21 19:22 +0000 [r402969]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_session.c, /: res_pjsip_session: Fix memory leak of
	  direct media format capabilities The direct media format
	  capabilities are always allocated in ast_sip_session_alloc and
	  were not freed in the session destructor. Whoops. (This being the
	  third whoops caught by Scott and Nitesh's valgrind work for the
	  Asterisk Test Suite. Nifty!) ........ Merged revisions 402968
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-21 19:09 +0000 [r402945-402957]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/app.h, /: voicemail: Fixup some doxygen
	  comments. ........ Merged revisions 402956 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/bucket.c: bucket: Fix scheme ref leak in
	  __ast_bucket_scheme_register(). ........ Merged revisions 402944
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-21 17:53 +0000 [r402942-402943]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_sdp_rtp.c, /: res_pjsip_sdp_rtp: Fix use of
	  uninitialized value in PJSIP In PJMEDIA,
	  pjmedia_sdp_rtpmap_to_attr will attempt to use the string
	  rtpmap.param regardless of its length value. Simply setting the
	  length to 0 does not prevent the garbage on the stack in
	  rtpmap.param.ptr from being formatted in a sprintf call. This
	  patch initializes the string to NULL so that at the very least,
	  something is provided to the function that is predictable.
	  ........ Merged revisions 402941 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_mwi.c: res_pjsip_mwi: Fix memory leak of MWI
	  subscriptions container This patch fixes a reference counting
	  memory leak on the ao2_container created as part of
	  create_mwi_subscriptions. When we create the container in this
	  routine, the intent is to hand lifetime ownership over to the
	  global container unsolicited_mwi. When
	  ao2_global_obj_replace_unref is called, the reference count on
	  mwi_subscriptions (the container) will be bumped by 1; however,
	  the function does not decrement the reference count on
	  mwi_subscriptions when this occurs. This will prevent the
	  container from being fully disposed of when Asterisk exits (or on
	  any subsequent call to this operation, such as during a reload).
	  ........ Merged revisions 402940 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-21 15:57 +0000 [r402928-402929]  David M. Lee <dlee@digium.com>

	* res/res_stasis.c, /: stasis: Fixed scoping problem with bridge
	  tracking. ........ Merged revisions 402817 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/ari/resource_channels.c, res/res_ari_channels.c,
	  res/ari/resource_channels.h, /, res/stasis/control.c,
	  include/asterisk/stasis_app.h, rest-api/api-docs/channels.json:
	  ari: Add silence generator controls This patch adds the ability
	  to start a silence generator on a channel via ARI. This generator
	  will play silence on the channel (avoiding audio timeouts on the
	  peer) until it is stopped, or some other media operation is
	  started (like playing media, starting music on hold, etc.).
	  (closes issue ASTERISK-22514) Review:
	  https://reviewboard.asterisk.org/r/3019/ ........ Merged
	  revisions 402926 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-19 23:17 +0000 [r402892]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_caller_id.c: res_pjsip_caller_id: Don't
	  overwrite user portion of the From header when fromuser is set.
	  The fromuser option is used to explicitly set the user within the
	  From header. The res_pjsip_caller_id module did not take this
	  setting into account when determining if the From header could be
	  modified or not. (closes issue ASTERISK-22866) Reported by:
	  Anthony Messina ........ Merged revisions 402891 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-16 13:51 +0000 [r402865]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip/pjsip_distributor.c, /, configure,
	  include/asterisk/autoconfig.h.in, configure.ac: res_pjsip: Add
	  support for building against pjproject with SIP transaction group
	  lock support. SIP transaction group lock support has been
	  backported into our pjproject. Since the code now internally uses
	  a group lock the code is now changed to unlock it if present.
	  Note that the act of finding the transaction is what actually
	  returns it locked. For further information about group locks
	  check out the wiki page at:
	  http://trac.pjsip.org/repos/wiki/Group_Lock (issue
	  ASTERISK-22818) Reported by: Matt Jordan ........ Merged
	  revisions 402864 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-15 22:38 +0000 [r402854]  Jonathan Rose <jrose@digium.com>

	* apps/app_confbridge.c, CHANGES,
	  apps/confbridge/conf_config_parser.c,
	  configs/confbridge.conf.sample,
	  apps/confbridge/include/confbridge.h: Confbridge: Add option to
	  review the recording similar to announce_join_leave Review:
	  https://reviewboard.asterisk.org/r/3008/

2013-11-15 14:37 +0000 [r402839]  Kinsey Moore <kmoore@digium.com>

	* /, main/cel.c: CEL: Fix crash when using CELGenUserEvent This
	  fixes a crash when CELGenUserEvent is called from the dialplan
	  while CEL is disabled. Currently, CEL does not create its topics
	  and forwards if it is not enabled and external entities may
	  depend on these topics blindly since they should always be
	  available. This patch breaks up route creation and topic/forward
	  creation such that the CEL topics and forwards will always exist
	  while the router and its associated routes will be torn down and
	  recreated as necessary. (closes issue ASTERISK-22799) Review:
	  https://reviewboard.asterisk.org/r/3010/ Reported by: Matt Jordan
	  ........ Merged revisions 402838 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-14 21:36 +0000 [r402820-402829]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_directed_pickup.c: Pickup: Pickup() and PickupChan()
	  parameter parsing improvements. * Made Pickup() and PickupChan()
	  tollerate empty pickup values. i.e., You can now have
	  Pickup(&&exten@context). * Made PickupChan() use the standard
	  option flag parsing code.

	* apps/app_directed_pickup.c: Pickup: Ensure using PICKUPMARK never
	  considers the picking channel.

2013-11-14 20:32 +0000 [r402819]  Jonathan Rose <jrose@digium.com>

	* CHANGES, main/pbx.c, apps/app_sayunixtime.c: Say: If
	  SAY_DTMF_INTERRUPT is set to an ast_true value, jump on DTMF
	  Similar to how background works, if a say application is called
	  with this variable set to 'true', 'yes', 'on', etc. then using
	  DTMF while the say action is in progress will result in the
	  channel jumping to that extension in the dialplan. Review:
	  https://reviewboard.asterisk.org/r/3011/

2013-11-13 23:11 +0000 [r402805]  Joshua Colp <jcolp@digium.com>

	* rest-api/api-docs/channels.json, res/ari/resource_channels.c,
	  res/res_ari_channels.c, res/ari/resource_channels.h, /,
	  res/stasis/control.c, include/asterisk/stasis_app.h:
	  res_ari_channels: Add the ability to stop locally generated
	  ringing on a channel. Using the 'ring' operation it is possible
	  to start locally generated ringback if the channel is answered.
	  This change adds the ability to stop it by using DELETE. ........
	  Merged revisions 402804 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-12 23:17 +0000 [r402788-402795]  Kevin Harwell <kharwell@digium.com>

	* res/ari/resource_endpoints.c, /: ari endpoints: GET
	  /ari/endpoints/{invalid-tech} should return a 404 Was returning a
	  404 on a valid technology with an empty list of endpoints. Now
	  checking against the channel tech to make sure the tech itself is
	  valid and not just an empty list of endpoints. (issue
	  ASTERISK-22803) Reported by: David M. Lee ........ Merged
	  revisions 402793 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* rest-api/api-docs/endpoints.json, res/ari/resource_endpoints.c,
	  /, res/res_ari_endpoints.c: ari endpoints: GET
	  /ari/endpoints/{invalid-tech} should return a 404 Implementation
	  listing endpoints by technology returned an empty array if no
	  matching endpoints were found. Fixed so a "404 Not Found" will be
	  returned instead. (closes issue ASTERISK-22803) Reported by:
	  David M. Lee ........ Merged revisions 402787 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-12 19:38 +0000 [r402768-402778]  Mark Michelson <mmichelson@digium.com>

	* /, main/channel.c: Switch to a scoped lock to avoid missing
	  unlocks in failure returns. ........ Merged revisions 402769 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/channel.c, /: Move a NULL check to a place that makes more
	  sense. Two variables were being checked for NULLity immediately
	  after being declared NULL. I moved the NULL check until after the
	  variables are allocated. This allows for the "channelvars" option
	  in manager.conf to work as intended again. ........ Merged
	  revisions 402767 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-12 16:49 +0000 [r402758]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_messaging.c, res/res_pjsip_header_funcs.c, /:
	  pjsip_messaging, pjsip_header_funcs: Crashes due to NULL pointer
	  dereferences Both res_pjsip_messaging and res_pjsip_header_funcs
	  were causing asterisk to crash because they were trying to
	  dereference a NULL pointer. In the case of res_pjsip_messaging it
	  was attempting to "print" a contact header that did not exist. In
	  fact contact headers should not be part of a SIP MESSAGE, so the
	  offending code was simply removed. In the case of
	  res_pjsip_header_funcs a null private channel tech was being
	  passed to the function and then later dereferenced. Added null
	  checks (and error logging) to the read/write function handlers to
	  guard against crashing. (closes issue ASTERISK-22821) Reported
	  by: Anthony Messina ........ Merged revisions 402757 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-12 16:34 +0000 [r402756]  Kinsey Moore <kmoore@digium.com>

	* /, apps/app_celgenuserevent.c: CELGenUserEvent: Fix error message
	  from ast_json_pack This prevents NULL from being passed into an
	  ast_json_pack call when no extra information is passed to the
	  application which prevents an error message about NULL arguments
	  from being generated. ........ Merged revisions 402755 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-12 15:27 +0000 [r402741]  David M. Lee <dlee@digium.com>

	* res/ari/ari_model_validators.h, rest-api/api-docs/events.json, /:
	  Fixed a typ. ........ Merged revisions 402738 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-12 15:03 +0000 [r402711]  Kinsey Moore <kmoore@digium.com>

	* channels/chan_dahdi.c, /: chan_dahdi: Fix crash during caller ID
	  read Asterisk will sometimes core dump during caller id read on
	  analog channels due to a negative return value from the read() in
	  my_get_callerid that slips through as a negative length argument
	  to callerid_feed() if the errno returned by DAHDI is ELAST. This
	  change ensures that the negative return is treated properly even
	  when it is ELAST. (closes issue ASTERISK-22746) Reported by:
	  Michael Walton Patches: chan_dahdi_cid_crash_fix.r401410.patch
	  uploaded by Michael Walton (License 6502) ........ Merged
	  revisions 402708 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 402709 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402710 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-11 20:28 +0000 [r402698]  Jonathan Rose <jrose@digium.com>

	* apps/app_confbridge.c: Confbridge: add test events for dynamic
	  menus test Adds a couple of test events for conference menu
	  actions so that it's easy to discern when those menu actions have
	  been triggered. (issue ASTERISK-22760) Reported by: Matt Jordan
	  Review: https://reviewboard.asterisk.org/r/2999/

2013-11-11 19:31 +0000 [r402688]  Mark Michelson <mmichelson@digium.com>

	* apps/app_confbridge.c, /: Get rid of some inaccurate comments.
	  I'm doing some unrelated work in app_confbridge and finding these
	  "invalid pin" comments to be annoying. Get out! ........ Merged
	  revisions 402686 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402687 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-11 15:37 +0000 [r402648]  Kinsey Moore <kmoore@digium.com>

	* /, apps/app_queue.c: app_queue: Honor penalty limits of 0 In the
	  current app_queue code from 1.8 up to trunk the upper and lower
	  penalties can be set to 0 but the value is interpreted to be
	  disabled instead of actually setting limits. This is especially
	  evident if min and max limits are set to 0 and members with
	  penalties of 0 and 1 are in the queue since the member with
	  penalty 1 will still receive calls. This patch adjusts the
	  special disabled value to be INT_MAX instead of 0. (closes issue
	  ASTERISK-20862) Review: https://reviewboard.asterisk.org/r/2995/
	  Reported by: Schmooze Com ........ Merged revisions 402645 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 402646 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402647 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 23:07 +0000 [r402607]  Scott Griepentrog <sgriepentrog@digium.com>

	* /, channels/chan_sip.c, channels/sip/include/sip.h: chan_sip:
	  keep same local (from) tag for outgoing register requests For
	  outbound register requests the tag on the From line was updated
	  every 20 seconds prior to a successful registration and also once
	  for each registration renewal. That behavior can possibly cause
	  the registration to be denied because of the different tag, and
	  is not aligned with the intention of RFC 3261 8.1.3.5 "...
	  request constitutes a new transaction and SHOULD have the same
	  value of the Call-ID, To, and From of the previous request...".
	  This updates chan_sip to have a field to keep the local tag in
	  the registration structure and use that tag for registration
	  requests where the callid is also unchanged. (closes issue
	  ASTERISK-12117) Reported by: Pawel Pierscionek Review:
	  https://reviewboard.asterisk.org/r/2988/ ........ Merged
	  revisions 402604 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 402605 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402606 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 20:37 +0000 [r402595]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_stasis.c: res_stasis.c: Fix locking issues with the
	  app_bridge_moh container. * Fix unlinking from the
	  app_bridges_moh container in remove_bridge_moh() without a lock
	  under normal circumstances. * Made check
	  ast_bridge_set_after_callback() return value in
	  bridge_moh_create() to handle failure. * Fixed SCOPED_AO2LOCK()
	  locking over too much scope in stasis_app_bridge_moh_channel()
	  and stasis_app_bridge_moh_stop(). * Fixed unusual usage of
	  ao2_unlink_flag() in control_unlink(). * Fixed orphaned bridge
	  from off nominal path in stasis_app_bridge_create(). * Fixed
	  strange construct in stasis_app_unsubscribe(). From a bad merge?
	  * Made load_module() cleanup on failure. Review:
	  https://reviewboard.asterisk.org/r/2962/ ........ Merged
	  revisions 402593 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 19:33 +0000 [r402585]  Jonathan Rose <jrose@digium.com>

	* /, main/security_events.c, configs/manager.conf.sample, CHANGES,
	  include/asterisk/manager.h, main/manager.c: security_events: Push
	  out security events over AMI events Security Events will now be
	  written to any listener of the new 'security' class Review:
	  https://reviewboard.asterisk.org/r/2998/ ........ Merged
	  revisions 402584 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 19:22 +0000 [r402583]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip.c, /: Clarify an ambiguous error message. ........
	  Merged revisions 402582 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 18:53 +0000 [r402571-402572]  David M. Lee <dlee@digium.com>

	* /, res/res_pjsip/config_system.c: res_pjsip: Print a helpful
	  error message if sorcery registration fails ........ Merged
	  revisions 402570 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/ari/resource_playbacks.h, /: Changes from make ari-stubs
	  after r402560 ........ Merged revisions 402561 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 17:59 +0000 [r402562]  Kevin Harwell <kharwell@digium.com>

	* rest-api/resources.json, res/ari/resource_playback.h (removed),
	  res/res_ari_playbacks.c (added), res/ari/resource_playbacks.h
	  (added), /, res/ari.make, rest-api/api-docs/playback.json
	  (removed), res/ari/resource_playback.c (removed),
	  res/res_ari_playback.c (removed),
	  rest-api/api-docs/playbacks.json (added),
	  res/ari/resource_playbacks.c (added): ARI playback: Rename ARI
	  Playback to Playbacks Before playback was the only non plural
	  resource. It has been renamed to playbacks for consistency.
	  (closes issue ASTERISK-22737) Reported by: Paul Belanger ........
	  Merged revisions 402560 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 17:29 +0000 [r402557]  David M. Lee <dlee@digium.com>

	* res/res_ari.c, main/manager.c, /, main/http.c: ari: Add
	  application/x-www-form-urlencoded parameter support ARI POST
	  calls only accept parameters via the URL's query string. While
	  this works, it's atypical for HTTP API's in general, and
	  specifically frowned upon with RESTful API's. This patch adds
	  parsing for application/x-www-form-urlencoded request bodies if
	  they are sent in with the request. Any variables parsed this way
	  are prepended to the variable list supplied by the query string.
	  (closes issue ASTERISK-22743) Review:
	  https://reviewboard.asterisk.org/r/2986/ ........ Merged
	  revisions 402555 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-08 14:58 +0000 [r402546]  Kevin Harwell <kharwell@digium.com>

	* apps/app_dahdiras.c, utils/extconf.c, main/asterisk.c:
	  app_dahdiras: Use waitpid instead of wait4. Several places in the
	  code were using wait4 while other places were using waitpid. This
	  change makes all places use waitpid in order to make things more
	  consistent and since the 'rusage' object passed in/out of wait4
	  was never used. (closes issue ASTERISK-22557) Reported by:
	  YvesGael Patches: asterisk-11.5.1-wait4.patch uploaded by hurdman
	  (license 6537)

2013-11-07 23:42 +0000 [r402538]  Jonathan Rose <jrose@digium.com>

	* res/res_pjsip_authenticator_digest.c, /: PJSIP: Improve error
	  handling in digest authenticator Previously, regardless of
	  whether failure to authenticate was due to lacking any
	  authentication or actually failing authentication, the Digest
	  Authenticator would simply return that a challenge was still
	  needed. It will continue to do that when no authentication
	  information is in the received SIP digest, but when
	  authentication information is present and does not pass
	  authentication, that will be treated as an authentication error.
	  This is to ensure that PJSIP will issue security events indicated
	  failed auths. ........ Merged revisions 402537 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-07 21:10 +0000 [r402529]  David M. Lee <dlee@digium.com>

	* res/ari/resource_applications.c, res/ari/resource_playback.c,
	  rest-api/api-docs/channels.json, res/ari/resource_applications.h,
	  res/ari/resource_channels.c, res/ari/resource_playback.h,
	  rest-api/api-docs/recordings.json, res/ari/resource_recordings.c,
	  rest-api-templates/ari_resource.c.mustache,
	  rest-api-templates/asterisk_processor.py,
	  res/ari/resource_channels.h, rest-api/api-docs/endpoints.json,
	  res/ari/resource_endpoints.c, res/ari/resource_recordings.h,
	  res/ari/resource_events.c, res/res_ari_playback.c,
	  res/res_ari_applications.c, res/ari/resource_endpoints.h,
	  res/ari/resource_events.h, rest-api/api-docs/sounds.json,
	  res/ari/resource_sounds.c, res/res_ari_channels.c,
	  rest-api/api-docs/bridges.json, res/ari/resource_bridges.c,
	  res/ari/resource_sounds.h, res/res_ari_recordings.c,
	  res/ari/resource_bridges.h, rest-api/api-docs/asterisk.json,
	  res/ari/resource_asterisk.c, res/res_ari_endpoints.c,
	  rest-api/api-docs/applications.json,
	  rest-api/api-docs/playback.json, res/res_ari_events.c,
	  res/ari/resource_asterisk.h, rest-api-templates/swagger_model.py,
	  res/res_ari_sounds.c, res/res_ari_bridges.c, /,
	  rest-api-templates/ari_resource.h.mustache,
	  rest-api-templates/rest_handler.mustache, res/res_ari_asterisk.c,
	  rest-api-templates/res_ari_resource.c.mustache: ari: User better
	  nicknames for ARI operations While working on building client
	  libraries from the Swagger API, I noticed a problem with the
	  nicknames. channel.deleteChannel() channel.answerChannel()
	  channel.muteChannel() Etc. We put the object name in the nickname
	  (since we were generating C code), but it makes OO generators
	  redundant. This patch makes the nicknames more OO friendly. This
	  resulted in a lot of name changing within the res_ari_*.so
	  modules, but not much else. There were a couple of other fixed I
	  made in the process. * When reversible operations (POST /hold,
	  POST /unhold) were made more RESTful (POST /hold, DELETE
	  /unhold), the path for the second operation was left in the API
	  declaration. This worked, but really the two operations should
	  have been on the same API. * The POST /unmute operation had still
	  not been REST-ified. Review:
	  https://reviewboard.asterisk.org/r/2940/ ........ Merged
	  revisions 402528 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-06 21:58 +0000 [r402518]  Kevin Harwell <kharwell@digium.com>

	* /, apps/app_queue.c: app_queue: crash if first agent is "busy" If
	  the first agent/member (via CLI "queue show") in a queue is
	  "busy" (dnd, circuit busy, etc...) and no agents answered then
	  app_queue would crash. This occurred because while the calling of
	  agent(s) remained valid the channel on "busy" agent would be set
	  to NULL and then later dereferenced upon a second "rna" function
	  call. The original intention of the code is to have only valid
	  "call attempt" objects (channels != NULL) checked while
	  attempting to call agent(s). It does this by building a
	  "call_next" list of valid "call attempt" objects. In the case of
	  the "busy" agent subsequent builds of the valid "call attempt"
	  list would sometimes include (the case mentioned above) an
	  invalid "call attempt" object. The fix was to make sure the "call
	  attempt" list was appropriately built on every iteration. A NULL
	  sanity check was also added at the original offending spot of the
	  crash just in case another one slipped by somehow. (closes issue
	  ASTERISK-22644) Reported by: Marco Signorini Review:
	  https://reviewboard.asterisk.org/r/2983/ ........ Merged
	  revisions 402517 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-05 21:17 +0000 [r402502-402508]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: chan_sip: Use AST_AF* defined constant
	  when calling ast_get_ip While the structure passed to ast_get_ip
	  should be set memset to 0, thus initializing the ss_family member
	  to 0, explicitly setting it to AST_AF_UNSPEC is more portable.
	  ........ Merged revisions 402507 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_iax2.c, /: chan_iax2: Fix incorrect usage of
	  ast_get_ip involving uninitialized struct This started off as a
	  fix for the failing IAX2 acl_call test in the Asterisk Test
	  Suite. When inspecting why that test was failing, it became clear
	  that all attempts to bind to any local loopback address was
	  failing: [Nov 2 15:56:28] VERBOSE[15787] chan_iax2.c: == Binding
	  IAX2 to address 127.0.0.1:4569 [Nov 2 15:56:28] DEBUG[15787]
	  netsock2.c: Splitting '127.0.0.1' into... [Nov 2 15:56:28]
	  DEBUG[15787] netsock2.c: ...host '127.0.0.1' and port ''. [Nov 2
	  15:56:28] ERROR[15787] netsock2.c: getaddrinfo("127.0.0.1",
	  "(null)", ...): ai_family not supported [Nov 2 15:56:28]
	  WARNING[15787] acl.c: Unable to lookup '127.0.0.1' While there's
	  conceivably other ways for getaddrino to return EAI_FAMILY, the
	  most common way is if AF_INET, AF_INET6, or AF_UNSPEC is not
	  provided as the desired family. The culprit was the call to
	  ast_get_ip, defined in acl.h. This function uses the family from
	  the passed in addr object (which it will also populate when it
	  returns!) when it eventually calls getaddrinfo. This patch fixes
	  the use of ast_get_ip that were not specifying the family in
	  chan_iax2. This prevents uninitialized use of the structure, so
	  that the addresses resolve correctly. Review:
	  https://reviewboard.asterisk.org/r/2991 ........ Merged revisions
	  402505 from http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/acl.h, /, include/asterisk/netsock2.h: netsock2:
	  Define AST_AF_* enum constants to their AF_* equivalents This
	  patch explicitly defines AST_AF_* enum constants to their
	  sys/socket.h defined equivalents. It is certainly unclear why
	  these constants actually have to exist, given that netsock2.h
	  includes sys/socket.h; however, since the code base is already
	  liberally sprinkled with the usage of AST_AF_* (as well as with
	  direct calls to AF_*), this will at least keep the semantics
	  consistent between their usage across systems. ........ Merged
	  revisions 402503 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis_channels.c, /: stasis_channels: Don't give preference
	  to ANI info in channel snapshots When publishing channel
	  snapshots, we currently compute the caller ID name and number by
	  giving preference first to ani.{name|number}, then to
	  id.{name|number}. However, when a channel driver (such as
	  chan_sip) updates the caller ID, it typically only updates the
	  caller ID stored in id.{name|number}. This means that we are
	  currently giving preference to stale information. When looking at
	  the rest of the code base, the only other place where we appear
	  to use this same logic is in app_amd. Everywhere else, we treat
	  the party information in ani as being separate to the party
	  information in id. This patch publishes only the caller ID name
	  and number in the snapshot field for caller_name and caller_num.
	  Note that the information in ANI is still available in
	  caller_ani. Review: https://reviewboard.asterisk.org/r/2992/
	  ........ Merged revisions 402501 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-04 21:02 +0000 [r402453]  Kevin Harwell <kharwell@digium.com>

	* /, channels/chan_sip.c: chan_sip: notify dialog info ignores
	  presentation indicator in callerid The presentation indicator in
	  a callerid (e.g. set by dialplan function
	  Set(CALLERID(name-pres)= ...)) is not checked when SIP Dialog
	  Info Notifies are generated during extension monitoring. Added a
	  check to make sure the name and/or number presentations on the
	  callee (remote identity) are set to allow. If they are restricted
	  then "anonymous" is used instead. (closes issue AST-1175)
	  Reported by: Thomas Arimont Review:
	  https://reviewboard.asterisk.org/r/2976/ ........ Merged
	  revisions 402450 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402452 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-02 04:30 +0000 [r402406-402439]  Richard Mudgett <rmudgett@digium.com>

	* main/stasis.c, main/stasis_message_router.c, /,
	  include/asterisk/vector.h: vector: Uppercase API to follow C
	  convention. C does not support templates like C++. ........
	  Merged revisions 402438 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/lock.h, main/stasis.c,
	  main/stasis_message_router.c, /, include/asterisk/vector.h:
	  vector: Update API to be more flexible. Made the vector macro API
	  be more like linked lists. 1) Added a name parameter to
	  ast_vector() to name the vector struct. 2) Made the API take a
	  pointer to the vector struct instead of the struct itself. 3)
	  Added an element cleanup macro/function parameter when removing
	  an element from the vector for ast_vector_remove_cmp_unordered()
	  and ast_vector_remove_elem_unordered(). 4) Added
	  ast_vector_get_addr() in case the vector element is not a simple
	  pointer. * Converted an inline vector usage in
	  stasis_message_router to use the vector API. It needed the API
	  improvements so it could be converted. * Fixed topic reference
	  leak in router_dtor() when the stasis_message_router is
	  destroyed. * Fixed deadlock potential in stasis_forward_all() and
	  stasis_forward_cancel(). Locking two topics at the same time
	  requires deadlock avoidance. * Made internal_stasis_subscribe()
	  tolerant of a NULL topic. * Made stasis_message_router_add(),
	  stasis_message_router_add_cache_update(),
	  stasis_message_router_remove(), and
	  stasis_message_router_remove_cache_update() tolerant of a NULL
	  message_type. * Promoted a LOG_DEBUG message to LOG_ERROR as
	  intended in dispatch_message(). Review:
	  https://reviewboard.asterisk.org/r/2903/ ........ Merged
	  revisions 402429 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/confbridge/conf_state_single.c,
	  apps/confbridge/conf_state_inactive.c,
	  apps/confbridge/conf_state_single_marked.c, /,
	  apps/confbridge/include/confbridge.h,
	  apps/confbridge/conf_state_multi.c, apps/app_confbridge.c,
	  apps/confbridge/conf_state_multi_marked.c,
	  apps/confbridge/conf_state.c: confbridge: Separate user muting
	  from system muting overrides. The system overrides the user
	  muting requests when MOH is playing or a waitmarked user is
	  waiting for a marked user to join. System muting overrides
	  interfere with what the user may wish the muting to be when the
	  system override ends. * User muting requests are now independent
	  of the system muting overrides. The effective muting is now the
	  logical or of the user request and system override. * Added a
	  Muted flag to the CLI "confbridge list <conference>" command. *
	  Added a Muted header to the AMI ConfbridgeList action
	  ConfbridgeList event. (closes issue AST-1102) Reported by: John
	  Bigelow Review: https://reviewboard.asterisk.org/r/2960/ ........
	  Merged revisions 402425 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402427 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/config.c, apps/confbridge/conf_config_parser.c,
	  configs/confbridge.conf.sample, /: config: Allow ConfBridge DTMF
	  menus to have '#' as the first digit. ConfBridge allows custom
	  DTMF menus to be created in the confbridge.conf file by assigning
	  a DTMF key sequence to a sequence of actions as follows:
	  DTMF-sequence = action,action... Unfortunately, the normal config
	  file processing code interprets an initial '#' character as
	  starting a directive such as #include. * Add the ability to
	  escape the first non-blank character in a config line so the '#'
	  character can be used without triggering the directive processing
	  code. (closes issue AFS-2) (closes issue ASTERISK-22478) Reported
	  by: Nicolas Tanski Patches: jira_asterisk_22478_v11.patch
	  (license #5621) patch uploaded by rmudgett (modified) Review:
	  https://reviewboard.asterisk.org/r/2969/ ........ Merged
	  revisions 402407 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402416 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/app.h, /, main/app.c: voicemail: Simplify
	  callback pointer declarations and add doxygen. * Typedefed and
	  added doxegen for the voicemail callback functions. * Simplified
	  the prototypes for ast_install_vm_functions() and
	  ast_install_vm_test_functions() to use the new function typedefs.
	  * Simplified the voicemail callback function pointer variable
	  declarations to use the new function typedefs. ........ Merged
	  revisions 402398 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-01 22:48 +0000 [r402397]  Jonathan Rose <jrose@digium.com>

	* apps/confbridge/conf_config_parser.c,
	  apps/confbridge/include/confbridge.h, apps/app_confbridge.c,
	  CHANGES: app_confbridge: Make the CONFBRIDGE function be able to
	  create dynamic menus Also adds the ability to clear all profile
	  items and makes behavior more consistent with documentation as
	  when choosing whether to use CONFBRIDGE datastore profiles or the
	  application arguments to the confbridge application. (closes
	  issue ASTERISK-22760) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2971/

2013-11-01 21:51 +0000 [r402388]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/manager_bridges.c, /, main/bridge.c,
	  include/asterisk/bridge.h: Manager: Add equivalent AMI actions
	  for the bridge CLI commands. Adds the following AMI events,
	  closely following their CLI counterparts: BridgeDestroy
	  BridgeKick BridgeTechnologyList BridgeTechnologySuspend
	  BridgeTechnologyUnsuspend BridgeDestroy kicks an entire bridge,
	  where BridgeKick kicks just one channel off the bridge. When
	  kicking a channel, specifying the bridge also (optional) insures
	  it is not removed from the wrong bridge. The BridgeTechnology
	  events allow viewing and changing suspension status, which
	  affects only subsequent not active bridging. (closes
	  ASTERISK-22356) Reported by: Richard Mudgett Review:
	  https://reviewboard.asterisk.org/r/2973/ ........ Merged
	  revisions 402387 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-01 16:31 +0000 [r402368]  David M. Lee <dlee@digium.com>

	* /, rest-api-templates/api.wiki.mustache: ari wiki docs: add notes
	  about allowMultiple parameters. This patch adds a note to any
	  parameter that has 'allowMultiple' set in the Swagger
	  documentation. (closes issue ASTERISK-22704) ........ Merged
	  revisions 402367 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-01 14:38 +0000 [r402359]  Joshua Colp <jcolp@digium.com>

	* include/asterisk/stasis_app.h, rest-api/api-docs/channels.json,
	  res/ari/resource_channels.c, res/res_ari_channels.c,
	  res/ari/resource_channels.h, res/res_stasis_playback.c, /,
	  res/stasis/control.c: res_ari_channels: Add ring operation, dtmf
	  operation, hangup reasons, and tweak early media. The ring
	  operation sends ringing to the specified channel it is invoked
	  on. The dtmf operation can be used to send DTMF digits to the
	  specified channel of a specific length with a wait time in
	  between. Finally hangup reasons allow you to specify why a
	  channel is being hung up (busy, congestion). Early media behavior
	  has also been tweaked slightly. When playing media to a channel
	  it will no longer automatically answer. If it has not been
	  answered a progress indication is sent instead. (closes issue
	  ASTERISK-22701) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2916/ ........ Merged
	  revisions 402358 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-01 12:40 +0000 [r402349]  Kinsey Moore <kmoore@digium.com>

	* res/res_rtp_asterisk.c, /, channels/chan_sip.c,
	  include/asterisk/rtp_engine.h: chan_sip: Fix RTCP port for SRFLX
	  ICE candidates This corrects one-way audio between Asterisk and
	  Chrome/jssip as a result of Asterisk inserting the incorrect RTCP
	  port into RTCP SRFLX ICE candidates. This also exposes an ICE
	  component enumeration to extract further details from candidates.
	  (closes issue ASTERISK-21383) Reported by: Shaun Clark Review:
	  https://reviewboard.asterisk.org/r/2967/ ........ Merged
	  revisions 402345 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402348 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-11-01 12:33 +0000 [r402337-402347]  Joshua Colp <jcolp@digium.com>

	* /, include/asterisk/stasis_app.h, res/ari/resource_channels.c:
	  res_ari_channels: Fix a deadlock when originating multiple
	  channels close to eachother. If a Stasis application is specified
	  an implicit subscription is done on the originated channel. This
	  was previously done with the channel lock held which is dangerous
	  as the underlying code locks the container and iterates items.
	  This change releases the lock on the originated channel before
	  subscribing occurs. (closes issue ASTERISK-22768) Reported by:
	  Matt Jordan Review: https://reviewboard.asterisk.org/r/2979/
	  ........ Merged revisions 402346 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/stasis/control.c: res_stasis: Ensure the channel is always
	  departed from the bridge when it leaves. This change adds a
	  command to the command queue to explicitly depart the channel
	  from the bridge when it is told it has left. If the channel has
	  already been departed or has entered a different bridge this
	  command will become a no-op. (closes issue ASTERISK-22703)
	  Reported by: John Bigelow (closes issue ASTERISK-22634) Reported
	  by: Kevin Harwell Review:
	  https://reviewboard.asterisk.org/r/2965/ ........ Merged
	  revisions 402336 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-31 22:09 +0000 [r402328]  Mark Michelson <mmichelson@digium.com>

	* /, contrib/scripts/sip_to_pjsip/sip_to_pjsip.py,
	  contrib/scripts/sip_to_res_sip (removed),
	  contrib/scripts/sip_to_pjsip (added),
	  contrib/scripts/sip_to_pjsip/astconfigparser.py,
	  contrib/scripts/sip_to_pjsip/astdicts.py: Update the conversion
	  script from sip.conf to pjsip.conf (closes issue ASTERISK-22374)
	  Reported by Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2846 ........ Merged revisions
	  402327 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-31 16:06 +0000 [r402286-402290]  Matthew Jordan <mjordan@digium.com>

	* main/loader.c, /: core/loader: Don't call dlclose in a while loop
	  For awhile now, we've noticed continuous integration builds
	  hanging on CentOS 6 64-bit build agents. After resolving a number
	  of problems with symbols, strange locks, and other shenanigans,
	  the problem has persisted. In all cases, gdb shows the Asterisk
	  process stuck in loader.c on one of the infinite while loops that
	  calls dlclose repeatedly until success. The documentation of
	  dlclose states that it returns 0 on success; any other value on
	  error. It does not state that repeatedly calling it will
	  eventually clear those errors. Most likely, the repeated calls to
	  dlclose was to force a close by exhausting the references on the
	  library; however, that will never succeed if: (a) There is some
	  fundamental error at work in the loaded library that precludes
	  unloading it (b) Some other loaded module is referencing a symbol
	  in the currently loaded module This results in Asterisk sitting
	  forever. Since we have matching pairs of dlopen/dlclose, this
	  patch opts to only call dlclose once, and log out as an ERROR if
	  dlclose fails to return success. If nothing else, this might help
	  to determine why on the CentOS 6 64-bit build agent things are
	  not closing successfully. Review:
	  https://reviewboard.asterisk.org/r/2970 ........ Merged revisions
	  402287 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 402288 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402289 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/media_index.c, /: medix_index: Display errors when library
	  calls fail Based on feedback from ipengineer in #asterisk, when
	  the media indexer cannot access a sound file on the system (or
	  otherwise fails) Asterisk displays a "Cannot frob file" error but
	  fails to tell you why. This is especially problematic as the
	  media_indexer failing will rpevent Asterisk from starting, as it
	  is in the core. We now display the errno error messages so folks
	  can figure out what they've done wrong. ........ Merged revisions
	  402285 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-31 14:45 +0000 [r402277]  David M. Lee <dlee@digium.com>

	* /, res/stasis/app.c: stasis: add functions embarrassingly missing
	  from r400522 I neglected to implement two of the endpoint
	  subscription functions when I did the work. Normally, you'll only
	  hit that when you unsubscribe from a specific endpoint. ........
	  Merged revisions 402276 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-30 17:54 +0000 [r402266]  Kevin Harwell <kharwell@digium.com>

	* channels/chan_pjsip.c, /, res/res_pjsip_messaging.c:
	  pjsip_messaging: Added debug for in dialog messaging (issue
	  ASTERISK-22777) Reported by: Matt Jordan ........ Merged
	  revisions 402265 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-29 23:43 +0000 [r402227]  Rusty Newton <rnewton@digium.com>

	* /, sounds/Makefile: Updates for 1.4.25 core sounds and 1.4.14
	  extra sounds, plus new en_GB language set The new sound packages
	  relate to issues: ASTERISK-22544, ASTERISK-22411, ASTERISK-21413,
	  ASTERISK-20782 Modified sounds/Makefile for the new sound
	  versions and to account for the new en_GB language set. (issue
	  ASTERISK-22659) (closes issue ASTERISK-22659) (closes issue
	  ASTERISK-22411) (closes issue ASTERISK-22544) ........ Merged
	  revisions 402224 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 402225 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402226 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-29 12:57 +0000 [r402155]  Matthew Jordan <mjordan@digium.com>

	* main/xmldoc.c, main/channel.c, main/pbx.c, /, main/translate.c:
	  Remove some spammy debug messages; improve clarity of others
	  Debug messages aren't free. Even when the debug level is
	  sufficiently low such that the messages are never evaluated,
	  there is a cost to having to parse Asterisk logs that contain
	  debug messages that (a) fail to convey sufficient information or
	  (b) occur so frequently as to be next to meaningless. Based on
	  having to stare at lots of DEBUG messages, this patch makes the
	  following changes: * channel.c: When copying variables from a
	  parent channel to a child channel, specify the channels involved.
	  Do not log anything for a variable that is not inherited; the
	  fact that it doesn't have an _ or __ already signifies that it
	  won't be inherited. * pbx.c: Specify what function evaluation has
	  occurred that created the result. * translate.c: Bump up the
	  translator path messages to 10. I've never once had to use these
	  debug messages, and for each format that is registered (on
	  startup) and unregistered (on shutdown) the entire f^2 matrix is
	  logged out. For short tests in the Asterisk Test Suite, this
	  should make finding the actual test much easier. * xmldoc.c: The
	  debug message that 'blah' is not found in the tree is expected.
	  Often, description elements - which are not required - are not
	  provided. This debug message adds no additional value, as it is
	  not indicative of an error or helpful in debugging which element
	  did not contain a 'blah' element as a child. If an element is
	  supposed to contain a child element, then that XML tree should
	  have failed validation in the first place. Review:
	  https://reviewboard.asterisk.org/r/2966/ ........ Merged
	  revisions 402150 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 402151 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402154 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-29 12:51 +0000 [r402149-402153]  Kinsey Moore <kmoore@digium.com>

	* rest-api/api-docs/channels.json, res/ari/resource_channels.c,
	  res/res_ari_channels.c, res/ari/resource_channels.h, /: ARI:
	  Remove channels/{channelId}/dial This removes the
	  /ari/channels/{channelId}/dial URI since it is redundant, overly
	  complex, is likely to become more externally complex over time,
	  and is too high-level compared with other ARI operations. See the
	  following for further information:
	  http://lists.digium.com/pipermail/asterisk-app-dev/2013-October/000002.html
	  (closes issue ASTERISK-22784) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2968/ ........ Merged
	  revisions 402152 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* bridges/bridge_native_rtp.c, /: bridge_native_rtp: Ensure bridge
	  is torn down When a bridge transitions away from one tech to
	  another, the tech going away is provided a dummy bridge with no
	  channels in it to tear down. Currently this means that the
	  teardown code exits prematurely and does not tear anything down.
	  This change tears down RTP bridging for the channel provided in
	  the leave bridge tech callback. This also reverts the majority of
	  r400403 since it is now redundant. (closes issue ASTERISK-22628)
	  (closes issue ASTERISK-22676) Reported by: John Bigelow Reported
	  by: Kevin Harwell Tested by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/2905/ Patches:
	  native_rtp_fix.diff uploaded by Kinsey Moore (License 6273)
	  ........ Merged revisions 402148 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-29 11:15 +0000 [r402140]  Joshua Colp <jcolp@digium.com>

	* /, rest-api/api-docs/playback.json, res/res_ari_playback.c:
	  res_ari_playback: Add missing 404 error response for GET and
	  DELETE. (closes issue ASTERISK-22722) Reported by: Richard
	  Mudgett ........ Merged revisions 402139 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-28 22:10 +0000 [r402128-402130]  David M. Lee <dlee@digium.com>

	* /, doc: Ignore full docs ........ Merged revisions 402127 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /: Put back several merge revisions that were lost in r402054

	* /: Put back several merge revisions that were lost in r401962

2013-10-28 15:08 +0000 [r402113-402117]  Michael L. Young <elgueromexicano@gmail.com>

	* /, UPGRADE-11.txt, UPGRADE-12.txt: Fix UPGRADE.txt Due To Merging
	  From Branch 11 When merging in the patch for ASTERISK-22728, the
	  UPGRADE.txt file was changed incorrectly. That change should have
	  gone into ASTERISK-11.txt. This commit is to fix that. Also,
	  another comment in the UPGRADE-11.txt was missing and this commit
	  adds that as well. ........ Merged revisions 402115 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c, UPGRADE-12.txt: chan_sip: Clarify
	  'Forcerport' Setting Displayed When Running "sip show peers"
	  While looking at ASTERISK-22236, Walter Doekes pointed out that
	  when running "sip show peers", the setting being displayed can be
	  confusing. The display of "N" used to mean NAT (i.e. yes). The
	  NAT setting has gone through many different changes resulting in
	  the display of different characters to try and convey what the
	  current setting is for 'Forcerport' (A for Auto and Forcerport is
	  currently on, a for Auto but Forcerport is off, Y for yes, and N
	  for no). During the initial code review to try and clarify these
	  settings (especially since "N" no longer meant what it used to
	  mean in prior versions of Asterisk), Mark Michelson suggested
	  using the full space available to display the settings which
	  helped to make the settings very clear. That was a great
	  suggestion. Therefore, this patch does the following: * The
	  column for 'Forcerport' now will show: Auto (Yes), Auto (No),
	  Yes, or No. * A column for the 'Comedia' setting has been added.
	  It too will display the setting in a non-cryptic way: Auto (Yes),
	  Auto (No), Yes, or No. * UPGRADE.txt has been updated to document
	  this change. (closes issue ASTERISK-22728) Reported by: Walter
	  Doekes Tested by: Michael L. Young Patches:
	  asterisk-forcerport-display-clarification_v3.diff uploaded by
	  Michael L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/2941 ........ Merged revisions
	  402111 from http://svn.asterisk.org/svn/asterisk/branches/11
	  ........ Merged revisions 402112 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-27 23:22 +0000 [r402073-402091]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, /: Filter out internal channels from dial message
	  handling Surrogate channels would pop up from time to time in
	  dial message handling. This would cause a WARNING message to
	  appear, indicating that the Surrogate channel had no CDR. This
	  patch filters out those channels that have the internal
	  implementation flag set, such that the WARNING message isn't
	  displayed. ........ Merged revisions 402090 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* cdr/cdr_sqlite3_custom.c, /, cdr/cdr_syslog.c, cdr/cdr_sqlite.c,
	  cdr/cdr_adaptive_odbc.c, addons/cdr_mysql.c,
	  include/asterisk/cdr.h, cdr/cdr_pgsql.c, cdr/cdr_odbc.c,
	  cdr/cdr_radius.c, cdr/cdr_custom.c, cdr/cdr_manager.c,
	  cdr/cdr_tds.c, cdr/cdr_csv.c, main/cdr.c: Prevent CDR backends
	  from unregistering while billing data is in flight This patch
	  makes it so that CDR backends cannot be unregistered while active
	  CDR records exist. This helps to prevent billing data from being
	  lost during restarts and shutdowns. Review:
	  https://reviewboard.asterisk.org/r/2880/ ........ Merged
	  revisions 402081 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, contrib/ast-db-manage/config/env.py,
	  contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py,
	  contrib/ast-db-manage/voicemail/env.py: Update Alembic database
	  scripts for external scripting and PostgreSQL, Oracle This patch
	  does the following: 1) The env scripts have been updated to be
	  tolerant of a NULL configuration file. This occurs when
	  configuration is provided by an external script, such that the
	  actual config.ini file is not used. 2) Enum types have all been
	  given names. This is needed for PostgreSQL script generation. 3)
	  The identifier meetme_confno_starttime_endtime is greater than 30
	  characters, and hence invalid for Oracle databases. This has been
	  truncated down to meetme_confno_start_end. ........ Merged
	  revisions 400383 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-26 12:56 +0000 [r402065]  Joshua Colp <jcolp@digium.com>

	* channels/chan_pjsip.c, include/asterisk/res_pjsip_session.h, /:
	  chan_pjsip: Fix a crash when direct media is enabled and an ACK
	  is received after the channel is hung up. (closes issue
	  ASTERISK-22731) Reported by: Kinsey Moore ........ Merged
	  revisions 402064 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-26 00:36 +0000 [r402056]  Richard Mudgett <rmudgett@digium.com>

	* res/res_stasis.c, /: res_stasis.c: Made use the ao2_container
	  callback templates. * Made res_stasis.c use the OBJ_SEARCH_XXX
	  defines. ........ Merged revisions 402055 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-26 00:27 +0000 [r402054]  Scott Griepentrog <sgriepentrog@digium.com>

	* main/rtp_engine.c, /, include/asterisk/rtp_engine.h: rtp_engine:
	  fix rtp payloads copy and improve argument names In function
	  ast_rtp_instance_early _bridge_make_compatible the use of
	  instance 0/1 as arguments doesn't clearly communicate a direction
	  that the copying of payloads from the source channel to the
	  destination channel will occur, making it more probable to have
	  the arguments to ast_rtp_codecs_payloads_copy() put in the
	  reverse order. This patch renames the arguments with _dst and
	  _src suffixes and corrects the copy direction. (closes issue
	  ASTERISK-21464) Reported by: Kevin Stewart Review:
	  https://reviewboard.asterisk.org/r/2894/ ........ Merged
	  revisions 402000 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 Test shows
	  rtpmap:119 being copied per this change, but is not in sip invite
	  ........ Merged revisions 402042 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 402043 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-25 23:58 +0000 [r402004-402045]  Richard Mudgett <rmudgett@digium.com>

	* /, main/taskprocessor.c: taskprocessor: Made use pthread_equal()
	  to compare thread ids. * Removed another silly use of RAII_VAR().
	  RAII_VAR() and SCOPED_LOCK() are not silver bullets that allow
	  you to turn off your brain. ........ Merged revisions 402044 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/stasis/app.c: You'd think that new files would be free of
	  whitespace issues. But you would be wrong. ........ Merged
	  revisions 402003 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-25 22:01 +0000 [r401999-402002]  Jonathan Rose <jrose@digium.com>

	* res/ari/resource_bridges.c, res/res_ari_bridges.c, /,
	  rest-api/api-docs/channels.json, res/ari/resource_channels.c,
	  res/res_ari_channels.c, rest-api/api-docs/bridges.json: ARI:
	  channel/bridge recording errors when invalid format specified
	  Asterisk will now issue 422 if recording is requested against
	  channels or bridges with an unknown format (closes issue
	  ASTERISK-22626) Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/2939/ ........ Merged
	  revisions 402001 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis_recording.c, rest-api/api-docs/channels.json,
	  res/ari/resource_channels.c, res/ari/ari_model_validators.c,
	  res/res_ari_channels.c, rest-api/api-docs/bridges.json,
	  rest-api/api-docs/recordings.json, res/ari/resource_bridges.c,
	  res/ari/ari_model_validators.h, res/res_ari_bridges.c,
	  rest-api/api-docs/events.json, /: ARI recordings: Issue HTTP
	  failures for recording requests with file conflicts If a file
	  already exists in the recordings directory with the same name as
	  what we would record, issue a 422 instead of relying on the
	  internal failure and issuing success. (closes issue
	  ASTERISK-22623) Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/2922/ ........ Merged
	  revisions 401973 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-25 20:51 +0000 [r401962]  Scott Griepentrog <sgriepentrog@digium.com>

	* include/asterisk/pbx.h, main/pbx.c, /: pbx.c: fix confused match
	  caller id that deleted exten still in hash This fixes a bug where
	  a zero length callerid match adjacent to a no match callerid
	  extension entry would be deleted together, which then resulted in
	  hashtable references to free'd memory. A third state of the
	  matchcid value has been added to indicate match to any extension
	  which allows enforcing comparison of matchcid on/off without
	  errors. (closes issue AST-1235) Reported by: Guenther Kelleter
	  Review: https://reviewboard.asterisk.org/r/2930/ ........ Merged
	  revisions 401959 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401960 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401961 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-25 17:41 +0000 [r401898-401939]  Jonathan Rose <jrose@digium.com>

	* /, res/res_pjsip/pjsip_distributor.c,
	  res/res_pjsip_endpoint_identifier_user.c: PJSIP: Add log messages
	  when requests are received for non-existent endpoints (closes
	  issue ASTERISK-22552) Reported by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/2934/ ........ Merged
	  revisions 401938 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* utils/clicompat.c, utils/refcounter.c, /: Put clicompat-r2.patch
	  back in We've figured out how to resolve the problems this was
	  causing in 12/trunk, so this can go back in now. (issue
	  ASTERISK-22467) Reported by: Corey Farrell Patches:
	  clicompat-r2.patch uploaded by coreyfarrell (license 5909)
	  ........ Merged revisions 401914 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401935 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401936 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, utils/clicompat.c: revert clicompat-r2.patch from r401704
	  Patch caused the following build errors against testsuite
	  https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD4-244
	  (issue ASTERISK-22467) Reported by: Corey Farrell ........ Merged
	  revisions 401895 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401896 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401897 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-25 16:09 +0000 [r401886]  Kevin Harwell <kharwell@digium.com>

	* /, channels/chan_sip.c: chan_sip: Allow a sip peer to accept both
	  AVP and AVPF calls Adapts the behaviour of avpf to only impact
	  the format of outgoing calls. For inbound calls, both AVP and
	  AVPF calls will be accepted regardless of the value of avpf in
	  the configuration. (closes issue ASTERISK-22005) Reported by:
	  Torrey Searle Patches: optional_avpf_trunk.patch uploaded by
	  tsearle (license 5334) ........ Merged revisions 401884 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401885 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-25 13:49 +0000 [r401873]  David M. Lee <dlee@digium.com>

	* tests/test_json.c, /: test_json: Fix deprecation warnings After a
	  series of upgrades over recent weeks, I've discovered that
	  test_json.c won't compile in dev mode any more for me. One of
	  gcc-4.8.2, OS X Mavericks or Xcode 5 has decided to deprecate
	  tempnam. Which, in general, is a good thing. But for test code
	  that just needs a temporary file, it's just annoying. This patch
	  replaces usage of tempname with mkstemp, avoiding the deprecation
	  warning. It also removes the temporary files when the test is
	  complete, which apparently we weren't doing before (oops).
	  Review: https://reviewboard.asterisk.org/r/2957/ ........ Merged
	  revisions 401872 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-24 21:06 +0000 [r401836]  Kevin Harwell <kharwell@digium.com>

	* /, main/logger.c: Logging: Logging types ignored after specifying
	  a verbose level If one specified a verbose level within a logging
	  facility in logger.conf then any component after it was ignored.
	  Fixed so all values are correctly read. (closes issue
	  ASTERISK-22456) Reported by: Kevin Harwell ........ Merged
	  revisions 401833 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401835 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-24 20:48 +0000 [r401834]  David M. Lee <dlee@digium.com>

	* rest-api-templates/models.wiki.mustache,
	  rest-api/api-docs/events.json, /,
	  rest-api-templates/swagger_model.py,
	  rest-api-templates/ari_model_validators.c.mustache: The Swagger
	  1.2 specification for type extension ended up being slightly
	  different than my proposal. Instead of putting an 'extends' field
	  on the subtype, the base type has a 'subTypes' field, which is a
	  list of the subTypes. Given that its a messaging model and not an
	  object model, kinda makes sense. This patch changes the
	  events.json api-doc, and the python translators to take the new
	  format into account. Other changes that are in Swagger 1.2 were
	  not adopted, since the spec is still in flux, and could change
	  before it's finalized. A summary of changes to the Swagger-1.2
	  spec can be found at
	  https://github.com/wordnik/swagger-core/wiki/1.2-transition.
	  (closes issue ASTERISK-22440) Review:
	  https://reviewboard.asterisk.org/r/2909/ ........ Merged
	  revisions 401701 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-24 20:34 +0000 [r401622-401832]  Jonathan Rose <jrose@digium.com>

	* /, main/utils.c: utils: Fix memory leaks and missed
	  unregistration of CLI commands on shutdown Final set of patches
	  in a series of memory leak/cleanup patches by Corey Farrell
	  (closes issue ASTERISK-22467) Reported by: Corey Farrell Patches:
	  main-utils-1.8.patch uploaded by coreyfarrell (license 5909)
	  main-utils-11.patch uploaded by coreyfarrell (license 5909)
	  main-utils-12up.patch uploaded by coreyfarrell (license 5909)
	  ........ Merged revisions 401829 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401830 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401831 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, tests/test_linkedlists.c: test_linkedlists: Fix memory leak
	  (issue ASTERISK-22467) Reported by: Corey Farrell Patches:
	  test_linkedlists-1.8.patch uploaded by coreyfarrell (license
	  5909) test_linkedlists-11up.patch uploaded by coreyfarrell
	  (license 5909) ........ Merged revisions 401790 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401791 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401792 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/jitterbuf.c: jitterbuf: Fix memory leak on jitter buffer
	  reset (issue ASTERISK-22467) Reported by: Corey Farrell Patches:
	  jitterbuf-jb_reset-leak-1.8.patch
	  jitterbuf-jb_reset-leak-11up.patch ........ Merged revisions
	  401786 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 401787 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401788 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/astobj2.c, /: astobj2: Unregister debug CLI commands at exit
	  (issue ASTERISK-22467) Reported by: Corey Farrell Patches:
	  astobj2-clean-debug-cli-1.8-11.patch uploaded by coreyfarrell
	  (license 5909) astobj2-clean-debug-cli-12up.patch uploaded by
	  coreyfarrell (license 5909) ........ Merged revisions 401781 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401783 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401784 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_voicemail.c, /: app_voicemail: Memory Leaks against
	  tests (issue ASTERISK-22467) Reported by: Corey Farrell Patches:
	  app_voicemail-1.8.patch uploaded by coreyfarrell (license 5909)
	  app_voicemail-11up.patch uploaded by coreyfarrell (license 5909)
	  ........ Merged revisions 401743 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401744 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401745 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/app.c, main/asterisk.c, utils/clicompat.c,
	  channels/chan_dahdi.c, codecs/ilbc/doCPLC.c, main/data.c, /:
	  memory leaks: Memory leak cleanup patch by Corey Farrell (second
	  set) Also covers ast_app_parse_timelen-fail-zero-length.patch,
	  but the patch was replaced with one of my own. (issue
	  ASTERISK-22467) Reported by: Corey Farrell Patches:
	  chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license
	  5909) clicompat-r2.patch uploaded by coreyfarrell (license 5909)
	  codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909)
	  data-cleanup-test-registration.patch uploaded by coreyfarrell
	  (license 5909) main-asterisk-kill-listener.patch uploaded by
	  coreyfarrell (license 5909) ........ Merged revisions 401704 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401705 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401706 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, tests/test_dlinklists.c, funcs/func_math.c,
	  channels/sip/reqresp_parser.c, main/test.c,
	  main/editline/readline.c: memory leaks: Memory leak cleanup patch
	  by Corey Farrell (first set) (issue ASTERSIK-22467) Reported by:
	  Corey Farrell Patches:
	  chan_sip-parse_contact_header_test-free-contacts.patch uploaded
	  by coreyfarrell (license 5909) cli-filename-completion-leak.patch
	  uploaded by coreyfarrell (license 5909) func_math.patch uploaded
	  by corefarrell (license 5909) main-test-cleanup.patch uploaded by
	  coreyfarrell (license 5909) test_dlinklists.patch uploaded by
	  coreyfarrell (license 5909) ........ Merged revisions 401660 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401661 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401662 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/translate.c, res/res_rtp_asterisk.c: res_rtp_asterisk:
	  Address jittery DTMF events in RTP streams (closes issue
	  ASTERISK-21170) Reported by: NITESH BANSAL Patches:
	  dtmf-timestamp.patch uploaded by NITESH BANSAL (license 6418)
	  Review: https://reviewboard.asterisk.org/r/2938/ ........ Merged
	  revisions 401619 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401620 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401621 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-23 16:52 +0000 [r401582]  Richard Mudgett <rmudgett@digium.com>

	* /, cdr/cdr_adaptive_odbc.c: cdr_adaptive_odbc: Also apply a
	  filter when the CDR value is empty. Extra CDR records are written
	  if a filtered CDR value is empty because the filter is not
	  checked. (closes issue ASTERISK-22272) Reported by: Jordi Llull
	  Chavarria ........ Merged revisions 401577 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401579 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401581 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-23 16:48 +0000 [r401580]  John Bigelow <jbigelow@digium.com>

	* /, main/bridge_channel.c: Add a test suite event to indicate when
	  the atxfer 3-way feature is detected This adds a test suite event
	  that indicates to tests when the attended transfer three-way call
	  feature is detected. Review:
	  https://reviewboard.asterisk.org/r/2912/ ........ Merged
	  revisions 401578 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-23 15:23 +0000 [r401540]  Kinsey Moore <kmoore@digium.com>

	* channels/chan_mgcp.c, /: chan_mgcp: Properly handle malformed
	  media lines This corrects a situation in which a media line was
	  not parsed properly and resulted in a crash. (closes issue
	  ASTERISK-21190) Reported by: adomjan Patches:
	  chan_mgcp.c-sscnaf_fix uploaded by adomjan (License 5448)
	  ........ Merged revisions 401537 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401538 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401539 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-23 11:16 +0000 [r401500]  Joshua Colp <jcolp@digium.com>

	* /, channels/chan_sip.c: chan_sip: Fix an issue where an
	  incompatible audio format may be added to SDP. If preferred
	  codecs included any non-audio format the code would mistakenly
	  add the audio format, even if it was not a joint capability with
	  the remote side. (closes issue ASTERISK-21131) Reported by:
	  nbougues Patches: patch_unsupported_codec_1.8.patch uploaded by
	  nbougues (license 6470) ........ Merged revisions 401497 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401498 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401499 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-23 02:36 +0000 [r401489]  Michael L. Young <elgueromexicano@gmail.com>

	* channels/chan_iax2.c, configs/iax.conf.sample, /: chan_iax2: Fix
	  Binding To Multiple Addresses Again When reworking chan_iax2 for
	  IPv6, the ability to bind to multiple addresses was removed by
	  mistake. This patch restores this functionality and adds notes
	  about IPv6 addresses in the sample config. (closes issue
	  ASTERISK-22741) Reported by: Joshua Colp Tested by: Michael L.
	  Young Patches: asterisk-22741-fix-binding-multiple-addr.diff
	  uploaded by Michael L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/2945/ ........ Merged
	  revisions 401488 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-22 23:10 +0000 [r401450]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_rtp_asterisk.c: res_rtp_asterisk: Fix crash when RTCP
	  is not available during SSRC change In r400089, a patch was put
	  in to correct erroneous RTCP statistic resets. Unfortunately,
	  ast_rtp_read can be called on an RTP instance that does not have
	  RTCP information. This patch prevents that crash by only
	  resetting the statistics if we do actually have an RTCP instance.
	  (issue AST-1174) (closes issue ASTERISK-22667) Reported by: John
	  Bigelow ........ Merged revisions 401445 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401446 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401447 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-22 19:04 +0000 [r401421-401435]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_queue.c, /: app_queue: Fix CLI "queue remove member"
	  queue_log entry. The queue_log entry resulting from CLI "queue
	  remove member" when log_membername_as_agent is enabled is wrong.
	  It always uses the interface name instead of the member name in
	  the queue_log entry. * Get the queue member before removing it
	  from the queue so the member name is available for the queue_log
	  entry. (closes issue ASTERISK-21826) Reported by: Oscar Esteve
	  Patches: fix_membername.diff (license #6505) patch uploaded by
	  Oscar Esteve (modified to fix potential ref leak) ........ Merged
	  revisions 401433 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401434 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/bridge_channel.c,
	  include/asterisk/bridge_channel_internal.h, /, main/bridge.c:
	  Bridging: Fix orphaned bridge if neither of the joining channels
	  can join. The original issue noted that the bridge is orphaned
	  when res_parking.so is not loaded and a call uses the dial kK
	  flags. A similar issue happens when only one of the park flags is
	  used. In this case you have the bridge with one or the other
	  channel left in it. The channel and bridge will stay around until
	  the channel hangs up. * Fixed the initial bridge channel push
	  failure to act as if the channel were kicked out of the bridge.
	  The bridge then decides if it needs to be dissolved. (closes
	  issue ASTERISK-22629) Reported by: Kevin Harwell Review:
	  https://reviewboard.asterisk.org/r/2928/ ........ Merged
	  revisions 401424 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/parking/parking_bridge_features.c,
	  res/parking/parking_bridge.c, /: res_parking: Give parking
	  timeout comebacktoorigin channel DTMF features. Parking timeouts
	  did not set any DTMF features for the channel calling the parker
	  back. * Added code to set the parkedcalltransfers,
	  parkedcallreparking, parkedcallhangup, and parkedcallrecording
	  options appropriately for the channels when a parking timeout
	  occurs. The recall channel DTMF options are set using the
	  BRIDGE_FEATURES channel variable to allow the other timeout
	  options to have the DTMF features available. (closes issue
	  ASTERISK-22630) Reported by: Kevin Harwell Review:
	  https://reviewboard.asterisk.org/r/2942/ ........ Merged
	  revisions 401422 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_parking.c: res_parking: Update XML documention for
	  DTMF features after parking timeout. * Updated the XML
	  documentation to indicate that the parkedcalltransfers,
	  parkedcallreparking, parkedcallhangup, and parkedcallrecording
	  configuration options also apply to parking timeouts. (issue
	  ASTERISK-22630) Reported by: Kevin Harwell Review:
	  https://reviewboard.asterisk.org/r/2942/ ........ Merged
	  revisions 401420 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-22 15:17 +0000 [r401411]  Joshua Colp <jcolp@digium.com>

	* apps/app_dial.c: Add an 'R' option to Dial which sends ringing
	  until early media has been received. (closes issue
	  ASTERISK-10487) Reported by: Gaspar Zoltan Patches: 10487.patch
	  uploaded by n8ideas (license 6075)

2013-10-21 21:06 +0000 [r401365]  Mark Michelson <mmichelson@digium.com>

	* /, main/bridge_channel.c: Remove a noisy debug message from
	  bridging code. This particular debug message, during a stress
	  test, was logged so often that it appeared that there may be a
	  memory leak in the logger code. In actuality, there was no memory
	  leak, but the logger thread was having a hard time keeping up
	  with the demands of the rest of the system. Since this debug
	  message has no value at all, the best way to fix the problem was
	  to just remove the message. (closes issue AST-1225) reported by
	  John Bigelow Patches: spammy_log.diff uploaded by Mark Michelson
	  (License #5049) ........ Merged revisions 401364 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-21 19:50 +0000 [r401328]  Kevin Harwell <kharwell@digium.com>

	* /, main/editline/term.c: Segfault in LIBEDIT_INTERNAL after
	  tgetstr(), when libncurses5-dev isn't installed Include the
	  appropriate declarations when not using termcap, but term+curses
	  and [n]curses do not exist. (closes issue ASTERISK-22351)
	  Reported by: A. Iglesias Patches:
	  issueA22351_libedit_internal_without_ncurses_dev.patch uploaded
	  by wdoekes (license 5674) ........ Merged revisions 401325 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401326 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401327 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-21 18:59 +0000 [r401316-401317]  David M. Lee <dlee@digium.com>

	* rest-api/api-docs/channels.json, /: Fixing r401281; the model
	  name is Channel, with a capital C ........ Merged revisions
	  401315 from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_ari.c, /: Fixed malformed Access-Control-Allow-Methods
	  header. Was causing Safari to barf on POST and DELETE. ........
	  Merged revisions 401106 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-19 21:57 +0000 [r401292]  Kinsey Moore <kmoore@digium.com>

	* /, channels/chan_iax2.c: Fix IAX2 incoming call address lookups
	  This fixes address lookup for incoming calls without a peer
	  definition. The address family was unset instead of being set to
	  AST_AF_UNSPEC which was causing lookup failures on "127.0.0.1".
	  This is one of the causes of the current failure of the app_page
	  integration test. Review:
	  https://reviewboard.asterisk.org/r/2933/ ........ Merged
	  revisions 401291 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-19 14:45 +0000 [r401282]  Joshua Colp <jcolp@digium.com>

	* res/ari/resource_channels.h, main/pbx.c, /,
	  rest-api/api-docs/channels.json, res/ari/resource_channels.c,
	  res/res_ari_channels.c: Return a channel snapshot when
	  originating using ARI, and subscribe the Stasis application to
	  it. This change allows a user of ARI to know what channel it has
	  originated and also follow any progress. If a Stasis application
	  is provided it will be automatically subscribed to the originated
	  channel immediately. (closes issue ASTERISK-22485) Reported by:
	  David Lee Review: https://reviewboard.asterisk.org/r/2910/
	  ........ Merged revisions 401281 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-18 22:52 +0000 [r401272]  Richard Mudgett <rmudgett@digium.com>

	* /, res/parking/parking_controller.c: res_parking: Remove setting
	  useless flag. ........ Merged revisions 401271 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-18 21:51 +0000 [r401263]  David M. Lee <dlee@digium.com>

	* contrib/scripts/get_swagger_ui.sh (added), Makefile, /,
	  static-http: This is just a quick script for dumping swagger-ui
	  into static-http, so that it can be served by the Asterisk web
	  server. I had to change the Makefile in order to recursively
	  install content from the static-http directory, hence the code
	  review instead of just putting it in. Review:
	  https://reviewboard.asterisk.org/r/2924/ ........ Merged
	  revisions 401261 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-18 18:44 +0000 [r401249]  Mark Michelson <mmichelson@digium.com>

	* main/sorcery.c, main/cli.c, main/manager.c, /, main/bridge.c,
	  main/bucket.c: Resolve some memory leaks due to incorrect for
	  loop / ao2 ref usage. A common idiom in Asterisk is to due
	  something like: for (ao2_obj = list_beginning; ao2_obj =
	  next_item; ao2_ref(ao2_obj, -1)) { ...do stuff... } This is nice
	  because it automatically takes care of the object references for
	  you. However, there is a pitfall here. If a break statement is in
	  the for loop, then the current reference is not cleaned up. In
	  some cases, this is on purpose, but in others there is a leak.
	  This commit fixes the leak cases. ........ Merged revisions
	  401248 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-18 16:59 +0000 [r401233-401240]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_fax.c, include/asterisk/channel.h, apps/app_dial.c,
	  main/channel.c: Add channel lock protection around translation
	  path setup. Most callers of ast_channel_make_compatible() happen
	  before the channels enter a two party bridge. With the new
	  bridging framework, two party bridging technologies may also call
	  ast_channel_make_compatible() when there is more than one thread
	  involved with the two channels. * Added channel lock protection
	  in set_format() and ast_channel_make_compatible_helper() when
	  dealing with the channel's native formats while setting up a
	  translation path. * Fixed best_src_fmt and best_dst_fmt usage
	  consistency in ast_channel_make_compatible_helper(). The call to
	  ast_translator_best_choice() got them backwards. * Updated some
	  callers of ast_channel_make_compatible() and the function
	  documentation. There is actually a difference between the two
	  channels passed in. * Fixed the deadlock potential in res_fax.c
	  dealing with ast_channel_make_compatible(). The deadlock
	  potential was already there anyway because res_fax called
	  ast_channel_make_compatible() with chan locked. (closes issue
	  ASTERISK-22542) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2915/ ........ Merged
	  revisions 401239 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, include/asterisk/bridge.h: Tweak ast_bridge_depart() doxygen.
	  ........ Merged revisions 401232 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-18 16:06 +0000 [r401216-401224]  Mark Michelson <mmichelson@digium.com>

	* include/asterisk/bridge.h, /: Remove the bit about requiring
	  ast_bridge_depart() to be called before ast_bridge_destroy().
	  ........ Merged revisions 401223 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/bridge.h, /: Clarify in ast_bridge_destroy()
	  about how departable channels must be handled. ........ Merged
	  revisions 401212 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-18 15:14 +0000 [r401184]  Michael L. Young <elgueromexicano@gmail.com>

	* /, channels/chan_sip.c: Remove Port Restriction When Checking For
	  NAT When trying to determine if a peer is behind NAT, we should
	  not be using the ports when comparing addresses. This patch
	  removes the port from being checked and just useds the addresses
	  now. (closes issue ASTERISK-22729) Reported by: Michael L. Young
	  Tested by: Michael L. Young Patches:
	  asterisk-remove-using-port-for-nat-check.diff uploaded by Michael
	  L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/2927/ ........ Merged
	  revisions 401182 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401183 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-18 14:50 +0000 [r401181]  Walter Doekes <walter+asterisk@wjd.nu>

	* main/channel.c, /: Properly copy/remove the device state cache
	  flag over a masquerade. In r378303 the
	  AST_FLAG_DISABLE_DEVSTATE_CACHE flag was added that tells the
	  devstate system to not cache states for non-real devices.
	  However, when optimizing away channels (ast_do_masquerade), that
	  flag wasn't copied. In my case, using Local devices as queue
	  members created a situation where the endpoint was considered in
	  use, but the state change of the device being available again was
	  ignored (not cached). The endpoint channel was optimized into the
	  (previously) Local channel, but kept the do-not-cache flag. The
	  end result being that the queue member apparently stayed in use
	  forever. (closes issue ASTERISK-22718) Reported by: Walter Doekes
	  Review: https://reviewboard.asterisk.org/r/2925/ ........ Merged
	  revisions 401178 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401179 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401180 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-17 20:39 +0000 [r401169]  Michael L. Young <elgueromexicano@gmail.com>

	* /, channels/chan_sip.c: Fix Setting A chan_sip Dialog's
	  SIP_NAT_FORCE_RPORT Flag A condition was added in a commit to fix
	  ASTERISK-21374, that, if the SIP_PAGE3_NAT_AUTO_RPORT flag was
	  set, to then copy a peer's SIP_NAT_FORCE_RPORT flag to the
	  dialog. This condition should not have been there since it
	  assumed that if Asterisk is in an environment where NAT is
	  involved, that the auto_* nat settings or force_rport setting
	  would be on in the global settings. If the nat setting in the
	  global setting is set to 'nat=no' and then turned on for peers
	  (which is not quite the recommended way, although it is allowed)
	  this flag is never copied to the dialog resulting in problems
	  like, REGISTER replies going to the wrong port. This patch
	  removes this conditional check and will now always use the peer's
	  flag which by this point in the code the checks on whether the
	  peer is behind NAT or not (if using auto_force_rport) have
	  already been run. (closes issue ASTERISK-22236) Reported by:
	  Filip Frank Tested by: Michael L. Young Patches:
	  asterisk-2236-always-set-rport.diff uploaded by Michael L. Young
	  (license 5026) Review: https://reviewboard.asterisk.org/r/2919/
	  ........ Merged revisions 401167 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401168 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-17 18:25 +0000 [r401159]  Jonathan Rose <jrose@digium.com>

	* res/res_parking.c, /: res_parking: Fix bug where reloading
	  immediately wipes new parkpos extensions (closes issue
	  ASTERISK-22631) Reported by: Kevin Harwell ........ Merged
	  revisions 401158 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-17 15:41 +0000 [r401122]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_xmpp.c, res/res_jabber.c: Reduce log level of a
	  non-pubsub error message Drop an error log message to debug level
	  1 since distributed device state functions correctly when
	  receiving this message and it spams the logs. (closes issue
	  ASTERISK-22410) Reported by: abelbeck Patches:
	  asterisk-1.8-res_jabber-log-nonpubsub-error-to-debug.patch
	  uploaded by abelbeck (License 5903)
	  asterisk-11-res_xmpp-log-nonpubsub-error-to-debug.patch uploaded
	  by abelbeck (License 5903) ........ Merged revisions 401119 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401120 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401121 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-16 21:22 +0000 [r401108]  Richard Mudgett <rmudgett@digium.com>

	* /, res/ari/resource_playback.c: ARI: Fix crash when POST
	  /playback/{id}/control does not have an operation parameter.
	  (closes issue ASTERISK-22680) Reported by: John Bigelow ........
	  Merged revisions 401107 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-16 17:01 +0000 [r401097]  David M. Lee <dlee@digium.com>

	* rest-api/resources.json, /: Oops. Leftover /stasis reference
	  ........ Merged revisions 401096 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-16 14:02 +0000 [r401088]  Kinsey Moore <kmoore@digium.com>

	* rest-api/api-docs/bridges.json, res/ari/resource_channels.h, /,
	  res/ari/resource_bridges.h, rest-api/api-docs/channels.json:
	  Clarify documentation for channel and bridge list This makes it
	  clear that the ARI API calls for listing channels and bridges
	  will list all channels or bridges in the system and not just
	  those that are in or are controlled by a Stasis application.
	  (closes issue ASTERISK-22635) Reported by: Kevin Harwell ........
	  Merged revisions 401087 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-16 12:19 +0000 [r401079]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, apps/app_queue.c: Don't check all realtime queues when doing
	  "queue show some_queue". When using realtime queues, queues have
	  to be fetched from the database every now and then to see if any
	  info has been changed or to see if the queue has been removed.
	  When fetching info for an individual queue, the pruning of other
	  queues is unnecessarily costly. Review:
	  https://reviewboard.asterisk.org/r/2907/ ........ Merged
	  revisions 401049 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 401076 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401077 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-16 00:12 +0000 [r401041]  Paul Belanger <paul.belanger@polybeacon.com>

	* /, rest-api/api-docs/bridges.json, res/res_ari_bridges.c: Use
	  POST / DELETE to toggle ARI bridge moh Review:
	  https://reviewboard.asterisk.org/r/2911/ ........ Merged
	  revisions 401040 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-15 23:44 +0000 [r401020-401039]  Richard Mudgett <rmudgett@digium.com>

	* main/translate.c: translate.c: Some minor code tweaks. *
	  Consistently compare format2index() return value so matrix_get()
	  cannot get passed negative values. * Optimize
	  ast_translator_best_choice() to defer initializing things until
	  needed. Also cached the matrix_get() return value rather than
	  repeatedly calling it.

	* /, channels/dahdi/bridge_native_dahdi.c: bridge_native_dahdi:
	  Return channel join failure if could not make the channels
	  compatible. ........ Merged revisions 401030 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_iax2.c: chan_iax2: Fix channel left locked in
	  off nominal code path. ........ Merged revisions 401016 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 401017 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-15 20:03 +0000 [r401019]  Kinsey Moore <kmoore@digium.com>

	* rest-api/api-docs/bridges.json, res/res_ari_bridges.c, /: Ensure
	  bridge record error responses validate This adds the list of
	  expected errors to the /bridges/{bridgeId}/record ARI
	  documentation so that outbound 4xx errors validate properly.
	  Previously, this would result in a response validation failure.
	  (closes issue ASTERISK-22627) Reported by: Joshua Colp ........
	  Merged revisions 401018 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-15 15:30 +0000 [r401007]  Paul Belanger <paul.belanger@polybeacon.com>

	* rest-api/api-docs/channels.json, res/res_ari_channels.c, /: Use
	  POST / DELETE to toggle hold / moh for ARI channels This change
	  updates how we handle toggle events, rather then create two
	  different function names, we'll just use POST / DELETE from HTTP
	  to handle it. Review: https://reviewboard.asterisk.org/r/2906/
	  ........ Merged revisions 400999 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-15 15:26 +0000 [r400998]  Mark Michelson <mmichelson@digium.com>

	* /, channels/chan_sip.c: Prevent chan_sip from sending duplicate
	  BYEs. When a 200 OK for an initial INVITE is received, we were
	  doing the right thing by ACKing and sending an immediate BYE.
	  However, we also were doing the wrong thing and queuing an answer
	  frame, thus causing the call to be answered. This would cause the
	  call to be hung up by the channel thread, thus resulting in a
	  second BYE being sent out. In this fix, I also have set the
	  hangupcause to be correct since the initial BYE being sent by
	  Asterisk had an unknown hangup cause. I have changed to using
	  "Bearer capabilty not available" since the call was hung up due
	  to an SDP offer/answer error. (closes issue ASTERISK-22621)
	  reported by Kinsey Moore ........ Merged revisions 400970 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400971 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400984 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-15 13:44 +0000 [r400959]  David M. Lee <dlee@digium.com>

	* /, rest-api-templates/asterisk_processor.py: My doc correction in
	  r400842 had a silly bug. Because I added a wiki_description to
	  models and not their properties, the rendered wiki page had the
	  model description instead of the property descriptions, which
	  looks very silly indeed. (closes issue ASTERISK-22705) ........
	  Merged revisions 400958 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-14 22:52 +0000 [r400913-400950]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_dahdi.c, configs/chan_dahdi.conf.sample,
	  channels/chan_dahdi.h: chan_dahdi: Add config support for hwgain
	  settings. * Add hwtxgain and hwrxgain config options to
	  chan_dahdi.conf with documentation in chan_dahdi.conf.sample.
	  (closes issue ASTERISK-22429) Reported by: Jaco Kroon Patches:
	  jira_asterisk_22429_hwgain_trunk.patch (license #5621) patch
	  uploaded by rmudgett

	* channels/chan_dahdi.c, /, channels/chan_dahdi.h: chan_dahdi:
	  Reflect the set software gain in the CLI "dahdi show channel"
	  output. * Remember the swgain setting from CLI "dahdi set swgain"
	  command so the CLI "dahdi show channel" output will reflect the
	  current setting. * Updated CLI "dahdi set hwgain" and "dahdi set
	  swgain" documentation. (issue ASTERISK-22429) Reported by: Jaco
	  Kroon Patches: jira_asterisk_22429_v1.8_v2.patch (license #5621)
	  patch uploaded by rmudgett ........ Merged revisions 400907 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400909 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400911 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-14 22:03 +0000 [r400912]  Mark Michelson <mmichelson@digium.com>

	* /, channels/chan_sip.c: chan_sip: Do not increment the SDP
	  version between 183 and 200 responses. Bumping the SDP version
	  number can cause interoperability problems since receivers of the
	  responses will expect that a 200 SDP will be identical to a
	  previous 183 SDP. (closes issue ASTERISK-21204) reported by
	  NITESH BANSAL Patches:
	  dont-increment-session-version-in-2xx-after-183.patch uploaded by
	  NITESH BANSAL (License #6418) ........ Merged revisions 400906
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 400908 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400910 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-14 15:54 +0000 [r400891]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_pjsip_outbound_registration.c: pjsip outbound
	  registration: Log message says received a 408 when we didn't If
	  the server didn't exist that we are trying to register to the log
	  message would say that a 408 was received from that server when
	  in reality one wasn't. Added log messages stating no response was
	  received if the response does not exist. (closes issue
	  ASTERISK-22554) Reported by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/2893/ ........ Merged
	  revisions 400890 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-14 15:01 +0000 [r400882]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_mwi.c, /: Remove duplicate module info block The
	  module info block was repeated twice. Once is sufficient.
	  ........ Merged revisions 400881 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-13 15:42 +0000 [r400873]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_session.c, /: Fix a race condition in
	  res_pjsip_session with rapidly terminating the session. The
	  INVITE session state callback wrongly assumes that a session will
	  always exist, but when rapidly terminating the session this
	  assumption goes out the window. As all handler code for the
	  INVITE session state callback requires the session it will now
	  just exit immediately if no session exists. (closes issue
	  ASTERISK-22668) Reported by: John Bigelow ........ Merged
	  revisions 400872 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-12 16:53 +0000 [r400864]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_pjsip_outbound_authenticator_digest.c: Fix realm
	  comparison for outbound auth When generating the list of
	  authentication credentials to pass to PJSIP, Asterisk was using
	  the raw pointer of a pj_str_t which is not always
	  NULL-terminated. This sometimes resulted in incorrect text for
	  the realm and a failure to match the realm for authentication
	  purposes which was causing the outbound nominal auth pjsip basic
	  call test to bounce. This now uses the pj_str_t that contains the
	  realm instead of generating a new one. Thanks to John Bigelow for
	  helping to narrow this down. ........ Merged revisions 400863
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-11 17:05 +0000 [r400855]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/channel.h, /: channel.h: whitespace changes.
	  ........ Merged revisions 400854 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-11 16:36 +0000 [r400851-400852]  David M. Lee <dlee@digium.com>

	* /, res/ari/resource_bridges.h, rest-api/api-docs/playback.json,
	  rest-api-templates/api.wiki.mustache, res/res_ari_playback.c,
	  rest-api/api-docs/channels.json, res/ari/resource_playback.h,
	  rest-api/api-docs/bridges.json,
	  rest-api-templates/asterisk_processor.py,
	  res/ari/resource_channels.h,
	  rest-api-templates/models.wiki.mustache: Multiple revisions
	  400508,400842-400843,400848 ........ r400508 | dlee | 2013-10-03
	  23:54:51 -0500 (Thu, 03 Oct 2013) | 1 line Corrected response
	  class for stopPlayback ........ r400842 | dlee | 2013-10-10
	  14:23:24 -0500 (Thu, 10 Oct 2013) | 1 line Correct some ARI wiki
	  rendering errors ........ r400843 | dlee | 2013-10-10 14:26:19
	  -0500 (Thu, 10 Oct 2013) | 1 line Updated /play resource docs.
	  The playback of http: resources isn't implemented... yet ........
	  r400848 | dlee | 2013-10-11 11:18:46 -0500 (Fri, 11 Oct 2013) | 5
	  lines Fix a stupid copy/paste error in ARI docs. Patches:
	  ari-doc-patch.txt uploaded by jbigelow (license 5091) ........
	  Merged revisions 400508,400842-400843,400848 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /: Fixed merge tracking for r400360, which was somehow lost

2013-10-11 16:28 +0000 [r400850]  Richard Mudgett <rmudgett@digium.com>

	* bridges/bridge_softmix.c, /: Softmix: Fix crash when switching
	  from softmix to another bridge technology. The crash is caused by
	  a race condition when switching between native RTP and softmix
	  bridging technologies. In this situation, the bridging technology
	  is switched from native RTP to softmix, and then back to native
	  RTP fast enough that the softmix private data gets destroyed
	  before the softmix mixing thread gets started. Thanks to Kinsey
	  Moore for the crash analysis. * Fix race condition when starting
	  the softmix mixing thread and switching to another bridge
	  technology. (closes issue ASTERISK-22678) Reported by: John
	  Bigelow Patches: jira_asterisk_22678_v12.patch (license #5621)
	  patch uploaded by rmudgett Tested by: John Bigelow ........
	  Merged revisions 400849 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-10 18:21 +0000 [r400825-400834]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip/location.c: Perform validation of permanent
	  contacts on AORs in res_pjsip. ........ Merged revisions 400833
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/pjsip_configuration.c, res/res_pjsip.c: Fix an
	  assertion in res_pjsip when specifying an invalid outbound proxy.
	  This change fixes two issues when setting an outbound proxy: 1.
	  The outbound proxy URI was not parsed and validated during
	  configuration. 2. If an outgoing dialog was created and the
	  outbound proxy could not be set an assertion would occur because
	  the usage count on the dialog was not decremented. The
	  documentation has also been updated to specify that a full URI
	  must be specified for the outbound proxy. (closes issue
	  ASTERISK-22672) Reported by: Antti Yrjola ........ Merged
	  revisions 400824 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-09 11:02 +0000 [r400772-400813]  Matthew Jordan <mjordan@digium.com>

	* res/res_pjsip_header_funcs.c, /: Use 'z' as the format specifier
	  for size_t Using 'lu' will produce a compiler warning for some
	  versions of gcc and on some architectures. 'z' should be portable
	  as a format specifier for size_t. ........ Merged revisions
	  400812 from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_header_funcs.c (added), /: Add PJSIP_HEADER
	  function for manipulation of SIP headers in the PJSIP stack This
	  patch adds support to the PJSIP stack in Asterisk for SIP header
	  manipulation. Note that this is analagous to
	  SIPAddHeader/SIPRemoveHeader. For PJSIP_HEADER, an incoming
	  supplemental session callback is registered that takes the
	  pjsip_hdrs from the incoming session and stores them in a linked
	  list in the session datastore. Calls to PJSIP_HEADER traverse
	  over the list and return the nth matching header where 'n' is the
	  'number' argument to the function. When adding a header, the
	  first call creates a datastore and linked list and adds the
	  datastore to the session. The header is then created as a
	  pjsip_hdr and added to the list. An outgoing supplemental session
	  callback then traverses the list and adds the headers to the
	  outgoing pjsip_msg. When removing a header, the list created with
	  PJSIP_HEADER(add,...) is traversed and all matching entries are
	  removed. (closes issue ASTERISK-22498) Reported by: George Joseph
	  patch: res_pjsip_header_funcs_v1.patch uploaded by george.joseph
	  (License 6322) ........ Merged revisions 400771 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-08 22:33 +0000 [r400770]  Kinsey Moore <kmoore@digium.com>

	* /, configure, configure.ac: Add warning when compiling with iODBC
	  support When running configure, libiodbc2 development headers
	  will fulfill the requirement for ODBC development headers, but
	  will not function properly. This adds a warning when libiodbc2
	  development headers are detected instead of unixodbc development
	  headers. (closes issue ASTERISK-22459) Reported by: Patrick
	  Maille Tested by: Walter Doekes Patches:
	  issueA22459_warn_when_using_iodbc.patch uploaded by Walter Doekes
	  (License 5674) ........ Merged revisions 400767 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400768 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400769 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-08 21:20 +0000 [r400759]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_agent_pool.c, /: app_agent_pool: Fix AMI/CLI AgentLogoff
	  soft preventing agents from logging back in. * Clear the
	  deferred_logoff flag when an agent logs in. (closes issue
	  ASTERISK-22669) Reported by: John Bigelow ........ Merged
	  revisions 400754 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-08 20:52 +0000 [r400750]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip.c, res/res_pjsip/config_transport.c: Switch from
	  using pjsip_strerror to pj_strerror. pjsip_strerror is only aware
	  of PJSIP-specific error codes. pj_strerror() is aware of all
	  PJProject error codes and OS-specific error codes. This
	  specifically fixes an oft-seen error in transport configuration
	  code where EADDRINUSE would result in "Unknown PJSIP error
	  120098" instead of a useful message. ........ Merged revisions
	  400749 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-08 20:18 +0000 [r400728-400744]  Richard Mudgett <rmudgett@digium.com>

	* configs/confbridge.conf.sample, /,
	  apps/confbridge/include/confbridge.h, apps/app_confbridge.c,
	  CHANGES, apps/confbridge/conf_config_parser.c: app_confbridge:
	  Can now set the language used for announcements to the
	  conference. ConfBridge now has the ability to set the language of
	  announcements to the conference. The language can be set on a
	  bridge profile in confbridge.conf or by the dialplan function
	  CONFBRIDGE(bridge,language)=en. (closes issue ASTERISK-19983)
	  Reported by: Jonathan White Patches: M19983_rev2.diff (license
	  #5138) patch uploaded by junky (modified) Tested by: rmudgett
	  ........ Merged revisions 400741 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400742 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/confbridge/conf_config_parser.c, /: app_confbridge: Fix
	  duplicate default_user profile. * Fixed looking in the wrong
	  profiles container to see if the default_user profile is already
	  created in verify_default_profiles(). The bridge profile
	  container is never going to hold user profiles. :) ........
	  Merged revisions 400723 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400724 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-08 18:19 +0000 [r400684-400704]  Kinsey Moore <kmoore@digium.com>

	* funcs/func_config.c, /: Fix func_config list entry allocation The
	  AST_CONFIG dialplan function defined in func_config.c allocates
	  its config file list entries using ast_malloc. List entry
	  allocations destined for use with Asterisk's linked list API must
	  be ast_calloc()d or otherwise initialized so that list pointers
	  are set to NULL. These uses of ast_malloc have been replaced by
	  ast_calloc to prevent dereferencing of uninitialized pointer
	  values when traversing the list. (closes issue ASTERISK-22483)
	  Reported by: Brian Scott ........ Merged revisions 400694 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400697 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400701 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_rtp_asterisk.c, /: Fix STUN crash when using IPv6 any
	  address Ensure that when chan_sip binds to the IPv6 any address
	  ([::]), IPv4 candidates are also added. (closes issue
	  ASTERISK-21917) Reported by: Torrey Searle Patches:
	  0023_ipv6_stun_crash.patch uploaded by Torrey Searle (License
	  5334) ........ Merged revisions 400681 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400682 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-08 15:44 +0000 [r400683]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip/pjsip_options.c, /: Push CLI qualify into the
	  threadpool. If you run Asterisk in the background and then
	  connect to it through a separate console, the thread that runs
	  CLI commands is not registered with PJLIB. Thus PJLIB does not
	  like it when you attempt to send OPTIONS requests from that
	  thread. So now we push the task into the threadpool, which we
	  know to be registered with PJLIB. Thanks to Antti Yrjola for
	  reporting this. ........ Merged revisions 400680 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-08 15:12 +0000 [r400662-400672]  Richard Mudgett <rmudgett@digium.com>

	* /, res/res_agi.c, apps/app_queue.c: Make app_queue and res_agi
	  independent of AMI being enabled. The
	  https://reviewboard.asterisk.org/r/2888/ review changes manager
	  to not subscribe to stasis when it is disabled for performance
	  reasons. When manager is disabled app_queue and res_agi decline
	  to load and fail to clean up what they have already allocated. *
	  Made app_queue and res_agi clean up allocated resources when they
	  decline to load. * Made app_queue and res_agi use their own
	  subscriptions to the stasis topics instead of borrowing manager's
	  message router structure inappropriately. (closes issue
	  ASTERISK-22604) Reported by: rmudgett Review:
	  https://reviewboard.asterisk.org/r/2902/ ........ Merged
	  revisions 400671 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, include/asterisk/stasis.h, apps/app_queue.c,
	  include/asterisk/manager.h: Miscellaneous stand alone comment
	  cleanups. ........ Merged revisions 400661 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-06 17:13 +0000 [r400625]  Michael L. Young <elgueromexicano@gmail.com>

	* /, apps/app_queue.c: app_queue: Fix Queuelog EXITWITHKEY only
	  logging two of four fields Commit r62462 added two extra fields
	  for logging "the original position the caller entered the queue
	  at, and the amount of time the caller was waiting in the queue."
	  But when r75969 was merged from 1.4 into trunk (r75977), these
	  two fields disappeared. Those two extra fields were not logged in
	  1.4 and when the patch was merged, those fields went away.
	  Therefore, this is a regression and was caught by the reporter
	  because he was reading the awesome "Asterisk: The Definitive
	  Guide" book. (closes issue ASTERISK-22197) Reported by: Dalius M.
	  Tested by: Dalius M. Patches:
	  asterisk-22197-q-log-exitwithkey.diff uploaded by Michael L.
	  Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/2901/ ........ Merged
	  revisions 400622 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400623 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400624 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-05 00:59 +0000 [r400593]  Richard Mudgett <rmudgett@digium.com>

	* /, channels/iax2/include/parser.h: chan_iax2: Fix compile error.
	  ........ Merged revisions 400588 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-04 21:41 +0000 [r400568]  Michael L. Young <elgueromexicano@gmail.com>

	* main/acl.c, include/asterisk/netsock2.h, CHANGES,
	  channels/chan_iax2.c, channels/iax2/parser.c, main/netsock.c,
	  main/netsock2.c, /, channels/iax2/include/parser.h: Add IPv6
	  Support To chan_iax2 This patch adds IPv6 support to chan_iax2.
	  Yay! (closes issue ASTERISK-22025) Patches:
	  iax2-ipv6-v5-reviewboard.diff by Michael L. Young (license 5026)
	  Review: https://reviewboard.asterisk.org/r/2660/ ........ Merged
	  revisions 400567 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-04 19:32 +0000 [r400553]  David M. Lee <dlee@digium.com>

	* rest-api/api-docs/applications.json (added), /: Added missing
	  file from r400522 ........ Merged revisions 400552 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-04 19:11 +0000 [r400533-400543]  Jonathan Rose <jrose@digium.com>

	* res/res_pjsip_logger.c, /: chan_pjsip: Make logger togglable
	  without loading/unloading This patch makes the res_pjsip_logger
	  do a few things... First, it will be built and installed by
	  default now, so end users won't need to enable it in menuselect.
	  Second, while it is loaded, it no longer will immediately issue
	  log messages. Upon loading, it is in the disabled state and must
	  be turned on with the new CLI command. The CLI command 'pjsip set
	  logger <on/off/host> has been added and can be used to do the
	  following: pjsip set logger on: Enables logger for all PJSIP
	  traffic pjsip set logger off: Disables logger for all PJSIP
	  traffic pjsip set logger host <host>: Enables logger for the
	  specific host Review: https://reviewboard.asterisk.org/r/2900/
	  ........ Merged revisions 400542 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /,
	  contrib/ast-db-manage/config/versions/43956d550a44_add_tables_for_pjsip.py
	  (added), configs/extconfig.conf.sample,
	  configs/sorcery.conf.sample,
	  contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py:
	  chan_pjsip: Add alembic scripts for generating db tables for
	  PJSIP Also updates sample configurations for sorcery and
	  extconfig to demonstrate how to use databases created by that
	  alembic script. (closes issue ASTERISK-22133) Reported by: Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/2892/ ........
	  Merged revisions 400532 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-04 16:01 +0000 [r400523]  Matthew Jordan <mjordan@digium.com>

	* res/res_stasis.c, main/asterisk.c,
	  rest-api/api-docs/endpoints.json, rest-api/api-docs/events.json,
	  res/stasis/app.c, /,
	  rest-api-templates/ari_model_validators.h.mustache,
	  include/asterisk/endpoints.h, res/res_ari_applications.c (added),
	  res/ari/resource_endpoints.h, include/asterisk/stasis_app.h,
	  res/stasis/app.h, rest-api/resources.json,
	  include/asterisk/_private.h, res/ari/ari_model_validators.c,
	  main/endpoints.c, res/ari/ari_model_validators.h, main/json.c,
	  res/res_ari_model.c, res/ari.make,
	  res/ari/resource_applications.c (added),
	  res/ari/resource_applications.h (added): ARI: Add subscription
	  support This patch adds an /applications API to ARI, allowing
	  explicit management of Stasis applications. * GET /applications -
	  list current applications * GET /applications/{applicationName} -
	  get details of a specific application * POST
	  /applications/{applicationName}/subscription - explicitly
	  subscribe to a channel, bridge or endpoint * DELETE
	  /applications/{applicationName}/subscription - explicitly
	  unsubscribe from a channel, bridge or endpoint Subscriptions work
	  by a reference counting mechanism: if you subscript to an event
	  source X number of times, you must unsubscribe X number of times
	  to stop receiveing events for that event source. Review:
	  https://reviewboard.asterisk.org/r/2862 (issue ASTERISK-22451)
	  Reported by: Matt Jordan ........ Merged revisions 400522 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-04 15:49 +0000 [r400511-400521]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip.c: Enclose the To URI and update its user
	  portion if a request user has been specified. ........ Merged
	  revisions 400520 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_session.c, /: Replace the connection address at the
	  SDP level if altering the SDP with the external media address.
	  ........ Merged revisions 400510 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 23:20 +0000 [r400482]  Jonathan Rose <jrose@digium.com>

	* /, channels/chan_sip.c: chan_sip: Don't ignore expires value in
	  contact header if it lacks semicolon (closes issue
	  ASTERISK-22574) Reported by: Filip Jenicek Patches:
	  chan_sip_expires.patch uploaded by Filip Jenicek (license 6277)
	  ........ Merged revisions 400469 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400470 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400471 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 21:46 +0000 [r400461]  Matthew Jordan <mjordan@digium.com>

	* /, main/channel_internal_api.c: Remove publication of a channel
	  snapshot when the technology is set This patch removes said
	  publication for a few reasons: (1) It is unnecessary. Association
	  of the channel technology with a specific channel is an
	  implementation detail that should be assumed to "just happen",
	  and consumers of Stasis don't need to be informed about it. (2)
	  Publication of said message can now cause crashes, as the actual
	  creation of a channel in normal locations now stages its
	  messages. As a result, things that create dummy channels (such as
	  the SIP RTP QOS unit test) and associate them with a channel
	  technology were now crashing, as the channel itself was not known
	  by Stasis. ........ Merged revisions 400460 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 20:22 +0000 [r400452]  Mark Michelson <mmichelson@digium.com>

	* bridges/bridge_native_rtp.c, /,
	  include/asterisk/bridge_technology.h: Fix assumption in
	  bridge_native_rtp.c regarding number of participants in a bridge.
	  When a party leaves a bridge, there may be more participants in
	  the bridge than expected. As such, it is important not to make
	  assumptions regarding the list of channels in a bridge. This
	  change makes it so that when a party leaves a native RTP bridge,
	  we unbridge it and the party it was bridged with. Previously, the
	  first and last channels in the list were unbridged since it was
	  assumed that these were the two channels that had been bridged.
	  As previously stated, a new party had been inserted into the
	  bridge, so this logic did not work properly. (closes issue
	  ASTERISK-22615) reported by Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2899 ........ Merged revisions
	  400403 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 19:32 +0000 [r400443]  Joshua Colp <jcolp@digium.com>

	* /, main/cdr.c: When serializing CDR variables (like for "core
	  show channels") don't output an error if CDRs aren't enabled.
	  ........ Merged revisions 400442 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 19:30 +0000 [r400441]  Kinsey Moore <kmoore@digium.com>

	* /, main/security_events.c: Fix security events for AMI invalid
	  password In r337595, additional security events were added for
	  chan_sip authentication failures. The new IEs added to the
	  existing invalid password event were defined as required IEs, but
	  existing users of the event did not set the new IEs and could not
	  since they didn't apply to existing uses. They are now marked as
	  optional IEs. (closes issue ASTERISK-22578) Reported by: Matt
	  Jordan ........ Merged revisions 400421 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400440 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 19:06 +0000 [r400402]  Joshua Colp <jcolp@digium.com>

	* res/ari/resource_channels.c, /: Fix a crash caused by muting and
	  unmuting a channel in ARI without specifying a direction. (closes
	  issue ASTERISK-22637) Reported by: Scott Griepentrog Patch by
	  Matt Jordan, whose office I have taken over in the name of
	  Canada. ........ Merged revisions 400401 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 18:51 +0000 [r400399]  Richard Mudgett <rmudgett@digium.com>

	* /, main/cel.c: cel: Some whitespace cleanups ........ Merged
	  revisions 400398 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 18:32 +0000 [r400385-400397]  Kinsey Moore <kmoore@digium.com>

	* res/res_rtp_multicast.c, /: res_rtp_multicast: Ensure SSRC is set
	  properly This fixes a bug where the SSRC field on multicast RTP
	  can be stuck at 0 which can cause problems for endpoints trying
	  to make sense of incoming streams. (closes issue ASTERISK-22567)
	  Reported by: Simone Camporeale Patches:
	  22567_res_mulitcast_ssrc.patch uploaded by Simone Camporeale
	  (License 6536) ........ Merged revisions 400393 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400394 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400395 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, configure, include/asterisk/autoconfig.h.in, configure.ac,
	  main/xml.c: Detect and use xsltCleanupGlobals when available This
	  introduces usage of an additional libxslt cleanup function,
	  xsltCleanupGlobals, when the configure script detects that it is
	  available. Early versions of the library did not include this
	  function. (closes issue ASTERISK-22570) Reported by: Corey
	  Farrell Patches: xsltCleanupGlobals.patch uploaded by Corey
	  Farrell (License 5909) ........ Merged revisions 400384 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 16:28 +0000 [r400374]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_vpb.cc, /: chan_vpb: Make compile again. ........
	  Merged revisions 400373 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 14:59 +0000 [r400363-400364]  Mark Michelson <mmichelson@digium.com>

	* tests/test_cel.c, /: Get rid of uses of stasis_topic_wait()
	  ........ Merged revisions 400362 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* pbx/pbx_spool.c, main/manager.c, main/format_cap.c,
	  channels/chan_skinny.c, res/res_agi.c, channels/chan_motif.c,
	  channels/chan_alsa.c, apps/app_confbridge.c,
	  addons/chan_mobile.c, channels/chan_mgcp.c,
	  res/res_clioriginate.c, channels/chan_bridge_media.c,
	  channels/chan_sip.c, tests/test_format_api.c,
	  res/res_pjsip_sdp_rtp.c, bridges/bridge_simple.c,
	  apps/app_originate.c, res/parking/parking_applications.c,
	  main/core_local.c, channels/chan_console.c, channels/chan_oss.c,
	  include/asterisk/format_cap.h, res/res_pjsip_session.c,
	  res/ari/resource_bridges.c, channels/chan_jingle.c,
	  channels/chan_misdn.c, channels/dahdi/bridge_native_dahdi.c,
	  res/res_pjsip/pjsip_configuration.c, main/file.c,
	  channels/chan_h323.c, channels/chan_nbs.c,
	  bridges/bridge_native_rtp.c, tests/test_config.c,
	  res/res_stasis.c, channels/chan_pjsip.c, channels/chan_unistim.c,
	  channels/chan_multicast_rtp.c, addons/chan_ooh323.c,
	  main/rtp_engine.c, /, main/ccss.c, apps/app_meetme.c,
	  bridges/bridge_holding.c, main/bridge_basic.c,
	  bridges/bridge_softmix.c, channels/chan_gtalk.c,
	  channels/chan_iax2.c, main/media_index.c, main/channel.c,
	  channels/chan_phone.c, channels/chan_dahdi.c, main/dial.c: Cache
	  string values of formats on ast_format_cap() to save processing.
	  Channel snapshots have string representations of the channel's
	  native formats. Prior to this change, the format strings were
	  re-created on ever channel snapshot creation. Since channel
	  native formats rarely change, this was very wasteful. Now, string
	  representations of formats may optionally be stored on the
	  ast_format_cap for cases where string representations may be
	  requested frequently. When formats are altered, the string cache
	  is marked as invalid. When strings are requested, the cache
	  validity is checked. If the cache is valid, then the cached
	  strings are copied. If the cache is invalid, then the string
	  cache is rebuilt and copied, and the cache is marked as being
	  valid again. Review: https://reviewboard.asterisk.org/r/2879
	  ........ Merged revisions 400356 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-03 14:52 +0000 [r400361]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip_sdp_rtp.c, res/res_pjsip_t38.c, /: Fix crashes in
	  res_pjsip_sdp_rtp and res_pjsip_t38 when a stream is rejected and
	  external_media_address is set. The callback function for changing
	  the media address in streams wrongly assumes that a connection
	  line will always be present. This is false as no line is present
	  if a stream has been rejected. (closes issue ASTERISK-22645)
	  Reported by: Rusty Newton ........ Merged revisions 400360 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 22:22 +0000 [r400335]  Mark Michelson <mmichelson@digium.com>

	* main/stasis_wait.c (removed), res/ari/resource_endpoints.c, /,
	  include/asterisk/stasis.h, tests/test_cel.c,
	  include/asterisk/stasis_endpoints.h, channels/chan_pjsip.c,
	  main/stasis.c, main/stasis_endpoints.c: Multiple revisions
	  400318-400319 ........ r400318 | mmichelson | 2013-10-02 17:08:49
	  -0500 (Wed, 02 Oct 2013) | 12 lines Remove unnecessary waits from
	  stasis. Since caches are updated on publisher threads, there is
	  no need to wait for the cache updates to occur after a stasis
	  message is published. In the case of chan_pjsip device state
	  changes, this set of changes caused an improvement to
	  performance. Review: https://reviewboard.asterisk.org/r/2890
	  ........ r400319 | mmichelson | 2013-10-02 17:10:54 -0500 (Wed,
	  02 Oct 2013) | 3 lines Remove svn:mergeinfo property. ........
	  Merged revisions 400318-400319 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 21:33 +0000 [r400317]  Michael L. Young <elgueromexicano@gmail.com>

	* channels/chan_iax2.c, /: Cast Integer Argument To Unsigned Char
	  The member reg in the peercnt structure is an unsigned char and
	  peercnt_modify() is expecting an unsigned char argument which
	  gets assigned to peercnt->reg. This patch fixes that by casting
	  the integer argument being passed to peercnt_modify to unsigned
	  char. ........ Merged revisions 400314 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400315 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400316 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 21:26 +0000 [r400313]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, main/manager.c, /, main/cel.c: Only create Stasis
	  subscriptions when enabled Subscribing to Stasis isn't free. As
	  such, this patch makes AMI, CDR, and CEL - the "big 3" - only
	  subscribe when enabled. Toggling their availability via a .conf
	  file will unsubscribe/subscribe as appropriate. Review:
	  https://reviewboard.asterisk.org/r/2888/ ........ Merged
	  revisions 400312 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 20:31 +0000 [r400304]  Richard Mudgett <rmudgett@digium.com>

	* main/pbx.c, /: Originate: Make setting caller id on outgoing call
	  use either name or number. Previous code was requiring both name
	  and number to be available. Also restored a comment block on why
	  caller id is also set on an outgoing call leg in addition to
	  connected line from earlier versions of Asterisk. ........ Merged
	  revisions 400303 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 19:20 +0000 [r400295]  Kinsey Moore <kmoore@digium.com>

	* /, rest-api/api-docs/asterisk.json: Correct allowable values for
	  ARI general information filter ........ Merged revisions 400291
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 19:17 +0000 [r400287]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, /: Fix the CDR CLI command 'cdr show active
	  {channel}' When the switch from channel names to channel unique
	  IDs happened, the poor CLI command got left in the dust. This
	  fixes the command so that users can once again see how Asterisk
	  is messing up your billing information. ........ Merged revisions
	  400286 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 18:44 +0000 [r400285]  Joshua Colp <jcolp@digium.com>

	* /, res/res_pjsip_t38.c: Fix a crash in res_pjsip_t38 caused by
	  the wrong assumption that a session will always have a channel.
	  When starting up or shutting down this assumption is false.
	  ........ Merged revisions 400284 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 18:28 +0000 [r400282]  Tzafrir Cohen <tzafrir.cohen@xorcom.com>

	* Makefile, doc/astdb2sqlite3.8 (added), /, doc/astdb2bdb.8
	  (added): man pages for astdb2bdb and astdb2sqlite3 Review:
	  https://reviewboard.asterisk.org/r/2898/ ........ Merged
	  revisions 400279 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400281 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 17:12 +0000 [r400269-400271]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_stack.c, res/stasis_recording/stored.c, main/json.c,
	  main/stasis_cache.c, res/res_ari.c, /, main/utils.c:
	  MALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is
	  enabled. * There were several places in ARI where an external
	  library was mallocing memory that must always be released with
	  free(). When MALLOC_DEBUG is enabled, free() is redirected to the
	  MALLOC_DEBUG version. Since the external library call still uses
	  the normal malloc(), MALLOC_DEBUG complains that the freed memory
	  block is not registered and will not free it. These cases must
	  use ast_std_free(). * Changed calls to asprintf() and vasprintf()
	  to the equivalent ast_asprintf() and ast_vasprintf() versions
	  respectively. ........ Merged revisions 400270 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/sig_ss7.c, /: sig_ss7: Fix compiler warnings. ........
	  Merged revisions 400268 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-02 16:23 +0000 [r400246-400266]  Joshua Colp <jcolp@digium.com>

	* channels/chan_alsa.c, main/stasis_channels.c, channels/sig_ss7.c,
	  channels/chan_pjsip.c, channels/chan_mgcp.c,
	  channels/chan_unistim.c, apps/app_dial.c, main/pbx.c, /,
	  channels/chan_sip.c, main/bridge.c, include/asterisk/channel.h,
	  channels/chan_gtalk.c, channels/chan_console.c,
	  channels/sig_pri.c, channels/chan_iax2.c, channels/chan_jingle.c,
	  main/channel.c, channels/chan_dahdi.c, main/dial.c,
	  include/asterisk/stasis_channels.h, channels/chan_skinny.c,
	  channels/chan_motif.c: Reduce channel snapshot creation and
	  publishing by up to 50%. This change introduces the ability to
	  stage channel snapshot creation and publishing by suppressing the
	  implicit creation and publishing that some functions have. Once
	  all operations are executed the staging is marked as done and a
	  single snapshot is created and published. Review:
	  https://reviewboard.asterisk.org/r/2889/ ........ Merged
	  revisions 400265 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_session.c, /: Fix a random one way audio issue in
	  PJSIP. Due to the asynchronous design of the PJMEDIA SDP
	  negotiator it was possible for the SDP to be negotiated *after* a
	  channel was created and after it was being wait on by an
	  application. It is only after negotiation occurs that the file
	  descriptors for RTP are placed on the channel. Since the channel
	  was already being waited on these file descriptors were not
	  monitored, causing incoming media to never be read. This change
	  wakes up any application waiting on the channel so that added
	  file descriptors end up being monitored. (closes issue AST-1227)
	  Reported by: John Bigelow ........ Merged revisions 400256 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/stasis/control.c, include/asterisk/stasis_app.h,
	  res/ari/resource_channels.c: Allow specifying a channel to dial
	  an extension and context in an ARI dial operation. (issue
	  ASTERISK-22625) Reported by: Scott Griepentrog ........ Merged
	  revisions 400254 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip_session.c: Retrieve and store the hostname only
	  once so multiple threads do not potentially initialize it at the
	  same time. ........ Merged revisions 400245 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-01 21:19 +0000 [r400228-400237]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_dahdi.c, channels/sig_analog.c, /: chan_dahdi: Fix
	  analog parking using flash-hook. Transferring an analog call
	  using a flash-hook to parking would fail to park the call and
	  result in an invalid ao2 object unref. * Park the correct bridged
	  channel. ........ Merged revisions 400236 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/features_config.c, /: Features: Rearm the parking config
	  options have moved warning for each reload. ........ Merged
	  revisions 400227 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-10-01 15:54 +0000 [r400218]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, /: Filter out internal channels for bridge leave
	  messages and parked call messages Granted, if you manage to park
	  a Conference announcer channel, something has gone horrifically
	  wrong. ........ Merged revisions 400217 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-30 21:40 +0000 [r400206]  Jonathan Rose <jrose@digium.com>

	* configs/features.conf.sample, /, configs/res_parking.conf.sample:
	  configuration samples: Pull all parking related stuff out of
	  features.conf This patch also adds documentation for parking from
	  features.conf to res_parking.conf ........ Merged revisions
	  400205 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-30 19:58 +0000 [r400195-400197]  Matthew Jordan <mjordan@digium.com>

	* /, funcs/func_cdr.c: Parse arguments passed to the CDR_PROP
	  function correctly I can only blame this on a bad merge, because
	  this in no way worked properly the way it was written. Mea culpa.
	  The function should now parse its arguments correctly and
	  function properly. (Note that the API used by the CDR_PROP
	  function has working unit tests... this was merely bad coding of
	  the actual registered function) (closes issue ASTERISK-22613)
	  Reported by: Private Name ........ Merged revisions 400196 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: Remove spurious event raised when CDRs are
	  reloaded The Reload event is now raised by the module loading
	  core. As such, the Reload event in the CDR engine was a duplicate
	  and not needed. ........ Merged revisions 400194 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-30 18:55 +0000 [r400186]  David M. Lee <dlee@digium.com>

	* tests/test_devicestate.c, include/asterisk/sem.h (added),
	  tests/test_taskprocessor.c, res/res_pjsip_mwi.c,
	  res/res_pjsip/include/res_pjsip_private.h, tests/test_stasis.c,
	  res/parking/parking_manager.c, res/res_security_log.c,
	  channels/chan_mgcp.c, main/stasis_cache_pattern.c, main/pbx.c,
	  include/asterisk/vector.h (added), /, main/ccss.c,
	  apps/app_meetme.c, include/asterisk/taskprocessor.h,
	  configs/stasis.conf.sample (removed), configure.ac,
	  res/parking/parking_applications.c, channels/sig_pri.c,
	  apps/app_queue.c, main/cel.c, main/stasis.c,
	  channels/chan_dahdi.c, funcs/func_presencestate.c,
	  main/stasis_message_router.c, configure,
	  apps/confbridge/confbridge_manager.c, res/res_agi.c,
	  main/manager_system.c, res/res_stasis_test.c, main/sem.c (added),
	  main/manager_channels.c, res/res_pjsip_refer.c,
	  main/manager_mwi.c, apps/app_voicemail.c, main/stasis_cache.c,
	  main/stasis_wait.c, main/stasis_config.c (removed),
	  include/asterisk/stasis_internal.h, res/stasis/app.c,
	  channels/chan_sip.c, include/asterisk/autoconfig.h.in,
	  main/manager_endpoints.c, main/channel_internal_api.c,
	  include/asterisk/stasis.h, main/devicestate.c,
	  main/taskprocessor.c, res/res_xmpp.c, main/sounds_index.c,
	  include/asterisk/stasis_message_router.h, channels/chan_iax2.c,
	  res/res_jabber.c, main/endpoints.c, main/astobj2.c,
	  res/res_chan_stats.c, res/parking/parking_bridge_features.c,
	  tests/test_stasis_endpoints.c, main/cdr.c, main/channel.c,
	  main/manager_bridges.c, main/manager.c, channels/chan_skinny.c:
	  Multiple revisions 399887,400138,400178,400180-400181 ........
	  r399887 | dlee | 2013-09-26 10:41:47 -0500 (Thu, 26 Sep 2013) | 1
	  line Minor performance bump by not allocate manager variable
	  struct if we don't need it ........ r400138 | dlee | 2013-09-30
	  10:24:00 -0500 (Mon, 30 Sep 2013) | 23 lines Stasis performance
	  improvements This patch addresses several performance problems
	  that were found in the initial performance testing of Asterisk
	  12. The Stasis dispatch object was allocated as an AO2 object,
	  even though it has a very confined lifecycle. This was replaced
	  with a straight ast_malloc(). The Stasis message router was
	  spending an inordinate amount of time searching hash tables. In
	  this case, most of our routers had 6 or fewer routes in them to
	  begin with. This was replaced with an array that's searched
	  linearly for the route. We more heavily rely on AO2 objects in
	  Asterisk 12, and the memset() in ao2_ref() actually became
	  noticeable on the profile. This was #ifdef'ed to only run when
	  AO2_DEBUG was enabled. After being misled by an erroneous comment
	  in taskprocessor.c during profiling, the wrong comment was
	  removed. Review: https://reviewboard.asterisk.org/r/2873/
	  ........ r400178 | dlee | 2013-09-30 13:26:27 -0500 (Mon, 30 Sep
	  2013) | 24 lines Taskprocessor optimization; switch Stasis to use
	  taskprocessors This patch optimizes taskprocessor to use a
	  semaphore for signaling, which the OS can do a better job at
	  managing contention and waiting that we can with a mutex and
	  condition. The taskprocessor execution was also slightly
	  optimized to reduce the number of locks taken. The only
	  observable difference in the taskprocessor implementation is that
	  when the final reference to the taskprocessor goes away, it will
	  execute all tasks to completion instead of discarding the
	  unexecuted tasks. For systems where unnamed semaphores are not
	  supported, a really simple semaphore implementation is provided.
	  (Which gives identical performance as the original taskprocessor
	  implementation). The way we ended up implementing Stasis caused
	  the threadpool to be a burden instead of a boost to performance.
	  This was switched to just use taskprocessors directly for
	  subscriptions. Review: https://reviewboard.asterisk.org/r/2881/
	  ........ r400180 | dlee | 2013-09-30 13:39:34 -0500 (Mon, 30 Sep
	  2013) | 28 lines Optimize how Stasis forwards are dispatched This
	  patch optimizes how forwards are dispatched in Stasis.
	  Originally, forwards were dispatched as subscriptions that are
	  invoked on the publishing thread. This did not account for the
	  vast number of forwards we would end up having in the system, and
	  the amount of work it would take to walk though the forward
	  subscriptions. This patch modifies Stasis so that rather than
	  walking the tree of forwards on every dispatch, when forwards and
	  subscriptions are changed, the subscriber list for every topic in
	  the tree is changed. This has a couple of benefits. First, this
	  reduces the workload of dispatching messages. It also reduces
	  contention when dispatching to different topics that happen to
	  forward to the same aggregation topic (as happens with all of the
	  channel, bridge and endpoint topics). Since forwards are no
	  longer subscriptions, the bulk of this patch is simply changing
	  stasis_subscription objects to stasis_forward objects (which,
	  admittedly, I should have done in the first place.) Since this
	  required me to yet again put in a growing array, I finally
	  abstracted that out into a set of ast_vector macros in
	  asterisk/vector.h. Review:
	  https://reviewboard.asterisk.org/r/2883/ ........ r400181 | dlee
	  | 2013-09-30 13:48:57 -0500 (Mon, 30 Sep 2013) | 28 lines Remove
	  dispatch object allocation from Stasis publishing While looking
	  for areas for performance improvement, I realized that an unused
	  feature in Stasis was negatively impacting performance. When a
	  message is sent to a subscriber, a dispatch object is allocated
	  for the dispatch, containing the topic the message was published
	  to, the subscriber the message is being sent to, and the message
	  itself. The topic is actually unused by any subscriber in
	  Asterisk today. And the subscriber is associated with the
	  taskprocessor the message is being dispatched to. First, this
	  patch removes the unused topic parameter from Stasis subscription
	  callbacks. Second, this patch introduces the concept of
	  taskprocessor local data, data that may be set on a taskprocessor
	  and provided along with the data pointer when a task is pushed
	  using the ast_taskprocessor_push_local() call. This allows the
	  task to have both data specific to that taskprocessor, in
	  addition to data specific to that invocation. With those two
	  changes, the dispatch object can be removed completely, and the
	  message is simply refcounted and sent directly to the
	  taskprocessor. Review: https://reviewboard.asterisk.org/r/2884/
	  ........ Merged revisions 399887,400138,400178,400180-400181 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-30 15:57 +0000 [r400142]  Kinsey Moore <kmoore@digium.com>

	* /, channels/chan_sip.c, configs/pjsip.conf.sample,
	  res/res_pjsip_outbound_registration.c, configs/sip.conf.sample,
	  CHANGES: chan_sip: Allow Asterisk to retry after 403 on register
	  This adds a global option in chan_sip to allow it to continue
	  attempting registration if a 403 is received, clearing the cached
	  nonce and treating it as a non-fatal response. Normally, this
	  would cause registration attempts to that endpoint to stop. This
	  also adds a similar per-outbound-registration option to
	  chan_pjsip which allows the retry interval to be altered for 403
	  responses to REGISTER requests. (closes issue ASTERISK-17138)
	  Review: https://reviewboard.asterisk.org/r/2874/ Reported by:
	  Rudi ........ Merged revisions 400137 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400140 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400141 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-28 22:57 +0000 [r400059-400122]  Matthew Jordan <mjordan@digium.com>

	* /, res/res_pjsip_notify.c, configs/pjsip_notify.conf.sample
	  (added): res_pjsip_notify: Add documentation We forgot to add
	  documentation for res_pjsip_notify, which would prevent it from
	  being loaded. Whoops. This patch also updates res_pjsip_notify to
	  use pjsip_notify.conf, which now has its own sample file in the
	  configs directory as well. Review:
	  https://reviewboard.asterisk.org/r/2835/ ........ Merged
	  revisions 400121 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Correct erroneous
	  lost packet information in RTCP reports RTCP's calculation of the
	  number of lost packets in an RTP stream is based on that stream's
	  sequence number count, the number of received packets, and how
	  many packets we expect to receive. When the SSRC for an RTP
	  stream changes, there can - and almost always will be - a large
	  jump in the next packet's timestamp and sequence number. If we
	  don't reset the number of received packets, sequence number
	  count, and other metrics used by RTCP, the next RR/SR report will
	  use the previous SSRC's values to calculate the lost packet count
	  for the new SSRC - resulting in a very large number of lost
	  packets. This patch modifies res_rtp_asterisk such that, if it
	  detects a SSRC change, it will reset the various values used by
	  the RTCP calculations. From the perspective of RTCP, this appears
	  as a new media stream - which is what it is. Review:
	  https://reviewboard.asterisk.org/r/2886/ (closes issue AST-1174)
	  Reported by: Thomas Arimont ........ Merged revisions 400089 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400093 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400108 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, configure, configure.ac: Add check for openSUSE when detecting
	  bfd library In ASTERISK-17842, some additional library checks
	  were added to the configure script so that the bfd library could
	  be found on CentOS and Fedora systems. As it turns out, openSUSE
	  requires an additional library. This patch adds another check to
	  the configure script for openSUSE that will add that library.
	  Review: https://reviewboard.asterisk.org/r/2885/ (closes issue
	  AST-1169) Reported by: Guenther Kelleter ........ Merged
	  revisions 400073 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400075 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400077 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: CDR: Improve handling of parking; resolve
	  assertion when originating into park This patch covers two
	  problems: 1) Currently, when a call is transferred into a parking
	  lot from a bridge (using either the blind transfer or one touch
	  parking mechanisms), the application fails to be set to "Park" in
	  the resulting CDR record for the parked channel. This is due to
	  the ParkedCall message arriving before the BridgeEnter for the
	  channel entering the parking bridge. The ParkedCall message isn't
	  handled as the CDR for the channel has already been finalized
	  (due to the channel having left its two party bridge), and the
	  BridgeEnter - which creates the new CDR - doesn't have the
	  parking information. This patch modifies the behavior so that
	  reception of a ParkedCall message will - if not handled by a CDR
	  chain - cause a new CDR to be created and put into the Parking
	  state. 2) It fixes a FRACK that occurred when a channel is
	  originated into a parking space. The DialedPending state - which
	  occurs for both Dialed and Originated channels - assumed that it
	  couldn't handle the parking transitions due to it having a Party
	  B; however, Originated channels don't have a Party B. As such,
	  the existing CDR needs to transition into the parking state -
	  this patch does that. Review:
	  https://reviewboard.asterisk.org/r/2877/ (closes issue
	  ASTERISK-22482) Reported by: Richard Mudgett ........ Merged
	  revisions 400062 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_queue.c: app_queue: Make manager events tolerant of
	  Local channel shenanigans app_queue currently attempts to handle
	  Local channel optimizations in an effort to provide accurate
	  information in Stasis messages (and their corresponding AMI
	  events) as well as the Queue log. Sometimes, however, things
	  don't go as planned. Consider the following scenario: SIP/foo <->
	  L;1 <-> L;2 <-> SIP/agent SIP/agent answers, triggering a Local
	  channel optimization. app_queue will normally do the following: *
	  Listen for the Local optimization events and update our agent
	  accordingly to SIP/agent in the queue log and messages * When we
	  get a hangup, publish the AgentComplete event based on our
	  information (SIP/foo and SIP/agent) However, as with all things
	  that depend on sanity from something as capricious as Local
	  channels, things can go wrong: (1) SIP/agent immediately hangs up
	  upon answering. This triggers a race condition between
	  termination messages coming from SIP/agent and the ongoing Local
	  channel optimization messages. (Note that this can also occur
	  with SIP/foo) (2) In a race condition, Asterisk can (rarely)
	  deliver the hangup messages prior to the Local channel
	  optimization. In that case, the messages *may* arrive to
	  app_queue in the following order: * Hangup SIP/Agent * Hangup
	  SIP/foo * Optimize L;1/L;2 * Hangup L;2 * Hangup L;1 When
	  app_queue receives the hangup of the agent or the caller, it will
	  attempt to publish the AgentComplete event. However, it now has a
	  problem - it thinks its agent is the ;1 side of the Local
	  channel, as it never received the optimization event. At the same
	  time, that channel is already gone. This results in getting NULL
	  from the Stasis cache. What's more, we can't really wait for the
	  optimization message, as we are currently handling the hangup of
	  the channel that the optimization event would tell us to use.
	  This patch modifies the behavior in app_queue such that, since we
	  still have a lot of pertinent queue information (interface, queue
	  name, etc.), we now raise the event with what information we
	  know. The channels involved now may or may not be present. Users
	  will still at least get the "AgentComplete" event, which
	  "completes" the known Agent information. Review:
	  https://reviewboard.asterisk.org/r/2878/ (closes issue
	  ASTERISK-22507) Reported by: Richard Mudgett ........ Merged
	  revisions 400060 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/manager.c, /: manager: Fix crash when appending a manager
	  channel variable In r399887, a minor performance improvement was
	  introduced by not allocating the manager variable struct if it
	  wasn't used. Unfortunately, when directly accessing an
	  ast_channel struct, manager assumed that the struct was always
	  allocated. Since this was no longer the case, things got a bit
	  crashy. This fixes that problem by simply bypassing appending
	  variables if the manager channel variable struct isn't there.
	  ........ Merged revisions 400058 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-27 21:58 +0000 [r400016-400021]  Richard Mudgett <rmudgett@digium.com>

	* apps/app_cdr.c, res/res_parking.c, /: app_cdr and res_parking:
	  Fix some resource leaks. * app_cdr left the ResetCDR application
	  registered. * res_parking leaked a ref to config global. (closes
	  issue ASTERISK-22566) Reported by: Corey Farrell Patches:
	  ASTERISK-22566-r2.patch (license #5909) patch uploaded by Corey
	  Farrell ........ Merged revisions 400020 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/sip/reqresp_parser.c, /, channels/chan_sip.c: chan_sip:
	  Increase some scratch buffer sizes dealing with caller id. *
	  Eliminated an unnecessary initialization in check_user_full().
	  (closes issue ASTERISK-22477) Reported by: Michael Shepelev
	  ........ Merged revisions 400013 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 400014 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 400015 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-27 19:18 +0000 [r400000]  Sean Bright <sean@malleable.com>

	* configs/sip.conf.sample: Remove some trailing whitespace and
	  steal revision 400000.

2013-09-27 18:28 +0000 [r399991]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_pjsip.c, res/res_pjsip_session.c,
	  include/asterisk/res_pjsip.h, res/res_pjsip.exports.in:
	  res_pjsip: crash when using localnet and
	  external_signaling_address options There was a collision of
	  mod_data use on the transaction between using a nat hook and an
	  session response callback. During state change it was assumed
	  what was in the mod_data was nothing or the response callback.
	  However, it was possible for it to also contain a nat hook thus
	  resulting in a bad cast and a crash. Added the ability to store
	  multiple data elements in mod_data via a hash table. In this
	  instance, mod_data now stores a hash table of the two values that
	  can be retrieved using an associated string key. (closes issue
	  ASTERISK-22394) Reported by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/2843/ ........ Merged
	  revisions 399990 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-27 17:46 +0000 [r399978]  Jonathan Rose <jrose@digium.com>

	* channels/sip/include/sip.h, /, channels/chan_sip.c: chan_sip:
	  Reject calls on 200 OKs if no SDP has been received When Asterisk
	  receives a 200 OK in response to an invite, that peer should have
	  sent an SDP at some point by then. If the channel has never
	  received an SDP, media won't have been set and the remote address
	  won't be known. Endpoints in general should not be doing this.
	  This patch makes it so that Asterisk will simply hang up a call
	  if it sends a 200 OK at this point. So far this odd behavior for
	  endpoints has only been observed in tests which involved manually
	  created SIP transactions in SIPp. (closes issue ASTERISK-22424)
	  Reported by: Jonathan Rose Review:
	  https://reviewboard.asterisk.org/r/2827/ ........ Merged
	  revisions 399939 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399962 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399976 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-27 17:11 +0000 [r399938]  Richard Mudgett <rmudgett@digium.com>

	* include/asterisk/astobj2.h, tests/test_astobj2.c, main/astobj2.c,
	  /: astobj2: Remove OBJ_CONTINUE support. OBJ_CONTINUE was a
	  strange feature that came into the world under suspicious
	  circumstances to support an abuse of the ao2_container by
	  chan_iax2. Since chan_iax2 no longer uses OBJ_CONTINUE, it is
	  safe to remove it. The simplified code should help performance
	  slightly and make understanding the code easier. Review:
	  https://reviewboard.asterisk.org/r/2887/ ........ Merged
	  revisions 399937 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-27 14:35 +0000 [r399925]  Mark Michelson <mmichelson@digium.com>

	* /, bridges/bridge_native_rtp.c: Fix refleaks of ast_rtp_instance
	  structures. These refleaks were causing bridged calls not to
	  close their RTP ports. Thus a call would leave open 4 ports (RTP
	  for party A, RTCP for party A, RTP for party B, and RTCP for
	  party B). This led to an eventual depletion of available RTP
	  ports. ........ Merged revisions 399924 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-27 14:08 +0000 [r399913]  Kinsey Moore <kmoore@digium.com>

	* tests/test_cel.c, main/cel.c, /, include/asterisk/cel.h: Restore
	  usefulness of the CEL Peer field This change makes the CEL peer
	  field useful again for BRIDGE_ENTER and BRIDGE_EXIT events and
	  fills the field with a comma-separated list of all channels in
	  the bridge other than the channel that is entering or exiting the
	  bridge. Review: https://reviewboard.asterisk.org/r/2840/ (closes
	  issue ASTERISK-22393) ........ Merged revisions 399912 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-26 18:51 +0000 [r399898]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_registrar.c, include/asterisk/res_pjsip.h,
	  res/res_pjsip.exports.in, /, res/res_pjsip/security_events.c:
	  pjsip: race condition in registrar While handling a registration
	  request a race condition could occur if/when two+ clients
	  registered at the same time. This happened when one request
	  obtained a copy of the current contacts for an AOR and another
	  request did the same before the first request updated. Thus the
	  second would update and overwrite the first (or vice-versa
	  depending on which actually updated first). In the case of it
	  being the same contact two "add" events would be raised. pjsip
	  registration handling is now serialized to alleviate this issue.
	  (closes issue AST-1213) Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/2860/ ........ Merged
	  revisions 399897 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-26 14:13 +0000 [r399875]  Rusty Newton <rnewton@digium.com>

	* /, apps/app_dial.c: Adding a few words to the Dial option 'r'
	  help text to clarify its tone argument description ........
	  Merged revisions 399874 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-25 20:38 +0000 [r399844]  Richard Mudgett <rmudgett@digium.com>

	* channels/sig_ss7.c, channels/chan_dahdi.c, /: chan_dahdi: CLI
	  "core stop gracefully" has needless delay for PRI and SS7. The
	  PRI and SS7 link control threads are not stopped correctly when
	  the chan_dahdi.so module is unloaded. The link control threads
	  pri_dchannel() and ss7_linkset() are not awakened from a poll()
	  to cancel the thread. * Added a SIGURG signal after requesting
	  the thread cancel to break the link control thread poll()
	  immediately. For SS7 it was slightly worse, the link poll()
	  timeout would always be whatever was the last libss7 scheduled
	  event time used. If no libss7 scheduled event was pending, the
	  thread could run more often than necessary. * Set nextms to 60
	  seconds for the ss7_linkset() poll() if there is no other libss7
	  scheduled event. ........ Merged revisions 399818 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399834 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399842 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-25 19:43 +0000 [r399799]  Rusty Newton <rnewton@digium.com>

	* /, res/res_pjsip.c: Broke the build - Fixing XML DTD violation
	  added in r399782, missing <para> tags inside a <note> ........
	  Merged revisions 399798 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-25 19:29 +0000 [r399797]  Michael L. Young <elgueromexicano@gmail.com>

	* /, channels/chan_sip.c: chan_sip: Fix Realtime Peer Update
	  Problem When Un-registering And Expires Header In 200ok 1st Issue
	  When a realtime peer sends an un-REGISTER request, Asterisk
	  un-registers the peer but the database table record still has
	  regseconds and fullcontact for the peer. This results in calls
	  attempting to be routed to the peer which is no longer
	  registered. The expected behavior is to get busy/congested when
	  attempting to call an un-registered peer through the dialplan.
	  What was discovered is that we are clearing out the peer's
	  registration in the database in parse_register_contact() when
	  calling expire_register() but then upon returning from
	  parse_register_contact(), update_peer() is run which stores back
	  in the database table regseconds and fullcontact. 2nd Issue The
	  reporter pointed out that the 200 ok being returned by Asterisk
	  after un-registering a peer contains a Contact header with
	  ;expires= and the Expires header is not set to 0. This is
	  actually a regression. Tests were created for this second issue
	  (ASTERISK-22548). The tests have been reviewed and a Ship It! was
	  received on those tests. This patch does the following: * Do not
	  ignore the Expires header value even when it is set to 0. The
	  patch sets the pvt->expiry earlier on in the function so that it
	  is set properly and used. * If pvt->expiry is 0, do not call
	  update_peer since that means the peer has already been
	  un-registered and there is no need to update the database record
	  again since nothing has changed. (closes issue ASTERISK-22428)
	  Reported by: Ben Smithurst Tested by: Ben Smithurst, Michael L.
	  Young Patches:
	  asterisk-22428-rt-peer-update-and-expires-header.diff by Michael
	  L. Young (license 5026) Review:
	  https://reviewboard.asterisk.org/r/2869/ ........ Merged
	  revisions 399794 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399795 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399796 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-25 18:38 +0000 [r399782]  Rusty Newton <rnewton@digium.com>

	* /, res/res_pjsip.c: Fixing documentation for the configOption
	  "external_media_address" of both Endpoints and Transports
	  Re-using some of Mark Michelson's text from an E-mail discussion
	  for: * Modifying synopsis for both options * Adding description
	  to both options * Changing name of "external_media_address" for
	  Endpoint configuration to "media_address" in anticipation of the
	  option name being changed. (As it is not really specific to
	  external destinations) (issue ASTERISK-22405) (closes issue
	  ASTERISK-22405) Reported by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/2850/ ........ Merged
	  revisions 399781 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-24 22:55 +0000 [r399737-399750]  Richard Mudgett <rmudgett@digium.com>

	* /, main/astobj2.c: astobj2: Made use OBJ_SEARCH_xxx identifiers
	  as field enum values internally. * Made ao2_unlink to protect
	  itself from stray OBJ_SEARCH_xxx values passed in. ........
	  Merged revisions 399749 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_iax2.c, /: chan_iax2: Prevent some needless
	  breaking of the native IAX2 bridge. * Clean up some twisted code
	  in the iax2_bridge() loop. * Add AST_CONTROL_VIDUPDATE and
	  AST_CONTROL_SRCCHANGE to a list of frames to prevent the native
	  bridge loop from breaking. * Passing the
	  AST_CONTROL_T38_PARAMETERS frame should also allow FAX over a
	  native IAX2 bridge. (issue ABE-2912) Review:
	  https://reviewboard.asterisk.org/r/2870/ ........ Merged
	  revisions 399697 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399708 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 For v12 and
	  above this is really just documentation until IAX2 native
	  bridging is restored. ........ Merged revisions 399736 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-24 19:22 +0000 [r399667-399696]  Matthew Jordan <mjordan@digium.com>

	* apps/app_queue.c, /: app_queue: Don't be quite so aggressive in
	  initializing the array We only need the first character. ........
	  Merged revisions 399695 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_queue.c, /: app_queue: Initialize array holding
	  MixMonitor exec options If the channel variable MONITOR_EXEC is
	  set, app_queue will pass the specified execution parameters to
	  the MixMonitor application when a queue is recorded. If that
	  channel variable is not set, the buffer that holds the escaped
	  value was not being initialized to NULL, and so would be passed
	  to the MixMonitor application with garbage. Hilarity ensued as
	  app_mixmonitor attempted to execute gobeldy-gook. ........ Merged
	  revisions 399681 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/stasis_bridges.c, tests/test_cdr.c, main/cdr.c, /: Fix a
	  performance problem CDRs There is a large performance price
	  currently in the CDR engine. We currently perform two
	  ao2_callback calls on a container that has an entry for every
	  channel in the system. This is done to create matching pairs
	  between channels in a bridge. As such, the portion of the CDR
	  logic that this patch deals with is how we make pairings when a
	  channel enters a mixing bridge. In general, when a channel enters
	  such a bridge, we need to do two things: (1) Figure out if anyone
	  in the bridge can be this channel's Party B. (2) Make pairings
	  with every other channel in the bridge that is not already our
	  Party B. This is a two step process. In the first step, we look
	  through everyone in the bridge and see if they can be our Party B
	  (single_state_process_bridge_enter). If they can - yay! We mark
	  our CDR as having gotten a Party B. If not, we keep searching. If
	  we don't find one, we wait until someone joins who can be our
	  Party B. Step 2 is where we changed the logic
	  (handle_bridge_pairings and bridge_candidate_process).
	  Previously, we would first find candidates - those channels in
	  the bridge with us - from the active_cdrs_by_channel container.
	  Because a channel could be a candidate if it was Party B to an
	  item in the container, the code implemented multiple
	  ao2_container callbacks to get all the candidates. We also had to
	  store them in another container with some other meta information.
	  This was rather complex and costly, particularly if you have 300
	  Local channels (600 channels!) going at once. Luckily, none of it
	  is needed: when a channel enters a bridge (which is when we're
	  figuring all this stuff out), the bridge snapshot tells us the
	  unique IDs of everyone already in the bridge. All we need to do
	  is: For all channels in the bridge: If the channel is us or our
	  Party B that we got in step 1, skip it Compare us and the
	  candidate to figure out who is Party A (based on some specific
	  rules) If we are Party A: Make a new CDR for us, append it to our
	  chain, and set the candidate as Party B If they are Party A: If
	  they don't have a Party B: Make a new CDR for them, append us to
	  their chain, and us as Party B Otherwise: Copy us over as Party B
	  on their existing CDR. This patch does that. Because we now use
	  channel unique IDs to find the candidates during bridging,
	  active_cdrs_by_channel now looks up things using uniqueid instead
	  of channel name. This makes the more complex code simpler; it
	  does, however, have the drawback that dialplan applications and
	  functions will be slightly slower as they have to iterate through
	  the container looking for the CDR by name. That's a small price
	  to pay however as the bridging code will be called a lot more
	  often. This patch also does two other minor changes: (1) It
	  reduces the container size of the channels in a bridge snapshot
	  to 1. In order to be predictable for multi-party bridges, the
	  order of the channels in the container must be stable; that is,
	  it must always devolve to a linked list. (2) CDRs and the
	  multi-party test was updated to show the relationship between two
	  dialed channels. You still want to know if they talked -
	  previously, dialed channels were always ignored, which is wrong
	  when they have managed to get a Party B. (closes issue
	  ASTERISK-22488) Reported by: Richard Mudgett Review:
	  https://reviewboard.asterisk.org/r/2861/ ........ Merged
	  revisions 399666 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-23 12:03 +0000 [r399625]  Joshua Colp <jcolp@digium.com>

	* res/res_pjsip.c, res/res_pjsip_session.c, /: Fix crash in
	  res_pjsip on load if error occurs, and prevent unloading of
	  res_pjsip and res_pjsip_session. During load time in res_pjsip if
	  an error occurred the operation would attempt to rollback all
	  operations done during load. This is not permitted by PJSIP as it
	  will assert if the operation has not been done. This fix changes
	  the code so it will only rollback what has been initialized
	  already. Further changes also prevent res_pjsip and
	  res_pjsip_session from being unloaded. This is due to limitations
	  within PJSIP itself. The library environment can only be changed
	  to a certain extent and does not provide the ability, currently,
	  to deinitialize certain required functionality. (closes issue
	  ASTERISK-22474) Reported by: Corey Farrell ........ Merged
	  revisions 399624 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-21 04:49 +0000 [r399578-399608]  Richard Mudgett <rmudgett@digium.com>

	* res/res_rtp_asterisk.c, /: res_rtp_asterisk: Fix ref leaks in
	  ast_rtcp_read(). Moved rtcp_report RAII_VAR declaration into the
	  loop so it is unref'ed after every loop. Moved message_blob to
	  loop and switched it to a regular variable. The regular variable
	  was used since message_blob is used in a very contained way.
	  (closes issue ASTERISK-22565) Reported by: Corey Farrell Patches:
	  rtcp_report-leak.patch (license #5909) patch uploaded by Corey
	  Farrell Tested by: Corey Farrell ........ Merged revisions 399607
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/media_index.c: media_index: Fix
	  process_description_file() memory leak of file_id_persist.
	  ........ Merged revisions 399596 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/features_config.c: features_config: Fix config ref leak
	  of parkinglots. This leak happend for just about every channel
	  created. ........ Merged revisions 399585 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, apps/app_queue.c: app_queue: Fix json blob ref leak. The json
	  ref from queue_member_blob_create() was never released. ........
	  Merged revisions 399583 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/json.c, /: json: Make it obvious that ast_json_unref() is
	  NULL safe. It looked like the safety check was done after the
	  NULL pointer was used. ........ Merged revisions 399576 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-20 22:44 +0000 [r399566]  Kinsey Moore <kmoore@digium.com>

	* main/config_options.c, /: Ensure global types in the config
	  framework are initialized If a config object was allocated but
	  one of its global objects was never encountered, then the global
	  object's defaults were never applied. Ensure that global objects
	  are initialized properly upon allocation instead of on
	  configuration. Review: https://reviewboard.asterisk.org/r/2866/
	  ........ Merged revisions 399564 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399565 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-20 22:06 +0000 [r399554]  Jonathan Rose <jrose@digium.com>

	* main/dial.c, /: originate/call forwarding: Fix a crash when
	  forwarding a call from originate (closes issue ASTERISK-22487)
	  Reported by: David M. Lee Review:
	  https://reviewboard.asterisk.org/r/2868/ ........ Merged
	  revisions 399553 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-20 16:18 +0000 [r399533]  Joshua Colp <jcolp@digium.com>

	* /, channels/chan_pjsip.c: Add a missing session supplement
	  unregistration in chan_pjsip for ACKs. (closes issue
	  ASTERISK-22453) Reported by: Corey Farrell Patches:
	  chan_pjsip_session_unregister_supplement.patch uploaded by Corey
	  Farrell (license 5909) ........ Merged revisions 399531 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-20 14:26 +0000 [r399515]  Kevin Harwell <kharwell@digium.com>

	* /, main/logger.c: Fix memory leak in logger. Fixed a memory leak
	  discovered in the logger where a temporary string buffer was not
	  being freed. (closes issue ASTERISK-22540) Reported by: John
	  Hardin ........ Merged revisions 399513 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399514 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-19 23:20 +0000 [r399503]  Richard Mudgett <rmudgett@digium.com>

	* /, main/optional_api.c: optional_api: Make always use the
	  standard malloc functions even with MALLOC_DEBUG. ........ Merged
	  revisions 399501 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-19 17:01 +0000 [r399459]  Jonathan Rose <jrose@digium.com>

	* /, channels/chan_sip.c: chan_sip: Make direct media reinvites for
	  T38 put Asterisk in the media path Prior to this patch, Asterisk
	  would incorrectly use the previous endpoint addresses in SDP in
	  spite of providing its own port. T38 is never meant to be done
	  through directmedia and Asterisk should always be in the media
	  path for these streams. (closes issue ASTERISK-17273) Reported
	  by: Kevin Stewart (closes issue ASTERISK-18706) Reported by:
	  Jeremy Kister Review: https://reviewboard.asterisk.org/r/2853/
	  ........ Merged revisions 399456 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399457 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399458 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-18 20:04 +0000 [r399405]  Kinsey Moore <kmoore@digium.com>

	* /, main/abstract_jb.c: Fix jitter buffer log file creation This
	  adjusts '/'-to-'#' replacement to replace all instances of '/'
	  instead of just the first to ensure that the jitter buffer log
	  file gets the correct name as per Richard Kenner's suggestion.
	  (closes issue ASTERISK-21036) Reported by: Richard Kenner
	  ........ Merged revisions 399402 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399403 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399404 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-18 17:23 +0000 [r399368-399378]  Matthew Jordan <mjordan@digium.com>

	* /, build_tools/prep_tarball: Update prep_tarball with new
	  documentation files on the Asterisk wiki This will now pull both
	  a command reference for the version being prepared, as well as an
	  Admin Guide that applies to all versions of Asterisk. (issue
	  ASTERISK-22439) Reported by: Olle Johansson ........ Merged
	  revisions 399351 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399373 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399376 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, bridges/bridge_softmix.c: Add a WARNING in bridge_softmix when
	  a timing module isn't loaded If bridge_softmix fails to be
	  created because no timing source is present in Asterisk, this
	  will currently fail gracefully but with (most likely) a generic
	  error message by whatever module tried to create the softmix
	  bridge. This patch adds a more explicit warning so you can
	  actually diagnose and fix the problem. Review:
	  https://reviewboard.asterisk.org/r/2857/ ........ Merged
	  revisions 399353 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399365 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-18 17:15 +0000 [r399352]  Richard Mudgett <rmudgett@digium.com>

	* main/config_options.c: Make config framework able to reload
	  module configs with multiple config files. The config framework
	  is supposed to be able to load configs that come from multiple
	  config files. The principle example is chan_sip's sip.conf and
	  users.conf. Unfortunately, it only does this correctly on initial
	  load. This patch causes the module's config to be reloaded
	  entirely if any of the config files change. (closes issue
	  ASTERISK-22009) Reported by: Richard Mudgett Review:
	  https://reviewboard.asterisk.org/r/2859/

2013-09-18 14:56 +0000 [r399340]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_messaging.c, /: res_pjsip_messaging: Register
	  message technology as pjsip pjsip's message technology was being
	  registered as 'sip', which was causing it to not load due it
	  conflicting with chan_sip's registered 'sip' technology for
	  messaging. It now registers as 'pjsip'. However, due to this
	  change the "to" field for outgoing pjsip messages need to be
	  prefixed with 'pjsip:' instead of 'sip:'. Incoming messages to
	  res_pjsip_messaging will automatically have their "to" fields
	  altered in order to accommodate the change. Outgoing messages
	  also handle changing it back to 'sip' before being sent so the
	  pjsip library will properly handle it. (closes issue
	  ASTERISK-22445) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2833/ ........ Merged
	  revisions 399339 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-18 00:13 +0000 [r399295]  Michael L. Young <elgueromexicano@gmail.com>

	* /, main/features_config.c: Fix Segfault In features-config.c When
	  Application Has No Arguments Some applications do not require
	  arguments. Therefore, when parsing application maps in
	  features.conf, it is possible that app_data will be set to NULL.
	  * This patch sets app_data to "" if it is NULL. Review:
	  https://reviewboard.asterisk.org/r/2804 ........ Merged revisions
	  399294 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-17 23:10 +0000 [r399284]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_sdp_rtp.c, res/res_pjsip/pjsip_configuration.c,
	  res/res_pjsip_t38.c, include/asterisk/res_pjsip.h, /: Change the
	  "external_media_address" PJSIP endpoint option to
	  "media_address". The endpoint option does not apply to
	  communication with external entities. Rather, the option is
	  applied to all communications with the endpoint. The
	  external_media_address transport configuration option may
	  override the endpoint option if it turns out that we are going to
	  be communicating with an external entity. Two things of note: 1)
	  I have not updated the XML documentation. This is being taken
	  care of by Rusty as part of his work on issue ASTERISK-22405 2)
	  This commit is likely to cause testsuite failures since there are
	  tests that use the external_media_address endpoint option, and
	  they will need to be changed over. Well, I'm planning to get that
	  updated ASAP after this commit. (closes issue ASTERISK-22528)
	  reported by Rusty Newton ........ Merged revisions 399283 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-17 18:44 +0000 [r399269]  Kevin Harwell <kharwell@digium.com>

	* main/logger.c, main/asterisk.c, /: Remote console: more output
	  discrepancies The remote console continued to have issues with
	  its output. In this case CLI command output would either not show
	  up (if verbose level = 0) or would contain verbose prefixes (if
	  verbose level > 0) once log messages were sent to the remote
	  console. The fix now now adds verbose prefix data to all new
	  lines contained in a verbose log string. (closes issue
	  ASTERISK-22450) Reported by: David Brillert (closes issue
	  AST-1193) Reported by: Guenther Kelleter Review:
	  https://reviewboard.asterisk.org/r/2825/ ........ Merged
	  revisions 399267 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399268 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-17 17:55 +0000 [r399258]  Richard Mudgett <rmudgett@digium.com>

	* /, include/asterisk/features_config.h: Fix doxygen to use correct
	  units of features.conf options. ........ Merged revisions 399257
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-17 17:10 +0000 [r399238-399248]  Mark Michelson <mmichelson@digium.com>

	* main/bridge_basic.c, main/features_config.c, /: Fix other
	  timeouts (atxferloopdelay and atxfernoanswertimeout) to use
	  seconds instead of milliseconds. Thanks to Richard Mudgett for
	  pointing this out. ........ Merged revisions 399247 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/features_config.c, /, include/asterisk/features_config.h,
	  main/bridge_basic.c: Switch transferdigittimeout to be configured
	  as seconds instead of milliseconds. This was an unintentional
	  consequence of the update of features.conf to use the config
	  framework in Asterisk 12. Thanks to Marco Signorini on the
	  Asterisk developers list for pointing out the problem. ........
	  Merged revisions 399237 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-17 14:58 +0000 [r399226]  Kevin Harwell <kharwell@digium.com>

	* apps/confbridge/conf_state_multi_marked.c, /: Confbridge: empty
	  conference not being torn down Confbridge would not properly tear
	  down an empty conference bridge when all users were kicked via
	  end_marked=yes and at least one user was also set to wait_marked.
	  This occurred because while end_marked users were being kicked
	  and at least one was also set to wait_marked then the leave
	  wait_marked handler would be called on that user, but there would
	  be no waiting user (still considered active). The waiting users
	  would decrement and now be negative. The conference would remain,
	  but be put into an inactive state. The solution was to move from
	  the active list to the wait list, those users with wait_marked
	  set right before kicking. This allows both the active and wait
	  users to decrement correctly and the confbridge to tear down
	  properly. A crashed also occurred when trying to list the
	  specific conference from the CLI. This happened because the
	  conference specified was invalid. Since the conference properly
	  tears down now there is no way to reference it thus alleviating
	  the crash as well. (closes issue ASTERISK-21859) Reported by:
	  Chris Gentle Review: https://reviewboard.asterisk.org/r/2848/
	  ........ Merged revisions 399222 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399225 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-16 18:36 +0000 [r399161-399208]  Richard Mudgett <rmudgett@digium.com>

	* tests/test_ari_model.c, /: Fix module load errors for
	  test_ari_model.so. You cannot use a function pointer variable
	  with an external function from another dynamically loaded module
	  because data variables are always resolved even with RTLD_LAZY. *
	  Added wrapper functions for ast_ari_validate_int() and
	  ast_ari_validate_string() to use instead for the function pointer
	  variable. (closes issue ASTERISK-22457) Reported by: David M. Lee
	  ........ Merged revisions 399207 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_speech_utils.c, /, res/res_speech.exports.in:
	  app_speech_utils: Fix unresolved symbol ast_speech_get_setting().
	  Fixes regression introduced by -r374096. * Made
	  res_speech.export.in export ast_* symbols instead of specific
	  functions. * Made app_speech_utils.c declare that it is dependent
	  upon res_speech. (issue ASTERISK-17136) Reported by: Richard
	  Kenner ........ Merged revisions 399197 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_iax2.c, /: chan_iax2: Fix saving the wrong expiry
	  time in astdb. When a new IAX2 client registers, the astdb
	  database is updated with the value of minregexpire defined in
	  iax.conf instead of using the expiry time that is provided by the
	  client. The provided expiry time of the client is updated after
	  inserting the astdb entry. As a consequence, restarting or
	  reloading asterisk creates clients whose registration may expire
	  before they reregister. The clients are therefore unavailable
	  after minregexpire seconds until they reregister. * Move updating
	  of the expiry time to before inserting into the astdb. (closes
	  issue ASTERISK-22504) Reported by: Stefan Wachtler Patches:
	  chan_iax2.c.patch (license #6533) patch uploaded by Stefan
	  Wachtler ........ Merged revisions 399158 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399159 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399160 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-16 02:37 +0000 [r399147]  Matthew Jordan <mjordan@digium.com>

	* main/cdr.c, /: Filter internal channels out of bridge enter/leave
	  message handling Some channels exist merely as an implementation
	  detail in Asterisk, such as ConfBridge's announcer/recorder
	  channels. These channels should never be exposed to the outside
	  world, or to interfaces that report on Asterisk. We already
	  filter out such channels in snapshot processing; however, we
	  failed to filter out bridge related messages that involved these
	  channels. This patch filters out bridge related messages that are
	  for such channels. This prevents a spurious WARNING message from
	  being displayed when those channels move in and out of bridges.
	  ........ Merged revisions 399146 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-13 22:19 +0000 [r399138]  Richard Mudgett <rmudgett@digium.com>

	* res/parking/parking_bridge_features.c, apps/app_agent_pool.c,
	  include/asterisk/features.h, main/channel.c,
	  res/parking/parking_tests.c, include/asterisk/bridge_channel.h,
	  main/features.c, tests/test_cel.c, main/bridge_channel.c,
	  tests/test_cdr.c, apps/confbridge/conf_chan_announce.c,
	  include/asterisk/bridge.h, res/res_pjsip_refer.c, /,
	  channels/chan_sip.c, res/stasis/control.c, main/bridge.c,
	  main/bridge_basic.c, main/core_unreal.c,
	  res/parking/parking_applications.c, main/core_local.c: Restore
	  Dial, Queue, and FollowMe 'I' option support. The Dial, Queue,
	  and FollowMe applications need to inhibit the bridging initial
	  connected line exchange in order to support the 'I' option. *
	  Replaced the pass_reference flag on ast_bridge_join() with a
	  flags parameter to pass other flags defined by enum
	  ast_bridge_join_flags. * Replaced the independent flag on
	  ast_bridge_impart() with a flags parameter to pass other flags
	  defined by enum ast_bridge_impart_flags. * Since the Dial, Queue,
	  and FollowMe applications are now the only callers of
	  ast_bridge_call() and ast_bridge_call_with_flags(), changed the
	  calling contract to require the initial COLP exchange to already
	  have been done by the caller. * Made all callers of
	  ast_bridge_impart() check the return value. It is important. As a
	  precaution, I also made the compiler complain now if it is not
	  checked. * Did some cleanup in parking_tests.c as a result of
	  checking the ast_bridge_impart() return value. An independent,
	  but associated change is: * Reduce stack usage in
	  ast_indicate_data() and add a dropping redundant connected line
	  verbose message. (closes issue ASTERISK-22072) Reported by:
	  Joshua Colp Review: https://reviewboard.asterisk.org/r/2845/
	  ........ Merged revisions 399136 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-13 20:55 +0000 [r399101]  David M. Lee <dlee@digium.com>

	* /, main/astobj2.c: Don't write to /tmp/refs when REF_DEBUG is not
	  defined. If MALLOC_DEBUG is enabled, then the debug destructor
	  for the container is used, which would erroneously write to
	  /tmp/refs. This patch only uses the debug destructor if ref_debug
	  is used. (closes issue ASTERISK-22536) ........ Merged revisions
	  399098 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 399099 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399100 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-13 14:50 +0000 [r399082-399084]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip.c, res/res_pjsip_pubsub.c, res/res_pjsip_session.c,
	  include/asterisk/res_pjsip.h, res/res_pjsip.exports.in, /: Create
	  more accurate Contact headers for dialogs when we are the UAS.
	  (closes issue AST-1207) reported by John Bigelow Review:
	  https://reviewboard.asterisk.org/r/2842 ........ Merged revisions
	  399083 from http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip/config_auth.c, /,
	  res/res_pjsip_outbound_authenticator_digest.c,
	  res/res_pjsip_authenticator_digest.c: Change how realms are
	  handled for outbound authentication. With this change, if no
	  realm is specified in an outbound auth section, then we will
	  simply match the realm that was present in the 401/407 challenge.
	  (closes issue ASTERISK-22471) Reported by George Joseph (closes
	  issue ASTERISK-22386) Reported by Rusty Newton Patches:
	  outbound_auth_realm_v4.patch uploaded by George Joseph (License
	  #6322) ........ Merged revisions 399059 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-13 14:43 +0000 [r399080-399081]  David M. Lee <dlee@digium.com>

	* /: Recorded merge of revisions 399035,399049 from
	  http://svn.asterisk.org/svn/asterisk/branches/12 These were lost
	  in r399071

	* /: Put merge tracking for r399039 back.

2013-09-13 14:27 +0000 [r399071]  Rusty Newton <rnewton@digium.com>

	* /, res/res_pjsip_endpoint_identifier_ip.c: Broke the build!
	  Forgot para tags within my description.
	  https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD-304
	  ........ Merged revisions 399064 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-13 14:22 +0000 [r399042-399051]  David M. Lee <dlee@digium.com>

	* res/res_pjsip_log_forwarder.c (added), res/res_pjsip_logger.c,
	  res/res_rtp_asterisk.c, /: res_pjsip: Forward PJSIP logging to
	  Asterisk logging This patch uses PJSIP's pj_log_set_log_func() to
	  forward PJSIP's log messages to Asterisk's logger. This is done
	  in a new module: res_pjsip_log_forwarder.so. This patch sets
	  defaultenabled on the existing res_pjsip_logger.so to no, since
	  logging every SIP packet seems a bit odd to do by default, and is
	  (hopefully) less necessary with regular PJSIP logging. It also
	  removes res_rtp_asterisk's disabling of PJSIP logging. (closes
	  issue ASTERISK-22360) Reported by: Joshua Colp Review:
	  https://reviewboard.asterisk.org/r/2830/ ........ Merged
	  revisions 399049 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_http_websocket.c: ARI: Fix WebSocket response when
	  subprotocol isn't specified When I moved the ARI WebSocket from
	  /ws to /ari/events, I added code to allow a WebSocket to connect
	  without specifying the subprotocol if there's only one
	  subprotocol handler registered for the WebSocket. Naively, I
	  coded it to always respond with the subprotocol in use.
	  Unfortunately, according to RFC 6455, if the server's response
	  includes a subprotocol header field that "indicates the use of a
	  subprotocol that was not present in the client's handshake [...],
	  the client MUST _Fail the WebSocket Connection_.", emphasis
	  theirs. This patch correctly omits the Sec-WebSocket-Protocol if
	  one is not specified by the client. (closes issue ASTERISK-22441)
	  Review: https://reviewboard.asterisk.org/r/2828/ ........ Merged
	  revisions 399039 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-13 14:17 +0000 [r399036]  Kinsey Moore <kmoore@digium.com>

	* /, apps/app_meetme.c: Fix several crashes in MeetMeAdmin This
	  change ensures that MeetMeAdmin commands requiring a user
	  actually get a user and fixes another issue where an extra
	  dereference could occur for a last-entered user being ejected if
	  a user identifier was also provided. (closes issue
	  ASTERISK-21907) Reported by: Alex Epshteyn Review:
	  https://reviewboard.asterisk.org/r/2844/ ........ Merged
	  revisions 399033 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 399034 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 399035 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-13 13:28 +0000 [r399032]  Rusty Newton <rnewton@digium.com>

	* /, res/res_pjsip_endpoint_identifier_ip.c: 'identify'
	  configObject doesn't have a synopsis Add a straightforward
	  synopsis and description to the identify config object in XML
	  documentation. (issue ASTERISK-22311) (closes issue
	  ASTERISK-22311) Reported By: Rusty Newton ........ Merged
	  revisions 399031 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-12 23:42 +0000 [r399020-399022]  Richard Mudgett <rmudgett@digium.com>

	* /, main/bridge.c: CLI bridge: Fix "bridge destroy <id>" and
	  "bridge kick <id> <chan>" tab completion. These two commands must
	  deal with the live bridges container for tab completion and not
	  the stasis cache. ........ Merged revisions 399021 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/bridge.c, /: astobj2: Register the bridges container for
	  debug inspection. ........ Merged revisions 399019 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-12 23:23 +0000 [r399018]  Rusty Newton <rnewton@digium.com>

	* /, res/res_pjsip_acl.c: Documentation fix and improvements to XML
	  configuration help res_pjsip_acl * One bug fix. Made the synopsis
	  for "type" to accurate. * changing the usage of "IP-domains" to
	  "IP addresses" * clarifying the usage for the options, by adding
	  a relevant description for each * modified other areas of the XML
	  help for clarity, such as the module description and a few
	  synopsis changes here and there. See the patch. (issue
	  ASTERISK-22458) (closes issue ASTERISK-22458) Reported By: Rusty
	  Newton Review: https://reviewboard.asterisk.org/r/2823/ ........
	  Merged revisions 399017 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-12 20:27 +0000 [r399006]  Jonathan Rose <jrose@digium.com>

	* channels/sip/include/sip.h, /, channels/chan_sip.c: chan_sip:
	  Revert r398835 due to failing tests involving originate (issue
	  ASTERISK-22424) Reported by: Jonathan Rose ........ Merged
	  revisions 398977 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398986 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398991 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-12 16:44 +0000 [r398939]  Richard Mudgett <rmudgett@digium.com>

	* main/core_unreal.c, /: core_local: Fix memory corruption race
	  condition. The masquerade super test is failing on v12 with high
	  fence violations and crashing. The fence violations are showing
	  that party id allocated memory strings are somehow getting
	  corrupted in the bridge_reconfigured_connected_line_update()
	  function. The invalid string values happen to be the freed memory
	  fill pattern. After much puzzling, I deduced that the
	  bridge_reconfigured_connected_line_update() is copying a string
	  out of the source channel's caller party id struct just as
	  another thread is updating it with a new value. The copying
	  thread is using the old string pointer being freed by the
	  updating thread. A search of the code found the
	  unreal_colp_redirect_indicate() routine updating the caller party
	  id's without holding the channel lock. A latent bug in v1.8 and
	  v11 hatched in v12 because of the bridging and connected line
	  changes. :) (issue ASTERISK-22221) Reported by: Matt Jordan
	  Review: https://reviewboard.asterisk.org/r/2839/ ........ Merged
	  revisions 398938 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-12 15:23 +0000 [r398928]  David M. Lee <dlee@digium.com>

	* res/res_pjsip.c, /: Fix symbol collision with pjsua. We shouldn't
	  be exporting any symbols that start with pjsip_. ........ Merged
	  revisions 398927 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-12 00:04 +0000 [r398883-398887]  Rusty Newton <rnewton@digium.com>

	* /, apps/app_queue.c: 'queue add member' help text correction You
	  are adding dial strings to the queue, not channels. An aribitrary
	  string could be used, but you are typically referencing a
	  channel. Correcting the command help text. (issue ASTERISK-22263)
	  (closes issue ASTERISK-22263) Reported By: Rusty Newton ........
	  Merged revisions 398884 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398885 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398886 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* configs/chan_dahdi.conf.sample, /: Documentation fix -
	  waitfordialtone is not boolean, it's time in milliseconds
	  Changing text in chan_dahdi.conf sample to be accurate. (issue
	  ASTERISK-22308) (closes issue ASTERISK-22308) Reported By:
	  Malcolm Davenport ........ Merged revisions 398880 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398881 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398882 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-11 20:03 +0000 [r398838]  Jonathan Rose <jrose@digium.com>

	* /, channels/chan_sip.c, channels/sip/include/sip.h: chan_sip:
	  Reject calls without prior SDP on 200 OK If we receive a 200 OK
	  without SDP, we will now check to see if the remote address has
	  been established for that channel's RTP session and if the to tag
	  for that channel has changed from the most recent to tag in a
	  response less than 200. If either a change has been made since
	  the last to-tag was received or the remote address is unset, then
	  we will drop the call. (closes issue ASTERISK-22424) Reported by:
	  Jonathan Rose Review:
	  https://reviewboard.asterisk.org/r/2827/diff/#index_header
	  ........ Merged revisions 398835 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398836 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398837 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-11 18:03 +0000 [r398822]  Russell Bryant <russell@russellbryant.com>

	* configs/confbridge.conf.sample, /: Fix typo in
	  confbridge.conf.sample The denoise filter requires func_speex,
	  not codec_speex. Fix this in the description of the denoise=yes
	  option in confbridge.conf. ........ Merged revisions 398820 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398821 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-11 14:23 +0000 [r398808]  Kevin Harwell <kharwell@digium.com>

	* res/res_pjsip_caller_id.c, channels/chan_pjsip.c, /: pjsip:
	  reinvite for connected line updates occurs when it should not
	  Connected line updates are now only sent out if an actual update
	  needs to occur. This happens under the following conditions: 1.
	  The endpoint we are sending to is trusted. 2. Either a
	  P-Asserted-Identity or Remote Party-ID header needs to be
	  added/sent. 3. The connected id's number and name are valid. Also
	  added an SDP when an update is sent out. (closes issue AST-1212)
	  Reported by: John Bigelow Review:
	  https://reviewboard.asterisk.org/r/2831/ ........ Merged
	  revisions 398806 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-10 18:05 +0000 [r398760]  Richard Mudgett <rmudgett@digium.com>

	* main/event.c, res/res_musiconhold.c, main/indications.c,
	  main/asterisk.c, main/xmldoc.c, main/cli.c, /,
	  funcs/func_dialgroup.c, main/heap.c,
	  res/res_pjsip/pjsip_configuration.c: Fix incorrect usages of
	  ast_realloc(). There are several locations in the code base where
	  this is done: buf = ast_realloc(buf, new_size); This is going to
	  leak the original buf contents if the realloc fails. Review:
	  https://reviewboard.asterisk.org/r/2832/ ........ Merged
	  revisions 398757 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398758 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398759 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-10 17:50 +0000 [r398751-398755]  David M. Lee <dlee@digium.com>

	* utils/check_expr.c, /: Fixed utils directory breakage from
	  r398748, this time with extra hate. ........ Merged revisions
	  398752 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 398753 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398754 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* utils/check_expr.c, /, utils/ael_main.c, utils/conf2ael.c: Fixed
	  utils directory breakage from r398648 ........ Merged revisions
	  398748 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 398749 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398750 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-09 23:29 +0000 [r398732]  Richard Mudgett <rmudgett@digium.com>

	* main/astmm.c, /: MALLOC_DEBUG: Change fence magic number to be
	  completely different from the freed magic number. Race conditions
	  between freeing a nul terminated string and ast_strdup()'ing it
	  are more likely to be detected if the fence and freed magic
	  numbers are completely different. ........ Merged revisions
	  398703 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 398721 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398726 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-09 22:00 +0000 [r398695]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_endpoint_identifier_ip.c, /: Add extra debugging to
	  res_pjsip_endpoint_identifier_ip ........ Merged revisions 398694
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-09 20:13 +0000 [r398641-398652]  David M. Lee <dlee@digium.com>

	* /, main/utils.c, include/asterisk/lock.h, main/lock.c: Fix
	  DEBUG_THREADS when lock is acquired in __constructor__ This patch
	  fixes some long-standing bugs in debug threads that were
	  exacerbated with recent Optional API work in Asterisk 12. With
	  debug threads enabled, on some systems, there's a lock ordering
	  problem between our mutex and glibc's mutex protecting its module
	  list (Ubuntu Lucid, glibc 2.11.1 in this instance). In one
	  thread, the module list will be locked before acquiring our
	  mutex. In another thread, our mutex will be locked before locking
	  the module list (which happens in the depths of calling
	  backtrace()). This patch fixes this issue by moving backtrace()
	  calls outside of critical sections that have the mutex acquired.
	  The bigger change was to reentrancy tracking for
	  ast_cond_{timed,}wait, which wrongly assumed that waiting on the
	  mutex was equivalent to a single unlock (it actually suspends all
	  recursive locks on the mutex). (closes issue ASTERISK-22455)
	  Review: https://reviewboard.asterisk.org/r/2824/ ........ Merged
	  revisions 398648 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398649 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398651 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/ari/resource_channels.h, /, rest-api/api-docs/channels.json:
	  Multiple revisions 398638-398639 ........ r398638 | dlee |
	  2013-09-09 14:01:54 -0500 (Mon, 09 Sep 2013) | 1 line Added note
	  about expected behavior of originate ........ r398639 | dlee |
	  2013-09-09 14:02:27 -0500 (Mon, 09 Sep 2013) | 1 line Added note
	  about expected behavior of originate (the rest of the commit)
	  ........ Merged revisions 398638-398639 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-08 23:30 +0000 [r398629]  Matthew Jordan <mjordan@digium.com>

	* tests/test_cdr.c, /: Update CDR Unit tests to reflect container
	  changes in r398579 When a channel joins a multi-party bridge, the
	  ordering of the CDRs that is created is determined by the
	  ordering of the channels who happen to be in that bridge. When
	  r398579 changed the number of buckets in the container to
	  something sensible, it changed the ordering that the CDRs was
	  created in, causing one of the multiparty tests to fail. This
	  fixes the test with the now expected ordering. ........ Merged
	  revisions 398628 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-07 01:03 +0000 [r398603-398620]  Kinsey Moore <kmoore@digium.com>

	* /, res/res_xmpp.c: Prevent XMPP timeout on blank responses
	  Sometimes the Google Voice servers have a bad habit of sending
	  out 1 byte replies to the xmpp resource. When a blank 1 byte
	  reply is received from the socket the buffer attempts to wait
	  (endlessly) for the rest of the reply from google which
	  effectively blocks the socket and google voice calls will no
	  longer come into the server. This patch allows the xmpp module to
	  correctly detect empty packets and send out ping replies to
	  google. It also sets a socket timeout on the default socket which
	  prevents the xmpp socket from closing and preventing future
	  google voice calls from coming into the server. Furthermore
	  instead of sending an empty reply back to google we send a proper
	  xmpp ping reply back. This also adds several more socket
	  messages. (closes issue ASTERISK-22347) Reported by: Andrew Nagy
	  Review: https://reviewboard.asterisk.org/r/2771 Patches:
	  xmpp_fix_1.diff uploaded by Andrew Nagy (License #6524) ........
	  Merged revisions 398618 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398619 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_xmpp.c, res/res_jabber.c: Multiple revisions
	  398558,398577 ........ r398558 | kmoore | 2013-09-06 14:28:16
	  -0500 (Fri, 06 Sep 2013) | 17 lines Fix Jabber/XMPP distributed
	  MWI The mailbox and context are swapped on the receiving end for
	  all users of Jabber and XMPP distributed MWI in Asterisk 1.8 and
	  all more recent versions. This swaps those values to be correct
	  when publishing to the internal event system from Jabber/XMPP
	  distributed MWI state. (closes issue ASTERISK-22435) Reported by:
	  abelbeck Tested by: Michael Keuter Patches:
	  asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by
	  abelbeck asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch
	  uploaded by abelbeck ........ Merged revisions 398523 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  r398577 | kmoore | 2013-09-06 16:00:56 -0500 (Fri, 06 Sep 2013) |
	  10 lines Commit the remainder of r398523 This is a missing part
	  of the commit in revision 398523 that corrects the name of a
	  variable. (issue ASTERISK-22435) ........ Merged revisions 398576
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 398558,398577 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398580 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-06 21:17 +0000 [r398557-398583]  Richard Mudgett <rmudgett@digium.com>

	* main/cdr.c, /: cdr: Change the number of container buckets to be
	  similar to the channels container. * Fix the temporary cdr
	  candidate containers to use a prime number of buckets. ........
	  Merged revisions 398579 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/core_local.c, /: core_local: Fix LocalOptimizationBegin AMI
	  event missing Source channel snapshot. * Fix the
	  LocalOptimizationBegin AMI event by eliminating an artificial
	  buffer size limitation that is too small anyway. ........ Merged
	  revisions 398572 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: cdr: Fix some ref leaks. * Added missing
	  unregister of the cdr container in cdr_engine_shutdown(). * Fixed
	  ref leak in off nominal path of cdr_object_alloc(). * Removed
	  some unnecessary NULL checks in cdr_object_dtor(). ........
	  Merged revisions 398562 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/astobj2.h, main/cel.c, main/features_config.c,
	  apps/app_agent_pool.c, main/cdr.c, main/udptl.c, /,
	  main/parking.c, main/stasis_config.c: astobj2: Add warn unused
	  attribute to some functions. * Fixed resulting warnings with
	  improper use of ao2_global_obj_replace(). * Made a couple uses of
	  ao2_global_obj_replace_unref(x, NULL) into the equivalent and
	  more appropriate ao2_global_obj_release() call. ........ Merged
	  revisions 398533 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-06 18:53 +0000 [r398512-398522]  Kinsey Moore <kmoore@digium.com>

	* main/http.c, /, res/stasis/app.c: Fix build warnings When
	  AST_DEVMODE is not defined, ast_asserts are not compiled into the
	  binary. In some cases, this means variables are not referenced or
	  are set but unused which causes warnings to show up. (closes
	  issue ASTERISK-22446) Reported by: Jason Parker (qwell) ........
	  Merged revisions 398521 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_h323.c: Fix chan_h323 compilation This fixes the
	  things in chan_h323 that were missed or ignored in the great
	  channel opaquification and gets chan_h323 back into a compiling
	  state. (closes issue ASTERISK-22365) Reported by: Dmitry Melekhov
	  Patches: chan_h323.patch uploaded by Dmitry Melekhov ........
	  Merged revisions 398510 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398511 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-05 21:48 +0000 [r398384-398499]  Richard Mudgett <rmudgett@digium.com>

	* /, main/astobj2.c: astobj2: Only define ao2_bt() once. * Make
	  ao2_bt() not use single char variable names. * Fix ao2_bt()
	  formatting. ........ Merged revisions 398498 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_iax2.c, /: chan_iax2: Reduce indentation in
	  __attempt_transmit(). * Reduce indentation in
	  __attempt_transmit(). * Don't update the static last error time
	  variable every time in __schedule_action() and socket_read().
	  ........ Merged revisions 398456 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398457 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398458 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_iax2.c, /: chan_iax2: Fix stray reference to worker
	  thread idle_list. * Fix stray reference to idle_list in
	  cleanup_thread_list(). This may be the reason for the note in
	  iax2_process_thread() about threads not being removed from the
	  task lists. * Move cleanup_thread_list(&idle_list) to after the
	  other lists are cleaned up. ........ Merged revisions 398416 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398417 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398418 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/chan_iax2.c, /: chan_iax2: Fix bridgecallno deadlock
	  avoidance. * Fix bridgecallno deadlock avoidance. When doing
	  deadlock avoidance, you need to retest the status of values for
	  each loop to see if you still need the lock for bridgecallno. *
	  As a safety check, after acquiring the bridgecallno lock you
	  should check if iaxs[bridgecallno] is NULL just like the current
	  callno checks. * Move setting thread->iostate to IAX_IOSTATE_IDLE
	  to after processing any deferred frames to ensure that the
	  iostate is IDLE when it is placed back into the idle list.
	  defer_full_frame() tries to ensure iax2_process_thread() wakes up
	  to process the frame. ........ Merged revisions 398379 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398380 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398381 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-05 14:10 +0000 [r398369]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_outbound_registration.c: Clarify server_uri and
	  client_uri registration settings. Used some of Rusty's suggested
	  language plus also included more SIPesque descriptions of where
	  the URIs are actually used in an outgoing REGISTER. (closes issue
	  ASTERISK-22390) reported by Rusty Newton ........ Merged
	  revisions 398368 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-04 23:07 +0000 [r398304]  Richard Mudgett <rmudgett@digium.com>

	* channels/iax2/parser.c, /: chan_iax2: Add missing control frame
	  names to debug frame decode output. ........ Merged revisions
	  398301 from http://svn.asterisk.org/svn/asterisk/branches/1.8
	  ........ Merged revisions 398302 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398303 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-04 22:49 +0000 [r398300]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_outbound_authenticator_digest.c: Give more
	  detail regarding failures to create request with auth
	  credentials. (issue ASTERISK-22386) ........ Merged revisions
	  398299 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-04 21:37 +0000 [r398284-398287]  Jonathan Rose <jrose@digium.com>

	* /, tests/test_voicemail_api.c: unit tests: test_voicemail_api
	  leaks stringfields from snapshots (closes issue ASTERISK-22414)
	  Reported by: Corey Farrell Patches:
	  test_voicemail_api-leaks-11.patch uploaded by coreyfarrell
	  (license 5909) ........ Merged revisions 398285 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398286 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* apps/app_voicemail.c, /: app_voicemail: Fix leaking config
	  objects when msg_id doesn't match (issues ASTERISK-22414)
	  Reported by: Corey Farrell Patch:
	  test_voicemail_api-leaks-11.patch uploaded by coreyfarrell
	  (license 5909) ........ Merged revisions 398281 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398283 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-04 16:03 +0000 [r398238]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_misdn.c, /: chan_misdn: Fix misdn debug output
	  printed with arbitrary verbose levels. Fix the misdn debug output
	  to remote consoles. chan_misdn uses ast_console_puts() which
	  doesn't know about verbose levels. Better to use ast_verbose()
	  instead. Without this patch the misdn debug messages are appended
	  to the verbose level which ever was set by the message sent to
	  the console before, i.e. any undefined level. (closes issue
	  AST-1218) Reported by: Guenther Kelleter Patches: misdnlog.patch
	  (license #6372) patch uploaded by Guenther Kelleter ........
	  Merged revisions 398235 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398236 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398237 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-04 14:32 +0000 [r398227]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_pjsip_outbound_registration.c: Debug messages for
	  pjsip outbound registration Added debug messages indicating that
	  an outbound registration attempt was made and it was successful
	  in pjsip. (closes issue ASTERISK-22388) Reported by: Rusty Newton
	  ........ Merged revisions 398226 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-03 20:28 +0000 [r398217]  Alexandr Anikin <may@telecom-service.ru>

	* /, addons/ooh323c/src/ooh245.c: Fix remote tcs sequence handling
	  on empty tcs received ........ Merged revisions 398214 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398215 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-03 18:09 +0000 [r398207]  Kinsey Moore <kmoore@digium.com>

	* res/res_pjsip_dtmf_info.c, /: Prevent a crash in
	  res_pjsip_dtmf_info.c This change makes sure that a content type
	  header exists before checking the contents of the header against
	  known SIP INFO DTMF content types. ........ Merged revisions
	  398206 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-03 17:19 +0000 [r398205]  David M. Lee <dlee@digium.com>

	* Makefile, /: Fixed 'make clean' for wiki docs ........ Merged
	  revisions 398198 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-09-03 14:29 +0000 [r398197]  Walter Doekes <walter+asterisk@wjd.nu>

	* /, cel/cel_custom.c: Be a little more verbose when loading
	  cel_custom.conf. Review: https://reviewboard.asterisk.org/r/2805/
	  ........ Merged revisions 398167 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398168 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398196 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 20:58 +0000 [r398150]  David M. Lee <dlee@digium.com>

	* main/asterisk.c, include/asterisk/optional_api.h, /,
	  main/optional_api.c: Fix graceful shutdown crash. The cleanup
	  code for optional_api needs to happen after all of the optional
	  API users and providers have unused/unprovided. Unfortunately,
	  regsitering the atexit() handler at the beginning of main() isn't
	  soon enough, since module destructors run after that. ........
	  Merged revisions 398149 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 20:37 +0000 [r398148]  Rusty Newton <rnewton@digium.com>

	* /, configs/pjsip.conf.sample: New pjsip.conf.sample (issue
	  ASTERISK-22145) (closes issue ASTERISK-22145) Reported By: Matt
	  Jordan Review: https://reviewboard.asterisk.org/r/2811/ ........
	  Merged revisions 398147 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 19:55 +0000 [r398124-398140]  Kevin Harwell <kharwell@digium.com>

	* /, res/res_pjsip_outbound_registration.c,
	  include/asterisk/sorcery.h, res/res_pjsip.c,
	  res/res_pjsip/config_transport.c, main/sorcery.c: Add a
	  reloadable option for sorcery type objects Some configuration
	  objects currently won't place nice if reloaded. Specifically, in
	  this case the pjsip transport objects. Now when registering an
	  object in sorcery one may specify that the object is allowed to
	  be reloaded or not. If the object is set to not reload then upon
	  reloading of the configuration the objects of that type will not
	  be reloaded. The initially loaded objects of that type however
	  will remain. While the transport objects will not longer be
	  reloaded it is still possible for a user to configure an endpoint
	  to an invalid transport. A couple of log messages were added to
	  help diagnose this problem if it occurs. (closes issue
	  ASTERISK-22382) Reported by: Rusty Newton (closes issue
	  ASTERISK-22384) Reported by: Rusty Newton Review:
	  https://reviewboard.asterisk.org/r/2807/ ........ Merged
	  revisions 398139 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/config.c, res/res_security_log.c, /, channels/chan_sip.c,
	  main/translate.c, main/named_acl.c, main/indications.c: Fix
	  various memory leaks main/config.c - cleanup cache fie includes
	  res/res_security_log.c - unregister logger level
	  channesl/chan_sip.c - cleanup io context and notify_types
	  main/translator.c - cleanup at shutdown main/named_acl.c -
	  cleanup cli commands main/indications.c -
	  ast_get_indication_tone() unref default_tone_zone if used (closes
	  issues ASTERISK-22378) Reported by: Corey Farrell Patches:
	  config_shutdown.patch uploaded by coreyfarrell (license 5909)
	  res_security_log.patch uploaded by coreyfarrell (license 5909)
	  chan_sip-11.patch uploaded by coreyfarrell (license 5909)
	  indications_refleak.patch uploaded by coreyfarrell (license 5909)
	  named_acl-cli_unreg-trunk.patch uploaded by coreyfarrell (license
	  5909) translate_shutdown.patch uploaded by coreyfarrell (license
	  5909) ........ Merged revisions 398102 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398103 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398116 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 18:38 +0000 [r398101]  Matthew Jordan <mjordan@digium.com>

	* /, UPGRADE-12.txt (added), UPGRADE.txt: Update UPGRADE.txt file
	  for Asterisk 12 This simply pulls in the changes that were
	  breaking from the CHANGES file and updates a few other areas
	  accordingly. It also removes the 10 => 11 notes, which are
	  traditionally removed from each major version and stored in the
	  appropriate UPGRADE-X.txt file. ........ Merged revisions 398100
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 18:30 +0000 [r398064-398099]  Jonathan Rose <jrose@digium.com>

	* main/features_config.c, /, main/config_options.c:
	  features_config: Ignore parkinglots in features.conf instead of
	  failing to load Parkinglots are defined in res_features.conf now,
	  but this patch fixes features_config so that features don't fail
	  to load when parkinglots are present in features.conf Review:
	  https://reviewboard.asterisk.org/r/2801/ ........ Merged
	  revisions 398068 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/features_config.c, main/udptl.c, /: features_config: Don't
	  require features.conf to be present for Asterisk to load (closes
	  issue ASTERISK-22426) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2806/ ........ Merged
	  revisions 398020 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 17:59 +0000 [r398063]  Kevin Harwell <kharwell@digium.com>

	* main/manager.c, /, res/res_agi.c: Memory leak fix
	  ast_xmldoc_printable returns an allocated block that must be
	  freed by the caller. Fixed manager.c and res_agi.c to stop
	  leaking these results. (closes issue ASTERISK-22395) Reported by:
	  Corey Farrell Patches: manager-leaks-12.patch uploaded by
	  coreyfarrell (license 5909) res_agi-xmldoc-leaks.patch uploaded
	  by coreyfarrell (license 5909) ........ Merged revisions 398060
	  from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........
	  Merged revisions 398061 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398062 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 17:11 +0000 [r398024-398026]  Richard Mudgett <rmudgett@digium.com>

	* tests/test_substitution.c, /: test_substitution: Fix failing
	  test. Revert the -r392190 change. The original test was correct.
	  The CDR code was actually returning an unititialized buffer.
	  ........ Merged revisions 398025 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* tests/test_substitution.c, /: test_substituition: Fix failed test
	  reporting to actually report failure. You cannot put the "Testing
	  <blah> pass/fail" on a single line before actually performing the
	  test. Now any additional failure information is logged before the
	  test pass/fail announcement. * Added an additional CDR(answer,u)
	  test. ........ Merged revisions 398018 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 398019 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398023 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 16:27 +0000 [r398003-398017]  Kevin Harwell <kharwell@digium.com>

	* /, apps/app_mixmonitor.c: Fix memory leaks (closes issue
	  ASTERISK-22368) Reported by: Corey Farrell Patches:
	  issueA22368_mixmonitor_free_filename.patch uploaded by wdoekes
	  (license 5674) ........ Merged revisions 398004 from
	  http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged
	  revisions 398011 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398016 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/asterisk.c, /: Check return value on fwrite ........ Merged
	  revisions 398000 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 398002 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 13:40 +0000 [r397987-397990]  David M. Lee <dlee@digium.com>

	* rest-api-templates/swagger_model.py, res/ari/ari_websockets.c,
	  channels/sip/include/sip.h, main/asterisk.c, res/res_ari.c,
	  tests/test_optional_api.c (added), /, channels/chan_sip.c,
	  include/asterisk/autoconfig.h.in, configure.ac,
	  rest-api-templates/res_ari_resource.c.mustache,
	  res/ari/internal.h, res/res_http_websocket.c, CHANGES,
	  include/asterisk/compiler.h, include/asterisk/ari.h,
	  main/loader.c, include/asterisk/optional_api.h,
	  build_tools/cflags.xml, configure, res/res_ari_events.c,
	  include/asterisk/http_websocket.h, main/optional_api.c (added):
	  optional_api: Fix linking problems between modules that export
	  global symbols With the new work in Asterisk 12, there are some
	  uses of the optional_api that are prone to failure. The details
	  are rather involved, and captured on [the wiki][1]. This patch
	  addresses the issue by removing almost all of the magic from the
	  optional API implementation. Instead of relying on weak symbol
	  resolution, a new optional_api.c module was added to Asterisk
	  core. For modules providing an optional API, the pointer to the
	  implementation function is registered with the core. For modules
	  that use an optional API, a pointer to a stub function, along
	  with a optional_ref function pointer are registered with the
	  core. The optional_ref function pointers is set to the
	  implementation function when it's provided, or the stub function
	  when it's now. Since the implementation no longer relies on
	  magic, it is now supported on all platforms. In the spirit of
	  choice, an OPTIONAL_API flag was added, so we can disable the
	  optional_api if needed (maybe it's buggy on some bizarre platform
	  I haven't tested on) The AST_OPTIONAL_API*() macros themselves
	  remained unchanged, so existing code could remain unchanged. But
	  to help with debugging the optional_api, the patch limits the
	  #include of optional API's to just the modules using the API.
	  This also reduces resource waste maintaining optional_ref
	  pointers that aren't used. Other changes made as a part of this
	  patch: * The stubs for http_websocket that wrap system calls set
	  errno to ENOSYS. * res_http_websocket now properly increments
	  module use count. * In loader.c, the while() wrappers around
	  dlclose() were removed. The while(!dlclose()) is actually an
	  anti-pattern, which can lead to infinite loops if the module
	  you're attempting to unload exports a symbol that was directly
	  linked to. * The special handling of nonoptreq on systems without
	  weak symbol support was removed, since we no longer rely on weak
	  symbols for optional_api. [1]:
	  https://wiki.asterisk.org/wiki/x/wACUAQ (closes issue
	  ASTERISK-22296) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2797/ ........ Merged
	  revisions 397989 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_stasis_playback.c, /,
	  include/asterisk/stasis_app_recording.h,
	  res/ari/resource_recordings.h, res/res_stasis_recording.c,
	  res/Makefile, res/ari/ari_model_validators.c,
	  rest-api/api-docs/recordings.json, res/stasis_recording (added),
	  res/ari/resource_recordings.c, res/ari/ari_model_validators.h,
	  res/res_ari_recordings.c: ARI: Implement /recordings/stored API's
	  his patch implements the ARI API's for stored recordings. While
	  the original task only specified deleting a recording, it was
	  simple enough to implement the GET for all recordings, and for an
	  individual recording. The recording playback operation was
	  modified to use the same code for accessing the recording as the
	  REST API, so that they will behave consistently. There were
	  several problems with the api-docs that were also fixed, bringing
	  the ARI spec in line with the implementation. There were some
	  'wishful thinking' fields on the stored recording model (duration
	  and timestamp) that were removed, because I ended up not
	  implementing a metadata file to go along with the recording to
	  store such information. The GET /recordings/live operation was
	  removed, since it's not really that useful to get a list of all
	  recordings that are currently going on in the system. (At least,
	  if we did that, we'd probably want to also list all of the
	  current playbacks. Which seems weird.) (closes issue
	  ASTERISK-21582) Review: https://reviewboard.asterisk.org/r/2693/
	  ........ Merged revisions 397985 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /: Multiple revisions 397975-397976 ........ r397975 | rmudgett |
	  2013-08-29 20:00:00 -0500 (Thu, 29 Aug 2013) | 1 line pbx.c: Make
	  ast_str_substitute_variables_full() not mask variables. ........
	  r397976 | rmudgett | 2013-08-29 20:00:41 -0500 (Thu, 29 Aug 2013)
	  | 1 line Revert last commit. ........ Merged revisions
	  397975-397976 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 01:20 +0000 [r397978]  Richard Mudgett <rmudgett@digium.com>

	* main/pbx.c, /: pbx.c: Make pbx_substitute_variables_helper_full()
	  not mask variables. ........ Merged revisions 397977 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-30 00:11 +0000 [r397962-397969]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip_pidf.c, /: Sanitize XML output for PIDF bodies.
	  PJSIP's PIDF API does not replace angle brackets with their
	  appropriate counterparts for XML. So we have to do it ourself. In
	  this particular case, the problem had to do with attempting to
	  place an unsanitized SIP URI into an XML node. Now we don't get a
	  488 from recipients of our PIDF NOTIFYs. ........ Merged
	  revisions 397968 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_pidf.c, /: Fix method for creating activities
	  string in PIDF bodies. The previous method did not allocate
	  enough space to create the entire string, but adjusted the
	  string's slen value to be larger than the actual allocation. This
	  resulted in garbled text in NOTIFY requests from Asterisk. This
	  method allocates the proper amount of space first and then writes
	  the content into the buffer. ........ Merged revisions 397960
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 22:49 +0000 [r397959]  Kevin Harwell <kharwell@digium.com>

	* apps/app_dumpchan.c, main/logger.c, apps/app_verbose.c,
	  main/asterisk.c, channels/chan_misdn.c, /: Verbose logging
	  discrepancies Refactored cases where a combination of
	  ast_verbose/options_verbose were present. Also in general tried
	  to eliminate, in as many places as possible, where the
	  options_verbose global variable was being used. Refactored the
	  way local and remote consoles handle verbose message logging in
	  an attempt to solve the various discrepancies that sometimes
	  would show between the two. (closes issue AST-1193) Reported by:
	  Guenther Kelleter Review:
	  https://reviewboard.asterisk.org/r/2798/ ........ Merged
	  revisions 397948 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 397958 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 22:26 +0000 [r397956-397957]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_pubsub.c: Fix when the subscription_terminated
	  callback is called for subscription handlers. The previous
	  placement would result in the resubscribe() callback called
	  instead of the subscription_terminated() callback being called
	  when a subscription was ended via a SUBSCRIBE request. This would
	  result in confusing PJSIP and having it throw an assertion.
	  ........ Merged revisions 397955 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* res/res_pjsip_session.c, /: Fix a race condition where a canceled
	  call was answered. RFC 5407 section 3.1.2 details a scenario
	  where a UAC sends a CANCEL at the same time that a UAS sends a
	  200 OK for the INVITE that the UAC is canceling. When this
	  occurs, it is the role of the UAC to immediately send a BYE to
	  terminate the call. This scenario was reproducible by have a
	  Digium phone with two lines place a call to a second phone that
	  forwarded the call to the second line on the original phone. The
	  Digium phone, upon realizing that it was connecting to itself,
	  would attempt to cancel the call. The timing of this happened to
	  trigger the aforementioned race condition about 80% of the time.
	  Asterisk was not doing its job of sending a BYE when receiving a
	  200 OK on a cancelled INVITE. The result was that the ast_channel
	  structure was destroyed but the underlying SIP session, as well
	  as the PJSIP inv_session and dialog, were still alive. Attempting
	  to perform an action such as a transfer, once in this state,
	  would result in Asterisk crashing. The circumstances are now
	  detected properly and the session is ended as recommended in RFC
	  5407. (closes issue AST-1209) reported by John Bigelow ........
	  Merged revisions 397945 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 21:37 +0000 [r397947]  Kevin Harwell <kharwell@digium.com>

	* main/file.c, main/app.c, main/config_options.c, main/cel.c,
	  main/asterisk.c, main/cdr.c, main/manager.c, /,
	  main/stasis_config.c: Memory leaks fix (closes ASTERISK-22376)
	  Reported by: John Hardin Patches: memleak.patch uploaded by
	  jhardin (license 6512) memleak2.patch uploaded by jhardin
	  (license 6512) ........ Merged revisions 397946 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 20:22 +0000 [r397939]  Matthew Jordan <mjordan@digium.com>

	* configs/safe_asterisk.conf.sample (removed), /, CHANGES,
	  contrib/scripts/safe_asterisk, Makefile: Revert r394939 due to
	  (numerous) objections The patch from ASTERISK-21965 was committed
	  perhaps a bit too hastily. Walter and Tzafrir have pointed out
	  numerous issues with the approach and have propsed an alternative
	  in r/2757. Since it's not a time critical issue and is not worth
	  holding up the release of 12 for it, I've gone ahead and reverted
	  r394939 from 12/trunk and re-opened ASTERISK-21965. ........
	  Merged revisions 397938 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 16:21 +0000 [r397932]  David M. Lee <dlee@digium.com>

	* rest-api-templates/make_ari_stubs.py, /,
	  rest-api-templates/api.wiki.mustache,
	  rest-api-templates/asterisk_processor.py: Account for {} in
	  Swagger notes ........ Merged revisions 397927 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 16:05 +0000 [r397925]  Matthew Jordan <mjordan@digium.com>

	* Makefile, /: Recursively search for '.c' files when making
	  documentation with 'make full' Without this, documentation
	  defined in sub-folders is ignored. Since having properly
	  generated documentation is especially important in Asterisk 12 -
	  not having it can cause a module to not load - 'make full' needs
	  to look in all .c files. ........ Merged revisions 397924 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 15:43 +0000 [r397923]  Mark Michelson <mmichelson@digium.com>

	* /, apps/app_queue.c, main/cel.c, main/stasis_bridges.c: Multiple
	  revisions 397921-397922 ........ r397921 | mmichelson |
	  2013-08-29 10:42:10 -0500 (Thu, 29 Aug 2013) | 6 lines Resolve
	  assumptions that bridge snapshots would be non-NULL for transfer
	  stasis events. Attempting to transfer an unbridged call would
	  result in crashes in either CEL code or in the conversion to AMI
	  messages. ........ r397922 | mmichelson | 2013-08-29 10:42:29
	  -0500 (Thu, 29 Aug 2013) | 3 lines Remove extra debug message.
	  ........ Merged revisions 397921-397922 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-29 12:30 +0000 [r397912]  Matthew Jordan <mjordan@digium.com>

	* contrib/ast-db-manage/config,
	  contrib/ast-db-manage/config/script.py.mako,
	  contrib/ast-db-manage/voicemail.ini.sample,
	  contrib/ast-db-manage/voicemail/env.py,
	  contrib/ast-db-manage/voicemail,
	  contrib/ast-db-manage/voicemail/script.py.mako,
	  contrib/ast-db-manage/README.md,
	  contrib/ast-db-manage/config/versions,
	  contrib/ast-db-manage/voicemail/versions/a2e9769475e_create_tables.py,
	  contrib/ast-db-manage (added),
	  contrib/ast-db-manage/voicemail/versions, /,
	  contrib/ast-db-manage/config.ini.sample,
	  contrib/ast-db-manage/config/env.py,
	  contrib/ast-db-manage/config/versions/4da0c5f79a9c_create_tables.py:
	  Actually *add* the database schema management utilities In
	  r397874, the scripts were removed... but not replaced. Thanks to
	  Michael Young for noticing this! ........ Merged revisions 397911
	  from http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-28 23:15 +0000 [r397886-397903]  Richard Mudgett <rmudgett@digium.com>

	* main/cdr.c, /, funcs/func_cdr.c, main/stdtime/localtime.c: Fix
	  some uninitialized buffers for CDR handling valgrind found. *
	  Made ast_strftime_locale() ensure that the output buffer is
	  initialized. The std library strftime() returns 0 and does not
	  touch the buffer if it has an error. However, the function can
	  also return 0 without an error. (closes issue ASTERISK-22412)
	  Reported by: rmudgett ........ Merged revisions 397902 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: Fixed problems with ast_cdr_serialize_variables().
	  * Fixed return value of ast_cdr_serialize_variables() on error.
	  It needs to return 0 indicating no CDR variables found. * Made
	  ast_cdr_serialize_variables() check the return value of
	  cdr_object_format_property() and assert if nonzero. A member of
	  the cdr_readonly_vars[] was not handled. * Removed unused
	  elements from cdr_readonly_vars[]: total_duration, total_billsec,
	  first_start, and first_answer. ........ Merged revisions 397900
	  from http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: Made the on/off in CLI "cdr set debug [on|off]"
	  case insensitive. ........ Merged revisions 397898 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/cdr.c, /: Make CDR variable name chandling consistently case
	  insensitive. ........ Merged revisions 397896 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, main/cdr.c: Make CDR code deal with channel names case
	  insensitively. ........ Merged revisions 397894 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, funcs/func_cdr.c, main/cdr.c: Some CDR code optimization.
	  ........ Merged revisions 397892 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, funcs/func_cdr.c: Whitespace and curly braces. ........ Merged
	  revisions 397885 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-28 21:09 +0000 [r397877]  Mark Michelson <mmichelson@digium.com>

	* /, res/res_pjsip_refer.c: Improve detection of answer on SIP
	  blind transfer. A problem encountered during testing was that
	  res_pjsip_refer would not ever send a NOTIFY with a 200 OK
	  sipfrag. This is because the framehook that was supposed to send
	  the NOTIFY would never be told that an answer had occurred. This
	  happened for two reasons: 1) The transferee channel on which the
	  framehook was on was already up. 2) Answers are rarely if ever
	  written to channels. Rather, the ast_answer() or ast_raw_answer()
	  function is used to answer channels. Thanks to a suggestion by
	  Matt Jordan, the best way to detect that the call had been
	  answered was to find out when the transferee channel joined a
	  bridge. With stasis this is an easy task. So now, in addition to
	  the framehook logic, there is a stasis subscription used to
	  determine when the transferee has entered a bridge. Once it has
	  entered, an appropriate NOTIFY is sent. ........ Merged revisions
	  397876 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-28 20:55 +0000 [r397872-397875]  Matthew Jordan <mjordan@digium.com>

	* contrib/realtime/mysql/queue_log.sql,
	  contrib/realtime/mysql/voicemail.sql,
	  contrib/realtime/mysql/sippeers.sql, /,
	  contrib/realtime/mysql/iaxfriends.sql,
	  contrib/realtime/mysql/meetme.sql,
	  contrib/realtime/mysql/voicemail_messages.sql,
	  contrib/realtime/postgresql/realtime.sql,
	  contrib/realtime/mysql/voicemail_data.sql, CHANGES,
	  contrib/realtime/mysql/musiconhold.sql: Add database schema
	  management using Alembic This patch replaces contrib/realtime/
	  with a new setup for managing the database schema required for
	  database integration with Asterisk. In addition to initializing a
	  database with the proper schema, alembic can do a database
	  migration to assist with upgrading Asterisk in the future.
	  Hopefully this helps make setting up and operating Asterisk with
	  a database easier. With this the schema only needs to be
	  maintained in one place instead of once per database. The schemas
	  I have added here have a bit of improvement over the examples
	  that were there before (some added consistency and added some
	  missing indexes). Managing the schema in one place here also
	  applies to all databases supported by SQLAlchemy. See
	  contrib/ast-db-manage/README.md for more details. Review:
	  https://reviewboard.asterisk.org/r/2731 patch by Russell Bryant
	  (license 6300) ........ Merged revisions 397874 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* CHANGES, /: Update CHANGES file for Asterisk 12 This updates the
	  Asterisk 12 CHANGES file with the things that were missed during
	  the development cycle. Review:
	  https://reviewboard.asterisk.org/r/2795/ ........ Merged
	  revisions 397870 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-28 16:13 +0000 [r397857-397860]  Richard Mudgett <rmudgett@digium.com>

	* /, main/pbx.c: pbx.c: Make ast_str_substitute_variables_full()
	  not mask variables. ........ Merged revisions 397859 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* main/chanvars.c: ast_free() is null tollerant.

	* include/asterisk/threadstorage.h, /: Match use of ast_free() with
	  ast_calloc() and add some curly braces. ........ Merged revisions
	  397856 from http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-28 15:43 +0000 [r397855]  Mark Michelson <mmichelson@digium.com>

	* res/res_pjsip/pjsip_distributor.c, /: Fix dialog matching in the
	  SIP distributor. Dialog matching is performed in the distributor
	  for the sole purpose of retrieving an associated serializer so
	  the request may be serialized. This patch fixes two problems.
	  First, incoming CANCEL requests that had no to-tag (which really
	  should be *all* CANCEL requests) would not match with a dialog.
	  An earlier bug fix to deal with early CANCEL requests would
	  result in the CANCEL being replied to with a 481. The fix for
	  this is to find the matching INVITE transaction and get the
	  dialog from that transaction. Second, no SIP responses were
	  matching dialogs. This is because we were inverting the tags that
	  we were passing into PJSIP's dialog finding function. This logic
	  has been corrected by setting local and remote tag variables
	  based on whether the incoming message is a request or response.
	  ........ Merged revisions 397854 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-27 19:19 +0000 [r397820]  David M. Lee <dlee@digium.com>

	* rest-api-templates/param_parsing.mustache, res/res_ari_bridges.c,
	  /, res/stasis/app.c, res/res_ari_events.c,
	  res/res_ari_asterisk.c,
	  rest-api-templates/res_ari_resource.c.mustache, res/stasis/app.h,
	  res/res_stasis.c, main/stasis_bridges.c: ARI: WebSocket event
	  cleanup Stasis events (which get distributed over the ARI
	  WebSocket) are created by subscribing to the channel_all_cached
	  and bridge_all_cached topics, filtering out events for
	  channels/bridges currently subscribed to. There are two issues
	  with that. First was a race condition, where messages in-flight
	  to the master subscribe-to-all-things topic would get sent out,
	  even though the events happened before the channel was put into
	  Stasis. Secondly, as the number of channels and bridges grow in
	  the system, the work spent filtering messages becomes excessive.
	  Since r395954, individual channels and bridges have caching
	  topics, and can be subscribed to individually. This patch takes
	  advantage, so that channels and bridges are subscribed to on
	  demand, instead of filtering the global topics. The one case
	  where filtering is still required is handling BridgeMerge
	  messages, which are published directly to the bridge_all topic.
	  Other than the change to how subscriptions work, this patch
	  mostly just moves code around. Most of the work generating JSON
	  objects from messages was moved to .to_json handlers on the
	  message types. The callback functions handling app subscriptions
	  were moved from res_stasis (b/c they were global to the model) to
	  stasis/app.c (b/c they are local to the app now). (closes issue
	  ASTERISK-21969) Reported by: Matt Jordan Review:
	  https://reviewboard.asterisk.org/r/2754/ ........ Merged
	  revisions 397816 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-27 18:52 +0000 [r397811]  Richard Mudgett <rmudgett@digium.com>

	* /, main/astmm.c: Made MALLOC_DEBUG less CPU intensive by default.
	  Storing a backtrace for each allocation in anticipation of a
	  memory management problem is very CPU intensive. * Added the CLI
	  "memory backtrace {on|off}" command to request that the backtrace
	  be gathered only on request. The backtrace is off by default.
	  (issue ASTERISK-22221) Reported by: Matt Jordan ........ Merged
	  revisions 397809 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-27 18:10 +0000 [r397753-397760]  Matthew Jordan <mjordan@digium.com>

	* /, channels/chan_sip.c: AST-2013-005: Fix crash caused by invalid
	  SDP If the SIP channel driver processes an invalid SDP that
	  defines media descriptions before connection information, it may
	  attempt to reference the socket address information even though
	  that information has not yet been set. This will cause a crash.
	  This patch adds checks when handling the various media
	  descriptions that ensures the media descriptions are handled only
	  if we have connection information suitable for that media. Thanks
	  to Walter Doekes, OSSO B.V., for reporting, testing, and
	  providing the solution to this problem. (closes issue
	  ASTERISK-22007) Reported by: wdoekes Tested by: wdoekes patches:
	  issueA22007_sdp_without_c_death.patch uploaded by wdoekes
	  (License 5674) ........ Merged revisions 397756 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 397757 from
	  http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged
	  revisions 397758 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 397759 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, channels/chan_sip.c: AST-2013-004: Fix crash when handling ACK
	  on dialog that has no channel A remote exploitable crash
	  vulnerability exists in the SIP channel driver if an ACK with SDP
	  is received after the channel has been terminated. The handling
	  code incorrectly assumed that the channel would always be
	  present. This patch adds a check such that the SDP will only be
	  parsed and applied if Asterisk has a channel present that is
	  associated with the dialog. Note that the patch being applied was
	  modified only slightly from the patch provided by Walter Doekes
	  of OSSO B.V. (closes issue ASTERISK-21064) Reported by: Colin
	  Cuthbertson Tested by: wdoekes, Colin Cutherbertson patches:
	  issueA21064_fix.patch uploaded by wdoekes (License 5674) ........
	  Merged revisions 397710 from
	  http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged
	  revisions 397711 from
	  http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged
	  revisions 397712 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 397713 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-27 16:51 +0000 [r397746]  Richard Mudgett <rmudgett@digium.com>

	* channels/chan_iax2.c, channels/sig_pri.c, channels/sig_ss7.c,
	  channels/chan_dahdi.c, channels/sig_analog.c, /,
	  channels/chan_sip.c, channels/chan_motif.c: Fix uninitialized
	  value in struct ast_control_pvt_cause_code usage. ........ Merged
	  revisions 397744 from
	  http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged
	  revisions 397745 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-26 23:48 +0000 [r397691]  Matthew Jordan <mjordan@digium.com>

	* /, main/bridge_channel.c: Better handle clearing the OUTGOING
	  flag when a channel leaves a bridge When a channel with the
	  OUTGOING flag leaves a bridge, and it will survive being pulled
	  from the bridge (either because it will execute dialplan, go into
	  another bridge, or live in a friendly autoloop), we have to clear
	  the OUTGOING flag. This is the signal to the CDR engine that this
	  channel is no longer a second class citizen, i.e., it is not
	  "dialed". The soft hangup flags are only half the picture. If a
	  channel is being moved from one bridge to another, the soft
	  hangup flags aren't set; however, the state of the bridge_channel
	  will not be hung up. Since the channel does not have one of the
	  two hang up states, that implies that the channel is still
	  technically alive. This patch modifies the check so that it
	  checks both the soft hangup flags as well as the bridge_channel
	  state. If either suggests that the channel is going to persist,
	  we clear the OUTGOING flag. ........ Merged revisions 397690 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-26 21:32 +0000 [r397674]  David M. Lee <dlee@digium.com>

	* /, main/bucket.c: Fixed bucket.c for systems where tv_usec is not
	  an unsigned long. ........ Merged revisions 397673 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-26 16:25 +0000 [r397644-397651]  Richard Mudgett <rmudgett@digium.com>

	* /, include/asterisk/bridge_channel.h, main/bridge_channel.c:
	  bridging: Fix a livelock with local channel optimization. Use a
	  better means of waking up the bridge channel thread. ........
	  Merged revisions 397650 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* channels/Makefile, /: chan_dahdi: Add some missing build cleanup.
	  ........ Merged revisions 397643 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-25 18:12 +0000 [r397622-397631]  Matthew Jordan <mjordan@digium.com>

	* tests/test_bucket.c, /: Fix bucket unit tests After the review
	  for buckets was completed (r2715), the handling of names in the
	  bucket core was deferred to the wizards. As such, the bucket unit
	  tests cannot expect that passing a URI with a scheme specified
	  but no actual resource name will automatically fail. The tests
	  have been updated to not make this check. ........ Merged
	  revisions 397630 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* include/asterisk/config_options.h, /, main/config_options.c,
	  tests/test_config.c: Fix the config_options_test The config
	  options test requires the entire configuration item to be
	  transparent from the documentation system. So we let it do that
	  too. As an aside, please do not use this power for evil.
	  Documentation is your friend, and you really should document your
	  configurations. Hiding your module's configuration information
	  from the system attempting to enforce some sanity in the universe
	  is something only a Bond villain would contemplate. ........
	  Merged revisions 397628 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

	* /, res/res_pjsip/pjsip_configuration.c: Add rtpengine
	  configuration parameter The rtpengine configuration parameter was
	  documented in the XML documentation, but it was not actually
	  registered with the sorcery object. This adds the parameter with
	  a default of "asterisk", such that res_rtp_asterisk is chosen as
	  the default RTP implementation. (closes issue ASTERISK-22380)
	  Reported by: Rusty Newton Tested by: Rusty Newton ........ Merged
	  revisions 397621 from
	  http://svn.asterisk.org/svn/asterisk/branches/12

2013-08-23 22:40 +0000 [r397615]  Matthew Jordan <mjordan@digium.com>

	* /: Set new merge properties on 12

2013-08-23 22:20 +0000 [r397613]  Joshua Colp <jcolp@digium.com>

	* main/bucket.c: Fix building of trunk. Note: This is why I commit
	  on the weekend.