Commit Graph

3788 Commits

Author SHA1 Message Date
Andrey Volk 96e139854e [mod_sofia] Prevent crash in sofia_handle_sip_i_state on switch_channel_set_state() when PFLAG_3PCC_PROXY flag is set. 2021-03-17 18:21:49 +03:00
Andrey Volk a746d12f6c [mod_sofia] Keep noreg gateways as NOREG, mark unregistered gateways as DOWN.
Co-authored-by: Mike Jerris <mike@signalwire.com>
2021-03-17 18:20:32 +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
Andrey Volk dcb75a79e3 [mod_sofia] Fix multiple memory leaks in sofia_presence_handle_sip_i_subscribe() 2021-03-17 00:56:19 +03:00
surendrasignalwire 7b8a36c2a9 [mod_sofia] Fix recovery reinvite issue 2021-03-17 00:16:32 +03:00
Andrey Volk 167ab11006 [mod_sofia] Fix potential leak of uuid in sofia_event_callback(). 2021-03-16 22:50:02 +03:00
Seven Du bb6ec01d1e [mod_sofia] fix session log 2021-03-16 20:29:04 +03:00
surendrasignalwire 16ee826e2b [mod_sofia] Url encode the sip_to_user before using in 200 ok contact 2021-03-16 20:13:39 +03:00
figaro2015 d27cd90155 Verification of the wss.pem certificate in mod_sofia application code. Display correct reason why sofia profile failed to create (#1067)
[mod_sofia] Verification of the wss.pem certificate in mod_sofia application code. Display correct reason why sofia profile failed to create.
2021-02-13 11:37:01 -05:00
Andrey Volk 212c1ec8d5 Merge pull request #1034 from seven1240/add-call-id-to-log
[mod_sofia] add call-id to log line to link with session uuid
2021-02-05 13:27:53 +03:00
Seven Du 9bb76b94dc [mod_sofia] add call-id to log line to link with session uuid 2021-01-19 11:09:19 +08:00
Ken Rice 69e9e2ec14 [mod_sofia] Add preliminary handing for SHAKEN/STIR via SIP Identity Header 2021-01-15 16:44:58 +03:00
Troy Denton ac5775b6e0 [mod_sofia] Remove 'precondition' from 'Supported:' w/ 100rel 2021-01-08 19:55:59 +03:00
FredWemyss e10126942e [mod_sofia] Add back sip Identity header into sip_i_identity variables in sofia_parse_all_invite_headers 2020-09-23 21:58:36 +04:00
Chris Rienzo e82e68d182 Merge pull request #66 from micmac1/t38-reinv-fix
[mod-sofia] Fix reINVITE after T38 is rejected
2020-08-10 11:03:08 -04:00
Andrey Volk 2fc0e3b80a [Build-System] Remove Sofia-Sip library from the FreeSWITCH tree and use packages instead. 2020-08-03 23:46:45 +04:00
Andrey Volk b06036e30f [mod_sofia] Cleanup usage of sofia-sip headers. 2020-08-03 22:15:19 +04:00
MikhailKalashnikov 90fb233ac6 [mod_sofia] Fix crash when proxy INFO without body 2020-07-17 17:58:35 +04:00
lazedo 00113c480d [mod_sofia] Verify that replaces header params exist 2020-06-29 22:46:18 +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
Mike Jerris 598d52d5fb [mod_sofia] remove blank display name that can show up in from uri 2020-05-07 03:18:16 +04:00
Chris Rienzo 52a17066eb [mod_sofia] Quiet down error when registration credentials are missing 2020-05-07 02:42:01 +04:00
Jonas Jelten 30cf345b41 [mod_sofia] Fix rtp config ipv4/ipv6 index confusion 2020-04-28 13:13:13 +02:00
Nick Lemberger 4fa0870ef0 [mod_sofia] Fix potential buffer overrun when rewrite_multicasted_fs_path is enabled. 2020-04-01 00:11:24 +04:00
Jourdan Templeton 5805addbeb [mod_sofia] Add new gateway param 'contact-in-ping' to support for Microsoft Teams Direct Routing 2020-03-23 23:29:53 +04:00
Dragos Oancea d23608f0cb [mod_sofia] scan-build: Access to field 'sip_call_info' results in a dereference of a null pointer (loaded from variable 'sip') 2020-02-12 01:53:24 +00:00
Dragos Oancea a05f7b8da0 [mod_sofia] scan-build: Access to field 'sip_payload' results in a dereference of a null pointer (loaded from variable 'sip') 2020-01-31 21:52:47 +00:00
Andrey Volk 496d39bbd7 Merge pull request #221 from signalwire/sofia_abort
[mod_sofia] Add abort-on-empty-external-ip global param disabled by default.
2020-01-29 21:00:42 +04:00
Andrey Volk 751d5ff55b [Unit-tests] Place module tests into their module's Makefile.am, fix tests, add missing Makefile.am to mod_png, implement recursive make check. 2020-01-18 09:58:42 +00:00
Andrey Volk a074814b3f [mod_sofia] Add abort-on-empty-external-ip global param disabled by default. 2020-01-11 01:18:14 +04:00
Andrey Volk 6f0ad146d2 [mod_sofia] Fix crash from double profile unlock on outgoing channel from a gateway on a paused profile 2019-12-31 03:13:03 +04:00
Seven Du 13dc7629d6 [mod_sofia] add sip_refer_status_code channel variable to track refer status 2019-12-31 03:08:58 +04:00
Andrey Volk e753e615ca [mod_sofia] Module load will fail if ext-rtp-ip or ext-sip-ip configuration param is set as empty string. 2019-12-31 02:17:17 +04:00
Andrey Volk 8442218df1 [mod_sofia] sofia_handle_sip_i_invite() leaks xml and event objects on acl_token, sofia_reg_handle_sip_r_challenge() leaks xml object when a user does not have params. 2019-12-31 00:45:00 +04:00
Andrey Volk e2c1e3a7d3 FS-12055: [mod_sofia] Fix leaks and release profile properly in general_event_handler() and actual_sofia_presence_event_handler() 2019-12-30 23:58:28 +04:00
Andrey Volk 24e0949844 FS-12056: [mod_sofia] Fix leaking destination in sofia_glue_do_invite() and leaking route in sofia_glue_gen_contact_str() 2019-12-30 23:56:16 +04:00
Andrey Volk 2865603ad2 [Unit-tests] Fix xml error not finding freeswitch.xml on FST_MINCORE_BEGIN 2019-11-26 01:54:43 +04:00
Andrey Volk aa2df4f3f8 Merge pull request #90 from lazedo/k-header
[mod_sofia] add K- to prefixes that create a sip_h_ variable
2019-10-31 20:50:05 +04:00
lazedo b4373c6666 [mod_sofia] add K- to prefixes that create a sip_h_ variable
used by sip tracing tools and not to confuse with application (X-) or (P-)
2019-10-31 12:27:21 +00:00
lazedo f77484b96d [mod_sofia] add existing variables when locating user 2019-10-31 12:20:33 +00:00
Sebastian Kemper 167294ea26 [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>
2019-10-18 21:19:41 +02:00
Chris Rienzo 9d4f480335 [mod_sofia] Fix some incorrect word contractions. 2019-10-10 09:41:53 -04:00
Andrey Volk fc925a273b Merge pull request #1809 in FS/freeswitch from sofia-leak to master
* commit '20a893fd0683de64353ee2c111aa9c61a867886d':
  FS-12038: [mod_sofia, core] Fix potential leak and race in chat_hash, add switch_core_hash_insert_auto_free().
2019-09-06 11:28:31 -05:00
Andrey Volk 20a893fd06 FS-12038: [mod_sofia, core] Fix potential leak and race in chat_hash, add switch_core_hash_insert_auto_free(). 2019-09-06 20:22:20 +04:00
Andrey Volk 7ee53a6ec1 FS-12040: [mod_sofia] Fix potential leak if realloc fails. 2019-09-06 18:01:55 +04:00
Andrey Volk f93445a38c FS-12010: [sofia-sip] Fix improper cleanup on su_deinit(). 2019-08-20 03:11:28 +04:00
Andrey Volk 96aac32237 FS-12010: [mod_sofia, mod_valet_parking, mod_enum] Fix memory leaks on FreeSWITCH shutdown. 2019-08-19 23:14:24 +04:00
Mike Jerris 090e8284b6 FS-11961: [mod_sofia] Handle request vs response in sofia_media_tech_media 2019-07-25 14:26:36 -06:00
Andrey Volk 9c8de649b3 FS-11947: [Build-System] Do not install test binaries when doing make install. 2019-07-23 19:34:21 +04:00
Andrey Volk 91e99db6c8 FS-11944: [mod_sofia] Fix error: 'nh->nh_home' will always evaluate to 'true'. 2019-07-23 18:47:17 +04:00