269 Commits

Author SHA1 Message Date
David Yat Sin
eb0404d025 Merge remote branch 'fsorig/master' into releases.3.5
Conflicts:
	build/modules.conf.in
	libs/freetdm/mod_freetdm/mod_freetdm.c
2012-05-31 13:57:42 -04:00
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
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
David Yat Sin
d56aebcc13 Changed error message from CRIT to ERROR, because message is not CRITICAL 2012-04-30 14:22:42 -04:00
Anthony Minessale
d5766ceaa0 FS-4115 --resolve this should fix it in all circumstances 2012-04-23 13:25:21 -05:00
Ken Rice
c5554eb939 Copyright date update. 2012-04-18 11:52:02 -05:00
Anthony Minessale
19f441c6f4 move relevant portion of display update code into the core and fix mod_loopback bug involving passing display updates across properly 2012-04-17 16:13:41 -05:00
Anthony Minessale
44e5691223 FS-4107 --resolve 2012-04-13 07:33:00 -05:00
Anthony Minessale
995ae2621c FS-3769 --resolve 2012-04-10 16:17:16 -05:00
Anthony Minessale
8618e22c9d FS-4053 try this 2012-03-30 14:24:50 -05:00
Anthony Minessale
e31a35a7be FS-3973 --resolve we can go with this for now and ponder the other problem for later 2012-03-09 11:43:37 -06:00
Anthony Minessale
a822421be1 FS-3901 FS-3870 yay a chain of regressions 2012-02-16 16:09:41 -06:00
Anthony Minessale
f24f2b3a1c FS-3901 --resolve alternate solution to FS-3870 2012-02-16 10:20:55 -06:00
Anthony Minessale
8fedd51d37 missing comma 2012-01-09 10:03:51 -06:00
Anthony Minessale
6e7d44af42 FS-3764 --resolve 2011-12-14 13:23:54 -06:00
Anthony Minessale
0120b39f0a add string 2011-12-13 14:16:16 -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
ba14f95d81 FS-3678 --resolve 2011-11-08 08:02:17 -06:00
Anthony Minessale
fe3e93567f add session_id variable 2011-11-02 12:37:31 -05:00
Anthony Minessale
fd495dbbe1 FS-3640 try this patch, not sure what you are doing because I can recover 300 channels fine. I added a patch to deal with what looks like corrupted data in the cdr or something so it should fail more gracefully 2011-10-26 09:00:59 -05:00
Anthony Minessale
bad5964b94 FS-3589 --resolve 2011-10-24 08:47:08 -05:00
Anthony Minessale
2094f2d33b add fsctl sync_clock_when_idle so you can sync the clock but have it not do it till there are 0 calls 2011-10-12 14:55:32 -05:00
Anthony Minessale
65836742e8 fix missing null dmachine check 2011-10-04 14:37:48 -05:00
Anthony Minessale
3a2f818387 make app to turn on new zombie exec instead of always doing it 2011-09-13 17:12:37 -05:00
Anthony Minessale
637a5ed83d Add application flag zombie_exec so registered applications can apply to be executed on channels that are already hungup, like the inline exec this is only limited to a small family of apps that do not use the channel for audio. 2011-09-13 09:35:41 -05:00
Anthony Minessale
42b64ccd67 get rid of digit_action_set target and add target,bind_target params to bind_digit_action 2011-09-02 09:34:40 -05:00
Anthony Minessale
9403064d46 add name string for SIGNAL_DATA 2011-08-30 09:15:27 -05:00
Anthony Minessale
087ddcb0e7 adjustment to 85ea402ca9b0eadedcda9c0c433fb54fb1c993e9 2011-08-26 12:07:20 -05:00
Anthony Minessale
85ea402ca9 zero out particular flags when recovering 2011-08-25 20:21:53 -05:00
Anthony Minessale
517707dc47 remove stray printf 2011-08-25 18:17:00 -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
5dd9b7218a remove debug printf 2011-08-19 16:25:32 -05:00
Anthony Minessale
2eae19e63f FS-3484 --resolve 2011-08-04 09:38:45 -05:00
Anthony Minessale
b946ee94b2 update call_uuid stuff 2011-08-04 01:04:21 -05:00
Anthony Minessale
56d67eadf6 sdp_m_per_ptime is now implied to be true, if you don't like this set it to false but its going to be undefined behaviour. This basically means if you call in with ptime 30 then you have a bunch of ptime 20 codecs in your outbound list that there will be one m= line with 30 and the original inbound codec and more m= lines for each discinct ptime in your list. This is, of course, will depend on disable_trancoding or absolute_codec_string as well 2011-08-01 10:22:55 -05:00
Anthony Minessale
f1ee225cb1 push out signal data into its own queue system 2011-07-08 12:52:18 -05:00
Anthony Minessale
8decee307b FS-3358 please test and close if it works 2011-06-20 13:21:20 -05:00
Anthony Minessale
7768808488 only clear scope vars when they were set 2011-06-18 11:52:37 -05:00
Anthony Minessale
d4fcba74c8 only clear scope vars when they were set 2011-06-18 10:28:27 -05:00
Anthony Minessale
fb68746eed add parallelism to sofia by offsetting sip messages to the concerned sessions and using multiple queue threads for message handling 2011-06-16 14:37:22 -05:00
Anthony Minessale
b2c3199f65 add scoped channel variables (%[var=val,var2=val2] blocks valid in any app data field and will only last for that one app execution) 2011-06-15 13:03:45 -05:00
Jeff Lenk
d193789a2c fix several problems discovered with code analysis 2011-05-30 00:07:32 -05:00
Anthony Minessale
9c17effb15 add time stamp to app_log 2011-05-16 13:41:52 -05:00
Anthony Minessale
73279f01bf FS-3166 --resolve 2011-04-22 16:43:29 -05:00
Anthony Minessale
446cedd31f update 2011-02-28 17:11:29 -06:00
Anthony Minessale
3116334d27 FS-3086 --comment-only This should fix the 'hupall' based lockups 2011-02-22 13:16:23 -06:00
Anthony Minessale
e79174cacf fix regression from d72cde9b76a856cf002366300bea02c26db44ffb 2011-02-03 19:32:14 -06:00
Anthony Minessale
1a08df9b20 add function to help set session read codec to slinear 2011-01-06 17:41:25 -06:00
Brian West
3734f4cd44 bump copyright date and fix some email and typos from diego. 2011-01-05 10:09:04 -06:00