Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Added needed UTF-8 checks before constructing json objects in various
files for strings obtained outside the system. In this case string values
from a channel driver's peer and not from the user setting channel
variables.
* aoc.c: Fixed type mismatch in s_to_json() for time and granularity json
object construction.
ASTERISK-26466
Reported by: Richard Mudgett
Change-Id: Iac2d867fa598daba5c5dbc619b5464625a7f2096
|
|
* Updated unit test as ast_json_name_number() is now NULL tolerant.
ASTERISK-26466 #close
Reported by: Richard Mudgett
Change-Id: I7d4e14194f8f81f24a1dc34d1b8602c0950265a6
|
|
Since the json library does not make the check function public we
recreate/copy the function in our interface module.
ASTERISK-26466
Reported by: Richard Mudgett
Change-Id: I36d3d750b6f5f1a110bc69ea92b435ecdeeb2a99
|
|
* In s_to_json() removed unnecessary ast_json_ref() to ast_json_null()
when creating the type json object. The ref is a noop.
Change-Id: I2be8b836876fc2e34a27c161f8b1c53b58a3889a
|
|
audiohooks" into 13
|
|
* Compile __ast_assert_failed unconditionally.
* Use __ast_assert_failed to log messages from log_bad_ao2
* Remove calls to ast_assert(0) that happen after log_bad_ao2 was run.
Change-Id: I48f1af44b2718ad74a421ff75cb6397b924a9751
|
|
The main frame read and write handlers in main/channel.c don't use the
optimum placement in the processing flow for calling audiohooks
callbacks, as far as codec translation is concerned. This change places
the audiohooks callback code:
* After the channel read translation if the frame is not linear before
the translation, thereby increasing the chance that the frame is linear
as required by audiohooks
* Before the channel write translation if the frame is linear at this
point
This prevents the audiohooks code from instantiating additional
translation paths to/from linear where a linear frame format is already
available, saving valuable CPU cycles
ASTERISK-26419
Change-Id: I6edd5771f0740e758e7eb42558b953f046c01f8f
|
|
mailboxes" into 13
|
|
Users upgrading from asterisk 13.5 to a later version and who use
realtime with peers that have mailboxes were experiencing runaway
situations that manifested as a continuous stream of taskprocessor
congestion errors, memory leaks and an unresponsive chan_sip.
A related issue was that setting rtcachefriends=no NEVER worked in
asterisk 13 (since the move to stasis). In 13.5 and earlier, when a
peer tried to register, all of the stasis threads would block and
chan_sip would again become unresponsive. After 13.5, the runaway
would happen.
There were a number of causes...
* mwi_event_cb was (indirectly) calling build_peer even though calls to
mwi_event_cb are often caused by build_peer.
* In an effort to prevent chan_sip from being unloaded while messages
were still in flight, destroy_mailboxes was calling
stasis_unsubscribe_and_join but in some cases waited forever for the
final message.
* add_peer_mailboxes wasn't properly marking the existing mailboxes
on a peer as "keep" so build_peer would always delete them all.
* add_peer_mwi_subs was unsubscribing existing mailbox subscriptions
then just creating them again.
All of this was causing a flood of subscribes and unsubscribes on
multiple threads all for the same peer and mailbox.
Fixes...
* add_peer_mailboxes now marks mailboxes correctly and build_peer only
deletes the ones that really are no longer needed by the peer.
* add_peer_mwi_subs now only adds subscriptions marked as "new" instead
of unsubscribing and resubscribing everything. It also adds the peer
object's address to the mailbox instead of its name to the subscription
userdata so mwi_event_cb doesn't have to call build_peer.
With these changes, with rtcachefriends=yes (the most common setting),
there are no leaks, locks, loops or crashes at shutdown.
rtcachefriends=no still causes leaks but at least it doesn't lock, loop
or crash. Since making rtcachefriends=no work wasnt in scope for this
issue, further work will have to be deferred to a separate patch.
Side fixes...
* The ast_lock_track structure had a member named "thread" which gdb
doesn't like since it conflicts with it's "thread" command. That
member was renamed to "thread_id".
ASTERISK-25468 #close
Change-Id: I07519ef7f092629e1e844f855abd279d6475cdd0
|
|
|
|
When retrieving presence state information there is no
guarantee that the subtype and message passed in are
set to NULL. This change ensures they are.
ASTERISK-26397 #close
Change-Id: I61f8187972d5d8bbd7d6b7f4daa4f4f7e8237b23
|
|
|
|
|
|
restart." into 13
|
|
Move the function outside the conditional block that excludes
LOW_MEMORY.
ASTERISK-26273 #close
Change-Id: Ic290fa128222c410c3531107e30efacabc8493b4
|
|
When logger.conf is missing or invalid we should be printing notices,
warnings and errors to the console. The logmask was incorrectly
calculated.
Change-Id: Ibaa9465a8682854bc1a5e9ba07079bea1bfb6bb3
|
|
sd_notify() is used to notify systemd of changes to the status of the
process. This allows the systemd daemon to know when the process
finished loading (and thus only start another program after Asterisk has
finished loading).
To use this, use a systemd unit with 'Type=notify' for Asterisk.
This commit also adds the function ast_sd_notify(), a wrapper around
sd_notify that does nothing if not built with systemd support.
Also adds support for libsystemd detection in the configure script.
Change-Id: Ied6a59dafd5ef331c5c7ae8f3ccd2dfc94be7811
(cherry picked from commit 07b95f7c65b7c083724f1af2b26f93cc22cad58c)
|
|
Without this change, a 'core restart' would kill the astcanary forever
if you're not running as root. Both with and without this patch, the
scheduling priority was still SCHED_RR after restart.
Additionally, the astcanary is now spawned if you start with high
priority and Asterisk doesn't get a chance to lower it. For example
through: `chrt -r 10 sudo -u asterisk asterisk -c`
Also reap killed astcanary processes on core restart.
ASTERISK-26352 #close
Change-Id: Iacb49f26491a0717084ad46ed96b0bea5f627a55
|
|
threads." into 13
|
|
Previously only the canary checking thread itself had its priority set
to SCHED_OTHER. Now all threads are traversed and adjusted.
ASTERISK-19867 #close
Reported by: Xavier Hienne
Change-Id: Ie0dd02a3ec42f66a78303e9c1aac28f7ed9aae39
|
|
If sysinfo() is available, but not sysctl() or swapctl() the
printing code for swap buffer sizes is incorrectly omitted.
The above condition happens with musl c-library.
Fix #if rule to consider defined(HAVE_SYSINFO). And also
remove the redundant || defined(HAVE_SYSCTL) which was
incorrectly there to start with. Now swap information is
displayed only if an actual libc function to get it is
available.
This also fixes warnings previously seen with musl libc:
[CC] asterisk.c -> asterisk.o
asterisk.c: In function 'handle_show_sysinfo':
asterisk.c:773:6: warning: variable 'totalswap' set but not used
[-Wunused-but-set-variable]
int totalswap = 0;
^~~~~~~~~
asterisk.c:770:11: warning: variable 'freeswap' set but not used
[-Wunused-but-set-variable]
uint64_t freeswap = 0;
^~~~~~~~
Change-Id: I1fb21dad8f27e416c60f138c6f2bff03fb626eca
|
|
Currently when receiving video over RTP we store only
a calculated samples on the frame. When starting the video
it can take some time for this calculation to actually yield
a value as it requires constant changing timestamps. As well
if a video frame passes over multiple RTP packets this calculation
will fail as the timestamp is the same as the previous RTP
packet and the number of samples calculated will be 0.
This change preserves the timestamp on the frame and allows
it to pass through the core. When sending the video this timestamp
is used instead of a new one being calculated.
ASTERISK-26367 #close
Change-Id: Iba8179fb5c14c9443aee4baf670d2185da3ecfbd
|
|
* Make ast_format_cap_get_names() NULL tolerant.
ASTERISK-26331 #close
Reported by: CGI.NET
Change-Id: Id67e93936dc8ec2a33a9d33655843d43b59285a3
|
|
Previously, if context A was including context B and context B was including
context A, i.e. if there was a circular dependency between contexts, then
calling manager_show_dialplan_helper could lead to an infinite recursion,
resulting in a crash.
This commit applies the same solution as the one implemented in the
show_dialplan_helper function. The manager_show_dialplan_helper and
show_dialplan_helper functions contain lots of code in common, but the former
was missing the "infinite recursion avoidance" code.
ASTERISK-26226 #close
Change-Id: I1aea85133c21787226f4f8442253a93000aa0897
|
|
|
|
In your Diaplan, if you specify
same => n,Set(CHANNEL(secure_bridge_media)=1)
same => n,Set(CHANNEL(secure_bridge_signaling)=1)
only the SIP channel driver chan_sip supports this. All other channels drivers
like res_pjsip fail. In case of failure, the original sRTP source code released
the whole channel, even if not hung-up, yet. This change does not release the
channel but instead hangs-up the channel.
ASTERISK-26306
Change-Id: I0489f0cb660fab6673b0db8af027d116e70a66db
|
|
The framehook container could become corrupted if the channel lock is not
held before calling.
Change-Id: I1a6b957a1f7b899eb29a186915f8cccab886a438
|
|
MALLOC_DEBUG should not be used to check if debugging is actually
enabled, __AST_DEBUG_MALLOC should be used instead. MALLOC_DEBUG only
indicates that debugging is requested, __AST_DEBUG_MALLOC indicates it
is active.
Change-Id: I3ce9cdb6ec91b74ee1302941328462231be1ea53
|
|
updated the uri handler to include the url prefix of the http server
this enables res_ari to add it to the uris when generating docs
Change-Id: I279335a2625261a8492206c37219698f42591c2e
|
|
|
|
|
|
|
|
|
|
into 13
|
|
This updates func_channel.c and main/message.c to use a generic xpointer
include instead of including info from each channel driver. Now the
name attribute of info is CHANNEL or CHANNEL_EXAMPLES to be included in
documentation for func_channel. Setting the name attribute of info to
MessageToInfo or MessageFromInfo causes it to be included in the
MessageSend application and AMI action.
Change-Id: I89fd8276a3250824241a618009714267d3a8d1ea
|
|
together" into 13
|
|
and apps" into 13
|
|
|
|
into 13
|
|
|
|
* Remove some unused parameters from internal functions:
sorcery_wizard_create()
sorcery_wizard_update()
sorcery_wizard_delete()
* Created the struct sorcery_observer_invocation ao2 object without a lock
since it is not needed in sorcery_observer_invocation_alloc().
* Cleanup generic ao2 container sorcery object id hash, sort, and cmp
functions.
Change-Id: Iff71d75f52bc1b8cee955456838c149faaa4f92e
|
|
* Tweak sorcery_object_type_alloc() formatting.
* Tweak ast_sorcery_init() formatting.
Change-Id: Ib02430023f15268cd7a2ea53f2c331213e4d3944
|
|
Do not check registrar of the first extension head. We should only check
the registrar when we match the priority.
Additionally fix a couple calls to strcmp which used the input callerid
instead of the clean version ex.cidmatch.
ASTERISK-26233
Change-Id: I17ea6881a18f40840ae9c1f5394aab1fbb3769f1
|
|
The Exchanging Device and Mailbox States could not working
if the Entity ID (EID) is not set manually and can't be obtained
from ethernet interface.
This patch replaces debug message to warning
and addes missing description about option 'entityid' to
asterisk.conf.sample.
With this patch the asterisk also:
(1) decline loading the modules which won't work without EID:
res_corosync and res_pjsip_publish_asterisk.
(2) warn if EID is empty on loading next modules:
pbx_dundi, res_xmpp
Starting with v197 systemd/udev will automatically assign "predictable"
names for all local Ethernet interfaces.
This patch also addes some new ethernet prefixes "eno" and "ens".
ASTERISK-26164 #close
Change-Id: I72d712f1ad5b6f64571bb179c5cb12461e7c58c6
|
|
Change-Id: Idbac539205aa732bf786c4f765577d8e9ff28ba4
|
|
Change-Id: I67e6b79fa3102e494b5fe6cc7510472249080e85
|
|
Change-Id: Iea89a36222712148c1775c05ed0ad1049d67a70e
|