Commit Graph

828 Commits

Author SHA1 Message Date
Andrey Volk ccc4ae282a FS-11880: [Core,mod_pgsql] Remove native PostgreSQL support from the core, add mod_pgsql database module. 2019-07-18 00:20:50 +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
Anthony Minessale eb31e17e6c FS-11910: [mod_dptools] add native eavesdrop mode. use app native_eavesdrop args <uuid> [read|write] ... default is read with no flag. Must be same codecs 2019-07-17 23:38:23 +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
Sergey Khripchenko be7c5331f6 FS-11436 RTP timestamp field incorrectly calculated based on fps 2019-07-16 20:26:24 +04:00
Andrey Volk 7fc9eafa74 FS-11727: [core] Add SWITCH_DATABASE_FLAG_ROW_SIZE_LIMIT for databases unable to create wide tables. 2019-07-15 22:18:30 +04:00
Andrey Volk 07e0d4f90c FS-10801: [core] Add a database interface to the FreeSWITCH Core. 2019-07-15 22:18:19 +04:00
Dragos Oancea 279b7994ef FS-11743: video RTCP counter (fix conflicts) 2019-06-06 17:38:04 +00:00
Piotr Gregor 9682d2c2c9 FS-11730 Add support for DTLSv1.2 and make default
Needed in Chrome version >= 74 as Chrome dropped support for v1.0:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/discuss-webrtc/yr6gbAgWsKo/9X5vQb8kGAAJ

Using old v1.0 DTLS if 1.2 is not available or legacy DTLS
wanted explicitly. To request old DTLS set variable

	<action application="set" data="legacyDTLS=1"/>

Note: requires openssl 1.0.2 or later for DTLS v1.2 support
2019-06-06 12:05:11 -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 ba4b2dc5b7 Merge pull request #1515 in FS/freeswitch from ~LAZEDO/freeswitch:feature/FS-11135 to master
* commit '7fd7ea9a5d70a4795f780c0d89057370e7a92856':
  FS-11135 [mod_loopback] runtime behaviour controlled by configuration
2019-03-26 15:36:05 -05:00
Chris Rienzo 1a5ce0ebeb FS-11706 [core] add some extra information to troubleshoot 'too many stacked extensions' 2019-03-19 12:12:26 -04:00
lazedo 7fd7ea9a5d FS-11135 [mod_loopback] runtime behaviour controlled by configuration 2019-03-06 03:59:17 +00:00
Mike Jerris ab257d5557 Merge pull request #1656 in FS/freeswitch from ~LAZEDO/freeswitch:bug/FS-11608 to master
* commit '8ed52f4c266446e29fa040c49f55b79081054fcb':
  [FS-11609] [core] lookup values in caller profile soft variables
  [FS-11608] [core] set prefix for caller profile soft variables
2019-02-26 11:46:31 -06:00
lazedo 8ed52f4c26 [FS-11609] [core] lookup values in caller profile soft variables 2019-02-18 14:03:24 +00:00
Chris Ayoup a1cb008087 FS-11646: Improved support for ICE-lite
Specifically:
* Send the a=ice-lite SDP attribute as a session-level attribute
* Suppress sending STUN connectivity checks when enabled
* Make sure FS is the controlled entity if it is declaring ICE-lite
2019-02-05 13:17:35 -05:00
lazedo 8f659a81cf [FS-11608] [core] set prefix for caller profile soft variables 2019-01-30 23:54:16 +00:00
Mike Jerris 99df402921 Merge pull request #1492 in FS/freeswitch from ~HUNYI/freeswitch:bugfix/FS-8579-broadcast-hold-bleg to master
* commit '554387c8dc53b0e3a8b9d530a799d681cef5e6e6':
  Skip holding b leg only if it is on hold
2018-09-05 22:35:31 +00:00
Anthony Minessale 65524ea2c1 FS-11379: [freeswitch-core] Rare race condition in state machine #resolve 2018-09-05 18:20:58 -04:00
Anthony Minessale b4a64d4817 FS-11380: [core] add new internal function 2018-09-05 18:20:54 -04:00
Anthony Minessale d3e320ef56 FS-11346: [core] add api to pass pre-parsed values instead of dial strings to switch_ivr_originate
SWITCH_DECLARE(switch_status_t) switch_dial_handle_create(switch_dial_handle_t **handle);
SWITCH_DECLARE(void) switch_dial_handle_destroy(switch_dial_handle_t **handle);
SWITCH_DECLARE(void) switch_dial_handle_add_leg_list(switch_dial_handle_t *handle, switch_dial_leg_list_t **leg_listP);
SWITCH_DECLARE(void) switch_dial_leg_list_add_leg(switch_dial_leg_list_t *parent, const char *dial_string, switch_dial_leg_t **legP);
SWITCH_DECLARE(void) switch_dial_handle_add_global_var(switch_dial_handle_t *handle, const char *var, const char *val);
SWITCH_DECLARE(void) switch_dial_handle_add_global_var_printf(switch_dial_handle_t *handle, const char *var, const char *fmt, ...);
SWITCH_DECLARE(switch_status_t) switch_dial_handle_add_leg_var(switch_dial_leg_t *leg, const char *var, const char *val);
SWITCH_DECLARE(switch_status_t) switch_dial_handle_add_leg_var_printf(switch_dial_leg_t *leg, const char *var, const char *fmt, ...);
SWITCH_DECLARE(int) switch_dial_handle_get_peers(switch_dial_handle_t *handle, int idx, char **array, int max);
SWITCH_DECLARE(int) switch_dial_handle_get_vars(switch_dial_handle_t *handle, int idx, switch_event_t **array, int max);
SWITCH_DECLARE(switch_event_t *) switch_dial_handle_get_global_vars(switch_dial_handle_t *handle);
SWITCH_DECLARE(switch_event_t *) switch_dial_leg_get_vars(switch_dial_leg_t *leg);
SWITCH_DECLARE(int) switch_dial_handle_get_total(switch_dial_handle_t *handle);
SWITCH_DECLARE(void) switch_ivr_orig_and_bridge(switch_core_session_t *session, const char *data, switch_dial_handle_t *dh);

add switch_dial_handle_t *dh to end of args for switch_ivr_originate
2018-08-22 18:20:13 +00:00
Mike Jerris a1c0e7eb92 Merge pull request #1564 in FS/freeswitch from fs-11310-switch-core-file-pre-close to master
* commit '720128b61ed0fba0c45ba7caa0d3d7a4bde2ffb4':
  FS-11310 #resolve add more params for conference record stop event
  FS-11310 #resolve add optional switch_core_file_pre_close() to stop writing to file and possible to get file size related params
2018-08-09 06:53:04 +00:00
Liyang ce6366474f FS-11310 #resolve add optional switch_core_file_pre_close() to stop writing to file and possible to get file size related params 2018-08-03 21:54:47 +08:00
Seven Du 99d2e5e243 FS-11014 [core] add vad to core 2018-07-24 07:21:47 +00:00
Piotr Gregor 1fdd58f533 FS-10778: Add support for MKI to SRTP
MKI support for SRTP has been tested on calls to/from
Telnyx's Skype for Business from/to local extension registered to FS
and between Skype for Business clients connected to FreeSWITCH.

SfB -> FreeSWITCH -> User 1004
   SRTP           RTP
   with
   MKI

SfB <- FreeSWITCH <- User 1004
   SRTP           RTP

SfB <-> FreeSWITCH <-> SfB
 SRTP/MKI      SRTP/MKI

Channel variable "rtp_secure_media_mki" was added to drive offering
of MKI on outbound SRTP from FS.

How to use rtp_secure_media_mki

Set rtp_secure_media_mki=true to offer MKI for outgoing SRTP (if SRTP is used) in inbound call.
Export rtp_secure_media=true to offer MKI for outgoing SRTP (if SRTP is used) on outbound call.
... or set it in the codec string for bridged calls

<action application="set" data="rtp_secure_media_mki=true"/>

<action application="export" data="rtp_secure_media_mki=true"/>

<action application="bridge" data="[absolute_codec_string=^^:PCMU:PCMA:G729,rtp_secure_media=true,rtp_secure_media_mki=true]sofia/external/+12404373253@169.55.36.24:5060;transport=tls"/>

EXAMPLES

1. Set example

 57     <extension name="telnyx_test_1_2">
 58         <condition field="destination_number" expression="^(0012404373253)$">
 59             <action application="set" data="rtp_secure_media=true"/>
 60             <action application="set" data="rtp_secure_media_mki=true"/>
 61             <action application="answer"/>
 62             <action application="bridge" data="user/1004@${domain_name}"/>
 63       </condition>
 64   </extension>

Description: SRTP will be used on outbound leg in incoming call due to rtp_secure_media=true
set and MKI will be offered in SDP. SRTP will not be used on a bridged call to extension 1004.

2. Export example

 75   <extension name="to_skype_for_business">
 76       <condition field="destination_number" expression="^(840531022)$">
 77           <action application="set" data="rtp_secure_media=optional"/>
 78           <action application="export" data="rtp_secure_media_mki=true"/>
 79           <action application="bridge" data="[absolute_codec_string=^^:PCMU:PCMA:G729,rtp_secure_media=true]sofia/external/+12404373728@169.55.36.24:5060;transport=tls"/>
 80       </condition>
 81   </extension>

Description: SRTP on inbound call has been set to optional therefore MKI will be used
on outbound SRTP in this call if SRTP is used at all. SRTP will be used on a bridged call
due to rtp_secure_media=true set in codec string and MKI will be used in offering SDP.

3. Bridging between Skype for Business clients: set

 97     <extension name="S4B_fs_S4B">
 98         <condition field="destination_number" expression="^(0012404373254)$">
 99             <action application="set" data="rtp_secure_media=true"/>
100             <action application="set" data="rtp_secure_media_mki=true"/>
101             <action application="bridge" data="[absolute_codec_string=^^:PCMU:PCMA:G729,rtp_secure_media=true]sofia/external/+12404373253@169.55.36.$
102       </condition>
103   </extension>

Result:
2017-11-27 19:00:26.977704 [NOTICE] switch_ivr_originate.c:527 Ring Ready sofia/external/+12404373728@telnyxlab.com!
2017-11-27 19:00:32.657687 [NOTICE] switch_core_media.c:1534 Skipping MKI due to empty index
2017-11-27 19:00:32.657687 [INFO] switch_rtp.c:4079 Activating audio Secure RTP SEND
2017-11-27 19:00:32.657687 [INFO] switch_rtp.c:4057 Activating audio Secure RTP RECV
2017-11-27 19:00:32.657687 [NOTICE] sofia.c:8419 Channel [sofia/external/%2B12404373253@169.55.36.24:5060] has been answered
2017-11-27 19:00:35.317702 [INFO] switch_rtp.c:4079 Activating audio Secure RTP SEND (with MKI)
2017-11-27 19:00:35.317702 [INFO] switch_rtp.c:4057 Activating audio Secure RTP RECV (with MKI)
2017-11-27 19:00:35.317702 [NOTICE] sofia_media.c:92 Pre-Answer sofia/external/+12404373728@telnyxlab.com!

Description: SRTP with MKI is used on outbound leg of inbound call (due to use on inbound leg of this call and "set").
Standard SRTP is used in both legs of outbound call, because rtp_secure_media_mki wasn't exported
or set in codec string for the outbound call.

4. Bridging between Skype for Business clients: Set and export

 97     <extension name="S4B_fs_S4B">
 98         <condition field="destination_number" expression="^(0012404373254)$">
 99             <action application="set" data="rtp_secure_media=true"/>
100             <action application="set" data="rtp_secure_media_mki=true"/>
101             <action application="export" data="rtp_secure_media_mki=true"/>
102             <action application="bridge" data="[absolute_codec_string=^^:PCMU:PCMA:G729,rtp_secure_media=true]sofia/external/+12404373253@169.55.36.24:5060;transport=tls"/>
103       </condition>
104   </extension>

Result:
2017-11-27 18:51:29.017689 [NOTICE] switch_ivr_originate.c:527 Ring Ready sofia/external/+12404373728@telnyxlab.com!
2017-11-27 18:51:35.097729 [INFO] switch_rtp.c:4079 Activating audio Secure RTP SEND (with MKI)
2017-11-27 18:51:35.097729 [INFO] switch_rtp.c:4057 Activating audio Secure RTP RECV (with MKI)
2017-11-27 18:51:35.097729 [NOTICE] sofia.c:8419 Channel [sofia/external/%2B12404373253@169.55.36.24:5060] has been answered
2017-11-27 18:51:37.797706 [INFO] switch_rtp.c:4079 Activating audio Secure RTP SEND (with MKI)
2017-11-27 18:51:37.797706 [INFO] switch_rtp.c:4057 Activating audio Secure RTP RECV (with MKI)

Description: Connecting Skype For Business client to Skype for Business client.
Send SRTP with MKI in both outbound streams:
	- for inbound call: MKI was offered in incoming call and enabled for outbound leg with "set"
	- for outbound call: MKI was enabled with "export"

5. Other examples

Setup to use SRTP with MKI only on the inbound SRTP on incoming call from Telnyx SfB
Tested dialing 0012404373253 from SfB to FS, leg SfB <-> FS uses SRTP with MKI
on inbound SRTP only

57     <extension name="telnyx_test_1_2">
58         <condition field="destination_number" expression="^(0012404373253)$">
59              <action application="set" data="rtp_secure_media=true"/>
61              <action application="answer"/>
62              <action application="bridge" data="user/1004@${domain_name}"/>
63       </condition>
64   </extension>

Result:
2017-11-23 20:44:35.406026 [INFO] mod_dialplan_xml.c:637 Processing Test02 <+12404373728>->0012404373253 in context public
2017-11-23 20:44:38.566022 [INFO] switch_rtp.c:4107 Activating audio Secure RTP SEND
2017-11-23 20:44:38.566022 [INFO] switch_rtp.c:4085 Activating audio Secure RTP RECV (with MKI)

Setup to send and receive SRTP with MKI on incoming call from Telnyx SfB
Tested dialing 0012404373253 from SfB to FS, leg SfB <-> FS uses SRTP with MKI
in both directions

57     <extension name="telnyx_test_1_2">
58         <condition field="destination_number" expression="^(0012404373253)$">
59     		<action application="set" data="rtp_secure_media=true"/>
60     		<action application="set" data="rtp_secure_media_mki"/>
61     		<action application="answer"/>
62     		<action application="bridge" data="user/1004@${domain_name}"/>
63       </condition>
64   </extension>

Result:
2017-11-23 20:42:06.026034 [INFO] mod_dialplan_xml.c:637 Processing Test02 <+12404373728>->0012404373253 in context public
2017-11-23 20:42:09.526034 [INFO] switch_rtp.c:4107 Activating audio Secure RTP SEND (with MKI)
2017-11-23 20:42:09.526034 [INFO] switch_rtp.c:4085 Activating audio Secure RTP RECV (with MKI)

Setup to offer MKI on outbound call to extension 1001 (X-Lite -> FS -> linphone)
Tested dialing 0012404373253 from user 1004, leg FS <-> 1001 uses SRTP with MKI

782     <extension name="telnyx_test_1_2">
783         <condition field="destination_number" expression="^(0012404373253)$">
784             <action application="export" data="rtp_secure_media_outbound=true"/>
785             <action application="export" data="rtp_secure_media_mki"/>
786             <action application="answer"/>
797             <action application="bridge" data="user/1001@${domain_name}"/>
798       </condition>
799   </extension>

Result:
2017-11-23 20:23:26.266034 [INFO] mod_dialplan_xml.c:637 Processing 1000 windows <1000>->0012404373253 in context default
2017-11-23 20:23:26.366035 [INFO] switch_rtp.c:4107 Activating audio Secure RTP SEND (with MKI)
2017-11-23 20:23:26.366035 [INFO] switch_rtp.c:4085 Activating audio Secure RTP RECV

SfB sometimes offers crypto with LIFETIME but no MKI index, e.g.:
a=crypto:5 AES_CM_128_HMAC_SHA1_80 inline:9OtFWi17H9E8ywlm0iazemjAqXu2RhJ3DZyo+VLJ|2^31

Defaulting to no-mki SRTP in case key material doesn't contain MKI index.
2018-07-24 07:21:34 +00:00
Hunyadvári Péter 554387c8dc Skip holding b leg only if it is on hold
FS-8579 --resolve
2018-03-20 09:32:47 +01:00
Marc Olivier Chouinard 348c2c42bb FS-10608: Change 60 second timeout value to a global #define SWITCH_DEFAULT_TIMEOUT 2017-08-29 13:54:34 -04:00
Ken Rice 53116495d1 Revert "FS-10416: [mod_commands] add new outbound channels to an in-progress originate"
This commit causes a segfault when parsing destinations that are |
delimited. This patchset needs to be tested further before inclusion
into the tree.

This reverts commit b11955db0b.
2017-07-11 17:25:48 -05:00
Mike Jerris 2a788cdefd Merge pull request #1307 in FS/freeswitch from ~HRISTO/freeswitch:feature/FS-10416-add-new-endpoints-to-be-called-while to master
* commit 'b11955db0bfdcccd5ad98fd689870153d31154f3':
  FS-10416: [mod_commands] add new outbound channels to an in-progress originate
2017-07-06 20:41:20 +00:00
Anthony Minessale db47792558 FS-10447: [freeswitch-core] Manual video refresh mode #resolve 2017-06-29 16:57:18 -05:00
Hristo Trendev b11955db0b FS-10416: [mod_commands] add new outbound channels to an in-progress originate
This allows new endpoints (outbound channels) to be called, after an originate
is already in progress, where any of the originally called endpoints need to
continue to ring.

One use case would be to convert a 302 Moved Temporarily destination to SIP
endpoint(s) and then to add the new endpoints to an in-progress originate,
without cancelling any of the other (already ringing) outbound channels.
2017-06-21 19:31:46 +02:00
Anthony Minessale c15a7d1f89 FS-10269: [mod_conference] conference recording pause doesn't work correctly for video #resolve 2017-05-30 16:34:48 -05:00
Anthony Minessale e76ccc3955 FS-10249: [mod_av] Audio gradually falls behind video in recordings 2017-05-19 17:38:08 -05:00
Anthony Minessale f4ad4ed6c4 FS-10126: [freeswitch-core] General Video Improvements #resolve 2017-03-15 15:24:01 -05:00
Anthony Minessale b733e8d974 FS-10050: [core] chromakey 2017-03-02 18:04:36 -06:00
Anthony Minessale 129f6eb69b FS-10050: [core] chromakey add flag to detect keyframe 2017-03-01 11:38:57 -06:00
Anthony Minessale 50072f2ce2 FS-10075: [freeswitch-core] WebRTC mods #resolve 2017-02-28 16:16:37 -06:00
Anthony Minessale 40bfe0fff5 FS-9154: [freeswitch-core] Add & remove video on re-invites #resolve 2017-02-15 13:56:35 -06:00
Armen Babikyan 6ed86abf9f FS-9300: Add support for disabling sofia's 100 Trying via configuration, and sending 100 Trying from dialplan 2017-02-13 14:49:05 -08:00
Sergey Safarov df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Anthony Minessale 9dba32410f FS-10015: [freeswitch-core] Add variable to allow firing of text events #resolve 2017-02-06 16:37:59 -06:00
Anthony Minessale 96a8267305 FS-9958: [freeswitch-core,mod_local_stream] Add agc object and use it in mod_local_stream #resolve 2017-01-18 13:19:47 -06:00
Brian West f54c7f9f34 FS-9855: [mod_spandsp] Refused T38 reinvite on b-leg breaks T38 negotiation on a-leg when using T38 gateway mode #resolve 2017-01-05 15:51:52 -06:00
Anthony Minessale c701ce6173 FS-9708 #resolve [RTP timing when doing repacketization] 2016-11-10 17:34:48 -06:00
Anthony Minessale 9b8a5edd3d FS-9638 2016-11-10 12:09:00 -06:00
Anthony Minessale 7a009bba1e FS-9697 add-on 2016-11-09 17:24:47 -06:00
Anthony Minessale 917d9b44c4 FS-9719 still not quite right, and enable support to auto engage this feature for pass-thru video 2016-11-09 15:24:34 -06:00
Anthony Minessale 34238d2bd0 FS-9665 #resolve [Add video_pre_call_banner feature] 2016-10-24 13:36:15 -05:00
Anthony Minessale 11066d5cf4 FS-9654 #resolve [Issue with RTP payload negotiation] 2016-10-20 15:53:39 -05:00
Mike Jerris 0d56945f71 FS-9581: [windows] CF_TEXT is a reserved constant on windows 2016-10-05 11:06:44 -04:00