Commit Graph

32407 Commits

Author SHA1 Message Date
Joshua Colp bf0247ae7c Merge "stasis.c: Use correct topic name in stasis_topic_pool_delete_topic" 2020-01-08 09:41:18 -06:00
George Joseph a4fd89536d Merge "app_bridgeaddchan.c: Make BridgeAdd be more like Bridge" 2020-01-07 14:29:27 -06:00
George Joseph 6b7334a311 Merge "app_chanisavail.c: Simplify dialplan using ChanIsAvail." 2020-01-07 14:28:55 -06:00
George Joseph d66b01d3bf Merge "res_pjsip_config_wizard: Fix change detection for wizard settings" 2020-01-07 13:05:52 -06:00
George Joseph ab5b97c0d3 Merge "features.c: Make Bridge application tolerate unspecified channel." 2020-01-07 13:03:50 -06:00
Friendly Automation 5b815fe1ac Merge "app_dial.c: Simplify dialplan using Dial." 2020-01-07 11:48:57 -06:00
Friendly Automation 5050c45e06 Merge "app_page.c: Simplify dialplan using Page." 2020-01-07 11:40:57 -06:00
Joshua Colp b2664fd3a4 Merge "app_softhangup.c: Reduce unnecessary warning to verbose message." 2020-01-07 11:14:48 -06:00
Friendly Automation 1aa294f6f5 Merge "app_chanspy.c: Reduce log message level from notice to verbose." 2020-01-07 10:41:38 -06:00
Friendly Automation 255a647c53 Merge "websocket: Consider pending SSL data when waiting for socket input" 2020-01-07 10:02:18 -06:00
George Joseph cc2d1f2545 Merge "contrib/valgrind: Fix use of frame-level suppression" 2020-01-07 09:58:42 -06:00
Richard Mudgett fe3cce816c app_chanisavail.c: Simplify dialplan using ChanIsAvail.
Dialplan has to be careful about passing an empty device list or empty
positions in the list.  As a result, dialplan has to check for these
conditions before using ChanIsAvail.  Simplify dialplan by making
ChanIsAvail handle these conditions gracefully.

* Made tolerate empty positions in the device list.

* Simplified the code and eliminated some unnecessary indention.

ASTERISK-28638

Change-Id: I9e4b67e2cbf26b2417c2d03485b8568e898931d3
2020-01-06 19:11:58 -06:00
George Joseph 1c9ddad4db stasis.c: Use correct topic name in stasis_topic_pool_delete_topic
When a topic is created for an object, its name is only
<object>:<uniqueid>
For example:
bridge:cb68b3a8-fce7-4738-8a17-d7847562f020

When a topic is added to a pool, its name has the pool's topic
name prepended.  For example:
bridge:all/bridge:cb68b3a8-fce7-4738-8a17-d7847562f020

The topic_pool_entry's name however, is only what was passed
in to stasis_topic_pool_get_topic which is
bridge:cb68b3a8-fce7-4738-8a17-d7847562f020
That's actually correct because the entry is qualified by the
pool that's in.

When you're ready to delete the entry from the pool, you retrieve
the tropic name from the object but since it now has the pool's
topic name prepended, it won't be found in the pool container.

Fix:

* Modified stasis_topic_pool_delete_topic() to skip past the
pool topic's name, if it was prepended to the topic name,
before searching the container for a pool entry.

ASTERISK-28633
Reported by: Joeran Vinzens

Change-Id: I4396aa69dd83e4ab84c5b91b39293cfdbcf483e6
2020-01-06 09:51:42 -06:00
Richard Mudgett 19069f7db7 app_bridgeaddchan.c: Make BridgeAdd be more like Bridge
* Made BridgeAdd not hangup the call if there is a problem.
* Reduced message level from warning to verbose for normal exception
cases.
* Added a loop safety check to BridgeAdd.
* Made BridgeAdd set BRIDGERESULT with the status when dialplan is
resumed.

Change-Id: I374d39b8a3edcc794eeb5c6b9f31a01424cdc426
2020-01-05 21:32:01 -06:00
Richard Mudgett abcb4ab321 app_dial.c: Simplify dialplan using Dial.
Dialplan has to be careful about passing an empty destination list or
empty positions in the list.  As a result, dialplan has to check for
these conditions before using Dial.  Simplify dialplan by making Dial
handle these conditions gracefully.

* Made tolerate empty positions in the dialed device list.

* Reduced some message log levels from notice to verbose.

ASTERISK-28638

Change-Id: I6edc731aff451f8bdfaee5498078dd18c3a11ab9
2020-01-05 21:24:27 -06:00
Richard Mudgett d86a6ac5ce app_page.c: Simplify dialplan using Page.
Dialplan has to be careful about passing an empty destination list or
empty positions in the list.  As a result, dialplan has to check for
these conditions before using Page.  Simplify dialplan by making Page
handle these conditions gracefully.

* Made tolerate empty positions in the paged device list.

* Reduced some warnings associated with the 's' option to verbose
messages.  The warning level for those messages really serves no purpose
as that is why the 's' option exists.

ASTERISK-28638

Change-Id: I95b64a6d6800cd1a25279c88889314ae60fc21e3
2020-01-05 21:21:21 -06:00
Richard Mudgett 0376f2bba9 features.c: Make Bridge application tolerate unspecified channel.
The Bridge application was inconsistent if the channel to bridge with is
not specified.  If no parameters are given then a warning is issued and
the current channel is hung up.  If options are given but no channel is
specified then a warning is issued and the current channel is not hung up.

* Made the Bridge application give a verbose message instead of a warning
if the channel to bridge with is not specified and made not hang up the
current channel.  As a result dialplan no longer needs to check if a
channel name is passed before calling Bridge and simply needs to check the
BRIDGERESULT channel variable instead.  This is something you likely want
your dialplan to do anyway.

* Fixed up L() option warning message.  It is up to the caller to
determine if the channel is hung up because of the warning.  Dial() hangs
up the current channel while Bridge() does not.

Change-Id: I44349a8dc3912397f28852777de04f19e7bb9c73
2020-01-05 21:18:08 -06:00
Richard Mudgett 0d1f3d9bf3 app_chanspy.c: Reduce log message level from notice to verbose.
Change-Id: Ica5f38ccd8cdc077aef14d0c50425e0b29ac7e0a
2020-01-05 21:13:11 -06:00
Richard Mudgett a457947198 app_softhangup.c: Reduce unnecessary warning to verbose message.
Why log a warning for something your dialplan explicitly asked for?

Change-Id: I167b90daf4c7d75dd4b7ef94849f6cef05aa43a7
2020-01-05 21:09:03 -06:00
Sean Bright b40dd11afe res_pjsip_config_wizard: Fix change detection for wizard settings
ast_sorcery_changeset_create() is not commutative and will fail to detect
differences between two variable lists depending on what changed, so switch to
ast_variable_lists_match().

ASTERISK-28492 #close
Reported by: Jean-Denis Girard

Change-Id: I7b3256983ddfaa2138d3de92a444a53b5193a4e1
2020-01-05 10:13:05 -06:00
Sean Bright 7d94bdde9d res_agi: Improve GET FULL VARIABLE documentation
ASTERISK-28673 #close
Reported by: Jonathan Harris

Change-Id: I591afdec669622bfa19243aabec31b579652c92f
2020-01-03 10:29:02 -06:00
Sean Bright 87110c1bdf websocket: Consider pending SSL data when waiting for socket input
When TLS is in use, checking the readiness of the underlying FD is insufficient
for determining if there is data available to be read. So before polling the
FD, check if there is any buffered data in the TLS layer and use that first.

ASTERISK-28562 #close
Reported by: Robert Sutton

Change-Id: I95fcb3e2004700d5cf8e5ee04943f0115b15e10d
2020-01-02 15:51:37 -06:00
Joshua Colp cee68ea4f2 Merge "func_odbc: acf_odbc_read() and cli_odbc_read() unicode support" 2020-01-02 09:35:31 -06:00
George Joseph be93537382 Merge "res_fax: wrap v21 detected Asterisk initiated negotiation with config option" 2020-01-02 08:43:21 -06:00
Friendly Automation 2a8f759374 Merge "chan_sip: voice frames are no longer transmitted after emitting a COLP" 2019-12-30 15:17:50 -06:00
Sean Bright fc99ac8c9a db: Initialize condition primitive before use
The db_init() function ultimately calls db_sync() which signals the
condition before it is initialized.

Change-Id: Id4a4e025b637bc4ac7d90557fcb71d56598892ab
2019-12-27 17:32:22 -06:00
George Joseph 7c4fc2e39a Merge "config.c: Skip UTF-8 BOMs if present when reading config files" 2019-12-27 13:12:03 -06:00
Joshua C. Colp dd823e50e4 Merge "main/file.c: Limit media cache usage to remote files." 2019-12-19 18:41:11 -06:00
Joshua C. Colp d21427cadd Merge "app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR." 2019-12-19 18:40:11 -06:00
Friendly Automation c3cf0e330c Merge "chan_sip: in case of tcp/tls, be less annoying about tx errors." 2019-12-19 10:44:45 -06:00
Friendly Automation 07b7c6f50a Merge "confbridge: Add support for specifying maximum sample rate." 2019-12-19 10:00:43 -06:00
Sean Bright 40b5cf8f52 config.c: Skip UTF-8 BOMs if present when reading config files
ASTERISK-28667 #close

Change-Id: I4767ed365c98f3e1587b7653321048a31d8a53b2
2019-12-19 04:48:58 -06:00
Kevin Reeves c626ccec12 main/file.c: Limit media cache usage to remote files.
When testing for the existance of a file, the media cache is searched even if
the file has no chance of being in it.  This can cause performance issues
as the media cache size increases.

As a result, calls to applications like Read and Playback using local files
must scan through the media cache before playing.  Under load and with a
large cache, this can delay the playback of those files.

This patch updates the function that checks for the existance of a file to
only consult the media cache database if the requested file is a remote path.
It introduces a new is_remote_path() function in main/file.c.

ASTERISK-28625  #close
Reported-by: kevin@phoneburner.com

Change-Id: If91137493732d9034dafa381c081c69274a7dcc9
2019-12-18 18:45:24 -06:00
George Joseph 657ada8bfd Merge "res_rtp_asterisk: Add frame list cleanups to ast_rtp_read" 2019-12-18 08:54:16 -06:00
Friendly Automation 308592a681 Merge "sip_to_pjsip.py: Fix trustrpid typo" 2019-12-18 07:26:45 -06:00
Joshua C. Colp c29b7c00e5 Merge "configure: Add check for MySQL client bool and my_bool type usage." 2019-12-18 06:37:06 -06:00
Joshua C. Colp 2779189689 Merge "res_pjsip_session: Set stream state on created streams for incoming SDP." 2019-12-18 05:38:29 -06:00
Snuffy 095c204fe0 contrib/valgrind: Fix use of frame-level suppression
Fix use of frame-level wildcard usage in suppression file.

ASTERISK-27243 #close
Reported-by: Richard Kenner

Change-Id: I1c0c64c5f305d2c9aa124e11f1f64a2eec52dc51
2019-12-18 11:20:49 +11:00
Pascal Cadotte Michaud e494d5fd76
sip_to_pjsip.py: Fix trustrpid typo
ASTERISK-28664 #close

Change-Id: I6c28b1002fd7075ae0ed36f026f8c1855c9418a6
2019-12-17 13:10:17 -05:00
Frederic LE FOLL a83625b366 app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR.
Temporary channel lifespan is very short and CDR deactivation request
through ast_cdr_set_property() may happen when CDR is not available
yet. Use CDR_PROP() dialplan function instead, it will first wait
for pending CDR insertion requests to be processed.

ASTERISK-28636

Change-Id: I1cbe09e8d2169c0962c1195133ff260d291f2074
2019-12-16 15:02:49 -06:00
George Joseph 8587ef3a0c Merge "res_pjsip_nat: Restore original contact for REGISTER responses" 2019-12-16 11:03:47 -06:00
Joshua C. Colp ed394ce5b1 configure: Add check for MySQL client bool and my_bool type usage.
Instead of trying to use the defined MySQL client version from the
header use a configure check to determine whether the bool or my_bool
type should be used for defining a boolean.

ASTERISK-28604

Change-Id: Id2225b3785115de074c50c123ff1a68005b4a9c7
2019-12-16 10:36:25 -06:00
Joshua C. Colp 89b7144fbd confbridge: Add support for specifying maximum sample rate.
ConfBridge has the ability to move between different sample
rates for mixing the conference bridge. Up until now there has
only been the ability to set the conference bridge to mix at
a specific sample rate, or to let it move between sample rates
as necessary. This change adds the ability to configure a
conference bridge with a maximum sample rate so it can move
between sample rates but only up to the configured maximum.

ASTERISK-28658

Change-Id: Idff80896ccfb8a58a816e4ce9ac4ebde785963ee
2019-12-16 09:54:21 -06:00
Friendly Automation 7e441d6b25 Merge "PJSIP_CONTACT: add missing argument documentation" 2019-12-16 06:56:16 -06:00
Joshua C. Colp a603d7d324 res_pjsip_session: Set stream state on created streams for incoming SDP.
A previous review, 13174, made a change whereby on an incoming offer SDP
the pending topology was initialized to the configured. This caused a problem
for bundle with WebRTC where bundle could reference a stream that did not
actually exist if the configuration had both audio and video but the
offer SDP only contained audio.

This change undoes that review and instead fixes the original problem it
sought to solve by setting the state of created streams based on the
contents of the offer SDP. This way the stream state is not inactive
until negotiation later completes.

ASTERISK-28659

Change-Id: Ic5ae5a86437d3e686ac5afd91d133cc916198355
2019-12-16 05:23:50 -06:00
Kevin Harwell b6f5607359 res_fax: wrap v21 detected Asterisk initiated negotiation with config option
A previous patch:

Gerrit Change-Id: I73bb24799bfe1a48adae9c034a2edbae54cc2a39

made it so a T.38 Gateway tries to negotiate with both sides by sending T.38
negotiation request to both endpoints supported T.38 versus the previous
behavior of forwarding negotiation to the "other" channel once a preamble
was detected.

This had the unfortunate side effect of breaking some setups. Specifically
ones that set the max datagram option on an endpoint configuration (configured
max datagram was not propagated since Asterisk now initiates negotiations).

This patch adds a configuration option, "negotiate_both", that when enabled
makes it so Asterisk initiates the negotiation requests to both endpoints vs.
the previous behavior of waiting, and forwarding the request.

The default is disabled keeping with the old behavior.

ASTERISK-28660

Change-Id: I5deb875f3485e20bc75119ec743090655d864a1a
2019-12-13 14:24:10 -06:00
Jaco Kroon 32160cb456 ACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging.
Due to use in res_rtp_asterisk there is a need to be able to apply an
ACL without logging any invalid/denies.  It's probably sensible to at
least validate the ACL once directly after load and report invalid ACLs.

Change-Id: I256169229d945ca7c1bbf228fc492d91df345843
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
2019-12-12 02:14:55 -06:00
Pascal Cadotte Michaud bf4dd3d837
PJSIP_CONTACT: add missing argument documentation
add missing argument "rtt" and "status" to the documentation

The change to the dtd file allow an enumlist to contain one or many
configOptionToEnum or enum.

This is different from the previous patch I submitted when you could have a
configOptionToEnum or (a configOptionToEnum followed by one or manu enums) or
(one or many enums)

ASTERISK-28626

Change-Id: Ia71743ee7ec813f40297b0ddefeee7909db63b6d
2019-12-11 12:05:27 -05:00
George Joseph 91cdb9537e Merge "Revert "PJSIP_CONTACT: add missing argument documentation"" 2019-12-11 10:36:58 -06:00
Joshua Colp d0b198b330 Revert "PJSIP_CONTACT: add missing argument documentation"
This reverts commit 7e3015d779.

Reason for revert: Regression in XML validation.

validity error : Content model of enumlist is not determinist:
(configOptionToEnum | (configOptionToEnum , enum+) | enum+)

As we are preparing to do releases and this is not critical
I am reverting this for now until resolved.

Change-Id: I30c2295f9d7f0a0475674ee77071a7ebabf5b83f
2019-12-11 07:01:32 -06:00