Commit Graph

810 Commits

Author SHA1 Message Date
Mike Jerris 5e43c6dd25 Merge pull request #170 in FS/freeswitch from ~NIMAST/freeswitch-fs-7203:rtcp-source-fraction-fix to master
* commit '5f7e111f79dd1a965aa956da7495485f52b0a1cc':
  Fix source fraction always 0 in RTCP events
2015-03-06 13:36:37 -06:00
Michael Jerris 302a339fdf FS-7294: Enable -Werror when building with clang compiler #resolve 2015-02-17 12:20:33 -05:00
Nimrod Astrahan 5f7e111f79 Fix source fraction always 0 in RTCP events
Without the value for source fraction, applications relying on RTCP events for making changes to FS behaviour or even for logging get false information.

With this change the value for source fraction is passed along in RTCP events correctly.

To my current understanding, as the value for fraction in the RTCP packet is represented by 8 bits according to the spec, calling `ntohl` on it will always zero it out. Fixed by removing the call.

FS-7203 #resolve
2015-01-27 18:13:04 +02:00
Anthony Minessale 8d599a82bc one more tweak to not jump back and forth on ice when you have 2 reachable 2015-01-26 15:33:33 -06:00
Anthony Minessale 90d3cb633c fix media reload on verto and sip re-invites 2015-01-22 03:07:50 -06:00
Anthony Minessale 95a8efb174 up the ice failover val to 3 sec 2015-01-21 01:21:31 -06:00
Anthony Minessale 46cf8a4dce fix seg in ice rtp code 2015-01-17 00:22:11 -06:00
Anthony Minessale 3e6ffbcf06 FS-7144 #resolve 2015-01-12 18:55:32 -06:00
Anthony Minessale a2b5356dae FS-7131 #comment please test 2015-01-09 21:47:28 -06:00
Anthony Minessale ba016c2850 FS-7095 #comment please test 2014-12-18 13:08:11 -06:00
Anthony Minessale cee8b30c45 set rtp_has_crypto for dtls calls 2014-12-16 10:19:43 -06:00
Anthony Minessale e783999b51 some changes to webrtc to make it work with iDoubs in rtcweb profile mode 2014-12-12 20:55:40 -06:00
Anthony Minessale d1e529aefd Add new hard_mute control to allow apps to request low level mute e.g. from the rtp stack level. Its used in mod_conference to avoid reading audio while muted and possibly reduce some transcoding load 2014-10-27 15:13:42 -04:00
Anthony Minessale 1f9025d446 FS-6926 #resolve #comment please test and reopen if necessary 2014-10-16 17:57:46 -05:00
Anthony Minessale 6bfc05b81e FS-6887 #resolve #comment new bug flag always_auto_adjust (also implicitly sets accept_any_packets) 2014-10-02 11:55:53 -05:00
Jeff Lenk 8f85b5204c vs2010 trival compiler warnings 2014-09-17 18:11:20 -05:00
Anthony Minessale f924684eff FS-6623 #resolve fix init and logging for rtcp 2014-09-15 20:08:09 +05:00
jchavanton b738775876 [FS-6623] implement RTCP report generation 2014-09-15 20:08:09 +05:00
Travis Cross 3e8e2ce151 Revert commits pushed too early
Revert "depend on fs before install"
This reverts commit 6c52217920.

Revert "removing commented work in progress on SDES and logging tunning on"
This reverts commit 6df5288f5a.

Revert "more formatting and logging tuning"
This reverts commit 0e89bbd033.

Revert "logging adjustment"
This reverts commit 764faad671.

Revert "missing host to network conversion highest_sequence_number_received"
This reverts commit 50c62cdfd7.

Revert "logging correction"
This reverts commit ea973b0b4c.

Revert "[FS-6623] implement RTCP report generation"
This reverts commit 0b7863a9b7.
2014-09-12 17:07:50 +00:00
jchavanton 6df5288f5a removing commented work in progress on SDES and logging tunning on
rtcp_init
2014-09-12 11:58:54 -05:00
jchavanton 0e89bbd033 more formatting and logging tuning 2014-09-12 11:58:53 -05:00
jchavanton 764faad671 logging adjustment 2014-09-12 11:58:53 -05:00
jchavanton 50c62cdfd7 missing host to network conversion highest_sequence_number_received 2014-09-12 11:58:53 -05:00
root ea973b0b4c logging correction 2014-09-12 11:58:53 -05:00
jchavanton 0b7863a9b7 [FS-6623] implement RTCP report generation 2014-09-12 11:58:53 -05:00
Anthony Minessale 37d7fb7888 calculate jitter percentage in jitterbuffer to factor into conditions for reducing the size when in adaptave mode 2014-09-10 04:17:01 +05:00
Anthony Minessale 151440b7e1 fix race caused by consecutive stun packets 2014-09-09 21:35:51 +05:00
Travis Cross aa1a05d0aa Help the static analyzer in `handle_ice`
Clang's static analyzer thinks we could be using `hosts` here when it
is NULL.  We probably weren't, but it's easy to see how it could think
so.  We were checking whether `from_addr` matched `ice->addr` three
times, and between the second on third time we might have modified the
`ice->addr`; however we only get there if it matched the second time,
so we could only make it not match at that point and avoid the third
branch.  We can't make it match where it did not before.

We'll simplify the logic a bit here so static analyzers (and humans)
can hopefully see this more readily.
2014-08-22 03:37:42 +00:00
Travis Cross 3526ca5cb5 Allow setting threshold for RTP auto adjust
If we see a certain number of RTP packets from a host and port other
than was negotiated, we adjust to send our RTP to that host and port.
Traditionally we've waited for 10 packets.  This commit makes the
threshold adjustable by setting the channel variable
`rtp_auto_adjust_threshold` to any positive value less than 2^16.
2014-07-16 01:32:18 +00:00
Kathleen King aef569172b Removed a useless called to abs.
Clang 3.5 reported the following error: error: taking the absolute
value of unsigned type 'unsigned int' has no effect
[-Werror,-Wabsolute-value]

Subtracting unsigned variables will never be negative and will either
be the small expected value or will wrap to a very big value. This
code is trying to determine if the difference between these timestamps
is greater than 16000.

The variables last_write_ts and this_ts deal with timestamps. In the
normal case this_ts will be a larger timestamp than
last_write_ts. This change will maintain the intended behavior of
reseting the video if the difference is larger than
16000 and in the abnormal case this value would wrap and still exceed
the 16000.
2014-07-03 13:17:12 -07:00
Travis Cross c1f1f8b98e Check for too many SRTP errors before warning
We're checking whether we've hit the warning threshold before checking
whether we should just end the call.  This causes an off-by-one error
where we take one SRTP error more than intended.

This commit reverses the order of the tests.
2014-06-29 20:49:46 +00:00
Travis Cross f31641f4bf Allow more SRTP errors before killing call
In a carrier interop we saw the call get killed for SRTP failures
during a reinvite.  We're wondering if the SRTP errors may have been
transitory and if it may have recovered after a few more packets.

It's debatable whether we should kill calls at all for SRTP auth
failures; semantically the right thing to do when a MAC fails is to
ignore the packet completely.  So raising this limit to 100 packets
shouldn't do any harm.  With this change we still warn at 10 errors
and every 10 errors thereafter.
2014-06-28 03:57:20 +00:00
Travis Cross 7406be6927 Relay cause of hangup on SRTP failure
We hangup the channel after receiving 10 SRTP packets in a row with a
bad auth tag or that are replayed.  Prior to this commit we were
indicating a normal clearing.  When doing interop and looking first at
packet traces, this made freeswitch's behavior look surprising.  With
this commit we'll indicate more loudly what's happening.
2014-06-28 01:18:50 +00:00
Travis Cross 52892b312a Fix misspelled function
switch_rtp_set_invalid_handler has been misspelled as
switch_rtp_set_invald_handler going all the way back to the
beginning.  So while it's possible that someone somewhere could be
relying on this misspelling, I think it's more likely that no one has
used it much and that's why it wasn't spotted.  We don't even use it
ourselves anywhere anymore.

Introduced in commit: 828e03715f
2014-06-28 00:32:41 +00:00
Anthony Minessale 3c08104874 remove unused code 2014-06-18 01:17:35 +05:00
Anthony Minessale c0e7e7b88c add reset function to clear some state data in the rtp session 2014-06-14 07:05:00 +05:00
Anthony Minessale c375e336bc add debugging 2014-06-13 06:06:14 -04:00
Anthony Minessale 0eda5cb80f suppress audio flaw tally when coming off hold 2014-06-02 19:09:10 -05:00
Michael Jerris b58bbd18b0 CID:1214233 Pointer to local outside scope 2014-05-16 21:08:53 +00:00
Anthony Minessale be56bbb7ae let relay work if its the only option 2014-05-09 01:14:52 +05:00
Michael Jerris 59734d8e15 add bounds check to keep rtcp packets with > 5 report blocks from creating a buffer overrun 2014-04-28 13:32:01 -04:00
Travis Cross 59fd9b90d0 Correct display of last write timestamp
On start DTMF packets we were showing the last write timestamp as a
signed value when it's an unsigned value, which could result in it
appearing incongruous with later packets where the value was displayed
correctly.
2014-04-19 01:48:49 +00:00
Anthony Minessale 7151d6acea FS-6402 part 2 2014-04-02 03:21:37 +05:00
Anthony Minessale 5c0cff70b3 FS-6402 --resolve 2014-04-02 01:20:19 +05:00
Anthony Minessale aa147fa5fd FS-6412 --resolve 2014-03-31 16:22:33 -05:00
Anthony Minessale 087b2e4f30 revert part of 390e6713cc 2014-03-10 14:42:52 -05:00
Anthony Minessale 804ef7709d change from sqlite hash to newly added one 2014-03-09 00:37:17 +05:00
Anthony Minessale a491df05f1 declinatio mortuus obfirmo! 2014-03-07 03:35:36 +05:00
Anthony Minessale 390e6713cc part of last patch 2014-03-07 02:59:09 +05:00
Anthony Minessale e9847afe22 feed all packets to jitterbuffer when enabled to absorb bursts and improve smoothing and delay protection 2014-03-07 02:48:56 +05:00