Commit Graph

333 Commits

Author SHA1 Message Date
Corey Farrell 04490fb1d8 json: Add conditionals to avoid locking if Jansson is thread safe.
Jansson is thread safe for all read-only functions and reference
counting starting v2.11.  This allows simplification of our code and
removal of locking around reference counting and dumping.

Change-Id: Id985cb3ffa6681f9ac765642e20fcd187bd4aeee
2018-02-12 13:27:08 -05:00
Alexander Traud 971378bbdb install_prereq: Update Debian/Ubuntu libraries.
ASTERISK-27555

Change-Id: Idc36e91db30c0163c560d04c5a82bca5d6ce92a8
2018-02-10 12:39:45 +01:00
Jenkins2 15d9fee96d Merge "install_prereq: Update RHEL/CentOS/Fedora libraries." 2018-01-31 06:42:59 -06:00
Alexander Traud e7f8ef1935 install_prereq: Update RHEL/CentOS/Fedora libraries.
deleted
 automake git ncurses-devel pjproject-devel sqlite2-devel libsqlite3x-devel

renamed
 radiusclient-ng-devel to radcli-devel
 gmime22-devel to gmime-dev

added
 alsa-lib-devel bash binutils-devel bison doxygen flex hoard make pkgconfig
 speexdsp-devel uriparser-devel uw-imap-devel wget xmlstarlet zlib-devel
 codec2-devel fftw-devel libsndfile-devel unbound-devel

ASTERISK-27599
Reported by: Said Masoud

Change-Id: I05bb0af98ae532b2d5f37478e38b8f0762b1c035
2018-01-29 11:13:53 +01:00
Alexander Traud 0afff31ed0 install_prereq: Download latest Jansson.
ASTERISK-27603

Change-Id: I65c587534c0ae364f063d68da1bed40bb3d5e8aa
2018-01-26 13:52:13 +01:00
Jenkins2 e36baaa315 Merge "install_prereq: For PJProject, point users to configure script." 2018-01-25 07:46:31 -06:00
Jenkins2 6753c08feb Merge "install_prereq: Support package manager DNF and yum option strict=1." 2018-01-24 07:48:58 -06:00
Alexander Traud fd557ad041 install_prereq: For PJProject, point users to configure script.
The installation script and the new configure option --with-pjproject-bundled
aimed to accomplish the same. However, the installation script was out of
date. Users should go for the maintained configure option, or the Wiki.

ASTERISK-24598

Change-Id: Icbf4b562f81f7c05bd24a3805bd46c0beb4ebd44
2018-01-22 09:02:08 -06:00
Alexander Traud 93471373f6 install_prereq: Update Debian/Ubuntu libraries.
ASTERISK-27555

Change-Id: Ieb41b0cbf968af12882b39454b819ebb48b9ea46
2018-01-19 13:16:36 +01:00
Alexander Traud 4c511c1a4d install_prereq: Support package manager DNF and yum option strict=1.
This re-enables the script ./contrib/scripts/install_prereq on Fedora 22 and
newer, and on RHEL/CentOS when the option strict=1 was set for yum install.

ASTERISK-27598
Reported by: Hunter Stevens, Said Masoud

Change-Id: I40f9517122aaa6906e8fc0962b4b8008dfddb368
2018-01-19 11:46:21 +01:00
Alexander Traud b9e2b72de6 install_prereq: Update Debian/Ubuntu libraries.
ASTERISK-27555

Change-Id: I0818b6e42631be1b69237e2b41d3415275693e53
2018-01-12 08:05:48 +01:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Sean Bright a1a179c09d Fix some invalid Unicode characters
configs/samples/minivm.conf.sample contains invalid UTF-8, but that
appears to be intentional.

Change-Id: I7b1e0d332f3380fd0425962a3c9c55f9b200c8cc
2017-12-21 10:26:53 -06:00
George Joseph cf1cb3345e ast_coredumper: Add ability to use directory other than /tmp
The OUTPUTDIR environment variable can now be set either in the
environment itself or in ast_debug_tools.conf.  If set, it's used
for all work products instead of /tmp.

Also added the --tarball-config option that includes the contents
of /etc/asterisk when either --tarball-coredumps or --tarball-results
are used.

Change-Id: I66b2553319df61caea5b313d084f51978f730b4c
2017-11-15 10:43:44 -05:00
Alexander Traud 2ebea5aa03 install_prereq: Checkout of libSRTP 2.x.
Since Asterisk 13.17, libSRTP 2.x is supported. Therefore, its latest version
is installed again via the script install_prereq.

ASTERISK-27356

Change-Id: I13125839a79052356469e41edacbebff0a937d39
2017-11-04 12:05:36 +01:00
Joshua Colp d05391ed55 Merge "ast_coredumper: allow setting asterisk binary explicitly" 2017-10-31 06:48:16 -05:00
Tzafrir Cohen 022de525be ast_coredumper: allow setting asterisk binary explicitly
Adds an extra option, --asterisk-bin=<path> to ast_coredumper. If
provided, the binary given to gdb will be the parameter, rather than
asterisk from the PATH.

ASTERISK-27380 #close

Change-Id: I25f5b91eb75059b0fb2f142e468c26b283b0a9f3
2017-10-30 16:20:18 +02:00
George Joseph 4aec70690d ast_coredumper: Add gzipping of binaries and display of signal info
The --tarball-coredump option now creates a gzipped tarball of
coredumps processed, their results txt files and copies of
/etc/os-release, /usr/sbin/asterisk, /usr/lib(64)/libasterisk* and
/usr/lib(64)/asterisk as those files are needed to properly examine
the coredump.  The file will be named
/tmp/asterisk.<timestamp>.coredumps.tar.gz or
/tmp/asterisk-<uniqueid>.coredumps.tar.gz if --tarball-uniqueid was
specified.

Added dumps of *_siginfo to the top of the txt files so you can
tell what signal was invoked.

Change-Id: Ib9ee6d83592d4b1bc90cb3419a05376a88d1ded9
2017-10-25 12:28:21 -05:00
Torrey Searle da24d425eb contrib/script/sip_to_pjsip: implement 'all' for allow/disallow
when 'all' is specified in an allow or disallow section, it should erase
all values from the inverse section in the default config. E.G.
allow=all should erase any deny values from default config &
vice-versa

ASTERISK-27333 #close

Change-Id: I99219478fb98f08751d769daaee0b7795118a5a6
2017-10-16 06:26:16 -05:00
Torrey Searle b1d9fc87bc contrib/thirdparty/sip_to_pjsip: add additional flag mappings
add mappings for udptl redundancy, rtptimeout, and debug flags

Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a
2017-10-10 10:50:24 -05:00
George Joseph ba52a36ff2 Restore the incorrectly deleted spandspflow2pcap.log
Change-Id: Iafe78cf0fb1e7064223d4dea279eeb776c8fa8e5
2017-07-21 10:24:24 -06:00
George Joseph 25459ac083 Merge "corosync: Fix corosync library name in configure.ac" 2017-07-21 06:54:00 -05:00
George Joseph 3e8d628c0e Update AMI and ARI versions for master/15 and update UPDATE.txt
AMI goes from 3.2.0 to 4.0.0
ARI goes from 2.0.0 to 3.0.0

Copied UPGRADE.txt -> UPGRADE-15.txt
Created new UPGRADE.txt
Removed a log file that was accidentally checked in a while ago

Change-Id: I1c794f910038459b13e16f9c3a12c44e56f142f7
2017-07-20 10:05:48 -06:00
Sean Bright 25c9464325 corosync: Fix corosync library name in configure.ac
Also add new corosync packages to install_prereq.

Reported by Travis Ryan in #asterisk-dev

Change-Id: Ib861c95ba630fed62dc54e56784ad8446ed9d2db
2017-07-20 10:40:28 -05:00
George Joseph ef4deb8ecd debug_utilities: Add ast_logescalator
The escalator works by creating a set of startup commands in cli.conf
that set up logger channels and issue the debug commands for the
subsystems specified.  If asterisk is running when it is executed,
the same commands will be issued to the running instance.  The original
cli.conf is saved before any changes are made and can be restored by
executing '$prog --reset'.

The log output will be stored in...
$astlogdir/message.$uniqueid
$astlogdir/debug.$uniqueid
$astlogdir/dtmf.$uniqueid
$astlogdir/fax.$uniqueid
$astlogdir/security.$uniqueid
$astlogdir/pjsip_history.$uniqueid
$astlogdir/sip_history.$uniqueid

Some minor tweaks were made to chan_sip, and res_pjsip_history
so their history output could be send to a log channel as packets
are captured.

A minor tweak was also made to manager so events are output to verbose
when "manager set debug on" is issued.

Change-Id: I799f8e5013b86dc5282961b27383d134bf09e543
2017-01-27 15:10:02 -06:00
George Joseph d16b3a9917 debug_utilities: Create ast_loggrabber
ast_loggrabber gathers log files from customizable search patterns,
optionally converts POSIX timestamps to a readable format and
tarballs the results.

Also a few tweaks were made to ast_coredumper.

Change-Id: I8bfe1468ada24c1344ce4abab7b002a59a659495
(cherry picked from commit c709152878)
2017-01-20 11:20:22 -06:00
George Joseph 0d53c91fba debug_utilities: Create the ast_coredumper utility
This utility allows easy manipulation of asterisk coredumps.

* Configurable search paths and patterns for existing coredumps
* Can generate a consistent coredump from the running instance
* Can dump the lock_infos table from a coredump
* Dumps backtraces to separate files...
  - thread apply 1 bt full -> <coredump>.thread1.txt
  - thread apply all bt -> <coredump>.brief.txt
  - thread apply all bt full -> <coredump>.full.txt
  - lock_infos table -> <coredump>.locks.txt
* Can tarball corefiles and optionally delete them after processing
* Can tarball results files and optionally delete them after processing
* Converts ':' in coredump and results file names '-' to facilitate
  uploading.  Jira for instance, won't accept file names with colons
  in them.

Tested on Fedora24+, Ubuntu14+, Debian6+, CentOS6+ and FreeBSD9+[1].

[1] For *BSDs, the "devel/gdb" package might have to be installed to
get a recent gdb.  The utility will check all instances of gdb
it finds in $PATH and if one isn't found that can run python, it
prints a friendly error.

Change-Id: I935d37ab9db85ef923f32b05579897f0893d33cd
(cherry picked from commit cb47b45560)
2017-01-11 12:11:45 -06:00
Richard Mudgett d27dee3cca autosupport: Add 'pjproject show buildopts'
Change-Id: I8aa55a7c3fb175235ddc7f85e9457d5102d06fa7
2016-12-15 13:27:56 -06:00
Joshua Colp 403c4f5833 pjsip: Support dual stack automatically.
This change adds support for dual stack automatically. No
configuration is required and the IP address and version
in the SIP messages and SDP will be automatically changed
based on the transport over which the message is being
sent. RTP usage has also been changed to listen on both
IPv4 and IPv6 simultaneously to allow media to flow, and
to allow ICE support on both simultaneously. This also
allows failover between IPv6 and IPv4 to work as expected.

ASTERISK-26309 #close

Change-Id: I235a421d8f9a326606d861b449fa6fe3a030572d
2016-10-23 13:53:55 +00:00
zuul e2d3882b30 Merge "sip_to_pjsip.py: Map legacy_useroption_parsing." 2016-09-14 15:03:46 -05:00
Richard Mudgett 82ec58aa91 sip_to_pjsip.py: Map legacy_useroption_parsing.
Map the sip.conf general section legacy_useroption_parsing to the
new pjsip.conf global ignore_uri_user_options.

ASTERISK-26316
Reported by: Kevin Harwell

Change-Id: I78108a31995db19d41f4e1a07b3324692c5363fc
2016-09-09 17:13:14 -05:00
Walter Doekes 56caf5402c contrib: Let safe_asterisk script continue without /dev/tty9.
If you use the safe_asterisk script, it uses hardcoded defaults before
running configurable values from /etc/asterisk/startup.d. The hardcoded
default has TTY=9. Some containerized environments don't have such a
TTY, and safe_asterisk would stop.

The custom configuration from /etc/asterisk/startup.d/* isn't read until
after it stopped, so changing TTY in a custom config did not help.

This changeset changes safe_asterisk to continue if the TTY setting was
untouched and /dev/tty9 and /dev/vc/9 aren't found.

Change-Id: I2c7cdba549b77f418a0af4cb1227e8e6fe4148fc
2016-09-09 13:26:01 +02:00
zuul 05240e2b57 Merge "sip_to_pjsip.py: Map canreinvite as directmedia alias." 2016-09-06 16:30:33 -05:00
zuul eae37c3524 Merge "sip_to_pjsip.py: Fix typo converting outboundproxy registration." 2016-09-06 15:26:23 -05:00
Richard Mudgett edcf09e47c sip_to_pjsip.py: Map canreinvite as directmedia alias.
Change-Id: I48b8e150f96a3d2a24d8fc25fbe4f5aff9f4a6b2
2016-09-02 13:07:08 -05:00
Richard Mudgett 47336a0bdd sip_to_pjsip.py: Fix typo converting outboundproxy registration.
Change-Id: I6f30e5f9fcf8469ba0079fbf884047d54c2c0b15
2016-09-02 13:05:16 -05:00
Richard Mudgett dba02575fc sip_to_pjsip.py: Fix comment typo and tabs.
Change-Id: If35174614545727817d329c60ba4456c028941b5
2016-09-02 13:03:09 -05:00
Alexander Traud f35501b8c9 sip_to_pjsip: Migrate IPv4/IPv6 (Dual Stack) configurations.
When using the migration script sip_to_pjsip.py, and your sip.conf is
configured with bindaddr=::, two transports are written to pjsip.conf, one for
0.0.0.0 (IPv4) and one for [::] (IPv6). That way, PJProject listens on the IPv4
and IPv6 wildcards; a IPv4/IPv6 Dual Stack configuration on a single interface
like in chan_sip.

Furthermore, the script internal functions "build_host" and "split_hostport"
did not parse Literal IPv6 addresses as expected (like [::1]:5060). This change
makes sure, even such addresses are parsed correctly.

ASTERISK-26309

Change-Id: Ia4799a0f80fc30c0550fc373efc207c3330aeb48
2016-08-26 12:49:50 +02:00
zuul c6ed91a9c8 Merge "sip_to_pjsip: Map externhost/ip to Transports." 2016-08-19 17:54:48 -05:00
Alexander Traud 02a82f758e sip_to_pjsip: Add cert_file.
When using the migration script sip_to_pjsip.py, cert_file was not migrated to
pjsip.conf. A previous change regarding this contained a copy/paste error.

ASTERISK-22374

Change-Id: I0fa72e9412117d53b4284fc6b83fa5b2b95ba03b
2016-08-19 10:59:40 +02:00
Joshua Colp b544bfbbd5 Merge "sip_to_pjsip: Write cos and tos." 2016-08-18 18:55:35 -05:00
Kevin Harwell 966527249e sip_to_pjsip: Set correct tls transport method
A recent update had a copy/paste error where the unused variable 'val' was
being passed to the set_value function instead of the 'method' value itself.

This patch passes in the right variable.

ASTERISK-22374

Change-Id: I895b7b3779ce4442bc58b8ec40d59dd29bb43f06
2016-08-18 12:04:56 -05:00
Joshua Colp 2dba6d0371 Merge "sip_to_pjsip: Parse register even with transport." 2016-08-18 11:50:16 -05:00
Joshua Colp 71b3751093 Merge "sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit." 2016-08-18 11:49:53 -05:00
Joshua Colp 54c5bb0287 Merge "sip_to_pjsip: Map (session-)timers correctly." 2016-08-18 11:49:15 -05:00
Joshua Colp 5899b4c593 Merge "sip_to_pjsip: Add cert_file and ca_list_path." 2016-08-18 11:48:32 -05:00
Joshua Colp 560c2abdec Merge "sip_to_pjsip: Write username even without authname." 2016-08-18 11:48:23 -05:00
Joshua Colp 14284aee45 Merge "sip_to_pjsip: Map the TLS method correctly." 2016-08-18 11:47:29 -05:00
Joshua Colp 0a09ab5b1c Merge "sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent." 2016-08-18 11:46:39 -05:00
Joshua Colp 91624f439c Merge "sip_to_pjsip: Write media_encryption." 2016-08-18 11:45:56 -05:00