]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
5 years agoMerge "app_page.c: Simplify dialplan using Page." into 13
Friendly Automation [Tue, 7 Jan 2020 16:54:04 +0000 (10:54 -0600)] 
Merge "app_page.c: Simplify dialplan using Page." into 13

5 years agoMerge "app_softhangup.c: Reduce unnecessary warning to verbose message." into 13
Friendly Automation [Tue, 7 Jan 2020 16:50:29 +0000 (10:50 -0600)] 
Merge "app_softhangup.c: Reduce unnecessary warning to verbose message." into 13

5 years agoMerge "app_chanspy.c: Reduce log message level from notice to verbose." into 13
Friendly Automation [Tue, 7 Jan 2020 15:59:28 +0000 (09:59 -0600)] 
Merge "app_chanspy.c: Reduce log message level from notice to verbose." into 13

5 years agoMerge "contrib/valgrind: Fix use of frame-level suppression" into 13
George Joseph [Tue, 7 Jan 2020 15:56:49 +0000 (09:56 -0600)] 
Merge "contrib/valgrind: Fix use of frame-level suppression" into 13

5 years agoapp_page.c: Simplify dialplan using Page.
Richard Mudgett [Mon, 30 Dec 2019 02:41:30 +0000 (20:41 -0600)] 
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

5 years agoapp_chanspy.c: Reduce log message level from notice to verbose.
Richard Mudgett [Sun, 29 Dec 2019 23:48:55 +0000 (17:48 -0600)] 
app_chanspy.c: Reduce log message level from notice to verbose.

Change-Id: Ica5f38ccd8cdc077aef14d0c50425e0b29ac7e0a

5 years agoapp_softhangup.c: Reduce unnecessary warning to verbose message.
Richard Mudgett [Sun, 29 Dec 2019 23:31:28 +0000 (17:31 -0600)] 
app_softhangup.c: Reduce unnecessary warning to verbose message.

Why log a warning for something your dialplan explicitly asked for?

Change-Id: I167b90daf4c7d75dd4b7ef94849f6cef05aa43a7

5 years agores_agi: Improve GET FULL VARIABLE documentation
Sean Bright [Fri, 3 Jan 2020 16:20:29 +0000 (11:20 -0500)] 
res_agi: Improve GET FULL VARIABLE documentation

ASTERISK-28673 #close
Reported by: Jonathan Harris

Change-Id: I591afdec669622bfa19243aabec31b579652c92f

5 years agocontrib/valgrind: Fix use of frame-level suppression
Snuffy [Wed, 18 Dec 2019 00:20:49 +0000 (11:20 +1100)] 
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

5 years agoMerge "func_odbc: acf_odbc_read() and cli_odbc_read() unicode support" into 13
Friendly Automation [Thu, 2 Jan 2020 15:34:10 +0000 (09:34 -0600)] 
Merge "func_odbc:  acf_odbc_read() and cli_odbc_read() unicode support" into 13

5 years agoMerge "res_fax: wrap v21 detected Asterisk initiated negotiation with config option...
Joshua Colp [Thu, 2 Jan 2020 14:43:59 +0000 (08:43 -0600)] 
Merge "res_fax: wrap v21 detected Asterisk initiated negotiation with config option" into 13

5 years agofunc_odbc: acf_odbc_read() and cli_odbc_read() unicode support
Boris P. Korzun [Wed, 28 Aug 2019 10:07:13 +0000 (20:07 +1000)] 
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

5 years agoMerge "db: Initialize condition primitive before use" into 13
George Joseph [Tue, 31 Dec 2019 14:36:14 +0000 (08:36 -0600)] 
Merge "db: Initialize condition primitive before use" into 13

5 years agochan_sip: voice frames are no longer transmitted after emitting a COLP
Jean Aunis [Tue, 3 Dec 2019 11:58:26 +0000 (12:58 +0100)] 
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

5 years agodb: Initialize condition primitive before use
Sean Bright [Fri, 27 Dec 2019 23:29:45 +0000 (18:29 -0500)] 
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

5 years agoMerge "config.c: Skip UTF-8 BOMs if present when reading config files" into 13
Friendly Automation [Fri, 27 Dec 2019 16:08:57 +0000 (10:08 -0600)] 
Merge "config.c: Skip UTF-8 BOMs if present when reading config files" into 13

5 years agoMerge "chan_sip: in case of tcp/tls, be less annoying about tx errors." into 13
Joshua C. Colp [Fri, 20 Dec 2019 00:39:01 +0000 (18:39 -0600)] 
Merge "chan_sip:  in case of tcp/tls, be less annoying about tx errors." into 13

5 years agoMerge "app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR." into 13
Friendly Automation [Thu, 19 Dec 2019 16:49:37 +0000 (10:49 -0600)] 
Merge "app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR." into 13

5 years agoMerge "confbridge: Add support for specifying maximum sample rate." into 13
Friendly Automation [Thu, 19 Dec 2019 15:55:22 +0000 (09:55 -0600)] 
Merge "confbridge: Add support for specifying maximum sample rate." into 13

5 years agoconfig.c: Skip UTF-8 BOMs if present when reading config files
Sean Bright [Wed, 18 Dec 2019 15:13:21 +0000 (10:13 -0500)] 
config.c: Skip UTF-8 BOMs if present when reading config files

ASTERISK-28667 #close

Change-Id: I4767ed365c98f3e1587b7653321048a31d8a53b2

5 years agoMerge "sip_to_pjsip.py: Fix trustrpid typo" into 13
Friendly Automation [Wed, 18 Dec 2019 13:12:09 +0000 (07:12 -0600)] 
Merge "sip_to_pjsip.py: Fix trustrpid typo" into 13

5 years agoMerge "configure: Add check for MySQL client bool and my_bool type usage." into 13
Friendly Automation [Wed, 18 Dec 2019 12:26:31 +0000 (06:26 -0600)] 
Merge "configure: Add check for MySQL client bool and my_bool type usage." into 13

5 years agoMerge "json: Support older jansson versions." into 13
Friendly Automation [Wed, 18 Dec 2019 12:18:41 +0000 (06:18 -0600)] 
Merge "json: Support older jansson versions." into 13

5 years agosip_to_pjsip.py: Fix trustrpid typo
Pascal Cadotte Michaud [Tue, 17 Dec 2019 13:38:45 +0000 (08:38 -0500)] 
sip_to_pjsip.py: Fix trustrpid typo

ASTERISK-28664 #close

Change-Id: I6c28b1002fd7075ae0ed36f026f8c1855c9418a6

5 years agoMerge "app_voicemail: warning when is compiling" into 13
Friendly Automation [Tue, 17 Dec 2019 17:55:07 +0000 (11:55 -0600)] 
Merge "app_voicemail: warning when is compiling" into 13

5 years agojson: Support older jansson versions.
Joshua C. Colp [Tue, 17 Dec 2019 01:18:37 +0000 (21:18 -0400)] 
json: Support older jansson versions.

The use of '?' is a fairly new addition to jansson and is not
supported in the version of jansson that can be used by 13.
This change returns to previous supported behavior and removes
usage of '?'.

ASTERISK-28663

Change-Id: I6d596007ae85e8724d928865d99968f679be1142

5 years agoapp_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR.
Frederic LE FOLL [Mon, 16 Dec 2019 21:27:44 +0000 (22:27 +0100)] 
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

5 years agoMerge "res_pjsip_nat: Restore original contact for REGISTER responses" into 13
George Joseph [Mon, 16 Dec 2019 17:02:34 +0000 (11:02 -0600)] 
Merge "res_pjsip_nat: Restore original contact for REGISTER responses" into 13

5 years agoconfigure: Add check for MySQL client bool and my_bool type usage.
Joshua C. Colp [Mon, 16 Dec 2019 12:35:31 +0000 (08:35 -0400)] 
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

5 years agoconfbridge: Add support for specifying maximum sample rate.
Joshua C. Colp [Thu, 12 Dec 2019 00:03:46 +0000 (00:03 +0000)] 
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

5 years agoMerge "PJSIP_CONTACT: add missing argument documentation" into 13
Friendly Automation [Mon, 16 Dec 2019 12:52:37 +0000 (06:52 -0600)] 
Merge "PJSIP_CONTACT: add missing argument documentation" into 13

5 years agoMerge "ACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging...
Joshua Colp [Mon, 16 Dec 2019 12:04:29 +0000 (06:04 -0600)] 
Merge "ACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging." into 13

5 years agores_fax: wrap v21 detected Asterisk initiated negotiation with config option
Kevin Harwell [Fri, 13 Dec 2019 19:46:17 +0000 (13:46 -0600)] 
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

5 years agoapp_voicemail: warning when is compiling
Stanislav [Thu, 12 Dec 2019 19:26:06 +0000 (21:26 +0200)] 
app_voicemail: warning when is compiling

Change-Id: Ib53eba1a66e25fbeba61c620bd3edd462f699ada

ASTERISK-28628

Change-Id: Ib53eba1a66e25fbeba61c620bd3edd462f699ada

5 years agoUpdate CHANGES and UPGRADE.txt for 13.30.0
Asterisk Development Team [Thu, 12 Dec 2019 11:01:37 +0000 (06:01 -0500)] 
Update CHANGES and UPGRADE.txt for 13.30.0

5 years agoPJSIP_CONTACT: add missing argument documentation
Pascal Cadotte Michaud [Wed, 11 Dec 2019 16:52:31 +0000 (11:52 -0500)] 
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

5 years agoMerge "Revert "PJSIP_CONTACT: add missing argument documentation"" into 13
George Joseph [Wed, 11 Dec 2019 16:35:45 +0000 (10:35 -0600)] 
Merge "Revert "PJSIP_CONTACT: add missing argument documentation"" into 13

5 years agoRevert "PJSIP_CONTACT: add missing argument documentation"
Joshua Colp [Wed, 11 Dec 2019 13:01:01 +0000 (07:01 -0600)] 
Revert "PJSIP_CONTACT: add missing argument documentation"

This reverts commit 3778e1abcd9ffb7fb92253b8333e048239d9f348.

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: I07b539d0406e8af08934a91223e850444bde1b75

5 years agoMerge "res_pjsip_registrar.c: Prevent potential double free if AOR is not found"...
Friendly Automation [Mon, 9 Dec 2019 16:24:11 +0000 (10:24 -0600)] 
Merge "res_pjsip_registrar.c: Prevent potential double free if AOR is not found" into 13

5 years agochan_sip: in case of tcp/tls, be less annoying about tx errors.
Jaco Kroon [Wed, 4 Dec 2019 14:35:35 +0000 (16:35 +0200)] 
chan_sip:  in case of tcp/tls, be less annoying about tx errors.

chan_sip.c:3782 __sip_xmit: sip_xmit of 0x7f1478069230 (len 600) to
213.150.203.60:1492 returned -2: Interrupted system call

returned -2 implies this wasn't actually an OS error, so errno makes no
sense either.  Internal error was already logged higher up, and -2
generally means that either there isn't a valid connection available, or
the pipe notification failed, and that is already correctly logged.

ASTERISK-28651 #close

Change-Id: I46eb82924beeff9dfd86fa6c7eb87d2651b950f2
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
5 years agoMerge "app_queue: Fix old confusing comment about when the members are called" into 13
Friendly Automation [Fri, 6 Dec 2019 19:29:35 +0000 (13:29 -0600)] 
Merge "app_queue: Fix old confusing comment about when the members are called" into 13

5 years agores_pjsip_nat: Restore original contact for REGISTER responses
George Joseph [Mon, 26 Aug 2019 02:20:13 +0000 (20:20 -0600)] 
res_pjsip_nat: Restore original contact for REGISTER responses

RFC3261 Section 10 "Registrations", specifically paragraph
"10.2.4: Refreshing Bindings", states that a user agent compares
each contact address (in a 200 REGISTER response) to see if it
created the contact.  If the Asterisk endpoint has the
rewrite_contact option set however, the contact host and port sent
back in the 200 response will be the rewritten one and not the
one sent by the user agent.  This prevents the user agent from
matching its own contact.  Some user agents get very upset when
this happens and will not consider the registration successful.
While this is rare, it is acceptable behavior especially if more
than 1 user agent is allowed to register to a single endpoint/aor.

This commit updates res_pjsip_nat (where rewrite_contact is
implemented) to store the original incoming Contact header in
a new "x-ast-orig-host" URI parameter before rewriting it, and to
restore the original host and port to the Contact headers in the
outgoing response.

This is only done if the request is a REGISTER and rewrite_contact
is enabled.

pjsip_message_filter was also updated to ensure that if a request
comes in with any existing x-ast-* URI parameters, we remove them
so they don't conflict.  Asterisk will never send a request
with those headers in it but someone might just decide to add them
to a request they craft and send to Asterisk.

NOTE: If a device changes its contact address and registers again,
it's a NEW registration.  If the device didn't unregister the
original registration then all existing behavior based
on aor/remove_existing and aor/max_contacts apply.

ASTERISK-28502
Reported-by: Ross Beer
Change-Id: Idc263ad2d2d7bd8faa047e5804d96a5fe1cd282e

5 years agoMerge "res_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases...
Friendly Automation [Fri, 6 Dec 2019 14:44:54 +0000 (08:44 -0600)] 
Merge "res_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases" into 13

5 years agoMerge "channel.c: Resolve issue with receiving SIP INFO packets for DTMF" into 13
Friendly Automation [Fri, 6 Dec 2019 14:35:01 +0000 (08:35 -0600)] 
Merge "channel.c: Resolve issue with receiving SIP INFO packets for DTMF" into 13

5 years agoACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging.
Jaco Kroon [Wed, 4 Dec 2019 08:35:52 +0000 (10:35 +0200)] 
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>
5 years agoMerge "PJSIP_CONTACT: add missing argument documentation" into 13
Friendly Automation [Thu, 5 Dec 2019 00:27:10 +0000 (18:27 -0600)] 
Merge "PJSIP_CONTACT: add missing argument documentation" into 13

5 years agoMerge "chan_sip+native_bridge_rtp: no directmedia for ptime other than default ptime...
Friendly Automation [Thu, 5 Dec 2019 00:03:59 +0000 (18:03 -0600)] 
Merge "chan_sip+native_bridge_rtp: no directmedia for ptime other than default ptime." into 13

5 years agoMerge "res_pjsip_session.c: Prevent use-after-free with TEST_FRAMEWORK enabled" into 13
Friendly Automation [Wed, 4 Dec 2019 23:18:21 +0000 (17:18 -0600)] 
Merge "res_pjsip_session.c: Prevent use-after-free with TEST_FRAMEWORK enabled" into 13

5 years agoMerge "parking: Fall back to parker channel name even if it matches parkee." into 13
Friendly Automation [Wed, 4 Dec 2019 23:11:05 +0000 (17:11 -0600)] 
Merge "parking: Fall back to parker channel name even if it matches parkee." into 13

5 years agores_pjsip_registrar.c: Prevent potential double free if AOR is not found
Sean Bright [Wed, 4 Dec 2019 21:26:46 +0000 (16:26 -0500)] 
res_pjsip_registrar.c: Prevent potential double free if AOR is not found

The simple fix here is simply to NULL out username and password after we call
ast_free on them. Unfortunately, I noticed that we weren't checking for
allocation failures for username and password, and adding those checks made
things noisy and cumbersome.

So instead we partially rollback the recent LGTM patch, and move the alloca
calls into find_aor_name().

ASTERISK-28641 #close
Reported by: Ross Beer

Change-Id: Ic9d01624e717a020be0b0aee31f0814e7f1ffbe2

5 years agores_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases
Sean Bright [Wed, 4 Dec 2019 21:12:39 +0000 (16:12 -0500)] 
res_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases

We're appropriately sizing the id_domain_alias buffer, but then copying the data
into the id_domain one. We were then using the uninitialized id_domain_alias
buffer we just allocated.

This is ASTERISK~28641 adjacent, but significant enough to warrant its own
patch.

Change-Id: I81c38724d18deab8c6573153e2b99dbb6e2f33d9

5 years agoapp_queue: Fix old confusing comment about when the members are called
Walter Doekes [Wed, 4 Dec 2019 09:33:44 +0000 (10:33 +0100)] 
app_queue: Fix old confusing comment about when the members are called

ASTERISK-28644

Change-Id: I2771a931d00a8fc2b9f9a4d1a33ea8f1ad24e06b

5 years agochan_sip+native_bridge_rtp: no directmedia for ptime other than default ptime.
Frederic LE FOLL [Wed, 27 Nov 2019 18:11:33 +0000 (19:11 +0100)] 
chan_sip+native_bridge_rtp: no directmedia for ptime other than default ptime.

During capabilities selection (joint capabilities of us and peer,
configured capability for this peer, or general configured
capabilities), if sip_new() does not keep framing information,
then directmedia activation will fail for any framing different
from default framing.

ASTERISK-28637

Change-Id: I99257502788653c2816fc991cac7946453082466

5 years agores_pjsip_session.c: Prevent use-after-free with TEST_FRAMEWORK enabled
Sean Bright [Tue, 3 Dec 2019 21:42:00 +0000 (16:42 -0500)] 
res_pjsip_session.c: Prevent use-after-free with TEST_FRAMEWORK enabled

We need to copy the endpoint name before we call ao2_cleanup() on it,
otherwise we might try to access memory that has been reclaimed.

ASTERISK-28445 #close
Reported by: Bernhard Schmidt

Change-Id: I404b952608aa606e0babd3c4108346721fb726b3

5 years agochannel.c: Resolve issue with receiving SIP INFO packets for DTMF
George Joseph [Fri, 22 Nov 2019 16:39:36 +0000 (09:39 -0700)] 
channel.c: Resolve issue with receiving SIP INFO packets for DTMF

The problem is essentially the same as in ASTERISK~28245. Besides
the direct media scenario we have an additional scenario where a
special client is involved. This device mutes audio by default in
transmit direction (no rtp frames) and activates audio only by a
foot switch. In this situation dtmf input (pin for conferences,
transfer features codes , etc) using SIP INFO mode is not
understood properly especially when SIP INFO messages are sent
quickly.

This patch ensures that SIP INFO frames are properly queued and
processed in the above scenario. The patch also corrects situations
where successive dtmf events are received quicker than the
signalled event duration (plus minimum gap/pause) allows, i.e. DTMF
events have to be buffered in the ast channel read queue and
emulation has to be processed asynchronously at slower speed.

Reported by: Thomas Arimont
patches:
  trigger_dtmf_emulation.patch submitted by Thomas Arimont (license 5525)

Change-Id: I309bf61dd065c9978c8e48f5b9a936ab47de64c2

5 years agoMerge "CI: Turn off shallow cloning altogether" into 13
Friendly Automation [Mon, 2 Dec 2019 13:08:31 +0000 (07:08 -0600)] 
Merge "CI: Turn off shallow cloning altogether" into 13

5 years agoCI: Turn off shallow cloning altogether
George Joseph [Mon, 2 Dec 2019 12:48:01 +0000 (05:48 -0700)] 
CI: Turn off shallow cloning altogether

Change-Id: I73ed4aef33a92f20080128aafc34e19fd4457196

5 years agoMerge "res_pjsip_t38: T.38 error correction mode selection at 200 ok received" into 13
Joshua Colp [Mon, 2 Dec 2019 12:47:34 +0000 (06:47 -0600)] 
Merge "res_pjsip_t38: T.38 error correction mode selection at 200 ok received" into 13

5 years agoparking: Fall back to parker channel name even if it matches parkee.
Joshua Colp [Mon, 25 Nov 2019 12:55:27 +0000 (12:55 +0000)] 
parking: Fall back to parker channel name even if it matches parkee.

ASTERISK-28631

Change-Id: Ia74d084799fbb9bee3403e30d2391aacd46243cc

5 years agoMerge "res_pjsip_session.c: Check for port of zero on incoming SDP." into 13
Benjamin Keith Ford [Thu, 21 Nov 2019 19:42:39 +0000 (13:42 -0600)] 
Merge "res_pjsip_session.c: Check for port of zero on incoming SDP." into 13

5 years agoMerge "manager.c: Prevent the Originate action from running the Originate app" into 13
Friendly Automation [Thu, 21 Nov 2019 18:17:47 +0000 (12:17 -0600)] 
Merge "manager.c:  Prevent the Originate action from running the Originate app" into 13

5 years agochan_sip.c: Prevent address change on unauthenticated SIP request.
Ben Ford [Mon, 21 Oct 2019 19:55:06 +0000 (14:55 -0500)] 
chan_sip.c: Prevent address change on unauthenticated SIP request.

If the name of a peer is known and a SIP request is sent using that
peer's name, the address of the peer will change even if the request
fails the authentication challenge. This means that an endpoint can
be altered and even rendered unusuable, even if it was in a working
state previously. This can only occur when the nat option is set to the
default, or auto_force_rport.

This change checks the result of authentication first to ensure it is
successful before setting the address and the nat option.

ASTERISK-28589 #close

Change-Id: I581c5ed1da60ca89f590bd70872de2b660de02df

5 years agomanager.c: Prevent the Originate action from running the Originate app
George Joseph [Thu, 24 Oct 2019 17:41:23 +0000 (11:41 -0600)] 
manager.c:  Prevent the Originate action from running the Originate app

If an AMI user without the "system" authorization calls the
Originate AMI command with the Originate application,
the second Originate could run the "System" command.

Action: Originate
Channel: Local/1111
Application: Originate
Data: Local/2222,app,System,touch /tmp/owned

If the "system" authorization isn't set, we now block the
Originate app as well as the System, Exec, etc. apps.

ASTERISK-28580
Reported by: Eliel Sardañons

Change-Id: Ic4c9dedc34c426f03c8c14fce334a71386d8a5fa

5 years agores_pjsip_session.c: Check for port of zero on incoming SDP.
Ben Ford [Fri, 8 Nov 2019 19:21:15 +0000 (13:21 -0600)] 
res_pjsip_session.c: Check for port of zero on incoming SDP.

If a re-invite comes in initiating T.38, but there is no c line in the
SDP and the port is also 0, a crash can occur. A check is now done on
the port to see if the steam is already declined, preventing the crash.
The logic was moved to res_pjsip_session.c because it is handled in a
similar manner in later versions of Asterisk.

ASTERISK-28612
Reported by: Salah Ahmed

Change-Id: Ifc4a0d05b32c7f2156e77fc8435a6ecaa6abada0

5 years agoMerge "app_senddtmf: Add receive mode to AMI Action PlayDTMF" into 13
George Joseph [Thu, 21 Nov 2019 15:20:10 +0000 (09:20 -0600)] 
Merge "app_senddtmf: Add receive mode to AMI Action PlayDTMF" into 13

5 years agoMerge "chan_dahdi: PRI span status may stay "Down, Active" after a short alarm" into 13
Friendly Automation [Thu, 21 Nov 2019 14:44:55 +0000 (08:44 -0600)] 
Merge "chan_dahdi: PRI span status may stay "Down, Active" after a short alarm" into 13

5 years agoPJSIP_CONTACT: add missing argument documentation
Pascal Cadotte Michaud [Thu, 21 Nov 2019 13:24:58 +0000 (08:24 -0500)] 
PJSIP_CONTACT: add missing argument documentation

add missing argument "rtt" and "status" to the documentation

ASTERISK-28626
Change-Id: I8419e4c8203e411b87d93dc395acdbcf7526dedf

5 years agoMerge "res_pjsip_registrar: Fix uninitlized variable warning" into 13
Kevin Harwell [Wed, 20 Nov 2019 22:13:23 +0000 (16:13 -0600)] 
Merge "res_pjsip_registrar: Fix uninitlized variable warning" into 13

5 years agoMerge "app_amd: Fixed timeout issue" into 13
Friendly Automation [Wed, 20 Nov 2019 16:34:25 +0000 (10:34 -0600)] 
Merge "app_amd: Fixed timeout issue" into 13

5 years agoMerge "func_curl.c: Support custom http headers" into 13
Friendly Automation [Wed, 20 Nov 2019 15:55:01 +0000 (09:55 -0600)] 
Merge "func_curl.c: Support custom http headers" into 13

5 years agores_pjsip_t38: T.38 error correction mode selection at 200 ok received
Salah Ahmed [Fri, 15 Nov 2019 17:34:26 +0000 (11:34 -0600)] 
res_pjsip_t38: T.38 error correction mode selection at 200 ok received

if asterisk offer T38 SDP with none error correction scheme and
the endpoint respond with redundancy EC scheme, asterisk switch
to that mode. Since we configure the endpoint as none EC mode
we should not switch to any other mode except none.
following logic implemented in code.

1. If asterisk offer none, and anything except none in answer
   will be ignored.
2. If asterisk offer fec, answer with fec, redundancy and none will
   be accepted.
3. If asterisk offer redundancy, answer with redundancy and none
   will be accepted.

ASTERISK-28621

Change-Id: I343c62253ea4c8b7ee17abbfb377a4d484a14b19

5 years agoCI: Fix missing script block in jenkinsfiles
George Joseph [Tue, 19 Nov 2019 18:11:06 +0000 (11:11 -0700)] 
CI: Fix missing script block in jenkinsfiles

Change-Id: I9f44a3d5085ea7880fad1a3883a4820907e29ea3

5 years agores_pjsip_registrar: Fix uninitlized variable warning
Sean Bright [Tue, 19 Nov 2019 15:31:59 +0000 (10:31 -0500)] 
res_pjsip_registrar: Fix uninitlized variable warning

Fixes: error: ‘domain_name’ may be used uninitialized in this function
Found with gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008

Change-Id: I44413b49ea1205aa25538142161deb73883c79e8

5 years agoCI: Fix missing script block in jenkinsfiles
George Joseph [Tue, 19 Nov 2019 17:40:09 +0000 (10:40 -0700)] 
CI: Fix missing script block in jenkinsfiles

Change-Id: Ib4b6e4887695f230ea7a5b0c879b29fc5a13be4f

5 years agoCI: Increase clone depth and do better cleanup
George Joseph [Tue, 19 Nov 2019 14:51:56 +0000 (07:51 -0700)] 
CI: Increase clone depth and do better cleanup

The original clone depth of 10 was causing the need to rebase
changes whose parent was older than the 10 commits.  The clone
depth has been increased to 100.

Workspace cleanup was only happening for successful builds which
wasn't enough to keep the 8G workspace in-memory drives on the
docker slaves from filling up.  Now the workspaces are cleaned up
after every build regardless of success/failure.  If you need to
preserve builds temporarily, you can log into Jenkins/Manage
Jenkins/Configure System and change the CLEANUP_WS_* environment
variable for the job type you're troubleshooting to "FALSE".

Change-Id: I0d7366e87cea714e5dbc9488caf718802fce75ca

5 years agoMerge "serializer: set high/low alert levels on whole pool" into 13
Friendly Automation [Tue, 19 Nov 2019 16:10:23 +0000 (10:10 -0600)] 
Merge "serializer: set high/low alert levels on whole pool" into 13

5 years agoMerge "parking: Fix case where we can't get the parker." into 13
George Joseph [Tue, 19 Nov 2019 15:23:05 +0000 (09:23 -0600)] 
Merge "parking: Fix case where we can't get the parker." into 13

5 years agochan_dahdi: PRI span status may stay "Down, Active" after a short alarm
Frederic LE FOLL [Thu, 7 Nov 2019 17:54:22 +0000 (18:54 +0100)] 
chan_dahdi: PRI span status may stay "Down, Active" after a short alarm

Upon a short PRI disconnection, libpri may maintain Q.921 layer 'up' and
may thus not send PRI_EVENT_DCHAN_DOWN / PRI_EVENT_DCHAN_UP events.
If pri_event_alarm() clears DCHAN_UP status bit upon alarm detection
and no Q.921 reconnection sequence occurs, chan_dahdi will keep
seeing span status "Down" at the end of alarm.

This patch modifies pri_event_alarm() in order to keep DCHAN_UP bit
unchanged. libpri will send a PRI_EVENT_DCHAN_DOWN event if it detects
a disconnection of Q.921 layer and this will clear DCHAN_UP if required.

ASTERISK-28615

Change-Id: Ibe27df4971fd4c82cc6850020bce4a8b2692c996

5 years agoapp_senddtmf: Add receive mode to AMI Action PlayDTMF
lvl [Thu, 7 Nov 2019 17:05:39 +0000 (17:05 +0000)] 
app_senddtmf: Add receive mode to AMI Action PlayDTMF

ASTERISK-28614

Change-Id: I183501297ae1dc294ae56b34acac9b0343eb2664

5 years agoserializer: set high/low alert levels on whole pool
Alexei Gradinari [Thu, 7 Nov 2019 16:56:57 +0000 (11:56 -0500)] 
serializer: set high/low alert levels on whole pool

The current code sets alert levels starting from index 1.
Need to set on whole pool starting from index 0.

Change-Id: I5decbb43160954fb9a512f04302637fc666b6f5d

5 years agoMerge "func_env: Prevent FILE() from reading garbage at end-of-file" into 13
George Joseph [Mon, 18 Nov 2019 15:54:16 +0000 (09:54 -0600)] 
Merge "func_env: Prevent FILE() from reading garbage at end-of-file" into 13

5 years agoMerge "res_rtp_asterisk: Always return provided DTLS packet length." into 13
Friendly Automation [Mon, 18 Nov 2019 15:13:10 +0000 (09:13 -0600)] 
Merge "res_rtp_asterisk: Always return provided DTLS packet length." into 13

5 years agoMerge "various files - fix some alerts raised by lgtm code analysis" into 13
Friendly Automation [Mon, 18 Nov 2019 15:12:57 +0000 (09:12 -0600)] 
Merge "various files - fix some alerts raised by lgtm code analysis" into 13

5 years agoMerge "bridge_softmix: clear hold when joining a softmix bridge" into 13
Friendly Automation [Mon, 18 Nov 2019 15:12:17 +0000 (09:12 -0600)] 
Merge "bridge_softmix: clear hold when joining a softmix bridge" into 13

5 years agofunc_curl.c: Support custom http headers
Martin Tomec [Thu, 7 Nov 2019 17:54:06 +0000 (17:54 +0000)] 
func_curl.c: Support custom http headers

When user wants to send json data, the default Content-Type header
is incorect (application/x-www-form-urlencoded). This patch allows
to set any custom headers so the Content-Type header can be
overriden. User can set multiple headers by multiple calls of
curlopt(). This approach is not consistent with other parameters,
but is more readable in dialplan than one call with multiple
headers.

ASTERISK-28613

Change-Id: I4dd68c3f4e25362ef941d73a3861f58348dcfbf9

5 years agoparking: Fix case where we can't get the parker.
Joshua Colp [Fri, 15 Nov 2019 10:46:37 +0000 (06:46 -0400)] 
parking: Fix case where we can't get the parker.

ASTERISK-28616

Change-Id: Iabe31ae38d01604284fcc5c2438d44e29a32ea4d

5 years agostasis: Don't hold app_registry and session locks unnecessarily
George Joseph [Wed, 6 Nov 2019 11:47:17 +0000 (04:47 -0700)] 
stasis: Don't hold app_registry and session locks unnecessarily

resource_events:app_handler() was locking the session, then
attempting to determine if the app had debug enabled which
locked the app_registry container.  res_stasis:__stasis_app_register
was locking the app_registry container then calling app_update
which caused app_handler (which locks the session) to run.
The result was a deadlock.

* Updated resource_events:app_handler() to determine if debug was
  set (which locks the app_registry) before obtaining the session lock.

* Updated res_stasis:__stasis_app_register to release the app_registry
  container lock before calling app_update (which locks the sesison).

ASTERISK-28423
Reported by Ross Beer

Change-Id: I58c69d08cb372852a63933608e4d6c3e456247b4

5 years agoapp_amd: Fixed timeout issue
Michael Cargile [Tue, 5 Nov 2019 18:16:48 +0000 (13:16 -0500)] 
app_amd: Fixed timeout issue

ASTERISK_28143 attempted to fix an issue where calls with no audio would never
timeout. It did so by adding AST_FRAME_NULL as a frame type to process in its
calculations. Unfortunately these frames seem to show up at irregular time
intervals. This resulted in app_amd returning prematurely most of the time.

* Removed AST_FRAME_NULL from the calculations
* Added a check to see how much time has actually passed since app_amd began

ASTERISK-28608

Change-Id: I642a21b02d389b17e40ccd5357754b034c3daa42

5 years agores_rtp_asterisk: Always return provided DTLS packet length.
Joshua Colp [Thu, 14 Nov 2019 10:19:04 +0000 (06:19 -0400)] 
res_rtp_asterisk: Always return provided DTLS packet length.

OpenSSL can not tolerate if the packet sent out does not
match the length that it provided to the sender. This change
lies and says that each time the full packet was sent. If
a problem does occur then a retransmission will occur as
appropriate.

ASTERISK-28576

Change-Id: Id42455b15c9dc4eb987c8c023ece6fbf3c22a449

5 years agobridge_softmix: clear hold when joining a softmix bridge
Kevin Harwell [Wed, 13 Nov 2019 23:24:48 +0000 (17:24 -0600)] 
bridge_softmix: clear hold when joining a softmix bridge

MOH continues to play to a channel if that channel was on hold prior to
entering a softmix bridge. MOH will not stop even if the original "holder"
attempts an unhold.

For the most part a softmix bridge ignores holds, so a participating channel
shouldn't join while on hold. This patch checks to see if the channel joining
the softmix bridge is currently on hold. If so then it indicates an unhold.

ASTERISK-28618

Change-Id: I66ccd4efc80f5b4c3dd68186b379eb442916392b

5 years agoparking: Use channel snapshot instead of channel.
Joshua Colp [Tue, 12 Nov 2019 11:00:44 +0000 (07:00 -0400)] 
parking: Use channel snapshot instead of channel.

There exists a scenario where a thread can hold a lock on the
channels container while trying to lock a bridge. At the same
time another thread can hold the lock for said bridge while
attempting to retrieve a channel. This causes a deadlock.

This change fixes this scenario by retrieving a channel snapshot
instead of a channel, as information present in the snapshot
is all that is needed.

ASTERISK-28616

Change-Id: I68ceb1d62c7378addcd286e21be08a660a7cecf2

5 years agofunc_env: Prevent FILE() from reading garbage at end-of-file
Sean Bright [Wed, 13 Nov 2019 20:25:22 +0000 (15:25 -0500)] 
func_env: Prevent FILE() from reading garbage at end-of-file

If the last line of a file does not have a terminating EOL sequence, we
potentially add garbage to the value returned from the FILE() function.

There is no overflow potential here as we are reading from a buffer of a
known size, we are just reading too much of it.

ASTERISK-26481 #close

Change-Id: I50dd4fcf416fb3c83150040a1a79a59d9eb1ae01

5 years agovarious files - fix some alerts raised by lgtm code analysis
Kevin Harwell [Wed, 23 Oct 2019 21:34:27 +0000 (16:34 -0500)] 
various files - fix some alerts raised by lgtm code analysis

This patch fixes several issues reported by the lgtm code analysis tool:

https://lgtm.com/projects/g/asterisk/asterisk

Not all reported issues were addressed in this patch. This patch mostly fixes
confirmed reported errors, potential problematic code points, and a few other
"low hanging" warnings or recommendations found in core supported modules.
These include, but are not limited to the following:

* innapropriate stack allocation in loops
* buffer overflows
* variable declaration "hiding" another variable declaration
* comparisons results that are always the same
* ambiguously signed bit-field members
* missing header guards

Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25

5 years agocdr_mysql: Fix missing use of 'my_bool' with MySql >= 8.0.1
George Joseph [Tue, 29 Oct 2019 13:35:10 +0000 (07:35 -0600)] 
cdr_mysql:  Fix missing use of 'my_bool' with MySql >= 8.0.1

MySql 8.0.1 replaced the "my_bool" type with "bool" so an #if
was added to use "bool" with MYSQL_VERSION_ID >= 80001.

ASTERISK-28604

Change-Id: I66a28d8f0011e33774edee13a6f8efd2302bb920

5 years agores_pjsip_outbound_registration: Extend documentation for "max_retries".
Joshua Colp [Fri, 25 Oct 2019 11:46:41 +0000 (11:46 +0000)] 
res_pjsip_outbound_registration: Extend documentation for "max_retries".

If the "max_retries" option is set to 0 then upon failure no
further attemps are made, so explicitly document the behavior.

ASTERISK-28602

Change-Id: I1e30daae9dd6c49ce18744164214d3def505acbf

5 years agoMerge "res_calendar: Resolve memory leak on calendar destruction" into 13
Friendly Automation [Tue, 29 Oct 2019 14:37:27 +0000 (09:37 -0500)] 
Merge "res_calendar: Resolve memory leak on calendar destruction" into 13

5 years agores_calendar: Resolve memory leak on calendar destruction
Sean Bright [Thu, 24 Oct 2019 14:15:14 +0000 (10:15 -0400)] 
res_calendar: Resolve memory leak on calendar destruction

Calling ne_uri_parse allocates memory that needs to be freed with a
corresponding call to ne_uri_free.

ASTERISK-28572 #close

Change-Id: I8a6834da27000a6807d89cb7a157b2a88fcb5e61

5 years agores_ari_events: Add module reference when a WebSocket is open.
Joshua Colp [Thu, 24 Oct 2019 10:21:31 +0000 (07:21 -0300)] 
res_ari_events: Add module reference when a WebSocket is open.

This change ensures that the module isn't unloaded when a
WebSocket is open. Previously it was possible to unload the
module manually or during shutdown which could cause a crash
when any active WebSockets were terminated.

ASTERISK-28585

Change-Id: I85c71ab112f99875b586419a34c08c8b34c14c5c

5 years agoMerge "utils.h: Set lower bound for thread stack size to PTHREAD_STACK_MIN" into 13
Friendly Automation [Mon, 21 Oct 2019 18:21:30 +0000 (13:21 -0500)] 
Merge "utils.h: Set lower bound for thread stack size to PTHREAD_STACK_MIN" into 13

5 years agoutils.h: Set lower bound for thread stack size to PTHREAD_STACK_MIN
Sean Bright [Fri, 18 Oct 2019 18:47:20 +0000 (14:47 -0400)] 
utils.h: Set lower bound for thread stack size to PTHREAD_STACK_MIN

ASTERISK-28590 #close

Change-Id: I51abce00c04d0a06550bda5205580705185b9c1c