19949 Commits

Author SHA1 Message Date
Anthony Minessale
44007a5a65 FS-10762: [freeswitch-core] Websocket logic error #resolve 2018-01-15 01:35:19 -05:00
Piotr Gregor
755ce589ce FS-10778: Fix for MKI regression introduced in FS-10778 2018-01-02 21:35:46 +00:00
Mike Jerris
32f6387217 swigall 2017-12-27 16:21:30 -06: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
Anthony Minessale
34b390bee0 FS-10843: [freeswitch-core] Tweak RTP write timing #resolve 2017-12-19 14:31:12 -06:00
Mike Jerris
15a5dc52a9 Merge pull request #3 in FSA/freeswitch-advantage from ~PIOTRGREGOR/freeswitch:feature/FS-10778-srtp-mki-support to v1.8-fsa
* commit 'c47d3ad6b7e3fbd752ec4c6a7d0af3186ca94a30':
  FS-10778: Evaluate rtp_secure_media_mki variable with switch_channel_var_true
2017-12-05 16:44:45 +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
Mike Jerris
366bf3f89c Merge pull request #2 in FSA/freeswitch-advantage from ~PIOTRGREGOR/freeswitch:feature/FS-10778-srtp-mki-support to v1.8-fsa
* commit '903ea6e6114d3ee8219644f5c7f1f1479bf0bb17':
  FS-10778: Fix compilation and refactor code
2017-12-04 20:03:42 +00:00
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
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
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
Italo Rossi
15455f7060 FS-10738 [mod_callcenter] - setting bridged = 0 if member give up too early 2017-10-17 20:32:35 -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
Andrey Volk
ea8c3be8ec FS-10541: [Build-System] Move OpenSSL to props with BaseDir on windows. 2017-10-07 22:50:48 +03:00
Anthony Minessale
86911858e8 FS-10527: [mod_av] AV tweaks 2017-09-27 12:58:14 -05:00
Anthony Minessale
503db7b23f FS-10675: [mod_fifo] Wrap Up + fifo_caller_exit_key in mod_fifo #resolve 2017-09-18 17:23:45 -05:00
Anthony Minessale
5bb6e3485e FS-10677 2017-09-15 17:02:06 -05:00
Italo Rossi
75c56a0007 FS-10661: [mod_callcenter] Making cc_export_vars work with uuid-standby agents 2017-09-14 22:18:20 -03:00
Italo Rossi
77dcd007ad FS-10660: [mod_callcenter] Park agent session before play cc_warning_tone - avoid double playback causing distorted audio 2017-09-14 21:02:56 -03:00
Anthony Minessale
a88bc6730e FS-10667: [core] Segfault in crypto / srtp #resolve 2017-09-14 18:09:35 -05:00
Roman Sukhov
c6e2ce18a6 FS-10672 [core] Fix event url-encoding buffer size 2017-09-14 18:05:59 +03:00
Anthony Minessale
85348331f3 FS-10667: [core] Segfault in crypto / srtp #resolve 2017-09-13 17:28:40 -05:00
Italo Rossi
7f31967a31 FS-10666: [mod_callcenter] Adding callcenter_break agent api
callcenter_break agent <uuid> can be called with an uuid that represents
an outbound session created to call an agent.

The current behavior of mod_callcenter is to keep watching this channel
until it is hangup, once the hangup happens the bridge-agent-end and
member-queue-end events are fired, agent is released on the database
so it can receive more calls and member is also updated on database.

If you do not want to the agent channel hangup to release the agent you can
call this app with the agent session uuid and the agent will be released and
available to receive more calls. This is useful when the agent is located on a
remote freeswitch box and transfer the call internally, the original leg between
the first FreeSWITCH and the remote box remains live and the agent will only be
Available when the original call hangup.
2017-09-13 17:39:43 -03:00
Anthony Minessale
2aea0c329b FS-10468: [mod_verto] Attended Transfer from Mod Verto leaves one channel in limbo. #resolve 2017-09-11 14:47:56 -05: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
Mike Jerris
8fa59c995d Merge pull request #1374 in FS/freeswitch from ~MOCHOUINARD/freeswitch:bugfix/FS-10608-patch-change-hard-coded-60-value to master
* commit '348c2c42bb9d366b3c5a36fa4a377bbf8286d3c6':
  FS-10608: Change 60 second timeout value to a global #define SWITCH_DEFAULT_TIMEOUT
2017-09-08 17:29:14 +00:00
Mike Jerris
e848f1ef4b Merge pull request #1372 in FS/freeswitch from ~HRISTO/freeswitch:FS-10617-nightmare-xfer-uuid-helper-vars to master
* commit '9d4c26825fe2dddbaec4fc9e1bbb658da98c1de5':
  FS-10617: [mod_sofia] Nightmare transfer: expose remote server's channel UUIDs as variables.
2017-09-08 16:33:07 +00:00