32825 Commits

Author SHA1 Message Date
Anthony Minessale
e0d79bd0cf FS-10823: [mod_sofia] curly brackets on SDP header causes FS to crash #resolve 2017-12-04 14:00:28 -06: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
Mike Jerris
43fc695b73 FS-10778: fix MKI compile error 2017-12-01 15:10:50 -06:00
Mike Jerris
70d60698a3 Merge pull request #1 in FSA/freeswitch-advantage from ~PIOTRGREGOR/freeswitch:feature/FS-10778-srtp-mki-support to v1.8-fsa
* commit '6520827b620951b8e016cbaaa4d321261e3ea3e2':
  FS-10778: Add support for MKI to SRTP
2017-11-30 20:20:33 +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
51114b90df FS-8761: [freeswitch-core] Memory leak in FreeSWITCH 2017-11-20 15:43:07 -06:00
Anthony Minessale
7255f0f87e FS-10762: [freeswitch-core] Websocket logic error #resolve 2017-11-20 11:39:45 -05:00
Anthony Minessale
31c899a7de FS-10762: [freeswitch-core] Websocket logic error 2017-11-20 11:39:37 -05:00
Anthony Minessale
328ce675d5 FS-10784: [freeswitch-core] Make Users lists compatible with all forms of xml #resolve 2017-11-20 11:39:23 -05:00
Mike Jerris
f7e2505fc7 cleanup unused 2017-11-20 11:30:50 -05: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
Brian West
212eb9b921 Merge pull request #1434 in FS/freeswitch from ~PRAVEEN_KUMAR/freeswitch:bugfix/FS-10728-mod_avmd-backward-compatibility_issue to master
* commit '179a659b7f3026c12c63bc4879a24c5f58584349':
  FS-10728: [mod_avmd] backward compatibility issue in avmd_main_api
2017-11-15 20:50:39 +00:00
Anthony Minessale
4fabca25ef FS-10792: [mod_sofia] when behind 1-to-1 NAT, console logs invalid handle #resolve 2017-11-15 13:04:15 -06:00
Anthony Minessale
420c3ee10c Revert "FS-10770: [freeswitch-core] Make nack buffer bigger by default #resolve"
This reverts commit 5658e581fec6e671b0a76a22dc5e31219ae804bd.
2017-11-10 17:04:27 -06:00
Italo Rossi
9d96741f56 FS-10774 - [switch_pgsql] Fix build for PostgreSQL/libpq 10 2017-11-06 10:35:36 -03:00
Italo Rossi
32954c1b91 FS-10772 - [mod_callcenter] commit 404c69698ed7a4ff215cf2d430b6a1721c693eb1 added an invalid WHERE syntax, fixed. 2017-11-03 14:47:19 -03:00
Italo Rossi
298a468edf FS-10771 - [mod_callcenter] s/member_channel/member_session when session logging 2017-11-03 13:38:04 -03:00
Anthony Minessale
5658e581fe FS-10770: [freeswitch-core] Make nack buffer bigger by default #resolve 2017-11-02 14:06:13 -05:00
Anthony Minessale
873a7bbdff FS-10769: [mod_av,mod_conference] Lipsync issues in conference recording #resolve 2017-11-02 14:03:21 -05:00
Anthony Minessale
7728273b39 FS-10768: [mod_conference] Fix div by 0 err in conference config parsing #resolve 2017-11-02 14:01:47 -05:00
Praveen Kumar
179a659b7f FS-10728: [mod_avmd] backward compatibility issue in avmd_main_api
avmd_start_app flow will break if 'inbound_channel'/'outbound_channel'
    both has been set and the avmd_start_app invoked for inbound call leg.

    With this change, it'll be able to work even if we set
    'inbound_channel'/'outbound_channel' both.
2017-11-02 12:52:23 +05:30
Anthony Minessale
03576e82b8 FS-10757: [mod_conference] Race condition freeing avatar image #resolve 2017-10-25 14:20:45 -05:00
Brian West
3300661137 FS-10751: [mod_av] Add parsing for TRACE log level in AV 2017-10-25 13:11:19 -05:00
Anthony Minessale
d60a1e95f7 FS-10667: [core] Segfault in crypto / srtp 2017-10-25 12:27:51 -05:00
Anthony Minessale
bf98422ce6 FS-10754: [mod_conference] Conference Improvements #resolve 2017-10-25 12:27:20 -05:00
Anthony Minessale
9108c64c9e FS-10752: [mod_av] Remove support for AVENC which is not working on deb9 #resolve 2017-10-23 14:14:54 -05:00
Anthony Minessale
168cb620b9 FS-10751: [mod_av] Add parsing for TRACE log level in AV #resolve 2017-10-23 13:57:12 -05:00
Mike Jerris
f6ce8afff8 Merge pull request #1394 in FS/freeswitch from ~F93/freeswitch:bugfix/FS-10672-truncated-variable-values-passed to master
* commit 'c6e2ce18a65cef72fde52ba3b1c9e995ba78a717':
  FS-10672 [core] Fix event url-encoding buffer size
2017-10-23 15:48:03 +00:00
Shane Bryldt
f9e36014ae FS-10739: [libblade] Fixed disconnecting downstream sessions when upstream session is disconnected, without disconnecting loopback which always remains available 2017-10-23 08:17:27 -06:00
Shane Bryldt
8d4af5f7b6 FS-10739: [libblade] Small fix to testcon, forgot to uncomment the test.join response sending after testing TTL on responses 2017-10-19 08:49:26 -06:00
Shane Bryldt
749db0461d FS-10739: [libblade] Added TTL to request which now produces an error response when a response is not received locally within the timeout, this utilizes loopback session stuff which had a couple bugs that are now also fixed, further loopback testing is still required on event subscriptions, protocol publishing, protocol locating, and protocol execution 2017-10-19 08:44:31 -06:00
Shane Bryldt
b3e84ac146 FS-10739: [libblade] Loopback session support and reworking sessions to use independent ids, blade.connect now also responds with both the sessionid and the nodeid separately 2017-10-19 02:32:55 -06:00
Italo Rossi
15455f7060 FS-10738 [mod_callcenter] - setting bridged = 0 if member give up too early 2017-10-17 20:32:35 -03:00
Mike Jerris
5e97a6ecbb Merge pull request #1422 in FS/freeswitch from ~ANDYWOLK/freeswitch:bugfix/FS-10725-mod_v8-and-lib-v8-wont-build-on to master
* commit '9c4fc2af122d9c19b8c79e2ef10f6e16ecd25abc':
  FS-10725: [Build-System] Add DownloadPackageTask in order to use in props instead of using legacy util.vbs within projects. Get rid of lib v8 download project in favor of props on windows.
2017-10-17 20:20:35 +00:00
Andrey Volk
9c4fc2af12 FS-10725: [Build-System] Add DownloadPackageTask in order to use in props instead of using legacy util.vbs within projects. Get rid of lib v8 download project in favor of props on windows. 2017-10-17 23:13:27 +03:00
Italo Rossi
94e943963f FS-10738 [mod_callcenter] - Do not set state to Idle if On Demand agents do not answer call 2017-10-17 16:26:57 -03:00
Shane Bryldt
a6417d06c2 FS-10690: [libblade] Fixed linux build 2017-10-12 12:49:51 -05:00
Shane Bryldt
20ea5c3c52 FS-10690: [libblade] Added web request and web response layer ontop of civetweb to handle simplified processing for both inbound REST services as well as outbound client requests. Added simple layer ontop of that for one-liner oauth2 token establishment. 2017-10-12 11:47:07 -06:00
Shane Bryldt
5940b04d4e Merge pull request #1419 in FS/freeswitch from ~ANDYWOLK/freeswitch:feature/FS-10690-integrate-robust-and-convenient to master
* commit '8b0fb1522837692f4665f121d1cc77ffaf286fe0':
  FS-10690: [libks, Build-System] Fix libks solution build on windows. Add libks related stuff to .gitignore
2017-10-10 23:19:40 +00:00
Andrey Volk
8b0fb15228 FS-10690: [libks, Build-System] Fix libks solution build on windows. Add libks related stuff to .gitignore 2017-10-11 02:16:45 +03:00
Shane Bryldt
e28abe2929 FS-10690: [libblade] fixed some linux build issues that were missed recently for stringbuilder addition 2017-10-10 07:38:04 -05:00
Shane Bryldt
71286aa436 FS-10690: [libblade] Undid apple definition for old libconfig stuff 2017-10-10 06:34:14 -06:00
Shane Bryldt
a173023827 FS-10690: [libblade] fixed up libconfig to treat 1.4.x as legacy for debian 8 system packages, with 1.5.0 expected on windows and newer linux 2017-10-10 06:33:12 -06:00
Seven Du
03eb15c978 FS-10690 temp fix build on Mac 2017-10-10 20:23:07 +08:00
Shane Bryldt
0078f4027c FS-10690: [libblade] Fix for return type that wasn't being detected correctly by compilers 2017-10-10 06:06:25 -06:00
Mike Jerris
fd061fc2b8 Merge pull request #1412 in FS/freeswitch from ~ANDYWOLK/freeswitch:bugfix/FS-10541-update-openssl-to-1.1.0f-on-windows to master
* commit 'ea8c3be8ec365bf9f7d2a6b9ce4b2e9ef6bcdccd':
  FS-10541: [Build-System] Move OpenSSL to props with BaseDir on windows.
2017-10-09 20:28:09 +00:00
Anthony Minessale II
acb7d1c3fd Merge pull request #1401 in FS/freeswitch from ~STEFAN_YOHANSSON/freeswitch:fix/change-video-next-call to master
* commit '90dad5af88c41ada07e863acb00e6058cf2339fe':
  [verto_communicator] Fix to make video devices change without restart.
2017-10-09 15:16:47 +00:00
Andrey Volk
ea8c3be8ec FS-10541: [Build-System] Move OpenSSL to props with BaseDir on windows. 2017-10-07 22:50:48 +03:00
Shane Bryldt
c61c2a9f35 Merge pull request #1411 in FS/freeswitch from ~ANDYWOLK/freeswitch:feature/FS-10690-integrate-robust-and-convenient to master
* commit '8d0afcd01a433333ccb19a447002efcc63181c15':
  FS-10690: [libblade, Build-System] Migrated civetweb's duktape_lib and lua_lib windows projects into repository.
2017-10-07 14:05:22 +00:00
Andrey Volk
8d0afcd01a FS-10690: [libblade, Build-System] Migrated civetweb's duktape_lib and lua_lib windows projects into repository. 2017-10-07 17:03:34 +03:00