Commit Graph
633 Commits
Author SHA1 Message Date
Piotr Gregor 374799f6b6 FS-11052: Allow alias for crypto suites
For outgoing calls send AES crypto in offer using corrected names
for keys of length 192 and 256, i.e. names containing _192_CM_
and _256_CM_ instead of _CM_192_ and CM_256_. For incoming calls
accept both naming conventions, decaying to same entry in SUITES.
2018-03-21 17:05:00 +00:00
Mike Jerris 615c8da7fe FS-10853: Fix unitialzed var 2018-03-15 17:06:25 -04:00
Piotr Gregor 92128756a2 FS-10853: Fix failed build for mod_dingaling
Fixes build but must be tested at runtime.
2017-12-20 21:33:34 +00:00
Piotr c47d3ad6b7 FS-10778: Evaluate rtp_secure_media_mki variable with switch_channel_var_true
Previously rtp_secure_media_mki channel variable was checked only
for existence, now it is checked if it's defined and evaluates
to true with switch_channel_var_true().
2017-12-05 16:02:58 +00:00
Piotr 903ea6e611 FS-10778: Fix compilation and refactor code
Prefer break over indent.

if (!p) {
    break;
}

// the code...

over

if (p) {
    // the
    // code
    // ...
}
2017-12-04 15:24:54 +00:00
Piotr Gregor 6520827b62 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.
2017-11-30 17:22:08 +00:00
Anthony Minessale efcc6c4e93 FS-10622: [core] Auto-fixing audio codec from G722 to PCMU although PCMU was not negotiated #resolve 2017-11-16 15:38:13 -06:00
Anthony Minessale 2362cb4e58 FS-10622: [core] Auto-fixing audio codec from G722 to PCMU although PCMU was not negotiated #resolve 2017-09-08 13:38:44 -05:00
Anthony Minessale e2a186cb37 FS-10613: [core] freeswitch using the the wrong PT value (using the transmit PT instead of the receive PT) #resolve 2017-09-01 13:55:33 -05:00
Brian West ccb32525d6 [core] FS-10587 502 response sent on codec mismatch 2017-08-24 15:04:02 -05:00
Anthony Minessale 4c29e4d630 FS-10562: [core] Crashes referencing cannot access memory #comment Firefox sending only candidates for RTCP and not RTP causing funky code path #resolve 2017-07-31 15:00:18 -05:00
Anthony Minessale f08a10e92d FS-10561: [freeswitch-core,mod_conference] Video concurrency improvements for 1.8 #resolve 2017-07-31 12:12:32 -05:00
Mike Jerris 571bff4def Merge pull request #1328 in FS/freeswitch from ~ETHANATKINS/freeswitch:ice-reinvite to master
* commit '999a6dd0b7f37e99c53cea3bc79d92c3ffab1822':
  FS-10485: Re-activate ICE on all attribute changes
2017-07-11 19:59:02 +00:00
Anthony Minessale 2ee8d58d72 FS-10472: [mod_conference] Invalid free in personal canvas mode 2017-07-10 19:48:14 -05:00
Ethan Atkins 999a6dd0b7 FS-10485: Re-activate ICE on all attribute changes
I ran into some ice failures when testing reinvites using
bypass_media_after_bridge. Every ice session has ice-ufrag and ice-pwd
attributes. When leg A sends those attributes to leg B, leg B is
supposed to send stun packets to leg A using the credentials provided in
those attributes. Freeswitch was not updating the session credentials
when the phone sent a new invite containing new ufrag and pwd
attributes. This caused ICE to fail on the client side (PJSIP in this
case).

The new_ice flag is set to true when freeswitch detects a change in
those attributes. For whatever reason, the reinvite flows that I was
testing did not set the CF_REINVITE flag on the channel, but new_ice was
true. It seems to me that freeswitch should always reactivate ice when
the ufrag and pwd credentials change.
2017-07-10 10:57:35 -07:00
Anthony Minessale db47792558 FS-10447: [freeswitch-core] Manual video refresh mode #resolve 2017-06-29 16:57:18 -05:00
Anthony Minessale 7c19615890 FS-10417: [freeswitch-core] Reduce flicker in screen sharing #resolve 2017-06-21 19:26:18 -05:00
Trevor Alpeter 09174819a9 FS-10370: Enable SRTP Key Padding
Some clients rely on Base64 padding characters (i.e., '=') to be present
in encoded SRTP key/salt strings to determine the length of the encoded
data. However, FreeSWITCH removes these characters before including the
encoded strings in the SDP. This causes those clients that rely on the
padding to truncate the encoded data and be unable to properly set up an
encrypted SRTP session.

This change introduces a channel flag named 'rtp_pad_srtp_keys'. When
this flag is enabled, FreeSWITCH includes the Base64 padding characters
in the SDP. This allows clients that rely on the padding to retrieve the
full key and salt values and successfully negotiate an SRTP stream with
FreeSWITCH.

FS-103070 #resolve
2017-06-13 09:39:07 -04:00
Anthony Minessale 84ec92048a FS-10249: [mod_av] Audio gradually falls behind video in recordings 2017-05-26 17:41:07 -05:00
Anthony Minessale 21f250f115 FS-10249: [mod_av] Audio gradually falls behind video in recordings 2017-05-25 12:01:23 -05:00
Anthony Minessale db2486919d FS-10307: [freeswitch-core] Repetitive verto re-attach with video only channels can cause a buffer overflow #resolve 2017-05-11 13:22:45 -05:00
Anthony Minessale a0d0dc2d3e FS-10286: [mod_conference] Sync member joins up with keyframes in shared encoder mode #resolve 2017-05-03 14:30:07 -05:00
Anthony Minessale 62807092a9 FS-10258: [mod_sofia] FW must keep previously negotiated DTLS role during SIP re-INVITE -- this part backwards 2017-04-27 18:02:13 -05:00
Anthony Minessale 83322661a5 FS-10258: [mod_sofia] FW must keep previously negotiated DTLS role during SIP re-INVITE 2017-04-24 12:22:03 -05:00
Mike Jerris 1db53ced7e FS-10245: [core] sdp generator uses /n when it should be using /r/n in some cases 2017-04-20 15:52:36 -05:00
Anthony Minessale d157cbab12 FS-10241 push similar logic upstream 2017-04-19 16:30:41 -05:00
Brian West d2aaf899c5 FS-10235: [freeswitch-core] Remove unused media flag #resolve 2017-04-14 19:20:50 -05:00
Anthony Minessale aaa26c6d09 FS-10222: [freeswitch-core] add disable_audio_jb_during_passthru and disable_video_jb_during_passthru #resolve 2017-04-10 15:24:05 -05:00
Anthony Minessale 917b28331b FS-10195: [fs_cli] Freeswitch intermittently segfaults #resolve 2017-03-30 12:07:17 -05:00
Anthony Minessale 7accfd2a69 FS-10126 make fps on the fly 2017-03-30 11:20:41 -05:00
Josh Allmann 624d3dd0f5 FS-10126: Add 24fps mode. 2017-03-23 16:22:19 +00:00
Anthony Minessale f4ad4ed6c4 FS-10126: [freeswitch-core] General Video Improvements #resolve 2017-03-15 15:24:01 -05:00
Anthony Minessale 35865bd90c FS-10118: [freeswitch-core] Race conditions from lack of error checking in switch_core_session_read_lock #resolve 2017-03-09 13:22:25 -06:00
Mike Jerris d435740217 FS-10116: [RTP] Crash when rtp_autofix_timing=true on video calls #resolve 2017-03-09 11:14:11 -06:00
Anthony Minessale db1e95b3f3 FS-10098: [freeswitch-core] Issue with video media bug in patch mode #resolve 2017-03-06 14:35:26 -06:00
Anthony Minessale 129f6eb69b FS-10050: [core] chromakey add flag to detect keyframe 2017-03-01 11:38:57 -06:00
Anthony Minessale 5a6a556769 FS-10050 remove debug 2017-02-28 17:45:21 -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
Brian West 3823bcd08d FS-9991: [mod_av] Transcoding from H264 to VP8 does not work #resolve 2017-02-13 08:07:01 -06:00
Sergey Safarov df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Seven Du 08603c7e89 FS-9904 #resolve cleanup and refactor msrp 2017-02-07 20:41:46 +08: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 230e8ac692 FS-9990: [freeswitch-core] Exhaust fmtp sensitive codecs before moving on with negotiation in video #resolve 2017-01-30 15:36:33 -06:00
Anthony Minessale cf78b0c2ac FS-9962: [mod_spandsp] Avaya IP Office IB FAX call T38 v0 failed #resolve 2017-01-30 10:53:39 -06:00
Mike Jerris e3b5c9aeba Merge pull request #1154 in FS/freeswitch from ~DEDWARDS/freeswitch:feature/FS-9162-add-ability-to-include-the-external to master
* commit '15fd3f1353a8f08c2dba6a5d9a3560ec8717be12':
  FS-9162 Include external IP address in SDP if include_external_ip is set
2017-01-18 10:27:02 -06:00
Dan Edwards 15fd3f1353 FS-9162 Include external IP address in SDP if include_external_ip is set 2017-01-17 15:21:27 -05:00
Mike Jerris 5ef273b4b3 Merge pull request #1146 in FS/freeswitch from bugfix/FS-9206-proxy-media-with-enable-3pcc-proxy to master
* commit 'a597e216bc699567ddb77d1765cf095c3bb31183':
  FS-9206: [core] endable proxy media auto-adjust on re-invite for text and video every time as the streams may be being added on re-invite
2017-01-17 13:11:30 -06:00
Mike Jerris a597e216bc FS-9206: [core] endable proxy media auto-adjust on re-invite for text and video every time as the streams may be being added on re-invite 2017-01-17 13:10:06 -06:00
Anthony Minessale 52af4a3278 FS-9654 regression 2017-01-16 15:15:05 -06:00