diff --git a/ChangeLog b/ChangeLog index 799196a498..bf7ca91ec7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,57 @@ -2016-03-29 19:39 +0000 Asterisk Development Team +2016-04-06 13:25 +0000 Asterisk Development Team - * asterisk 13.8.0 Released. + * asterisk certified/13.8-cert1-rc1 Released. + +2016-04-06 07:52 +0000 [97499f717a] Joshua Colp + + * Release summaries: Remove previous versions + +2016-04-06 07:52 +0000 [99d52771b5] Joshua Colp + + * .version: Update for certified/13.8-cert1-rc1 + +2016-04-06 07:52 +0000 [eb9e193c65] Joshua Colp + + * .lastclean: Update for certified/13.8-cert1-rc1 + +2016-04-06 07:52 +0000 [8ec588b8b1] Joshua Colp + + * realtime: Add database scripts for certified/13.8-cert1-rc1 + +2016-04-05 09:06 +0000 [c29e2e3fb7] Joshua Colp + + * .version: Update for certified/13.8 + + Change-Id: I37e5a8e36c2f4f9137f8f230c99220005424e514 + +2015-01-06 21:29 +0000 [3c796e694e] Matt Jordan + + * Disable extended support modules + + Change-Id: Ia2e359021b3eccecce20028098c5b6d1099c3f9e + +2016-03-28 18:10 +0000 [7b6c4decd3] Richard Mudgett + + * 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-29 14:39 +0000 [fad0410486] Mark Michelson + + * ChangeLog: Updated for 13.8.0 2016-03-29 14:39 +0000 [0f885f0076] Mark Michelson @@ -22,9 +73,9 @@ * realtime: Add database scripts for 13.8.0 -2016-03-22 18:31 +0000 Asterisk Development Team +2016-03-22 13:32 +0000 [06f5ace1fa] Mark Michelson - * asterisk 13.8.0-rc1 Released. + * ChangeLog: Updated for 13.8.0-rc1 2016-03-22 13:26 +0000 [a698424678] Mark Michelson @@ -3214,99 +3265,6 @@ Change-Id: If3ef92a7c4f4844d08f8aae170d2178aec5c4c1a -2015-12-08 13:04 +0000 [fe8011cc50] sungtae kim - - * 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 - - * asterisk 13.7.0-rc1 Released. - -2015-12-15 11:57 +0000 [0370acecfc] Kevin Harwell - - * Release summaries: Add summaries for 13.7.0-rc1 - -2015-12-15 11:54 +0000 [d1bb33fe0b] Kevin Harwell - - * .version: Update for 13.7.0-rc1 - -2015-12-15 11:54 +0000 [d06a65de01] Kevin Harwell - - * .lastclean: Update for 13.7.0-rc1 - -2015-12-15 11:54 +0000 [fb37b44660] Kevin Harwell - - * realtime: Add database scripts for 13.7.0-rc1 - -2015-12-15 11:48 +0000 [20b7164b8c] Kevin Harwell - - * .version: Update for 13.7.0-rc1 - -2015-12-15 11:48 +0000 [6cbf2414c3] Kevin Harwell - - * .lastclean: Update for 13.7.0-rc1 - -2015-12-15 11:48 +0000 [ba1794464d] Kevin Harwell - - * realtime: Add database scripts for 13.7.0-rc1 - -2015-12-15 11:39 +0000 [b3e9753a23] Kevin Harwell - - * .version: Update for 13.7.0-rc1 - -2015-12-15 11:39 +0000 [b0df64b5f0] Kevin Harwell - - * .lastclean: Update for 13.7.0-rc1 - -2015-12-15 11:39 +0000 [ce9a59faf6] Kevin Harwell - - * realtime: Add database scripts for 13.7.0-rc1 - -2015-12-15 11:28 +0000 [2e26bef5bb] Kevin Harwell - - * .version: Update for 13.7.0-rc1 - -2015-12-15 11:28 +0000 [5e9b47516d] Kevin Harwell - - * .lastclean: Update for 13.7.0-rc1 - -2015-12-15 11:28 +0000 [034112c574] Kevin Harwell - - * realtime: Add database scripts for 13.7.0-rc1 - -2015-12-15 11:19 +0000 [d1f8ff1789] Kevin Harwell - - * .version: Update for 13.7.0-rc1 - -2015-12-15 11:19 +0000 [9376488bef] Kevin Harwell - - * .lastclean: Update for 13.7.0-rc1 - -2015-12-15 11:19 +0000 [a894c9e7a9] Kevin Harwell - - * realtime: Add database scripts for 13.7.0-rc1 - -2015-12-15 11:12 +0000 [52afb0f112] Kevin Harwell - - * .version: Update for 13.7.0-rc1 - -2015-12-15 11:12 +0000 [2de343eb85] Kevin Harwell - - * .lastclean: Update for 13.7.0-rc1 - -2015-12-15 11:12 +0000 [184de2a160] Kevin Harwell - - * realtime: Add database scripts for 13.7.0-rc1 - 2015-12-14 13:53 +0000 [24ae124e4f] server-pandora * res_rtp_asterisk.c: Fix DTLS negotiation delays. @@ -3414,6 +3372,19 @@ Reported by: Hiroaki Komatsu Change-Id: I7ed7bcfa982b367dc64b4b73fbd962da49b9af36 +2015-12-08 13:04 +0000 [fe8011cc50] sungtae kim + + * 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-09 09:48 +0000 [cd119ed4a2] Tyler Cambron * res_chan_stats: Fix bug to send correct statistics to StatsD @@ -5210,26 +5181,6 @@ Change-Id: Ib91435fb45b7f5f7c0fc83d0eec20b88098707bc -2015-09-29 21:15 +0000 Asterisk Development Team - - * asterisk 13.6.0-rc1 Released. - -2015-09-29 16:12 +0000 [bba1c4066b] Kevin Harwell - - * Release summaries: Add summaries for 13.6.0-rc1 - -2015-09-29 16:08 +0000 [82c4aecdbb] Kevin Harwell - - * .version: Update for 13.6.0-rc1 - -2015-09-29 16:08 +0000 [bc18db7388] Kevin Harwell - - * .lastclean: Update for 13.6.0-rc1 - -2015-09-29 16:08 +0000 [b9c53f95e3] Kevin Harwell - - * realtime: Add database scripts for 13.6.0-rc1 - 2015-09-29 14:53 +0000 [d30939b6e8] Kevin Harwell * ARI: Changed version from 1.8.0 to 1.9.0 @@ -6988,26 +6939,6 @@ Change-Id: I06f066728604943cba0bb0b39fa7cf658a21cd99 -2015-07-24 22:20 +0000 Asterisk Development Team - - * asterisk 13.5.0-rc1 Released. - -2015-07-24 17:15 +0000 [a4b527393b] Matt Jordan - - * Release summaries: Add summaries for 13.5.0-rc1 - -2015-07-24 17:11 +0000 [158b0b8ebf] Matt Jordan - - * .version: Update for 13.5.0-rc1 - -2015-07-24 17:11 +0000 [a0a7650e34] Matt Jordan - - * .lastclean: Update for 13.5.0-rc1 - -2015-07-24 17:11 +0000 [4d238af086] Matt Jordan - - * realtime: Add database scripts for 13.5.0-rc1 - 2015-07-24 12:56 +0000 [f78a4b52b8] Matt Jordan * Bump the ARI version to 1.8.0 @@ -9182,50 +9113,6 @@ Reported by: Corey Farrell Change-Id: Iececfdc2da498b2c32b9e09042f5f12292007ac7 -2015-05-21 19:59 +0000 Asterisk Development Team - - * asterisk 13.4.0-rc1 Released. - -2015-05-21 14:56 +0000 [3fb2b375fe] Matt Jordan - - * Release summaries: Remove previous versions - -2015-05-21 14:56 +0000 [9d9ae03842] Matt Jordan - - * .version: Update for 13.4.0-rc1 - -2015-05-21 14:56 +0000 [53a39083e5] Matt Jordan - - * .lastclean: Update for 13.4.0-rc1 - -2015-05-21 14:56 +0000 [7af8ef9346] Matt Jordan - - * realtime: Add database scripts for 13.4.0-rc1 - -2015-05-21 14:52 +0000 [20982c68d4] Matt Jordan - - * Release summaries: Correct summaries for 13.4.0-rc1 - -2015-05-21 13:17 +0000 [1bb62b037f] mjordan - - * ChangeLog: Updated for 13.4.0-rc1 - -2015-05-21 13:17 +0000 [1e98a36699] mjordan - - * Release summaries: Add summaries for 13.4.0-rc1 - -2015-05-21 13:15 +0000 [5c12e5ba72] mjordan - - * .version: Update for 13.4.0-rc1 - -2015-05-21 13:15 +0000 [69292a9f11] mjordan - - * .lastclean: Update for 13.4.0-rc1 - -2015-05-21 13:15 +0000 [628680803a] mjordan - - * realtime: Add database scripts for 13.4.0-rc1 - 2015-05-21 13:05 +0000 [9d8a462356] Matt Jordan * ARI: Update version to 1.7.0 @@ -9235,18 +9122,6 @@ Change-Id: I6c36e6144da426412f25828a868e4df916bff60a -2015-05-21 07:22 +0000 [620054c527] Matt Jordan - - * Merge "audiohook.c: Difference in read/write rates caused continuous buffer resets" into 13 -2015-05-21 07:21 +0000 [f5e195b44e] Matt Jordan - - * Merge "Logger: Reset defaults before processing config." into 13 -2015-05-21 07:20 +0000 [e8a4e01c32] Matt Jordan - - * Merge "res/res_http_websocket: Add a pre-session established callback" into 13 -2015-05-21 05:15 +0000 [3c98544543] Joshua Colp - - * 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 * Logger: Reset defaults before processing config. @@ -9260,7 +9135,7 @@ Change-Id: Id24bb1fb0885c2c14cf8bd6f69a0c2ee7cd6c5bd -2015-05-20 19:05 +0000 [7fcf0a97b8] George Joseph +2015-05-20 19:05 +0000 [7fcf0a97b8] gtjoseph * app_playback: Suppress warnings on playback if channel hung up @@ -9298,9 +9173,6 @@ Change-Id: Idab4dfef068a7922c09cc631dda27bc920a6c76f -2015-05-20 15:22 +0000 [4a450f863b] Matt Jordan - - * Merge "Fix potential crash after unload of func_periodic_hook or test_message." into 13 2015-05-19 13:01 +0000 [17d6ede337] Corey Edwards * main/sdp_srtp.c: allow SDP crypto tag to be up to 9 digits @@ -9352,7 +9224,7 @@ Reported by: snuffy Change-Id: I9de76c2935a1f4e3f0cffe97a670106f5605e89e -2015-05-14 18:01 +0000 [dd78ab42e4] George Joseph +2015-05-14 18:01 +0000 [dd78ab42e4] gtjoseph * res_pjsip_config_wizard/config: Fix template processing @@ -9384,12 +9256,6 @@ ASTERISK-25090 #close Change-Id: I51e610ae87371df771ce7693a955510efb90f8f7 -2015-05-14 15:20 +0000 [8697a49ef9] Joshua Colp - - * 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 - - * Merge "Message.c: Clear message channel frames on cleanup" into 13 2015-05-14 00:06 +0000 [6b7282ca40] Corey Farrell * Fix potential crash after unload of func_periodic_hook or test_message. @@ -9407,9 +9273,6 @@ Reported by: Corey Farrell Change-Id: I6a00ec8e38046058f97dc703e1adcde9bf517835 -2015-05-14 05:02 +0000 [8f8d54a18e] Joshua Colp - - * Merge "main/manager.c: Bugfix sort action_manager by alphabetically" into 13 2015-05-13 15:41 +0000 [02c5130589] Jonathan Rose * Message.c: Clear message channel frames on cleanup @@ -9425,9 +9288,6 @@ Change-Id: Idf18df73ccd8c220be38743335b5c79c2a4c0d0f -2015-05-13 15:44 +0000 [586da882bc] Joshua Colp - - * Merge "app_voicemail: fix moving when old messages full" into 13 2015-05-12 17:45 +0000 [d49d64b79c] Jonathan Rose * app_voicemail: fix moving when old messages full @@ -9444,15 +9304,6 @@ Review: https://gerrit.asterisk.org/#/c/448/ Change-Id: I2be440a09f42e2d06d50975c40d1ad7f836ecb3f -2015-05-13 14:20 +0000 [51478575e4] Joshua Colp - - * Merge "General: Fix recent menuselect-related cross compile regression" into 13 -2015-05-13 12:26 +0000 [5fcaf727cc] Joshua Colp - - * Merge "res_config_mysql: Fix broken column type checking" into 13 -2015-05-13 12:24 +0000 [6a12b0634b] Joshua Colp - - * 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 * main/manager.c: Bugfix sort action_manager by alphabetically @@ -9495,9 +9346,6 @@ Change-Id: Iae6fa0d72b37c36a27fe40686e0ae6fba3afec31 -2015-05-13 04:35 +0000 [62422712f7] Joshua Colp - - * Merge "cdr_pgsql: Use PQescapeStringConn for escaping names." into 13 2015-05-12 17:34 +0000 [c780b6e431] Richard Mudgett * chan_dahdi/sig_pri: Fix crash on ISDN call hangup collision. @@ -9532,7 +9380,7 @@ Change-Id: I8a2b1fc5deb6ad2b80f49baca35b1b13d468ebf8 -2015-05-05 15:32 +0000 [637c8f065e] George Joseph +2015-05-05 15:32 +0000 [637c8f065e] gtjoseph * sorcery: Add API to insert/remove a wizard to/from an object type's list @@ -9580,10 +9428,7 @@ Change-Id: I6709165e2d00463e9c813d24f17830ad4910b599 -2015-05-12 05:38 +0000 [8523a5ed09] Joshua Colp - - * Merge "vector: Add REMOVE, ADD_SORTED and RESET macros" into 13 -2015-05-09 16:58 +0000 [ea917fefaf] George Joseph +2015-05-09 16:58 +0000 [ea917fefaf] gtjoseph * vector: Add REMOVE, ADD_SORTED and RESET macros @@ -9637,9 +9482,6 @@ Change-Id: Ifb749616ff8e156a1031ddaddfcc9244767a095d -2015-05-08 15:55 +0000 [7111ba6df4] Matt Jordan - - * Merge "tcptls: Avoiding ERR_remove_state in OpenSSL." into 13 2015-05-08 10:39 +0000 [613a461c3d] Sean Bright * res_rtp_asterisk: Issue ERROR if res_srtp is not found. @@ -9672,9 +9514,6 @@ Change-Id: Ib6f4fd177afd1667b2402735034001d4d055a908 -2015-05-08 09:54 +0000 [30c3b254c5] Joshua Colp - - * 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. @@ -9692,7 +9531,7 @@ Change-Id: If1c0871ece21a7e0763fafbd2fa023ae49d4d629 (cherry picked from commit 247fef66537b59649e7571d64e2c574a106dbd65) -2015-05-07 14:54 +0000 [5392e970d0] George Joseph +2015-05-07 14:54 +0000 [5392e970d0] gtjoseph * doc: Make progdocs play nice with git @@ -9707,9 +9546,6 @@ Change-Id: I38712d3e334fa4baec19d30d05de8c6f28137622 -2015-05-07 15:10 +0000 [1e44d1bef9] Joshua Colp - - * Merge "res_pjsip_exten_state: Fix race condition between sending NOTIFY and termination" into 13 2015-05-04 14:43 +0000 [608f0a94ee] Ivan Poddubny * contrib/editors: Fix vim syntax highlighting of comments in config files @@ -9720,9 +9556,6 @@ Change-Id: Id17dfaeda8ed4be572e8107a0c010066584aaee7 -2015-05-07 13:30 +0000 [22c6c12af2] Matt Jordan - - * Merge "vector: Additional enhancements and fixes" into 13 2015-05-06 13:24 +0000 [d649d682c4] Joshua Colp * res_pjsip_exten_state: Fix race condition between sending NOTIFY and termination @@ -9753,16 +9586,7 @@ Change-Id: I0b3cd2fac5be8d9b3dc5e693aaa79846eeaf5643 -2015-05-07 07:02 +0000 [9322bc6ff6] Matt Jordan - - * Merge "chan_dahdi: Improve force_restart_unavailable_chans option description." into 13 -2015-05-07 06:39 +0000 [b1514362ef] Matt Jordan - - * Merge "res_stasis_snoop: Spying on a single direction continually increases CPU" into 13 -2015-05-07 06:28 +0000 [652ee2ff83] Joshua Colp - - * Merge "features: Fix crash when transferee hangs up during DTMF attended transfer." into 13 -2015-05-05 20:22 +0000 [5f9aea8e3c] George Joseph +2015-05-05 20:22 +0000 [5f9aea8e3c] gtjoseph * vector: Additional enhancements and fixes @@ -9810,15 +9634,6 @@ Change-Id: I1ff8f02124d2f4abd632a050da52c64285bb7f30 -2015-05-06 07:42 +0000 [d6ffbe39b0] Joshua Colp - - * Merge "app_queue: Fix queue_log EXITWITHTIMEOUT containing only 1 parameter" into 13 -2015-05-06 06:13 +0000 [dfb292ce3e] Matt Jordan - - * Merge "res_ari_bridges: Add missing dependencies." into 13 -2015-05-05 21:05 +0000 [50e90f9121] Matt Jordan - - * Merge "pbx_config: Register manager actions with module version of macro." into 13 2015-05-05 18:17 +0000 [be1260a35f] Richard Mudgett * features: Fix crash when transferee hangs up during DTMF attended transfer. @@ -9851,7 +9666,7 @@ Change-Id: Ie2c1b14e5e647d4ea6de300bf56d69805d7bcada -2015-05-05 15:40 +0000 [8b0f85ac06] George Joseph +2015-05-05 15:40 +0000 [8b0f85ac06] gtjoseph * test_vector: Fix build breakage caused by ASTERISK_REGISTER_FILE @@ -9873,12 +9688,6 @@ Change-Id: I0c62045922e26bee2125e93aee1dee17eee79618 -2015-05-05 13:13 +0000 [2d9081b5ec] Matt Jordan - - * Merge "stasis: Fix dial masquerade datastore lifetime" into 13 -2015-05-05 12:45 +0000 [8ca25dfd7e] Matt Jordan - - * Merge "vector: Traversal, retrieval, insert and locking enhancements" into 13 2015-05-05 09:47 +0000 [366ea63438] Corey Farrell * res_ari_bridges: Add missing dependencies. @@ -9932,7 +9741,7 @@ Change-Id: I1ef4ca5ca04980028604cc2af5d2992ac3431b3f -2015-05-01 19:25 +0000 [7a7e9733c2] George Joseph +2015-05-01 19:25 +0000 [7a7e9733c2] gtjoseph * vector: Traversal, retrieval, insert and locking enhancements @@ -9974,18 +9783,6 @@ Change-Id: I93e50b8fcbcfa7f1f5b41b2c44a51685c09529c3 -2015-05-04 09:26 +0000 [626bffc4c2] Matt Jordan - - * 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 - - * 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 - - * Merge "Format Interfaces: Prevent unload except by shutdown." into 13 -2015-05-04 07:46 +0000 [743fed71fc] Matt Jordan - - * Merge "res_odbc: Use negative connection cache for all connections" into 13 2015-04-21 11:52 +0000 [3dcec04ab5] Martin Tomec * res_odbc: Use negative connection cache for all connections @@ -9998,12 +9795,6 @@ ASTERISK-22708 #close Change-Id: I431cc2e8584ab0b6908b3523d0a0e18c9a527271 -2015-05-04 04:03 +0000 [74799b3fe2] Matt Jordan - - * Merge "Remove unneeded uses of optional_api providers." into 13 -2015-05-04 04:03 +0000 [78c02f8e88] Matt Jordan - - * Merge "Update configure.ac/Makefile for clang" into 13 2015-05-03 21:03 +0000 [f38066fcad] Corey Farrell * Format Interfaces: Prevent unload except by shutdown. @@ -10052,12 +9843,6 @@ Change-Id: I56323899123ae3264900389cae1f5b252aa3bf43 -2015-05-03 09:20 +0000 [13819a34c4] Matt Jordan - - * Merge "Build System: Prevent unneeded changes to asterisk/buildopts.h." into 13 -2015-05-03 09:19 +0000 [b518ba1c6c] Matt Jordan - - * Merge "res_pjsip_dlg_options: Fix MODULEINFO section." into 13 2015-05-02 18:58 +0000 [ad6ea29697] Corey Farrell * Remove unneeded uses of optional_api providers. @@ -10078,12 +9863,6 @@ Change-Id: I53ea65a9fc9693c89f8bcfd6120649bfcfbc3478 -2015-05-02 10:19 +0000 [9888562c8c] Matt Jordan - - * Merge "include/asterisk/channel.h: Fix typo" into 13 -2015-05-02 10:17 +0000 [b4000f2d44] Matt Jordan - - * Merge "Astobj2: Fix initialization order of refdebug and AO2_DEBUG." into 13 2015-04-30 02:07 +0000 [525c8c8689] Rodrigo Ramírez Norambuena * include/asterisk/channel.h: Fix typo @@ -10175,12 +9954,6 @@ Change-Id: Iedfc97a69d21070c50fca42275d7b3e714e59360 -2015-05-01 06:55 +0000 [ec0f80b6e8] Matt Jordan - - * Merge "res_pjsip_outbound_authenticator_digest: Add missing outbound authenticator callback." into 13 -2015-05-01 06:55 +0000 [ed51fbbe9c] Matt Jordan - - * Merge "Prevent potential crash on blond transfer." into 13 2015-04-30 15:54 +0000 [3efe0df044] Corey Farrell * Sample Configs: Fix syntax error in pjsip.conf @@ -10238,12 +10011,6 @@ Change-Id: I26e02ad37f9e36bcc859867e2fad1b90452ec3de -2015-04-30 11:11 +0000 [e0c6f88010] Mark Michelson - - * Merge "chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option." into 13 -2015-04-30 10:53 +0000 [d1bc86fc99] Matt Jordan - - * Merge "res_pjsip_outbound_registration: Add virtual line support." into 13 2015-04-29 14:29 +0000 [d3c310a28c] Richard Mudgett * chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option. @@ -10362,12 +10129,6 @@ ASTERISK-24917 Change-Id: I12ea29d3bda2254ad3908e279b7effbbac6a97cb -2015-04-29 16:43 +0000 [37a193da18] Matt Jordan - - * Merge "ARI: Fix missing dependencies." into 13 -2015-04-29 16:42 +0000 [6a86b3555b] Matt Jordan - - * Merge "res_fax: allow 2400 transmission rate according to v.27ter standard" into 13 2015-04-29 16:15 +0000 [d4e207e27e] Matt Jordan * main/rtp_engine: Fix DTLS double-free introduced by 0b6410c4f8 @@ -10490,12 +10251,6 @@ Change-Id: I7a8a7beec3334cec304943f2dd7597eabe2e3150 -2015-04-28 19:18 +0000 [95ab9fdb1a] Joshua Colp - - * Merge "res_pjsip_outbound_registration: Add debugging messages." into 13 -2015-04-28 19:18 +0000 [0e70dc0dc8] Joshua Colp - - * Merge "res_pjsip_outbound_registration: Don't fail on delayed processing: 13." into 13 2015-04-27 16:56 +0000 [e39bd6ba46] Mark Michelson * res_pjsip_outbound_registration: Don't fail on delayed processing: 13. @@ -10550,9 +10305,6 @@ Change-Id: I577bde7860be0a6c872b5bcb4d5047340bf45d45 -2015-04-28 07:13 +0000 [7ee05892d6] Joshua Colp - - * Merge "Example script for scan-build (the llvm static analyzer)" into 13 2015-04-28 05:38 +0000 [0b6410c4f8] Steve Davies * res_rtp_asterisk: Resolve 2 discrete memory leaks in DTLS @@ -10568,10 +10320,7 @@ Change-Id: I62a8ceb8679709f6c3769136dc6aa9a68202ff9b -2015-04-28 06:55 +0000 [427209603d] Joshua Colp - - * 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 +2015-04-27 12:11 +0000 [99fb87ae13] gtjoseph * res_pjsip: Fix SEGV on pending-qualify contacts @@ -10616,12 +10365,6 @@ Change-Id: Id7f4ad1fe948eb2408622e80c27936ce4516c33c -2015-04-26 15:53 +0000 [2d277996b7] Matt Jordan - - * Merge "Clang: Fix some more tautological-compare warnings." into 13 -2015-04-24 13:07 +0000 [145f65598c] Matt Jordan - - * Merge "app_confbridge: Default the template option to a compatible default profile." into 13 2015-04-23 15:11 +0000 [7e5056b393] Kevin Harwell * app_confbridge: Default the template option to a compatible default profile. @@ -10661,9 +10404,6 @@ Change-Id: I39c4ca52e688a9f83bcc1878371334becdc5be01 -2015-04-24 09:24 +0000 [bf3d9db4a6] Matt Jordan - - * 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 * Example script for scan-build (the llvm static analyzer) @@ -10675,9 +10415,6 @@ ASTERISK-24917 Change-Id: I70405fe54e4be7dbfbcb62e291690069b88617a8 -2015-04-23 17:23 +0000 [b3cd5bc77f] Mark Michelson - - * Merge "Clang: change previous tautological-compare fixes." into 13 2015-04-23 12:54 +0000 [eabf3b5a3c] Mark Michelson * res_pjsip_t38: Don't crash on authenticated reinvite after originated T.38 FAX. @@ -10709,7 +10446,7 @@ Reported by Mark Michelson Change-Id: Ic5a1230668369dda4bb13524098aed9306ab45a0 -2015-04-23 09:16 +0000 [f70d21b2cf] George Joseph +2015-04-23 09:16 +0000 [f70d21b2cf] gtjoseph * res_pjsip: Validate that contact uris start with sip: or sips: @@ -10761,10 +10498,7 @@ Change-Id: I0557ae0154a0b7de68883848a609309cdf0aee6a -2015-04-23 06:50 +0000 [a06924e9d9] Matt Jordan - - * Merge "Astobj2: Ensure all calls to __adjust_lock pass a valid object." into 13 -2015-04-22 16:22 +0000 [1474bb05f6] George Joseph +2015-04-22 16:22 +0000 [1474bb05f6] gtjoseph * res_corosync: Add check for config file before calling corosync apis @@ -10797,7 +10531,7 @@ Change-Id: I669100f87937cc3f867cec56a27ae9c01292908f -2015-04-22 16:32 +0000 [b0e929219b] George Joseph +2015-04-22 16:32 +0000 [b0e929219b] gtjoseph * .gitignore: Add .gcno and .gcda @@ -10805,12 +10539,6 @@ Change-Id: Ie20882d64b60692e2c941ea8872ab82a86ce77a3 -2015-04-22 14:25 +0000 [5a3948a66f] Matt Jordan - - * Merge "Fix/Update clang-RAII macro implementation" into 13 -2015-04-22 14:07 +0000 [2ef1e1fc68] Mark Michelson - - * 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 * Clang: Fix some more tautological-compare warnings. @@ -10841,9 +10569,6 @@ ASTERISK-24917 Change-Id: Ief23ef68916192b9b72dabe702b543ecfeca0b62 -2015-04-22 05:45 +0000 [edd9e54818] Joshua Colp - - * Merge "Check for ao2_alloc failure in __ast_channel_internal_alloc." into 13 2015-04-14 14:04 +0000 [7b57116833] Joshua Colp * res_pjsip_mwi: Send unsolicited MWI NOTIFY on startup and when endpoint registers. @@ -10862,9 +10587,6 @@ Change-Id: I043f20230227e91218f18a82c7d5bb2aa62b1d58 -2015-04-22 05:29 +0000 [4423d5f755] Joshua Colp - - * Merge "res_pjsip_pubsub: Set the endpoint on SUBSCRIBE dialogs." into 13 2015-04-21 15:17 +0000 [ad1a118632] Corey Farrell * Check for ao2_alloc failure in __ast_channel_internal_alloc. @@ -10943,9 +10665,6 @@ Change-Id: I5fe2e48556507785fd8ab8e1c960683fd5d20325 -2015-04-20 17:23 +0000 [96e18453f4] Joshua Colp - - * Merge "pjsip_options: Fix non-qualified contacts showing as unavailable" into 13 2015-04-20 13:01 +0000 [2be9cc2643] Diederik de Groot * Fix/Update clang-RAII macro implementation @@ -10963,7 +10682,7 @@ ASTERISK-24917 Change-Id: I12091228090e90831bf2b498293858f46ea7a8c2 -2015-04-20 09:53 +0000 [b74b2cdcda] George Joseph +2015-04-20 09:53 +0000 [b74b2cdcda] gtjoseph * pjsip_options: Fix format specifier for int64_t rtt. @@ -10972,13 +10691,7 @@ Change-Id: I4b8ab958fc1e9a179556a9b4ffa49673ba9fdec7 -2015-04-20 06:29 +0000 [27a122af66] Matt Jordan - - * 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 - - * Merge "Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled." into 13 -2015-04-18 13:36 +0000 [63169e00ff] George Joseph +2015-04-18 13:36 +0000 [63169e00ff] gtjoseph * pjsip_options: Fix non-qualified contacts showing as unavailable @@ -11073,9 +10786,6 @@ Change-Id: I3ef7428ee402816d9fcefa1b3b95830c00d5c402 -2015-04-17 15:57 +0000 [e05b076827] Matt Jordan - - * Merge "Detect potential forwarding loops based on count." into 13 2015-04-15 10:38 +0000 [4f1a8dbe92] Mark Michelson * Detect potential forwarding loops based on count. @@ -11127,7 +10837,7 @@ ASTERISK-24958 #close Change-Id: Ia7e4b7cd3bccfbd34d9a859838356931bba56c23 -2015-04-11 16:56 +0000 [674b18bdf0] George Joseph +2015-04-11 16:56 +0000 [674b18bdf0] gtjoseph * pjsip_options: Add qualify_timeout processing and eventing @@ -11159,15 +10869,6 @@ Tested-by: Dmitriy Serov Tested-by: George Joseph -2015-04-17 15:29 +0000 [f1abf51b73] Matt Jordan - - * Merge "res_pjsip: Refactor endpt_send_request to include transaction timeout" into 13 -2015-04-17 10:30 +0000 [ab5b38e434] Matt Jordan - - * 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 - - * Merge "res_pjsip_pubsub: On notify fail deleted sub_tree is then referenced" into 13 2015-04-16 10:51 +0000 [b56c1914fa] Kevin Harwell * bridge.c: NULL app causes crash during attended transfer @@ -11196,7 +10897,7 @@ ASTERISK-24970 #close Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf -2015-04-11 16:39 +0000 [bf46799f0e] George Joseph +2015-04-11 16:39 +0000 [bf46799f0e] gtjoseph * res_pjsip: Refactor endpt_send_request to include transaction timeout @@ -11234,7 +10935,7 @@ Tested-by: George Joseph Change-Id: I0778dc730d9689c5147a444a04aee3c1026bf747 -2015-04-11 17:04 +0000 [1b6f6ff841] George Joseph +2015-04-11 17:04 +0000 [1b6f6ff841] gtjoseph * res_pjsip: Add global option to limit the maximum time for initial qualifies @@ -11261,7 +10962,7 @@ Change-Id: Ib80498aa1ea9923277bef51d6a9015c9c79740f4 Tested-by: George Joseph -2015-04-15 16:08 +0000 [5d218cde87] George Joseph +2015-04-15 16:08 +0000 [5d218cde87] gtjoseph * More .gitignore updates @@ -11270,9 +10971,6 @@ Change-Id: I7dfc4f554d54d22947b38140d3305007503cc16a Tested-by: George Joseph -2015-04-15 13:36 +0000 [97f83c4c53] Matt Jordan - - * Merge "Build System: Replace comment about setting menuselect defaults." into 13 2015-04-14 13:16 +0000 [abd56db3e0] Rodrigo Ramírez Norambuena * cel_pgsql: Fix name string for log on unable allocate memory. @@ -11312,7 +11010,7 @@ Change-Id: I584f0936bb01001336a468a55c1d05d79fe795d5 (cherry picked from commit 23a180cade51e84b9def65b05759c3cb9feba225) -2015-04-13 19:06 +0000 [7d43d85bea] George Joseph +2015-04-13 19:06 +0000 [7d43d85bea] gtjoseph * .gitignore updates for master/13 @@ -11331,12 +11029,6 @@ Change-Id: I60e5fa58c9a5b248bde23aaada79ff663f87a2a1 -2015-04-13 12:03 +0000 [30045b4e67] Matt Jordan - - * Merge "build_tools/make_version: Update version parsing for Git migration" into 13 -2015-04-13 10:47 +0000 [88dbf6653e] Joshua Colp - - * Merge "res_monitor: Add dependency on func_periodic_hook." into 13 2015-04-13 09:54 +0000 [e996d8f728] Matt Jordan * build_tools/make_version: Update version parsing for Git migration @@ -11405,9 +11097,6 @@ Change-Id: I8fcf2a5e7b481893e17484ecde4f172c9ffb5679 -2015-04-12 15:27 +0000 [91c1ed7ef6] Matt Jordan - - * Merge "main/editline: Add .gitignore." into 13 2015-04-12 06:12 +0000 [a77c31b99c] Corey Farrell * main/editline: Add .gitignore. @@ -11426,7 +11115,7 @@ Change-Id: I1e42fbfa02a8884231507b683e8e49ac3e278aaa -2015-04-11 13:20 +0000 [555b5f5d30] George Joseph +2015-04-11 13:20 +0000 [555b5f5d30] gtjoseph * Add .gitignore and .gitreview files @@ -11442,7 +11131,7 @@ Change-Id: I4c8af3b8e3739957db545f7368ac53f38e99f696 Tested-by: George Joseph -2015-04-11 10:35 +0000 [5807ca519c] Matthew Jordan +2015-04-11 10:35 +0000 [5807ca519c] Matt Jordan * Blocked revisions 434708 @@ -11459,7 +11148,7 @@ 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) +2015-04-11 10:26 +0000 [d0d78d5732] Diederik de Groot (License 6600) * clang compiler warnings: Fix various warnings for tests @@ -11595,7 +11284,7 @@ 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 +2015-04-10 11:59 +0000 [16afee4651] gtjoseph * res_pjsip_config_wizard: Cleanup load unload @@ -11676,7 +11365,7 @@ 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 +2015-04-10 09:55 +0000 [c9791dba1f] Matt Jordan * res/ari: Fix model validation for ChannelHold event @@ -11716,7 +11405,7 @@ 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 +2015-04-09 17:35 +0000 [75c2c85962] gtjoseph * res_pjsip_phoneprov_provider: Fix reference leak on unload @@ -11749,7 +11438,7 @@ 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 +2015-04-09 17:31 +0000 [73c286a393] gtjoseph * loader/main: Don't set ast_fully_booted until deferred reloads are processed @@ -11825,7 +11514,7 @@ 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) +2015-04-09 07:56 +0000 [6ba6e3dffd] Diederik de Groot (License 6600) * clang compiler warnings: Fix autological comparisons @@ -11937,7 +11626,7 @@ 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) +2015-04-08 11:40 +0000 [f767440906] Maciej Szmigiero (license 6085) * Security/tcptls: MitM Attack potential from certificate with NULL byte in CN. @@ -11973,7 +11662,7 @@ 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 +2015-04-08 07:33 +0000 [ae39dd1f46] Matt Jordan * chan_iax2: Fix compilation issue due to funky merge @@ -12031,7 +11720,7 @@ 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) +2015-04-08 06:44 +0000 [f324870dab] Diederik de Groot (License 6600) * clang compiler warnings: Fix pointer-bool-converesion warnings @@ -12118,7 +11807,7 @@ 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 +2015-04-07 10:21 +0000 [ab803ec342] Matt Jordan * ARI: Add the ability to intercept hold and raise an event @@ -12142,7 +11831,7 @@ 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) +2015-04-06 21:09 +0000 [488f093e97] Diederik de Groot (License 6600) * clang compiler warnings: Fix sometimes-initialized warning in func_math @@ -12164,7 +11853,7 @@ 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) +2015-04-06 21:03 +0000 [c027133f6d] Diederik de Groot (License 6600) * clang compiler warnings: Fix non-literal-null-conversion warnings @@ -12201,7 +11890,7 @@ 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 +2015-04-06 14:02 +0000 [95de71f247] gtjoseph * build: Fixes for gcc 5 compilation @@ -12229,7 +11918,7 @@ 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) +2015-04-06 13:18 +0000 [d54ccda3b1] Diederik de Groot (License 6600) * clang compiler warnings: Remove large chunks of unused code from extconf @@ -12253,7 +11942,7 @@ 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) +2015-04-06 13:03 +0000 [0ecd472e4f] Diederik de Groot (License 6600) * clang compiler warnings: Fix sometimes-uninitialized warning in pbx_config @@ -12274,7 +11963,7 @@ 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) +2015-04-06 12:52 +0000 [4e7be5b2dc] Diederik de Groot (License 6600) * clang compiler warnings: Fix format specified in framehook @@ -12509,7 +12198,7 @@ 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) +2015-03-29 21:44 +0000 [5f8faf16af] Diederik de Groot (License 6600) * clang compiler warnings: Fix -Wabsolute-value warnings @@ -12530,7 +12219,7 @@ 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) +2015-03-29 21:39 +0000 [09b681e344] Diederik de Groot (License 6600) * clang compiler warnings: Fix invalid enum conversion @@ -12556,7 +12245,7 @@ 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 +2015-03-29 21:29 +0000 [7f33abb827] Matt Jordan * main/stdtime/localtime: Fix warning introduced in r433720 @@ -12583,7 +12272,7 @@ 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) +2015-03-29 20:56 +0000 [47eeb67e14] Diederik de Groot (License 6600) * clang compiler warnings: Ignore -Wunused-command-line-argument @@ -12605,7 +12294,7 @@ 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) +2015-03-29 20:52 +0000 [dbb4d6f9e7] Diederik de Groot (License 6600) * clang compiler warnings: Fix warning for -Wgnu-variable-sized-type-not-at-end @@ -12628,7 +12317,7 @@ 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) +2015-03-28 07:56 +0000 [e126ab9eeb] Diederik de Groot (License 6600) * clang compiler warnings: Fix a variety of "unused" warnings @@ -12660,7 +12349,7 @@ 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) +2015-03-28 07:48 +0000 [2f6534527d] Diederik de Groot (License 6600) * clang compiler warnings: Fix -Wself-assign @@ -12682,7 +12371,7 @@ 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) +2015-03-28 07:40 +0000 [eb70993a50] Diederik de Groot (License 6600) * clang compiler warnings: Fix -Wparantheses-equality warnings @@ -12704,7 +12393,7 @@ 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) +2015-03-28 07:31 +0000 [c0ff16036a] Diederik de Groot (License 6600) * clang compiler warnings: Fix -Wbitfield-constant-conversion warning @@ -12726,7 +12415,7 @@ 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) +2015-03-28 07:27 +0000 [844bc76bef] Diederik de Groot (License 6600) * clang compiler warnings: Fix -Winitializer-overrides @@ -12749,7 +12438,7 @@ 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) +2015-03-28 07:19 +0000 [5e204042d9] Diederik de Groot (License 6600) * clang compiler warnings: Fix -Wunused-function; make inline function static @@ -12856,7 +12545,7 @@ 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) +2015-03-27 09:41 +0000 [6e6f5b3a1f] Justin T. Gibbs (License 6692) * res/res_timing_kqueue: Update the module to conform to current timer API @@ -13104,1456 +12793,9242 @@ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433338 65c4cc65-6c06-0410-ace0-fbb531ad65f3 -2015-03-23 Asterisk Development Team +2015-03-22 18:58 +0000 [a3fe43fbdc] snuffy (License 5024) - * Asterisk 13.3.0-rc1 Released. + * Fix compilations errors on 64-bit OpenBSD systems -2015-03-22 23:58 +0000 [r433247-433269] Matthew Jordan + In versiong 5.5, OpenBSD went to 64-bit time values. This requires a cast to + (long) when printing members of certain time structs. - * 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 + Review: https://reviewboard.asterisk.org/r/4507 - * 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 - 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 + ASTERISK-24879 #close + Reported by: snuffy + Tested by: snuffy + patches: + openbsd-time64.diff uploaded by snuffy (License 5024) + ........ -2015-03-20 19:52 +0000 [r433199-433222] Richard Mudgett - - * 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 - - * 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 + Merged revisions 433268 from http://svn.asterisk.org/svn/asterisk/branches/11 -2015-03-19 10:20 +0000 [r433113-433126] Corey Farrell - * 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433269 65c4cc65-6c06-0410-ace0-fbb531ad65f3 - * 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-22 18:04 +0000 [08a88aab15] snuffy (License 5024) -2015-03-18 02:34 +0000 [r433088] Richard Mudgett - - * 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 - - * 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 - - * 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 + * Fix compilation issues for OpenBSD -2015-03-17 18:34 +0000 [r433028-433031] Kevin Harwell + This patch addresses compilation issues for OpenBSD. Specifically, it + addresses: + * It allows including in asterisk.c + * Provides a needed (size_t) cast in xmldoc.c - * 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 + In 13+, it also addresses a conditional inclusion in loader.c. - * 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 - - * res/res_pjsip.c: res_pjsip: Add reason comment. - -2015-03-14 02:28 +0000 [r432971] Matthew Jordan - - * /, 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 + Review: https://reviewboard.asterisk.org/r/4506 -2015-03-14 02:00 +0000 [r432945-432949] Joshua Colp + ASTERISK-24880 #close + Reported by: snuffy + Tested by: snuffy + patches: + misc-openbsd.diff uploaded by snuffy (License 5024) + ........ - * 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 + Merged revisions 433245 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433247 65c4cc65-6c06-0410-ace0-fbb531ad65f3 - * /, 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 +2015-03-20 14:52 +0000 [6ca98524bf] Richard Mudgett - * 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 + * Audit ast_pjsip_rdata_get_endpoint() usage for ref leaks. -2015-03-13 17:04 +0000 [r432892-432894] Richard Mudgett - - * 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 - - * 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 - - * /, 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 + 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. - * 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 + * 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(). -2015-03-11 16:38 +0000 [r432764-432787] Richard Mudgett + * Eliminated RAII_VAR() use with ast_pjsip_rdata_get_endpoint() in + res/res_pjsip_nat.c:nat_on_rx_message(). - * 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/ + * Fixed inconsistent but benign return value in + res/res_pjsip/pjsip_options.c:options_on_rx_request(). - * 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/ + Review: https://reviewboard.asterisk.org/r/4511/ - * 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433222 65c4cc65-6c06-0410-ace0-fbb531ad65f3 - * 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-20 13:23 +0000 [1c09028171] Richard Mudgett -2015-03-10 21:33 +0000 [r432693-432721] Matthew Jordan - - * 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 + * res_pjsip_sdp_rtp,sorcery: Fix invalid access and memory leak respectively. - * /, 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 + Valgrind found a memory leak and invalid access. -2015-03-10 16:04 +0000 [r432668] Richard Mudgett + * Fix invalid access by sscanf() being fed a non-nul terminated string of + digits in res/res_pjsip_sdp_rtp.c:get_codecs(). - * 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/ + * Fix memory leak in main/sorcery.c:sorcery_object_field_destructor(). -2015-03-09 16:12 +0000 [r432638] Kevin Harwell + * Fix potential NULL pointer dereference in + main/xmldoc.c:xmldoc_get_syntax_config_option(). - * 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/ + Review: https://reviewboard.asterisk.org/r/4513/ -2015-03-08 01:46 +0000 [r432614] Joshua Colp - * 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433199 65c4cc65-6c06-0410-ace0-fbb531ad65f3 -2015-03-06 22:50 +0000 [r432574-432594] Richard Mudgett +2015-03-19 14:19 +0000 [73dcea59bd] Matt Jordan - * 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. + * funcs/func_env: Fix regression caused in FILE read operation - * 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 - - * 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 - - * 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 + 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. - * /, 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 + 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. -2015-03-05 16:38 +0000 [r432485] George Joseph + ASTERISK-21765 + ........ - * 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 + Merged revisions 433173 from http://svn.asterisk.org/svn/asterisk/branches/11 -2015-03-04 18:52 +0000 [r432453] Matthew Jordan - * 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 - - * 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 - - * 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 - - * 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 - - * /, 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433174 65c4cc65-6c06-0410-ace0-fbb531ad65f3 -2015-02-26 04:58 +0000 [r432321-432342] Matthew Jordan +2015-03-19 05:20 +0000 [4c84dca2d8] Corey Farrell - * /, 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 + * logger: Apply default console logging when configuration cannot be loaded. - * /, 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 + When logger.conf is missing or invalid enable console logging and display + an error message. -2015-02-25 23:48 +0000 [r432301] Rusty Newton - - * 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 - - * /, 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 + ASTERISK-24817 #close + Reported by: Corey Farrell + Review: https://reviewboard.asterisk.org/r/4497/ + ........ - * /, 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 + Merged revisions 433122 from http://svn.asterisk.org/svn/asterisk/branches/11 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433126 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-19 04:53 +0000 [958bc84caf] Corey Farrell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433115 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-19 04:44 +0000 [7fddae99dd] Corey Farrell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433113 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 21:34 +0000 [dba0f1ad67] Richard Mudgett + + * res_pjsip_session: Fix off-nominal extra unref of session. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433088 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 17:15 +0000 [2c7b945149] Scott Griepentrog + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433064 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 16:57 +0000 [1fb1c81923] Scott Griepentrog + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433060 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 16:49 +0000 [2122c205e6] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433057 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 13:34 +0000 [94fe4a9178] Kevin Harwell + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433031 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 13:20 +0000 [1f428f25f0] Kevin Harwell + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433028 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 11:10 +0000 [522f063186] Richard Mudgett + + * res_pjsip: Add reason comment. + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433005 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 21:28 +0000 [5c03a5f2e7] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432971 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 21:00 +0000 [f7c6bedb06] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432949 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 20:36 +0000 [287a22435f] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432945 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 20:21 +0000 [37d33ed997] Di-Shi Sun (License 5076) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432938 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 19:18 +0000 [a4c27baf47] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432920 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 12:04 +0000 [a3292230b8] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432894 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 11:26 +0000 [34aa0214eb] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432892 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 09:48 +0000 [0497b7b155] Kevin Harwell + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432868 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-12 07:58 +0000 [b9fd61f2c7] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432811 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-12 07:39 +0000 [f5bc032567] Diederik de Groot (License 6600) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432808 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-11 11:38 +0000 [bd029688cd] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432787 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-11 10:24 +0000 [c24a294f0b] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432766 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-11 10:18 +0000 [737064bfa4] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432764 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-10 18:09 +0000 [bc357c1d7e] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432742 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-10 16:33 +0000 [afea98dc73] Javier Acosta (License 6690) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432721 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-10 13:13 +0000 [055001716c] Graham Barnett (License 6685) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432696 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-10 12:47 +0000 [92178247ee] Ed Hynan (Licnese 6680) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432693 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-10 11:04 +0000 [cae712d986] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432668 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-09 11:12 +0000 [110b99646c] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432638 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-07 19:46 +0000 [714cb27000] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432614 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-06 16:50 +0000 [e158517a9c] Richard Mudgett + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432594 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-06 16:12 +0000 [5d16d80b59] Richard Mudgett + + * res_pjsip_refer: Made refer_attended_alloc() not create the ao2 object with a lock. + + The lock is unused. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432574 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-06 15:11 +0000 [772793f18e] Jonathan Rose + + * app: Add functions to swap voicemail function table for testing purposes + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432556 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-06 14:18 +0000 [8cced7767c] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432534 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-06 13:31 +0000 [13e715b30c] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432528 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-05 10:38 +0000 [06fa8db864] gtjoseph + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432485 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-04 12:52 +0000 [999d96d405] Matt Jordan + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432453 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-02 13:14 +0000 [9cdadc168c] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432423 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-27 12:23 +0000 [9d85e855de] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432404 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-26 12:52 +0000 [c33c5183a5] Scott Griepentrog + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432385 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-26 11:07 +0000 [169058e73f] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432363 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-25 22:58 +0000 [de86b30dba] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432342 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-25 21:03 +0000 [34989bd9c8] Makoto Dei (License 5027) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432321 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-25 17:48 +0000 [53aec7a969] Rusty Newton + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432301 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-25 17:09 +0000 [474fec4f92] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432281 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-25 17:02 +0000 [ddff640f94] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432278 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-25 15:42 +0000 [dd8ac00f24] Olle Johansson (License 5267) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432258 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-25 14:44 +0000 [43a3e80be1] David M. Lee + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432237 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-24 16:14 +0000 [978649a568] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432199 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-24 15:58 +0000 [3d1a1533bf] Matt Jordan + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432195 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-24 12:32 +0000 [5b73246a9d] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432175 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-21 14:47 +0000 [f726304283] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432154 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-21 13:26 +0000 [7a507ae31a] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432136 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-21 12:51 +0000 [f0d018e249] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432118 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-21 11:35 +0000 [c40d78c31e] Graham Barnett (License 6685) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432099 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-21 08:05 +0000 [bf9d416536] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432079 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-20 20:56 +0000 [93c9c3af2f] Corey Farrell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432059 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-20 20:46 +0000 [54a699fb64] Corey Farrell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432055 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-20 11:51 +0000 [89b48af3e5] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432034 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-20 11:46 +0000 [8e806f9e12] Matt Hoskins (license 6688) + + * 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/ + + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432033 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-20 09:47 +0000 [c7bdf62a95] Graham Barnett (License 6685) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432013 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-19 15:25 +0000 [e0ff83c272] Richard Mudgett + + * chan_dahdi: Remove some dead code. + ........ + + Merged revisions 431992 from http://svn.asterisk.org/svn/asterisk/branches/11 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431993 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-19 12:25 +0000 [40547e7210] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431974 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-19 11:30 +0000 [2181c9443f] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431956 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-19 09:28 +0000 [374013d817] Alexander Traud (License 6520) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431937 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-18 20:01 +0000 [eb9448a1ae] Corey Farrell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431917 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-17 09:31 +0000 [6d3fcfc3c2] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431898 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-16 15:29 +0000 [562b7bf6f0] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431879 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-15 13:00 +0000 [7890d0ad07] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431860 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-15 11:59 +0000 [cbe63ab283] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431843 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-15 11:42 +0000 [c8f3074cc4] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431841 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-15 10:00 +0000 [a3044cbf02] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431824 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-15 06:39 +0000 [ce70587ba6] Matthias Urlichs (license 5508) + + * 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) + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431807 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-14 18:32 +0000 [4f4d03fdd1] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431789 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-14 13:45 +0000 [758a897876] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431771 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-14 12:30 +0000 [8c6e3ad3b4] Joshua Colp + + * res_pjsip_exten_state: Improve log message when a subscription is attempted to a non-existent extension. + + ASTERISK-24716 #close + Reported by: Rusty Newton + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431754 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-14 12:20 +0000 [3543a36362] Joshua Colp + + * 'information' ends with an 'n'. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431752 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-14 12:19 +0000 [5d26236758] Joshua Colp + + * chan_pjsip: Fix crash when CHANNEL dialplan function is invoked with pjsip argument and no type. + + ASTERISK-24771 #close + Reported by: Niklas Larsson + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431751 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-13 11:21 +0000 [4d797f17c5] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431734 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-12 14:32 +0000 [1995baad71] Matt Jordan + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431717 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-11 12:02 +0000 [e8ec15a9ef] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431698 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-11 11:36 +0000 [e64d151fae] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431693 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-11 11:28 +0000 [feddab7944] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431692 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-11 11:12 +0000 [29f3ff0b61] Richard Miller (License 5685) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431674 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-11 10:51 +0000 [72e5ba2ce8] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431670 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-11 09:51 +0000 [2531f75057] Corey Farrell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431663 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-10 17:16 +0000 [4d8ab20a8a] gtjoseph + + * 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/PJSIP/' + in whatever is specified for 'hint_context'. + + Specifying 'hint_application' in the wizard will create + 'exten => ,1,' + 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431643 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-08 21:10 +0000 [32e42e50cc] Ben Merrills (License 6678) + + * 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) + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431622 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-08 21:01 +0000 [03445a147e] Jeremiah Gowdy (License 6358) + + * Blocked revisions 431620 + + While it may not be obvious, r431620 should not occur in Asterisk 13. + * We no longer set the SIP_DEFER_BYE_ON_TRANSFER flag during the handling of + the INVITE with Replaces. This is now set and handled explicitly in the + attended transfer and blind transfer code. + * An INVITE with Replaces replacing a channel in a Bridge will now safely eject + the channel being replaced. No masquerade occurs. + * An INVITE with Replaces replacing a channel not in a Bridge will masquerade, + but will do so in such a fashion that we can ensure that we are hanging up + the channel when completed. + + Since the code the patch fixes no longer exists due to core framework changes, + we should send a BYE naturally without the need for the flag. + + ........ + channels/chan_sip: Ensure that a BYE is sent during INVITE w/Replaces transfer + + Consider a scenario where Alice and Bob have an established dialog with each + other external to Asterisk. Bob decides to perform an attended transfer of + Alice to Asterisk. In this case, Alice will send an INVITE with Replaces + to Asterisk, where the Replaces specifies Bob's dialog with Asterisk. In this + particular scenario, Asterisk will complete the transfer, but - since Bob's + channel has had Alice masqueraded into it and is now a Zombie - a BYE + request will not be sent. + + This patch fixes that issue by adding a new flag to chan_sip that tracks + whether or not we have an INVITE with Replaces. If we do, the flag is used + on the sip_pvt to ensure that a BYE request is sent, even if the channel has + been masqueraded away. + + Review: https://reviewboard.asterisk.org/r/4362/ + + ASTERISK-22436 #close + Reported by: Eelco Brolman + Tested by: Jeremiah Gowdy, Kristian Høgh + patches: + asterisk-11-hangup-replaced-3.diff uploaded by Jeremiah Gowdy (License 6358) + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431621 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-08 20:34 +0000 [8582411344] ibercom (License 6599) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431618 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-08 11:24 +0000 [675b2b8103] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431600 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-06 15:26 +0000 [323c0927ac] Scott Griepentrog + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431583 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-03 19:27 +0000 [18c8c1bae3] Joshua Colp + + * res_pjsip_keepalive: Don't crash if PJSIP module is not loaded. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431555 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-03 18:58 +0000 [2f2eb1931a] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431538 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-31 10:27 +0000 [f67402a52a] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431521 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-30 11:44 +0000 [05e2832b35] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431492 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-30 11:38 +0000 [6583b4de98] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431490 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-30 10:52 +0000 [112d23c73e] Ashley Sanders + + * 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/ + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431471 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-30 10:47 +0000 [43dd42d8ae] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431468 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-29 17:02 +0000 [f7d23dfcc6] Scott Griepentrog + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431450 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-29 14:58 +0000 [e8896ac008] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431426 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-29 14:44 +0000 [22fc3359da] Mark Michelson + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431424 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-29 13:52 +0000 [b8ea23b0d1] Mark Michelson + + * 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. + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431420 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-29 10:46 +0000 [6e5eb9af88] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431403 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-29 06:09 +0000 [e0461290d0] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431385 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-28 11:37 +0000 [8c068fc096] Mark Michelson + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431303 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-28 11:34 +0000 [25a67d561c] Mark Michelson + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431301 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-28 06:18 +0000 [c3add776af] Sean Bright + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431267 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 22:09 +0000 [88fbe4e917] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431243 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 16:56 +0000 [61822e78ae] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431219 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 13:21 +0000 [e2b493b8f0] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431194 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 13:08 +0000 [9e3d316dd1] Corey Farrell (license 5909) + + * 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) + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431179 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 11:36 +0000 [eda125f98d] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431160 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 11:32 +0000 [b64f4bb6ee] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431157 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 11:22 +0000 [a620b287bd] Jonathan Rose + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431153 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 11:20 +0000 [7f9b28b0c6] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431145 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 11:10 +0000 [1a17693789] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431134 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-27 05:47 +0000 [ceedd40370] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431114 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-26 08:49 +0000 [702d79de2a] David M. Lee + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431092 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-25 07:42 +0000 [1fc823c770] Matt Jordan + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431072 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-23 14:13 +0000 [e302116e40] Richard Mudgett + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431052 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-23 13:44 +0000 [f8b3fb6e2f] Richard Mudgett + + * app_confbridge: Whitespace + + Because there is sometimes no sence to any whitespace. + ........ + + Merged revisions 431049 from http://svn.asterisk.org/svn/asterisk/branches/11 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431050 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-23 11:08 +0000 [197265438e] David M. Lee + + * Add depend on pjproject to res_pjsip_config_wizard.c + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431030 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-23 09:12 +0000 [630eea087d] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430999 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-23 09:03 +0000 [e23f07beb8] Walter Doekes + + * Fix typo's (retrieve, specified, address). + ........ + + Merged revisions 430996 from http://svn.asterisk.org/svn/asterisk/branches/11 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430998 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-23 08:38 +0000 [9210648bbe] HZMI8gkCvPpom0tM (License 6658) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430994 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-22 13:24 +0000 [355eb9d22f] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430975 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-22 13:13 +0000 [c73b4b2a46] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430957 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-22 12:09 +0000 [bdfdb01bcf] Scott Griepentrog + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430939 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-22 08:23 +0000 [beb20440e0] Gareth Palmer (License 5169) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430921 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-21 15:53 +0000 [5e10007dbd] Richard Mudgett + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430902 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-21 07:33 +0000 [74a13629e2] Matt Jordan + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430864 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-21 07:27 +0000 [452f0eeb57] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430862 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-21 07:10 +0000 [894d4d781c] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430842 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-21 06:56 +0000 [98c3983c89] Matt Jordan + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430840 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-20 10:51 +0000 [a7ba8a58a8] Ashley Sanders + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430818 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-20 10:46 +0000 [6af6a216a1] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430817 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-19 20:39 +0000 [072db5e1b9] Ben Klang (License 5876) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430799 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-19 20:32 +0000 [e659b3e53d] LEI FU (License 6640) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430796 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-19 12:05 +0000 [ab5af1f3d8] Mark Michelson + + * 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) + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430776 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-19 07:18 +0000 [643b81d98e] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430755 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-16 18:31 +0000 [34c220203f] Kevin Harwell + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430734 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-16 16:13 +0000 [e257244bbb] Mark Michelson + + * Change PJProject version requirement for ca_list_path transport option in CHANGES file. + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430716 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-16 16:12 +0000 [821c15ae53] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430714 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-16 11:45 +0000 [8bc4a89e1f] cloos (License #5956) + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430709 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-15 11:35 +0000 [fa80d9658d] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430687 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-15 11:18 +0000 [6c426e86bd] Richard Mudgett + + * res_fax.c, res_fax_spandsp.c: Fix some curlies on the end of function definitions. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430685 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-15 06:09 +0000 [c95391f23c] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430664 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-14 20:18 +0000 [f6630e2481] abelbeck (License 5903) + + * 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) + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430646 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-14 17:14 +0000 [77a036bf3f] Corey Farrell (license 5909) + + * 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) + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430628 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-14 14:27 +0000 [e370c9e68e] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430608 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-14 09:39 +0000 [89a431df84] Diederik de Groot (License 6600) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430590 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-13 12:16 +0000 [1f94b96749] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430565 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-13 06:06 +0000 [056f11ac65] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430546 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-12 12:34 +0000 [368ecf13bf] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430528 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-12 12:28 +0000 [7d606d87bf] Niklas Larsson (License 5068) + + * 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) + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430526 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-12 12:01 +0000 [4e2be8fb8f] Michael L. Young (license 5026) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430507 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-12 09:18 +0000 [dc993db55c] Kristian Hogh (License 6639) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430488 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-09 16:08 +0000 [4791d629d1] Scott Griepentrog + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430469 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-09 15:44 +0000 [2b0d522dbb] Scott Griepentrog + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430467 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-09 11:54 +0000 [4b363688d4] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430434 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-09 08:51 +0000 [eb9ce791d8] Kinsey Moore + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430416 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-08 15:40 +0000 [b937438c17] gtjoseph + + * 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/ + + + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430397 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-08 15:37 +0000 [143bec54ee] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430395 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-08 11:48 +0000 [6e59bf6491] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430373 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-07 15:25 +0000 [8f3c60cee7] Kinsey Moore + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430355 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-07 12:53 +0000 [42b342c6e2] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430337 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-07 12:17 +0000 [a10d2966b6] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430319 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-07 12:14 +0000 [13ed8f73ed] gtjoseph + + * 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/ + + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430317 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-07 11:51 +0000 [42e4cb7174] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430315 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-07 11:35 +0000 [9ea8dd036f] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430313 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-07 10:55 +0000 [75cd302b0a] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430295 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-06 20:52 +0000 [e17a1a8ba1] Kinsey Moore + + * Fix dev-mode build on recent gcc + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430274 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-06 16:46 +0000 [dd42e92e7a] Matt Jordan + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430252 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-06 11:52 +0000 [4becfae3b1] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430227 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-06 11:46 +0000 [9d457fe5c2] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430225 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-06 11:35 +0000 [0fa6c34dc6] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430223 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-06 11:28 +0000 [d873b09075] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430221 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-05 16:49 +0000 [566907fabd] Scott Griepentrog + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430200 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-05 11:56 +0000 [b9a7875dd6] Joshua Colp + + * pjsip: Document addition of 'PJSIP_AOR' and 'PJSIP_CONTACT' in CHANGES file. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430181 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-01-05 11:51 +0000 [a7c38428af] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430179 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-29 07:10 +0000 [cca262e7d3] Kinsey Moore + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430145 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-24 15:27 +0000 [1a0979d437] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430127 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-24 09:26 +0000 [b521c612fc] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430092 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-24 07:25 +0000 [915bb88d3e] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430084 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-24 07:20 +0000 [006ffdcfb2] Matt Jordan + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430083 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-23 17:18 +0000 [d1c532034b] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430064 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-23 17:15 +0000 [0a3dd7589e] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430059 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-22 15:18 +0000 [7a356232bd] Richard Mudgett + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430034 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-22 13:44 +0000 [fca0be57d9] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430010 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-22 09:40 +0000 [9735a13429] Karsten Wemheuer (License 5930) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429983 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-21 18:17 +0000 [fc79cf6428] gtjoseph + + * 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/ + + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429914 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-20 14:57 +0000 [f88460115f] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429894 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-19 14:54 +0000 [4b054bdc6d] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429868 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-19 11:31 +0000 [7074bf956b] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429829 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-19 11:26 +0000 [6a99df47c0] Scott Griepentrog + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429827 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-18 16:38 +0000 [b22c833c12] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429805 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-18 14:03 +0000 [e603fbe04a] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429784 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-18 09:50 +0000 [4fad85f9bf] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429763 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-18 09:34 +0000 [14d2f8f20f] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429761 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-18 09:05 +0000 [c1582929f9] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429741 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-18 08:43 +0000 [5bd5f580c1] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429739 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-17 18:10 +0000 [b4621cd0f5] gtjoseph + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429719 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-17 17:05 +0000 [105f224cfd] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429699 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-17 03:54 +0000 [9ae57e0dd6] Walter Doekes + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429675 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-16 11:53 +0000 [a3534b7c05] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429653 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-16 10:38 +0000 [f26d4618eb] Andreas Steinmetz (license 6523) + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429633 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-16 09:43 +0000 [ad85e54fd9] Joshua Colp + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429612 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-15 11:07 +0000 [89617370ec] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429592 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-15 09:36 +0000 [b85f79c0c1] Mark Michelson + + * 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 + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429571 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 17:54 +0000 [2b8c441096] gtjoseph + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429542 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 17:40 +0000 [8f12ded887] Richard Mudgett + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429540 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 16:53 +0000 [8c019b1a6b] Matt Jordan + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429519 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 16:49 +0000 [7ff0d266a6] Matt Jordan + + * Add 11 merge properties + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429518 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 10:57 +0000 [439e6e1c5d] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429497 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 09:30 +0000 [01c4e76c4e] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429477 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 09:00 +0000 [49386cf568] David M. Lee + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429457 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 08:12 +0000 [3b0c40f337] Kinsey Moore + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429433 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 08:03 +0000 [15af40180a] Kinsey Moore + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429430 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 07:05 +0000 [0c9fbb449f] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429409 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-12 06:31 +0000 [61fe4f10d2] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429407 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-11 14:31 +0000 [8237bd357d] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429387 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-11 11:21 +0000 [2288f910ea] Kinsey Moore + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429379 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-11 07:56 +0000 [b7f7d045ac] Kinsey Moore + + * 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. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429355 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-11 07:49 +0000 [50f6517296] Kinsey Moore + + * Stasis: Update unittest for channel snapshots + + This adjusts the unit test for channel snapshots to take the new + language key into account. + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429352 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-10 09:42 +0000 [d4a05879d6] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429326 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-10 07:34 +0000 [fb768ec33a] Joshua Colp + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429273 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-10 07:14 +0000 [a220a08777] Kinsey Moore + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429246 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-09 14:46 +0000 [22a91bf698] Scott Griepentrog + + * 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/ + + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429223 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-09 14:19 +0000 [2f21f85c37] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429206 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-09 14:02 +0000 [525c823b4b] Kevin Harwell + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429196 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-09 12:35 +0000 [664067e318] Kevin Harwell + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429175 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-09 09:44 +0000 [74b032bb03] Joshua Colp + + * 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/ + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429153 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2014-12-09 08:00 +0000 [64581d894d] Kinsey Moore + + * 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 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429128 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2016-02-11 18:31 +0000 Asterisk Development Team + + * asterisk certified/13.1-cert4 Released. + +2016-02-11 12:31 +0000 [7df413fbb3] Kevin Harwell + + * Release summaries: Remove previous versions + +2016-02-11 12:31 +0000 [1423445b23] Kevin Harwell + + * .version: Update for certified/13.1-cert4 + +2016-02-11 12:31 +0000 [9a8b627f26] Kevin Harwell + + * .lastclean: Update for certified/13.1-cert4 + +2016-02-11 12:31 +0000 [d424452711] Kevin Harwell + + * realtime: Add database scripts for certified/13.1-cert4 + +2016-02-04 16:17 +0000 [59ccc89054] Mark Michelson + + * 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-04 11:39 +0000 [bffd954a63] Mark Michelson + + * 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-25 15:48 +0000 [0eb43ea9ee] Richard Mudgett + + * app_confbridge: Make non-admin users join a muted conference muted. + + ASTERISK-20987 #close + Reported by: hristo + + Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38 + +2016-02-03 22:14 +0000 Asterisk Development Team + + * asterisk certified/13.1-cert3 Released. + +2016-02-03 16:05 +0000 [2142c74a02] Kevin Harwell + + * .version: Update for certified/13.1-cert3 + +2016-02-03 16:04 +0000 [07c95d33bd] Kevin Harwell + + * .lastclean: Update for certified/13.1-cert3 + +2016-02-03 16:04 +0000 [ce314be09d] Kevin Harwell + + * realtime: Add database scripts for certified/13.1-cert3 + +2016-02-03 12:05 +0000 [b50d584022] Joshua Colp + + * 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: I8635470e722ce6d47951a5045ae9ef348271d395 +2015-12-07 12:46 +0000 [4fe2aa9a20] Richard Mudgett + + * 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 +2015-09-28 17:07 +0000 [c7ab026196] Richard Mudgett + + * 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-01-25 09:35 +0000 [7d581b32e9] Joshua Colp + + * 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 + (cherry picked from commit f22074e5d9ed1882be976299311b8e093d25e1da) + +2016-01-25 16:51 +0000 [22eb1b48c0] Mark Michelson + + * 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 + (cherry picked from commit b073244c511f9634de57ea401ab9dbebcf2390e8) + +2016-01-19 18:20 +0000 [826ff1d7a3] Richard Mudgett + + * 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-14 14:42 +0000 [6e18a60a47] Kevin Harwell + + * 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-12-28 14:02 +0000 [f63fb0e337] Joshua Colp + + * 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 + (cherry picked from commit c8499b8d5adc805efadb91b483d9d987f62891ff) + +2016-01-12 11:14 +0000 [def98bb996] Joshua Colp + + * 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-08 15:22 +0000 [bb29802615] Kevin Harwell + + * 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-07 15:37 +0000 [ca869878b4] Mark Michelson + + * 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 + +2015-12-10 11:44 +0000 [4e5aec3f0a] Jonathan Rose + + * 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-06-26 10:36 +0000 [4d10ed67d0] Richard Mudgett + + * 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 + (cherry picked from commit 8ea214aed782424a884b9a2f67d6dca270854e83) + +2015-12-01 16:11 +0000 [1ec791a3ba] Jonathan Rose + + * 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 16:42 +0000 [a164f2ce7f] Richard Mudgett + + * 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 [a24db35ae3] Richard Mudgett + + * 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 [bea904e001] Richard Mudgett + + * 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-11-23 14:27 +0000 [f5a6060707] Richard Mudgett + + * 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-05-05 18:17 +0000 [de43ae38b4] Richard Mudgett + + * 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 + (cherry picked from commit be1260a35f88faea4fa029d59343b124d250a8a6) + +2015-11-16 04:29 +0000 [457d8dc124] Alec Davis + + * 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-13 14:03 +0000 [c4751171a0] Mark Michelson + + * 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-13 14:19 +0000 [c0a7df1021] Mark Michelson + + * 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-12 11:17 +0000 [2fc3267677] Mark Michelson + + * 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 04:16 +0000 [d760c21038] Steve Davies + + * 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 + (cherry picked from commit 07583c288828a496cd7730b55112128fea31eaef) + +2015-11-11 17:11 +0000 [287cab1a53] Mark Michelson + + * 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-11 11:04 +0000 [d073cb4b6d] Joshua Colp + + * 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-03 16:19 +0000 [b9713354dc] Jonathan Rose + + * 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-06-23 11:21 +0000 [ac9432fdb6] Joshua Colp + + * 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 + (cherry picked from commit 3b2b004d699b8cc7b808f62536bb2bc4db8b4e0e) + +2015-11-04 14:31 +0000 [385e26efe2] Matt Jordan + + * 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-11-02 17:19 +0000 [62799fe778] Mark Michelson + + * 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-10-23 16:53 +0000 [6eda60936a] Kevin Harwell + + * alembic: Bad down revision in add_default_from_user script + + The down revision wasn't set correct in the add_default_from_user script. + This patch points it to the correct revision. + + Change-Id: Ied45786db265a1d4fb350ef0dd33b4d043c9a74d + +2015-10-21 12:35 +0000 [c425e26595] Kevin Harwell + + * 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 [b95101aab0] Mark Michelson + + * 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 [dd4d4e40e5] Mark Michelson + + * 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 [bda0a24206] Mark Michelson + + * 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 [7a22fc27fb] Mark Michelson + + * 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 [7fc9a998b1] Mark Michelson + + * 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 [7a47ab77c1] Mark Michelson + + * 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 [8def38f6a2] Mark Michelson + + * 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-04-20 14:30 +0000 [16afb39aec] Mark Michelson + + * 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-10-19 15:27 +0000 [78e4783572] Richard Mudgett + + * Add missing failure checks to ast_str_set_va() callers. + + Change-Id: I0c2cdcd53727bdc6634095c61294807255bd278f + +2015-10-21 11:44 +0000 [43323995ba] Joshua Colp + + * 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-03-26 17:19 +0000 [cdd2d5b484] Corey Farrell + + * 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 + + Change-Id: I6a67336050dea74327d79cdd6f7c7ea34d0b473e + git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433497 + +2015-10-19 19:59 +0000 [b5cfcfc427] Matt Jordan + + * 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 + (cherry picked from commit 9fc9777fa34753fb38991d42d8dbed516e907ca2) + +2015-06-05 15:37 +0000 [813b743baa] Richard Mudgett + + * 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. + + This is a cherry-pick from v13. + + ASTERISK-25183 #close + Reported by: Matt Jordan + + Change-Id: I8bad0ae1daf18d75b8c9e55874244b7962df2d0a + +2015-10-02 17:05 +0000 [78ab76b46c] Richard Mudgett + + * 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 + + **** ASTERISK-24975 Change-Id: I3ef7428ee402816d9fcefa1b3b95830c00d5c402 + + Cherry-pick from v13 with additional definitions of + AST_THREADSTORAGE_RAW(), ast_threadstorage_get_ptr() and + ast_threadstorage_set_ptr() from + commit d01706ce1ee518118456d5673f529204bdac73bb. + + Change-Id: I3222102d005f76744561b95a3b97700d82a5ee58 + +2015-10-12 11:21 +0000 [47a9452780] Richard Mudgett + + * config.c: Fix off-nominal memory leak. + + Change-Id: I06e346e9a5c63cc5071e7eda537310c4b43bffe0 + +2015-10-12 11:20 +0000 [728a2b7013] Richard Mudgett + + * 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 [6c11fa2277] Richard Mudgett + + * 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 20:43 +0000 [0fe83cad51] Matt Jordan + + * 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-05 16:53 +0000 [c4f63952fc] Richard Mudgett + + * 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 [d61da57428] Matt Jordan + + * 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-09-30 17:28 +0000 [5d12653d2a] Richard Mudgett + + * 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 [b35b9a9e32] Richard Mudgett + + * 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 [9ec52447bd] Richard Mudgett + + * 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 [110927bacc] Richard Mudgett + + * res_sorcery_memory_cache.c: Misc tweaks. + + Change-Id: I8cd32dffbb4f33bb0c39518d6e4c991e73573160 + +2015-09-30 17:27 +0000 [14ac763ab3] Richard Mudgett + + * res_sorcery_memory_cache.c: Made use OBJ_SEARCH_MASK. + + Change-Id: Ibca6574dc3c213b29cc93486e01ccd51f5caa46c + +2015-04-09 10:42 +0000 [39fe210fd9] 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) + + Change-Id: Iefc901a7c5c88d9d4b853188f85092d9eb7b6ada + +2015-09-24 14:56 +0000 [00be2f6b4f] Richard Mudgett + + * 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 [bd43638622] Richard Mudgett + + * 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 [f5a935f9d1] Richard Mudgett + + * 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 [91f754cb89] Richard Mudgett + + * 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 [9792b21720] Richard Mudgett + + * 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-24 14:49 +0000 [7a4581a41b] Mark Michelson + + * 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 [86eee104be] Richard Mudgett + + * 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-06-18 13:16 +0000 [deccd2ef3c] Mark Michelson + + * 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-09-21 18:06 +0000 [43e6804b0c] Kevin Harwell + + * 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 [ca401c6842] Joshua Colp + + * 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-16 17:36 +0000 [20702e0cf2] Mark Michelson + + * 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-09-10 17:19 +0000 [3ef74244a4] Mark Michelson + + * 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-09-10 09:49 +0000 [8826e6c416] Mark Michelson + + * 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-04-23 09:16 +0000 [943d5c0c99] gtjoseph + + * 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 + (cherry picked from commit 75666ad7c608ad9968a216a8f0a5832bf85b785c) + +2015-09-03 14:07 +0000 [7b5bcbeebe] Jonathan Rose + + * 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-08-29 10:36 +0000 [0901a82adb] Joshua Colp + + * 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 + (cherry picked from commit a676ba2aad5525926ae31b8317b95ae52cbbabbb) + +2015-09-04 14:40 +0000 [500856b4f0] Mark Michelson + + * 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-05-13 15:41 +0000 [42c40b59b6] Jonathan Rose + + * 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 + (cherry picked from commit 02c513058905dae19f28393ea840a47ae4a9e66d) + +2015-09-02 17:26 +0000 [a1e1d8e815] Mark Michelson + + * 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 [9f5e1c0e56] Joshua Colp + + * 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-07-02 14:51 +0000 [1c89230e2a] Richard Mudgett + + * 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-09-01 09:05 +0000 [2f2c35e91d] Mark Michelson + + * 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 [88ee3b3ef2] Mark Michelson + + * 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-28 20:22 +0000 [8842637d8f] Joshua Colp + + * 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 [06d42fede3] Joshua Colp + + * 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-07-23 13:11 +0000 [74d6ae20cb] Mark Michelson + + * 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-08-26 05:40 +0000 [54a09e4cb5] Joshua Colp + + * 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 [942d0ba96f] Joshua Colp + + * 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 06:21 +0000 [ad4e895928] Joshua Colp + + * 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-24 11:04 +0000 [4083e543fd] Joshua Colp + + * 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-04-16 13:20 +0000 [0b04269e73] Scott Griepentrog + + * 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 + (cherry picked from commit 8d4ce7cc2b87317005588e700b278a8cca7005c8) + +2015-08-14 15:46 +0000 [f049ad951b] Mark Michelson + + * 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:22 +0000 [fb347a4ded] Richard Mudgett + + * 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 [a5049df640] Kevin Harwell + + * 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 [7089472637] Joshua Colp + + * 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 [128d2348e6] Joshua Colp + + * 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 [6b219a866c] Richard Mudgett + + * 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 [fc4455216a] Richard Mudgett + + * 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 [739fca6084] Richard Mudgett + + * 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-06 12:48 +0000 [bfb15bea06] Mark Michelson + + * 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 [9e93ad109b] Joshua Colp + + * 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-02-13 11:21 +0000 [f6dcbd9707] Richard Mudgett + + * 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/ + + Change-Id: Ib05700c3a13ceac53b17d66099ef0d296a5e1863 + +2015-01-16 16:12 +0000 [4350fd22c8] Mark Michelson + + * 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 + + Change-Id: I76e440e08e603c1eea40a14951e7b171c0472a55 + +2015-07-18 11:16 +0000 [fae081ad5b] Joshua Colp + + * 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-09 14:17 +0000 [d66abb6746] Mark Michelson + + * 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: I683bdc206c8c7def586ecaa64dcf2b86550be3bf + +2015-07-16 09:46 +0000 [1b744ab684] Joshua Colp + + * 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-15 15:40 +0000 [147b86a8d1] Richard Mudgett + + * 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:36 +0000 [131f6ef8f5] Richard Mudgett + + * 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-09 09:18 +0000 [23b7b109c2] Joshua Colp + + * 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-26 07:44 +0000 [0fcc530dc7] Joshua Colp + + * 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: Id2a9e5f271c466686e6d0def461fa50c8b2cae53 + +2015-07-08 14:39 +0000 [c8d53f2372] Mark Michelson + + * res_sorcery_memory_cache: Remove ASTERISK_REGISTER_FILE() macro. + + This was part of the backport of res_sorcery_memory_cache from master + but will not compile in 13. + + Change-Id: I27b3d833acda9dd1770fdbe594964197b93779b0 + +2015-07-06 09:24 +0000 [a72cf6ce81] Joshua Colp + + * res_sorcery_memory_cache: Execute stale unit test last. + + In Jenkins there is currently a sporadic test failure of a + variable number of sorcery memory cache unit tests. I have not + been able to reproduce this on the build agents themselves or + on my development machine. + + My working theory is that the stale unit test is causing a + sorcery instance to persist longer than expected, causing subsequent + tests to fail when setting up and initializing the next + sorcery instance. + + To see if this is the case this change moves the stale unit test + to execute last so no subsequent unit tests can have issues + initializing their sorcery instance. + + Change-Id: Ifd6550a949613be774b75fa5db12c02110f82c4a + +2015-06-17 07:00 +0000 [e0cd8216bb] Joshua Colp + + * res_sorcery_memory_cache: Remove 'prefetch' option. + + To prevent confusion I am removing the prefetch option until such + time as it is implemented. All other functionality, however, has + been implemented. + + ASTERISK-25067 + + Change-Id: I9ce6aa3e5c6c5bc3c5baa8ff90fa036d73939895 + +2015-06-02 10:20 +0000 [8b2bad7740] Joshua Colp + + * test_sorcery_memory_cache_thrash: Add unit tests for thrashing the memory cache. + + This change adds a CLI command which can perform memory cache thrashing as well + as unit tests which perform thrashing under the following configurations: + + 1. Low number of unique objects that go stale after 1 second + 2. Low number of unique objects that expire after 1 second + 3. Low number of unique objects which are constantly updated + 4. Large number of unique objects which exceed a defined cache size + 5. Large number of unique objects which exceed a defined cache size + that also expire and go stale rapidly + 6. Large number of unique objects which expire and go stale rapidly + 7. Large number of unique objects + + For all of the above there are a large number of threads constantly + attempting to retrieve random objects and each test runs for a few + seconds. + + ASTERISK-25067 + Reported by: Matt Jordan + + Change-Id: I8c8ceff977332c80ed4a31f10d694d48552b2f78 + +2015-06-04 13:11 +0000 [8575c4f18d] Joshua Colp + + * res_sorcery_memory_cache: Implement expire_on_reload option. + + This change implements the expire_on_reload option for memory caches. + If enabled and a reload is performed all objects within the cache + will be expired and the cache emptied. + + ASTERISK-25067 + Reported by: Matt Jordan + + Change-Id: Id46aa1957d660556700e689e195eed57c989b85e + +2015-06-04 05:33 +0000 [da52527136] Joshua Colp + + * res_sorcery_memory_cache: Add test event when a refresh occurs. + + This change adds a testsuite event for when a refresh occurs. + This is useful as it provides a guaranteed mechanism of knowing when + it has occurred instead of waiting an arbitrary amount of time. + + ASTERISK-25067 + Reported by: Matt Jordan + + Change-Id: Iaa6b8d2d6bab7f99ee08e1c8908b8272a8987e65 + +2015-05-26 07:34 +0000 [f596b4a85c] Joshua Colp + + * res_sorcery_memory_cache: Add CLI commands and AMI actions. + + This change adds the following CLI commands and AMI actions: + + sorcery memory cache show + sorcery memory cache dump + sorcery memory cache expire + sorcery memory cache stale + + SorceryMemoryCacheExpire + SorceryMemoryCacheExpireObject + SorceryMemoryCacheStale + SorceryMemoryCacheStaleObject + + These allow both examination and manipulation of sorcery memory + caches from external sources. + + Cached objects can be explicitly expired from a cache or marked + as stale. If expired they are immediately removed. If marked as + stale they will be background refreshed when next retrieved. + + ASTERISK-25067 + Reported by Matt Jordan + + Change-Id: I68e03cfd8c34b5e07f4b6ee4fd93a3f4a00a3d9e + +2015-05-26 13:01 +0000 [9c2de310be] Mark Michelson + + * res_sorcery_memory_cache: Add support for refreshing stale objects. + + This change introduces a check of object_lifetime_stale when retrieving + cached objects. If the amount of time the object has been in the cache + exceeds the lifetime, then a task is scheduled to update the cached + object based on an object retrieved from other sorcery wizards instead. + + To prevent the cached object from being retrieved during a refresh, + thread-local storage is used to mark the thread as being a stale object + update. This results in the cache returning no object, leading to + sorcery querying other wizards for the object instead. + + A test has been added for stale objects as well. This test ensures that + stale objects are retrieved the same as freshly-cached objects. The test + also ensures that after an object is stale, changes in the backend are + reflected in the cache, to include if the object has been deleted from + the backend. + + ASTERISK-25067 + Reported by Matt Jordan + + Change-Id: I9bd7c049adf6939bfe2899f393c2bfbbf412d217 + +2015-05-20 17:35 +0000 [9a7fccc50c] Joshua Colp + + * res_sorcery_memory_cache: Add support for object_lifetime_maximum. + + This makes the "object_lifetime_maximum" option operational. + + On the addition of an object to an empty memory cache a scheduled + task is created which, when invoked, expires objects from the cache + which have exceeded their lifetime. If more objects have been added + the remaining life of the oldest object is used to schedule the + next invocation of the scheduled task. + + If the oldest object is removed from the cache before it can be + expired automatically the scheduled task is cancelled, if possible, + and the lifetime of the next oldest is used to schedule the task. + + If during these two operations no additional objects exist in the + cache then no task is scheduled. + + An additional unit test has been added which verifies this + functionality. + + ASTERISK-25067 + Reported by: Matt Jordan + + Change-Id: I87409674674a508e7717ee20739ca15cec6ba7b6 + +2015-05-20 15:19 +0000 [9ae9221d2b] Mark Michelson + + * res_sorcery_memory_cache: Add support for maximum_objects. + + This makes the "maximum_objects" option operational. + + A heap has been added alongside the hash table in the cache. When + objects are added to the cache, they are also added to the heap. + Similarly, when objects are removed from the cache, they are removed + from the heap. + + The heap's use comes into play when an item is to be added to a "full" + cache. When the cache is full, the oldest item is removed from the + cache, using the heap to determine the oldest item. + + A unit test has been added that verifies that the maximum_objects option + works as expected and that the oldest object is removed from the cache + when an object beyond the maximum is added. + + ASTERISK-25067 #close + Reported by Matt Jordan + + Change-Id: I490658830e9c4cbf0b3051e4cdc4913cf9f1b73a + +2015-05-16 17:02 +0000 [e4d42119b5] Joshua Colp + + * res_sorcery_memory_cache: Add basic module implementation. + + This change adds a basic res_sorcery_memory_cache module which implements + configuration option parsing, configuration file parsing for threading, + sorcery interface implementation, and unit tests. + + Objects can be added, updated, deleted, and retrieved from the memory + cache. Automatic expiration and stale handling will be added in the + future. + + Note that unit tests exist within the module itself in case the + threading done as a result of expiration results in asynchronous + actions (which it likely will). Providing access and a notification + mechanism for an external test module would be complicated and + not worth it. + + ASTERISK-25067 #close + Reported by: Matt Jordan + + Change-Id: Id8a6a357ef5a83d466f81eee56a67d13eeb118b9 + +2015-07-02 17:03 +0000 [49a37f22e1] Jonathan Rose + + * app: Add functions to swap vm function table + + This patch adds function-mocking methods for testing voicemail + features in external modules. It is being pulled over from r432556 + on SVN because DPMA won't presently compile with TEST_FRAMEWORK + set in Asterisk 13.1 certified. + + Change-Id: I1c2cf6d5a8589104154a86538ecd3f62a2694681 +2015-04-22 16:22 +0000 [f58c0acfa2] gtjoseph + + * 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-29 12:45 +0000 [9cbd76630a] Mark Michelson + + * 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 16:12 +0000 [8ba3de43ad] Mark Michelson + + * 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-26 10:41 +0000 [20f50131d7] Mark Michelson + + * 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 [0d535df734] Mark Michelson + + * 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-23 14:34 +0000 [3332869b48] Richard Mudgett + + * AMI: Add Linkedid to the standard channel snapshot AMI event headers. + + ASTERISK-25189 #close + Reported by: John Hardin + + Change-Id: I2b1778c3fdc1dca0ed55db4e3a639eddfb16c2ac + +2015-06-17 05:04 +0000 [a35d6feae2] Joshua Colp + + * 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-10 18:28 +0000 [75589c4a3b] Joshua Colp + + * 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 [8142b922ab] Richard Mudgett + + * app_directory: Fix crash when using the alias option 'a'. + + The voicemail.conf mailbox key/value pair is defined as: + =[[,[,[,[,]]]]] + 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 + =, 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-08 12:28 +0000 [ca2174bb23] Matt Jordan + + * .version: Update for certified/13.1-cert3-rc1 + +2015-06-08 12:28 +0000 [2ef2c12fae] Matt Jordan + + * .lastclean: Update for certified/13.1-cert3-rc1 + +2015-06-08 12:28 +0000 [5032390639] Matt Jordan + + * realtime: Add database scripts for certified/13.1-cert3-rc1 + +2015-06-08 09:43 +0000 [2bf6fd263a] Kevin Harwell + + * 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 17:41 +0000 [5f954e1e00] Mark Michelson + + * 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-02-17 09:34 +0000 [c994a3bfa0] Richard Mudgett + + * 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/ + ........ + + Merged revisions 431898 from http://svn.asterisk.org/svn/asterisk/branches/13 + + Change-Id: I57878adc0846dd942a699ad36dcec9cba5e57994 + +2015-04-06 14:23 +0000 [1e98fcac6b] Kevin Harwell + + * 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/ + ........ + + Merged revisions 434131 from http://svn.asterisk.org/svn/asterisk/branches/13 + + Change-Id: Ibbc25d4592aabf7596ef473447d630961f88c217 + +2015-05-26 13:56 +0000 [bd32327353] Richard Mudgett + + * 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-12 17:45 +0000 [b81353a0ec] Jonathan Rose + + * 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-12 17:34 +0000 [523fab02d8] Richard Mudgett + + * 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-04-16 10:51 +0000 [b764454d4d] Kevin Harwell + + * 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-05-06 13:24 +0000 [6433b697ae] Joshua Colp + + * 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-01-19 07:18 +0000 [bf31a486cb] Joshua Colp + + * 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 + + Change-Id: I5b57362201cc8c6555834ec8707e9fbddeff7904 + +2015-05-04 12:16 +0000 [7c687c8e54] Joshua Colp + + * 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-04-29 14:29 +0000 [0602409c89] Richard Mudgett + + * 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 15:20 +0000 [c6c06bbe70] Mark Michelson + + * 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 [08a4cf3237] Mark Michelson + + * 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 06:04 +0000 [47df4e031c] Joshua Colp + + * 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-27 16:56 +0000 [11d85ea251] Mark Michelson + + * 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 [0037ca59a6] Mark Michelson + + * 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-11 10:10 +0000 [e84fcb2464] 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 + Change-Id: I15bde169fd59a224a02005fec9a439f0679a375e + +2015-04-23 12:54 +0000 [008076ecf4] Mark Michelson + + * 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-15 10:38 +0000 [1bb6122f35] Mark Michelson + + * 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-15 16:08 +0000 [cb67aae596] gtjoseph + + * More .gitignore updates + + Added .pyc and .sha1 to the top-level .gitignore. + + Change-Id: I7dfc4f554d54d22947b38140d3305007503cc16a + Tested-by: George Joseph + +2015-04-13 19:06 +0000 [70fab74baf] gtjoseph + + * .gitignore updates for master/13 + + Added products of ./bootstrap + + Added nmenuselect and gmenuselect to menuselect/ + + Change-Id: Ied658463958bafc04a9aff9ebc28e40c116a6e35 + +2015-04-13 09:54 +0000 [735bea479a] Matt Jordan + + * 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 [7d64479748] Matt Jordan + + * 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-12 06:12 +0000 [9237e8b11e] Corey Farrell + + * 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 [630dbcb8b4] Matt Jordan + + * .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 [e4892f9aa4] gtjoseph + + * 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-14 14:04 +0000 [677898f839] Joshua Colp + + * 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-08 13:19 +0000 [918ca7dd36] Jonathan Rose + + * 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/ + ........ + + Merged revisions 434425 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@434428 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-04-08 12:24 +0000 [08945a5c77] Maciej Szmigiero (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 + ........ + + Merged revisions 434384 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@434418 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-04-07 10:35 +0000 [45f09898e9] Mark Michelson + + * 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. + ........ + + Merged revisions 434218 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@434220 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-04-03 16:59 +0000 [42b7ebdd4d] Mark Michelson + + * 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 + ........ + + Merged revisions 433968 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433970 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-04-01 15:32 +0000 [b6fff2719d] Mark Michelson + + * 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/ + + AFS-254 + ........ + + Merged revisions 429223 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433918 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-04-01 11:29 +0000 [8ae3670781] Ashley Sanders + + * 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. + ........ + + Merged revisions 433888 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433890 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-31 22:39 +0000 [259227eb1a] Ashley Sanders + + * stasis: set a channel variable on websocket disconnect error + + Resolve compile errors caused by r433839 by included the missing + header file, pbx.h. + ........ + + Merged revisions 433863 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433864 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-31 17:34 +0000 [758fead630] Ashley Sanders + + * 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/ + ........ + + Merged revisions 433839 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433842 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-27 15:55 +0000 [b5b44876c2] Mark Michelson + + * 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/ + ........ + + Merged revisions 433619 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433621 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-27 15:25 +0000 [66b8c7cab4] Richard Mudgett + + * 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/ + ........ + + Merged revisions 433596 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433618 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-20 14:57 +0000 [fb7062afca] Richard Mudgett + + * 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/ + ........ + + Merged revisions 433222 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433224 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-20 14:04 +0000 [cf9799845f] Richard Mudgett + + * 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/ + ........ + + Merged revisions 433199 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433201 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 16:56 +0000 [90fc65da62] Richard Mudgett + + * 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 + ........ + + Merged revisions 433057 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433059 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 13:44 +0000 [e0b644ddb7] Kevin Harwell + + * 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 + ........ + + Merged revisions 433031 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433034 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 13:43 +0000 [d7c8041f6b] Kevin Harwell + + * 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/ + ........ + + Merged revisions 433028 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433033 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-17 11:25 +0000 [cd4e18c4cc] Richard Mudgett + + * Multiple revisions 431583,433005 + + ........ + r431583 | sgriepentrog | 2015-02-06 15:26:12 -0600 (Fri, 06 Feb 2015) | 10 lines + + 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/ + ........ + r433005 | rmudgett | 2015-03-17 11:10:39 -0500 (Tue, 17 Mar 2015) | 1 line + + res_pjsip: Add reason comment. + ........ + + Merged revisions 431583,433005 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@433025 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-13 10:51 +0000 [6cd70450fd] Kevin Harwell + + * 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 + ........ - * 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 + Merged revisions 432868 from http://svn.asterisk.org/svn/asterisk/branches/13 -2015-02-25 20:44 +0000 [r432237] David M. Lee - - * 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 - - * /, 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@432888 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-09 11:44 +0000 [4eb1dd4b35] Kevin Harwell + + * 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/ + ........ + + Merged revisions 432638 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@432658 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-04 12:53 +0000 [52366a423c] Matt Jordan + + * 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/ + ........ + + Merged revisions 432453 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@432454 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-03-02 13:15 +0000 [b17d0953b6] Matt Jordan + + * 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 + ........ + + Merged revisions 432423 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@432424 65c4cc65-6c06-0410-ace0-fbb531ad65f3 - * 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 +2015-02-26 11:15 +0000 [3b4ba353f0] Kevin Harwell + + * 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 + ........ + + Merged revisions 432363 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@432365 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-24 16:01 +0000 [33c73ffeaa] Matt Jordan + + * 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 - - * /, 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 + Merged revisions 432195 from http://svn.asterisk.org/svn/asterisk/branches/13 -2015-02-21 20:47 +0000 [r432118-432154] Joshua Colp - * 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@432197 65c4cc65-6c06-0410-ace0-fbb531ad65f3 - * 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 +2015-02-11 12:04 +0000 [3ad393b043] Kevin Harwell - * 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 + * res_pjsip: dtls_handler causes Asterisk to crash -2015-02-21 17:35 +0000 [r432099] Matthew Jordan - - * 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 + 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. -2015-02-21 14:05 +0000 [r432079] Joshua Colp + ASTERISK-24741 #close + Reported by: Zane Conkle + Review: https://reviewboard.asterisk.org/r/4409/ + ........ - * 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 + Merged revisions 431698 from http://svn.asterisk.org/svn/asterisk/branches/13 -2015-02-21 02:56 +0000 [r432055-432059] Corey Farrell - * /, 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@431700 65c4cc65-6c06-0410-ace0-fbb531ad65f3 - * /, 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-11 11:52 +0000 [8be00450b9] Kevin Harwell -2015-02-20 17:51 +0000 [r432034] Richard Mudgett + * res_http_websocket: websocket write timeout fails to fully disconnect - * /, 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 + 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. -2015-02-20 17:46 +0000 [r432033] George Joseph - - * 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 - - * 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 + ASTERISK-24701 #close + Reported by: Matt Jordan + Review: https://reviewboard.asterisk.org/r/4412/ + ........ -2015-02-19 21:25 +0000 [r431956-431993] Richard Mudgett + Merged revisions 431669 from http://svn.asterisk.org/svn/asterisk/branches/11 + ........ - * 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 + Merged revisions 431670 from http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 - - * 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 - - * 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@431697 65c4cc65-6c06-0410-ace0-fbb531ad65f3 -2015-02-17 15:31 +0000 [r431898] Richard Mudgett - - * 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 - - * 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 - - * 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 +2015-02-11 11:48 +0000 [340588c721] Richard Mudgett - * 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 - - * /, 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * /, 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 + * HTTP: Stop accepting requests on final system shutdown. -2015-02-11 16:51 +0000 [r431670] Kevin Harwell - - * 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 + There are three CLI commands to stop and restart Asterisk each. -2015-02-11 15:51 +0000 [r431663] Corey Farrell + 1) core stop/restart now - Hangup all calls and stop or restart Asterisk. + New channels are prevented while the shutdown request is pending. - * 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 + 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. -2015-02-10 23:16 +0000 [r431643] George Joseph - - * 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/PJSIP/' in whatever is specified for - 'hint_context'. Specifying 'hint_application' in the wizard will - create 'exten => ,1,' 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 - - * 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 + 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. - * 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 - - * 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/ + 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/ + ........ + + Merged revisions 431692 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@431696 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-11 10:19 +0000 [69dc8f9ec2] Kevin Harwell + + * pjsip_options: Fix continued qualifies after endpoint/aor deletion -2015-02-04 01:27 +0000 [r431538-431555] Joshua Colp + 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. - * res/res_pjsip_keepalive.c: res_pjsip_keepalive: Don't crash if - PJSIP module is not loaded. + This patch unschedules all existing qualify tasks before scheduling + new ones on reload. - * 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 + Tested-by: George Joseph + + Review: https://reviewboard.asterisk.org/r/4290/ + ........ + + Merged revisions 430064 from http://svn.asterisk.org/svn/asterisk/branches/13 + + + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@431667 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-02-05 09:50 +0000 [2125e1b2de] Mark Michelson + + * Add Asterisk 13 revision 431420 that fixes disabling 100rel option on PJSIP endpoints. -2015-01-31 16:27 +0000 [r431521] Joshua Colp - * 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 + git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@431573 65c4cc65-6c06-0410-ace0-fbb531ad65f3 + +2015-04-08 Asterisk Development Team + + * Certified Asterisk 13.1-cert2 Released. + + * Mitigate 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. + + ASTERISK-24847 #close + Reported by: Maciej Szmigiero + patches: + asterisk-null-in-cn.patch uploaded by mhej (license 6085) - * Asterisk 13.2.0 Released. + AST-2015-003 2015-01-30 Asterisk Development Team - * Asterisk 13.2.0-rc1 Released. + * Certified Asterisk 13.1-cert1 Released. -2015-01-30 17:44 +0000 [r431492] Richard Mudgett +2015-01-30 17:53 +0000 [r431494] Richard Mudgett - * apps/app_agent_pool.c: app_agent_pool: Fix initial module load + * 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 @@ -14571,130 +22046,32 @@ 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 - - * 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 : + https://reviewboard.asterisk.org/r/4390/ ........ Merged + revisions 431492 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 +2015-01-30 16:50 +0000 [r431470] Mark Michelson * 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. + 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 + ........ Merged revisions 431468 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-29 23:02 +0000 [r431450] Scott Griepentrog - - * 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 - - * 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 - - * 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 - - * 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-30 16:41 +0000 [r431467] Jonathan Rose -2015-01-28 17:37 +0000 [r431301-431303] Mark Michelson + * main/manager.c, /: Merge r431153 from asterisk/branches/13 + r431153 | jrose | 2015-01-27 11:22:52 -0600 (Tue, 27 Jan 2015) | + 9 lines 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 - * /, 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 +2015-01-28 21:53 +0000 [r431326-431334] Mark Michelson * funcs/func_curl.c, /: Multiple revisions 431297-431298 ........ r431297 | mmichelson | 2015-01-28 11:05:26 -0600 (Wed, 28 Jan @@ -14712,24 +22089,25 @@ 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 + http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged + revisions 431301 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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/ + * res/res_pjsip_t38.c, res/res_pjsip_session.c, /, + res/res_pjsip_sdp_rtp.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 ........ Merged + revisions 431303 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-28 04:09 +0000 [r431243] Richard Mudgett +2015-01-28 04:11 +0000 [r431244] Richard Mudgett - * main/sorcery.c, res/res_pjsip_outbound_registration.c, - res/res_pjsip.c: res_pjsip_outbound_registration: Fix reload race + * /, res/res_pjsip_outbound_registration.c, res/res_pjsip.c, + main/sorcery.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 @@ -14766,11 +22144,13 @@ 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/ + https://reviewboard.asterisk.org/r/4381/ ........ Merged + revisions 431243 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-27 22:56 +0000 [r431179-431219] Kevin Harwell +2015-01-27 23:02 +0000 [r431200-431221] Kevin Harwell - * /, main/tcptls.c: tcptls: Bad file descriptor error when + * 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 @@ -14782,7 +22162,9 @@ 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 + http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged + revisions 431219 from + http://svn.asterisk.org/svn/asterisk/branches/13 * /, channels/chan_sip.c: chan_sip: stale nonce causes failure When refreshing (with a small expiration) a registration that was sent @@ -14803,44 +22185,11 @@ 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 + http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged + revisions 431194 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 +2015-01-27 17:52 +0000 [r431162] Richard Mudgett * /, apps/confbridge/include/confbridge.h, apps/app_confbridge.c: app_confbridge: Repeatedly starting and stopping recording ref @@ -14855,11 +22204,13 @@ 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 + http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged + revisions 431160 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-27 17:32 +0000 [r431157] Joshua Colp +2015-01-27 17:35 +0000 [r431159] Joshua Colp - * main/bridge_channel.c, res/res_pjsip_sdp_rtp.c: bridge / + * res/res_pjsip_sdp_rtp.c, main/bridge_channel.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 @@ -14872,43 +22223,14 @@ 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 + https://reviewboard.asterisk.org/r/4378/ ........ Merged + revisions 431157 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 - - * 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 +2015-01-27 17:18 +0000 [r431140] Matthew Jordan - * apps/confbridge/conf_config_parser.c, - apps/confbridge/include/confbridge.h: app_confbridge: Restore + * /, apps/confbridge/include/confbridge.h, + apps/confbridge/conf_config_parser.c: 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 @@ -14924,183 +22246,95 @@ 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 + Reported by: Steve Pitts ........ Merged revisions 431134 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-27 11:47 +0000 [r431114] Joshua Colp +2015-01-27 11:48 +0000 [r431116] Joshua Colp - * 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 + * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * /, 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 - - * 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. + https://reviewboard.asterisk.org/r/4375/ ........ Merged + revisions 431114 from + http://svn.asterisk.org/svn/asterisk/branches/13 + +2015-01-23 15:24 +0000 [r431016] Kevin Harwell + + * res/res_ari_events.c, include/asterisk/stasis_app.h, + res/res_pjsip_mwi.c, 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: 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/ ........ Merged + revisions 430999 from + http://svn.asterisk.org/svn/asterisk/branches/13 + +2015-01-21 19:47 +0000 [r430898] Richard Mudgett + + * CHANGES, /, res/res_pjsip_outbound_registration.c: Multiple + revisions 430223,430373,430395 ........ r430223 | gtjoseph | + 2015-01-06 11:35:21 -0600 (Tue, 06 Jan 2015) | 24 lines + 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/ ........ r430373 | + gtjoseph | 2015-01-08 11:48:29 -0600 (Thu, 08 Jan 2015) | 25 + lines 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/ ........ r430395 | + gtjoseph | 2015-01-08 15:37:42 -0600 (Thu, 08 Jan 2015) | 14 + lines 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/ ........ Merged + revisions 430223,430373,430395 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-21 13:33 +0000 [r430840-430864] Matthew Jordan +2015-01-21 13:36 +0000 [r430843-430865] Matthew Jordan - * channels/chan_sip.c: channels/chan_sip: Fix registration leak + * /, 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 @@ -15114,20 +22348,10 @@ 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 + Engström Tested by: Stefan Engström ........ Merged revisions + 430864 from http://svn.asterisk.org/svn/asterisk/branches/13 - * apps/app_dial.c: apps/app_dial: Don't publish DialEnd twice on + * 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 @@ -15147,175 +22371,25 @@ 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 : - - * 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 - - * 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 - - * 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 + ASTERISK-24682 #close Reported by: Matt Jordan ........ Merged + revisions 430842 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 +2015-01-19 18:18 +0000 [r430782] Mark Michelson - * main/pbx.c: Call extension state callbacks at hint creation. When - a hint gets created, any subsequent device or presence state + * 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) + ........ Merged revisions 430776 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-19 13:18 +0000 [r430755] Joshua Colp - - * 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 - - * 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 - - * 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 - - * 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 - - * res/res_pjsip_outbound_registration.c: +2015-01-15 12:11 +0000 [r430666] Joshua Colp + + * /, 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 @@ -15325,415 +22399,44 @@ 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * /, 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 + https://reviewboard.asterisk.org/r/4338/ ........ Merged + revisions 430664 from + http://svn.asterisk.org/svn/asterisk/branches/13 + +2015-01-07 03:29 +0000 [r430253-430293] Matthew Jordan + + * utils/conf2ael.c, apps/app_waitforring.c, formats/format_vox.c, + res/res_timing_pthread.c, pbx/pbx_ael.c, + cel/cel_sqlite3_custom.c, res/res_hep_rtcp.c, + formats/format_jpeg.c, apps/app_jack.c, apps/app_adsiprog.c, + cdr/cdr_sqlite3_custom.c, res/res_snmp.c, channels/chan_sip.c, + cel/cel_tds.c, apps/app_dictate.c, apps/app_festival.c, + agi/eagi-test.c, res/res_hep_pjsip.c, apps/app_alarmreceiver.c, + apps/app_image.c, channels/chan_console.c, apps/app_getcpeid.c, + apps/app_talkdetect.c, channels/chan_oss.c, + channels/chan_misdn.c, apps/app_mp3.c, channels/chan_alsa.c, + pbx/pbx_dundi.c, channels/chan_nbs.c, utils/extconf.c, + apps/app_zapateller.c, cel/cel_pgsql.c, res/res_config_pgsql.c, + utils/muted.c, apps/app_test.c, utils/smsq.c, + apps/app_morsecode.c, apps/app_ices.c, cdr/cdr_csv.c, + channels/chan_phone.c, funcs/func_pitchshift.c, + funcs/func_audiohookinherit.c, + res/res_pjsip_phoneprov_provider.c, apps/app_minivm.c, + res/res_statsd.c, apps/app_sms.c, res/res_config_ldap.c, + utils/streamplayer.c, utils/check_expr.c, cel/cel_radius.c, + apps/app_nbscat.c, res/res_hep.c, apps/app_waitforsilence.c, + apps/app_dahdiras.c, pbx/pbx_lua.c, res/res_ael_share.c, + cdr/cdr_radius.c, cdr/cdr_tds.c, utils/stereorize.c, + apps/app_osplookup.c, channels/chan_skinny.c, + funcs/func_frame_trace.c, apps/app_amd.c, pbx/pbx_realtime.c, + apps/app_url.c, apps/app_externalivr.c, cdr/cdr_odbc.c, + res/res_timing_kqueue.c, channels/chan_mgcp.c, + channels/chan_unistim.c, res/res_phoneprov.c, utils/astman.c, + cdr/cdr_pgsql.c, res/res_config_sqlite.c: Disable extended + support modules - * contrib/ast-db-manage/config/versions/371a3bf4143e_add_user_eq_phone_option_to_pjsip.py: + * /, + 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 @@ -15741,116 +22444,59 @@ 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. + ........ Merged revisions 430252 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2015-01-06 17:52 +0000 [r430221-430227] George Joseph - - * 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-06 19:53 +0000 [r430245] Scott Griepentrog -2015-01-05 22:49 +0000 [r430200] Scott Griepentrog - - * /, main/bridge_basic.c: bridge: avoid leaking channel during + * 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 - - * 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 - - * 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 - - * /, 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 + https://reviewboard.asterisk.org/r/4302/ ........ Merged + revisions 430199 from + http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged + revisions 430200 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2014-12-24 15:26 +0000 [r430083-430092] Matthew Jordan +2014-12-24 15:27 +0000 [r430085-430094] Matthew Jordan - * 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 + * 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. ........ Merged revisions + 429519 from http://svn.asterisk.org/svn/asterisk/branches/13 + + * contrib/ast-db-manage/config/versions/371a3bf4143e_add_user_eq_phone_option_to_pjsip.py + (added), /, res/res_pjsip.c: 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 + ........ Merged revisions 430092 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * /, 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. ........ + Merged revisions 429352 from + http://svn.asterisk.org/svn/asterisk/branches/13 * 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 + res/res_pjsip_keepalive.c (added), res/res_pjsip/config_global.c, + /, 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 @@ -15860,43 +22506,30 @@ 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 + ASTERISK-24644 #close ........ Merged revisions 430084 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 - - * 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 - - * 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 + * /, 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 ........ Merged revisions 430083 from + http://svn.asterisk.org/svn/asterisk/branches/13 + +2014-12-22 21:22 +0000 [r430030-430046] Richard Mudgett + + * 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 @@ -15908,9 +22541,11 @@ 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/ + https://reviewboard.asterisk.org/r/4259/ ........ Merged + revisions 430034 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * /, main/logger.c, include/asterisk/_private.h, main/asterisk.c: + * include/asterisk/_private.h, main/asterisk.c, /, main/logger.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 @@ -15921,134 +22556,108 @@ #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 - - * /, 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 - - * 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 - - * 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 - - * /, 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 - - * /, 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 + http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged + revisions 430010 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2014-12-18 22:38 +0000 [r429784-429805] Richard Mudgett +2014-12-22 18:35 +0000 [r430007-430008] bebuild : - * 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 + * /, res/res_pjsip/pjsip_options.c: Multiple revisions + 429128,429246 ........ r429128 | kmoore | 2014-12-09 08:00:50 + -0600 (Tue, 09 Dec 2014) | 12 lines 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 ........ + r429246 | kmoore | 2014-12-10 07:14:56 -0600 (Wed, 10 Dec 2014) | + 8 lines 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 ........ Merged + revisions 429128,429246 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * 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 ........ + Merged revisions 429741 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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-19 21:52 +0000 [r429855-429892] bebuild : -2014-12-18 15:50 +0000 [r429763] Kevin Harwell + * CHANGES, res/res_ari_channels.c, res/ari/resource_channels.h, /, + rest-api/api-docs/channels.json, res/ari/resource_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/ + ........ Merged revisions 429153 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * res/ari/ari_model_validators.c, main/manager_channels.c, + res/ari/ari_model_validators.h, /, main/stasis_channels.c, + rest-api/api-docs/channels.json: 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 ........ Merged + revisions 429206 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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/ + * 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/ ........ Merged + revisions 429407 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2014-12-18 15:34 +0000 [r429739-429761] Mark Michelson + * include/asterisk/format.h, main/format.c, /, main/codec.c: 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/ ........ Merged + revisions 429497 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 + * /, 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 @@ -16057,143 +22666,110 @@ 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 + https://reviewboard.asterisk.org/r/4273 ........ Merged revisions + 429761 from http://svn.asterisk.org/svn/asterisk/branches/13 - * 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 + * 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/ ........ Merged + revisions 429175 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * /, 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 ........ Merged + revisions 429433 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * channels/chan_pjsip.c, res/res_pjsip_session.c, + include/asterisk/res_pjsip_session.h, /, + res/res_pjsip_session.exports.in: 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/ ........ Merged + revisions 429409 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * /, 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/ ........ Merged + revisions 429477 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * main/rtp_engine.c, /, channels/chan_sip.c, + include/asterisk/rtp_engine.h, res/res_rtp_asterisk.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 ........ Merged + revisions 429196 from + http://svn.asterisk.org/svn/asterisk/branches/13 + + * 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 + ........ Merged revisions 429739 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2014-12-18 00:10 +0000 [r429699-429719] George Joseph - - * 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 - - * 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 - - * 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 - - * /, 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 - - * 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 - - * 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 - - * 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 + * 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 ........ Merged + revisions 429829 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * main/lock.c, /, include/asterisk/lock.h: DEBUG_THREADS: Fix + * /, include/asterisk/lock.h, main/lock.c: 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 @@ -16233,246 +22809,24 @@ 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * /, 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 - - * 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 - - * 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 - - * /: 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 - - * /, 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 - - * 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 + revisions 429540 from + http://svn.asterisk.org/svn/asterisk/branches/13 - * /, 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 - - * 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 - - * 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 - - * 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/ + * /, 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 ........ Merged + revisions 429571 from + http://svn.asterisk.org/svn/asterisk/branches/13 -2014-12-09 14:00 +0000 [r429128] Kinsey Moore + * /, asterisk-13.1.0-summary.html (removed), + asterisk-13.1.0-summary.txt (removed): Update properties; remove + old summaries - * /, 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 + * / (added): Create Certified Asterisk 13.1 branch 2014-12-15 Asterisk Development Team