]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
4 years agoBridging: Use a ref to bridge_channel's channel to prevent crash. certified/13.21
Ben Ford [Mon, 31 Aug 2020 16:14:20 +0000 (11:14 -0500)] 
Bridging: Use a ref to bridge_channel's channel to prevent crash.

There's a race condition with bridging where a bridge can be torn down
causing the bridge_channel's ast_channel to become NULL when it's still
needed. This particular case happened with attended transfers, but the
crash occurred when trying to publish a stasis message. Now, the
bridge_channel is locked, a ref to the ast_channel is obtained, and that
ref is passed down the chain.

Change-Id: Ic48715c0c041615d17d286790ae3e8c61bb28814

5 years agoUpdate for certified/13.21-cert6 certified/13.21-cert6
Asterisk Development Team [Mon, 23 Dec 2019 16:55:19 +0000 (11:55 -0500)] 
Update for certified/13.21-cert6

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 "parking: Fall back to parker channel name even if it matches parkee." into...
Kevin Harwell [Wed, 4 Dec 2019 23:35:44 +0000 (17:35 -0600)] 
Merge "parking: Fall back to parker channel name even if it matches parkee." into certified/13.21

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 agoAdd directories and README files for staging changes.
Ben Ford [Fri, 22 Nov 2019 15:31:47 +0000 (09:31 -0600)] 
Add directories and README files for staging changes.

While doing a release, problems were encountered running the
process-staging-changes script. These directories and the README.md
files were missing from the certified branches. Adding them in to be in
line with the other branches.

Also fixing the .gitreview file to point to the correct branch.

Change-Id: Ia9e2ecce31ef35838da5f3166aac321b577d16c2

5 years agoUpdate for certified/13.21-cert5 certified/13.21-cert5
Asterisk Development Team [Thu, 21 Nov 2019 21:29:32 +0000 (16:29 -0500)] 
Update for certified/13.21-cert5

5 years agoUpdate CHANGES and UPGRADE.txt for 13.21-cert5
Asterisk Development Team [Thu, 21 Nov 2019 21:25:04 +0000 (16:25 -0500)] 
Update CHANGES and UPGRADE.txt for 13.21-cert5

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

5 years agoMerge "manager.c: Prevent the Originate action from running the Originate app" into...
Benjamin Keith Ford [Thu, 21 Nov 2019 19:33:46 +0000 (13:33 -0600)] 
Merge "manager.c:  Prevent the Originate action from running the Originate app" into certified/13.21

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 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 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 agores_pjsip_pubsub: change warning to debug
Kevin Harwell [Tue, 24 Sep 2019 16:21:12 +0000 (11:21 -0500)] 
res_pjsip_pubsub: change warning to debug

The following message:

"Subscription request from endpoint <blah> rejected. Expiration of 0 is invalid"

Would sometimes spam the log with warnings if Asterisk restarted and a bunch
of clients sent unsubscribes. This patch changes it from a warning to a debug
message.

Change-Id: I841ec42f65559f3135e037df0e55f89b6447a467

5 years agores_sorcery_memory_cache: stale item update leak
Kevin Harwell [Mon, 23 Sep 2019 16:01:36 +0000 (11:01 -0500)] 
res_sorcery_memory_cache: stale item update leak

When a stale item was being updated the object was being retrieved, but its
reference was not being decremented after the update. This patch makes it so
the object is now appropriately de-referenced.

ASTERISK-28523

Change-Id: I9d8173d3a0416a242f4eba92fa0853279c500ec7

5 years agochan_pjsip: Relock correct channel during "fax" redirect.
Joshua Colp [Sun, 15 Sep 2019 19:35:45 +0000 (19:35 +0000)] 
chan_pjsip: Relock correct channel during "fax" redirect.

When fax detection occurs on an outbound PJSIP channel the
redirect operation will result in a masquerade occurring and
the underlying channel on the session changing. The code
incorrectly relocked the new channel instead of the old
channel when returning. This resulted in the new channel
being locked indefinitely. The code now always acts on the
expected channel.

ASTERISK-28538

Change-Id: I2b2e60d07e74383ae7e90d752c036c4b02d6b3a3

5 years agoCI: Escape backslashes in printenv/sort/tr
George Joseph [Thu, 8 Aug 2019 17:10:11 +0000 (11:10 -0600)] 
CI: Escape backslashes in printenv/sort/tr

Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94

6 years agoCI: Add "throttle" label and "skip_gate" capability
George Joseph [Thu, 8 Aug 2019 12:12:18 +0000 (06:12 -0600)] 
CI:  Add "throttle" label and "skip_gate" capability

To make throttling by label fully active, the "throttle" option
has to be specified with a specific label.

You can now specify "skip_gate" in the Gerrit comments when you
do a +2 code review to tell Jenkins not to actually run the
gate.  You'd do this if you plan to manually merge the change.

Also updated the "printenv" debug output to better sort multi-line
comments.

Change-Id: I4c0b1085acec4805f2ca207eebac50aad81f27e2

6 years agoCI: Make node labels job-specific
George Joseph [Tue, 6 Aug 2019 15:40:54 +0000 (09:40 -0600)] 
CI:  Make node labels job-specific

Originally, the eligible nodes for a job were labelled only by
"swdev-docker".  So basically any node could run any job.  We had
found that allowing a node to run more than 1 gate at a time was
problematic so we limited the nodes to processing 1 job at a time.
With the creation of the Asterisk 17 branches however, we now have
so many active branches that getting checks and gates through in
a timely manner is problematic when a node can run only 1 job
at a time.

Now the nodes are also labelled by the job type they can run.
For instance: "asterisk-check", "asterisk-gate", etc.  With the
"Throttle Concurrent Builds" plugin, we can now allow a node to
run more than 1 job BUT throttle by job type.  For instance:
  Allow 2 jobs but only 1 asterisk-gate at a time.
Now a node can run 2 checks or 1 check and 1 gate or 1 gate but
not 2 gates at a time.

Change-Id: I2032bf6afbcec5c341d9b852214c0c812d3d6db5

6 years agoMerge ".gitreview: Update defaultbranch for certified" into certified/13.21
Joshua Colp [Mon, 29 Jul 2019 09:57:17 +0000 (04:57 -0500)] 
Merge ".gitreview:  Update defaultbranch for certified" into certified/13.21

6 years ago.gitreview: Update defaultbranch for certified
George Joseph [Fri, 26 Jul 2019 13:38:41 +0000 (07:38 -0600)] 
.gitreview:  Update defaultbranch for certified

Change-Id: Ied1a0488a777bec513cc351c3ed8e25741bfc11f

6 years agoCI: Don't enable non-core modules in Certified branches
George Joseph [Wed, 24 Jul 2019 20:15:27 +0000 (14:15 -0600)] 
CI:  Don't enable non-core modules in Certified branches

We don't support non-core modules for Certified releases but we
were enabling them for CI builds which was causing lots of test
failures.  Now we don't.

NOTE:  This change required that the rest of the CI shell scripts
and jenkinsfiles be updates to the same level as certified/16.3.

Change-Id: I0b3254c08a2479f3d39151690350cce5ce5ad766

6 years agoUpdate for certified/13.21-cert4 certified/13.21-cert4
Asterisk Development Team [Thu, 11 Jul 2019 19:26:35 +0000 (14:26 -0500)] 
Update for certified/13.21-cert4

6 years agoMerge "chan_sip: Handle invalid SDP answer to T.38 re-invite" into certified/13.21
Benjamin Keith Ford [Thu, 11 Jul 2019 19:01:00 +0000 (14:01 -0500)] 
Merge "chan_sip: Handle invalid SDP answer to T.38 re-invite" into certified/13.21

6 years agores_pjsip_messaging: Check for body in in-dialog message
George Joseph [Wed, 12 Jun 2019 18:03:04 +0000 (12:03 -0600)] 
res_pjsip_messaging:  Check for body in in-dialog message

We now check that a body exists and it has a length > 0 before
attempting to process it.

ASTERISK-28447
Reported-by: Gil Richard
Change-Id: Ic469544b22ab848734636588d4c93426cc6f4b1f

6 years agochan_sip: Handle invalid SDP answer to T.38 re-invite
Francesco Castellano [Fri, 28 Jun 2019 16:15:31 +0000 (18:15 +0200)] 
chan_sip: Handle invalid SDP answer to T.38 re-invite

The chan_sip module performs a T.38 re-invite using a single media
stream of udptl, and expects the SDP answer to be the same.

If an SDP answer is received instead that contains an additional
media stream with no joint codec a crash will occur as the code
assumes that at least one joint codec will exist in this
scenario.

This change removes this assumption.

ASTERISK-28465

Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87

6 years agocore: Add some documentation to the malloc_trim code
Sean Bright [Mon, 3 Dec 2018 22:41:56 +0000 (17:41 -0500)] 
core: Add some documentation to the malloc_trim code

This adds documentation to handle_cli_malloc_trim() indicating how it
can be useful when debugging OOM conditions.

Change-Id: I1936185e78035bf123cd5e097b793a55eeebdc78

6 years agocore: Merge malloc_trim patch
Chris-Savinovich [Mon, 3 Dec 2018 20:01:01 +0000 (14:01 -0600)] 
core: Merge malloc_trim patch

We've had multiple opportunities where Richard Mudgett's
malloc_trim patch has been useful. Let's get it
pushed up to gerrit and merged.

Since malloc_trim is only available in libc, an entry is
added to configure.ac to create a definition for
HAVE_MALLOC_TRIM.

Change-Id: Ia38308c550149d9d6eae4ca414a649957de9700c
(cherry picked from commit 40ab571e0d07f7e1854c0f924b0fbda2da36c5a5)

6 years agobacktrace: Refactor ast_bt_get_symbols so it doesn't crash
George Joseph [Thu, 8 Nov 2018 15:53:44 +0000 (08:53 -0700)] 
backtrace:  Refactor ast_bt_get_symbols so it doesn't crash

We've been seeing crashes in libbfd when we attempt to generate
a stack trace from multiple threads.  It turns out that libbfd
is NOT thread-safe.  It can cache the bfd structure and give it to
multiple threads without protecting itself.  To get around this,
we've added a global mutex around the bfd functions and also have
refactored the use of those functions to be more efficient and
to provide more information about inlined functions.

Also added a few more tests to test_pbx.c.  One just calls
ast_assert() and the other calls ast_log_backtrace().  Neither are
run by default.

WARNING:  This change necessitated changing the return value of
ast_bt_get_symbols() from an array of strings to a VECTOR of
strings.  However, the use of this function outside Asterisk is not
likely.

ASTERISK-28140

Change-Id: I79d02862ddaa2423a0809caa4b3b85c128131621

6 years agoAST-2018-009: Fix crash processing websocket HTTP Upgrade requests
Sean Bright [Thu, 16 Aug 2018 15:45:53 +0000 (11:45 -0400)] 
AST-2018-009: Fix crash processing websocket HTTP Upgrade requests

The HTTP request processing in res_http_websocket allocates additional
space on the stack for various headers received during an Upgrade request.
An attacker could send a specially crafted request that causes this code
to overflow the stack, resulting in a crash.

* No longer allocate memory from the stack in a loop to parse the header
values.  NOTE: There is a slight API change when using the passed in
strings as is.  We now require the passed in strings to no longer have
leading or trailing whitespace.  This isn't a problem as the only callers
have already done this before passing the strings to the affected
function.

ASTERISK-28013 #close

Change-Id: Ia564825a8a95e085fd17e658cb777fe1afa8091a

6 years agores_pjsip: Update default keepalive interval to 90 seconds.
Joshua Colp [Fri, 20 Jul 2018 11:54:35 +0000 (11:54 +0000)] 
res_pjsip: Update default keepalive interval to 90 seconds.

A change recently went in which disabled the built-in PJSIP
keepalive. This defaulted to 90 seconds and kept TCP/TLS
connections alive. Disabling this functionality has resulted
in a behavior change of not doing keepalives by default resulting
in TCP/TLS connections dropping for some people.

This change makes our default keepalive interval 90 seconds
to match the previous behavior and preserve it.

ASTERISK-27978

Change-Id: Ibd9a45f3cbe5d9bb6d2161268696645ff781b1d6

6 years agoBundled PJPROJECT: Disable internal connection oriented keep-alive.
Alexander Traud [Wed, 11 Jul 2018 16:57:53 +0000 (11:57 -0500)] 
Bundled PJPROJECT: Disable internal connection oriented keep-alive.

Turn off the periodic sending of CRLNCRLN.  Default is on (90 seconds),
which conflicts with the global section's keep_alive_interval option in
pjsip.conf.

patches:
  pjsip_keep_not_alive.patch submitted by Alexander Traud (License 6520)

ASTERISK-27347

Change-Id: I6a197f56e1830d3b7e5ec70f17025840a290b057

6 years agores_pjsip/pjsip_transport_management.c: Fix deadlock with transport keep alive.
Richard Mudgett [Tue, 3 Jul 2018 17:10:36 +0000 (12:10 -0500)] 
res_pjsip/pjsip_transport_management.c: Fix deadlock with transport keep alive.

Using the keep_alive_interval option can result in a deadlock between the
pjproject transport manager group lock and the monitored transports ao2
container lock.  The pjproject transport manager group lock has to be
superior in the locking order to the monitored transports ao2 container
lock because of pjproject callbacks called when already holding the group
lock.  The lock inversion happens when Asterisk attempts to send a keep
alive packet over the reliable transports.

* Made keepalive_transport_thread() iterate over the monitored transports
container rather than use the ao2_callback() method.  This avoids holding
the container lock when sending the keep alive packet.

ASTERISK-26686

Change-Id: I5d5392a52e698bbe41a93f7d8e92bf0e61fe3951

7 years agoMerge "Build: Fix modules getting their optimization setting overridden." into certif...
George Joseph [Wed, 18 Jul 2018 14:12:16 +0000 (09:12 -0500)] 
Merge "Build: Fix modules getting their optimization setting overridden." into certified/13.21

7 years agoMerge "res_config_ldap.c: Fix mem leak in CLI "realtime show ldap status"" into certi...
Jenkins2 [Tue, 17 Jul 2018 20:47:03 +0000 (15:47 -0500)] 
Merge "res_config_ldap.c: Fix mem leak in CLI "realtime show ldap status"" into certified/13.21

7 years agoBuild: Fix modules getting their optimization setting overridden.
Richard Mudgett [Fri, 13 Jul 2018 23:26:46 +0000 (18:26 -0500)] 
Build: Fix modules getting their optimization setting overridden.

Asterisk modules that use PJPROJECT services have their compiler
optimization and possibly their symbolic debug options overridden by the
PJPROJECT configure script selected settings.

* We need to filter-out any -O and -g options in PJ_CFLAGS before echoing
out the result so the PJPROJECT_INCLUDE variable does not override the
Asterisk module settings when using bundled PJPROJECT.

NOTE: This patch only has an effect when using bundled PJPROJECT.

ASTERISK-27563

Change-Id: If124169735ecf572ad1535cd43bff94cb44d5b30

7 years agoCI: Fix merge strategy
George Joseph [Tue, 17 Jul 2018 16:09:01 +0000 (10:09 -0600)] 
CI: Fix merge strategy

Change-Id: I5e3fb6adfa6cbf694c0deecf02e3879297b0c12e

7 years agoCI: Fix regex in daily and ref_debug jobs
George Joseph [Tue, 17 Jul 2018 15:41:40 +0000 (09:41 -0600)] 
CI: Fix regex in daily and ref_debug jobs

Change-Id: Icf2e67818b2155a158d2390b138613e1f653ea92

7 years agores_config_ldap.c: Fix mem leak in CLI "realtime show ldap status"
Richard Mudgett [Tue, 17 Jul 2018 15:18:28 +0000 (10:18 -0500)] 
res_config_ldap.c: Fix mem leak in CLI "realtime show ldap status"

Change-Id: Ib2a3622b297b0363c62d23958f7a20039bcb9b4c

7 years agoCI: Add pre-build merge back in as RECURSIVE
George Joseph [Tue, 17 Jul 2018 15:15:58 +0000 (09:15 -0600)] 
CI: Add pre-build merge back in as RECURSIVE

Change-Id: I0ff1730ef4a4f0ac9f18ccc9bc0dfe7a782f57a8

7 years agoCI: Remove pre-build merge from gates and checks
George Joseph [Tue, 17 Jul 2018 14:01:46 +0000 (08:01 -0600)] 
CI: Remove pre-build merge from gates and checks

Change-Id: Ibc151f63dcec4db847915c2f3cbe5b467dd59574

7 years agoCI: Fix logic inversion in runTestsuite
George Joseph [Tue, 17 Jul 2018 12:13:35 +0000 (06:13 -0600)] 
CI: Fix logic inversion in runTestsuite

Change-Id: I56399aa384468f45494c2c3650420563a0b6efe1

7 years agoCI: Add teardownRealtime
George Joseph [Tue, 17 Jul 2018 09:03:02 +0000 (03:03 -0600)] 
CI: Add teardownRealtime

Change-Id: I2fe55c38607eaec2fbf69ef23a5019e0c443a64b

7 years agoFix GCC 8 build issues.
Corey Farrell [Mon, 7 May 2018 15:49:18 +0000 (11:49 -0400)] 
Fix GCC 8 build issues.

This fixes build warnings found by GCC 8.  In some cases format
truncation is intentional so the warning is just suppressed.

ASTERISK-27824 #close

Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84

7 years agomanager: fix digest auth for ami/http mechanism.
Jaco Kroon [Tue, 8 May 2018 09:59:02 +0000 (11:59 +0200)] 
manager: fix digest auth for ami/http mechanism.

Due to a fixed size buffer the digest authentication could be
incorrectly calculated if a large URI was provided, causing
authentication failure. The buffer is now dynamically allocated to allow
any size URI within the normal limits of the HTTP request size.

ASTERISK-27841

Change-Id: I660609db13b8f9e5f9567f339dd804f4985d41b3

7 years agoCI: Prevent Jenkins from triggering jobs back to itself
George Joseph [Mon, 16 Jul 2018 18:30:26 +0000 (12:30 -0600)] 
CI:  Prevent Jenkins from triggering jobs back to itself

Change-Id: I9cae8bb3d1a2cea335d3ccd88d471832549666fd

7 years agoCI: runUnittests: loop a few times on waitfullybooted
George Joseph [Mon, 16 Jul 2018 16:08:57 +0000 (10:08 -0600)] 
CI: runUnittests: loop a few times on waitfullybooted

Change-Id: Icebc0d013896f3b2a7214945cac60647435c1651

7 years agoCI: Add realtime checks to dailies
George Joseph [Mon, 16 Jul 2018 15:49:54 +0000 (09:49 -0600)] 
CI:  Add realtime checks to dailies

Change-Id: I6dc8ab1679b3505c6dde1d47e1b9276df47814f8

7 years agoCI: Add weekly REF_DEBUG testsuite run
George Joseph [Mon, 16 Jul 2018 14:13:40 +0000 (08:13 -0600)] 
CI:  Add weekly REF_DEBUG testsuite run

Change-Id: I5b581d0a0d1d1bb9b38961d40b112fb448355037

7 years agoMerge "CI: Fix bad reporting of status by the verification pub" into certified/13.21
George Joseph [Mon, 16 Jul 2018 15:45:40 +0000 (10:45 -0500)] 
Merge "CI: Fix bad reporting of status by the verification pub" into certified/13.21

7 years agoCI: Fix bad reporting of status by the verification pub
George Joseph [Mon, 16 Jul 2018 13:44:25 +0000 (07:44 -0600)] 
CI: Fix bad reporting of status by the verification pub

Change-Id: I6f31a130b3ba0187149aaaa2ce94195a79e0f6a6

7 years agoCI: Make build tag an acceptable docker name
George Joseph [Mon, 16 Jul 2018 12:16:51 +0000 (06:16 -0600)] 
CI: Make build tag an acceptable docker name

Change-Id: I3a4b8a4a9c488ddabf9daf651dc1334222056f38

7 years agoCI: Add daily periodics to CI
George Joseph [Fri, 13 Jul 2018 11:56:38 +0000 (05:56 -0600)] 
CI: Add daily periodics to CI

Change-Id: I26933e73928e091ae72e838c02f4f2ec7c3983d6

7 years agoCI: Add Asterisk Gates
George Joseph [Thu, 12 Jul 2018 21:34:14 +0000 (15:34 -0600)] 
CI: Add Asterisk Gates

Change-Id: I7e2467f9120812551238d8005deb97f965279205

7 years agoCI: Remove duplicate checkout
George Joseph [Wed, 11 Jul 2018 20:55:55 +0000 (14:55 -0600)] 
CI: Remove duplicate checkout

Change-Id: If5f925b4c4ed7000b153f3ed8386ce2140c886f8

7 years agoCI: Update cleanup steps and permissions
George Joseph [Wed, 11 Jul 2018 20:09:19 +0000 (14:09 -0600)] 
CI: Update cleanup steps and permissions

Change-Id: I7ca92935979d94845af8e1caf4468cbd6209b7de

7 years agoCI: Fix log artifact paths
George Joseph [Wed, 11 Jul 2018 19:54:04 +0000 (13:54 -0600)] 
CI: Fix log artifact paths

Change-Id: I55136de8f4d9c3b56bd4d054306a187bb04a4b7d

7 years agoCI: Remove CleanBeforeCheckout option for testsuite
George Joseph [Wed, 11 Jul 2018 19:45:01 +0000 (13:45 -0600)] 
CI: Remove CleanBeforeCheckout option for testsuite

Change-Id: I510231c9087f7be5272b8ef3f3223eadaaffb754

7 years agoCI: Move gates into source repo
George Joseph [Wed, 11 Jul 2018 19:00:38 +0000 (13:00 -0600)] 
CI: Move gates into source repo

Change-Id: If028ede5f3b127fa274c63ce166bc04ad7c1e5db

7 years agoCI: Initial commit for moving CI into source repo
George Joseph [Wed, 11 Jul 2018 11:14:49 +0000 (05:14 -0600)] 
CI:  Initial commit for moving CI into source repo

Create tests/CI directory and add files used by Jenkins to
build and test Asterisk.

With this commit, Jenkins will run the Asterisk Unit Tests using
the Jenkinsfile at tests/CI/unittests.jenkinsfile.  Bash scripts
to do the actual building and testing are also in the same directory.
Output is placed in tests/CI/output so that directory has been
added to .gitignore.

Change-Id: I9448065465e6de2b878634510ace8fd1ef378608

7 years agotest.c: Make output jUnit compatible
George Joseph [Fri, 6 Jul 2018 14:04:56 +0000 (08:04 -0600)] 
test.c:  Make output jUnit compatible

Separate "name" into "classname" and "name".
Use '.' for classname separator instead of '/'.
Prefix reserved words with '_'.
Wrap output with a top-level "testsuites" element.

Change-Id: Iec1a985eba1c478e5c1d65d5dfd95cb708442099

7 years agoAST-2018-008: Fix enumeration of endpoints from ACL rejected addresses.
Richard Mudgett [Mon, 30 Apr 2018 22:38:58 +0000 (17:38 -0500)] 
AST-2018-008: Fix enumeration of endpoints from ACL rejected addresses.

When endpoint specific ACL rules block a SIP request they respond with a
403 forbidden.  However, if an endpoint is not identified then a 401
unauthorized response is sent.  This vulnerability just discloses which
requests hit a defined endpoint.  The ACL rules cannot be bypassed to gain
access to the disclosed endpoints.

* Made endpoint specific ACL rules now respond with a 401 unauthorized
which is the same as if an endpoint were not identified.  The fix is
accomplished by replacing the found endpoint with the artificial endpoint
which always fails authentication.

ASTERISK-27818

Change-Id: Icb275a54ff8e2df6c671a6d9bda37b5d732b3b32

7 years agoapp_sendtext: Allow content types other than text/plain
George Joseph [Mon, 4 Jun 2018 14:50:51 +0000 (08:50 -0600)] 
app_sendtext:  Allow content types other than text/plain

There was no real reason to limit the conteny type to text/plain other
than that's what it was limited to before.  Now any text/* content
type will be allowed for channel drivers that don't support enhanced
messaging and any type will be allowed for channel drivers that do
support enhanced messaging.

Change-Id: I94a90cfee98b4bc8e22aa5c0b6afb7b862f979d9

7 years agoMerge "app_sendtext: Enhance SendText to support Enhanced Messaging" into certified...
George Joseph [Wed, 23 May 2018 13:42:39 +0000 (08:42 -0500)] 
Merge "app_sendtext:  Enhance SendText to support Enhanced Messaging" into certified/13.21

7 years agoapp_sendtext: Enhance SendText to support Enhanced Messaging
George Joseph [Tue, 10 Apr 2018 21:09:49 +0000 (15:09 -0600)] 
app_sendtext:  Enhance SendText to support Enhanced Messaging

SendText now accepts new channel variables that can be used
to override the To and From display names and set the Content-Type
of a message.  Since you can now set Content-Type, other text/*
content types are now valid.

Change-Id: I648b4574478119f95de09d9f08e9595831b02830

7 years agobridge_softmix: Forward TEXT frames
George Joseph [Wed, 27 Sep 2017 16:44:53 +0000 (10:44 -0600)] 
bridge_softmix:  Forward TEXT frames

Core bridging and, more specifically, bridge_softmix have been
enhanced to relay received frames of type TEXT or TEXT_DATA to all
participants in a softmix bridge.  res_pjsip_messaging and
chan_pjsip have been enhanced to take advantage of this so when
res_pjsip_messaging receives an in-dialog MESSAGE message from a
user in a conference call, it's relayed to all other participants
in the call.

res_pjsip_messaging already queues TEXT frames to the channel when
it receives an in-dialog MESSAGE from an endpoint and chan_pjsip
will send an MESSAGE when it gets a TEXT frame.  On a normal
point-to-point call, the frames are forwarded between the two
correctly.  bridge_softmix was not though so messages weren't
getting forwarded to conference bridge participants.  Even if they
were, the bridging code had no way to tell the participants who
sent the message so it would look like it came from the bridge
itself.

* The TEXT frame type doesn't allow storage of any meta data, such
as sender, on the frame so a new TEXT_DATA frame type was added that
uses the new ast_msg_data structure as its payload.  A channel
driver can queue a frame of that type when it receives a message
from outside.  A channel driver can use it for sending messages
by implementing the new send_text_data channel tech callback and
setting the new AST_CHAN_TP_SEND_TEXT_DATA flag in its tech
properties.  If set, the bridging/channel core will use it instead
of the original send_text callback and it will get the ast_msg_data
structure. Channel drivers aren't required to implement this.  Even
if a TEXT_DATA enabled driver uses it for incoming messages, an
outgoing channel driver that doesn't will still have it's send_text
callback called with only the message text just as before.

* res_pjsip_messaging now creates a TEXT_DATA frame for incoming
in-dialog messages and sets the "from" to the display name in the
"From" header, or if that's empty, the caller id name from the
channel.  This allows the chat client user to set a friendly name
for the chat.

* bridge_softmix now forwards TEXT and TEXT_DATA frames to all
participants (except the sender).

* A new function "ast_sendtext_data" was added to channel which
takes an ast_msg_data structure and calls a channel's
send_text_data callback, or if that's not defined, the original
send_text callback.

* bridge_channel now calls ast_sendtext_data for TEXT_DATA frame
types and ast_sendtext for TEXT frame types.

* chan_pjsip now uses the "from" name in the ast_msg_data structure
(if it exists) to set the "From" header display name on outgoing text
messages.

Change-Id: Idacf5900bfd5f22ab8cd235aa56dfad090d18489
(cherry picked from commit be7d4faed5fb3684e9d68454ae2a97167e1ebb51)

7 years agobridge_softmix: Forward TEXT frames
George Joseph [Wed, 27 Sep 2017 16:44:53 +0000 (10:44 -0600)] 
bridge_softmix:  Forward TEXT frames

Core bridging and, more specifically, bridge_softmix have been
enhanced to relay received frames of type TEXT or TEXT_DATA to all
participants in a softmix bridge.  res_pjsip_messaging and
chan_pjsip have been enhanced to take advantage of this so when
res_pjsip_messaging receives an in-dialog MESSAGE message from a
user in a conference call, it's relayed to all other participants
in the call.

res_pjsip_messaging already queues TEXT frames to the channel when
it receives an in-dialog MESSAGE from an endpoint and chan_pjsip
will send an MESSAGE when it gets a TEXT frame.  On a normal
point-to-point call, the frames are forwarded between the two
correctly.  bridge_softmix was not though so messages weren't
getting forwarded to conference bridge participants.  Even if they
were, the bridging code had no way to tell the participants who
sent the message so it would look like it came from the bridge
itself.

* The TEXT frame type doesn't allow storage of any meta data, such
as sender, on the frame so a new TEXT_DATA frame type was added that
uses the new ast_msg_data structure as its payload.  A channel
driver can queue a frame of that type when it receives a message
from outside.  A channel driver can use it for sending messages
by implementing the new send_text_data channel tech callback and
setting the new AST_CHAN_TP_SEND_TEXT_DATA flag in its tech
properties.  If set, the bridging/channel core will use it instead
of the original send_text callback and it will get the ast_msg_data
structure. Channel drivers aren't required to implement this.  Even
if a TEXT_DATA enabled driver uses it for incoming messages, an
outgoing channel driver that doesn't will still have it's send_text
callback called with only the message text just as before.

* res_pjsip_messaging now creates a TEXT_DATA frame for incoming
in-dialog messages and sets the "from" to the display name in the
"From" header, or if that's empty, the caller id name from the
channel.  This allows the chat client user to set a friendly name
for the chat.

* bridge_softmix now forwards TEXT and TEXT_DATA frames to all
participants (except the sender).

* A new function "ast_sendtext_data" was added to channel which
takes an ast_msg_data structure and calls a channel's
send_text_data callback, or if that's not defined, the original
send_text callback.

* bridge_channel now calls ast_sendtext_data for TEXT_DATA frame
types and ast_sendtext for TEXT frame types.

* chan_pjsip now uses the "from" name in the ast_msg_data structure
(if it exists) to set the "From" header display name on outgoing text
messages.

Change-Id: Idacf5900bfd5f22ab8cd235aa56dfad090d18489
(cherry picked from commit be7d4faed5fb3684e9d68454ae2a97167e1ebb51)

7 years agoMerge "res_pjsip_endpoint_identifier_ip: Unregister the module for headers." into...
Jenkins2 [Fri, 18 May 2018 20:40:58 +0000 (15:40 -0500)] 
Merge "res_pjsip_endpoint_identifier_ip: Unregister the module for headers." into certified/13.21

7 years agores_pjsip_endpoint_identifier_ip: Unregister the module for headers.
Alexander Traud [Thu, 17 May 2018 06:58:43 +0000 (08:58 +0200)] 
res_pjsip_endpoint_identifier_ip: Unregister the module for headers.

Asterisk uses Reference Counting to track whether a module can be unloaded.
Every consumer who requires a module, increases the reference count. When the
consumer goes, is unloaded itself, it has to decrease the reference count on
all its used/required modules. That way
 core stop gracefully
works on the command-line interface (CLI): One module after the other is
unloaded. A recent change broke this for the module res_pjsip.

ASTERISK-27861

Change-Id: I261abcb411d026bbb0691cc78f28300bfd3103a3

7 years agores_pjsip: Register pjsip_transport_management not externally but internally.
Alexander Traud [Thu, 17 May 2018 05:34:03 +0000 (07:34 +0200)] 
res_pjsip: Register pjsip_transport_management not externally but internally.

The module (res_)pjsip_transport_management got moved into res_pjsip. It is no
longer an independent/external module with (un)load_module and therefore has to
register just internally with res_pjsip.

ASTERISK-27860

Change-Id: Icd0413be7d2e98b92f51e6d6c353f2570bb4be95

7 years agoInitialize 13.21-cert branch
Kevin Harwell [Mon, 30 Oct 2017 20:24:53 +0000 (15:24 -0500)] 
Initialize 13.21-cert branch

A new branch was created for what will be Asterisk certified 13.21. A couple
of things needed to be done to the branch in order to complete initialization:

Modified the version file to reflect the certified version.
Updated all extended modules to be disabled by default.

Change-Id: Ie1dd3cb146391dea92c9e3ef906dde8d7241fee2

7 years agoUpdate for 13.21.0-rc1 13.21.0-rc1
Chris Savinovich [Thu, 19 Apr 2018 18:29:01 +0000 (13:29 -0500)] 
Update for 13.21.0-rc1

7 years agoMerge "res_pjsip: Fix deadlock on reliable transport shutdown." into 13
Jenkins2 [Wed, 18 Apr 2018 22:20:19 +0000 (17:20 -0500)] 
Merge "res_pjsip: Fix deadlock on reliable transport shutdown." into 13

7 years agoMerge "Build System: Enable python3 compatibility." into 13
Jenkins2 [Wed, 18 Apr 2018 22:06:26 +0000 (17:06 -0500)] 
Merge "Build System: Enable python3 compatibility." into 13

7 years agoMerge "utils/pval: Add -lBlocksRuntime for compiler clang conditionally." into 13
Jenkins2 [Wed, 18 Apr 2018 20:18:32 +0000 (15:18 -0500)] 
Merge "utils/pval: Add -lBlocksRuntime for compiler clang conditionally." into 13

7 years agoMerge "utils: Add ast_assert_return" into 13
Jenkins2 [Wed, 18 Apr 2018 19:35:55 +0000 (14:35 -0500)] 
Merge "utils:  Add ast_assert_return" into 13

7 years agoMerge "res_musiconhold: Don't restart MOH from beginning after announcement." into 13
Jenkins2 [Tue, 17 Apr 2018 17:11:48 +0000 (12:11 -0500)] 
Merge "res_musiconhold: Don't restart MOH from beginning after announcement." into 13

7 years agoutils/pval: Add -lBlocksRuntime for compiler clang conditionally.
Alexander Traud [Tue, 17 Apr 2018 12:09:46 +0000 (14:09 +0200)] 
utils/pval: Add -lBlocksRuntime for compiler clang conditionally.

ASTERISK-27809

Change-Id: I930b364a33d54cc08dedfcd5bb45f7e83242f134

7 years agoutils: Add ast_assert_return
George Joseph [Fri, 13 Apr 2018 20:17:36 +0000 (14:17 -0600)] 
utils:  Add ast_assert_return

Similar to pjproject's PJ_ASSERT_RETURN macro, this one will do the
following...

If the assert passes... NoOp

If the assert fails and AST_DEVMODE is defined, execute ast_assert()
then, if DO_CRASH isn't set, return from the calling function with
the supplied value.

If the assert fails and AST_DEVMODE is not defined, return from the
calling function with the supplied value.

The macro will execute a return without a value if one isn't suppled.

Change-Id: I0003844affeab550d5ff5bca7aa7cf8a559b873e

7 years agoMerge "pjsip_scheduler.c: Add ability to trace scheduled tasks." into 13
Jenkins2 [Mon, 16 Apr 2018 12:00:21 +0000 (07:00 -0500)] 
Merge "pjsip_scheduler.c: Add ability to trace scheduled tasks." into 13

7 years agoMerge "res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations." into 13
Jenkins2 [Mon, 16 Apr 2018 11:46:30 +0000 (06:46 -0500)] 
Merge "res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations." into 13

7 years agoMerge "pjsip_scheduler.c: Fix some corner cases." into 13
Jenkins2 [Mon, 16 Apr 2018 11:39:35 +0000 (06:39 -0500)] 
Merge "pjsip_scheduler.c: Fix some corner cases." into 13

7 years agores_musiconhold: Don't restart MOH from beginning after announcement.
Ben Ford [Fri, 13 Apr 2018 19:32:48 +0000 (14:32 -0500)] 
res_musiconhold: Don't restart MOH from beginning after announcement.

This reverts a problem introduced by the fix for ASTERISK_24329.
Now, when an announcement is played while waiting in a queue, music on
hold will not restart from the beginning of the sound file and will
instead pick up where it left off. However, the incorrect behavior in
ASTERISK_24329 is now present again; if an announcement X seconds
long is played when music on hold starts, music on hold will start X
seconds into the file.

ASTERISK-27774 #close
Reported by: lvl

Change-Id: I86b2885ee7063268f9b9747eddb788336ade989b

7 years agopjsip_scheduler.c: Add ability to trace scheduled tasks.
Richard Mudgett [Wed, 28 Mar 2018 20:13:13 +0000 (15:13 -0500)] 
pjsip_scheduler.c: Add ability to trace scheduled tasks.

When a scheduled task is created you can pass in the
AST_SIP_SCHED_TASK_TRACK flag.  This new flag causes scheduling events to
be logged.

Change-Id: I91967eb3d5a220915ce86881a28af772f9a7f56b

7 years agores_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations.
Richard Mudgett [Tue, 27 Mar 2018 16:04:42 +0000 (11:04 -0500)] 
res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations.

ast_sip_push_task_synchronous() did not necessarily execute the passed in
task under the specified serializer.  If the current thread is any
registered pjsip thread then it would execute the task immediately instead
of under the specified serializer.  Reentrancy issues could result if the
task does not execute with the right serializer.

The original reason ast_sip_push_task_synchronous() checked to see if the
current thread was a registered pjsip thread was because of a deadlock
with masquerades and the channel technology's fixup callback
(ASTERISK_22936).  A subsequent masquerade deadlock fix (ASTERISK_24356)
involving call pickups avoided the original deadlock situation entirely.
The PJSIP channel technology's fixup callback no longer needed to call
ast_sip_push_task_synchronous().

However, there are a few places where this unexpected behavior is still
required to avoid deadlocks.  The pjsip monitor thread executes callbacks
that do calls to ast_sip_push_task_synchronous() that would deadlock if
the task were actually pushed to the specified serializer.  I ran into one
dealing with the pubsub subscriptions where an ao2 destructor called
ast_sip_push_task_synchronous().

* Split ast_sip_push_task_synchronous() into
ast_sip_push_task_wait_servant() and ast_sip_push_task_wait_serializer().
ast_sip_push_task_wait_servant() has the old behavior of
ast_sip_push_task_synchronous().  ast_sip_push_task_wait_serializer() has
the new behavior where the task is always executed by the specified
serializer or a picked serializer if one is not passed in.  Both functions
behave the same if the current thread is not a SIP servant.

* Redirected ast_sip_push_task_synchronous() to
ast_sip_push_task_wait_servant() to preserve API for released branches.

ASTERISK_26806

Change-Id: Id040fa42c0e5972f4c8deef380921461d213b9f3

7 years agopjsip_scheduler.c: Fix some corner cases.
Richard Mudgett [Thu, 22 Mar 2018 00:43:21 +0000 (19:43 -0500)] 
pjsip_scheduler.c: Fix some corner cases.

* Fix the periodic interval wander because it may take significant time
between the sched thread queueing the task in the serializer and the
serializer actually executing the task.  The time it takes to actually
execute the task was already taken into account.

* Pass a schtd ref to the serializer when we queue a scheduled task on
the serializer.  We don't want it going away on us while it is in the
serializer queue.

* Skip the scheduled task if the task was canceled between queueing the
task to the serializer and the serializer actually executing the task.

* Reorder struct ast_sip_sched_task to avoid unnecessary padding.  Removed
task_id and added next_periodic.

* Hold a ref to the passed in serializer so the serializer cannot go away
on the scheduled task.

ASTERISK_26806

Change-Id: I6c8046b75f6953792c8c30e55b836a4291143f24

7 years agopjsip_scheduler.c: Sort "pjsip show scheduled_tasks" output.
Richard Mudgett [Fri, 23 Mar 2018 00:09:02 +0000 (19:09 -0500)] 
pjsip_scheduler.c: Sort "pjsip show scheduled_tasks" output.

* A side benefit is that the scheduled tasks are not completely blocked
while the CLI command executes.

* Adjusted the "Task Name" column width to have more room for longer
names.

Change-Id: Iec64aa463ee8b10eef90120e00c38b1fb444087e

7 years agoMerge "res_pjsip_notify.c: enable in-dialog NOTIFY" into 13
Jenkins2 [Thu, 12 Apr 2018 19:57:33 +0000 (14:57 -0500)] 
Merge "res_pjsip_notify.c: enable in-dialog NOTIFY" into 13

7 years agoMerge "pjsip_scheduler.c: Fix ao2 usage errors." into 13
Jenkins2 [Thu, 12 Apr 2018 15:10:28 +0000 (10:10 -0500)] 
Merge "pjsip_scheduler.c: Fix ao2 usage errors." into 13

7 years agoMerge "Build System: Strip '-std=c99' from CFLAGS provided by libraries." into 13
Jenkins2 [Thu, 12 Apr 2018 14:43:14 +0000 (09:43 -0500)] 
Merge "Build System: Strip '-std=c99' from CFLAGS provided by libraries." into 13

7 years agocdr_mysql: Compile error because MYSQL_PORT definition is missing
Evandro Cesar Arruda [Mon, 2 Apr 2018 20:59:29 +0000 (17:59 -0300)] 
cdr_mysql: Compile error because MYSQL_PORT definition is missing

If it is not defined, it will add MYSQL_PORT definition. After some
research on MySQL/MariaDB development tree, I couldn't find any reference
to MYSQL_PORT definition in include files.

ASTERISK-27782 #close

Change-Id: Ieee56c836fc2e8bd021c456145bba04c6068bb77

7 years agores_pjsip_session: Rewrite o= with external_media_address.
Chris-Savinovich [Tue, 10 Apr 2018 01:00:37 +0000 (21:00 -0400)] 
res_pjsip_session: Rewrite o= with external_media_address.

It now appends the external IP address on the
o= line of the SDP packet.  The decision was made to write
the numeric IP address as opposed to the RFC that states
the FQDN should be used if and when available.  We believe
the usage of literal IP address will help avoid
potential problems.

ASTERISK-27614 #close

Change-Id: I84f3360f3606b8c4e8d161edb228799ec0b8a302

7 years agores_pjsip_notify.c: enable in-dialog NOTIFY
Nathan Bruning [Thu, 22 Feb 2018 18:18:48 +0000 (19:18 +0100)] 
res_pjsip_notify.c: enable in-dialog NOTIFY

This patch adds support to send in-dialog SIP NOTIFY commands on
chan_pjsip channels, similar to the functionality recently added
for chan_sip (ASTERISK_27461).

This extends res_pjsip_notify to allow for in-dialog messages.

ASTERISK-27697

Change-Id: If7f3151a6d633e414d5dc319d5efc1443c43dd29

7 years agoMerge "res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge...
Jenkins2 [Wed, 11 Apr 2018 12:03:19 +0000 (07:03 -0500)] 
Merge "res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge" into 13

7 years agoMerge "chan_sip.c: Fix INVITE with replaces channel ref leak." into 13
Jenkins2 [Tue, 10 Apr 2018 14:58:22 +0000 (09:58 -0500)] 
Merge "chan_sip.c: Fix INVITE with replaces channel ref leak." into 13

7 years agopjsip_scheduler.c: Fix ao2 usage errors.
Richard Mudgett [Thu, 22 Mar 2018 18:35:04 +0000 (13:35 -0500)] 
pjsip_scheduler.c: Fix ao2 usage errors.

* Removed several invalid uses of OBJ_NOLOCK.  These uses resulted in the
'tasks' container being accessed without a lock in a multi-threaded
environment.  A recipe for crashes.

* Removed needlessly obtaining schtd object references.  If the caller
providing you a pointer to an object doesn't have a valid reference then
you cannot safely get one from it.

* Getting a ref to 'tasks' when you aren't copying the pointer into
another location is useless.  The 'tasks' container pointer is global.

* Removed many unnecessary uses of RAII_VAR.

* Make ast_sip_schedule_task() name parameter const.

ASTERISK_26806

Change-Id: I5c62488e651314e2a1dbc01f5b078a15512d73db

7 years agoMerge "Build System: Fixes for configure script." into 13
Jenkins2 [Mon, 9 Apr 2018 15:15:22 +0000 (10:15 -0500)] 
Merge "Build System: Fixes for configure script." into 13

7 years agoBuild System: Enable python3 compatibility.
Corey Farrell [Fri, 23 Mar 2018 11:49:59 +0000 (07:49 -0400)] 
Build System: Enable python3 compatibility.

* Consistently use spaces in rest-api-templates/asterisk_processor.py.
* Exclude third-party from docs/full-en_US.xml.
* Add docs/full-en_US.xml to .gitignore.
* Use list() to convert python3 view.
* Use python3 print function.
* Replace cmp() with equivalent equation.
* Replace reference to out of scope subtype variable with name
  parameter.
* Use unescaping triple bracket notation in mustache templates where
  needed.  This causes behavior of Python2 to be maintained when using
  Python3.
* Fix references to has_websocket / is_websocket in
  res_ari_resource.c.mustache.
* Update calculation of has_websocket to use any().
* Use unicode mode for writing output file in transform.py.
* Replace 'from swagger_model import *' with explicit import of required
  symbols.
* Add missing 'import os'
* Fix invalid reference to swagger_version from exception handler.

I have not tested voicemailpwcheck.py, only the print syntax has
been fixed.

Change-Id: If5c5b556a2800d41a3e2cfef080ac2e151178c33