Commit Graph

32417 Commits

Author SHA1 Message Date
Joshua Colp
52f701fd01 Merge "app_agent_pool: Update XML docs for AgentLogin" into 16 2020-01-09 15:06:35 -06:00
Corey Farrell
0c07a7ee00 app_record: Do not hang up if beep audio is missing
Additionally alter the warning to mention that it was "beep" which could
not be streamed to give admins a better clue about what the warning
means.

ASTERISK-28682

Change-Id: If5aed21226a173117ed17589f44826dd1ba6576e
2020-01-09 05:32:32 -06:00
Kevin Harwell
de078debab app_agent_pool: Update XML docs for AgentLogin
This patch fixes some wrongly formatted documentation for the AgentLogin
application. A couple of "see also" links should contain only the function
name, and no parameters.

Change-Id: I3f788b47dce3292e311f8a9856938d59a0bd0661
2020-01-08 14:01:50 -06:00
George Joseph
4cf32f2578 CI: Update buildAsterisk.sh to do a "make full"
If you do a "make all" when building Asterisk the xml documentation
produced will be missing certain AMI events where their
documentation is located not at the top of the c source file but
embedded further down next to the event's manager_event()
registration call.  See main/manager_mwi.c for an example.

"make full" does produce the correct documentation so we're changing
it in the build script.  A separate commit/issue will address the
problem with "make all".

ASTERISK-28507
Reported by: David Lee

Change-Id: I4a22635d6eef99eacecc0efb69e28360eebdb86c
2020-01-08 12:17:42 -06:00
Joshua Colp
324a6098e6 Merge "sig_pri: Fix deadlock caused by sig_pri_queue_hangup" into 16 2020-01-08 09:41:38 -06:00
Joshua C. Colp
8318b05f25 res_pjsip_pubsub: Add ability to persist generator state information.
Some body generators, such as dialog-info+xml, require storing state
information which is then conveyed in the NOTIFY request itself. Up
until now there was no way for such body generators to persist this
information.

Two new API calls have been added to allow body generators to set and
get persisted data. This data is persisted out alongside the normal
persistence information and allows the body generator to restore
state information or to simply use this for normal storage of state.
State is stored in the form of JSON and it is up to the body
generator to interpret this as needed.

The dialog-info+xml body generator has been updated to take advantage
of this to persist the version number.

ASTERISK-27759

Change-Id: I5fda56c624fd13c17b3c48e0319b77079e9e27de
2020-01-08 15:19:19 +00:00
Friendly Automation
932271939b Merge "stasis.c: Use correct topic name in stasis_topic_pool_delete_topic" into 16 2020-01-08 08:59:01 -06:00
Sean Bright
f8b0c2c933 res_pjsip_endpoint_identifier_ip.c: Add port matching support
Adds source port matching support when IP matching is used:

  [example]
  type = identify
  match = 1.2.3.4:5060/32, 1.2.3.4:6000/32, asterisk.org:4444

If the IP matches but the source port does not, we reject and search for
alternatives. SRV lookups are still performed if enabled (srv_lookups = yes),
unless the configured FQDN includes a port number in which case just a host
lookup is performed.

ASTERISK-28639 #close
Reported by: Mitch Claborn

Change-Id: I256d5bd5d478b95f526e2f80ace31b690eebba92
2020-01-08 08:37:37 -06:00
Friendly Automation
7c227aa130 Merge "app_chanisavail.c: Simplify dialplan using ChanIsAvail." into 16 2020-01-07 13:58:25 -06:00
George Joseph
42eeb6bbe0 Merge "res_pjsip_config_wizard: Fix change detection for wizard settings" into 16 2020-01-07 13:04:35 -06:00
Friendly Automation
86585cbb64 Merge "features.c: Make Bridge application tolerate unspecified channel." into 16 2020-01-07 12:21:35 -06:00
Friendly Automation
077bb05528 Merge "app_dial.c: Simplify dialplan using Dial." into 16 2020-01-07 11:45:41 -06:00
Joshua Colp
5352022b2c Merge "app_softhangup.c: Reduce unnecessary warning to verbose message." into 16 2020-01-07 11:14:32 -06:00
Friendly Automation
ab042335f5 Merge "app_page.c: Simplify dialplan using Page." into 16 2020-01-07 11:03:11 -06:00
George Joseph
a71f32943c Merge "app_chanspy.c: Reduce log message level from notice to verbose." into 16 2020-01-07 10:38:16 -06:00
George Joseph
fb7efe34a6 Merge "contrib/valgrind: Fix use of frame-level suppression" into 16 2020-01-07 09:59:36 -06:00
Friendly Automation
09fc6e24e3 Merge "websocket: Consider pending SSL data when waiting for socket input" into 16 2020-01-07 09:59:10 -06:00
George Joseph
64692a3c72 sig_pri: Fix deadlock caused by sig_pri_queue_hangup
The change to add setting hangupsource to sig_pri_queue_hangup()
made in https://gerrit.asterisk.org/c/asterisk/+/12857 casued
deadlocks when a hangup request was received from the core at the
same time a hanguprequest was received from the remote end via the
D channel.

Although the PRI's channel private structure was being unlocked
before setting the hangupsource, the PRI's own lock was still being
held during the process.  If channel actions were also coming from
the core, a deadlock on the PRI could result.  This deadlock could
then escalate to the entire DAHDI subsystem via DAHDI's global
interface list lock, especially if someone used the PRI CLI commands.

Fix:

* We now unlock the PRI as well as the PRI's channel private
  structure before setting the hangupsource, then relock both
  afterwards.

ASTERISK-28605
Reported by: Dirk Wendland

Change-Id: Id74aaa5d4e3746063dbe9deed188eb65193cb9c9
2020-01-07 06:19:49 -07:00
Richard Mudgett
a7692ce2f4 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:10:53 -06:00
George Joseph
dd82ebecd3 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:52:34 -06:00
Richard Mudgett
144b774b85 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:23:33 -06:00
Richard Mudgett
2780be334d 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:20:38 -06:00
Richard Mudgett
11753d94d8 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:15:40 -06:00
Richard Mudgett
00e745066c app_chanspy.c: Reduce log message level from notice to verbose.
Change-Id: Ica5f38ccd8cdc077aef14d0c50425e0b29ac7e0a
2020-01-05 21:12:12 -06:00
Richard Mudgett
198f4cbdbf 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:05:33 -06:00
Sean Bright
992dcdf780 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:12:44 -06:00
Sean Bright
60fd1322d7 res_agi: Improve GET FULL VARIABLE documentation
ASTERISK-28673 #close
Reported by: Jonathan Harris

Change-Id: I591afdec669622bfa19243aabec31b579652c92f
2020-01-03 10:28:48 -06:00
Sean Bright
47ba42f4a0 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 16:51:14 -05:00
Snuffy
b9b50774f5 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
2020-01-02 09:44:11 -06:00
Friendly Automation
3818759e9c Merge "func_odbc: acf_odbc_read() and cli_odbc_read() unicode support" into 16 2020-01-02 09:39:57 -06:00
Friendly Automation
a992180091 Merge "res_fax: wrap v21 detected Asterisk initiated negotiation with config option" into 16 2020-01-02 08:41:28 -06:00
Boris P. Korzun
e54299cd3e func_odbc: acf_odbc_read() and cli_odbc_read() unicode support
Added ast_odbc_ast_str_SQLGetData() considers SQL_DESC_OCTET_LENGTH
column attribute for correct allocating the buffer.

ASTERISK-28497 #close

Change-Id: I50e86c8a277996f13d4a4b9b318ece0d60b279bf
2020-01-02 08:28:49 -06:00
George Joseph
66ae6f7194 Merge "chan_sip: voice frames are no longer transmitted after emitting a COLP" into 16 2019-12-31 08:38:36 -06:00
Jean Aunis
82a870c8c7 chan_sip: voice frames are no longer transmitted after emitting a COLP
The SIP transaction state was reset when emitting an UPDATE or a re-INVITE
related to a COLP, preventing RTP packets to be emitted.

ASTERISK-28647

Change-Id: Ie7a30fa7a97f711e7ba6cc17f221a0993d48bd8b
2019-12-30 01:44:39 -06:00
Sean Bright
efa13eb0a0 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:31:50 -06:00
George Joseph
c6dc24fc8e Merge "config.c: Skip UTF-8 BOMs if present when reading config files" into 16 2019-12-27 13:12:30 -06:00
Joshua C. Colp
3e0a2485c4 Merge "app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR." into 16 2019-12-19 18:40:33 -06:00
Friendly Automation
2770830495 Merge "main/file.c: Limit media cache usage to remote files." into 16 2019-12-19 10:59:27 -06:00
Friendly Automation
7172230cd0 Merge "chan_sip: in case of tcp/tls, be less annoying about tx errors." into 16 2019-12-19 10:05:11 -06:00
Friendly Automation
a3edac10a6 Merge "confbridge: Add support for specifying maximum sample rate." into 16 2019-12-19 10:00:25 -06:00
Sean Bright
a78758d0a2 config.c: Skip UTF-8 BOMs if present when reading config files
ASTERISK-28667 #close

Change-Id: I4767ed365c98f3e1587b7653321048a31d8a53b2
2019-12-19 04:48:20 -06:00
George Joseph
4b658c82b9 Merge "res_rtp_asterisk: Add frame list cleanups to ast_rtp_read" into 16 2019-12-18 09:01:36 -06:00
Joshua C. Colp
a55566b680 Merge "sip_to_pjsip.py: Fix trustrpid typo" into 16 2019-12-18 07:32:29 -06:00
Joshua C. Colp
82e2f0c662 Merge "configure: Add check for MySQL client bool and my_bool type usage." into 16 2019-12-18 06:37:29 -06:00
Friendly Automation
d11534515b Merge "res_pjsip_session: Set stream state on created streams for incoming SDP." into 16 2019-12-18 05:42:46 -06:00
Pascal Cadotte Michaud
b8e635916f sip_to_pjsip.py: Fix trustrpid typo
ASTERISK-28664 #close

Change-Id: I6c28b1002fd7075ae0ed36f026f8c1855c9418a6
2019-12-17 13:18:09 -05:00
George Joseph
b058e2b409 Merge "res_pjsip_nat: Restore original contact for REGISTER responses" into 16 2019-12-16 11:03:10 -06:00
Joshua C. Colp
7167fd6d46 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 12:36:02 -04:00
Joshua C. Colp
5622df0a94 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 15:54:05 +00:00
Friendly Automation
298dd7832b Merge "PJSIP_CONTACT: add missing argument documentation" into 16 2019-12-16 06:57:42 -06:00