head	1.3;
access;
symbols
	pkgsrc-2026Q1:1.2.0.10
	pkgsrc-2026Q1-base:1.2
	pkgsrc-2025Q4:1.2.0.8
	pkgsrc-2025Q4-base:1.2
	pkgsrc-2025Q3:1.2.0.6
	pkgsrc-2025Q3-base:1.2
	pkgsrc-2025Q2:1.2.0.4
	pkgsrc-2025Q2-base:1.2
	pkgsrc-2025Q1:1.2.0.2
	pkgsrc-2025Q1-base:1.2
	pkgsrc-2024Q4:1.1.0.2
	pkgsrc-2024Q4-base:1.1;
locks; strict;
comment	@# @;


1.3
date	2026.04.13.02.50.22;	author jnemeth;	state Exp;
branches;
next	1.2;
commitid	asWxYUR8LsKZbKBG;

1.2
date	2025.01.17.22.39.53;	author gavan;	state Exp;
branches;
next	1.1;
commitid	uVfHdGXfiKLWgTFF;

1.1
date	2024.10.21.05.12.45;	author jnemeth;	state Exp;
branches;
next	;
commitid	cZ96k12iK0kpjuuF;


desc
@@


1.3
log
@Update to Asterisk 22.9.0:


## Change Log for Release asterisk-22.9.0

### Links:

 - [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-22.9.0.html)
 - [GitHub Diff](https://github.com/asterisk/asterisk/compare/22.8.2...22.9.0)

### Summary:

- Commits: 50
- Commit Authors: 21
- Issues Resolved: 34
- Security Advisories Resolved: 0

### User Notes:

- #### acl: Add ACL support to http and ari
  A new section, type=restriction has been added to http.conf
  to allow an uri prefix based acl to be configured. See
  http.conf.sample for examples and more information.
  The user section of ari.conf can now contain an acl configuration
  to restrict users access. See ari.conf.sample for examples and more
  information

- #### res_rtp_asterisk.c: Fix DTLS packet drop when TURN loopback re-injection occurs before ICE candidate check
  WebRTC calls using TURN configured in rtp.conf (turnaddr,
  turnusername, turnpassword) will now correctly complete DTLS/SRTP
  negotiation. Previously all DTLS packets were silently dropped due to
  the loopback re-injection address not being in the ICE active candidate
  list.

- #### docs: Add "Provided-by" to doc XML and CLI output.
  The CLI help for applications, functions, manager commands and
  manager events now shows the module that provides its functionality.

- #### CDR/CEL Custom Performance Improvements
  Significant performance improvements have been made to the
  cdr_custom, cdr_sqlite3_custom, cel_custom and cel_sqlite3_custom modules.
  See the new sample config files for those modules to see how to benefit
  from them.

- #### chan_websocket: Add media direction.
  WebSocket now supports media direction, allowing for
  unidirectional media. This is done from the perspective of the
  application and can be set via channel origination, external media, or
  commands sent from the application. Check out
  https://docs.asterisk.org/Configuration/Channel-Drivers/WebSocket/ for
  more.

- #### app_queue: Add 'prio' setting to the 'force_longest_waiting_caller' option
  The 'force_longest_waiting_caller' option now supports a 'prio' setting.
  When set to 'prio', calls are offered by priority first, then by wait time.

- #### Upgrade bundled pjproject to 2.16.
  Bundled pjproject has been upgraded to 2.16. For more
  information on what all is included in this change, check out the
  pjproject Github page: https://github.com/pjsip/pjproject/releases

- #### res_pjsip_header_funcs: Add new PJSIP_INHERITABLE_HEADER dialplan function
  A new PJSIP_HEADER option has been added that allows
  inheriting pjsip headers from the inbound to the outbound bridged
  channel.
  Example- same => n,Set(PJSIP_INHERITABLE_HEADER(add,X-custom-1)=alpha)
  will add X-custom-1: alpha to the outbound pjsip channel INVITE
  upon Dial.

- #### app_queue: Fix rN raise_penalty ignoring min_penalty in calc_metric
  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.


## Issue and Commit Detail:

### Closed Issues:

  - 449: [bug]:  PJSIP confuses media address after INVITE requiring authentication
  - 566: [bug]: core: SIGSEGV on DTMF when no timing modules loaded
  - 1356: [bug]: MESSAGE requests should not contain a Contact header
  - 1524: [bug]: PJSIP if sdp_session is blank the initial INVITE doesn't attach an SDP offer, worked in chan_sip
  - 1611: [bug]: asterisk deadlocked on start sometimes
  - 1612: [improvement]: pjsip: Upgrade bundled version to pjproject 2.16
  - 1637: [improvement]: force_longest_waiting_caller should also consider caller priority
  - 1641: [bug]: res_pjsip_config_wizard: Endpoints fail to update when Named ACLs change after reload
  - 1651: [bug]: Asterisk crashes with munmap_chunk() when using sorcery realtime for PJSIP registration objects
  - 1657: [bug]: Wrong dtmf payload is used when inbound invite contains 8K and 16K, and outgoing leg is using G722 and SRTP
  - 1670: [new-feature]: Add new option to PJSIP_HEADER to pass headers from the inbound to outbound channel.
  - 1691: [bug]: force_longest_waiting_caller stops offering calls if a call joins at the first position
  - 1703: [bug]: res_pjsip_pubsub: ao2 reference leak of subscription tree in ast_sip_subscription
  - 1707: [bug]: chan_iax2: Crash when processing video frames with negative length
  - 1716: [bug]: Ghost call when UAC didn't respond with 487 for a cancel request from server even after original call hangup.
  - 1724: [improvement]: say.c - added language support for pashto and dari
  - 1730: [bug]: CPP channel storage get_by_name_prefix does not check prefix match
  - 1755: [bug]: app_dial, utils.h: Compilation failure with -Wold-style-declaration and -Wdiscarded-qualifiers
  - 1781: [bug]: More discarded-qualifiers errors with gcc 15.2.1
  - 1783: [bug]: Several unused-but-set-variable warnings with gcc 16
  - 1785: [bug]: chan_websocket doesn’t work with genericplc and transcoding
  - 1786: [bug]: chan_dahdi: A few more discarded-qualifiers errors not caught previously
  - 1795: [bug]: DTLS packets dropped when TURN configured in rtp.conf due to loopback re-injection occurring before ICE candidate source check
  - 1797: [bug]: Potential logic issue in translated frame write loop (main/file.c)
  - 1802: [improvement]: app_dial: Channel name should be included in warnings during wait_for_answer
  - 1804: [new-feature]: dsp.c: Add support for R2 signaling
  - 1814: [bug]: A pjsip transport with an invalid config can cause issues with other transports
  - 1816: [bug]: ARI: RTPAUDIO channel vars aren't set if call hung up by ARI.
  - 1819: [bug]: When a 302 is received from a UAS, the cause and tech_cause codes set on the channel are incorrect.
  - 1831: [bug]:raise_exception() and EXCEPTION() read use channel datastores without holding ast_channel_lock
  - 1833: [bug]: Address security vulnerabilities in pjproject
  - 1844: [bug]: cdrel_custom isn't respecting the default time format for CEL records
  - 1845: [bug]:res_cdrel_custom produces wrong float timestamps
  - 1852: [bug]: res_cdrel_custom: connection to the sqlite3 database closes from time to time

### Commit List:

-  res_cdrel_custom: do not free config when no new config was loaded
-  res_cdrel_custom: Resolve several formatting issues.
-  res_pjsip: Address pjproject security vulnerabilities
-  pbx: Hold channel lock for exception datastore access
-  xmldoc.c: Fix memory leaks in handling of provided_by.
-  SECURITY.md: Update with additional instructions.
-  res_audiosocket: Fix header read loop to use correct buffer offset
-  manager.c : Fix CLI event display
-  chan_pjsip: Set correct cause codes for non-2XX responses.
-  res_pjsip_config_wizard: Force reload on Named ACL change events
-  rtp: Set RTPAUDIOQOS variables when ast_softhangup is called.
-  channel: Prevent crash during DTMF emulation when no timing module is loaded
-  res_pjsip: Remove temp transport state when a transport fails to load.
-  res_pjsip_messaging: Remove Contact header from out-of-dialog MESSAGE as per RFC3428
-  acl: Add ACL support to http and ari
-  res_rtp_asterisk.c: Fix DTLS packet drop when TURN loopback re-injection occurs before ICE candidate check
-  dsp.c: Add support for detecting R2 signaling tones.
-  app_dial: Include channel name in warnings during wait_for_answer.
-  main/file: fix translated-frame write loop to use current frame
-  docs: Add "Provided-by" to doc XML and CLI output.
-  chan_websocket_doc.xml: Add d(media_direction) option.
-  resource_channels.c: Fix validation response for externalMedia with AudioSockets
-  CDR/CEL Custom Performance Improvements
-  chan_websocket: Remove silence generation and frame padding.
-  chan_websocket: Add media direction.
-  fix: Add macOS (Darwin) compatibility for building Asterisk
-  astconfigparser.py: Fix regex pattern error by properly escaping string
-  res_rtp_asterisk: use correct sample rate lookup to account for g722
-  res_pjsip_outbound_registration.c: Prevent crash if load_module() fails
-  pjsip_configuration: Ensure s= and o= lines in SDP are never empty
-  res_pjsip_session: Make sure NAT hook runs when packet is retransmitted for whatever reason.
-  chan_dahdi: Fix discarded-qualifiers errors.
-  build: Fix unused-but-set-variable warnings with gcc 16.
-  build: Fix another GCC discarded-qualifiers const error.
-  chan_iax2: Fix crash due to negative length frame lengths.
-  build: Fix GCC discarded-qualifiers const errors.
-  endpoints: Allow access to latest snapshot directly.
-  app_dial, utils.h: Avoid old style declaration and discarded qualifier.
-  app_queue: Add 'prio' setting to the 'force_longest_waiting_caller' option
-  Upgrade bundled pjproject to 2.16.
-  res_pjsip_header_funcs: Add new PJSIP_INHERITABLE_HEADER dialplan function
-  app_queue: Queue Timing Parity with Dial() and Accurate Wait Metrics
-  stasis.c: Fix deadlock in stasis_topic_pool_get_topic during module load
-  app_queue: Fix rN raise_penalty ignoring min_penalty in calc_metric
-  app_queue: Only compare calls at 1st position across queues when forcing longest waiting caller.
-  channelstorage_cpp_map_name_id: Fix get_by_name_prefix prefix match
-  app_amd: Remove errant space in documentation for totalAnalysisTime.
-  say.c: added language support for pashto and dari
-  res_pjsip_session.c: Prevent INVITE failover when session is cancelled
-  res_pjsip_pubsub: Fix ao2 reference leak of subscription tree in ast_sip_subscription
@
text
@$NetBSD: patch-build__tools_make__xml__documentation,v 1.2 2025/01/17 22:39:53 gavan Exp $

--- build_tools/make_xml_documentation.orig	2026-04-09 16:24:26.000000000 +0000
+++ build_tools/make_xml_documentation
@@@@ -230,7 +230,7 @@@@ for subdir in ${mod_subdirs} ; do
 					${XMLSTARLET} val -e -d "${source_tree}/doc/appdocsxml.dtd" "${i}" || { echo "" ; exit 1 ; }
 			fi
 		fi
-		${SED} -r "/^\s*(<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" > /tmp/xmldoc.tmp.xml
+		${SED} -r "/^[[:space:]]*(<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" > /tmp/xmldoc.tmp.xml
 		dirname=${i%/*}
 		if [ "${dirname}" != "${subdir_path}" ] ; then
 			# If we're in a subdirectory like channels/pjsip, we need to check channels/Makefile
@


1.2
log
@asterisk[19,21,22]: Fix invalid XML documentation building
@
text
@d1 1
a1 1
$NetBSD: patch-build__tools_make__xml__documentation,v 1.1 2024/10/21 05:12:45 jnemeth Exp $
d3 1
a3 1
--- build_tools/make_xml_documentation.orig	2022-04-14 22:16:42.000000000 +0000
d5 1
a5 1
@@@@ -214,7 +214,7 @@@@ for subdir in ${mod_subdirs} ; do
d9 5
a13 5
-		${SED} -r "/^\s*(<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" >> "${output_file}"
+		${SED} -r "/^[[:space:]]*(<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" >> "${output_file}"
 	done
 done
 echo "</docs>" >> "${output_file}"
@


1.1
log
@comms/asterisk22: import asterisk-22.0.0

Asterisk is a complete PBX in software.  It provides all of the
features you would expect from a PBX and more. Asterisk does voice
over IP in three protocols, and can interoperate with almost all
standards-based telephony equipment using relatively inexpensive
hardware.

Asterisk provides Voicemail services with Directory, Call Conferencing,
Interactive Voice Response, Call Queuing. It has support for
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
client and gateway).

This is a Long Term Support version.  It is scheduled to go to
security fixes only on October 16th, 2028, and EOL on October 16th,
2029.  See here for more information about Asterisk versions:
https://docs.asterisk.org/About-the-Project/Asterisk-Versions/
@
text
@d1 1
a1 1
$NetBSD: patch-build__tools_make__xml__documentation,v 1.1 2024/04/08 03:20:07 jnemeth Exp $
d10 1
a10 1
+		${SED} -r "/^\[[:space:]](<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" >> "${output_file}"
@

