Commit Graph

30864 Commits

Author SHA1 Message Date
Sean Bright
cc954977eb vector: Add AST_VECTOR_COMPACT() to reclaim wasted space
This might be useful in situations where you are loading an undetermined number
of items into a vector and don't want to keep (potentially) 2x the necessary
memory around indefinitely.

Change-Id: I9711daa0fe01783fc6f04c5710eba84f2676d7b9
2019-03-15 16:03:03 -04:00
Friendly Automation
3df8d605cc Merge "AMI/ARI: Bump non-breaking version numbers" into 13 2019-03-14 09:42:24 -05:00
Joshua C. Colp
c7d58aec7a Merge "stasis: Improve topic/subscription names and statistics." into 13 2019-03-14 09:21:38 -05:00
Joshua C. Colp
9b5136ddc3 Merge "stasis: Allow empty application arguments to move." into 13 2019-03-13 11:33:37 -05:00
Kevin Harwell
5d67b8b144 Merge "app_queue: fix ring_entry to access nativeformats with a channel lock" into 13 2019-03-13 11:17:30 -05:00
Kevin Harwell
9717d1672c Merge "chan_dahdi: Add logical group at DAHDIChannel event and CHANNEL function" into 13 2019-03-13 10:55:01 -05:00
Joshua Colp
f0254cc1e9 stasis: Allow empty application arguments to move.
Change-Id: I1e4d37415f3034abe36496dc30209c2303e6af5c
2019-03-13 10:55:37 -03:00
Joshua C. Colp
aa9091dcdd Merge "partial-inlining: disable partial-inlining if gcc>=8.2.1" into 13 2019-03-13 06:41:43 -05:00
Joshua C. Colp
aa0ff97c3b Merge "Makefile.moddir_rules: Pass PJPROJECT_BUNDLED to download_externals" into 13 2019-03-13 06:03:12 -05:00
Dömsödi Gergely
92d1889813 app_queue: fix ring_entry to access nativeformats with a channel lock
Fixes an intermittent segmentation fault which occured when accessing
nativeformats of a channel which entered into a queue.

ASTERISK-27964
Reported by: Francisco Seratti

Change-Id: Ic87fa7a363f3b487c24ce07032f4b2201c22db9e
2019-03-13 04:49:34 -06:00
Joshua C. Colp
48e64c5dc2 Merge "res/res_rtp_asterisk.c: Fixing possible divide by zero" into 13 2019-03-13 05:37:04 -05:00
Kevin Harwell
a96729c1cd AMI/ARI: Bump non-breaking version numbers
Increasing the non-breaking AMI and ARI version numbers due to changes and
additions in those API's. Note, some changes may be forthcoming (will be added
between now and the next release of Asterisk), thus not listed here. As well
a few changes listed below may have been released in a previous release of
Asterisk, but the API version numbers were not increased at that time, so
including here.

AMI:

 * res_pjsip: option for ContactStatus event updates - 4a8564c

ARI:

 * bridging: Add creation timestamps - 4dd4dbd
 * res_stasis: Add ability to switch applications - 65170ba
 * ARI event type filtering - da93d17
 * Added ARI resource /ari/asterisk/ping - 67d587f

ASTERISK-28314

Change-Id: I96951b19c27c196e410b09fe82b00c8ca328cccc
2019-03-12 15:57:47 -05:00
George Joseph
ee75df6ec9 Makefile.moddir_rules: Pass PJPROJECT_BUNDLED to download_externals
The download_externals script wasn't getting the PJPROJECT_BUNDLED
environment variable passed down to it so it wasn't downloading
the appropriate variant of res_digium_phone.  This could cause
crashes in the DPMA.

Change-Id: I5daa9369c7af1fd556d892e89a85f279a2533425
2019-03-12 12:25:33 -06:00
Chris-Savinovich
29d2d22e82 partial-inlining: disable partial-inlining if gcc>=8.2.1
Apply flag -fno-partial-inlining on default optimization if and only if
gcc version >= 8.2.1 (this is the current ver on Fedora and Ubuntu).
This is done to avoid a bug that causes arithmetic calculations to fail
if the following conditions are met:
1. TEST_FRAMEWORK on
2. DONT_OPTIMIZE off
3. Fedora and Ubuntu
4. GCC 8.2.1
5. There must exist a certain combination of multithreading.
6. Optimization level -O2 and -O3
7. Flag -fpartial-inline activated (default when optimization level>=2)
The following link points to a similar gcc bug reported in 2015. This leads me
to believe the bug has regressed. Note I am not able to replicate this bug
in an environment other than Asterisk + Test Framework + Test_cel because the
multithreading combination that causes it seems to be unique. Therefore I
am temporarily abandoning any thoughts of reporting the new occurrence of this
bug to gcc.gnu.org.  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65307

Change-Id: Ibd1afe60e0a38b88e85fdcd9b051004601c2f102
2019-03-11 11:21:21 -06:00
George Joseph
ce0d50541d Merge "app_meetme: Don't mute joining admins if conference is muted" into 13 2019-03-11 09:48:35 -05:00
Joshua Colp
07b3253155 stasis: Improve topic/subscription names and statistics.
Topic names now follow: <subsystem>:<functionality>[/<object>]

This ensures that they are all unique, and also provides better
insight in to what each topic is for.

Subscriber ids now also use the main topic name they are
subscribed to and an incrementing integer as their identifier to
make it easier to understand what the subscription is primarily
responsible for.

Both the CLI commands for listing topic and subscription statistics
now sort to make it a bit easier to see what is going on.

Subscriptions will now show all topics that they are receiving messages
from, not just the main topic they were subscribed to.

ASTERISK-28335

Change-Id: I484e971a38c3640f2bd156282e532eed84bf220d
2019-03-11 11:39:08 -03:00
Friendly Automation
4f6daa0aff Merge "chan_pjsip: add a flag to ignore 183 responses if no SDP present" into 13 2019-03-11 08:49:46 -05:00
sungtae kim
4bdf24a689 res/res_rtp_asterisk.c: Fixing possible divide by zero
Currently, when the Asterisk calculates rtp statistics, it uses
sample_count as a unsigned integer parameter. This would be fine
for most of cases, but in case of large enough number of sample_count,
this might be causing the divide by zero error.

ASTERISK-28321

Change-Id: If7e0629abaceddd2166eb012456c53033ea26249
2019-03-11 06:09:47 -06:00
Torrey Searle
cbc704c5ec chan_pjsip: add a flag to ignore 183 responses if no SDP present
chan_sip will always ignore 183 responses that do not contain SDP
however, chan_pjsip will currently always translate it into a
183 with SDP.  This new flag allows chan_pjsip to have the same
behavior as chan_sip.

ASTERISK-28322 #close

Change-Id: If81cfaa17c11b6ac703e3d71696f259d86c6be4a
2019-03-08 13:13:03 -06:00
George Joseph
2c90b92da9 Merge "samples: Fix comment typo in pjsip.conf.sample" into 13 2019-03-08 12:44:20 -06:00
George Joseph
c3189a696e Merge "res_stasis: Add ability to switch applications." into 13 2019-03-08 12:43:13 -06:00
Friendly Automation
b5c0526443 Merge "Replace calls to strtok() with strtok_r()" into 13 2019-03-08 12:40:03 -06:00
Friendly Automation
db18f8c959 Merge "bridging: Add creation timestamps" into 13 2019-03-08 11:15:13 -06:00
Sean Bright
b4bba8f217 app_meetme: Don't mute joining admins if conference is muted
ASTERISK-28328 #close

Change-Id: I4f6069fb34923b7521520c2a205a1e56227e592b
2019-03-07 18:15:05 -05:00
Sean Bright
1cb6466268 Replace calls to strtok() with strtok_r()
strtok() uses a static buffer, making it not thread safe.

Change-Id: Icce265153e1e65adafa8849334438ab6d190e541
2019-03-07 16:42:10 -06:00
Sean Bright
9a4027ad41 samples: Fix comment typo in pjsip.conf.sample
Change-Id: I84a45c3d9fd26ca61aca99927eec83b57f1de857
2019-03-07 17:05:42 -05:00
Ben Ford
65170ba8f0 res_stasis: Add ability to switch applications.
Added the ability to move between Stasis applications within Stasis.
This can be done by calling 'move' in an application, providing (at
minimum) the channel's id and the application to switch to. If the
application is not registered or active, nothing will happen and the
channel will remain in the current application, and an event will be
triggered to let the application know that the move failed. The event
name is "ApplicationMoveFailed", and provides the "destination" that the
channel was attempting to move to, as well as the usual channel
information. Optionally, a list of arguments can be passed to the
function call for the receiving application. A full example of a 'move'
call would look like this:

client.channels.move(channelId, app, appArgs)

The control object used to control the channel in Stasis can now switch
which application it belongs to, rather than belonging to one Stasis
application for its lifetime. This allows us to use the same control
object instead of having to tear down the current one and create
another.

ASTERISK-28267 #close

Change-Id: I43d12b10045a98a8d42541889b85695be26f288a
2019-03-07 04:42:35 -06:00
cirillor
5065f31fca chan_dahdi: Add logical group at DAHDIChannel event and CHANNEL function
Add logical group at DAHDIChannel event
and create "dahdi_group" at CHANNEL function.

ASTERISK-28317

Change-Id: Ic1f834cd53982a9707a9748395ee746d6575086a
2019-03-05 12:01:24 -03:00
Friendly Automation
856f3e6895 Merge "sip_to_pjsip: Make multiline comment parsing consistent with Asterisk" into 13 2019-03-05 08:54:09 -06:00
Friendly Automation
0f51ee7d38 Merge "app_queue: Handle empty 'interface' in queue member config" into 13 2019-03-05 08:51:07 -06:00
Joshua Colp
7fb2a34edb Merge "res_pjsip_registrar: blocked threads on reliable transport shutdown take 3" into 13 2019-03-05 07:06:58 -06:00
Friendly Automation
a103faca52 Merge "basic-pbx: Update configuration to work with current modules." into 13 2019-03-05 06:46:07 -06:00
Sean Bright
cb6a976656 app_queue: Handle empty 'interface' in queue member config
While the 'interface' column is a NOT NULL, the empty string is still
allowed. res_config_odbc treats the empty string as a NULL and we crash
when trying to dereference.

Also cleaned up an adjacent error message for consistency.

ASTERISK-28168 #close

Change-Id: I55e012b540fbcda99bb40bede3099b7ae5db8202
2019-03-04 17:07:22 -05:00
Sean Bright
7bcbc0bdfd sip_to_pjsip: Make multiline comment parsing consistent with Asterisk
In Asterisk configuration, a multiline comment starts with ;-- as long as it is
not followed by another dash (i.e. ;--- is not a multiline comment).

ASTERISK-28323 #close

Change-Id: I32dc38e0fac01d3c0805d27d35d2365a7c37ca72
2019-03-04 13:39:23 -06:00
Friendly Automation
509e37d05e Merge "res_pjsip_diversion: Use static pj_str_t for Diversion header names" into 13 2019-03-04 05:47:54 -06:00
Joshua Colp
1f3d6e1ebf basic-pbx: Update configuration to work with current modules.
The res_pjsip_websocket module requires the res_http_websocket
module so ensure it is loaded. As well the res_pjsip_notify
module needs the pjsip_notify.conf configuration file so
ensure it is installed.

ASTERISK-28272

Change-Id: I261659b84e7a6ac4cb49990d9badb4b2ad01bacd
2019-03-04 10:58:06 +00:00
sungtae kim
4dd4dbddbb bridging: Add creation timestamps
This small feature will help to checking the bridge's status to
figure out which bridge is in old/zombie or not. Also added
detail items for the 'bridge show *' cli to provide more detail
info. And added creation item to the ARI as well.

ASTERISK-28279

Change-Id: I460238c488eca4d216b9176576211cb03286e040
2019-03-03 14:10:28 +01:00
Sean Bright
5821090661 res_pjsip_diversion: Use static pj_str_t for Diversion header names
PJSIP assumes that these header names are not allocated, and does not
clone the name strings when reusing headers.

Block unload of res_pjsip_diversion until shutdown to ensure static
memory stays valid.

ASTERISK-28312 #close

Change-Id: Ibd6ea55ec4a604bbd43ac07f8d0b54da2c39b8b9
2019-03-01 17:43:59 -05:00
Kevin Harwell
7e8833cc1c Merge "res_config_odbc: Avoid deadlock when max_connections = 1" into 13 2019-03-01 16:21:16 -06:00
Friendly Automation
cdcba0d1b5 Merge "menuselect: Add license header to menuselect_gtk.c" into 13 2019-03-01 15:00:57 -06:00
Friendly Automation
f0363d7ea8 Merge "Revert "pjsip_message_filter: Only do interface lookup for wildcard addresses."" into 13 2019-03-01 08:02:13 -06:00
Sean Bright
aa8ab603b0 menuselect: Add license header to menuselect_gtk.c
This file was added to the Subversion repository on 2007-03-15 by
Russell Bryant, a Digium employee at the time.

ASTERISK-24173 #close

Change-Id: Ie866fa9d31d550467613d362b35b03c031ee594d
2019-02-28 16:38:21 -05:00
Sean Bright
c38c8db14a res_config_odbc: Avoid deadlock when max_connections = 1
Rather than calling ast_odbc_find_table() in the prepare callback, call
it beforehand and pass it in to the callback to avoid the need for a
second connection.

ASTERISK-28166 #close

Change-Id: I6f8a0b9990d636fd6bc1a92ed70f7050d2436202
2019-02-28 14:46:01 -06:00
Friendly Automation
c4a172efba Merge "Revert "http.c: Support separated HTTP request"" into 13 2019-02-28 08:37:04 -06:00
Joshua Colp
2c04996106 Merge "res_pjsip_config_wizard: Don't crash if misconfigured" into 13 2019-02-28 08:03:09 -06:00
Sean Bright
1b3a489204 Revert "pjsip_message_filter: Only do interface lookup for wildcard addresses."
This reverts commit d524ad523d.

Reason for revert: This causes Contact and Via headers to have the wrong
transport address.

ASTERISK-28309 #close

Change-Id: Ibba4d6176f68e39279fcd9a545f81d56e747bed8
2019-02-28 06:57:31 -06:00
Joshua Colp
70391dc515 Merge "res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen" into 13 2019-02-28 06:06:22 -06:00
Joshua Colp
2f4a15101b Revert "http.c: Support separated HTTP request"
This reverts commit 148ddfba9a.

Reason for revert: Under 13 this change appears to break HTTP
body processing, causing test failures and problems.

Change-Id: Ica47ca2cac1b21c6ef907c1ffbfaf2cebdea8e80
2019-02-28 05:28:00 -06:00
Joshua Colp
9598c210fa Merge "res_mwi_devstate.c: New module to allow presence subs to VM boxes" into 13 2019-02-28 05:04:12 -06:00
Sean Bright
85b1f8f886 res_pjsip_config_wizard: Don't crash if misconfigured
If both send_registrations and send_auth are both set to yes,
outbound_auth/username must be set or we crash.

ASTERISK-27992 #close

Change-Id: I6418d56de1ae53f80393b314c2584048fbf7f11d
2019-02-27 20:53:51 -05:00