461 Commits

Author SHA1 Message Date
Anthony Minessale
8987e96744 add dedicated mutex for select based sql stuff 2013-02-25 15:42:26 -06:00
Anthony Minessale
dd3bd238c5 limit simo reg processing threads to 25 and add param to raise it 2013-02-21 12:26:30 -06:00
Anthony Minessale
18cd797065 cleanup 2013-02-18 13:54:34 -06:00
William King
fca349941e Adding ability to require authentication for sip messages on a sofia profile. 2013-02-04 12:00:28 -06:00
Steve Underwood
5144700927 Changed the ..._image_sdp routine to ..._udptl_image_sdp in preparation for
adding other kinds of image (specifically RTP and TCP/TPKT).
2013-02-03 16:28:20 +08:00
Anthony Minessale
7e8e99e52c fix answer contention issue 2012-12-06 11:11:07 -06:00
Anthony Minessale
b35ac6b3bd fix auto_simplify 2012-11-29 18:34:27 -06:00
Anthony Minessale
d4f8a79299 try to improve audio stream sync 2012-11-28 23:12:35 -06:00
Michael Jerris
827b680afc fix regressions in sql stuff 2012-11-27 21:14:05 -05:00
Anthony Minessale
294a6016b8 FS-4859 2012-11-21 10:32:41 -06:00
Anthony Minessale
43b094f139 fix some sql order issues 2012-11-16 20:09:43 -06:00
Anthony Minessale
f60962ae87 fix some contention issues under really high load...That doesn't mean you need to push it this hard and bug me about it =p 2012-11-07 12:10:50 -06:00
Anthony Minessale
b94ef869e3 FS-4769 try this patch and put {drop_dtmf=true} in your dial string 2012-10-26 14:46:36 -05:00
Anthony Minessale
b29412054a fold reconfig_sofia into config_sofia so we don't have 2 difft config funcs 2012-10-25 12:30:08 -05:00
Anthony Minessale
68e0b7e859 optimize sofia sql by using new core transaction processor we will no longer support databases that do not support transactions 2012-10-25 11:31:47 -05:00
Anthony Minessale
b8bef3eeb3 remove code 2012-10-19 17:09:33 -04:00
Anthony Minessale
7b7254ac93 fix sofia recovery on srtp legs 2012-10-19 15:49:22 -05:00
Brian West
fbb99f60b4 really fix FS-3726 this time 2012-10-18 15:56:06 -05:00
Anthony Minessale
a20aec182a add rtp_manual_video_rtp_bugs 2012-10-16 18:43:00 -04:00
Anthony Minessale
2369ffa989 sofia: on apply-inbound-acl you can now specify <list name>:<pass context>:<fail context> 2012-10-12 17:05:15 -04:00
Anthony Minessale
a800a5fc5c FS-4708 add <param name="NDLB-allow-crypto-in-avp" value="true"/> to your sofia profile and it should set the header 2012-10-11 10:36:07 -05:00
Anthony Minessale
e1fe289672 refactor db stuff to use single string dsn to avoid code duplication and introduce switch_sql_queue_manager api to create transactional sql queues to aggregate a bunch of sql stmts into transactions 2012-10-09 20:20:32 -05:00
Anthony Minessale
8f0c726b13 add send-display-update profile param to disable the update method 2012-09-11 15:40:50 -05:00
Anthony Minessale
d45db89833 second try at sip_wait_for_aleg_ack 2012-09-05 13:11:32 -05:00
Anthony Minessale
722919668d add channel events to message when its in-dialog 2012-08-30 16:38:31 -05:00
Anthony Minessale
6d2b3256c3 another efficiency pass on sofia and refactoring of 3c685bff255779d21c1d6cd577276f1861be7aa2 to be more efficient 2012-08-30 15:26:13 -05:00
Anthony Minessale
fb9b69f469 add fire-message-events profile param 2012-08-29 15:34:17 -05:00
Anthony Minessale
5213c764bb FS-4079 FS-4540 minor refactoring to fix some minor side effects of recent changes 2012-08-23 11:10:03 -05:00
Anthony Minessale
2a8841ab66 change mod_sofia to use new core based recovery engine 2012-08-22 16:27:07 -05:00
Anthony Minessale
b6f64dc1c2 FS-4079 FS-4540 please update and test 2012-08-21 00:14:50 -05:00
Anthony Minessale
b81e780a26 FS-4079 FS-4540 new patch 2012-08-17 13:24:20 -05:00
Anthony Minessale
cc351ca004 revert 2012-08-16 12:09:19 -05:00
Anthony Minessale
42bf44de51 FS-4539 please test this and post new logs if necessary 2012-08-16 11:56:55 -05:00
Anthony Minessale
bb69310259 FS-4079 FS-4540 please update to this version 2012-08-15 22:51:41 -05:00
Anthony Minessale
ef5c1256f3 add rtp endpoint contributed by sangoma 2012-08-08 14:46:38 -05:00
Anthony Minessale
9fe08675a1 add tags to allow crypto in avp 2012-07-20 12:11:02 -05:00
Anthony Minessale
223244d491 FS-4435 looks ok at a glance, at least this code is isolated to the small few who actually use it so i will put it in for testing 2012-07-17 17:01:10 -05:00
Anthony Minessale
2aebe2456f first pass on some new stuff 2012-07-11 15:15:50 -05:00
Anthony Minessale
e79e6146c5 FS-4378 add sofia::error custom event 2012-07-09 10:56:04 -05:00
Anthony Minessale
ed0ab36e2d FS-4353 redirect case 2012-06-27 12:25:03 -05:00
Anthony Minessale
b0f53cd625 FS-4353 --resolve this may also fix FS-4079 2012-06-27 09:33:01 -05:00
Michael Jerris
773fb5e3a5 use reg call id on reboot notifies and pass it back in reverse auth lookup 2012-06-19 21:58:43 -04:00
Travis Cross
c85c8d7bbd
Add mechanism to set OpenSSL session timeout
In a sofia profile, you can now set the parameter tls-timeout to a
positive integer value which represents the maximum time in seconds
that OpenSSL will keep a TLS session (and its ephemeral keys) alive.

This value is passed to OpenSSL's SSL_CTX_set_timeout(3).

OpenSSL's default value is 300 seconds, but the relevant standard
(RFC 2246) suggests that much longer session lifetimes are
acceptable (it recommends values less than 24 hours).

Longer values can be useful for extending battery life on mobile
devices.

Signed-off-by: Travis Cross <tc@traviscross.com>
2012-06-11 21:46:05 +00:00
Raymond Chandler
9b488fbffd pnp 2012-06-04 15:16:30 -04:00
Travis Cross
00e32e4ec2 use SWITCH_VERSION_FULL for the sofia user agent 2012-06-01 22:22:44 +00:00
Travis Cross
c1b2472781 SWITCH_VERSION_REVISION includes the dash or dot itself 2012-06-01 22:22:44 +00: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
Travis Cross
cb58e81c17 add editor variables to mod_sofia.h 2012-05-23 23:44:44 +00:00
Anthony Minessale
fb790bc320 block any inbound messages when queue is full; add debounce for mwi and pres on register; fix missing detach attr on new mode to process reg in new thread 2012-05-22 10:27:23 -05:00
Anthony Minessale
792b004f36 add mwi-use-reg-callid 2012-05-21 13:55:50 -05:00