6047 Commits

Author SHA1 Message Date
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
ea6a34aa7d [mod_portaudio] CF_AUDIO flag is not set 2019-12-17 00:21:52 +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
Andrey Volk
311a20af63 [mod_verto] Ignore not just zero but negative frame size as well. 2019-10-23 23:03:18 +04: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
Sergey Khripchenko
655c8a1a7b FS-11362 Attempt to rearrange verto socket shutdown sequence 2019-07-26 00:31:11 +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
Mariah Yang
d654faa5a9 FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_sofia 2019-07-18 22:22:56 +04:00
Liyang
6f9ee4216c FS-11903: [mod_sofia] fix warnV547 Expression 'sip->sip_via' is always true. 2019-07-18 21:27:10 +04:00
Brian West
b23d887586 FS-11654: [core] add media_timeout, media_hold_timeout and video vs audio variants 2019-07-18 00:54:37 +04:00
Mike Jerris
7906a2054a FS-11919: [core] add api compatibility for switch_rtp_new 2019-07-17 16:43:34 -04:00
Luis Azedo
302b409815 FS-11848 [core] add user_data to event_channel_bind
* also adds a convenience switch_event_channel_deliver for already in thread
2019-07-17 16:02:12 -04:00
Seven Du
23e050618d FS-11721 fix data length of stripped html 2019-07-17 23:26:05 +04:00
Chris Rienzo
613a3340da FS-11805 [mod_sofia] set default session timeout for outbound calls before overriding it with NAT detection. 2019-07-17 23:11:03 +04:00
Mike Jerris
e7dda1b027 Revert "FS-9490: [mod_sofia] add filter to SIP messages that match a regexp."
This reverts commit 53dbe5d84a9c3624804a2b9259433f4d525425f8.

This previous patch made logger function not reentrant so reverting until we can get a fix without that issue
2019-07-17 22:57:55 +04:00
Chris Rienzo
681b7e28ab FS-11785 [mod_sofia] fix scan-build issues 2019-07-17 21:49:50 +04:00
Chris Rienzo
0bd5b557e5 FS-11785 [mod_rtc] fix dead assignment 2019-07-17 21:49:41 +04:00
Chris Rienzo
e09e84b088 FS-11784 [mod_sofia] quiet the codec negotiation error log. It's something that is not necessarily a FS issue. 2019-07-17 20:14:33 +04:00
Sergey Khripchenko
84aab26e65 FS-11745 Add "auto-jitterbuffer-msec" param to verto.conf.xml file 2019-07-17 20:12:04 +04:00
Anthony Minessale
b8a8765991 FS-11713: [core] fix video upgrade from b to a 2019-07-17 20:07:30 +04:00
Mike Jerris
a9e634b664 FS-11557: [mod_sofia] add support for RFC 7989 Session-ID header
(enable with sofia profile param rfc-7989=true)

FS-11557 [mod_sofia, mod_conference, core] Add support for re-INVITE when setting Session-ID in conference after call has been answered.

FS-11557 [mod_conference] Missed a spot where APP_SESSION_ID needed to be set.

FS-11557: set session id for outbound (initial requests)

FS-11557: [mod_sofia] rename vars and functions "session id" -> "session uuid" to reflect the real meaning for rfc7989.

FS-11557: fix bug - colliding chan var names (session_id)

FS-11557: check nil session uuid

FS-11557 : replace CS_NEW with CS_INIT for when originating calls, generate new uuid.

FS-11557: handle inbound (UAS mode, one leg)

FS-11557: generic param handling and filter via new sip profile option "rfc-7989-filter", eg:
<param name="rfc-7989-filter" value="logme, sec-agree, privacy" />

FS-11557: renamed chan vars (reflect meaning only for RFC7989)

FS-11557: fallback to RFC7329 - "old" Session-ID

FS-11557: distinguish between request and replies when we read the header
(to provide compatibility with old RFC7329 - section 11 of RFC7989)
FS-11557: change more vars/consts names

FS-11557: move compat flag on the channel.

FS-11557: add Session-ID header in REFER

FS-11557: needs extra condition on received initial request

FS-11557: handle NOTIFY

FS-11557: support answer() in dialplan - it was sending back a 200 OK with Session-ID invalid, eg: A=NIL;B=X

FS-11557: add Session-ID for NOTIFY (more cases)

FS-11557: handle reply to SIP INFO (add Session-ID header)

FS-11557: handle case of BYE after REFER, when the channel is destroyed already (save the uuid on sofia_private)

FS-11557: handle more SIP reply cases (eg: 202 Accepted , more negative replies)

FS-11557: handle ACK (UAS role)

FS-11557: added "rfc-7989-force-old" profile param - to enforce old rfc7329 for the UAC role. default off.
enabled with "<param name="rfc-7989-force-old" value="true" />".

FS-11557: fallback to rfc7329 fixes.

FS-11557: set flag CF_RFC7329_COMPAT on partner channel where needed

FS-11557: fix crash (mod_conference)
2019-07-17 19:13:41 +04:00
Brian West
0c13b704fc FS-10913: [mod_sofia] do not mark pre_answer unless status is less than 200 2019-07-17 01:49:13 +04:00
Mike Jerris
99b3162ffc FS-11680: [mod_sofia] dont treat registers from websockets received over a proxy over non websockets as nat. We should be sending to the route set and not locking on to send all requests to the websocket directly in this case 2019-07-16 23:26:20 +04:00
Mike Jerris
8a809624cb FS-11498 build sofia into convenience lib to build mod_sofia and test code 2019-07-16 22:52:53 +04:00
Seven Du
cc66bcabfd FS-11498 fix url cut off 2019-07-16 22:26:32 +04:00
Andrey Volk
4ae1f1278b FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_verto 2019-07-15 23:39:25 +04:00
Andrey Volk
c474824aa9 FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_rtc 2019-07-15 23:39:24 +04:00
Andrey Volk
a7477ed0e2 FS-11911: Fix build on Debian Buster 2019-07-15 22:23:25 +04:00
David Grant
3695681cf6 FS-11859 [mod_verto] mod_verto.c log for MCAST Data Sent changed to if (verto_globals.debug > 0) and other LOG_ALERT changed to LOG_DEBUG triggered by verto_globals.debug 2019-07-09 23:31:55 -05:00
Mike Jerris
8e129b913d FS-11906: [mod_sofia] fix NDLB-allow-bad-iananame profile param 2019-06-27 15:30:43 -04:00
Andrey Volk
0d895c50f5 FS-11421: [mod_sofia] Cleanup. 2019-06-21 20:58:12 +04:00
Chris Rienzo
e47879604c FS-11824 [mod_sofia] map SIP 607 to SWITCH_CAUSE_CALL_REJECTED 2019-06-06 11:52:07 -04:00
Chris Rienzo
0a6d87edfe FS-11824 [sofia-sip,mod_sofia,core] Added cause codes that map to SIP 600,603,604,606,607 2019-06-06 11:51:51 -04:00
Mike Jerris
a255bd3d62 FS-11668: [verto] Fix polling of secure verto sockets 2019-06-06 11:17:22 -04:00
Sergey Khripchenko
8dd5373db4 FS-11467: [mod_verto] Properly handle poll() EINTR and separate poll()==0 / timeout case 2019-06-06 11:17:00 -04:00
Sergey Khripchenko
1000d1d8c8 FS-11467: [mod_verto] decreased logging level for log lines that are not errors/warnings 2019-06-06 11:16:52 -04:00
Piotr Gregor
118dd796f3 FS-11421: [core,mod_sofia] Fix rtp_pass_codecs_on_stream_change to process all sdp settings in the re-invite -- add new filter_codecs app and fix some races and negotiation bugs #resolve 2019-06-06 11:08:52 -04:00
Mike Jerris
d61126ca82 FS-11814: [mod_sofia] fix regression in fs_path handling on BYE 2019-06-04 15:46:36 -04:00