Commit Graph

32315 Commits

Author SHA1 Message Date
Asterisk Development Team
03762290c4 Update for 16.7.0-rc2 16.7.0-rc2 2019-12-18 10:50:32 -05:00
Friendly Automation
8cc89c98a7 Merge "Revert "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up"" into 16.7 2019-12-18 09:37:23 -06:00
George Joseph
c8720cf153 Revert "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up"
There are reports that this commit causes deadlocks when issuing
a "pri show" CLI command and a channel is in the process of being
hung up.  Further work is in progress to determine the cause of
the deadlock and provide a permanent fix.

ASTERISK~28605  #keeping open
Reported by: Dirk Wendland

This reverts commit c6b17b5212.

Change-Id: Iddd900c1abdd5074ff39c17cdce855f2f436cef9
2019-12-18 07:39:06 -07:00
George Joseph
e3038c3629 res_rtp_asterisk: Add frame list cleanups to ast_rtp_read
In Asterisk 16+, there are a few places in ast_rtp_read where we've
allocated a frame list but return a null frame instead of the list.
In these cases, any frames left in the list won't be freed.  In the
vast majority of the cases, the list is empty when we return so
there's nothing to free but there have been leaks reported in the
wild that can be traced back to frames left in the list before
returning.

The escape paths now all have logic to free frames left in the
list.

ASTERISK-28609
Reported by: Ted G

Change-Id: Ia1d7075857ebd26b47183c44b1aebb0d8f985f7a
2019-12-18 08:04:53 -06:00
Friendly Automation
1cb7dd49a7 Merge "configure: Add check for MySQL client bool and my_bool type usage." into 16.7 2019-12-18 06:57:45 -06:00
Joshua C. Colp
f4ac2c5cef 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:35:57 -06:00
Joshua C. Colp
ef0bca0a05 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:24:03 -06:00
Asterisk Development Team
0aa75cd2cb Update for 16.7.0-rc1 16.7.0-rc1 2019-12-12 06:18:24 -05:00
Asterisk Development Team
9240fcd8bb Update CHANGES and UPGRADE.txt for 16.7.0 2019-12-12 06:03:22 -05:00
George Joseph
4631e77078 Merge "Revert "PJSIP_CONTACT: add missing argument documentation"" into 16 2019-12-11 10:35:59 -06:00
Joshua Colp
9c29c3fb3e Revert "PJSIP_CONTACT: add missing argument documentation"
This reverts commit 174e6426aa.

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: I2c9656fb40b2d2f56f54caa35c8be02cc92babd0
2019-12-11 07:01:12 -06:00
Friendly Automation
59799b10bf Merge "res_pjsip_registrar.c: Prevent potential double free if AOR is not found" into 16 2019-12-09 10:28:31 -06:00
Joshua Colp
585e5288c8 Merge "app_queue: Fix old confusing comment about when the members are called" into 16 2019-12-09 05:43:23 -06:00
George Joseph
7f2bbff48c Merge "channel.c: Resolve issue with receiving SIP INFO packets for DTMF" into 16 2019-12-06 12:40:42 -06:00
Friendly Automation
439d42a594 Merge "res_pjsip_outbound_registration: add support for SRV failover" into 16 2019-12-06 09:20:15 -06:00
Friendly Automation
c1176286a2 Merge "res_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases" into 16 2019-12-06 08:55:24 -06:00
Joshua Colp
440ffa4b3d Merge "chan_sip+native_bridge_rtp: no directmedia for ptime other than default ptime." into 16 2019-12-05 07:53:41 -06:00
Friendly Automation
7620d1256c Merge "PJSIP_CONTACT: add missing argument documentation" into 16 2019-12-04 18:33:36 -06:00
Kevin Harwell
1ea4f0e7c5 Merge "res_pjsip_session.c: Prevent use-after-free with TEST_FRAMEWORK enabled" into 16 2019-12-04 18:02:50 -06:00
Kevin Harwell
7f843116d3 Merge "parking: Fall back to parker channel name even if it matches parkee." into 16 2019-12-04 17:34:46 -06:00
Sean Bright
68ce999351 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
2019-12-04 16:18:24 -06:00
Sean Bright
5c20cc4c3a 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
2019-12-04 16:15:09 -06:00
Walter Doekes
161e762742 app_queue: Fix old confusing comment about when the members are called
ASTERISK-28644

Change-Id: I2771a931d00a8fc2b9f9a4d1a33ea8f1ad24e06b
2019-12-04 11:38:40 -06:00
Sean Bright
fbc80db350 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
2019-12-03 16:42:03 -05:00
George Joseph
dd07ac6a3a Merge "media_cache.c: Various CLI improvements" into 16 2019-12-02 16:02:13 -06:00
George Joseph
43d4c0e3c9 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
2019-12-02 08:39:26 -06:00
George Joseph
80199cd67f CI: Turn off shallow cloning altogether
Change-Id: I73ed4aef33a92f20080128aafc34e19fd4457196
2019-12-02 07:53:36 -05:00
Joshua Colp
328a6b2381 Merge "res_pjsip_t38: T.38 error correction mode selection at 200 ok received" into 16 2019-12-02 06:41:18 -06:00
Frederic LE FOLL
31173f6586 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
2019-11-27 19:16:59 +01:00
Joshua Colp
c91b28c72d parking: Fall back to parker channel name even if it matches parkee.
ASTERISK-28631

Change-Id: Ia74d084799fbb9bee3403e30d2391aacd46243cc
2019-11-25 07:57:12 -05:00
Sean Bright
bd3cb1b300 media_cache.c: Various CLI improvements
* Use ast_cli_completion_add() to improve performance when large number of
  cached items are present.

* Only complete one URI for commands that only accept a single URI.

* Change command documentation to wrap at 80 characters to improve
  readability.

Change-Id: Iedb0a2c3541e49561bc231dca2dcc0ebd8612902
2019-11-22 16:38:12 -05:00
Asterisk Development Team
9eb86a8110 Update CHANGES and UPGRADE.txt for 16.6.2 2019-11-21 16:11:21 -05:00
Salah Ahmed
efef44985d 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
2019-11-21 16:09:40 -05:00
Friendly Automation
5802e32d47 Merge "chan_sip.c: Prevent address change on unauthenticated SIP request." into 16 2019-11-21 13:36:30 -06:00
Ben Ford
8cdaa93e65 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
2019-11-21 09:46:05 -06:00
George Joseph
7574be5110 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
2019-11-21 09:40:41 -06:00
George Joseph
a1eb0d7355 Merge "chan_dahdi: PRI span status may stay "Down, Active" after a short alarm" into 16 2019-11-21 09:22:01 -06:00
Friendly Automation
17f52679b2 Merge "app_senddtmf: Add receive mode to AMI Action PlayDTMF" into 16 2019-11-21 08:34:24 -06:00
Pascal Cadotte Michaud
174e6426aa PJSIP_CONTACT: add missing argument documentation
add missing argument "rtt" and "status" to the documentation

ASTERISK-28626
Change-Id: I8419e4c8203e411b87d93dc395acdbcf7526dedf
2019-11-21 08:59:50 -05:00
Kevin Harwell
f8e4473e16 Merge "func_curl.c: Support custom http headers" into 16 2019-11-20 16:17:33 -06:00
Kevin Harwell
3cd57aaff2 res_pjsip_outbound_registration: add support for SRV failover
ASTERISK-28624

Change-Id: I8da7c300dd985ab7b10dbd5194aff2f737808561
2019-11-20 12:56:08 -06:00
Friendly Automation
337d735ab8 Merge "app_amd: Fixed timeout issue" into 16 2019-11-20 09:58:58 -06:00
Friendly Automation
a78bc75714 Merge "res_pjsip_registrar: Fix uninitlized variable warning" into 16 2019-11-20 08:06:52 -06:00
George Joseph
d075d8913b CI: Fix missing script block in jenkinsfiles
Change-Id: I9f44a3d5085ea7880fad1a3883a4820907e29ea3
(cherry picked from commit 95213b01d2)
2019-11-19 13:13:07 -05:00
George Joseph
ce8a23fdf9 CI: Fix missing script block in jenkinsfiles
Change-Id: Ib4b6e4887695f230ea7a5b0c879b29fc5a13be4f
(cherry picked from commit d60f23ecbd)
2019-11-19 13:03:31 -05:00
George Joseph
e649d6f33d Merge "CI: Increase clone depth and do better cleanup" into 16 2019-11-19 11:16:33 -06:00
George Joseph
919bc0c7be 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
2019-11-19 11:58:18 -05:00
Friendly Automation
b7c0711c5c Merge "serializer: set high/low alert levels on whole pool" into 16 2019-11-19 10:14:20 -06:00
Sean Bright
61a3e7e79b 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
2019-11-19 10:32:49 -05:00
George Joseph
46cc0a3660 Merge "parking: Fix case where we can't get the parker." into 16 2019-11-19 09:23:42 -06:00