506 Commits

Author SHA1 Message Date
Anthony Minessale
8bb55ed4bf abstract out originate_signal_bond to a function to avoid confustion and regressions 2012-05-29 13:10:15 -05:00
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
Anthony Minessale
1cfd145c17 add support for variable expander to recognize 717 vars as specificly globals 2012-05-24 13:07:26 -05:00
Anthony Minessale
bbdcd33bde performance tweaks for sip message parsing and event system 2012-05-17 20:10:53 -05:00
Travis Cross
0709cc6f1b make log message relevant even if FS doesn't have ZRTP 2012-05-16 02:50:13 +00:00
Travis Cross
7e193ed382 Revert "disable these options if zrtp isn't enabled"
Brian and I talked about this and concurred on the reversion here.
Part of the point of the ZRTP pass-through mode code is that it allows
two legs to have a ZRTP-enabled call even if FS doesn't have ZRTP.

This reverts commit f0aa4ab390b1f905ec1d99f689bfec6215308dcd.
2012-05-16 02:41:24 +00:00
Brian West
f0aa4ab390 disable these options if zrtp isn't enabled. 2012-05-15 21:05:04 -05:00
Anthony Minessale
e54ab070f4 put presence-data in events 2012-05-10 12:15:30 -05:00
Ken Rice
c5554eb939 Copyright date update. 2012-04-18 11:52:02 -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
6138fc8753 FS-4038 can you try this 2012-04-02 16:03:45 -05:00
Anthony Minessale
8618e22c9d FS-4053 try this 2012-03-30 14:24:50 -05:00
Anthony Minessale
2ab1605a88 ZRTP passthru mode code for phil 2012-03-29 18:37:15 -05:00
Anthony Minessale
67b65f95d0 FS-4038 --resolve 2012-03-29 12:13:59 -05:00
Anthony Minessale
303de52bad FS-3794 more fun 2012-02-14 18:59:37 -06:00
Anthony Minessale
80050b5b27 FS-3794 sekil can you test this one 2012-02-01 19:32:29 -06:00
Anthony Minessale
19d49e2075 fix edge case endless loop that can get a channel stuck 2012-01-11 12:05:16 -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
Marc Olivier Chouinard
e081e8045e FS-3321 --resolve 2011-12-15 12:16:41 -05:00
Anthony Minessale
0bf2a0e975 fix strange race moc experienced in uuid_bridge 2011-12-07 15:14:08 -06:00
Anthony Minessale
9ecf187dd9 use the non-signal checking version of switch_channel_up/down in the core 2011-11-18 13:18:04 -06:00
Anthony Minessale
bc968ca8ad fix queued dtmf on channels with no timer issue 2011-11-14 12:37:45 -06:00
Anthony Minessale
7e393be5ae WTF 2011-11-09 14:52:05 -06:00
Anthony Minessale
ff7432d945 FS-3680 --resolve 2011-11-09 13:53:07 -06:00
Anthony Minessale
e04f9ba9fe move the thing that passes proto_specific_hangup_cause to the core and prefix it with last_bridge_ and also log last_bridge_hangup_cauuse for good measure 2011-11-09 13:52:43 -06:00
Anthony Minessale
c285db5473 set DP_REGEX_MATCH_1 .. DP_REGEX_MATCH_N to preserve captures into arrays 2011-11-02 10:58:45 -05:00
Anthony Minessale
51c2281191 FS-2877 FS-2831 FS-2823 FS-3469 some of the patch from 2877 refactored a bit to be more centralized to sip and some other stuff added on, please test 2011-10-21 20:00:34 -05:00
Anthony Minessale
1bf97fa7ba add some more reporting data to logs 2011-10-11 15:13:23 -05:00
Jeff Lenk
77c01bc4b7 fix warnings 2011-09-16 12:34:51 -05:00
Anthony Minessale
d9ce90d7b9 FS-3570 generate side 2011-09-16 11:41:25 -05:00
Anthony Minessale
4cb49fbaa0 fix some minor internal dtmf issues 2011-09-13 16:19:00 -05:00
Anthony Minessale
fba22dc7e9 don't parse signals in the set_running_state function to avoid livelock situation 2011-09-02 16:59:59 -05:00
Anthony Minessale
996b304019 add xferext command to sendmsg parser so you can send a list of instructions to a channel and build and extension and transfer to it from esl 2011-08-31 19:30:58 -05:00
Anthony Minessale
b426ec0bfa FS-2217 --resolve this looks ok and is probably useful 2011-08-25 09:27:39 -05:00
Anthony Minessale
d43af04e93 fix races in bypass media regarding channel signalling that may cause answer to be skipped 2011-08-19 16:25:32 -05:00
Anthony Minessale
850f2e3cff FS-3510 --resolve make all instances of execute_on_X uniform with api_on_X and support both prefix vars as before and usage of arrays to push several exexute_on or api_on records into one variable 2011-08-18 09:11:45 -05:00
Anthony Minessale
c269a58ac5 FS-3045 --resolve 2011-08-17 19:30:15 -05:00
Anthony Minessale
f2b66d3d85 update log 2011-08-17 17:25:56 -05:00
Anthony Minessale
e2a4fb11ab FS-3396 --resolve 2011-08-10 07:59:03 -05:00
Anthony Minessale
885203a461 add event header 2011-08-04 22:32:06 -05:00
Anthony Minessale
3e2c662a88 clean up originator/ee profile so the right one is prevelant in events 2011-08-04 17:20:02 -05:00
Anthony Minessale
b946ee94b2 update call_uuid stuff 2011-08-04 01:04:21 -05:00
Anthony Minessale
c16c74d9c0 update show calls to show both 1 legged calls and bridged calls, also show bridged_calls for previous behaviour of show calls 2011-08-01 14:43:03 -05:00
Anthony Minessale
0fc8050cbc display update 2011-07-31 22:14:06 -05:00
Anthony Minessale
0521886de8 use rwlock for global vars to reduce contention 2011-07-12 20:36:42 -05:00
Anthony Minessale
3cbae3fbd8 FS-3413 --resolve 2011-07-12 09:41:02 -05:00
Marc Olivier Chouinard
b0e0dd2280 switch_channel: When in a dialplan hunt and we have a custom caller_profile, ${destination_number} and other variable kept the previous value of the original dialplan parsing. This correct this so it take the custom created caller_profile for that hunt 2011-07-08 23:57:54 -04:00