Commit Graph
100 Commits
Author SHA1 Message Date
Dragos Oancea c27534c89a [libvpx] scan-build: Division by zero - measure_square_diff_partial() 2026-07-10 19:38:46 +03:00
Dragos Oancea 8b7a8c4aea [core] SDP: replace SIP lingo in SDP offer/answer. 2024-01-26 21:01:32 +03:00
Dragos Oancea b6ccc27e6f [core] JB audio: check for jb type and silence some debug. (#1191) 2023-09-05 23:19:59 +03:00
Dragos Oancea 7bc999309c [mod_opus] fix remote codec rate to match. 2023-06-15 16:29:43 +03:00
Dragos Oancea 5e914efc8c [core, mod_opus] bring more fmtp params to core (offer/answer). 2023-06-15 16:26:17 +03:00
Dragos Oancea f90aeade4f [core] Opus RTP timestamp: adding an exception on RTP session creation.
https://www.rfc-editor.org/rfc/rfc7587.html
"The RTP timestamp is incremented with a 48000 Hz
   clock rate for all modes of Opus and all sampling rates.  The unit
   for the timestamp is samples per single (mono) channel"

Follow up: 50f57f85732b0d5a58a39f3fca7b654f894b0c9d, ccbef9e0c7 .
2023-06-15 16:25:46 +03:00
Dragos Oancea 5065c0b118 [mod_opus] fix samples_per_packet for 8khz, 16khz, 24khz. 2023-06-15 16:22:52 +03:00
Dragos Oancea a458d704ab [mod_opus] show uuid in logs. 2023-06-14 16:01:27 +03:00
Dragos Oancea 24452ff104 [mod_opus] fix configuration glitches (switch_true() instead of atoi()). 2023-06-14 15:57:54 +03:00
Dragos Oancea 9b20b324f5 [mod_sofia] Coverity fixes
[mod_sofia] coverity CID 1024253 (Dereference before null check)
[mod_sofia] coverity CID 1024254 (Dereference before null check)
[mod_sofia] coverity CID 1257620 (Logically dead code)
[mod_sofia] coverity CID 1024750 (Dereference null return value)
2023-06-12 18:17:12 +03:00
Dragos Oancea 86875d2381 [mod_verto] Coverity fixes
[mod_verto] coverity CID 1468439 (Dereference after null check)
[mod_verto] coverity CID 1294451 (Dereference before null check)
[mod_verto] coverity CID 1468443 (Logically dead code)
2023-06-12 17:25:37 +03:00
Dragos Oancea ef275aec8a [mod_portaudio] coverity CID 1024263 (Dereference before null check) 2023-06-09 12:15:11 +03:00
Dragos Oancea b5cb26dc47 [Core] Coverity fixes
* [core] coverity CID 1024482 (Dereference after null check)

* [core] coverity CID 1468368 (Logically dead code)

* [core] coverity CID 1468459 (Logically dead code)

* [core] coverity CID 1232742 (Dereference before null check)
2023-04-18 19:30:22 +03:00
Dragos Oancea 5597fe3098 [mod_avmd] coverity CID 1395555 (Dereference before null check) 2023-04-18 12:58:16 +03:00
Dragos Oancea e1d966ed0a [mod_dptools] coverity CID 1468646 (Unsigned compared against 0) 2023-04-18 12:55:42 +03:00
Dragos Oancea aab9839678 [mod_sofia] coverity CID 1468496 (Unchecked return value) 2023-04-17 14:55:13 +03:00
Dragos Oancea 01e960cd90 [mod_erlang_event] coverity CID 1500239 (Uninitialized scalar variable) 2023-04-17 14:51:45 +03:00
Dragos Oancea 98c0482844 [mod_opusfile] coverity CID 1468424 (Missing break in switch) 2023-04-17 14:47:39 +03:00
Dragos Oancea 73ea37c5ab [Core] Coverity fixes
* [core] coverity CID 1320751 (Dereference before null check)

* [core] coverity CID 1294546 (Unchecked return value)

* [core] coverity CID 1227661 (Logically dead code)

* [core] coverity CID 1227656 (Logically dead code)

* [core] coverity CID 1060948 (Explicit null dereferenced)

* [core] coverity CID 1346465 (Unchecked return value)

* [core] coverity CID 1364953 (Logically dead code)

* [core] coverity CID 1468210 (Dereference before null check)

* [core] coverity CID 1468546 (Dereference before null check)

* [core] coverity CID 1468342 (Dereference before null check)
2023-04-05 18:54:11 +03:00
Dragos Oancea 3d547647b2 [mod_verto] Coverity fixes
* [mod_verto] coverity CID (Logically dead code)

* [mod_verto] coverity CID 1468609 (Logically dead code)
2023-03-29 19:14:54 +03:00
Dragos Oancea 48b8b0c4d7 [Core] Coverity fixes
* [core] coverity CID 1395504 (Logically dead code)

* [core] coverity CID 1395581 (Dereference before null check)

* [core] coverity CID 1346451 (Improper use of negative value)

* [core] coverity CID 1395497 (Dereference before null check)

* [core] coverity CID 1468458 (Dereference before null check)
2023-03-29 19:08:18 +03:00
Dragos Oancea 3c1824a685 [mod_amr] coverity CID 1395603 (Unsigned compared against 0) 2023-03-29 17:20:04 +03:00
Dragos Oancea 3c4695ea31 [mod_opus] coverity CID 1320733 (Result is not floating-point) 2023-03-29 17:18:57 +03:00
Dragos Oancea f7c94bc01d swigall 2022-10-28 20:22:33 +03:00
Dragos Oancea 8e59603d98 [core][mod_sofia] remove ZRTP (deemed obsolete).
[unit-tests][build-system][docs] remove references to ZRTP.
2022-10-28 20:19:42 +03:00
Dragos Oancea c9def5990e [core, mod_sofia] add some extra checks when creating the digest. 2022-08-08 18:56:09 +03:00
Dragos Oancea 871cc585b1 [mod_voicemail] fix vm_fsdb_msg_list 2022-07-06 15:26:43 +03:00
Dragos Oancea beffab1d68 [core] RTP: a media timeout fix + add pcap based-unit tests. 2022-06-29 18:20:27 +03:00
Dragos Oancea 92a336a07d [core] fix loglevel - switch_ivr_phrase_macro_event() 2022-06-08 13:25:35 +03:00
Dragos Oancea 30d5d58e6e [core] fix set rtp flag for rtcp events after flags zeroed out. 2022-03-29 15:07:50 +03:00
Dragos Oancea df81021a11 [core] make switch_core_media_prepare_codecs() more unit-test friendly. 2022-03-21 13:59:37 +03:00
Dragos Oancea 24355b63ab [mod_local_stream] fix path with ".loc" file extension. 2022-03-15 18:47:06 +02:00
Dragos Oancea a40584b465 [mod_verto] fix potential memleaks at init. 2022-03-15 16:49:17 +03:00
Dragos Oancea 7fb158ae6a [core] RTP: remove unfulfillable conditions involving timer. add missing LF to DEBUG log line. 2022-02-21 22:53:02 +03:00
Dragos Oancea ae272359f4 [core] Handling RTCP MUX resulting in gaps
(fix proposed by Leon de Rooij)
2022-02-21 15:18:45 +02:00
Dragos Oancea 77481b327c [core] extend count of acl entries (per SOFIA_MAX_ACL). 2021-12-09 11:36:39 +02:00
Dragos Oancea 5b8e1dd88a [mod_event_socket] fix strcmp crash 2021-11-19 16:17:03 +02:00
Dragos Oancea cfb4c3ca80 [mod_http_cache][unit-tests] remove timestamp unit-test 2021-10-26 14:27:14 +00:00
Dragos Oancea 68039d344d [core] fix build SWITCH_BYTE_ORDER == __BIG_ENDIAN 2021-10-26 08:42:58 +00:00
Dragos Oancea b3e53bdb6c [core] fix log format string. 2021-10-23 22:01:14 +03:00
Dragos Oancea fe34509bc5 [mod_conference] scan-build: Value stored to 'status' is never read - conference_loop_input() 2021-10-23 22:01:09 +03:00
Dragos Oancea 013894ac33 [core] RTP: remove redundant condition when checking payload type of incoming packets. 2021-10-23 22:00:57 +03:00
Dragos Oancea a5a1fb9dd8 [mod_sofia] fix memleak (presence) 2021-10-23 22:00:56 +03:00
Dragos Oancea ce9905cdf4 [core] don't hangup call on SRTP errors (new default behaviour) 2021-10-23 22:00:55 +03:00
Dragos Oancea 8eaf6911dc [mod_sofia] unit-tests fix - don't run shaken tests if lib not installed. 2021-10-23 22:00:50 +03:00
Dragos Oancea 31970d51fd [core] MSRP: fix memleak (ssl) 2021-10-23 22:00:50 +03:00
Dragos Oancea 392bc26a43 [mod_sofia] fix memleak with invalid hostname as gw/proxy 2021-10-23 22:00:49 +03:00
Dragos Oancea 3764871c1a [mod_conference] json: MFLAG_DIST_DTMF 2021-10-23 22:00:46 +03:00
Dragos Oancea c8413bb77c [mod_http_cache] fix race cond at shutdown 2021-10-23 22:00:46 +03:00
Dragos Oancea c86e3827f9 [mod_sofia] rfc8760: use different nonce per auth algorithm.
[mod_sofia] keep unconsumed nonce in the db for 32 seconds (timer_t1x64) + nonce_ttl.
[mod_sofia] add #ifdef condition on using sha512: OPENSSL_VERSION_NUMBER >= 0x10101000L
2021-10-23 22:00:42 +03:00
Dragos Oancea b2a8f9ce9f [core] change estimator CUSUM design params for loss to reduce oscillations. rename var. 2021-10-23 22:00:09 +03:00
Dragos Oancea af095ebb68 [core] scan-build: Dereference of null pointer (loaded from variable 'flags') 2021-10-19 20:35:09 +03:00
Dragos Oancea 0cf323c339 [mod_opusfile] unit-tests: add timer to fix random failures due to the fact that the decoding callback is not installed immediatelly 2021-10-15 16:52:06 +03:00
Dragos Oancea 97a0b0fbae [mod_opusfile] protect ogg data buff 2021-10-15 16:52:06 +03:00
Dragos Oancea 37ab323c13 [mod_opusfile] add ogg/opus streams, fix Makefile for encoding.
[mod_opusfile] add stats, opusctl

[mod_opusfile] add unit-test using teletone
2021-10-15 16:52:06 +03:00
Dragos Oancea 79980f0767 [unit-tests] add SEND_RTCP_MESSAGE event/rtcp unit-test. 2021-10-04 08:54:09 +00:00
Dragos Oancea acbe88d18d [core] polish SEND_RTCP_MESSAGE 2021-10-04 08:54:05 +00:00
Dragos Oancea bb7bf86bb9 [core] print SRTP lib version at init. 2021-09-27 16:42:37 +03:00
Dragos Oancea 5aacf41f14 [core] add core media getter (it gets the RTP session, handy for unit-testing). 2021-09-27 16:42:30 +03:00
Dragos Oancea 9eb20d7b54 [mod_sofia] fix memleak on gw registration timeout or 403 2021-09-08 19:50:52 +03:00
Dragos OanceaandAndrey Volk 69cdaac60b [mod_sofia] more fixes around md5 hash infoleak (tricky cfg).
* [mod_sofia] md5 hash infoleak fixes: (explictly allow host set in gw params 'register_proxy' and 'outbound_proxy' to challenge too).

"We have tightened security for digest authentication on gateways.
If you have gateways configured using dns and not an ip address,
you may need to configure gw-auth-acl in gateway configuration to
specify the IP addresses you can send auth challenges to for this gateway.
This is meant to better secure who we will send auth challenges." (Mike Jerris)

[mod_sofia] add REGISTER/401 unit-tests (sipp based)

[mod_sofia] add INVITE/407 unit-test (sipp-based)

* Cleanup spacing

Co-authored-by: Andrey Volk <andywolk@gmail.com>
2021-09-08 18:22:14 +03:00
Dragos Oancea c41aa83b17 [mod_sofia] fix md5 digest infoleak
[mod_sofia] refactor IP checks with sip-dig

[mod_sofia] add sipp-based unit-tests (use spawn_instead_of_system)
2021-08-13 18:17:17 +03:00
Dragos Oancea a83b7db5a7 [unit-tests] fix sps-related race in the sndfile test. 2021-08-09 18:52:49 +03:00
Dragos Oancea 970e32e574 [unit-tests] [mod_sndfile] increase SPS limit 2021-08-09 18:51:36 +03:00
Dragos Oancea cbcf6f2e2d [unit-tests] [mod_sndfile] fix build for Debian Jessie 2021-08-09 18:47:55 +03:00
Dragos Oancea 8abd936ded [unit-tests] [mod_sndfile] parallelize unit-tests, each audio extension test in its own session. 2021-08-09 17:07:35 +03:00
Dragos Oancea a562db760c [mod_opus] add cfg setting to overwrite the fmtp stereo param coming from remote. Eg: incoming SDP has stereo=1 but we want a mono call so we answer with stereo=0.
* [mod_opus] add cfg setting to overwrite the fmtp stereo param coming from remote. Eg: incoming SDP has stereo=1 but we want a mono call so we answer with stereo=0.
sprop-stereo will be set to 0 too.

* [core] opus: use switch_core_max_audio_channels() with remote fmtp stereo=1 to allow disabling of stereo.
2021-05-14 18:36:30 +03:00
Dragos Oancea 2915d3aba8 [mod_amrwb] add cfg setting mode-set-overwrite (it will answer with just one mode-set value) - fixes audio quality issues in mod_conference with some UEs. 2021-05-07 14:29:33 +00:00
Dragos Oancea 7fc5d9a7c3 [core] RTP: handle flush for incoming stream with DTX or packet loss. 2021-04-15 16:37:08 +03:00
Dragos Oancea 73569bb1f7 [mod_sofia] rfc8760: reorder hash algorithms by priority (strength), no matter the order provided in the cfg 2021-04-13 20:24:17 +03:00
Dragos Oancea 833235b941 [mod_sofia] Add RFC8760 (sha-256, sha-512)
enable on the sip profile, eg:
<param name="rfc8760-auth-algorithms" value="sha-256,md5"/>
2021-04-12 09:57:56 -04:00
Dragos Oancea 2e65ca908d [core] rtp: fix #ifdef DEBUG_TS_ROLLOVER (#357) 2021-03-22 18:50:12 +03:00
Dragos Oancea dd39997588 [mod_av] fix memory leak on file playing 2021-03-22 18:49:13 +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
Dragos Oancea 3509ae537e [core] native tap fix (pass the copy of the frame to switch_core_session_write_frame() so it does not get encoded) 2021-03-17 00:29:17 +03:00
Dragos Oancea b774c5e23f [core] eavesdrop: reduce lock contention, fix error condition + enable eavesdrop stereo 2021-03-16 20:26:56 +03:00
Dragos Oancea b775c1f91a [mod_enum] fix mem leak - ldns_resolver_new() - vanilla cfg. 2021-03-16 14:46:39 +00:00
Dragos Oancea 4734904d2d [mod_amr] introduce new cfg setting force-oa to change between OA/BE when originating, show session in debug logs, update configs. 2021-03-10 15:49:10 +02:00
Dragos Oancea 9da3408d2d [mod_tts_commandline] check return of switch_system() against 127 too 2021-03-05 11:57:25 +02:00
Dragos Oancea 1d07634d7d [mod_amrwb] handle frame types SPEECH_LOST and NO_DATA. add unit test. 2021-03-05 11:30:52 +02:00
Dragos Oancea 752e1c3386 [mod_amr] handle frame type NO_DATA and add unit test. 2021-03-03 19:51:24 +02:00
Dragos Oancea d2959010c1 [mod_amrwb] show the session in debug logs. 2021-02-05 14:38:32 +00:00
Dragos Oancea 0b9c7c678b [mod_amrwb] add cfg setting to switch between OA/BE when originating 2020-06-10 12:20:45 +00:00
Dragos Oancea 4e78f63847 [libvpx] scan-build: Division by zero - measure_square_diff_partial() 2020-03-06 21:51:03 +04:00
Dragos Oancea 65fa90894e [core] scan-build: Value stored to 'xcheck_jitter' is never read 2020-03-06 19:38:16 +04:00
Dragos Oancea 165ca28fa1 [core] scan-build: Value stored to 'status' is never read - switch_core_session_write_frame() 2020-03-06 19:36:04 +04:00
Dragos Oancea 60cf5a0a3c [core] scan-build: Value stored to 'ip' is never read - switch_core_media_recover_session() 2020-03-06 19:33:46 +04:00
Dragos Oancea 87ab38d281 [core] scan-build: Value stored to 'pass_fmtp' is never read - switch_core_media_gen_local_sdp() 2020-03-06 19:32:28 +04:00
Dragos Oancea e6c52efe64 [core] scan-build: Value stored to 'timer_name' is never read - switch_core_media_activate_rtp() 2020-03-06 19:29:52 +04:00
Dragos Oancea c7eee4ba76 [core] scan-build: Value stored to 'ptime' is never read 2020-03-06 19:28:09 +04:00
Dragos Oancea e2e6d13cd8 [mod_amrwb] fix memory leak at load time (xml) 2020-03-06 15:08:29 +00:00
Dragos Oancea d0502b405e [mod_amr] fix memory leak at load time (xml) 2020-03-06 15:00:33 +00:00
Dragos Oancea 0b5c7307a7 [mod_portaudio] scan-build: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'previous').
Value stored to 'codec_ms' is never read.
2020-03-06 13:40:03 +00:00
Dragos Oancea 731d8f027e [mod_erlang_event] scan-build: Function call argument is an uninitialized value 2020-03-06 11:47:16 +00:00
Dragos Oancea 389a917998 [mod_redis] scan-build: Assigned value is garbage or undefined 2020-03-06 11:17:03 +00:00
Dragos Oancea 56e82bd9c0 [mod_verto] scan-build: Value stored to 'cur' is never read 2020-03-06 11:09:29 +00:00
Dragos Oancea 480aff54e4 [mod_unimrcp] scan-build: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'mod_profile') 2020-03-06 11:04:01 +00:00
Dragos Oancea e821be1c18 [mod_skinny] scan-build: Dead assignments 2020-03-05 23:54:19 +00:00
Dragos Oancea 3e3445d06c [mod_cv] scan-build: Null pointer passed as an argument to a 'nonnull' parameter.
Access to field 'shape_scale' results in a dereference of a null pointer.
Dead assignments.
2020-03-05 23:42:50 +00:00
Dragos Oancea c78cc7c74b [spandsp] fix memcpy-param-overlap - use memmove() 2020-03-05 18:11:50 +00:00