Commit Graph

32014 Commits

Author SHA1 Message Date
Friendly Automation fbeae922ab Merge "core/buildsystem: check the actual compiler being version" 2019-04-23 15:23:55 -05:00
Friendly Automation a9d541ea0f Merge "main/stasis.c: Added detail info for stasis show app cli" 2019-04-23 13:18:07 -05:00
Guido Falsi 8b7324ed3f core/buildsystem: check the actual compiler being version
Make compiler check use the output of the actual compiler being
used as reported by the CC variable, instead of unconditionally
running the "gcc" binary.  Also only run the check if the compiler
is gcc or a cross-compile gcc.

ASTERISK-28374

Change-Id: Icaacf6d93686ad21076878aa1504a23b4fc9d0f4
2019-04-22 07:05:33 -06:00
Lucas Mendes 4f69ea928a res_indications: Fix indications remove command autocomplete
We changed the validation of autocomplete parameter in the "indications
remove" command to avoid continue the execution of the command after
asking for autocomplete out of range parameters.

ASTERISK-28391
Reported by: lmendes86

Change-Id: I92b24131fd02f2e3c7fec966eea6f7a663310d40
2019-04-19 09:33:55 -06:00
Friendly Automation 3c106814d5 Merge "loader: support for permanent dlopen()" 2019-04-19 09:06:03 -05:00
Joshua Colp 9c070a4ae3 Merge "res_pjsip: Added a norefersub configuration setting" 2019-04-19 08:30:14 -05:00
George Joseph d4e25710f7 res_remb_modifier: Propertly initialize bitrate to 0.0
...and return the frame unaltered if bitrate can't be determined.

Change-Id: Ib2175ab84f85a3d7060d31625f5a2c7fbcc2ba4c
2019-04-18 08:04:11 -06:00
Friendly Automation 685223e704 Merge "res_mwi_devstate: Specify AST_MODFLAG_LOAD_ORDER to enable load priority" 2019-04-18 05:44:01 -05:00
Dan Cropp cffa2a74cb res_pjsip: Added a norefersub configuration setting
Added a new PJSIP global setting called norefersub.
Default is true to keep support working as before.

res_pjsip_refer:  Configures PJSIP norefersub capability accordingly.

Checks the PJSIP global setting value.
If it is true (default) it adds the norefersub capability to PJSIP.
If it is false (disabled) it does not add the norefersub capability
to PJSIP.

This is useful for Cisco switches that do not follow RFC4488.

ASTERISK-28375 #close
Reported-by: Dan Cropp

Change-Id: I0b1c28ebc905d881f4a16e752715487a688b30e9
2019-04-17 10:18:40 -05:00
sungtae kim 1d3272d4ed main/stasis.c: Added detail info for stasis show app cli
Currently, the "stasis show app" cli doesn't give detail
of subscription/subscriber information.
Added more printings to show details.

ASTERISK-28378

Change-Id: If25a6f14fe4f622bfb37462e891333da1fdf875f
2019-04-16 22:28:00 +02:00
Friendly Automation 0afd6128a7 Merge "pbx.c: Ignore dashes in extensions when using extenpatternmatchnew" 2019-04-16 11:38:52 -05:00
Friendly Automation 3f302e9788 Merge "app_voicemail: Don't split mailbox options on comma" 2019-04-16 11:37:09 -05:00
Sean Bright e69fcdfd83 res_mwi_devstate: Specify AST_MODFLAG_LOAD_ORDER to enable load priority
Suggested by abelbeck on the issue tracker.

ASTERISK~28384
Reported by: abelbeck

Change-Id: Icee0fff2b58dbfaa80f2b68270fe69dfb0463fc0
2019-04-16 10:05:19 -06:00
Benjamin Keith Ford 7757b7d6a6 Merge "build: Revise CHANGES and UPGRADE.txt handling." 2019-04-16 10:52:51 -05:00
Joshua Colp adc8aa8125 Merge "res_ael: Use Gosub in for loop expressions" 2019-04-16 08:11:28 -05:00
Joshua Colp ababac2393 Merge "ARI: Run 'make ari-stubs'" 2019-04-16 07:29:45 -05:00
Joshua Colp dd06912dfa Merge "res_ael: Fix pattern matching against literal '+'" 2019-04-16 07:25:40 -05:00
George Joseph 8a32b68038 CI: Move test group config files to Jenkins
One of the downaides of having things like test configuration
in the git repo is that it can't be changed at runtime.  You have
to create a review for the changes and merge it mefore it will
take effect.

This review moves the data currently held in
tests/CI/periodic-dailyTestGroups.json and
tests/CI/gateTestGroups.json into a Jenkins Config File attached
to the job definitions.  This allows us to alter it from the
Jenkins UI at runtime.  The original files stay in the repo
as documentation.

Change-Id: I14b9702f6285ce1fb2420287ba0e7d3b59109763
2019-04-15 06:51:35 -06:00
Sean Bright d58d7d4500 app_voicemail: Don't split mailbox options on comma
Because the per-mailbox options are the last thing on a line, don't look
for or stomp on any subsequent commas.

ASTERISK-27935 #close
Reported by: Sébastien Duthil

Change-Id: I07b2eb4a33c303d0c7114d5b906f8c067c60a153
2019-04-13 12:39:39 -06:00
George Joseph f5e6aa449d Merge "res_ael: Create consistent label names across reloads" 2019-04-12 14:16:31 -05:00
George Joseph 16c80b5a0d Merge "pbx.c: Properly parse labels with leading digits" 2019-04-12 14:16:10 -05:00
Sean Bright 7e5709d726 pbx.c: Ignore dashes in extensions when using extenpatternmatchnew
Because hyphens are not matched literally in Asterisk dialplan, we need
to ignore them in our candidate extensions as well.

ASTERISK-17695 #close
Reported by: test011

Change-Id: I227f02301577b1633e8a55b9fe9dc149935c03f0
2019-04-12 09:23:25 -06:00
Friendly Automation 61567ee4e8 Merge "app_voicemail: Cleanup stale lock files on module load" 2019-04-12 10:00:40 -05:00
Friendly Automation 232b25fd7e Merge "chan_ooh323: fix h323 log file path" 2019-04-12 09:19:15 -05:00
Sean Bright 63f86cac09 app_voicemail: Cleanup stale lock files on module load
If Asterisk crashes while a VM directory is locked, lock files in the VM
spool directory will not get properly cleaned up. We now clear them on
module load.

ASTERISK-20207 #close
Reported by: Steven Wheeler

Change-Id: If40ccd508e2f6e5ade94dde2f0bcef99056d0aaf
2019-04-12 07:14:04 -06:00
George Joseph 26cdf042f4 ARI: Run 'make ari-stubs'
An earlier contributor apparently forgot to run 'make ari-stubs'
before committing after making ARI model changes.

Change-Id: I7813e5638e2821d11f4b968dc2aeab4f725190a6
2019-04-12 06:37:23 -06:00
Sean Bright f827193424 res_ael: Create consistent label names across reloads
Reset the internal counter that the AEL2 compiler uses for unique label
names before compiling. This keeps dialplan labels consistent across
reloads assuming the AEL2 has not changed.

ASTERISK-17799 #close
Reported by: Kirill Katsnelson

Change-Id: I30b3cc887d1ee0644d3f341e2fef16f525d7fae5
2019-04-11 14:53:53 -06:00
Sean Bright f7f1a2cbb7 res_ael: Use Gosub in for loop expressions
In AEL2, if a 'for' statement contains macro* calls, like:

    for (&iterator(${TRY},A); "${A}" != ""; &iterate(A)) {

The AEL2 parser will translate these into calls to the deprecated Macro
dialplan application and use the antiquated pipe delimiter.

Instead, convert these into calls to the Gosub dialplan application and
use commas as argument separators.

ASTERISK-18593 #close
Reported by: Luke-Jr

* 'macro' in this context means AEL2 macros, not the 'Macro' application

Change-Id: I3d73716033b8e3e42e0209d355bf5f10c97045fc
2019-04-11 14:38:19 -06:00
Sean Bright 395c7ed5b7 res_ael: Fix pattern matching against literal '+'
When generating the regular expression that matches against existing
extensions, we need to escape literal characters that can also be
regular expression metacharacters. This was already being done for '*'
but we need to do the same for '+'.

In passing, remove some unreachable code - strcmp() is already run
immediately when entering extension_matches().

ASTERISK-14939 #close
Reported by: klaus3000

Change-Id: I8d2cccb3479168fba1b0a6704c52198b396468f1
2019-04-11 14:10:41 -06:00
Friendly Automation cb282d5c17 Merge "res_pjsip: Fix transport_states ref leak" 2019-04-11 14:58:41 -05:00
Sean Bright 2cf4e8bff9 pbx.c: Properly parse labels with leading digits
If the target of a Goto is a label that starts with a number, we
erroneously treat the leading digits as a priority.

ASTERISK-20182 #close
Reported by: Janu

Change-Id: Ia78408c0805a729103917247ecfc802f6fafc94b
2019-04-11 12:38:03 -06:00
Alexander Anikin a8f1e26d34 chan_ooh323: fix h323 log file path
Change h323 log path relative to AST_LOG_DIR instead of
/var/log/asterisk hardcoded
Add return back error message from OOH323EP initialize

ASTERISK-28348 #close

Reported by: Dmitry Shubin

Change-Id: Ib102dd36bbe6c2a7a4ce6870ae9110d9000d7e98
2019-04-10 17:12:42 -06:00
George Joseph dd32c0239f Merge "chan_pjsip: DTMF Mode auto_info fallback lead to both inband and info" 2019-04-10 12:42:56 -05:00
Alexei Gradinari fe58bc7bdf res_pjsip: Fix transport_states ref leak
Add missing ao2_ref(transport_state, -1) while iterate on a transport_states
container.

Change-Id: I40e35b5a339121300c80075c30db47201a6c374e
2019-04-10 08:37:49 -06:00
Joshua Colp a9bdbdc456 Merge "config.c: Fix a crash in extconfig parsing" 2019-04-10 06:40:54 -05:00
Ben Ford a4ab7f5f80 build: Revise CHANGES and UPGRADE.txt handling.
This changes the way that we handle adding changes to CHANGES and
UPGRADE.txt. The reason for this is because whenever someone needed to
make a change to one of these files and someone else had already done
so, you would run into merge conflicts. With this new setup, there will
never be merge conflicts since all changes will be documented in the
doc/<file>-staging directory. The release script is now responsible for
merging all of these changes into the appropriate files.

There is a special format that these files have to follow in order to be
parsed. The files do not need to have a meaningful name, but it is
strongly recommended. For example, if you made a change to pjsip, you
may have something like this "res_pjsip_relative_title", where
"relative_title" is something more descriptive than that. Inside each
file, you will need a subject line for your change, followed by a
description. There can be multiple subject lines. The file may look
something like this:

   Subject: res_pjsip
   Subject: Core

   A description that explains the changes made and why. The release
   script will handle the bulleting and section separators!

   You can still separate with new lines within your
   description.

The headers ("Subject" and "Master-Only") are case sensative, but the
value for "Master-Only" ("true" or "True") is not.

For more information, check out the wiki page:
https://wiki.asterisk.org/wiki/display/AST/CHANGES+and+UPGRADE.txt

ASTERISK-28111 #close

Change-Id: I19cf4b569321c88155a65e9b0b80f6d58075dd47
2019-04-09 09:45:04 -05:00
Friendly Automation b169482c95 Merge "CI: Add --no-dev-mode option to buildAsterisk.sh" 2019-04-08 10:59:54 -05:00
George Joseph 1ab20c5d91 Merge "stasis.c: Added topic_all container" 2019-04-08 10:53:18 -05:00
George Joseph 2f13cdd315 Merge "res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics" 2019-04-08 10:51:45 -05:00
Friendly Automation 6a83c99c36 Merge "main/json.c: Added app_name, app_data to channel type" 2019-04-08 10:32:16 -05:00
Chris-Savinovich 391112d89a config.c: Fix a crash in extconfig parsing
When extconfig.conf file is parsed, the code previously searched for
character comma without verifying if error (null or blank).  This caused
a segmentation error.

Change-Id: Id76b452d8f330d11c2742c37232761ad71472a8b
2019-04-05 15:41:40 -06:00
Salah Ahmed 5009d6d97a chan_pjsip: DTMF Mode auto_info fallback lead to both inband and info
When the dtmf_mode on an endpoint is configured as "auto_info"
Asterisk will produce an inband DTMF tone alongside an INFO
message when sending DTMF.

ASTERISK-28371

Change-Id: I1380b82f006e110a1b83fbb50c9873edd13a5d9a
2019-04-05 09:43:15 -06:00
Sebastian Kemper ccac55b894
loader: support for permanent dlopen()
Asterisk assumes that dlopen() will always run the constructor of a
shared library and every dlclose() will run its destructor. But dlopen()
may be permanent, meaning the constructor will only be run once, as is
the case with musl libc.

With a permanent dlopen() the Asterisk module loader does not work
correctly, because it's expectations regarding when the constructors and
destructors are run are not met. In fact a segmentation fault will occur
when the first module is "re-opened" that has AST_MODFLAG_GLOBAL_SYMBOLS
set (the dlopen() does not call the constructor, resource_being_loaded
is not set to NULL, then strlen is called with NULL instead of a string,
see issue ASTERISK-28319).

This commit adds code to the loader that will manually run the
constructors/destructors of the (non-builtin) modules where needed. To
achieve this a new ao2 container (linked list) is started and filled
with objects that contain the names of the modules and the pointers to
their respective info structs.

This behavior can be activated when configuring Asterisk
(--enable-permanent-dlopen). By default this is disabled, of course.

ASTERISK-28319 #close

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Change-Id: I86693a0ecf25d5ba81c73773a03df4abc3426875
2019-04-04 15:14:21 -04:00
Joshua Colp 2117153979 Merge "bridge_softmix: use a float type to store the internal REMB bitrate" 2019-04-04 08:52:47 -05:00
Joshua Colp 99648272e5 Merge "res/res_rtp_asterisk: Enable rxjitter calculation for video" 2019-04-04 08:32:07 -05:00
George Joseph 8ae9339f71 CI: Add --no-dev-mode option to buildAsterisk.sh
The new option disables dev mode, TEST_FRAMEWORK and
MALLOC_DEBUG making the build more production-like.

Change-Id: Ieb72497d4d91d5416684aaed702cc3f532099738
2019-04-03 16:56:46 -06:00
Ben Ford dd1cc7791c build: Fix compiler warnings/errors.
The compiler complained about a couple of variables that weren't
initialized but were being used. Initializing them to NULL resolves the
warnings/errors.

ASTERISK-28362 #close

Change-Id: I6243afc5459b416edff6bbf571b0489f6b852e4b
2019-04-03 09:36:51 -06:00
Kevin Harwell d1d0692858 bridge_softmix: use a float type to store the internal REMB bitrate
REMB's exponent is 6-bits (0..63) and has a mantissa of 18-bits. We were using
an unsigned integer to represent the bitrate. However, that type is not large
enough to hold all potential bitrate values. If the bitrate is large enough
bits were being shifted off the "front" of the mantissa, which caused the
wrong value to be sent to the browser.

This patch makes it so it now uses a float type to hold the bitrate. Using a
float allows for all bitrate values to be correctly represented.

ASTERISK-28255

Change-Id: Ice00fdd16693b16b41230664be5d9f0e465b239e
2019-04-02 10:32:59 -06:00
Friendly Automation 012706c6c5 Merge "pjproject: Add timer patch from pjproject r5934" 2019-04-02 10:15:21 -05:00
Sean Bright e8cf3693f6 app_queue: Fix a few member pause bugs
* Always set member->lastpause when setting member->paused

* Fixed typo (using member->lastcall instead of member->lastpause) in
  'queue show' output.

* Use a constant 'now' in 'queue show' output for a better point-in-time
  view of time based stats.

ASTERISK-27541 #close
Reported by: César Benjamín García Martínez

Change-Id: Ib41ced90cfdb66f9bb1e7b263d0f6fc1ac6e18fa
2019-03-29 07:16:57 -06:00