Commit Graph
36226 Commits
Author SHA1 Message Date
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
Andrey Volk 8356b2ec5c [Build-System] Windows: Upgrade speex to v1.2.1_1 and use pre-compiled binaries, upgrade speexdsp to v1.2.1 and build it from the upstream sources (#3190) 2026-09-26 23:27:09 +03:00
Dmitry VerenitsinandChris Rienzo b78995c660 [mod_sofia] Keep the dialog handle after answering a refer NOTIFY (#3189)
`sofia_handle_sip_i_notify()` answered an in-dialog `refer` NOTIFY and then
fell through to the generic handling, which sent a second response and,
on a terminated subscription, destroyed the dialog's handle. A channel kept
up after the REFER outcome (`sip_refer_continue_after_reply=true`) could no
longer send a REFER, re-INVITE or BYE. Return right after the `200 OK`;
`refer` NOTIFYs are no longer forwarded under `proxy-notify-events`.

Co-authored-by: Chris Rienzo <chris@signalwire.com>
2026-09-24 23:04:49 +03:00
Andrey Volk 3097732e75 [Build-System] Windows: Upgrade ldns to v1.9.2_1 and use pre-compiled binaries, remove unused libcelt (#3184) 2026-09-24 17:42:39 +03:00
Andrey Volk fd1cab5117 [Build-System] Fix build against OpenSSL 4 (#3185) 2026-09-24 00:31:38 +03:00
Andrey Volk 288705f7cd [Build-System] Windows: Upgrade sqlite to v3.53.4_1 and use pre-compiled binaries (#3183) 2026-09-22 13:28:52 +03:00
Andrey Volk 501965c547 [Build-System] Windows: Upgrade libshout to v2.4.6_1, mpg123 to v1.33.7_1, libogg to v1.3.6_1, and use pre-compiled packages for them and for pthreads-w32 v2.9.1_1 (#3180) 2026-09-18 14:34:54 +03:00
Andrey Volk bea7c0f810 [Build-System] Windows: Upgrade lame to v3.101_1 and libtiff to v4.7.2_1 and use pre-compiled binaries (#3179) 2026-09-17 19:06:14 +03:00
Andrey Volk 31e7333e2a [Build-System] Get sphinxbase, pocketsphinx and the communicator model from freeswitch/windows-deps releases instead of files.freeswitch.org, upgrade Windows build to sphinxbase/pocketsphinx v0.8 (#3176) 2026-09-17 16:45:36 +03:00
Andrey Volk 4d35c43013 [Build-System] Windows: Get libsilk v1.0.9_1 pre-compiled package from freeswitch/windows-deps releases instead of building it in tree (#3175) 2026-09-16 23:26:01 +03:00
Andrey Volk 1a11192acf [Build-System] Windows: Get ilbc v0.0.1_1 pre-compiled package from freeswitch/windows-deps releases instead of building it in tree (#3174) 2026-09-16 22:32:02 +03:00
Andrey Volk ce8e22828c [Build-System] Windows: Get g722_1 v0.2.0_1 and broadvoice v0.1.0_1 pre-compiled packages from freeswitch/windows-deps releases instead of building in tree (#3173) 2026-09-16 18:32:06 +03:00
Andrey Volk 241a408d42 [Build-System] Windows: Upgrade opencv to v4.10.0_1, pcre (PCRE2) to v10.48_1 (#3172) 2026-09-16 14:26:56 +03:00
Andrey Volk 21f6fe8b13 [Build-System] Windows: Upgrade flite to v2.2_1. (#3171) 2026-09-16 13:23:56 +03:00
Andrey Volk 5f8a5dbddc [Build-System] Windows: Upgrade lua to v5.3.6_1, mariadb-connector-c to v3.4.9_1. (#3169) 2026-09-15 21:47:33 +03:00
Andrey Volk f1edcccb92 [Build-System] Windows: Upgrade OpenSSL to v3.4.7_1, libpq to v17.11_1, rabbitmq-c to v0.17.0_1, zlib to v1.3.2_1, libpng to v1.6.58_1, curl to v7.88.1_1, libks to v2.0.11_1, signalwire-client-c to v2.0.5_2. (#3167) 2026-09-15 18:10:59 +03:00
Dmitry Verenitsin b3ba603f49 [mod_sofia] Compare display updates against the value actually stored (#3165)
The caller profile fields hold the output of `switch_sanitize_number()`,
but the unchanged check compared them against the raw candidate, so a
value the sanitizer alters never matched and the update repeated on every
message. Sanitize once before the comparison, and reuse the result for the
stores and the log.

Cleanups in the same function:

- Stop reading the name and number channel variables up front. Those reads
  allocate from the session pool and are discarded whenever a SIP field
  supplies the value; the fallbacks below cover the rest. The number's
  `sip_to` branch moves there too, keeping the channel variable ahead of
  the To user.
- Take the scratch copy the comparison needs from the heap rather than the
  pool, so an update that changes nothing costs the session no memory.
- Declare `name` as `const char *` and retarget the display quote strip at
  `dup`, which owns the buffer. Removes four casts that handed out a
  writable pointer into the parsed message.
2026-09-14 16:03:54 +03:00
Andrey Volk 7c2a5d0be7 [mod_sndfile] Windows: update libsndfile to v1.2.2 from GitHub. Add test_sndfile visual studio project to the solution. (#3155) 2026-09-10 01:34:17 +03:00
Dmitry Verenitsin 3af21e69e5 [mod_json_cdr] Fix malformed JSON in URL-encoded POST bodies (#3152)
`switch_url_encode()` encodes with `double_encode` false, so a `%XX`
already present in `json_text` was emitted unchanged and became
indistinguishable from the escapes the body encoding added itself.
Decoding the body then consumed the values' own escapes as well, and
the document no longer parsed. Values arrive pre-encoded whenever
`encode-values` is on, and can hold percent-hex text regardless of it.

Encode with `switch_url_encode_opt(..., SWITCH_TRUE)` so `%` is encoded
too and the body decodes back to exactly the serialized document.
`mod_xml_cdr` and `mod_format_cdr` already encode their bodies this way.

- Size the escape buffer `* 3 + 1`. `switch_url_encode_opt()` reserves
  the terminator from the length it is given, so `* 3` dropped the last
  escaped character when every byte needed encoding. The base64 call now
  takes that length directly.
- Warn at load when `encode` and `encode-values` are both on, since the
  values stay encoded after the body is decoded.
- Correct both encoding config comments; the `encode` one described only
  `base64`.

Adds core coverage in `tests/unit/switch_utils.c` for both
`switch_url_encode_opt()` modes, its output bounds, and a JSON body
encoded and decoded once.
2026-09-09 18:47:24 +03:00
Andrey Volk e6d261c069 [mod_opus] Windows: update opus library to v1.5.2 and use pre-compiled binaries (#3149) 2026-09-09 01:33:47 +03:00
Calvin EllisonandCalvin Ellison 4fa2630a5b [Core] Avoid O(n^2) header dedup when cloning EF_UNIQ_HEADERS events (#3061)
* events: avoid O(n^2) header dedup when cloning EF_UNIQ_HEADERS events

switch_event_dup() copies a source event header by header via
switch_event_add_header_string(). When the source carries
EF_UNIQ_HEADERS (SWITCH_EVENT_CHANNEL_DATA / REQUEST_PARAMS / MESSAGE --
e.g. a channel's variable list), the destination inherits the flag, so
switch_event_base_add_header() runs a full switch_event_del_header()
linear scan of the partially-built list on every add to enforce
uniqueness. Cloning an N-header event is therefore O(n^2).

That scan is redundant while cloning: the source already enforced
uniqueness on insert, so copying it cannot introduce duplicates
regardless of the per-add scan. Clear EF_UNIQ_HEADERS on the
destination for the duration of the copy loop, then restore it.

This is a hot path. switch_channel_execute_on() -- invoked on ring,
answer, media, transfer, park, record and playback -- calls
switch_core_get_variables() and switch_channel_get_variables(), each of
which dup()s an EF_UNIQ_HEADERS event. On a production voicemail server
carrying ~191 channel variables per call, switch_event_del_header_val()
accounted for 47-69% of all FreeSWITCH CPU time in on-box perf profiles.

Microbenchmark (tests/unit/switch_event.c, switch_event_dup of an
N-header CHANNEL_DATA event, 4000 iterations, time per dup):

    N      before     after
    50     4.80 us    3.19 us
    100   11.34 us    5.88 us
    191   28.29 us   10.99 us   (2.6x)
    400  107.05 us   23.27 us   (4.6x)

"before" scales ~O(n^2); "after" is linear. Behaviour is unchanged: the
clone has identical headers, values and order, keeps EF_UNIQ_HEADERS,
and still enforces uniqueness on subsequent adds (covered by the test).

Signed-off-by: Calvin Ellison <cellison@youmail.com>

* tests: cover switch_event_dup uniqueness and add a dup benchmark

Adds a dup_uniq_bench case to the switch_event unit test. For an
EF_UNIQ_HEADERS (CHANNEL_DATA) source event it verifies the clone
preserves header count, values and the EF_UNIQ_HEADERS flag, and that
re-setting an existing key does not produce a duplicate in the clone.
It also prints a switch_event_dup timing sweep across header counts,
used to validate the O(n^2) -> O(n) change in switch_event_dup().

Signed-off-by: Calvin Ellison <cellison@youmail.com>

* tests: add dup_faithful_copy regression for switch_event_dup

Covers the EF_UNIQ_HEADERS edge case for the O(n^2)->O(n) dup change: a well-formed EF_UNIQ source stays unique through dup, and a malformed source already holding duplicate names (only possible if headers were added before the flag was set) is copied faithfully rather than silently collapsed to the last value.

Signed-off-by: Calvin Ellison <cellison@youmail.com>

* tests: gate dup_uniq_bench behind #ifdef BENCHMARK

The dup_uniq_bench timing sweep is a benchmark rather than a pass/fail correctness test. Guard the whole test with #ifdef BENCHMARK (matching the existing benchmark in this file) so it stays out of normal test runs; dup_faithful_copy continues to cover correctness of the switch_event_dup change.

Signed-off-by: Calvin Ellison <cellison@youmail.com>

* switch_event: clarify EF_UNIQ_HEADERS dup comment, brace one-line test loops

Address review feedback on the switch_event_dup change:

- src/switch_event.c: the fast-path comment claimed todup's headers are "already unique" unconditionally. That only holds when EF_UNIQ_HEADERS is set (names are deduped on insert); reword to scope the claim to that case and to the verbatim-copy intent.

- tests/unit/switch_event.c: expand one-line loops to braced form per the SignalWire coding guidelines.

Signed-off-by: Calvin Ellison <cellison@youmail.com>

---------

Signed-off-by: Calvin Ellison <cellison@youmail.com>
Co-authored-by: Calvin Ellison <cellison@youmail.com>
2026-09-04 19:43:23 +03:00