Debian Codegraph @

ChangeLogs/ChangeLog-22.1.0.md

raw symbols SCIP
1
2 ## Change Log for Release asterisk-22.1.0
3
4 ### Links:
5
6 - [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-22.1.0.md)
7 - [GitHub Diff](https://github.com/asterisk/asterisk/compare/22.0.0...22.1.0)
8 - [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-22.1.0.tar.gz)
9 - [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
10
11 ### Summary:
12
13 - Commits: 39
14 - Commit Authors: 9
15 - Issues Resolved: 22
16 - Security Advisories Resolved: 0
17
18 ### User Notes:
19
20 - #### res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
21 The new "suppress_moh_on_sendonly" endpoint option
22 can be used to prevent playing MOH back to a caller if the remote
23 end sends "sendonly" or "inactive" (hold) to Asterisk in an SDP.
24
25 - #### app_mixmonitor: Add 'D' option for dual-channel audio.
26 The MixMonitor application now has a new 'D' option which
27 interleaves the recorded audio in the output frames. This allows for
28 stereo recording output with one channel being the transmitted audio and
29 the other being the received audio. The 't' and 't' options are
30 compatible with this.
31
32 - #### manager.c: Restrict ModuleLoad to the configured modules directory.
33 The ModuleLoad AMI action now restricts modules to the
34 configured modules directory.
35
36 - #### manager: Enhance event filtering for performance
37 You can now perform more granular filtering on events
38 in manager.conf using expressions like
39 `eventfilter(name(Newchannel),header(Channel),method(starts_with)) = PJSIP/`
40 This is much more efficient than
41 `eventfilter = Event: Newchannel.*Channel: PJSIP/`
42 Full syntax guide is in configs/samples/manager.conf.sample.
43
44 - #### db.c: Remove limit on family/key length
45 The `ast_db_*()` APIs have had the 253 byte limit on
46 "/family/key" removed and will now accept families and keys with a
47 total length of up to SQLITE_MAX_LENGTH (currently 1e9!). This
48 affects the `DB*` dialplan applications, dialplan functions,
49 manager actions and `databse` CLI commands. Since the
50 media_cache also uses the `ast_db_*()` APIs, you can now store
51 resources with URIs longer than 253 bytes.
52
53
54 ### Upgrade Notes:
55
56
57 ### Commit Authors:
58
59 - Allan Nathanson: (1)
60 - Ben Ford: (3)
61 - Chrsmj: (1)
62 - George Joseph: (15)
63 - Jiangxc: (1)
64 - Naveen Albert: (7)
65 - Peter Jannesen: (2)
66 - Sean Bright: (7)
67 - Thomas Guebels: (2)
68
69 ## Issue and Commit Detail:
70
71 ### Closed Issues:
72
73 - 487: [bug]: Segfault possibly in ast_rtp_stop
74 - 821: [bug]: app_dial: The progress timeout doesn't cause Dial to exit
75 - 881: [bug]: Long URLs are being rejected by the media cache because of an astdb key length limit
76 - 882: [bug]: Value CHANNEL(userfield) is lost by BRIDGE_ENTER
77 - 897: [improvement]: Restrict ModuleLoad AMI action to the modules directory
78 - 900: [bug]: astfd.c: NULL pointer passed to fclose with nonnull attribute causes compilation failure
79 - 902: [bug]: app_voicemail: Pager emails are ill-formatted when custom subject is used
80 - 916: [bug]: Compilation errors on FreeBSD
81 - 923: [bug]: Transport monitor shutdown callback only works on the first disconnection
82 - 924: [bug]: dnsmgr.c: dnsmgr_refresh() should not flag change if IP address order changes
83 - 928: [bug]: chan_dahdi: MWI while off-hook when hung up on after recall ring
84 - 932: [bug]: When connected to multiple IP addresses the transport monitor is only set on the first one
85 - 937: [bug]: Wrong format for sample config file 'geolocation.conf.sample'
86 - 938: [bug]: memory leak - CBAnn leaks a small amount format_cap related memory for every confbridge
87 - 945: [improvement]: Add stereo recording support for app_mixmonitor
88 - 951: [new-feature]: func_evalexten: Add `EVAL_SUB` function
89 - 974: [improvement]: change and/or remove some wiki mentions to docs mentions in the sample configs
90 - 979: [improvement]: Add ability to suppress MOH when a remote endpoint sends "sendonly" or "inactive"
91 - 982: [bug]: The addition of tenantid to the ast_sip_endpoint structure broke ABI compatibility
92 - 990: [improvement]: The help for PJSIP_AOR should indicate that you need to call PJSIP_CONTACT to get contact details
93 - 995: [bug]: suppress_moh_on_sendonly should use AST_BOOL_VALUES instead of YESNO_VALUES in alembic script
94
95 ### Commits By Author:
96
97 - #### Allan Nathanson (1):
98 - dnsmgr.c: dnsmgr_refresh() incorrectly flags change with DNS round-robin
99
100 - #### Ben Ford (3):
101 - manager.c: Restrict ModuleLoad to the configured modules directory.
102 - app_mixmonitor: Add 'D' option for dual-channel audio.
103 - Add res_pjsip_config_sangoma external module.
104
105 - #### George Joseph (15):
106 - db.c: Remove limit on family/key length
107 - manager.c: Split XML documentation to manager_doc.xml
108 - manager: Enhance event filtering for performance
109 - manager.conf.sample: Fix mathcing typo
110 - Fix application references to Background
111 - res_rtp_asterisk: Fix dtls timer issues causing FRACKs and SEGVs
112 - manager.c: Add unit test for Originate app and appdata permissions
113 - geolocation.sample.conf: Fix comment marker at end of file
114 - core_unreal.c: Fix memory leak in ast_unreal_new_channels()
115 - pjproject_bundled: Tweaks to support out-of-tree development
116 - res_srtp: Change Unsupported crypto suite msg from verbose to debug
117 - res_pjsip: Move tenantid to end of ast_sip_endpoint
118 - func_pjsip_aor/contact: Fix documentation for contact ID
119 - res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
120 - res_pjsip: Change suppress_moh_on_sendonly to OPT_BOOL_T
121
122 - #### Naveen Albert (7):
123 - app_voicemail: Fix ill-formatted pager emails with custom subject.
124 - astfd.c: Avoid calling fclose with NULL argument.
125 - main, res, tests: Fix compilation errors on FreeBSD.
126 - chan_dahdi: Never send MWI while off-hook.
127 - app_dial: Fix progress timeout.
128 - app_dial: Fix progress timeout calculation with no answer timeout.
129 - func_evalexten: Add EVAL_SUB function.
130
131 - #### Peter Jannesen (2):
132 - cel_custom: Allow absolute filenames.
133 - channel: Preserve CHANNEL(userfield) on masquerade.
134
135 - #### Sean Bright (7):
136 - res_pjsip_pubsub: Persist subscription 'generator_data' in sorcery
137 - cdr_custom: Allow absolute filenames.
138 - res_agi.c: Ensure SIGCHLD handler functions are properly balanced.
139 - alembic: Drop redundant voicemail_messages index.
140 - func_base64.c: Ensure we set aside enough room for base64 encoded data.
141 - Revert "res_rtp_asterisk: Count a roll-over of the sequence number even on los..
142 - res_pjsip.c: Fix Contact header rendering for IPv6 addresses.
143
144 - #### Thomas Guebels (2):
145 - pjsip_transport_events: Avoid monitor destruction
146 - pjsip_transport_events: handle multiple addresses for a domain
147
148 - #### chrsmj (1):
149 - samples: remove and/or change some wiki mentions
150
151 - #### jiangxc (1):
152 - res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`
153
154
155 ### Commit List:
156
157 - res_pjsip: Change suppress_moh_on_sendonly to OPT_BOOL_T
158 - res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
159 - res_pjsip.c: Fix Contact header rendering for IPv6 addresses.
160 - samples: remove and/or change some wiki mentions
161 - func_pjsip_aor/contact: Fix documentation for contact ID
162 - res_pjsip: Move tenantid to end of ast_sip_endpoint
163 - pjsip_transport_events: handle multiple addresses for a domain
164 - func_evalexten: Add EVAL_SUB function.
165 - res_srtp: Change Unsupported crypto suite msg from verbose to debug
166 - Add res_pjsip_config_sangoma external module.
167 - app_mixmonitor: Add 'D' option for dual-channel audio.
168 - pjsip_transport_events: Avoid monitor destruction
169 - app_dial: Fix progress timeout calculation with no answer timeout.
170 - pjproject_bundled: Tweaks to support out-of-tree development
171 - core_unreal.c: Fix memory leak in ast_unreal_new_channels()
172 - dnsmgr.c: dnsmgr_refresh() incorrectly flags change with DNS round-robin
173 - geolocation.sample.conf: Fix comment marker at end of file
174 - func_base64.c: Ensure we set aside enough room for base64 encoded data.
175 - app_dial: Fix progress timeout.
176 - chan_dahdi: Never send MWI while off-hook.
177 - manager.c: Add unit test for Originate app and appdata permissions
178 - alembic: Drop redundant voicemail_messages index.
179 - res_agi.c: Ensure SIGCHLD handler functions are properly balanced.
180 - main, res, tests: Fix compilation errors on FreeBSD.
181 - res_rtp_asterisk: Fix dtls timer issues causing FRACKs and SEGVs
182 - manager.c: Restrict ModuleLoad to the configured modules directory.
183 - res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`
184 - cdr_custom: Allow absolute filenames.
185 - astfd.c: Avoid calling fclose with NULL argument.
186 - channel: Preserve CHANNEL(userfield) on masquerade.
187 - cel_custom: Allow absolute filenames.
188 - app_voicemail: Fix ill-formatted pager emails with custom subject.
189 - res_pjsip_pubsub: Persist subscription 'generator_data' in sorcery
190 - Fix application references to Background
191 - manager.conf.sample: Fix mathcing typo
192 - manager: Enhance event filtering for performance
193 - manager.c: Split XML documentation to manager_doc.xml
194 - db.c: Remove limit on family/key length
195
196 ### Commit Details:
197
198 #### res_pjsip: Change suppress_moh_on_sendonly to OPT_BOOL_T
199 Author: George Joseph
200 Date: 2024-11-15
201
202 The suppress_moh_on_sendonly endpoint option should have been
203 defined as OPT_BOOL_T in pjsip_configuration.c and AST_BOOL_VALUES
204 in the alembic script instead of OPT_YESNO_T and YESNO_VALUES.
205
206 Also updated contrib/ast-db-manage/README.md to indicate that
207 AST_BOOL_VALUES should always be used and provided an example.
208
209 Resolves: #995
210
211 #### res_pjsip: Add new endpoint option "suppress_moh_on_sendonly"
212 Author: George Joseph
213 Date: 2024-11-05
214
215 Normally, when one party in a call sends Asterisk an SDP with
216 a "sendonly" or "inactive" attribute it means "hold" and causes
217 Asterisk to start playing MOH back to the other party. This can be
218 problematic if it happens at certain times, such as in a 183
219 Progress message, because the MOH will replace any early media you
220 may be playing to the calling party. If you set this option
221 to "yes" on an endpoint and the endpoint receives an SDP
222 with "sendonly" or "inactive", Asterisk will NOT play MOH back to
223 the other party.
224
225 Resolves: #979
226
227 UserNote: The new "suppress_moh_on_sendonly" endpoint option
228 can be used to prevent playing MOH back to a caller if the remote
229 end sends "sendonly" or "inactive" (hold) to Asterisk in an SDP.
230
231
232 #### res_pjsip.c: Fix Contact header rendering for IPv6 addresses.
233 Author: Sean Bright
234 Date: 2024-11-08
235
236 Fix suggested by @nvsystems.
237
238 Fixes #985
239
240
241 #### samples: remove and/or change some wiki mentions
242 Author: chrsmj
243 Date: 2024-11-01
244
245 Cleaned some dead links. Replaced word wiki with
246 either docs or link to https://docs.asterisk.org/
247
248 Resolves: #974
249
250 #### func_pjsip_aor/contact: Fix documentation for contact ID
251 Author: George Joseph
252 Date: 2024-11-09
253
254 Clarified the use of the contact ID returned from PJSIP_AOR.
255
256 Resolves: #990
257
258 #### res_pjsip: Move tenantid to end of ast_sip_endpoint
259 Author: George Joseph
260 Date: 2024-11-06
261
262 The tenantid field was originally added to the ast_sip_endpoint
263 structure at the end of the AST_DECLARE_STRING_FIELDS block. This
264 caused everything after it in the structure to move down in memory
265 and break ABI compatibility. It's now at the end of the structure
266 as an AST_STRING_FIELD_EXTENDED. Given the number of string fields
267 in the structure now, the initial string field allocation was
268 also increased from 64 to 128 bytes.
269
270 Resolves: #982
271
272 #### pjsip_transport_events: handle multiple addresses for a domain
273 Author: Thomas Guebels
274 Date: 2024-10-29
275
276 The key used for transport monitors was the remote host name for the
277 transport and not the remote address resolved for this domain.
278
279 This was problematic for domains returning multiple addresses as several
280 transport monitors were created with the same key.
281
282 Whenever a subsystem wanted to register a callback it would always end
283 up attached to the first transport monitor with a matching key.
284
285 The key used for transport monitors is now the remote address and port
286 the transport actually connected to.
287
288 Fixes: #932
289
290 #### func_evalexten: Add EVAL_SUB function.
291 Author: Naveen Albert
292 Date: 2024-10-17
293
294 This adds an EVAL_SUB function, which is similar to the existing
295 EVAL_EXTEN function but significantly more powerful, as it allows
296 executing arbitrary dialplan and capturing its return value as
297 the function's output. While EVAL_EXTEN should be preferred if it
298 is possible to use it, EVAL_SUB can be used in a wider variety
299 of cases and allows arbitrary computation to be performed in
300 a dialplan function call, leveraging the dialplan.
301
302 Resolves: #951
303
304 #### res_srtp: Change Unsupported crypto suite msg from verbose to debug
305 Author: George Joseph
306 Date: 2024-11-01
307
308 There's really no point in spamming logs with a verbose message
309 for every unsupported crypto suite an older client may send
310 in an SDP. If none are supported, there will be an error or
311 warning.
312
313
314 #### Add res_pjsip_config_sangoma external module.
315 Author: Ben Ford
316 Date: 2024-11-01
317
318 Adds res_pjsip_config_sangoma as an external module that can be
319 downloaded via menuselect. It lives under the Resource Modules section.
320
321
322 #### app_mixmonitor: Add 'D' option for dual-channel audio.
323 Author: Ben Ford
324 Date: 2024-10-28
325
326 Adds the 'D' option to app_mixmonitor that interleaves the input and
327 output frames of the channel being recorded in the monitor output frame.
328 This allows for two streams in the recording: the transmitted audio and
329 the received audio. The 't' and 'r' options are compatible with this.
330
331 Fixes: #945
332
333 UserNote: The MixMonitor application now has a new 'D' option which
334 interleaves the recorded audio in the output frames. This allows for
335 stereo recording output with one channel being the transmitted audio and
336 the other being the received audio. The 't' and 't' options are
337 compatible with this.
338
339
340 #### pjsip_transport_events: Avoid monitor destruction
341 Author: Thomas Guebels
342 Date: 2024-10-28
343
344 When a transport is disconnected, several events can arrive following
345 each other. The first event will be PJSIP_TP_STATE_DISCONNECT and it
346 will trigger the destruction of the transport monitor object. The lookup
347 for the transport monitor to destroy is done using the transport key,
348 that contains the transport destination host:port.
349
350 A reconnect attempt by pjsip will be triggered as soon something needs to
351 send a packet using that transport. This can happen directly after a
352 disconnect since ca
353
354 Subsequent events can arrive later like PJSIP_TP_STATE_DESTROY and will
355 also try to trigger the destruction of the transport monitor if not
356 already done. Since the lookup for the transport monitor to destroy is
357 done using the transport key, it can match newly created transports
358 towards the same destination and destroy their monitor object.
359
360 Because of this, it was sometimes not possible to monitor a transport
361 after one or more disconnections.
362
363 This fix adds an additional check on the transport pointer to ensure
364 only a monitor for that specific transport is removed.
365
366 Fixes: #923
367
368 #### app_dial: Fix progress timeout calculation with no answer timeout.
369 Author: Naveen Albert
370 Date: 2024-10-16
371
372 If to_answer is -1, simply comparing to see if the progress timeout
373 is smaller than the answer timeout to prefer it will fail. Add
374 an additional check that chooses the progress timeout if there is
375 no answer timeout (or as before, if the progress timeout is smaller).
376
377 Resolves: #821
378
379 #### pjproject_bundled: Tweaks to support out-of-tree development
380 Author: George Joseph
381 Date: 2024-10-17
382
383 * pjproject is now configured with --disable-libsrtp so it will
384 build correctly when doing "out-of-tree" development. Asterisk
385 doesn't use pjproject for handling media so pjproject doesn't
386 need libsrtp itself.
387
388 * The pjsua app (which we used to use for the testsuite) no longer
389 builds in pjproject's master branch so we just skip it. The
390 testsuite no longer needs it anyway.
391
392 See third-party/pjproject/README-hacking.md for more info on building
393 pjproject "out-of-tree".
394
395
396 #### Revert "res_rtp_asterisk: Count a roll-over of the sequence number even on los..
397 Author: Sean Bright
398 Date: 2024-10-07
399
400 This reverts commit cb5e3445be6c55517c8d05aca601b648341f8ae9.
401
402 The original change from 16 to 15 bit sequence numbers was predicated
403 on the following from the now-defunct libSRTP FAQ on sourceforge.net:
404
405 > *Q6. The use of implicit synchronization via ROC seems
406 > dangerous. Can senders and receivers lose ROC synchronization?*
407 >
408 > **A.** It is possible to lose ROC synchronization between sender and
409 > receiver(s), though it is not likely in practice, and practical
410 > steps can be taken to avoid it. A burst loss of 2^16 packets or more
411 > will always break synchronization. For example, a conversational
412 > voice codec that sends 50 packets per second will have its ROC
413 > increment about every 22 minutes. A network with a burst of packet
414 > loss that long has problems other than ROC synchronization.
415 >
416 > There is a higher sensitivity to loss at the very outset of an SRTP
417 > stream. If the sender's initial sequence number is close to the
418 > maximum value of 2^16-1, and all packets are lost from the initial
419 > packet until the sequence number cycles back to zero, the sender
420 > will increment its ROC, but the receiver will not. The receiver
421 > cannot determine that the initial packets were lost and that
422 > sequence-number rollover has occurred. In this case, the receiver's
423 > ROC would be zero whereas the sender's ROC would be one, while their
424 > sequence numbers would be so close that the ROC-guessing algorithm
425 > could not detect this fact.
426 >
427 > There is a simple solution to this problem: the SRTP sender should
428 > randomly select an initial sequence number that is always less than
429 > 2^15. This ensures correct SRTP operation so long as fewer than 2^15
430 > initial packets are lost in succession, which is within the maximum
431 > tolerance of SRTP packet-index determination (see Appendix A and
432 > page 14, first paragraph of RFC 3711). An SRTP receiver should
433 > carefully implement the index-guessing algorithm. A naive
434 > implementation can unintentionally guess the value of
435 > 0xffffffffffffLL whenever the SEQ in the packet is greater than 2^15
436 > and the locally stored SEQ and ROC are zero. (This can happen when
437 > the implementation fails to treat those zero values as a special
438 > case.)
439 >
440 > When ROC synchronization is lost, the receiver will not be able to
441 > properly process the packets. If anti-replay protection is turned
442 > on, then the desynchronization will appear as a burst of replay
443 > check failures. Otherwise, if authentication is being checked, then
444 > it will appear as a burst of authentication failures. Otherwise, if
445 > encryption is being used, the desynchronization may not be detected
446 > by the SRTP layer, and the packets may be improperly decrypted.
447
448 However, modern libSRTP (as of 1.0.1[1]) now mentions the following in
449 their README.md[2]:
450
451 > The sequence number in the rtp packet is used as the low 16 bits of
452 > the sender's local packet index. Note that RTP will start its
453 > sequence number in a random place, and the SRTP layer just jumps
454 > forward to that number at its first invocation. An earlier version
455 > of this library used initial sequence numbers that are less than
456 > 32,768; this trick is no longer required as the
457 > rdbx_estimate_index(...) function has been made smarter.
458
459 So truncating our initial sequence number to 15 bit is no longer
460 necessary.
461
462 1. https://github.com/cisco/libsrtp/blob/0eb007f0dc611f27cbfe0bf9855ed85182496cec/CHANGES#L271-L289
463 2. https://github.com/cisco/libsrtp/blob/2de20dd9e9c8afbaf02fcf5d4048ce1ec9ddc0ae/README.md#implementation-notes
464
465
466 #### core_unreal.c: Fix memory leak in ast_unreal_new_channels()
467 Author: George Joseph
468 Date: 2024-10-15
469
470 When the channel tech is multistream capable, the reference to
471 chan_topology was passed to the new channel. When the channel tech
472 isn't multistream capable, the reference to chan_topology was never
473 released. "Local" channels are multistream capable so it didn't
474 affect them but the confbridge "CBAnn" and the bridge_media
475 "Recorder" channels are not so they caused a leak every time one
476 of them was created.
477
478 Also added tracing to ast_stream_topology_alloc() and
479 stream_topology_destroy() to assist with debugging.
480
481 Resolves: #938
482
483 #### dnsmgr.c: dnsmgr_refresh() incorrectly flags change with DNS round-robin
484 Author: Allan Nathanson
485 Date: 2024-09-29
486
487 The dnsmgr_refresh() function checks to see if the IP address associated
488 with a name/service has changed. The gotcha is that the ast_get_ip_or_srv()
489 function only returns the first IP address returned by the DNS query. If
490 there are multiple IPs associated with the name and the returned order is
491 not consistent (e.g. with DNS round-robin) then the other IP addresses are
492 not included in the comparison and the entry is flagged as changed even
493 though the IP is still valid.
494
495 Updated the code to check all IP addresses and flag a change only if the
496 original IP is no longer valid.
497
498 Resolves: #924
499
500 #### geolocation.sample.conf: Fix comment marker at end of file
501 Author: George Joseph
502 Date: 2024-10-08
503
504 Resolves: #937
505
506 #### func_base64.c: Ensure we set aside enough room for base64 encoded data.
507 Author: Sean Bright
508 Date: 2024-10-08
509
510 Reported by SingularTricycle on IRC.
511
512 Fixes #940
513
514
515 #### app_dial: Fix progress timeout.
516 Author: Naveen Albert
517 Date: 2024-10-03
518
519 Under some circumstances, the progress timeout feature added in commit
520 320c98eec87c473bfa814f76188a37603ea65ddd does not work as expected,
521 such as if there is no media flowing. Adjust the waitfor call to
522 explicitly use the progress timeout if it would be reached sooner than
523 the answer timeout to ensure we handle the timers properly.
524
525 Resolves: #821
526
527 #### chan_dahdi: Never send MWI while off-hook.
528 Author: Naveen Albert
529 Date: 2024-10-01
530
531 In some circumstances, it is possible for the do_monitor thread to
532 erroneously think that a line is on-hook and send an MWI FSK spill
533 to it when the line is really off-hook and no MWI should be sent.
534 Commit 0a8b3d34673277b70be6b0e8ac50191b1f3c72c6 previously fixed this
535 issue in a more readily encountered scenario, but it has still been
536 possible for MWI to be sent when it shouldn't be. To robustly fix
537 this issue, query DAHDI for the hook status to ensure we don't send
538 MWI on a line that is actually still off hook.
539
540 Resolves: #928
541
542 #### manager.c: Add unit test for Originate app and appdata permissions
543 Author: George Joseph
544 Date: 2024-10-03
545
546 This unit test checks that dialplan apps and app data specified
547 as parameters for the Originate action are allowed with the
548 permissions the user has.
549
550
551 #### alembic: Drop redundant voicemail_messages index.
552 Author: Sean Bright
553 Date: 2024-09-26
554
555 The `voicemail_messages_dir` index is a left prefix of the table's
556 primary key and therefore unnecessary.
557
558
559 #### res_agi.c: Ensure SIGCHLD handler functions are properly balanced.
560 Author: Sean Bright
561 Date: 2024-09-30
562
563 Calls to `ast_replace_sigchld()` and `ast_unreplace_sigchld()` must be
564 balanced to ensure that we can capture the exit status of child
565 processes when we need to. This extends to functions that call
566 `ast_replace_sigchld()` and `ast_unreplace_sigchld()` such as
567 `ast_safe_fork()` and `ast_safe_fork_cleanup()`.
568
569 The primary change here is ensuring that we do not call
570 `ast_safe_fork_cleanup()` in `res_agi.c` if we have not previously
571 called `ast_safe_fork()`.
572
573 Additionally we reinforce some of the documentation and add an
574 assertion to, ideally, catch this sooner were this to happen again.
575
576 Fixes #922
577
578
579 #### main, res, tests: Fix compilation errors on FreeBSD.
580 Author: Naveen Albert
581 Date: 2024-09-29
582
583 asterisk.c, manager.c: Increase buffer sizes to avoid truncation warnings.
584 config.c: Include header file for WIFEXITED/WEXITSTATUS macros.
585 res_timing_kqueue: Use more portable format specifier.
586 test_crypto: Use non-linux limits.h header file.
587
588 Resolves: #916
589
590 #### res_rtp_asterisk: Fix dtls timer issues causing FRACKs and SEGVs
591 Author: George Joseph
592 Date: 2024-09-16
593
594 In dtls_srtp_handle_timeout(), when DTLSv1_get_timeout() returned
595 success but with a timeout of 0, we were stopping the timer and
596 decrementing the refcount on instance but not resetting the
597 timeout_timer to -1. When dtls_srtp_stop_timeout_timer()
598 was later called, it was atempting to stop a stale timer and could
599 decrement the refcount on instance again which would then cause
600 the instance destructor to run early. This would result in either
601 a FRACK or a SEGV when ast_rtp_stop(0 was called.
602
603 According to the OpenSSL docs, we shouldn't have been stopping the
604 timer when DTLSv1_get_timeout() returned success and the new timeout
605 was 0 anyway. We should have been calling DTLSv1_handle_timeout()
606 again immediately so we now reschedule the timer callback for
607 1ms (almost immediately).
608
609 Additionally, instead of scheduling the timer callback at a fixed
610 interval returned by the initial call to DTLSv1_get_timeout()
611 (usually 999 ms), we now reschedule the next callback based on
612 the last call to DTLSv1_get_timeout().
613
614 Resolves: #487
615
616 #### manager.c: Restrict ModuleLoad to the configured modules directory.
617 Author: Ben Ford
618 Date: 2024-09-25
619
620 When using the ModuleLoad AMI action, it was possible to traverse
621 upwards through the directories to files outside of the configured
622 modules directory. We decided it would be best to restrict access to
623 modules exclusively in the configured directory. You will now get an
624 error when the specified module is outside of this limitation.
625
626 Fixes: #897
627
628 UserNote: The ModuleLoad AMI action now restricts modules to the
629 configured modules directory.
630
631
632 #### res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`
633 Author: jiangxc
634 Date: 2024-07-17
635
636 When using the speech recognition module, crashes can occur
637 sporadically due to a "double free or corruption (out)" error. Now, in
638 the section where the audio stream is being captured in a loop, each
639 time after releasing fr, it is set to NULL to prevent repeated
640 deallocation.
641
642 Fixes #772
643
644
645 #### cdr_custom: Allow absolute filenames.
646 Author: Sean Bright
647 Date: 2024-09-26
648
649 A follow up to #893 that brings the same functionality to
650 cdr_custom. Also update the sample configuration files to note support
651 for absolute paths.
652
653
654 #### astfd.c: Avoid calling fclose with NULL argument.
655 Author: Naveen Albert
656 Date: 2024-09-24
657
658 Don't pass through a NULL argument to fclose, which is undefined
659 behavior, and instead return -1 and set errno appropriately. This
660 also avoids a compiler warning with glibc 2.38 and newer, as glibc
661 commit 71d9e0fe766a3c22a730995b9d024960970670af
662 added the nonnull attribute to this argument.
663
664 Resolves: #900
665
666 #### channel: Preserve CHANNEL(userfield) on masquerade.
667 Author: Peter Jannesen
668 Date: 2024-09-20
669
670 In certain circumstances a channel may undergo an operation
671 referred to as a masquerade. If this occurs the CHANNEL(userfield)
672 value was not preserved causing it to get lost. This change makes
673 it so that this field is now preserved.
674
675 Fixes: #882
676
677 #### cel_custom: Allow absolute filenames.
678 Author: Peter Jannesen
679 Date: 2024-09-20
680
681 If a filename starts with a '/' in cel_custom [mappings] assume it is
682 a absolute file path and not relative filename/path to
683 AST_LOG_DIR/cel_custom/
684
685
686 #### app_voicemail: Fix ill-formatted pager emails with custom subject.
687 Author: Naveen Albert
688 Date: 2024-09-24
689
690 Add missing end-of-headers newline to pager emails with custom
691 subjects, since this was missing from this code path.
692
693 Resolves: #902
694
695 #### res_pjsip_pubsub: Persist subscription 'generator_data' in sorcery
696 Author: Sean Bright
697 Date: 2024-09-23
698
699 Fixes #895
700
701
702 #### Fix application references to Background
703 Author: George Joseph
704 Date: 2024-09-20
705
706 The app is actually named "BackGround" but several references
707 in XML documentation were spelled "Background" with the lower
708 case "g". This was causing documentation links to return
709 "not found" messages.
710
711
712 #### manager.conf.sample: Fix mathcing typo
713 Author: George Joseph
714 Date: 2024-09-24
715
716
717 #### manager: Enhance event filtering for performance
718 Author: George Joseph
719 Date: 2024-07-31
720
721 UserNote: You can now perform more granular filtering on events
722 in manager.conf using expressions like
723 `eventfilter(name(Newchannel),header(Channel),method(starts_with)) = PJSIP/`
724 This is much more efficient than
725 `eventfilter = Event: Newchannel.*Channel: PJSIP/`
726 Full syntax guide is in configs/samples/manager.conf.sample.
727
728
729 #### manager.c: Split XML documentation to manager_doc.xml
730 Author: George Joseph
731 Date: 2024-08-01
732
733
734 #### db.c: Remove limit on family/key length
735 Author: George Joseph
736 Date: 2024-09-11
737
738 Consumers like media_cache have been running into issues with
739 the previous astdb "/family/key" limit of 253 bytes when needing
740 to store things like long URIs. An Amazon S3 URI is a good example
741 of this. Now, instead of using a static 256 byte buffer for
742 "/family/key", we use ast_asprintf() to dynamically create it.
743
744 Both test_db.c and test_media_cache.c were also updated to use
745 keys/URIs over the old 253 character limit.
746
747 Resolves: #881
748
749 UserNote: The `ast_db_*()` APIs have had the 253 byte limit on
750 "/family/key" removed and will now accept families and keys with a
751 total length of up to SQLITE_MAX_LENGTH (currently 1e9!). This
752 affects the `DB*` dialplan applications, dialplan functions,
753 manager actions and `databse` CLI commands. Since the
754 media_cache also uses the `ast_db_*()` APIs, you can now store
755 resources with URIs longer than 253 bytes.
756
757