Commit Graph
36246 Commits
Author SHA1 Message Date
Dmitry Verenitsin 2582f5cebd Merge commit from fork
A REFER with no call behind it is published as a `CALL_SETUP_REQ` event
whose `Request-Target` is `sofia/<profile>/<Refer-To URI>`, and
`mod_conference` hands that string to `switch_ivr_originate()` for
`rfc-4579` conferences. The URI was copied in unchanged, so a `,`, `|`
or `:_:` in it split the dial string into extra peers or legs, each of
which can start with its own `[...]` channel variables.

Answer such a REFER with `400 Bad Refer-To` before anything is
published. Both the serialized Refer-To and its user part are checked;
the user part is published separately as `Request-Target-Extension`,
which an `outcall-templ` expands. A Refer-To without these characters
is handled as before.

Also frees the subscription contact string an accepted REFER of this
kind allocated and never released.
2026-11-18 20:31:50 +03:00
Dmitry Verenitsin 382c669c93 Merge commit from fork
`conference_event_adv_la()` gave every live array member's
`event_channel_cookie` permission on the conference moderator channel,
the same as the live array, chat and info channels. On mod_verto that
permission is what lets a client broadcast to `conference-mod.*` and
run conference commands through
`conference_event_mod_channel_handler()`. Grant and revoke it only for
members with `MFLAG_MOD`, which does not change during membership, so
a participant call leaving does not strip it from a moderator call on
the same WebSocket.

Adds three `test_member` cases covering the participant, moderator and
shared-cookie grants on a new `livearray` test profile.
2026-11-18 20:30:30 +03:00
Dmitry Verenitsin 9606e32c55 Merge commit from fork
Run the display name and number through the same
`switch_clean_string()` and `switch_var_clean_string()` pass that
`profile_dup_clean()` applies when the profile is built from the
initial request, so a `${` in either is stored as `%{` whichever
message carried it.
2026-11-18 20:25:41 +03:00
Dmitry Verenitsin 512443322a Merge commit from fork
`switch_rtp_add_crypto_key()` allocated each MKI id buffer with
`sizeof(key_material->mki_size)`, a constant 4 bytes, then copied
`mki_size` bytes into it. That length comes from the remote `a=crypto`
attribute and was only checked against a lower bound. The same copy
read `mki_size` bytes starting at the 4-byte `mki_id` field.

Reject an MKI length outside 1..`SRTP_MAX_MKI_LEN`, allocate the id
buffer at that length, and copy no more than the width of `mki_id`,
leaving the remaining bytes zero. MKI lengths of 1 to 4 keep the bytes
they carry today.
2026-11-18 20:23:56 +03:00
Dmitry Verenitsin dec8abf635 Merge commit from fork
`get_rtt_red_seq()` stored one entry per RFC 2198 redundancy header
in the fixed `pt[]` and `len[]` arrays without checking the count
against `MAX_RED_FRAMES`, so a packet with more headers wrote past
them. Reject the packet once the count reaches `MAX_RED_FRAMES`, and
reject a frame index at or above it, which a sequence number wrap
can produce.
2026-11-18 20:22:48 +03:00
Dmitry Verenitsin 82adc771cb Merge commit from fork
`enum_app_function()` and `enum_api()` advanced their write cursor and
decremented the remaining space by `strlen(rp->route) + 1` rather than by
the bytes `switch_snprintf()` reported writing, so once a route no longer
fit the unsigned counter wrapped and the next iteration wrote past the end
of `rbuf` with no effective bound.

Both loops now share a `pack_routes()` helper that writes each route's
separator in front of it. Nothing points back into the buffer, so the
trailing-separator strip and its `rbuf[-1]` write are gone, along with the
write through a `char *` aimed at a string literal. A route that does not
fit whole, or that is empty, is skipped rather than clipped or ending the
loop.

`enum_app_function()` applies the same test when exporting `enum_route_N`,
so `enum_route_count` and the packed count describe the same routes: an
empty value would delete the variable rather than set it, leaving a gap in
the numbering. It also warns when the dial string ends up holding fewer
routes than were resolved, and `cnt`'s conversions are `%u` to match its
type.
2026-11-18 20:20:32 +03:00
Dmitry Verenitsin 0dcf2d7572 Merge commit from fork
`skinny_read_packet()` checked the declared length as `length + 8 >
2048` on a `uint32_t`, which wraps for lengths of `0xFFFFFFF8` and
above, and `skinny_check_data_length()` in the handlers only enforces a
minimum. Compare the length against the constant side instead, and
advance `ptr` on every read so a length field that arrives in pieces is
stored contiguously instead of being overwritten by later bytes.

- The message buffer gets one spare zero byte, so fixed-width string
  fields of a full-size message terminate inside the allocation.
- The data and extended data handlers check `data_length` against the
  bytes left after their header, with no addition on the wire value.
- Those two handlers and `skinny_handle_xml_alarm()` build the event
  body with `%.*s` instead of an unchecked `malloc` copy.
- `skinny_handle_extended_data_message()` takes the body from the
  `extended_data` member instead of `data`, so the event body no longer
  starts with 20 bytes of header fields.
- `skinny_handle_updatecapabilities()` rejects an empty audio
  capability list, as `skinny_handle_capabilities_response()` already
  does.
2026-11-18 20:19:42 +03:00
Dmitry Verenitsin fd911220be Merge commit from fork
On a profile with `extended-info-parsing` set, an inbound SIP INFO whose
content type is `freeswitch/api-request` puts an FSAPI command in the
request body and gets its output back in the 200 OK. The branch needs no
dialog, and no `mod_sofia` authentication or ACL setting covers an
out-of-dialog INFO. That same param also enables the in-dialog
`session-event` half, so there is no way to keep one and not the other.

The new per-profile `enable-info-api-request` param gates the api-request
branch alone and is off unless set, leaving `session-event` reachable
under `extended-info-parsing` as before. An INFO selecting the branch on a
profile without the new param is answered 403 and logged with the source
and the requested command; a permitted one is logged too, since the source
address appears in no event the API path fires. Both lines print the
body's first line, capped, rather than the whole body.
2026-11-18 20:18:00 +03:00
Andrey Volk 1fa330cafd [Core] RTP: stop using the libsrtp private API (#3292)
Use switch_rtp_hdr_t instead of srtp_hdr_t from srtp_priv.h, and srtp_shutdown() instead of srtp_crypto_kernel_shutdown(). Drop the rtp_hdr_t alias and add a compile-time check that switch_rtp_hdr_t is 12 bytes.
2026-11-17 23:14:38 +03:00
Andrey Volk 222d895954 [Build-System] Windows: Upgrade sqlite to v3.54.1_1 (#3294) 2026-11-17 21:08:00 +03:00
Andrey Volk 1af2909bb6 [mod_dialplan_xml] Fix $N substitution of <regex> captures (#3293)
Keep the subject string of a saved match alive and substitute only when a regex matched. Add unit-tests.
2026-11-17 15:35:58 +03:00
Andrey Volk f7ec023dc1 Merge pull request #3291 from signalwire/libnatpmp-dev
[Core] Remove in-tree libnatpmp: use libnatpmp-dev on Linux and the windows-deps package on Windows
2026-11-17 00:21:54 +03:00
Andrey Volk 9039d5a82d [libvpx] Update to v1.17.0-97-gd3335af9e (#3290)
* [libvpx] Update to v1.17.0-97-gd3335af9e

* [libvpx] Fix pthread configure checks: "Null pointer passed as an argument to a 'nonnull' parameter"

* [libvpx] Fix threading.
2026-11-16 23:42:06 +03:00
Andrey Volk 2baece4a5e [libvpx] Fix threading. 2026-11-16 23:18:46 +03:00
Andrey Volk 0b3e4644f2 [libvpx] Fix pthread configure checks: "Null pointer passed as an argument to a 'nonnull' parameter" 2026-11-16 23:18:46 +03:00
Andrey Volk a55111af58 [libvpx] Update to v1.17.0-97-gd3335af9e 2026-11-16 23:18:46 +03:00
Andrey Volk 7481baed18 [Core] Remove in-tree miniupnpc: use libminiupnpc-dev on Linux and the windows-deps package on Windows (#3289) 2026-11-16 23:18:14 +03:00
Andrey Volk 643efd444b [libyuv] Update to hash 79ca9187e540faaaca47b34622e110d07f335d05 from https://chromium.googlesource.com/libyuv/libyuv/ (#3288)
* [libyuv] Update to hash 79ca9187e540faaaca47b34622e110d07f335d05 from https://chromium.googlesource.com/libyuv/libyuv/

* [libyuv] Build AArch64 dotprod/i8mm/SVE/SME kernels with per-file -march to fix arm64/macOS build

* [libyuv] Fix build with GCC

HammingDistance_AVX512VNNI clobbers k1 but lacks the
LIBYUV_TARGET_AVX512VNNI attribute that its siblings use, so GCC on
x86_64 fails with "the register 'k1' cannot be clobbered in 'asm' for
the current target".

ARGBAlphaBlendRow_SVE_SC uses "mov z25.s, #0x01010101", which the GNU
assembler rejects as an invalid replicated MOV immediate. Use the
equivalent "mov z25.b, #1", which sets the same value and is accepted
by both GNU as and LLVM.

* [libyuv] Fix function declaration without a prototype

* [libyuv] Disable scan-build warnings.
2026-11-16 22:40:30 +03:00
Andrey Volk 1836c1f345 [libyuv] Disable scan-build warnings. 2026-11-16 21:58:33 +03:00
Andrey Volk b21fc93b78 [libyuv] Fix function declaration without a prototype 2026-11-16 21:58:33 +03:00
Andrey Volk 7f73f94c15 [libyuv] Fix build with GCC
HammingDistance_AVX512VNNI clobbers k1 but lacks the
LIBYUV_TARGET_AVX512VNNI attribute that its siblings use, so GCC on
x86_64 fails with "the register 'k1' cannot be clobbered in 'asm' for
the current target".

ARGBAlphaBlendRow_SVE_SC uses "mov z25.s, #0x01010101", which the GNU
assembler rejects as an invalid replicated MOV immediate. Use the
equivalent "mov z25.b, #1", which sets the same value and is accepted
by both GNU as and LLVM.
2026-11-16 21:58:33 +03:00
Andrey Volk 13fd84b33c [libyuv] Build AArch64 dotprod/i8mm/SVE/SME kernels with per-file -march to fix arm64/macOS build 2026-11-16 21:58:32 +03:00
Andrey Volk 379b73c3c3 [libyuv] Update to hash 79ca9187e540faaaca47b34622e110d07f335d05 from https://chromium.googlesource.com/libyuv/libyuv/ 2026-11-16 21:58:32 +03:00
Andrey Volk 07dedba4a4 [core] Replace GetARGBBlend with ARGBBlend in switch_img_patch_rgb and add a unit test, GetARGBBlend is removed from newer libyuv (#3287) 2026-11-16 21:54:28 +03:00
Andrey Volk 9b38dcf201 [Build-System] Windows: Update libpq to v17.11_3 (#3286) 2026-11-16 19:41:20 +03:00
Andrey Volk 0dd016319f [Build-System] Windows: Upgrade libnode to v24.22.3_1 (#3280) 2026-11-13 17:27:39 +03:00
Andrey Volk b791f28d01 [GHA] Move CI to Debian 13 (Trixie). (#3278)
Use the freeswitch-public-ci-base:trixie-amd64 image for unit-tests, D-in-D unit-tests and scan-build.
ci.sh: use scan-build-14 on bookworm and the default scan-build (clang 19) otherwise.
2026-11-09 23:03:18 +03:00
Andrey Volk fa67e000bf [mod_sofia] scan-build: sofia_receive_message(). Value stored to 'to_tag' during its initialization is never read (#3277) 2026-11-09 21:53:18 +03:00
Andrey Volk 9c48aa3f05 swigall (#3276) 2026-11-09 21:36:23 +03:00
Andrey Volk 75366730ac [SWIG] Generated files contain Dead initialization. Overload affected methods to avoid that. (#3275) 2026-11-09 21:08:00 +03:00
Andrey Volk 4b4d361267 [libscgi] Scan-build: Fix function call (recv) with invalid argument (#3274) 2026-11-09 20:42:59 +03:00
Andrey Volk 6383a78dd2 [Core] scan-build: switch_cache_db_type_name(). Value stored to 'type_str' during its initialization is never read (#3273) 2026-11-09 20:17:18 +03:00
Andrey Volk 209e98e9af [Build-System] Windows: Upgrade signalwire-client-c to v2.0.6_1 (#3271) 2026-11-09 19:11:13 +03:00
Serhii Ivanov 8a2fd92a93 [GHA] Pin ubuntu-24.04 as unit-test runner (#3272) 2026-11-09 17:34:10 +03:00
Andrey Volk f37a27f2f4 [Build-System] Windows: Upgrade FFmpeg to v8.1.3_1 and openh264 to 2.7.0, take FFmpeg from windows-deps (#3251) 2026-10-28 22:03:59 +03:00
Andrey Volk 9fdd2cdfaf [mod_av] Add support for FFmpeg 8 (#3250) 2026-10-28 18:27:37 +03:00
Andrey Volk ad4b9dcb9b [mod_v8, Build-System] Port to the V8 13.6 API of Node.js 24 libnode. Windows: Upgrade libnode to v24.22.1_1 and take it from windows-deps (#3249) 2026-10-28 14:48:33 +03:00
Andrey Volk d38da74dc7 [Build-System] Windows: Upgrade libks to v2.1.0_1 and signalwire-client-c to v2.0.5_4 (#3247) 2026-10-27 23:58:56 +03:00
Andrey Volk 36573f1348 Bump sofia-sip library requirement to version 1.13.19 (#3246) 2026-10-27 22:50:22 +03:00
Andrey Volk 9ad11881cb [mod_lua] Fix crash on concurrent first Lua run by initializing SWIG type tables once at module load (#3245) 2026-10-26 21:26:46 +03:00
Andrey Volk 12ac48ab9e [UTILS] FSGET: Add swpat_ token prefix support. (#3219) 2026-10-09 23:37:26 +03:00
Andrey Volk f4778e7f2c [UTILS] FSGET: Add source/build-dep/showsrc actions, make token optional (if already configured), add swapi_ token support (#3217)
- New optional actions: `source`, `build-dep`, `showsrc`. `source` and `build-dep` resolve the source version for the current dpkg architecture, so apt does not pick a package built for another arch.
  - TOKEN can be omitted when the apt repository is already configured.
  - `swapi_*` tokens are accepted as FreeSWITCH Enterprise tokens, same as `PT*`
  - Arguments can be given in any order.

  Examples:
```
    curl -sSL https://freeswitch.org/fsget | bash -s pat_xxxxx release install
    curl -sSL https://freeswitch.org/fsget | bash -s swapi_xxxxx prerelease build-dep
    curl -sSL https://freeswitch.org/fsget | bash -s build-dep release pat_xxxxx
    curl -sSL https://freeswitch.org/fsget | bash -s source
    curl -sSL https://freeswitch.org/fsget | bash -s showsrc
```
2026-10-09 16:18:38 +03:00
Andrey Volk 3dee68e810 [Build-System] Windows: Upgrade openssl to v3.4.8_1 and use libks, curl, rabbitmq-c, libpq and signalwire-client-c packages built against it (#3212) 2026-10-03 00:44:51 +03:00
Andrey Volk 6c08a4177e [mod_pocketsphinx] Download sphinxbase, pocketsphinx and the model from freeswitch/windows-deps releases instead of files.freeswitch.org (#3202) 2026-09-29 18:41:20 +03:00
Andrey Volk c8d17a46ce [mod_com_g729] Remove from tree. Use Debian packages. (#3200) 2026-09-29 18:14:56 +03:00
Serhii Ivanov 67cc916efe [GHA] Bump macOS version to 27 (#3197) 2026-09-29 01:55:17 +03:00
Andrey Volk 541879c4ac [Build-System] Windows: Fix a download hang on a missed completion signal and keep retrying when an incomplete file cannot be deleted (#3196) 2026-09-28 21:09:45 +03:00
Andrey Volk ecb91ceb99 [Build-System] Windows: Retry failed package downloads and fail the build when a package never arrives (#3194) 2026-09-28 16:24:09 +03:00
Andrey Volk e6ed73bc16 [Build-System] Windows: Upgrade freetype to v2.14.3_1 and use pre-compiled binaries (#3193) 2026-09-28 12:27:26 +03:00
Andrey Volk 542ea9fe61 [Build-System] Windows: Upgrade libjpeg to v10_1 and use pre-compiled binaries (#3191) 2026-09-27 20:20:28 +03:00