Commit Graph

31969 Commits

Author SHA1 Message Date
Joshua Colp
d734e1bbfa Merge "ARI: Run 'make ari-stubs'" into 16 2019-04-16 07:29:41 -05:00
Joshua Colp
95dac45148 Merge "res_ael: Fix pattern matching against literal '+'" into 16 2019-04-16 07:25:48 -05:00
George Joseph
18fe583d12 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:26 -06:00
George Joseph
03b6d18e99 Merge "res_ael: Create consistent label names across reloads" into 16 2019-04-12 14:16:27 -05:00
George Joseph
62cf7eae92 Merge "pbx.c: Properly parse labels with leading digits" into 16 2019-04-12 14:16:06 -05:00
George Joseph
a53f54856d Merge "app_voicemail: Cleanup stale lock files on module load" into 16 2019-04-12 11:10:03 -05:00
Friendly Automation
49b751d153 Merge "chan_ooh323: fix h323 log file path" into 16 2019-04-12 09:18:36 -05:00
Sean Bright
34b9b65098 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:13:56 -06:00
George Joseph
898765d919 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:33:10 -06:00
Sean Bright
116dc9c9b3 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:45 -06:00
Sean Bright
71c7864d1d 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:33 -06:00
Friendly Automation
fbed32a1a5 Merge "res_pjsip: Fix transport_states ref leak" into 16 2019-04-11 14:57:27 -05:00
Sean Bright
f91262272e 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:37:54 -06:00
Alexander Anikin
eec16b8e99 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-11 11:28:02 -06:00
George Joseph
b414cf09ac Merge "chan_pjsip: DTMF Mode auto_info fallback lead to both inband and info" into 16 2019-04-10 12:43:04 -05:00
Alexei Gradinari
acfbfef8ad 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 10:24:11 -04:00
Joshua Colp
0dde010f13 Merge "config.c: Fix a crash in extconfig parsing" into 16 2019-04-10 06:41:02 -05:00
George Joseph
0fb456d2ae Merge "CI: Add --no-dev-mode option to buildAsterisk.sh" into 16 2019-04-08 11:09:13 -05:00
George Joseph
1988cf795c Merge "stasis.c: Added topic_all container" into 16 2019-04-08 10:53:08 -05:00
Friendly Automation
777ee8290a Merge "main/json.c: Added app_name, app_data to channel type" into 16 2019-04-08 10:32:34 -05:00
Friendly Automation
90781674ad Merge "res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics" into 16 2019-04-08 10:05:36 -05:00
Chris-Savinovich
85bbb7a3e8 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 16:40:23 -05:00
Salah Ahmed
7e5b4b8616 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:42:25 -06:00
sungtae kim
d5a318f148 main/json.c: Added app_name, app_data to channel type
It was difficult to check the channel's current application and
parameters using ARI for current channels. Added app_name, app_data
items to show the current application information.

ASTERISK-28343

Change-Id: Ia48972b3850e5099deab0faeaaf51223a1f2f38c
2019-04-05 02:33:14 +02:00
Joshua Colp
4f0b8c3ed3 Merge "bridge_softmix: use a float type to store the internal REMB bitrate" into 16 2019-04-04 08:57:12 -05:00
Friendly Automation
b394eed481 Merge "res/res_rtp_asterisk: Enable rxjitter calculation for video" into 16 2019-04-04 08:33:43 -05:00
George Joseph
1464a6b80f 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:34 -06:00
Ben Ford
8961d9ca8b 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:42 -06:00
Kevin Harwell
94eeba6147 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 11:32:58 -05:00
George Joseph
5f21b5f3df Merge "pjproject: Add timer patch from pjproject r5934" into 16 2019-04-02 10:28:44 -05:00
Matthew Fredrickson
ae1aeb930e res/res_rtp_asterisk: Enable rxjitter calculation for video
It looks like we're not properly calculating jitter values on received
video streams.  This patch enables the code that does jitter calculations
for those streams.

Change-Id: Iaac985808829c8f034db8c57318789c4c8c11392
2019-04-02 08:53:54 -06:00
Sean Bright
6f5a6072ab 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 09:13:23 -04:00
Ben Ford
64279e5992 alembic: Fix errors during upgrade head.
When trying to upgrade using alembic, a couple different errors kept
popping up that prevented the upgrade. An additional parameter was
needed when changing the schema for mwi_subscribe_replaces_unsolicited
from an integer to an enum. When changing from a string to an enum, the
type needed to be cast for postgresql. The other issue was a parameter
being used during column creation that did not exist.

After fixing the upgrade process, it revealed errors with the downgrade
process. One was a variable not being defined in the downgrade function,
and the other was tables not existing when using MySQL. This was due to
a context check that should have encompassed MySQL, but in the end was
not doing so.

Change-Id: Ib4d70cf3ce5080023a50be496272a777b55d6c8e
2019-03-28 08:17:50 -06:00
George Joseph
bc06a13123 Merge "pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs" into 16 2019-03-28 08:04:31 -05:00
sungtae kim
5815597a21 stasis.c: Added topic_all container
Added topic_all container for centralizing the topic. This makes more
easier to managing the topics.

Added cli commands.
stasis show topics : It shows all registered topics.
stasis show topic <name> : It shows speicifed topic's detail info.

ASTERISK-28264

Change-Id: Ie86d125d2966f93de74ee00f47ae6fbc8c081c5f
2019-03-27 17:57:30 -06:00
Friendly Automation
eebc98fa44 Merge "manager: Use separate lock for session event notification." into 16 2019-03-27 17:42:56 -05:00
sungtae kim
bbc13b1f1f res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics
Added ARI resource for channel statistics.
GET /ari/channels/{channelId}/rtp_statistics : It returns given
channel's rtp statistics detail.

ASTERISK-28320

Change-Id: I4343eec070438cec13f2a4f22e7fd9e574381376
2019-03-27 15:07:26 -06:00
George Joseph
0bcbf97cb7 Merge "build: Add staging directories for future changes." into 16 2019-03-27 14:25:21 -05:00
Friendly Automation
5592ae465e Merge "app_queue: Fix documentation for QUEUE_MEMBER function." into 16 2019-03-27 13:32:59 -05:00
Ben Ford
636e301f91 build: Add staging directories for future changes.
This is the first step in changing the release process so that changes
made to the CHANGES and UPGRADE.txt files do not result in merge
conflicts every time multiple people modify these files. The changes
made will go in these new directories: doc/CHANGES-staging and
doc/UPGRADE-staging. The README.md files explain how things will work,
but here's a little overview. When you make a change that would go in
either CHANGES or UPGRADE.txt, this should instead be documented in a
new file in the doc/CHANGES-staging or doc/UPGRADE-staging directory,
respectively. The format will look like this:

   Subject: res_pjsip

   A description that explains the changes made and why. The release
   script will handle the bulleting and section separators! The
   'Subject:' header is case-sensitive.

   You can still separate with new lines within your description.

   Subject: res_ari
   Master-Only: true

   You can have more than one subject, and they don't have to be the
   same! Also, the 'Master-Only' header should always be true and is
   also case-sensitive (but the value is not - you can have 'true' or
   'True'). This header will only ever be present in the master branch.

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

This is an initial change for ASTERISK_28111. Functionally, this will
make no difference, but it will prep the directories for when the
changes from CHANGES and UPGRADE.txt are extracted.

Change-Id: I8d852f284f66ac456b26dcb899ee46babf7d15b6
2019-03-27 12:32:48 -06:00
Sean Bright
d4cd2a9706 pjproject: Add timer patch from pjproject r5934
ASTERISK-28161 #close
Reported by: Ross Beer

Change-Id: I65331d554695753005eaa66c1d5d4807fe9009c8
2019-03-27 08:09:50 -06:00
Friendly Automation
e1b0961fce Merge "chan_sip: Ensure 'qualifygap' isn't negative" into 16 2019-03-27 06:02:12 -05:00
Sean Bright
3e5b26ae0a app_queue: Fix documentation for QUEUE_MEMBER function.
It was a copy/paste of the QUEUE_MEMBER_COUNT function's synopsis.

ASTERISK-20986 #close
Reported by: Olivier Krief

Change-Id: If51ec481feb35824a4e78ab5600b197b819b10be
2019-03-26 15:57:04 -06:00
Friendly Automation
03c5b916ff Merge "res/res_ari: Added timestamp as a requirement for all ARI events" into 16 2019-03-26 08:52:45 -05:00
George Joseph
4ec943fdee Merge "res_config_odbc: set empty extended field as a single whitespace" into 16 2019-03-26 08:48:12 -05:00
Joshua Colp
4d8cd2efbe manager: Use separate lock for session event notification.
When notifying a manager session that new events were available
the same lock was used that was also held when doing things within
the session (such as sending events out). If the manager session
blocked for a period of time this would cause a back up of messages
in Stasis and would also block any other sessions from receiving
events.

This change adds a separate lock to the manager session which is
strictly used for notifying it that new events are available.

ASTERISK-28350

Change-Id: Ifbcac007faca9ad0231640f5e82a6ca9228f261b
2019-03-26 07:37:29 -06:00
Alexei Gradinari
e51bd0726b pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs
The next usage of PJSIP_PARSE_URI will crash asterisk
${PJSIP_PARSE_URI(tel:+1234567890,host)}
or
${PJSIP_PARSE_URI(192.168.1.1:5060,host)}

The function pjsip_parse_uri successfully parses then, but returns
struct pjsip_other_uri *.

This patch restricts parsing only SIP/SIPS URIs.

Change-Id: I16f255c2b86a80a67e9f9604b94b129a381dd25e
2019-03-25 19:17:02 -04:00
sungtae kim
6d455487d9 res/res_ari: Added timestamp as a requirement for all ARI events
Changed to requirement to having timestamp for all of ARI events.
The below ARI events were changed to having timestamp.
PlaybackStarted, PlaybackContinuing, PlaybackFinished,
RecordingStarted, RecordingFinished, RecordingFailed,
ApplicationReplaced, ApplicationMoveFailed

ASTERISK-28326

Change-Id: I382c2fef58f5fe107e1074869a6d05310accb41f
2019-03-25 14:09:18 -06:00
Sean Bright
d905602a04 chan_sip: Ensure 'qualifygap' isn't negative
Passing negative intervals to the scheduler rips a hole in the
space-time continuum.

ASTERISK-25792 #close
Reported by: Paul Sandys

Change-Id: Ie706f21cee05f76ffb6f7d89e9c867930ee7bcd7
2019-03-25 13:32:38 -06:00
Alexei Gradinari
634314c727 res_config_odbc: set empty extended field as a single whitespace
If Realtime @ variable value is NULL or empty or contains only whitespaces
then when we try to retrieve it using PJSIP_ENDPOINT we get WARNING
pjsip_endpoint_function_read: Unknown property @my_var for PJSIP endpoint.
And the variable is missing in the result of CLI pjsip show endpoint.

This patch keeps empty sorcery extended field.

ASTERISK-28341 #close

Change-Id: I221fccc04cbfa2be17ce971f64ae0e74e465eea0
2019-03-25 12:43:25 -04:00