Sebastian Kemper [Fri, 18 Oct 2019 16:28:07 +0000 (18:28 +0200)]
[mod-sofia] Fix reINVITE after T38 is rejected
From FS-11833.
After FS sends a reINVITE to T38 which gets rejected by peer it is no
longer in a state where it can properly answer a reINVITE which requests
a change of the media setup.
1. FS sends INVITE (destination is a fax machine)
2. Call connects with "8 101"
3. FS sends reINVITE to T38
4. T38 rejected (488)
5. FS receives INVITE to "8"
6. FS replies with 200 OK without SDP
7. Call fails
The bug is related to TFLAG_SDP. This flag is set when a media session
is established. And when there's a reINVITE sofia_glue_do_invite() from
sofia_glue.c is called and clears the flag again:
sofia_clear_flag_locked(tech_pvt, TFLAG_SDP);
So when FS sends a reINVITE to T38 the flag gets cleared. But when the
reINVITE is rejected with 488 the flag is not set again. It stays
cleared. So the call continues with the previously negotiated media, fax
passthrough (8 101 in this case), but TFLAG_SDP is not set.
So when FS receives a reINVITE at this point it doesn't see the need to
renegotiate anything, even though it realizes that 2833 DTMF is now off:
2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO
When FS doesn't send a reINVITE (fax_enable_t38_request=false) and the
reINVITE to "8" is received, TFLAG_SDP is still set and then FS
understands that it needs to renegotiate and replies with a 200 OK that
includes SDP:
2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO
2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8237 skemper was here in line 8232
2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8390 skemper was here in line 8390.
2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8496 Audio params are unchanged for sofia/external/+called_number.
2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8243 Processing updated SDP
This fixes the state problem after a rejected T38 reINVITE by setting
TFLAG_SDP.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Commit bc3e1c9e7de1855eec454bba467fd2586e5e251b introduced a typo that
results in EL_REFRESH never being used, even if available. This can
cause the screen to garble.
This fixes the typo.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In "event_handler()" function, when encrypting data using openssl 1.1.0,
the context ctx is allocated by "EVP_CIPHER_CTX_new()", then data is
encrypted, and at the end, EVP_CIPHER_CTX_cleanup is called. This
function resets the context (the function itself is deprecated, and has
been renamed to "EVP_CIPHER_CTX_reset) so that it can be used again. The
correct call would be to "EVP_CIPHER_CTX_free()", which frees the
memory. The code for openssl 1.0 is OK, since the "ctx" struct is kept
in stack. The same thing happens during decryption. "ctx" is allocated,
but never freed.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Merge pull request #1804 in FS/freeswitch from ~DRAGOS_OANCEA/freeswitch-dragos:FS-12026 to master
* commit 'aaacaa19deb6ef764acdfabefb625f3ddc4e2324':
FS-12026 [mod_http_cache] fix multichannel file download and play
FS-12026 [mod_httapi] fix multichannel file download and play
Andrey Volk [Tue, 20 Aug 2019 15:23:38 +0000 (10:23 -0500)]
Merge pull request #1800 in FS/freeswitch from bugfix/FS-12001-mod_callcenter-can-t-use-mod_mariadb-with-mysql-due-to-keyword-on-table-schema to master
* commit '71b0ab24b1af10477369047149b158579b31016b':
FS-12001: [mod_callcenter] Workaround issues with renaming tables and columns in SQLite version prior to 2019-02-07 (3.27.0).
Andrey Volk [Thu, 15 Aug 2019 12:59:06 +0000 (07:59 -0500)]
Merge pull request #1795 in FS/freeswitch from ~FERNANDOJDK/freeswitch:bugfix/FS-12001-mod_callcenter-can-t-use-mod_mariadb-with-mysql-due-to-keyword-on-table-schema to master
* commit 'd3487dcc3904a8093a7981c0ec5ff57225f5a397':
FS-12001: [mod_callcenter] Renamed column name from 'system' to 'instance_id' to make mod_callcenter work with MySQL through mod_mariadb
Andrey Volk [Fri, 9 Aug 2019 09:39:44 +0000 (13:39 +0400)]
FS-11987: [sofia-sip] Extract URI from info param of SIP Identity Header
- allow for a spaces between "info=" and opening '<'
- extract URI from inside "<>" but allow empty - let the higher level app decide what to do about it
- replace strndup (does not exist on Windows) with memcpy
Merge pull request #1791 in FS/freeswitch from bugfix/FS-11991-mod_mariadb-err-when-start-freeswitch to master
* commit '9520f8e1115dee31c0221967191079a3b01d02c6':
FS-11991: [Core] Fix bug in the database module interface preventing tables from being created when no drop_sql
Mike Jerris [Thu, 1 Aug 2019 16:13:37 +0000 (11:13 -0500)]
Merge pull request #1779 in FS/freeswitch from ~DRAGOS_OANCEA/freeswitch-dragos:FS-11967-rate to master
* commit '6fb039607686c1f2cf9265b6ae9b01a29037eb9c':
FS-11967: add mod_opus to unit test XML
FS-11967: add unit test for switch_core_codec_copy()
FS-11967: [core] fix rate of recording for Opus