Commit Graph

30845 Commits

Author SHA1 Message Date
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
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
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
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
Kevin Harwell
41effb7d4d res_pjsip_registrar: blocked threads on reliable transport shutdown take 3
When a contact was removed by the registrar it did not always check to see if
the circumstances involved a monitored reliable transport. For instance, if the
'remove_existing' option was set to 'true' then when existing contacts were
removed due to 'max_contacts' being reached, those existing contacts being
removed did not unregister the transport monitor.

Also, it was possible to add more than one monitor on a reliable transport for
a given aor and contact.

This patch makes it so all contact removals done by the registrar also remove
any associated transport monitors if necessary. It also makes it so duplicate
monitors cannot be added for a given transport.

ASTERISK-28213

Change-Id: I94b06f9026ed177d6adfd538317c784a42c1b17a
2019-02-27 17:02:16 -06: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