737 Commits

Author SHA1 Message Date
Anthony Minessale
9fe08675a1 add tags to allow crypto in avp 2012-07-20 12:11:02 -05:00
Anthony Minessale
f4715781dc FS-4382 reverse this so you have to enable instead of disable, this patch has been causing srtp issues because the change in ssrc 2012-07-18 22:01:41 -05:00
Anthony Minessale
a06eb2db30 FS-4328 try this 2012-07-11 18:12:26 -05:00
Anthony Minessale
9ca929218f FS-4382 --resolve 2012-07-06 11:12:14 -05:00
Anthony Minessale
da8885cc51 FS-4397 --resolve 2012-07-06 10:55:53 -05:00
Anthony Minessale
ef23fbaf12 FS-4374 moving the memory to the heap, this should take care of the problem for sure 2012-07-05 12:04:30 -05:00
Anthony Minessale
5f09b40381 add sip_recovery_break_rfc variable to set globally or per channel to not reverse the from and 2 on uas re-invites 2012-06-29 14:41:06 -05:00
Anthony Minessale
a10ec2b991 FS-4299 --resolve regression from 23f8967c the code was not making sure both endpoints were type 'sofia' and dereferencing dingaling channel into sofia and causing memory corruption 2012-06-11 13:30:00 -05:00
Travis Cross
086f617442 increase buffer size for local SDP
There are a lot of codecs these days, and some clients offer all of
them.  If we run out of space in this buffer our local SDP will get
silently truncated, which will cause a difficult to diagnose error in
Sofia-SIP.

Thanks to Anthony Minessale.

FS-4293 --resolve
2012-06-08 16:14:21 +00:00
Travis Cross
dc30013360 fix buffer length calculation in call to generate_m
This error was causing us to call generate_m with a buffer length that
was less than the strlen of the buffer we were passing.  The result
was truncated local SDP which would cause sofia to fail if the
truncation was in a particularly bad place.

Thanks to Anthony Minessale for the fix and working with me to
diagnose the issue.

FS-4293 --resolve
2012-06-08 16:14:20 +00:00
Travis Cross
9c463fdbdc fix typo
This amends commit a6bb4545ebf7ffc773e6bc7ab399a3863ca09246.
2012-06-07 20:12:04 +00:00
Travis Cross
49666cee8d add some sofia debugging for the local SDP
Related to issue FS-4293.
2012-06-07 20:09:06 +00:00
Anthony Minessale
a6bb4545eb FS-4293 2012-06-07 13:00:52 -05:00
Anthony Minessale
d2bc9a2b12 FS-4137 2012-06-04 09:41:46 -05:00
Anthony Minessale
241bdf4166 FS-4279 FS-3279 --resolve 2012-06-01 13:56:55 -05:00
Anthony Minessale
f685e4c504 allow ep_codec_string to draw from absolute_codec_string before the profile prefs 2012-06-01 10:06:28 -05:00
Anthony Minessale
3e1d68b0a6 FS-4250 --resolve erase replaces header after using it 2012-05-30 13:08:31 -05: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
Anthony Minessale
baf5bbd565 FS-4266 --resolve 2012-05-29 08:42:51 -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
a672c99a57 FS-4224 --resolve this was a regression from d6374535 to fix FS-3029, when you find a profile you must release it 2012-05-22 07:59:21 -05:00
Anthony Minessale
792b004f36 add mwi-use-reg-callid 2012-05-21 13:55:50 -05:00
Anthony Minessale
f9653fbd38 FS-4204 --resolve 2012-05-10 22:34:37 -05:00
Anthony Minessale
76c0201e89 dtmf tweak 2012-05-08 12:52:52 -05:00
Anthony Minessale
ca39f15aa9 let the var take precedence over the profile setting 2012-05-04 11:41:54 -05:00
Anthony Minessale
481df053ac require timer by default unless its t.38 re-invite 2012-04-27 14:41:32 -05:00
Anthony Minessale
b553d62fbd add sip_require_timer=true variable to enable require timer on session refresh that breaks finicky endpoints 2012-04-26 10:35:02 -05:00
Anthony Minessale
5e99d34fd8 FS-4146 --resolve 2012-04-26 08:10:30 -05:00
Anthony Minessale
a47d924a82 FS-4134 --resolve 2012-04-19 11:49:56 -05:00
Anthony Minessale
6130f617c6 FS-4132 try this 2012-04-19 09:17:57 -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
Ken Rice
c5554eb939 Copyright date update. 2012-04-18 11:52:02 -05:00
Ken Rice
437e502b59 fix my contact info as i havent had that email address in years 2012-04-18 11:52:02 -05:00
Anthony Minessale
0eb9b0101f FS-4110 --resolve yes this block is wrong we can't guess the right presence id here 2012-04-13 11:37:06 -05:00
Anthony Minessale
44589f1fb4 FS-4014 --resolve 2012-04-10 15:34:50 -05:00
root
277c1141c4 a few perf tweaks 2012-04-04 17:20:35 -05:00
Travis Cross
b83b567dae set sdp_zrtp_hash_string earlier when inbound-late-negotiation is enabled
Previously in this case it was only being set after the dialplan had
already executed.
2012-04-04 17:24:54 +00:00
Anthony Minessale
26b04fdc4a FS-4068 --resolve 2012-04-03 13:29:39 -05:00
Anthony Minessale
fe704c4082 FS-3984 --resolve 2012-04-02 14:37:40 -05:00
Anthony Minessale
2ab1605a88 ZRTP passthru mode code for phil 2012-03-29 18:37:15 -05:00
Anthony Minessale
7c7967fbae FS-4055 --resolve this was caused by corrupted db data, this patch will prevent it in the future 2012-03-29 10:07:34 -05:00
Anthony Minessale
09bb0bab6a FS-4050 --resolve 2012-03-28 13:52:43 -05:00
Anthony Minessale
b0c6bd7101 FS-3739 please try this patch, its not so much of a bug as an unintended consequence of combining features but this may be the best of both worlds 2012-03-12 13:49:33 -05:00
Anthony Minessale
17cb6a22b3 add some defensive code to allow support for yealink in SCA mode even when its broken 2012-03-02 16:42:05 -06:00
Anthony Minessale
097d9a1ac5 missed a spot on commit 50727f56c63714e83b9a2c52492b5694b5a32097 2012-02-23 12:23:18 -06:00
Anthony Minessale
50727f56c6 add sdp_secure_savp_only channel variable for silly asterisk srtp that only has the SAVP or cries 2012-02-22 20:37:56 -06:00
Anthony Minessale
2261f8a82e FS-3933 --resolve 2012-02-22 20:17:51 -06:00
Anthony Minessale
8e47f3c660 FS-3937 --resolve 2012-02-22 15:26:38 -06:00
Anthony Minessale
ba1db5b65a FS-3928 --resolve 2012-02-21 10:08:58 -06:00
Anthony Minessale
341cc2f0fc FS-3917 sneaky sql null vs != crap 2012-02-17 19:47:57 -06:00