Debian Codegraph @

ChangeLogs/ChangeLog-22.9.0.md

raw symbols SCIP
1
2 ## Change Log for Release asterisk-22.9.0
3
4 ### Links:
5
6 - [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-22.9.0.html)
7 - [GitHub Diff](https://github.com/asterisk/asterisk/compare/22.8.2...22.9.0)
8 - [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-22.9.0.tar.gz)
9 - [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
10
11 ### Summary:
12
13 - Commits: 50
14 - Commit Authors: 21
15 - Issues Resolved: 34
16 - Security Advisories Resolved: 0
17
18 ### User Notes:
19
20 - #### acl: Add ACL support to http and ari
21 A new section, type=restriction has been added to http.conf
22 to allow an uri prefix based acl to be configured. See
23 http.conf.sample for examples and more information.
24 The user section of ari.conf can now contain an acl configuration
25 to restrict users access. See ari.conf.sample for examples and more
26 information
27
28 - #### res_rtp_asterisk.c: Fix DTLS packet drop when TURN loopback re-injection occurs before ICE candidate check
29 WebRTC calls using TURN configured in rtp.conf (turnaddr,
30 turnusername, turnpassword) will now correctly complete DTLS/SRTP
31 negotiation. Previously all DTLS packets were silently dropped due to
32 the loopback re-injection address not being in the ICE active candidate
33 list.
34
35 - #### docs: Add "Provided-by" to doc XML and CLI output.
36 The CLI help for applications, functions, manager commands and
37 manager events now shows the module that provides its functionality.
38
39 - #### CDR/CEL Custom Performance Improvements
40 Significant performance improvements have been made to the
41 cdr_custom, cdr_sqlite3_custom, cel_custom and cel_sqlite3_custom modules.
42 See the new sample config files for those modules to see how to benefit
43 from them.
44
45 - #### chan_websocket: Add media direction.
46 WebSocket now supports media direction, allowing for
47 unidirectional media. This is done from the perspective of the
48 application and can be set via channel origination, external media, or
49 commands sent from the application. Check out
50 https://docs.asterisk.org/Configuration/Channel-Drivers/WebSocket/ for
51 more.
52
53 - #### app_queue: Add 'prio' setting to the 'force_longest_waiting_caller' option
54 The 'force_longest_waiting_caller' option now supports a 'prio' setting.
55 When set to 'prio', calls are offered by priority first, then by wait time.
56
57 - #### Upgrade bundled pjproject to 2.16.
58 Bundled pjproject has been upgraded to 2.16. For more
59 information on what all is included in this change, check out the
60 pjproject Github page: https://github.com/pjsip/pjproject/releases
61
62 - #### res_pjsip_header_funcs: Add new PJSIP_INHERITABLE_HEADER dialplan function
63 A new PJSIP_HEADER option has been added that allows
64 inheriting pjsip headers from the inbound to the outbound bridged
65 channel.
66 Example- same => n,Set(PJSIP_INHERITABLE_HEADER(add,X-custom-1)=alpha)
67 will add X-custom-1: alpha to the outbound pjsip channel INVITE
68 upon Dial.
69
70 - #### app_queue: Fix rN raise_penalty ignoring min_penalty in calc_metric
71 Fixes an issue where QUEUE_RAISE_PENALTY=rN could raise a member’s penalty below QUEUE_MIN_PENALTY during member selection. This could allow members intended to be excluded to be selected. The queue now consistently respects the minimum penalty when raising penalties, aligning member selection behavior with queue empty checks and documented rN semantics.
72
73
74 ### Upgrade Notes:
75
76
77 ### Developer Notes:
78
79
80 ### Commit Authors:
81
82 - Alexei Gradinari: (1)
83 - Alexis Hadjisotiriou: (3)
84 - Arcadiy Ivanov: (1)
85 - Ben Ford: (2)
86 - George Joseph: (10)
87 - Jasper Hafkenscheid: (1)
88 - Joshua C. Colp: (2)
89 - Julian C. Dunn: (1)
90 - Michal Hajek: (1)
91 - Mike Bradeen: (5)
92 - Naveen Albert: (7)
93 - Prashant Srivastav: (1)
94 - Robert Wilson: (1)
95 - Sean Bright: (2)
96 - Sven Kube: (1)
97 - Talha Asghar: (1)
98 - Tinet-mucw: (2)
99 - hishamway: (1)
100 - nappsoft: (1)
101 - phoneben: (4)
102 - serfreeman1337: (2)
103
104 ## Issue and Commit Detail:
105
106 ### Closed Issues:
107
108 - 449: [bug]: PJSIP confuses media address after INVITE requiring authentication
109 - 566: [bug]: core: SIGSEGV on DTMF when no timing modules loaded
110 - 1356: [bug]: MESSAGE requests should not contain a Contact header
111 - 1524: [bug]: PJSIP if sdp_session is blank the initial INVITE doesn't attach an SDP offer, worked in chan_sip
112 - 1611: [bug]: asterisk deadlocked on start sometimes
113 - 1612: [improvement]: pjsip: Upgrade bundled version to pjproject 2.16
114 - 1637: [improvement]: force_longest_waiting_caller should also consider caller priority
115 - 1641: [bug]: res_pjsip_config_wizard: Endpoints fail to update when Named ACLs change after reload
116 - 1651: [bug]: Asterisk crashes with munmap_chunk() when using sorcery realtime for PJSIP registration objects
117 - 1657: [bug]: Wrong dtmf payload is used when inbound invite contains 8K and 16K, and outgoing leg is using G722 and SRTP
118 - 1670: [new-feature]: Add new option to PJSIP_HEADER to pass headers from the inbound to outbound channel.
119 - 1691: [bug]: force_longest_waiting_caller stops offering calls if a call joins at the first position
120 - 1703: [bug]: res_pjsip_pubsub: ao2 reference leak of subscription tree in ast_sip_subscription
121 - 1707: [bug]: chan_iax2: Crash when processing video frames with negative length
122 - 1716: [bug]: Ghost call when UAC didn't respond with 487 for a cancel request from server even after original call hangup.
123 - 1724: [improvement]: say.c - added language support for pashto and dari
124 - 1730: [bug]: CPP channel storage get_by_name_prefix does not check prefix match
125 - 1755: [bug]: app_dial, utils.h: Compilation failure with -Wold-style-declaration and -Wdiscarded-qualifiers
126 - 1781: [bug]: More discarded-qualifiers errors with gcc 15.2.1
127 - 1783: [bug]: Several unused-but-set-variable warnings with gcc 16
128 - 1785: [bug]: chan_websocket doesn’t work with genericplc and transcoding
129 - 1786: [bug]: chan_dahdi: A few more discarded-qualifiers errors not caught previously
130 - 1795: [bug]: DTLS packets dropped when TURN configured in rtp.conf due to loopback re-injection occurring before ICE candidate source check
131 - 1797: [bug]: Potential logic issue in translated frame write loop (main/file.c)
132 - 1802: [improvement]: app_dial: Channel name should be included in warnings during wait_for_answer
133 - 1804: [new-feature]: dsp.c: Add support for R2 signaling
134 - 1814: [bug]: A pjsip transport with an invalid config can cause issues with other transports
135 - 1816: [bug]: ARI: RTPAUDIO channel vars aren't set if call hung up by ARI.
136 - 1819: [bug]: When a 302 is received from a UAS, the cause and tech_cause codes set on the channel are incorrect.
137 - 1831: [bug]:raise_exception() and EXCEPTION() read use channel datastores without holding ast_channel_lock
138 - 1833: [bug]: Address security vulnerabilities in pjproject
139 - 1844: [bug]: cdrel_custom isn't respecting the default time format for CEL records
140 - 1845: [bug]:res_cdrel_custom produces wrong float timestamps
141 - 1852: [bug]: res_cdrel_custom: connection to the sqlite3 database closes from time to time
142
143 ### Commits By Author:
144
145 - #### Alexei Gradinari (1):
146 - res_pjsip_pubsub: Fix ao2 reference leak of subscription tree in ast_sip_subscription
147
148 - #### Alexis Hadjisotiriou (3):
149 - channel: Prevent crash during DTMF emulation when no timing module is loaded
150 - res_pjsip_messaging: Remove Contact header from out-of-dialog MESSAGE as per RFC3428
151 - pjsip_configuration: Ensure s= and o= lines in SDP are never empty
152
153 - #### Arcadiy Ivanov (1):
154 - res_pjsip_session: Make sure NAT hook runs when packet is retransmitted for whatever reason.
155
156 - #### Ben Ford (2):
157 - chan_websocket_doc.xml: Add d(media_direction) option.
158 - chan_websocket: Add media direction.
159
160 - #### George Joseph (10):
161 - res_cdrel_custom: Resolve several formatting issues.
162 - xmldoc.c: Fix memory leaks in handling of provided_by.
163 - SECURITY.md: Update with additional instructions.
164 - chan_pjsip: Set correct cause codes for non-2XX responses.
165 - rtp: Set RTPAUDIOQOS variables when ast_softhangup is called.
166 - res_pjsip: Remove temp transport state when a transport fails to load.
167 - docs: Add "Provided-by" to doc XML and CLI output.
168 - CDR/CEL Custom Performance Improvements
169 - chan_websocket: Remove silence generation and frame padding.
170 - app_amd: Remove errant space in documentation for totalAnalysisTime.
171
172 - #### Jasper Hafkenscheid (1):
173 - channelstorage_cpp_map_name_id: Fix get_by_name_prefix prefix match
174
175 - #### Joshua C. Colp (2):
176 - build: Fix GCC discarded-qualifiers const errors.
177 - endpoints: Allow access to latest snapshot directly.
178
179 - #### Julian C. Dunn (1):
180 - astconfigparser.py: Fix regex pattern error by properly escaping string
181
182 - #### Michal Hajek (1):
183 - res_pjsip_config_wizard: Force reload on Named ACL change events
184
185 - #### Mike Bradeen (5):
186 - res_pjsip: Address pjproject security vulnerabilities
187 - acl: Add ACL support to http and ari
188 - res_rtp_asterisk: use correct sample rate lookup to account for g722
189 - Upgrade bundled pjproject to 2.16.
190 - res_pjsip_header_funcs: Add new PJSIP_INHERITABLE_HEADER dialplan function
191
192 - #### Naveen Albert (7):
193 - dsp.c: Add support for detecting R2 signaling tones.
194 - app_dial: Include channel name in warnings during wait_for_answer.
195 - chan_dahdi: Fix discarded-qualifiers errors.
196 - build: Fix unused-but-set-variable warnings with gcc 16.
197 - build: Fix another GCC discarded-qualifiers const error.
198 - chan_iax2: Fix crash due to negative length frame lengths.
199 - app_dial, utils.h: Avoid old style declaration and discarded qualifier.
200
201 - #### Prashant Srivastav (1):
202 - fix: Add macOS (Darwin) compatibility for building Asterisk
203
204 - #### Robert Wilson (1):
205 - res_rtp_asterisk.c: Fix DTLS packet drop when TURN loopback re-injection occurs before ICE candidate check
206
207 - #### Sean Bright (2):
208 - resource_channels.c: Fix validation response for externalMedia with AudioSockets
209 - res_pjsip_outbound_registration.c: Prevent crash if load_module() fails
210
211 - #### Sven Kube (1):
212 - res_audiosocket: Fix header read loop to use correct buffer offset
213
214 - #### Talha Asghar (1):
215 - say.c: added language support for pashto and dari
216
217 - #### Tinet-mucw (2):
218 - pbx: Hold channel lock for exception datastore access
219 - main/file: fix translated-frame write loop to use current frame
220
221 - #### hishamway (1):
222 - res_pjsip_session.c: Prevent INVITE failover when session is cancelled
223
224 - #### nappsoft (1):
225 - res_cdrel_custom: do not free config when no new config was loaded
226
227 - #### phoneben (4):
228 - manager.c : Fix CLI event display
229 - app_queue: Queue Timing Parity with Dial() and Accurate Wait Metrics
230 - stasis.c: Fix deadlock in stasis_topic_pool_get_topic during module load
231 - app_queue: Fix rN raise_penalty ignoring min_penalty in calc_metric
232
233 - #### serfreeman1337 (2):
234 - app_queue: Add 'prio' setting to the 'force_longest_waiting_caller' option
235 - app_queue: Only compare calls at 1st position across queues when forcing longest waiting caller.
236
237 ### Commit List:
238
239 - res_cdrel_custom: do not free config when no new config was loaded
240 - res_cdrel_custom: Resolve several formatting issues.
241 - res_pjsip: Address pjproject security vulnerabilities
242 - pbx: Hold channel lock for exception datastore access
243 - xmldoc.c: Fix memory leaks in handling of provided_by.
244 - SECURITY.md: Update with additional instructions.
245 - res_audiosocket: Fix header read loop to use correct buffer offset
246 - manager.c : Fix CLI event display
247 - chan_pjsip: Set correct cause codes for non-2XX responses.
248 - res_pjsip_config_wizard: Force reload on Named ACL change events
249 - rtp: Set RTPAUDIOQOS variables when ast_softhangup is called.
250 - channel: Prevent crash during DTMF emulation when no timing module is loaded
251 - res_pjsip: Remove temp transport state when a transport fails to load.
252 - res_pjsip_messaging: Remove Contact header from out-of-dialog MESSAGE as per RFC3428
253 - acl: Add ACL support to http and ari
254 - res_rtp_asterisk.c: Fix DTLS packet drop when TURN loopback re-injection occurs before ICE candidate check
255 - dsp.c: Add support for detecting R2 signaling tones.
256 - app_dial: Include channel name in warnings during wait_for_answer.
257 - main/file: fix translated-frame write loop to use current frame
258 - docs: Add "Provided-by" to doc XML and CLI output.
259 - chan_websocket_doc.xml: Add d(media_direction) option.
260 - resource_channels.c: Fix validation response for externalMedia with AudioSockets
261 - CDR/CEL Custom Performance Improvements
262 - chan_websocket: Remove silence generation and frame padding.
263 - chan_websocket: Add media direction.
264 - fix: Add macOS (Darwin) compatibility for building Asterisk
265 - astconfigparser.py: Fix regex pattern error by properly escaping string
266 - res_rtp_asterisk: use correct sample rate lookup to account for g722
267 - res_pjsip_outbound_registration.c: Prevent crash if load_module() fails
268 - pjsip_configuration: Ensure s= and o= lines in SDP are never empty
269 - res_pjsip_session: Make sure NAT hook runs when packet is retransmitted for whatever reason.
270 - chan_dahdi: Fix discarded-qualifiers errors.
271 - build: Fix unused-but-set-variable warnings with gcc 16.
272 - build: Fix another GCC discarded-qualifiers const error.
273 - chan_iax2: Fix crash due to negative length frame lengths.
274 - build: Fix GCC discarded-qualifiers const errors.
275 - endpoints: Allow access to latest snapshot directly.
276 - app_dial, utils.h: Avoid old style declaration and discarded qualifier.
277 - app_queue: Add 'prio' setting to the 'force_longest_waiting_caller' option
278 - Upgrade bundled pjproject to 2.16.
279 - res_pjsip_header_funcs: Add new PJSIP_INHERITABLE_HEADER dialplan function
280 - app_queue: Queue Timing Parity with Dial() and Accurate Wait Metrics
281 - stasis.c: Fix deadlock in stasis_topic_pool_get_topic during module load
282 - app_queue: Fix rN raise_penalty ignoring min_penalty in calc_metric
283 - app_queue: Only compare calls at 1st position across queues when forcing longest waiting caller.
284 - channelstorage_cpp_map_name_id: Fix get_by_name_prefix prefix match
285 - app_amd: Remove errant space in documentation for totalAnalysisTime.
286 - say.c: added language support for pashto and dari
287 - res_pjsip_session.c: Prevent INVITE failover when session is cancelled
288 - res_pjsip_pubsub: Fix ao2 reference leak of subscription tree in ast_sip_subscription
289
290 ### Commit Details:
291
292 #### res_cdrel_custom: do not free config when no new config was loaded
293 Author: nappsoft
294 Date: 2026-04-02
295
296 When the res_cdrel_custom modules is reloaded and the config has not been changed asterisk should not free the old config. Otherwise the connection to the database will be closed and no new connection will be opened.
297
298 Resolves: #1852
299
300 #### res_cdrel_custom: Resolve several formatting issues.
301 Author: George Joseph
302 Date: 2026-03-31
303
304 Several issues are resolved:
305
306 * Internally, floats were used for timestamp values but this could result
307 in wrapping so they've been changed to doubles.
308
309 * Historically, the default CEL eventtime format is `<seconds>.<microseconds>`
310 with `<microseconds>` always being 6 digits. This should have continued to be
311 the case but res_cdrel_custom wasn't checking the `dateformat` setting in
312 cel.conf and was defaulting to `%F %T`. res_cdrel_custom now gets the default
313 date format from cel.conf, which will be whatever the `dateformat` parameter
314 is set to or `<seconds>.<microseconds>` if not set.
315
316 * The timeval field formatter for both CDR and CEL wasn't handling custom
317 strftime format strings correctly. This is now fixed so you should be able
318 to specifiy custom strftime format strings for the CEL `eventtime` and CDR
319 `start`, `answer` and `end` fields. For example: `eventtime(%FT%T%z)`.
320
321 Resolves: #1844
322 Resolves: #1845
323
324 #### res_pjsip: Address pjproject security vulnerabilities
325 Author: Mike Bradeen
326 Date: 2026-03-23
327
328 Address the following pjproject security vulnerabilities
329
330 [GHSA-j29p-pvh2-pvqp - Buffer overflow in ICE with long username](https://github.com/pjsip/pjproject/security/advisories/GHSA-j29p-pvh2-pvqp)
331 [GHSA-8fj4-fv9f-hjpc - Heap use-after-free in PJSIP presense subscription termination header](https://github.com/pjsip/pjproject/security/advisories/GHSA-8fj4-fv9f-hjpc)
332 [GHSA-g88q-c2hm-q7p7 - ICE session use-after-free race conditions](https://github.com/pjsip/pjproject/security/advisories/GHSA-g88q-c2hm-q7p7)
333 [GHSA-x5pq-qrp4-fmrj - Out-of-bounds read in SIP multipart parsing](https://github.com/pjsip/pjproject/security/advisories/GHSA-x5pq-qrp4-fmrj)
334
335 Resolves: #1833
336
337 #### pbx: Hold channel lock for exception datastore access
338 Author: Tinet-mucw
339 Date: 2026-03-20
340
341 ast_channel_datastore_find() and ast_channel_datastore_add() must only be
342 called while the channel is locked (see channel.h). raise_exception() and the
343 EXCEPTION dialplan function read path accessed the exception datastore without
344 holding ast_channel_lock, which could corrupt the per-channel datastore list
345 under concurrency and lead to crashes during teardown (e.g. double free in
346 ast_datastore_free).
347
348 Resolves: #1831
349
350 #### xmldoc.c: Fix memory leaks in handling of provided_by.
351 Author: George Joseph
352 Date: 2026-03-17
353
354 Added a few calls to ast_xml_free_attr() to squash memory leaks when handling
355 "provided_by".
356
357 #### SECURITY.md: Update with additional instructions.
358 Author: George Joseph
359 Date: 2026-03-19
360
361 Also added line breaks for people reading this file directly
362 from the code base.
363
364 #### res_audiosocket: Fix header read loop to use correct buffer offset
365 Author: Sven Kube
366 Date: 2026-03-17
367
368 The PR #1522 introduced the header read loop for audiosocket packets
369 which does not handle partial header reads correctly. This commit
370 adds the missing buffer offsets.
371
372 #### manager.c : Fix CLI event display
373 Author: phoneben
374 Date: 2026-03-16
375
376 manager.c: Fix CLI event display
377
378 - `manager show events`: fix event names being truncated at 20 characters, widen column to 28 to accommodate the longest registered event name
379 - `manager show events`: skip duplicate entries caused by multiple modules registering the same event name, list is already sorted so adjacent name comparison is sufficient
380
381 #### chan_pjsip: Set correct cause codes for non-2XX responses.
382 Author: George Joseph
383 Date: 2026-03-10
384
385 Redirects initiated by 302 response codes weren't handled correctly
386 when setting the hangup cause code and tech cause code on the responding
387 channel. They're now set to 23 (REDIRECTED_TO_NEW_DESTINATION) and
388 302 (Moved permanently). Other non-2XX response codes also had issues.
389
390 A new API ast_channel_dialed_causes_iterator() was added to retrieve
391 the hangup cause codes for a channel.
392
393 chan_pjsip_session_end() in chan_pjsip has been refactored to set the
394 correct cause codes on a channel based on the cause codes added by
395 chan_pjsip_incoming_response_update_cause(). Copious amounts of
396 debugging and comments were also added.
397
398 Resolves: #1819
399
400 #### res_pjsip_config_wizard: Force reload on Named ACL change events
401 Author: Michal Hajek
402 Date: 2025-12-10
403
404 Currently, endpoints created via the PJSIP Config Wizard do not update
405 their ACL rules if the underlying Named ACL (in acl.conf) changes.
406 This occurs because the wizard relies on file timestamp and content
407 caching of pjsip_wizard.conf, which remains unchanged during an external
408 ACL update. As a result, endpoints retain stale ACL rules even after
409 a reload.
410
411 This patch updates res_pjsip_config_wizard to subscribe to the
412 ast_named_acl_change_type Stasis event. A local generation counter is
413 incremented whenever an ACL change event is received.
414
415 During a reload, the wizard compares the current local generation against
416 the generation stored in the wizard object. If a change is detected:
417 1. The file cache optimization (CONFIG_FLAG_FILEUNCHANGED) is bypassed.
418 2. Wizard objects utilizing 'acl' or 'contact_acl' are forced to update,
419 ensuring they pick up the new IP rules.
420
421 Signed-off-by: Michal Hajek [email protected]
422
423 Fixes: #1641
424
425 #### rtp: Set RTPAUDIOQOS variables when ast_softhangup is called.
426 Author: George Joseph
427 Date: 2026-03-06
428
429 If a channel in Stasis/ARI is hung up by the channel driver, the RTPAUDIOQOS
430 variables are set before the channel leaves Stasis and are therefore
431 available to the ARI app via ChannelVarset events. If the channel is hung up
432 by ARI however, the channel leaves Stasis before the RTPAUDIOQOS variables
433 are set so the app may not get the ChannelVarset events.
434
435 We now set the RTPAUDIOQOS variables when ast_softhangup() is called as well
436 as when the channel driver hangs up a channel. Since ARI hangups call
437 ast_softhangup(), the variables will be set before the channel leaves Stasis
438 and the app should get the ChannelVarset events.
439 ast_rtp_instance_set_stats_vars(), which actually sets the variables, now
440 checks to see if the variables are already set before attempting to set them.
441 This prevents double messages from being generated.
442
443 Resolves: #1816
444
445 #### channel: Prevent crash during DTMF emulation when no timing module is loaded
446 Author: Alexis Hadjisotiriou
447 Date: 2026-02-26
448
449 Description:
450 When Asterisk is running without a timing module, attempting to process DTMF
451 triggers a segmentation fault. This occurs because the system
452 attempts to access a null timing file descriptor when setting up the
453 DTMF emulation timer.
454
455 This fix ensures that the system checks for a valid timing source before
456 attempting to start the DTMF emulation timer. If no timing module is
457 present, it logs a warning and skips the emulation instead of crashing
458 the process.
459
460 Changes:
461 - Modified main/channel.c to add a safety check within the __ast_read function.
462 - Implemented a graceful return path when no timing source is available
463 - Added a LOG_WARNING to inform the administrator that DTMF emulation
464 was skipped due to missing timing modules.
465
466 Testing:
467 - Disabled all timing_ modules in modules.conf and confirmed with
468 'timing test'.
469 - Reproduced the crash by modifying the dialplan with:
470 exten => 707,1,NoOp(Starting DTMF - No Timing Mode)
471 same => n,Answer()
472 same => n,Background(demo-congrats)
473 same => n,WaitExten(10)
474 same => n,Hangup()
475 And calling 707 followed by 1
476 - Verified that with the fix applied, the system logs "No timing module
477 loaded; skipping DTMF timer" and continues dialplan
478 execution without crashing.
479 - Confirmed stability during concurrent media sessions and DTMF input.
480
481 Fixes: #566
482
483 #### res_pjsip: Remove temp transport state when a transport fails to load.
484 Author: George Joseph
485 Date: 2026-03-06
486
487 If a pjsip transport (A) fails to load, its temporary state gets left behind
488 causing the next transport to load (B) to pick up some of its parameters,
489 including its name. This can cause B to have the correct name (B) in its
490 transport object but the wrong name (A) in its internal state object. When a
491 transport state is searched for later on, transport state B is returned but a
492 retrieval of the actual transport object will fail because B's transport
493 state id is actually "A" and transport "A" doesn't exist because it failed
494 to load.
495
496 remove_temporary_state() is now being called in all error paths in
497 config_transport.c functions that call find_or_create_temporary_state().
498
499 A bit of extra debugging was also added to res_pjsip_nat.c.
500
501 Resolves: #1814
502
503 #### res_pjsip_messaging: Remove Contact header from out-of-dialog MESSAGE as per RFC3428
504 Author: Alexis Hadjisotiriou
505 Date: 2026-01-19
506
507 According to RFC 3428 (Section 5), a Contact header is not required in a
508 MESSAGE request unless the sender wants to establish a session. This
509 patch ensures that the Contact header is removed from out-of-dialog
510 MESSAGE requests within res_pjsip_messaging.c.
511
512 Fixes: #1356
513
514 #### acl: Add ACL support to http and ari
515 Author: Mike Bradeen
516 Date: 2026-02-27
517
518 Add uri prefix based acl support to the built in http server.
519 This allows an acl to be added per uri prefix (ie '/metrics'
520 or '/ws') to restrict access.
521
522 Add user based acl support for ARI. This adds new acl options
523 to the user section of ari.conf to restrict access on a per
524 user basis.
525
526 resolves: #1799
527
528 UserNote: A new section, type=restriction has been added to http.conf
529 to allow an uri prefix based acl to be configured. See
530 http.conf.sample for examples and more information.
531 The user section of ari.conf can now contain an acl configuration
532 to restrict users access. See ari.conf.sample for examples and more
533 information
534
535 #### res_rtp_asterisk.c: Fix DTLS packet drop when TURN loopback re-injection occurs before ICE candidate check
536 Author: Robert Wilson
537 Date: 2026-03-03
538
539 When TURN is configured in rtp.conf, pjproject re-injects TURN packets
540 via 127.0.0.1 (the loopback address). The DTLS packet handler checks the
541 source address against the ICE active candidate list before the loopback
542 address substitution runs, causing the packet to be silently dropped as
543 the source 127.0.0.1 is not in the candidate list.
544
545 Fix by performing the loopback address substitution before the ICE
546 candidate source check in the DTLS path, mirroring the logic already
547 present in the non-DTLS RTP path.
548
549 Fixes: #1795
550
551 UserNote: WebRTC calls using TURN configured in rtp.conf (turnaddr,
552 turnusername, turnpassword) will now correctly complete DTLS/SRTP
553 negotiation. Previously all DTLS packets were silently dropped due to
554 the loopback re-injection address not being in the ICE active candidate
555 list.
556
557 #### dsp.c: Add support for detecting R2 signaling tones.
558 Author: Naveen Albert
559 Date: 2026-03-01
560
561 Extend the existing DTMF/MF tone detection support by adding support
562 for R2 tones, another variant of MF (R1) signaling. Both forward
563 and backward signaling are supported.
564
565 Resolves: #1804
566
567 #### app_dial: Include channel name in warnings during wait_for_answer.
568 Author: Naveen Albert
569 Date: 2026-02-28
570
571 Include the channel name in warnings during wait_for_answer to make
572 them more useful and allow problematic channels to be easily identified.
573
574 Resolves: #1802
575
576 #### main/file: fix translated-frame write loop to use current frame
577 Author: Tinet-mucw
578 Date: 2026-02-27
579
580 write each translated frame from translator output.
581
582 Resolves: #1797
583
584 #### docs: Add "Provided-by" to doc XML and CLI output.
585 Author: George Joseph
586 Date: 2026-02-24
587
588 For application, function, manager, managerEvent, managerEventInstance
589 and info XML documentation nodes, the make_xml_documentation script will
590 add a "module" attribute if not already present. For XML in separate
591 "*_doc.xml" files, the script figures out the correct module name. For
592 documentation in the "main" directory, the module name is set to "builtin".
593
594 The CLI handlers for "core show application", "core show function",
595 "manager show command" and "manager show event", have been updated to
596 show the following after the Synopsis...
597
598 ```
599 [Provided By]
600 <modulename>
601 ```
602
603 For modules that provide additional "info" elements (like the technologies
604 do for Dial), the providing module has also been added.
605
606 ```
607 Technology: WebSocket Provided by: chan_websocket
608 WebSocket Dial Strings:
609 ...
610 ```
611
612 UserNote: The CLI help for applications, functions, manager commands and
613 manager events now shows the module that provides its functionality.
614
615 #### chan_websocket_doc.xml: Add d(media_direction) option.
616 Author: Ben Ford
617 Date: 2026-02-27
618
619 Adds documentation for the 'd' option to set media direction for
620 chan_websocket.
621
622 #### resource_channels.c: Fix validation response for externalMedia with AudioSockets
623 Author: Sean Bright
624 Date: 2026-03-01
625
626 The AudioSocket encapsulation for externalMedia requires a UUID to be
627 provided in the `data` parameter of the ARI call. If not provided, we
628 should return a 400 Bad Request instead of a 500 Internal Server
629 Error.
630
631 Pointed out by AVT in the community forum[1].
632
633 1: https://community.asterisk.org/t/externalmedia-audiosocket-on-asterisk-22/112149
634
635 #### CDR/CEL Custom Performance Improvements
636 Author: George Joseph
637 Date: 2026-01-27
638
639 There is a LOT of work in this commit but the TL;DR is that it takes
640 CEL processing from using 38% of the CPU instructions used by a call,
641 which is more than that used by the call processing itself, down to less
642 than 10% of the instructions.
643
644 So here's the deal... cdr_custom, cdr_sqlite3_custom, cel_custom
645 and cel_sqlite3_custom all shared one ugly trait...they all used
646 ast_str_substitute_variables() or pbx_substitute_variables_helper()
647 to resolve the dialplan functions used in their config files. Not only
648 are they both extraordinarily expensive, they both require a dummy
649 channel to be allocated and destroyed for each record written. For CDRs,
650 that's not too bad because we only write one CDR per call. For CELs however,
651 it's a disaster.
652
653 As far as source code goes, the modules basically all did the same thing.
654 Unfortunately, they did it badly. The config files simply contained long
655 opaque strings which were intepreted by ast_str_substitute_variables() or
656 pbx_substitute_variables_helper(), the very functions that ate all the
657 instructions. This meant introducing a new "advanced" config format much
658 like the advanced manager event filtering added to manager.conf in 2024.
659 Fortunately however, if the legacy config was recognizable, we were able to
660 parse it as an advanced config and gain the benefit. If not, then it
661 goes the legacy, and very expensive, route.
662
663 Given the commonality among the modules, instead of making the same
664 improvements to 4 modules then trying to maintain them over time, a single
665 module "res_cdrel_custom" was created that contains all of the common code.
666 A few bonuses became possible in the process...
667 * The cdr_custom and cel_custom modules now support JSON formatted output.
668 * The cdr_sqlite_custom and cel_sqlite3_custom modules no longer have
669 to share an Sqlite3 database.
670
671 Summary of changes:
672
673 A new module "res/res_cdrel_custom.c" has been created and the existing
674 cdr_custom, cdr_sqlite3_custom, cel_custom and cel_sqlite3_custom modules
675 are now just stubs that call the code in res_cdrel_custom.
676
677 res_cdrel_custom contains:
678 * A common configuration facility.
679 * Getters for both CDR and CEL fields that share the same abstraction.
680 * Formatters for all data types found in the ast_cdr and ast_event
681 structures that share the same abstraction.
682 * Common writers for the text file and database backends that, you guessed it,
683 share the same abstraction.
684
685 The result is that while there is certainly a net increase in the number of
686 lines in the code base, most of it is in the configuration handling at
687 load-time. The run-time instruction path length is now significanty shorter.
688
689 ```
690 Scenario Instructions Latency
691 =====================================================
692 CEL pre changes 38.49% 37.51%
693 CEL Advanced 9.68% 6.06%
694 CEL Legacy (auto-conv to adv) 9.95% 6.13%
695
696 CEL Sqlite3 pre changes 39.41% 39.90%
697 CEL Sqlite3 Advanced 25.68% 24.24%
698 CEL Sqlite3 Legacy (auto conv) 25.88% 24.53%
699
700 CDR pre changes 4.79% 2.95%
701 CDR Advanced 0.79% 0.47%
702 CDR Legacy (auto conv to adv) 0.86% 0.51%
703
704 CDR Sqlite3 pre changes 4.47% 2.89%
705 CEL Sqlite3 Advanced 2.16% 1.29%
706 CEL Sqlite3 Legacy (auto conv) 2.19% 1.30%
707 ```
708
709 Notes:
710 * We only write one CDR per call but every little bit helps.
711 * Sqlite3 still takes a fair amount of resources but the new config
712 makes a decent improvement.
713 * Legacy configs that we can't auto convert will still take the
714 "pre changes" path.
715
716 If you're interested in more implementation details, see the comments
717 at the top of the res_cdrel_custom.c file.
718
719 One minor fix to CEL is also included...Although TenantID was added to the
720 ast_event structure, it was always rendered as an empty string. It's now
721 properly rendered.
722
723 UserNote: Significant performance improvements have been made to the
724 cdr_custom, cdr_sqlite3_custom, cel_custom and cel_sqlite3_custom modules.
725 See the new sample config files for those modules to see how to benefit
726 from them.
727
728 #### chan_websocket: Remove silence generation and frame padding.
729 Author: George Joseph
730 Date: 2026-02-19
731
732 The original chan_websocket implementation attempted to improve the
733 call quality experience by generating silence frames to send to the core
734 when no media was being read from the websocket and padding frames with
735 silence when short frames were read from the websocket. Both of these
736 required switching the formats on the channel to slin for short periods
737 of time then switching them back to whatever format the websocket channel
738 was configured for. Unfortunately, the format switching caused issues
739 when transcoding was required and the transcode_via_sln option was enabled
740 in asterisk.conf (which it is by default). The switch would cause the
741 transcoding path to be incorrectly set resulting in malformed RTP packets
742 being sent back out to the caller on the other end which the caller heard
743 as loud noise.
744
745 After looking through the code and performing multiple listening tests,
746 the best solution to this problem was to just remove the code that was
747 attempting to generate the silence. There was no decrease in call quality
748 whatsoever and the code is a bit simpler. None of the other channel drivers
749 nor res_rtp_asterisk generate silence frames or pad short frames which
750 backed up decision.
751
752 Resolves: #1785
753
754 #### chan_websocket: Add media direction.
755 Author: Ben Ford
756 Date: 2026-02-10
757
758 Currently, WebSockets both accept and send media without the option to
759 disable one or the other. This commit adds the ability to set the media
760 direction for a WebSocket, making it unidirectional or bidirectional
761 (the default). Direction is done from the point of view of the
762 application, NOT Asterisk. The allowed values are 'both', 'in', and
763 'out'. If media direction is 'both' (the default), Asterisk accepts and
764 sends media to the application. If it is 'in', Asterisk will drop any
765 media received from the application. If it is 'out', Asterisk will not
766 write any media frames to the application.
767
768 UserNote: WebSocket now supports media direction, allowing for
769 unidirectional media. This is done from the perspective of the
770 application and can be set via channel origination, external media, or
771 commands sent from the application. Check out
772 https://docs.asterisk.org/Configuration/Channel-Drivers/WebSocket/ for
773 more.
774
775 #### fix: Add macOS (Darwin) compatibility for building Asterisk
776 Author: Prashant Srivastav
777 Date: 2026-02-05
778
779 - Makefile: Skip /usr/lib/bundle1.o on modern macOS (doesn't exist)
780 - Makefile.rules: Skip -fno-partial-inlining for clang (gcc-only flag)
781 - include/asterisk/utils.h: Use asterisk/endian.h instead of <endian.h>
782 - main/Makefile: Add Darwin-specific pjproject linking with -force_load
783 - main/strcompat.c: Include poll-compat.h, use ast_poll()
784 - main/xml.c: Add ASTMM_LIBC ASTMM_IGNORE for libxml2 compatibility
785 - res/res_pjsip/config_transport.c: Define TCP keepalive constants for macOS
786
787 Tested on macOS Darwin 25.2.0 (Apple Silicon ARM64)
788
789 #### astconfigparser.py: Fix regex pattern error by properly escaping string
790 Author: Julian C. Dunn
791 Date: 2026-02-17
792
793 "SyntaxWarning: invalid escape sequence '\s'" occurs when using the pjsip
794 migration script because '\' is an escape character in Python. Instead,
795 use a raw string for the regex.
796
797 #### res_rtp_asterisk: use correct sample rate lookup to account for g722
798 Author: Mike Bradeen
799 Date: 2026-02-23
800
801 Swap out ast_rtp_get_rate for ast_format_get_sample_rate when looking
802 at the paired audio codec rate to account for g722 oddness.
803
804 Resolves: #1657
805
806 #### res_pjsip_outbound_registration.c: Prevent crash if load_module() fails
807 Author: Sean Bright
808 Date: 2026-02-12
809
810 `ast_cli_unregister_multiple()` expects internal data members to be heap
811 allocated which happens during a successful call to
812 `ast_cli_register_multiple()`. CLI handlers defined traditionally - those whose
813 handler responds to the CLI_INIT message - take care of this automatically. But
814 when we statically provide a `command` or `usage` member, we _must_ initialize
815 them with `ast_cli_register_multiple()` before attempting to destroy them.
816
817 Resolves: #1651
818
819 #### pjsip_configuration: Ensure s= and o= lines in SDP are never empty
820 Author: Alexis Hadjisotiriou
821 Date: 2026-01-30
822
823 According to RFC 8866 (Section 5.2), the Session Name (s=) field and
824 the username part of origin (o=) are both mandatory and cannot be
825 empty. If a session has no name, or no username part of origin, the
826 RFC recommends using a single dash (-) as a placeholder.
827
828 This fix ensures that if the session name or the username part of
829 origin length is zero , it defaults to -.
830
831 Fixes: #1524
832
833 #### res_pjsip_session: Make sure NAT hook runs when packet is retransmitted for whatever reason.
834 Author: Arcadiy Ivanov
835 Date: 2026-01-14
836
837 This hook may not be necessary when we do a retransmit, but when there are two
838 INVITEs, one *initial* and one with auth digest, the second INVITE contains wrong (unmodified) media address
839 due to the commented line below.
840 The NAT hook needs to run due to filters potentially reverting previously modified packets.
841
842 Fixes: #449
843
844 #### chan_dahdi: Fix discarded-qualifiers errors.
845 Author: Naveen Albert
846 Date: 2026-02-18
847
848 Fix discarded-qualifiers errors to compile successfully with gcc 15.2.1.
849
850 Associated changes have also been made to libss7; however, for compatibility
851 we cast const char* values to char*. In the future, these casts could be
852 removed.
853
854 Resolves: #1786
855
856 #### build: Fix unused-but-set-variable warnings with gcc 16.
857 Author: Naveen Albert
858 Date: 2026-02-18
859
860 Fix or remove a few variables that were being set but not actually
861 used anywhere, causing warnings with gcc 16.
862
863 Resolves: #1783
864
865 #### build: Fix another GCC discarded-qualifiers const error.
866 Author: Naveen Albert
867 Date: 2026-02-18
868
869 Follow on commit to 27a39cba7e6832cb30cb64edaf879f447b669628
870 to fix compilation with BETTER_BACKTRACES with gcc 15.2.1.
871
872 Resolves: #1781
873
874 #### chan_iax2: Fix crash due to negative length frame lengths.
875 Author: Naveen Albert
876 Date: 2026-01-08
877
878 chan_iax2 has several code paths where a frame's data length
879 is calculated by subtraction. On some paths, there is a check
880 for negative length. One of these paths is missing this check,
881 and on this path, it is possible for the result to be negative,
882 leading to a crash as a result of memory operations using the
883 bogus length.
884
885 Add a check to capture this off-nominal case. This will log
886 the appropriate warnings as in other cases and prevent a crash.
887 Also update the log messages to be clearer.
888
889 Resolves: #1707
890
891 #### build: Fix GCC discarded-qualifiers const errors.
892 Author: Joshua C. Colp
893 Date: 2026-02-12
894
895 GCC 15.2.1 pays attention to the discarding of the const
896 qualifier when strchr, strrchr, memchr, or memrchr are now
897 used. This change fixes numerous errors with this throughout
898 the tree. The fixes can be broken down into the following:
899
900 1. The return value should be considered const.
901 2. The value passed to strchr or strrchr can be cast as it is
902 expected and allowed to be modified.
903 3. The pointer passed to strchr or strrchr is not meant to be
904 modified and so the contents must be duplicated.
905 4. It was declared const and never should have been.
906
907 #### endpoints: Allow access to latest snapshot directly.
908 Author: Joshua C. Colp
909 Date: 2026-02-10
910
911 This change adds an API call to allow direct access to the latest
912 snapshot of an ast_endpoint. This is then used by chan_pjsip when
913 calculating device state, eliminating the need to access the cache
914 which would incur a container find and access.
915
916 #### app_dial, utils.h: Avoid old style declaration and discarded qualifier.
917 Author: Naveen Albert
918 Date: 2026-02-04
919
920 * app_dial: Use const char* for fixed strings.
921 * utils.h: inline should come before return type.
922
923 Resolves: #1755
924
925 #### app_queue: Add 'prio' setting to the 'force_longest_waiting_caller' option
926 Author: serfreeman1337
927 Date: 2026-01-29
928
929 This adds a 'prio' setting to ensure that call priority is respected across multiple queues.
930 Using 'yes' could cause high-priority callers to be skipped if a caller
931 in another queue had a longer wait time, regardless of priority.
932
933 Resolves: #1637
934
935 UserNote: The 'force_longest_waiting_caller' option now supports a 'prio' setting.
936 When set to 'prio', calls are offered by priority first, then by wait time.
937
938 #### Upgrade bundled pjproject to 2.16.
939 Author: Mike Bradeen
940 Date: 2026-01-27
941
942 Resolves: #1612
943
944 UserNote: Bundled pjproject has been upgraded to 2.16. For more
945 information on what all is included in this change, check out the
946 pjproject Github page: https://github.com/pjsip/pjproject/releases
947
948 #### res_pjsip_header_funcs: Add new PJSIP_INHERITABLE_HEADER dialplan function
949 Author: Mike Bradeen
950 Date: 2025-11-19
951
952 Adds a new PJSIP_INHERITABLE_HEADER dialplan function to add
953 inheritable headers from the inbound channel to an outbound
954 bridged channel. This works similarly to the existing
955 PJSIP_HEADER function, but will set the header on the bridged
956 outbound channel's INVITE upon Dial.
957
958 Inheritable headers can be updated or removed from the inbound
959 channel as well as from a pre-dial handler
960
961 Resolves: #1670
962
963 UserNote: A new PJSIP_HEADER option has been added that allows
964 inheriting pjsip headers from the inbound to the outbound bridged
965 channel.
966 Example- same => n,Set(PJSIP_INHERITABLE_HEADER(add,X-custom-1)=alpha)
967 will add X-custom-1: alpha to the outbound pjsip channel INVITE
968 upon Dial.
969
970 #### app_queue: Queue Timing Parity with Dial() and Accurate Wait Metrics
971 Author: phoneben
972 Date: 2026-01-18
973
974 app_queue: Set Dial-compatible timing variables
975
976 Extends Queue() to set Dial-compatible timing variables (ANSWEREDTIME, DIALEDTIME) and introduces a precise QUEUEWAIT metric calculated at agent connect time, with proper initialization to prevent stale or misleading values.
977
978 #### stasis.c: Fix deadlock in stasis_topic_pool_get_topic during module load
979 Author: phoneben
980 Date: 2025-11-29
981
982 stasis.c: Fix deadlock in stasis_topic_pool_get_topic during module load.
983
984 Deadlock occurs when res_manager_devicestate loads concurrently with
985 device state operations due to lock ordering violation:
986
987 Thread 1: Holds pool lock → needs topic lock (in stasis_forward_all)
988 Thread 2: Holds topic lock → needs pool lock (in stasis_topic_pool_get_topic)
989
990 Fix: Release pool lock before calling stasis_topic_create() and
991 stasis_forward_all(). Re-acquire only for insertion with race check.
992
993 Preserves borrowed reference semantics while breaking the deadlock cycle.
994
995 Fixes: #1611
996
997 #### app_queue: Fix rN raise_penalty ignoring min_penalty in calc_metric
998 Author: phoneben
999 Date: 2026-01-06
1000
1001 QUEUE_RAISE_PENALTY=rN was not respected during member selection. calc_metric() raised penalties below QUEUE_MIN_PENALTY, allowing excluded members to be selected.
1002
1003 This change makes calc_metric() honor raise_respect_min, keeping behavior consistent with queue empty checks and expected rN semantics
1004
1005 UserNote: Fixes an issue where QUEUE_RAISE_PENALTY=rN could raise a member’s penalty below QUEUE_MIN_PENALTY during member selection. This could allow members intended to be excluded to be selected. The queue now consistently respects the minimum penalty when raising penalties, aligning member selection behavior with queue empty checks and documented rN semantics.
1006
1007 #### app_queue: Only compare calls at 1st position across queues when forcing longest waiting caller.
1008 Author: serfreeman1337
1009 Date: 2026-01-05
1010
1011 This prevents a situation where a call joining at 1st position to a queue with calls
1012 leads to a state where no callers are considered the longest waiting,
1013 causing queues to stop offering calls.
1014
1015 Resolves: #1691
1016
1017 #### channelstorage_cpp_map_name_id: Fix get_by_name_prefix prefix match
1018 Author: Jasper Hafkenscheid
1019 Date: 2026-01-21
1020
1021 Lower bound filter did not ensure prefix match.
1022
1023 Resolves: #1730
1024
1025 #### app_amd: Remove errant space in documentation for totalAnalysisTime.
1026 Author: George Joseph
1027 Date: 2026-01-22
1028
1029
1030 #### say.c: added language support for pashto and dari
1031 Author: Talha Asghar
1032 Date: 2026-01-22
1033
1034 With this new feature, users who speak these languages can now benefit from the
1035 text-to-speech functionality provided by asterisk. This will make the platform
1036 more accessible and useful to a wider range of users, particularly those in
1037 regions where Pashto and Dari are spoken. This contribution will help to improve
1038 the overall usability and inclusivity of the asterisk platform.
1039
1040 Fixes: #1724
1041
1042 #### res_pjsip_session.c: Prevent INVITE failover when session is cancelled
1043 Author: hishamway
1044 Date: 2026-01-15
1045
1046 When an outbound INVITE transaction times out (408) or receives a 503 error,
1047 check_request_status() attempts to failover to the next available address by
1048 restarting the INVITE session. However, the function did not check if the
1049 inv_session was already cancelled before attempting the failover.
1050
1051 This caused unexpected behavior when a caller hung up during a ring group
1052 scenario: after CANCEL was sent but the remote endpoint failed to respond
1053 with 487 (e.g., due to network disconnection), the transaction timeout
1054 would trigger a NEW outbound INVITE to the next address, even though the
1055 session was already terminated.
1056
1057 This violates RFC 3261 Section 9.1 which states that if no final response
1058 is received after CANCEL within 64*T1 seconds, the client should consider
1059 the transaction cancelled and destroy it, not retry to another address.
1060
1061 The fix adds a check for both PJSIP_INV_STATE_DISCONNECTED and inv->cancelling
1062 at the beginning of check_request_status(). This ensures that:
1063 - Failover is blocked when the user explicitly cancelled the call (CANCEL sent)
1064 - Failover is still allowed for legitimate timeout/503 scenarios where no
1065 CANCEL was initiated (e.g., SRV failover when first server is unreachable)
1066
1067 Resolves: #1716
1068
1069 #### res_pjsip_pubsub: Fix ao2 reference leak of subscription tree in ast_sip_subscription
1070 Author: Alexei Gradinari
1071 Date: 2026-01-07
1072
1073 allocate_subscription() increments the ao2 reference count of the subscription tree,
1074 but the reference was not consistently released during subscription destruction,
1075 resulting in leaked sip_subscription_tree objects.
1076
1077 This patch makes destroy_subscription() responsible for releasing sub->tree,
1078 removes ad-hoc cleanup in error paths,
1079 and guards tree cleanup to ensure refcount symmetry and correct ownership.
1080
1081 Fixes: #1703
1082