1853 Commits

Author SHA1 Message Date
Travis Cross
23f8967c32
add enhanced zrtp passthrough (zrtp passthru) mode
ZRTP passthrough mode allows two ZRTP-capable clients to negotiate an
end-to-end security association through FreeSWITCH.  The clients are
therefore able to be certain that the FreeSWITCH instance mediating
the call cannot eavesdrop on their conversation.

Importantly, this capability is maintained across multiple FreeSWITCH
hops.  If widely deployed, this enables a global network architecture
where two people can speak securely with strong cryptographically
protected authentication and confidentiality.

With this commit we implement a zrtp-passthru mode that handles all
the details of the negotiation intelligently.  This mode can be
selected by setting the boolean parameter inbound-zrtp-passthru in the
sofia profile.  This will also force late-negotiation as it is
essential for correctly negotiating an end-to-end ZRTP security
association.

When an incoming call with a zrtp-hash is received and this mode is
enabled, we find the first audio and the first video zrtp-hash in the
SDP and store them as remote values on this channel.  Once a b-leg is
available, we set the local zrtp-hash values on that channel to the
remote zrtp-hash values collected from the a-leg.

Because zrtp-passthru absolutely requires that the channels negotiate
the same codec, we offer to the b-leg only codecs that the a-leg can
speak.  Once the b-leg accepts a codec, we will force that choice onto
the a-leg.

If the b-leg sends us zrtp-hash values in the signaling, we store
those as remote values on the b-leg and copy them to the local values
on the a-leg.

At this point, each leg has the zrtp-hash values from the other, and
we know we can do ZRTP passthrough mode on the call.  We send the
b-leg's zrtp-hash back to the a-leg in the 200 OK.

We then enable UDPTL mode on the rtp streams for both the audio and
the video so that we don't interfere in the ZRTP negotiation.

If the b-leg fails to return a zrtp-hash in the signaling, we set up a
ZRTP security association with the a-leg ourselves, if we are so
equipped.  Likewise, if the a-leg fails to send a zrtp-hash in the
signaling, we attempt to set up a ZRTP security association ourselves
with the b-leg.

The zrtp-passthru mode can also be enabled in the dialplan by setting
the boolean channel variable zrtp_passthru.  If enabled in this
manner, we can't force late-negotiation, so the user would need to be
sure this is configured.

If ZRTP passthrough mode is not enabled in either manner, this change
should have no effect.

Channel variables for each of the various zrtp-hash values are set,
though it is anticipated that there is no good reason to use them, so
they may be removed without warning.  For checking whether zrtp
passthrough mode was successful, we provide the channel variable
zrtp_passthru_active which is set on both legs.

Though not implemented by this commit, the changes here should make it
more straightforward to add correct zrtp-hash values to the signaling
and verify that correct hello hash values are received when FreeSWITCH
is acting as a terminating leg of the ZRTP security association.

A historical note...

This commit replaces the recently-added sdp_zrtp_hash_string method,
commit 2ab1605a8887adc62be1b75f6ef67af87ff080de.

This prior method sets a channel variable from the a-leg's zrtp-hash,
then relies on the dialplan to export this channel variable to the
b-leg, where it is put into the SDP.

While it was a great start and wonderful for testing, this approach
has some drawbacks that motivated the present work:

 * There's no good way to pass the zrtp-hash from the b-leg back to
   the a-leg.  In fact, the implementation seems to send the a-leg's
   zrtp-hash back to the originating client in the 200 OK.  This is
   not correct.

 * To support video, we'd need to have a separate dialplan variable,
   and the dialplan author would need to deal with that explicitly.

 * The API is problematic as it requires the dialplan author to
   understand intricate details of how ZRTP works to implement a
   correct dialplan.  Further, by providing too fine-grained control
   (but at the same time, not enough control) it would limit our
   ability to make the behavior smarter once people started relying on
   this.
2012-05-24 20:39:03 +00:00
Tamas Cseke
fbcb862265 add thread safe hash multi delete function and make callback optional 2012-05-24 09:35:23 +02:00
Anthony Minessale
bbdcd33bde performance tweaks for sip message parsing and event system 2012-05-17 20:10:53 -05:00
Anthony Minessale
5c75d4cf5b FS-4220 --resolve i refactored this into a general cross platform function and use it everywhere else we try to set affinity 2012-05-15 08:31:42 -05:00
Anthony Minessale
5b3b77071b make sure bargers use the same codec as bargee to avoid transcoding delay 2012-05-14 10:03:35 -05:00
Anthony Minessale
f9653fbd38 FS-4204 --resolve 2012-05-10 22:34:37 -05:00
Anthony Minessale
e54ab070f4 put presence-data in events 2012-05-10 12:15:30 -05:00
Anthony Minessale
787d81db32 fix bsd build issue 2012-05-10 10:57:29 -05:00
Anthony Minessale
f106c18f51 tweak to confirm blind transfer patch 2012-05-08 19:33:53 -05:00
Anthony Minessale
07204a1fb5 add param:confirm-blind-transfer var:confirm_blind_transfer that makes blind transfers keep the transferrer on the line until its confirmed that the call was completed or brings it back to the bridge. blind_transfer_ack app can be executed in the dp by the transferee to indicate sucess or fail or a sucessful bridge will automatically trigger a success 2012-05-08 08:50:41 -05:00
Anthony Minessale
1fc57f9828 FS-4198 --resolve 2012-05-08 07:43:01 -05:00
Anthony Minessale
024e5fdefd FS-4196 --resolve 2012-05-08 07:41:10 -05:00
Anthony Minessale
a511ff3026 re-implement sla barge using eavesdrop backend 2012-05-07 13:44:16 -05:00
Anthony Minessale
09e6152382 FS-3995 --resolve 2012-05-07 11:41:54 -05:00
Anthony Minessale
7f76b67f5d FS-4191 --resolve 2012-05-07 08:17:41 -05:00
Anthony Minessale
64d4d9ea57 add pickup endpoint and app to dptools add pickup/keyname to forked dial, then route a call to call app pickup(keyname) to have your channel return from originate. sub to pickup+keyname or presence map the pickup proto to use on blf 2012-05-04 18:59:34 -05:00
Anthony Minessale
f1b504402b add core-db-inner-pre-trans-execute and core-db-inner-post-trans-execute to switch.conf.xml to wrap sql stmts inside the meat of the core transactions 2012-04-26 11:28:47 -05:00
Anthony Minessale
21b1ffbf25 add core-db-pre-trans-execute and core-db-post-trans-execute to switch.conf.xml to wrap sql stmts around the core transactions 2012-04-26 11:12:16 -05:00
Ken Rice
7a147e4762 Update a ton of copyright statements to make sure the dates are proper 2012-04-25 17:14:55 -05:00
Anthony Minessale
d642c2c1a6 add loopback_initial_codec variable to specifiy the codec of a one legeded loopback channel 2012-04-23 12:16:53 -05:00
Anthony Minessale
677b223579 FS-4122 --resolve this fixes the issue and eliminates the delay unless you configure it to have some 2012-04-18 09:56:06 -05:00
Anthony Minessale
395965891e FS-4119 --resolve 2012-04-17 16:53:25 -05:00
Anthony Minessale
f9b3266720 endless recursion loop protection to go with new recursive variable expansion feature 2012-04-12 07:23:08 -05:00
Anthony Minessale
385a92cec7 add origination_nested_vars=true to allow vars within vars in originate strings e.g. [originate {origination_nested_vars=true,TEST=,var=,recur=W00t}user/1004 3000] will end up as w00t 2012-04-11 15:30:37 -05:00
root
277c1141c4 a few perf tweaks 2012-04-04 17:20:35 -05:00
Anthony Minessale
d655ceecf8 add fsctl debug sql 2012-04-02 12:58:40 -05:00
Anthony Minessale
2ab1605a88 ZRTP passthru mode code for phil 2012-03-29 18:37:15 -05:00
Anthony Minessale
973a39e07f FS-4049 revert 2012-03-28 14:28:05 -05:00
Anthony Minessale
6f6765b8f2 start one msg thread per cpu by default 2012-03-27 16:48:30 -05:00
Anthony Minessale
46810f58d3 FS-4049 try this 2012-03-27 13:08:49 -05:00
Anthony Minessale
a239914926 addition to a6a3ff1dc5574ded096ac1427cd7c6992d14092f 2012-03-26 10:53:39 -05:00
Jeff Lenk
4276680181 FS-3782 --resolve soft timer 2012-03-14 10:08:41 -05:00
Anthony Minessale
f6941ca48f FS-3910 It seems to have a problem keeping up with the realtime audio. Try this patch that introduces some prebuffering 2012-02-17 11:23:59 -06:00
Anthony Minessale
b05ca56adf FS-3910 remove unnecessary code 2012-02-16 21:41:10 -06:00
Anthony Minessale
d99e7ed76d FS-3910 test this patch 2012-02-16 18:15:50 -06:00
Brian West
256d67c7cc FS-3450: silly apple 2012-01-19 23:08:07 -06:00
Anthony Minessale
c358f67fe4 eat inbound vid while playing fsv files 2012-01-17 12:19:31 -06:00
Anthony Minessale
e5139c3db5 FS-3816 --resolve 2012-01-17 09:43:14 -06:00
Anthony Minessale
e87a48b824 FS-3812 --resolve 2012-01-13 15:22:31 -06:00
Anthony Minessale
c54f42d793 more changes to recording code 2012-01-12 14:06:33 -06:00
Anthony Minessale
a365fb636a mailing list 36bc584d980ce80fe6a6f6e7d7383db9.squirrel@my.tomp.co.uk [Freeswitch-users] audo sync issues with record_session to mp3 I redid the stream recording with timestamps and headers to try to keep it more synced 2012-01-11 17:49:46 -06:00
Anthony Minessale
755be33022 add list support for which vars/api to expand in httapi 2012-01-09 12:47:47 -06:00
Jeff Lenk
24288832b1 FS-2216 partial with renaming 2012-01-08 14:19:16 -06:00
Anthony Minessale
7fab8f1543 move func in the core to hide the need to wrap it 2012-01-05 16:57:31 -06:00
Anthony Minessale
e7848b39b2 this seems to work more often than the present solutions 2012-01-05 15:48:01 -06:00
Anthony Minessale
f7438a22f7 fix regression from earlier commit 2012-01-05 13:25:04 -06:00
Anthony Minessale
410e523c24 add support for configurable timeout and passing of args to play_and_detect_speech 2012-01-05 10:38:08 -06:00
Anthony Minessale
db2d587eec push in curl_formadd wrapper 2012-01-04 18:05:14 -06:00
Anthony Minessale
0d089c4b2f put SWITCH_DECLARE marcos on the json api to make it exported 2011-12-23 15:10:20 -06:00
Jeff Lenk
e767b17c05 FS-3740 --resolve curl cleanup 2011-12-23 08:59:13 -06:00