Commit Graph

30829 Commits

Author SHA1 Message Date
Friendly Automation
a103faca52 Merge "basic-pbx: Update configuration to work with current modules." into 13 2019-03-05 06:46:07 -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
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
George Joseph
5ce084579f CI: Update jenkinsfiles with new Gerrit URLs
The recent upgrade of Gerrit to 2.16 elimiated referencing a
repository in a way the jenkinsfiles were relying on so
the URL references were changed to a more consistent and supported
format.

Change-Id: I2e8e3f213b9a96bb1b27665eca4a9a24bc49820e
2019-02-27 09:37:14 -07:00
Joshua C. Colp
a8d4f56c25 Merge "rest-api-templates/asterisk_processor - replace http line breaks with line feed" into 13 2019-02-26 09:28:05 -06:00
George Joseph
4aa55a8ca6 res_mwi_devstate.c: New module to allow presence subs to VM boxes
This module allows presence subscriptions to voicemail boxes.  This
allows common BLF keys to act as voicemail waiting indicators.

ASTERISK-28301

Change-Id: I62a246c24f3d7d432e33e22d7a4a57c15c292fdd
2019-02-26 07:31:39 -07:00
Torrey Searle
e9bd8c4204 res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen
Delivery timeval in the smoother object will fall behind while a DTMF is
being generated.  This can eventually lead to invalid rtp timestamps.
To prevent this from happening the smoother needs to be reset after every
DTMF to keep the timing up to date.

ASTERISK-28303 #close

Change-Id: Iaba3f7b428ebd72a4caa90e13b829ab4f088310f
2019-02-26 08:12:03 -06:00
Joshua C. Colp
600db408c7 Merge "http.c: Support separated HTTP request" into 13 2019-02-26 07:37:50 -06:00
Joshua C. Colp
9921262c85 Merge "taskprocessor: Enable subsystems and overload by subsystem" into 13 2019-02-26 07:03:54 -06:00
Joshua C. Colp
d4060756e7 Merge "res_ari_applications: Fix incorrect call to ao2_lock." into 13 2019-02-26 06:28:32 -06:00
Friendly Automation
55419d3996 Merge "Core: Increase AST_PBX_MAX_STACK to 512 if not LOW_MEMORY" into 13 2019-02-26 06:00:04 -06:00
Kevin Harwell
ec7f92c4ef rest-api-templates/asterisk_processor - replace http line breaks with line feed
Including line breaks (<br>, <br/>, <br />) in certain parts of the rest-api
json definition (e.g. summary, notes) displays them correctly in swagger.
However, when the field gets converted to the wiki format those breaks get
escaped and show up in the text as the actual string literal "<br>" etc...

This patch makes it so when converting to the wiki format it replaces all line
break values (<br>, etc...) with line feeds ('\n').

Change-Id: Ie1c9faa0d1c5d622804cc0a21ce769095b08aa3d
2019-02-25 17:31:27 -06:00
Joshua C. Colp
9c94c027cd res_ari_applications: Fix incorrect call to ao2_lock.
When listing the applications the apps lock was incorrectly
locked twice instead of being locked and then unlocked.

ASTERISK-28302

Change-Id: If7d064592a9e88c0f1049214c50e02be6dabf79e
2019-02-25 08:10:59 -04:00
Sungtae Kim
148ddfba9a http.c: Support separated HTTP request
Currently, the Asterisk does not support seperated HTTP request.
This patch make the Asterisk enables to wait lest part of HTTP request.
Also increases acceptable HTTP body length to 40k to support more
larger request.

ASTERISK-28236

Change-Id: I48a401aa64a21c3b37bf3cb4e0486d64b7dd8aa1
2019-02-20 22:44:33 +01:00
George Joseph
23ffc3af5c Core: Increase AST_PBX_MAX_STACK to 512 if not LOW_MEMORY
The current settings AST_PBX_MAX_STACK is 128 entries which is
too low for some FreePBX installations with complex parking
arrangements.  Increased to 512 if LOW_MEMORY is not defined.

ASTERISK-28300

Change-Id: I7c4b540bc92e6642df0f3da639b003f7da8b1299
2019-02-20 11:51:25 -07:00
Joshua C. Colp
82758295df stasis: Store subscriber uniqueids with topic statistics.
This change provides an easier mechanism to determine which
subscribers are subscribed to a topic. Using this you can
inspect the specific subscribers for further details.

Change-Id: I8deea21703cd5c5357b85593b46c3eaf24e18c0c
2019-02-20 14:22:31 -04:00
George Joseph
bae3fd04c1 taskprocessor: Enable subsystems and overload by subsystem
To prevent one subsystem's taskprocessors from causing others
to stall, new capabilities have been added to taskprocessors.

* Any taskprocessor name that has a '/' will have the part
  before the '/' saved as its "subsystem".
  Examples:
  "sorcery/acl-0000006a" and "sorcery/aor-00000019"
  will be grouped to subsystem "sorcery".
  "pjsip/distributor-00000025" and "pjsip/distributor-00000026"
  will bn grouped to subsystem "pjsip".
  Taskprocessors with no '/' have an empty subsystem.

* When a taskprocessor enters high-water alert status and it
  has a non-empty subsystem, the subsystem alert count will
  be incremented.

* When a taskprocessor leaves high-water alert status and it
  has a non-empty subsystem, the subsystem alert count will be
  decremented.

* A new api ast_taskprocessor_get_subsystem_alert() has been
  added that returns the number of taskprocessors in alert for
  the subsystem.

* A new CLI command "core show taskprocessor alerted subsystems"
  has been added.

* A new unit test was addded.

REMINDER: The taskprocessor code itself doesn't take any action
based on high-water alerts or overloading.  It's up to taskprocessor
users to check and take action themselves.  Currently only the pjsip
distributor does this.

* A new pjsip/global option "taskprocessor_overload_trigger"
  has been added that allows the user to select the trigger
  mechanism the distributor uses to pause accepting new requests.
  "none": Don't pause on any overload condition.
  "global": Pause on ANY taskprocessor overload (the default and
  current behavior)
  "pjsip_only": Pause only on pjsip taskprocessor overloads.

* The core pjsip pool was renamed from "SIP" to "pjsip" so it can
  be properly grouped into the "pjsip" subsystem.

* stasis taskprocessor names were changed to "stasis" as the
  subsystem.

* Sorcery core taskprocessor names were changed to "sorcery" to
  match the object taskprocessors.

Change-Id: I8c19068bb2fc26610a9f0b8624bdf577a04fcd56
2019-02-20 10:23:26 -07:00
Kevin Harwell
da93d17af8 ARI event type filtering
Event type filtering is now enabled, and configurable per application. An app is
now able to specify which events are sent to the application by configuring an
allowed and/or disallowed list(s). This can be done by issuing the following:

PUT /applications/{applicationName}/eventFilter

And then enumerating the allowed/disallowed event types as a body parameter.

ASTERISK-28106

Change-Id: I9671ba1fcdb3b6c830b553d4c5365aed5d588d5b
2019-02-20 09:56:45 -06:00
George Joseph
86bb86ce46 Merge "json.c/strings.c - Add a couple of utility functions" into 13 2019-02-20 09:53:15 -06:00
Friendly Automation
f4fd910d2e Merge "chan_pjsip: Changed to continued after invalid media for pjsip show channelstats" into 13 2019-02-20 09:04:56 -06:00
Friendly Automation
b298777458 Merge "CI: Use tmpfs option to Docker instead of mount." into 13 2019-02-20 08:16:55 -06:00
Joshua C. Colp
3de4d0c6c1 Merge "res/res_rtp_asterisk: clear smoother when local bridging" into 13 2019-02-20 04:46:20 -06:00
sungtae kim
f6689547ae chan_pjsip: Changed to continued after invalid media for pjsip show channelstats
Currently, the pjsip show channelstats cli does not show channel's
stats after hits the invalid channel info. This makes hard to use
this cli. Changed to keep iterate after hits the invalid channel
info.

ASTERISK-28292

Change-Id: I3efdff1c9e1b1efd3c971fb82ae77aa133a6f43c
2019-02-19 23:59:48 +01:00
Joshua Colp
46df13e2d0 CI: Use tmpfs option to Docker instead of mount.
Some tests require Asterisk to execute scripts which
are stored in /tmp. When mount is used for tmpfs there
is no ability to allow scripts to be executed from
that location.

This change switches to using tmpfs which can be told
to allow executables to be run from /tmp.

Change-Id: I0e598ca2b76af1f7f2d29f0da7b1731a214a291a
2019-02-19 16:22:46 +00:00
Kevin Harwell
b2d3c9d2de json.c/strings.c - Add a couple of utility functions
Added 'ast_json_object_string_get' to the JSON wrapper in order to make it a
little easier to retrieve a string field from the JSON object.

Also added an 'ast_strings_equal' function that safely checks (checks for NULLs)
for equality between two strings.

Change-Id: I26f0a16d61537505eb41b4b05ef2e6d67fc2541b
2019-02-19 09:43:40 -06:00
George Joseph
1ec00d205f Merge "Revert "Test_cel: Fails when DONT_OPTIMIZE is off"" into 13 2019-02-14 12:47:17 -06:00
Chris Savinovich
3e922adcc1 Revert "Test_cel: Fails when DONT_OPTIMIZE is off"
This reverts commit 9b85882f04.

Change-Id: I36cf159abb103502e48d6f8fd70d560d7f0bda56
2019-02-14 10:53:42 -06:00
Torrey Searle
7c17bc75ed res/res_rtp_asterisk: clear smoother when local bridging
p2p_write updates txformat but doesn't require a smoother.  If a smoother
was created by another bridge type the smoother could fall out of date causing
one way audio issues.  To prevent this the smoother is now destroyed on the
start of native bridge.

ASTERISK-28284 #close

Change-Id: I84e67f144963787fff9b4d79ac500514fb40cdc6
2019-02-13 08:48:55 -06:00
Paulo Vicentini
2db81ee2b4 res/res_pjsip: Resources (udptl fd) are leaking for T.38 calls
Fix unbalanced references for datastore t38_session_media

ASTERISK-28288

Change-Id: Id6dceceb06651b03f611bf33deb3061022fe5d0c
2019-02-13 15:23:17 +01:00
George Joseph
44914234ba Merge "ci: Rerun unit tests when non-code changes occur." into 13 2019-02-11 09:27:40 -06:00
Joshua C. Colp
3c632d81bc Merge "res_odbc: Add basic query logging." into 13 2019-02-11 08:39:19 -06:00
Joshua C. Colp
cb45aa1f9d Merge "res_pjsip_registrar: lock transport monitor when setting 'removing' flag" into 13 2019-02-08 09:34:35 -06:00
Joshua Colp
9a6464e54f ci: Rerun unit tests when non-code changes occur.
This change makes it so that even if non-code changes
occur (such as commit message changing) unit tests
will still be run and result in a verification.

ASTERISK-28251

Change-Id: I6491fff7c93e5d5cd8e41054486968bf66c4f608
2019-02-08 13:09:38 +00:00
Kevin Harwell
3974633c00 res_pjsip_registrar: lock transport monitor when setting 'removing' flag
A previous patch attempt to mitigate blocked threads on transport shutdown for
a given contact. It was thought that a second lock could be avoided by checking
the 'removing' flag on the transport monitor twice (once before and once after
the normal named aor locking). However as with usual threading issues if the
timing was right the original problem still occured.

This patch adds locking around the first 'removing' flag check and set, thus
nullifying the secondary check, so it was removed.

ASTERISK-28213

Change-Id: Iaa8e36e5311789549b76d8de42dfcea96013b2ed
2019-02-07 14:28:20 -06:00
Joshua Colp
a4d930c2ed res_odbc: Add basic query logging.
When Asterisk is connected and used with a database the response
time of the database can cause problems in Asterisk if it is long.
Normally the only way to see this problem would be to retrieve a
backtrace from Asterisk and examine where things are blocked, or
examine the database to see if there is any indication of a
problem.

This change adds some basic query logging to make it easier to
investigate such a problem. When logging is enabled res_odbc will
now keep track of the number of queries executed, as well as the
query that has taken the longest time to execute. There is also
an option which will cause a WARNING message to be output if a
query takes longer than a configurable amount of time to execute.

This makes it easier and clearer for users that their database may
be experiencing a problem that could impact Asterisk.

ASTERISK-28277

Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6
2019-02-07 14:11:13 +00:00
George Joseph
d496bf2099 Merge "sounds: Sort 'core show sounds' output" into 13 2019-02-06 07:13:50 -06:00
Sungtae Kim
f16d711679 main/cdr: Fixed cdr start overwriting
The CDR was overwriting the start time when the call continued the
dialplan from the ARI stasis or a Local channel was originated.

This change fixes this by no longer reinitializing the CDR when
transitioning out of the dialed pending state to the single state.

ASTERISK-28181

Change-Id: I921bc04064b6cff1deb2eea56a94d86489561cdc
2019-02-05 21:45:19 +01:00