| 1 | |
| 2 | ## Change Log for Release asterisk-22.0.0 |
| 3 | |
| 4 | ### Links: |
| 5 | |
| 6 | - [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-22.0.0.md) |
| 7 | - [GitHub Diff](https://github.com/asterisk/asterisk/compare/22.0.0-pre1...22.0.0) |
| 8 | - [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-22.0.0.tar.gz) |
| 9 | - [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk) |
| 10 | |
| 11 | ### Summary: |
| 12 | |
| 13 | - Commits: 22 |
| 14 | - Commit Authors: 8 |
| 15 | - Issues Resolved: 13 |
| 16 | - Security Advisories Resolved: 1 |
| 17 | - [GHSA-v428-g3cw-7hv9](https://github.com/asterisk/asterisk/security/advisories/GHSA-v428-g3cw-7hv9): A malformed Contact or Record-Route URI in an incoming SIP request can cause Asterisk to crash when res_resolver_unbound is used |
| 18 | |
| 19 | ### User Notes: |
| 20 | |
| 21 | - #### feat: ARI "ChannelToneDetected" event |
| 22 | Setting the TONE_DETECT dialplan function on a channel |
| 23 | in ARI will now cause a ChannelToneDetected ARI event to be raised |
| 24 | when the specified tone is detected. |
| 25 | |
| 26 | |
| 27 | ### Upgrade Notes: |
| 28 | |
| 29 | - #### app_record: Add RECORD_TIME output variable. |
| 30 | The RECORD_TIME variable now contains |
| 31 | the duration of Record() recordings in milliseconds. |
| 32 | |
| 33 | |
| 34 | ### Commit Authors: |
| 35 | |
| 36 | - Alexei Gradinari: (2) |
| 37 | - George Joseph: (10) |
| 38 | - Gibbz00: (1) |
| 39 | - Joshua C. Colp: (2) |
| 40 | - Mike Bradeen: (2) |
| 41 | - Naveen Albert: (1) |
| 42 | - Sean Bright: (2) |
| 43 | - Tinet-Mucw: (2) |
| 44 | |
| 45 | ## Issue and Commit Detail: |
| 46 | |
| 47 | ### Closed Issues: |
| 48 | |
| 49 | - !GHSA-v428-g3cw-7hv9: A malformed Contact or Record-Route URI in an incoming SIP request can cause Asterisk to crash when res_resolver_unbound is used |
| 50 | - 548: [improvement]: Get Record() audio duration/length |
| 51 | - 763: [bug]: autoservice thread stuck in an endless sleep |
| 52 | - 811: [new-feature]: ARI channel tone detect events. |
| 53 | - 845: [bug]: Buffer overflow in handling of security mechanisms in res_pjsip |
| 54 | - 847: [bug]: Asterisk not using negotiated fall-back 8K digits |
| 55 | - 854: [bug]: wrong properties in stir_shaken.conf.sample |
| 56 | - 856: [bug]: res_pjsip_sdp_rtp leaks astobj2 ast_format |
| 57 | - 861: [bug]: ChanSpy unable to read audiohook read direction frame when no packet lost on both side of the call |
| 58 | - 876: [bug]: ChanSpy unable to write whisper_audiohook when set flag OPTION_READONLY |
| 59 | - 879: [bug]: res_stir_shaken/verification.c: Getting verification errors when global_disable=yes |
| 60 | - 884: [bug]: A ':' at the top of in stir_shaken.conf make Asterisk producing a core file when starting |
| 61 | - 889: [bug]: res_stir_shaken/verification.c has a stale include for jansson.h that can cause compilation to fail |
| 62 | - 904: [bug]: stir_shaken: attest_level isn't being propagated correctly from attestation to profile to tn |
| 63 | |
| 64 | ### Commits By Author: |
| 65 | |
| 66 | - #### Alexei Gradinari (2): |
| 67 | - res_pjsip_sdp_rtp fix leaking astobj2 ast_format |
| 68 | - autoservice: Do not sleep if autoservice_stop is called within autoservice thr.. |
| 69 | |
| 70 | - #### George Joseph (8): |
| 71 | - stir_shaken.conf.sample: Fix bad references to private_key_path |
| 72 | - security_agreements.c: Refactor the to_str functions and fix a few other bugs |
| 73 | - app_voicemail: Use ast_asprintf to create mailbox SQL query |
| 74 | - res_resolver_unbound: Test for NULL ub_result in unbound_resolver_callback |
| 75 | - res_stir_shaken: Check for disabled before param validation |
| 76 | - res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid |
| 77 | - res_stir_shaken: Remove stale include for jansson.h in verification.c |
| 78 | - stir_shaken: Fix propagation of attest_level and a few other values |
| 79 | |
| 80 | - #### Mike Bradeen (1): |
| 81 | - res_pjsip_sdp_rtp: Use negotiated DTMF Payload types on bitrate mismatch |
| 82 | |
| 83 | - #### Sean Bright (2): |
| 84 | - alembic: Make 'revises' header comment match reality. |
| 85 | - res_pjsip_logger.c: Fix 'OPTIONS' tab completion. |
| 86 | |
| 87 | - #### Tinet-mucw (2): |
| 88 | - app_chanspy.c: resolving the issue with audiohook direction read |
| 89 | - app_chanspy.c: resolving the issue writing frame to whisper audiohook. |
| 90 | |
| 91 | |
| 92 | ### Commit List: |
| 93 | |
| 94 | - Prepare master for Asterisk 22 |
| 95 | - Update issue guidelines link for bug reports. |
| 96 | - .github: NightlyAdmin now calls external CloseStaleIssuesAndPRs |
| 97 | - app_record: Add RECORD_TIME output variable. |
| 98 | - Revert "app_record: Add RECORD_TIME output variable." |
| 99 | - feat: ARI "ChannelToneDetected" event |
| 100 | - Update version for Asterisk 22 |
| 101 | - stir_shaken: Fix propagation of attest_level and a few other values |
| 102 | - res_stir_shaken: Remove stale include for jansson.h in verification.c |
| 103 | - res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid |
| 104 | - res_stir_shaken: Check for disabled before param validation |
| 105 | - app_chanspy.c: resolving the issue writing frame to whisper audiohook. |
| 106 | - res_resolver_unbound: Test for NULL ub_result in unbound_resolver_callback |
| 107 | - app_voicemail: Use ast_asprintf to create mailbox SQL query |
| 108 | - res_pjsip_sdp_rtp: Use negotiated DTMF Payload types on bitrate mismatch |
| 109 | - app_chanspy.c: resolving the issue with audiohook direction read |
| 110 | - security_agreements.c: Refactor the to_str functions and fix a few other bugs |
| 111 | - res_pjsip_sdp_rtp fix leaking astobj2 ast_format |
| 112 | - stir_shaken.conf.sample: Fix bad references to private_key_path |
| 113 | - res_pjsip_logger.c: Fix 'OPTIONS' tab completion. |
| 114 | - alembic: Make 'revises' header comment match reality. |
| 115 | |
| 116 | ### Commit Details: |
| 117 | |
| 118 | #### Prepare master for Asterisk 22 |
| 119 | Author: George Joseph |
| 120 | Date: 2023-08-09 |
| 121 | |
| 122 | |
| 123 | #### Update issue guidelines link for bug reports. |
| 124 | Author: Joshua C. Colp |
| 125 | Date: 2023-10-27 |
| 126 | |
| 127 | |
| 128 | #### .github: NightlyAdmin now calls external CloseStaleIssuesAndPRs |
| 129 | Author: George Joseph |
| 130 | Date: 2024-03-20 |
| 131 | |
| 132 | |
| 133 | #### app_record: Add RECORD_TIME output variable. |
| 134 | Author: Naveen Albert |
| 135 | Date: 2024-01-22 |
| 136 | |
| 137 | This adds the RECORD_TIME variable to Record(), |
| 138 | which is set to the recording duration before |
| 139 | the application returns. |
| 140 | |
| 141 | Resolves: #548 |
| 142 | |
| 143 | UpgradeNote: The RECORD_TIME variable now contains |
| 144 | the duration of Record() recordings in milliseconds. |
| 145 | |
| 146 | #### Revert "app_record: Add RECORD_TIME output variable." |
| 147 | Author: Joshua C. Colp |
| 148 | Date: 2024-04-30 |
| 149 | |
| 150 | This reverts commit 6e8dccdbbf896bcc99046ae249db360698ede0b2. |
| 151 | |
| 152 | #### feat: ARI "ChannelToneDetected" event |
| 153 | Author: gibbz00 |
| 154 | Date: 2024-07-18 |
| 155 | |
| 156 | A stasis event is now produced when using the TONE_DETECT dialplan |
| 157 | function. This event is published over ARI using the ChannelToneDetected |
| 158 | event. This change does not make it available over AMI. |
| 159 | |
| 160 | Fixes: #811 |
| 161 | |
| 162 | UserNote: Setting the TONE_DETECT dialplan function on a channel |
| 163 | in ARI will now cause a ChannelToneDetected ARI event to be raised |
| 164 | when the specified tone is detected. |
| 165 | |
| 166 | #### Update version for Asterisk 22 |
| 167 | Author: Mike Bradeen |
| 168 | Date: 2024-08-14 |
| 169 | |
| 170 | |
| 171 | #### stir_shaken: Fix propagation of attest_level and a few other values |
| 172 | Author: George Joseph |
| 173 | Date: 2024-09-24 |
| 174 | |
| 175 | attest_level, send_mky and check_tn_cert_public_url weren't |
| 176 | propagating correctly from the attestation object to the profile |
| 177 | and tn. |
| 178 | |
| 179 | * In the case of attest_level, the enum needed to be changed |
| 180 | so the "0" value (the default) was "NOT_SET" instead of "A". This |
| 181 | now allows the merging of the attestation object, profile and tn |
| 182 | to detect when a value isn't set and use the higher level value. |
| 183 | |
| 184 | * For send_mky and check_tn_cert_public_url, the tn default was |
| 185 | forced to "NO" which always overrode the profile and attestation |
| 186 | objects. Their defaults are now "NOT_SET" so the propagation |
| 187 | happens correctly. |
| 188 | |
| 189 | * Just to remove some redundant code in tn_config.c, a bunch of calls to |
| 190 | generate_sorcery_enum_from_str() and generate_sorcery_enum_to_str() were |
| 191 | replaced with a single call to generate_acfg_common_sorcery_handlers(). |
| 192 | |
| 193 | Resolves: #904 |
| 194 | |
| 195 | #### res_stir_shaken: Remove stale include for jansson.h in verification.c |
| 196 | Author: George Joseph |
| 197 | Date: 2024-09-17 |
| 198 | |
| 199 | verification.c had an include for jansson.h left over from previous |
| 200 | versions of the module. Since res_stir_shaken no longer has a |
| 201 | dependency on jansson, the bundled version wasn't added to GCC's |
| 202 | include path so if you didn't also have a jansson development package |
| 203 | installed, the compile would fail. Removing the stale include |
| 204 | was the only thing needed. |
| 205 | |
| 206 | Resolves: #889 |
| 207 | |
| 208 | #### res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid |
| 209 | Author: George Joseph |
| 210 | Date: 2024-09-13 |
| 211 | |
| 212 | * If the call to ast_config_load() returns CONFIG_STATUS_FILEINVALID, |
| 213 | check_for_old_config() now returns LOAD_DECLINE instead of continuing |
| 214 | on with a bad pointer. |
| 215 | |
| 216 | * If CONFIG_STATUS_FILEMISSING is returned, check_for_old_config() |
| 217 | assumes the config is being loaded from realtime and now returns |
| 218 | LOAD_SUCCESS. If it's actually not being loaded from realtime, |
| 219 | sorcery will catch that later on. |
| 220 | |
| 221 | * Also refactored the error handling in load_module() a bit. |
| 222 | |
| 223 | Resolves: #884 |
| 224 | |
| 225 | #### res_stir_shaken: Check for disabled before param validation |
| 226 | Author: George Joseph |
| 227 | Date: 2024-09-11 |
| 228 | |
| 229 | For both attestation and verification, we now check whether they've |
| 230 | been disabled either globally or by the profile before validating |
| 231 | things like callerid, orig_tn, dest_tn, etc. This prevents useless |
| 232 | error messages. |
| 233 | |
| 234 | Resolves: #879 |
| 235 | |
| 236 | #### app_chanspy.c: resolving the issue writing frame to whisper audiohook. |
| 237 | Author: Tinet-mucw |
| 238 | Date: 2024-09-10 |
| 239 | |
| 240 | ChanSpy(${channel}, qEoSw): because flags set o, ast_audiohook_set_frame_feed_direction(audiohook, AST_AUDIOHOOK_DIRECTION_READ); this will effect whisper audiohook and spy audiohook, this makes writing frame to whisper audiohook impossible. So add function start_whispering to starting whisper audiohook. |
| 241 | |
| 242 | Resolves: #876 |
| 243 | |
| 244 | #### autoservice: Do not sleep if autoservice_stop is called within autoservice thr.. |
| 245 | Author: Alexei Gradinari |
| 246 | Date: 2024-09-04 |
| 247 | |
| 248 | It's possible that ast_autoservice_stop is called within the autoservice thread. |
| 249 | In this case the autoservice thread is stuck in an endless sleep. |
| 250 | |
| 251 | To avoid endless sleep ast_autoservice_stop must check that it's not called |
| 252 | within the autoservice thread. |
| 253 | |
| 254 | Fixes: #763 |
| 255 | |
| 256 | #### res_resolver_unbound: Test for NULL ub_result in unbound_resolver_callback |
| 257 | Author: George Joseph |
| 258 | Date: 2024-08-12 |
| 259 | |
| 260 | The ub_result pointer passed to unbound_resolver_callback by |
| 261 | libunbound can be NULL if the query was for something malformed |
| 262 | like `.1` or `[.1]`. If it is, we now set a 'ns_r_formerr' result |
| 263 | and return instead of crashing with a SEGV. This causes pjproject |
| 264 | to simply cancel the transaction with a "No answer record in the DNS |
| 265 | response" error. The existing "off nominal" unit test was also |
| 266 | updated to check this condition. |
| 267 | |
| 268 | Although not necessary for this fix, we also made |
| 269 | ast_dns_resolver_completed() tolerant of a NULL result. |
| 270 | |
| 271 | Resolves: GHSA-v428-g3cw-7hv9 |
| 272 | |
| 273 | #### app_voicemail: Use ast_asprintf to create mailbox SQL query |
| 274 | Author: George Joseph |
| 275 | Date: 2024-09-03 |
| 276 | |
| 277 | ...instead of trying to calculate the length of the buffer needed |
| 278 | manually. |
| 279 | |
| 280 | |
| 281 | #### res_pjsip_sdp_rtp: Use negotiated DTMF Payload types on bitrate mismatch |
| 282 | Author: Mike Bradeen |
| 283 | Date: 2024-08-21 |
| 284 | |
| 285 | When Asterisk sends an offer to Bob that includes 48K and 8K codecs with |
| 286 | matching 4733 offers, Bob may want to use the 48K audio codec but can not |
| 287 | accept 48K digits and so negotiates for a mixed set. |
| 288 | |
| 289 | Asterisk will now check Bob's offer to make sure Bob has indicated this is |
| 290 | acceptible and if not, will use Bob's preference. |
| 291 | |
| 292 | Fixes: #847 |
| 293 | |
| 294 | #### app_chanspy.c: resolving the issue with audiohook direction read |
| 295 | Author: Tinet-mucw |
| 296 | Date: 2024-08-30 |
| 297 | |
| 298 | ChanSpy(${channel}, qEoS): When chanspy spy the direction read, reading frame is often failed when reading direction read audiohook. because chanspy only read audiohook direction read; write_factory_ms will greater than 100ms soon, then ast_slinfactory_flush will being called, then direction read will fail. |
| 299 | |
| 300 | Resolves: #861 |
| 301 | |
| 302 | #### security_agreements.c: Refactor the to_str functions and fix a few other bugs |
| 303 | Author: George Joseph |
| 304 | Date: 2024-08-17 |
| 305 | |
| 306 | * A static array of security mechanism type names was created. |
| 307 | |
| 308 | * ast_sip_str_to_security_mechanism_type() was refactored to do |
| 309 | a lookup in the new array instead of using fixed "if/else if" |
| 310 | statments. |
| 311 | |
| 312 | * security_mechanism_to_str() and ast_sip_security_mechanisms_to_str() |
| 313 | were refactored to use ast_str instead of a fixed length buffer |
| 314 | to store the result. |
| 315 | |
| 316 | * ast_sip_security_mechanism_type_to_str was removed in favor of |
| 317 | just referencing the new type name array. Despite starting with |
| 318 | "ast_sip_", it was a static function so removing it doesn't affect |
| 319 | ABI. |
| 320 | |
| 321 | * Speaking of "ast_sip_", several other static functions that |
| 322 | started with "ast_sip_" were renamed to avoid confusion about |
| 323 | their public availability. |
| 324 | |
| 325 | * A few VECTOR free loops were replaced with AST_VECTOR_RESET(). |
| 326 | |
| 327 | * Fixed a meomry leak in pjsip_configuration.c endpoint_destructor |
| 328 | caused by not calling ast_sip_security_mechanisms_vector_destroy(). |
| 329 | |
| 330 | * Fixed a memory leak in res_pjsip_outbound_registration.c |
| 331 | add_security_headers() caused by not specifying OBJ_NODATA in |
| 332 | an ao2_callback. |
| 333 | |
| 334 | * Fixed a few ao2_callback return code misuses. |
| 335 | |
| 336 | Resolves: #845 |
| 337 | |
| 338 | #### res_pjsip_sdp_rtp fix leaking astobj2 ast_format |
| 339 | Author: Alexei Gradinari |
| 340 | Date: 2024-08-23 |
| 341 | |
| 342 | PR #700 added a preferred_format for the struct ast_rtp_codecs, |
| 343 | but when set the preferred_format it leaks an astobj2 ast_format. |
| 344 | In the next code |
| 345 | ast_rtp_codecs_set_preferred_format(&codecs, ast_format_cap_get_format(joint, 0)); |
| 346 | both functions ast_rtp_codecs_set_preferred_format |
| 347 | and ast_format_cap_get_format increases the ao2 reference count. |
| 348 | |
| 349 | Fixes: #856 |
| 350 | |
| 351 | #### stir_shaken.conf.sample: Fix bad references to private_key_path |
| 352 | Author: George Joseph |
| 353 | Date: 2024-08-22 |
| 354 | |
| 355 | They should be private_key_file. |
| 356 | |
| 357 | Resolves: #854 |
| 358 | |
| 359 | #### res_pjsip_logger.c: Fix 'OPTIONS' tab completion. |
| 360 | Author: Sean Bright |
| 361 | Date: 2024-08-19 |
| 362 | |
| 363 | Fixes #843 |
| 364 | |
| 365 | |
| 366 | #### alembic: Make 'revises' header comment match reality. |
| 367 | Author: Sean Bright |
| 368 | Date: 2024-08-17 |
| 369 | |
| 370 |