Commit Graph

95 Commits

Author SHA1 Message Date
Chris Rienzo c2e240d6dc [core] Add switch_core_session_set_external_id() which lets you define an additional identifier that you can use in switch_core_session_locate(). 2021-10-23 22:00:26 +03:00
Andrey Volk 6da4f147de [Unit-Tests] Fix switch_core_video test to use temporary path for generated files and clean them up. Ignore test runtime dirs. 2021-10-23 22:00:25 +03:00
Mike Jerris 3dbf6ebee3 .gitignore 2021-10-23 22:00:15 +03:00
Michael Jerris 959e154623 .gitignore 2021-10-23 22:00:07 +03:00
Michael Jerris 22e35ffa7b [test] add missing file for test 2021-10-23 22:00:07 +03:00
Seven Du 5243fbd3c5 [core, mod_av] move switch_packetizer to core 2021-10-23 22:00:06 +03:00
Seven Du 48e3a37587 [core] fix leak in unit test 2021-10-23 22:00:04 +03:00
Seven Du 2448d32c0f [core] add jpg data_url support with stb_image 2021-10-23 22:00:03 +03:00
Seven Du 2a87e7b98c [core] add stb_image_write supported image write 2021-10-23 22:00:03 +03:00
Seven Du 58d5442dc5 [core] add stb_image to read more supported picture formats 2021-10-23 22:00:03 +03:00
Seven Du 6761e8767e [core] and core video alpha patch test code 2021-10-23 22:00:01 +03:00
Seven Du 623fecd599 [Core] Add partial Asr support 2021-10-23 21:59:49 +03:00
Andrey Volk bd7b76bacf [Core] Add new switch_core_hash_insert_pointer(switch_hash_t *hash, const void *data) API to be able to insert data into a hash with an auto-generated key based on the data pointer. Cleanup switch_loadable_module_process() to not generate hash keys for stored events itself. Add unit-test. 2021-10-19 20:35:12 +03:00
Andrey Volk 1b048a8a97 [Core, mod_hash] Add two APIs switch_core_hash_insert_alloc_destructor and switch_core_hash_insert_dup_destructor. Code cleanup in mod_hash. Add unit-tests. 2021-10-19 20:26:50 +03:00
Andrey Volk e42ebbb33f [Core] scan-build: Fix false-positive use-after-free in switch_xml_free_attr(). Add unit test. 2021-10-19 20:15:58 +03:00
Andrey Volk 95fb8c7773 [Core] Fix crash on removing xml attributes. Add unit test. 2021-10-19 20:15:57 +03:00
Dragos Oancea 79980f0767 [unit-tests] add SEND_RTCP_MESSAGE event/rtcp unit-test. 2021-10-04 08:54:09 +00:00
suchi.sahoo 25823013f8 [Core] Add switch_safe_atol() and switch_safe_atoll() functions. Add a unit-test. 2021-08-13 20:05:29 +03:00
Chris Rienzo 311e932df5 [core, mod_commands] Execute command under shell when using spawn in switch_system(). 2021-07-16 17:34:53 +03:00
Andrey Volk 9aee9b8e24 [Core, mod_commands] Add posix_spawn replacement for the system call. Add unit-tests. 2021-07-16 17:34:42 +03:00
Chris Rienzo deecaae870
STIR/SHAKEN (#1160)
* [core] Add SWITCH_CAUSEs for STIR/SHAKEN.
[mod_sofia] Add sofia_verify_identity dialplan APP as a STIR/SHAKEN verification service.  Set sip_hangup_on_verify_identity_fail=true to end calls that fail verification, otherwise check sip_verstat and sip_verstat_detailed channel variables for verification result.

* [mod_sofia] Fix stir shaken implementation issues on fail.

* fix build

* Fix given comments

* stir_shaken_passport_get_grant return does not require to be freed.

* reworked things

* [core] add switch_rfc822_datetime_to_epoch()

* [mod_sofia] fix test return code

* [mod_sofia] Add Date header when signing Identity

* [mod_sofia] Check Date - WIP doesn't work

* [mod_sofia] STIR/SHAKEN check SIP Date header

* Try to give time for sofia to clean up calls

Co-authored-by: Andrey Volk <andywolk@gmail.com>
2021-04-27 13:54:32 -06:00
Andrey Volk fd27504a7d [Core] Add switch_digest(), switch_digest_string() APIs. Add unit-tests. 2021-04-12 01:03:15 +03:00
Chris Rienzo e3a6ec86f8 [core] Update switch_ivr_enterprise_originate() to accept optional switch_dial_handle_list_t instead of dialstring. 2021-03-23 20:23:28 +03:00
Andrey Volk eaf5a70246 [Unit-tests] Fix build issues in switch_eavesdrop.c test file. 2021-03-17 01:15:42 +03:00
Andrey Volk 3065cb9168 [mod_sofia] Fix memory leaks caused by improper profile destroy. Add a unit-test. 2021-03-17 00:58:29 +03:00
Dragos Oancea 5aabb54f68 [core] eavesdrop: init L16 codec at right ptime in certain conditions.
[core] eavesdrop: avoid eavesdropping on itself and return error.

[core] eavesdrop: adjust buffer operations for ptime mismatch and for when ptimes are the same.

[core] eavesdrop: add buffering based on LCM (Least Common Multiple) when ptime mismatch,
and have audio write thread enabled when ptime eavesdropee < ptime eavesdropper.

[unit-tests] add unit-tests for eavesdrop.
2021-03-17 00:47:27 +03:00
Stefan Weil 6609ce9510 Fix some typos (most found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-02-24 13:59:11 +01:00
s3rj1k 91f12b5920
[Unit-tests] Fix previously defined AM_* in tests. 2021-02-23 20:59:26 +03:00
willie zhang 62970aa998
[Core] fix asr resample out data len 2020-12-23 21:45:26 +04:00
Andrey Volk 940d82ef9b [Build-System] Fix build with MSBuild. 2020-12-23 00:11:37 +04:00
Andrey Volk 913551315b [Core] switch_core_port_allocator: Replace getaddrinfo() (may get stuck) with switch_sockaddr_new() and fix IPv6. 2020-12-17 21:15:14 +04:00
windy-wang 1d2a1057f8
[Core] Fix the null char in truncated value returned by switch_b64_decode 2020-09-01 21:04:49 +04:00
Andrey Volk 1cea3da2fc [Tests] Fix Drone CI capturing Address Sanitizer reports sent to stderr. 2020-06-24 21:23:53 +04:00
Andrey Volk 0275ea1eb4 [Build-System] Use $(DefaultPlatformToolset) so it's easier to build using newer Microsoft Visual Studio versions. 2020-05-25 14:18:25 +04:00
Andrey Volk 6299fc12be [Build-System] Fix folder conflict when building unit-tests on Windows. 2020-05-24 15:37:31 +04:00
Andrey Volk 0072806df1 [mod_loopback] Split null_auto_answer into two variables null_enable_auto_answer and null_auto_answer_delay. Default auto_answer_delay is 0 instead of 1 ms. Auto answer is enabled by default if null_enable_auto_answer is not set. More carefully compute the delay in ms to not block channel longer than needed. 2020-05-08 01:22:48 +04:00
Seven Du 0cafcf8a9b [core] Add global/leg variable to originate: group_confirm_timeout
group_confirm_timeout is a value in seconds for the maximum time to wait for group confirmation to finish.  This variable replaces group_confirm_cancel_timeout which has been deprecated.  Set group_confirm_timeout=0 to disable leg_timeout during group confirm.
2020-05-08 01:17:22 +04:00
Seven Du 2a54e08019 [core, mod_loopback] Add test case for group confirm over loopback endpoints 2020-05-08 01:12:17 +04:00
Seven Du fcda4c6a06 [core] add support to set group confirm on each leg 2020-05-08 01:11:44 +04:00
Andrey Volk 8778cda16d [Core] Wait sql threads to spin up. Fixes module_exists, show_codec commands. 2020-05-07 02:26:22 +04:00
Chris Rienzo 8e0c0df5b6 [core] Fix switch_vad_process() to properly use result of fvad_process(). Fixes #18 2020-03-05 21:16:33 +04:00
Dragos Oancea 93dcd6e77e [unit-tests] scan-build: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'int16_t' 2020-02-21 20:28:41 +00:00
Dragos Oancea c1b66f650f [core] add audio channels limit when opening files, configurable through switch.conf.xml (param "max-audio-channels"), add unit-test. 2020-01-27 23:35:19 +00:00
Andrey Volk 893a3cdc1f [Unit-test] Run tests in parallel 2020-01-23 02:29:57 +04:00
Andrey Volk 6d31e846a8 [Unit-tests] Implement module tests in Drone CI 2020-01-21 22:23:30 +04:00
Dragos Oancea c2e80ea1e3 [core] avoid overflow when channel muxing 2020-01-18 00:58:57 +04:00
Dragos Oancea 4bef44b7b0 [unit-tests] fix build switch_rtp on MacOS 2020-01-13 18:23:58 +00:00
Dragos Oancea 664563ca9f [unit-tests] add RTP test with session 2020-01-09 12:38:38 +04:00
Andrey Volk 44ba7eb753 [Unit-tests] Do not initiate sqldb by default unless requested. 2020-01-07 21:17:52 +04:00
Andrey Volk 21229ad18f
Merge pull request #194 from signalwire/coredump
[Unit-tests] Collect crash data when a unit-test core-dumps
2020-01-06 22:49:21 +04:00