Changes by Ryan Lantzer <lantzer@mst.edu> to correct the generation of
line_instance value in outbound ringer requests as part of trying to
diagnose 79x1 series phones not using the correct ring tone for
calls coming into secondary lines.
mod_prefix is an in-memory data store optimized for fast lookups
according to the longest prefix match (LPM) rule.
Tables of key-value string pairs in JSON format can be loaded at
startup via configuration and at runtime via the API.
The implementation uses a bitwise trie (aka binary prefix tree), so
arbitrary string keys are supported.
This removes our in-tree version of portaudio-19 and migrates
mod_portaudio and mod_portaudio_stream to use the system version of
the library. Our detection of the system library relies on
pkg-config.
The new console log function here isn't any more of a channel log than
the old one. The name was bad, and no one could have been using this
yet since we just ran reswig. We'll take the same tack the kernel
developers do when replacing a function with an otherwise equivalent
one with a better API.
This allows emitting log messages that include the file name and line
number of the call. Because we have the session object here, the log
messages can be correctly associated with the session from which they
were emitted.
As when the kernel developers need to 'fix' a system call, we'll just
add a number to the name of the existing function.
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.
* commit '1affff9db4aaa29ab66f9f5db76f575eeabd86b5':
Fixed a clang-3.5 missing-prototype warning and added doxygen documentation for switch_channel_set_presence_data_vals. #doxygen
Fixed dead code.
Fixed trucation of value warning.
Removed a useless called to abs.
Removed an autological-pointer-compare from src/switch_utils.c.
Fixed trucation of value warning.
Disabling Require timer for T.38 re-Invites tells the remote side it
doesn't need to refresh the session but FreeSwitch will still terminate
the call if the remote session doesn't refresh.
While reviewing code I noticed some dead code. It was not possible to
default to the channel variable because the parameter could not be
both full and empty.
If the parameter is not a non zero length string then the code looked
like it was intending to default to the channel variable
'presence_data_cols'. If neither of these are the case it is a noop.
By enabling the dead code, you now have access to set the
'presence_data_cols' in the dialplan or scripts like lua.
* commit '64fc3f7934888175b80e0cdd3a065d717d0a9014':
Changed the function parameter name in the function definition to match the updated parameter name in the function declaration. #doxygen
Changed the variable name for clarity.
There was a parameter mismatch between abs(), which expects an int,
and atol() which returns a long. Since max_drift is defined as an int,
there is no need to pars q as a long rather than an int.
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.
Building with Clang 3.5 gave the following warning: error: comparison
of array 'iface_out.sin6_addr.__in6_u.__u6_addr8' equal to a null
pointer is always false [-Werror,-Wtautological-pointer-compare]
This is a problem because as it is written the check will never be
true. A pointer to a structure within a structure will never be null. The
intention was either to null check the pointer or to check if the IP
address itself was not zero.
From context in the code this appeared to be a pointer null check so I
removed it.
There was a parameter mismatch between abs(), which expects an int,
and atol() which returns a long. Since max_drift is defined as an int,
there is no need to pars q as a long rather than an int.
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.
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.
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.
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
mod_sofia's parameter shutdown-on-fail now accepts the value
"reincarnate-now". This will cause the switch to exit immediately
with a non-zero exit code so that the supervisor can recover the
switch. For this to work you have to pass in -reincarnate or
-reincarnate-reexec to freeswitch.
This is the result of auditing each mod_sofia profile parameter to
ensure that it can be unset or reset after being set. One use-case
for this being done correctly is so a later parameter in a
configuration file can reliably override an earlier one, which is
useful for setups with layered include files.
This commit allows you to set a `log-file` string parameter in a
format_cdr profile. This string is a template that may (and should!)
contain variables. This template will be expanded and used as the
file name of the CDR to be written. This parameter should contain
only the template for the file name itself; the path is relative to
the `log-dir`.
Previously if send-display-update was set to false we would also
remove UPDATE from our Allow: headers. This is unnecessary. The
UPDATE message is useful in SIP transactions even if we're not sending
display updates.
With this commit, we add a new boolean profile flag, allow-update. If
set to true we'll send Allow: UPDATE. If set to false, we will not.
If there is a conflict with another setting that requires UPDATE
support, the allow-update parameter will win and a warning will be
printed.
ref: RFC 3311
When -reincarnate-reexec is given we run execv to restart FS. If
argv[0] isn't a full pathname then execv is going to fail. While not
common for a FS system started by init, this is a common occurrence
when FS is started from the shell.
Now if execv fails, we'll try execvp. If that fails too then we'll
fall back on the normal reincarnation behavior.
Previously what would happen in that case is god would descend from
the heavens and become mortal. Leaving heaven absent, all hope for
reincarnation was lost.
(That is, we'd simply return from reincarnate_protect and the
supervisor process would become the new instance of FS, so the trick
would only work once.)
If you start freeswitch with -reincarnate or -reincarnate-reexec, FS
will restart automatically in the event of an unexpected exit.
Currently, you can cause FS to immediately call exit(0) with `fsctl
shutdown now`, or you can have it call abort() with `fsctl crash`.
Which are both nice, but if you have reincarnation engaged, you really
might want FS to call exit([non-zero]) so the great supervisor
immediately breathes life back into your system.
This is now available via `fsctl shutdown reincarnate now`.
For numbers with variable length, there should be a timeout to wait for
further digits before routing the number. This has been prepared with
the skinny-wait target, which waited forever. This patch implements the
digit timeout which routes the call after the timeout has elapsed. The
timeout can be configured in the mod_skinny XML settings
("digit-timeout") and defaults to 2 seconds.
This implementation has been requested and sponsored by Blackned GmbH.
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Nathan Neulinger <nneul@neulinger.org>
Brian and I decided to handle this by just stripping -ansi -pedantic
from the mod_perl build instead.
Revert "Since we can't tell if the system perl was built with
pedantic, we have a problem because we default debug enabled which
uses AX_CFLAGS_WARN_ALL_ANSI, For the GNU CC compiler it will be
-Wall (and -ansi -pedantic) The result is added to the shellvar being
CFLAGS by default. Which then gets included for building mod_perl,
Either way I think this is the correct corse of action to overcome
these new builds of mod_perl."
This reverts commit cb94340e26.