summaryrefslogtreecommitdiff
path: root/contrib/scripts
AgeCommit message (Collapse)Author
2017-07-20corosync: Fix corosync library name in configure.acSean Bright
Also add new corosync packages to install_prereq. Reported by Travis Ryan in #asterisk-dev Change-Id: Ib861c95ba630fed62dc54e56784ad8446ed9d2db
2017-01-27debug_utilities: Add ast_logescalatorGeorge Joseph
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-20debug_utilities: Create ast_loggrabberGeorge Joseph
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 5fa1c56d7e76999aa14f133a33f6b168e7c3b99c)
2017-01-11debug_utilities: Create the ast_coredumper utilityGeorge Joseph
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
2016-12-15autosupport: Add 'pjproject show buildopts'Richard Mudgett
Change-Id: I8aa55a7c3fb175235ddc7f85e9457d5102d06fa7
2016-10-23pjsip: Support dual stack automatically.Joshua Colp
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-09-14Merge "sip_to_pjsip.py: Map legacy_useroption_parsing." into 13zuul
2016-09-09sip_to_pjsip.py: Map legacy_useroption_parsing.Richard Mudgett
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-09contrib: Let safe_asterisk script continue without /dev/tty9.Walter Doekes
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-06Merge "sip_to_pjsip.py: Map canreinvite as directmedia alias." into 13zuul
2016-09-06Merge "sip_to_pjsip.py: Fix typo converting outboundproxy registration." into 13zuul
2016-09-02sip_to_pjsip.py: Map canreinvite as directmedia alias.Richard Mudgett
Change-Id: I48b8e150f96a3d2a24d8fc25fbe4f5aff9f4a6b2
2016-09-02sip_to_pjsip.py: Fix typo converting outboundproxy registration.Richard Mudgett
Change-Id: I6f30e5f9fcf8469ba0079fbf884047d54c2c0b15
2016-09-02sip_to_pjsip.py: Fix comment typo and tabs.Richard Mudgett
Change-Id: If35174614545727817d329c60ba4456c028941b5
2016-08-26sip_to_pjsip: Migrate IPv4/IPv6 (Dual Stack) configurations.Alexander Traud
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-19Merge "sip_to_pjsip: Map externhost/ip to Transports." into 13zuul
2016-08-19sip_to_pjsip: Add cert_file.Alexander Traud
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-18Merge "sip_to_pjsip: Write cos and tos." into 13Joshua Colp
2016-08-18sip_to_pjsip: Set correct tls transport methodKevin Harwell
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-18Merge "sip_to_pjsip: Parse register even with transport." into 13Joshua Colp
2016-08-18Merge "sip_to_pjsip: Write local_net, contact_acl, contact_deny, and ↵Joshua Colp
contact_permit." into 13
2016-08-18Merge "sip_to_pjsip: Map (session-)timers correctly." into 13Joshua Colp
2016-08-18Merge "sip_to_pjsip: Add cert_file and ca_list_path." into 13Joshua Colp
2016-08-18Merge "sip_to_pjsip: Write username even without authname." into 13Joshua Colp
2016-08-18Merge "sip_to_pjsip: Map the TLS method correctly." into 13Joshua Colp
2016-08-18Merge "sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent." ↵Joshua Colp
into 13
2016-08-18Merge "sip_to_pjsip: Write media_encryption." into 13Joshua Colp
2016-08-18sip_to_pjsip: Map the TLS method correctly.Alexander Traud
When using the migration script sip_to_pjsip.py and tlsclientmethod is not set in sip.conf, the default value of chan_sip (sslv23) is copied to pjsip.conf, to overwrite the default of the PJProject (tlsv1). This makes sure, res_pjsip is offering/using not just TLSv1.0 but TLSv1.2 as well. ASTERISK-22374 Change-Id: Ie530a3dae9926ae14f3920a21be1e2edb15bda4f
2016-08-18sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent.Alexander Traud
When using the migration script sip_to_pjsip.py, no section of type=system or type=general were created. Therefore the keys compactheaders, timerb, timert1, and useragent were not migrated to pjsip.conf. ASTERISK-22374 Change-Id: I318a453843227ea36bf130d392d4abd7bd26b5a1
2016-08-18sip_to_pjsip: Map (session-)timers correctly.Alexander Traud
When using the migration script sip_to_pjsip.py, session-timers=accept and session-timers=refuse were mapped to wrong values. ASTERISK-22374 Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092
2016-08-18sip_to_pjsip: Write username even without authname.Alexander Traud
When using the migration script sip_to_pjsip.py, now the (mandatory) username is written to pjsip.conf, even if there was no (optional) authname in the register string in sip.conf. ASTERISK-22374 Change-Id: Ie53e1997104cd2674821688b8a8247249f5e156f
2016-08-18sip_to_pjsip: Parse register even with transport.Alexander Traud
When using the migration script sip_to_pjsip.py and the register string started with a transport in sip.conf - like tls://... - register was not parsed correctly and therefore not migrated correctly to pjsip.conf. ASTERISK-22374 Change-Id: I44c12104eea2bd8558ada6d25d77edfecd92edd2
2016-08-18sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit.Alexander Traud
When using the migration script sip_to_pjsip.py, those keys got missing. These keys might appear several times and the function "merge_value" tried to collect those. However, because these keys have different names in sip.conf and pjsip.conf, "merge_value" was not able to find the new key name in sip.conf. This change lets "merge_value" search with the old key name in sip.conf and write with the new key name in pjsip.conf. ASTERISK-22374 Change-Id: Ie53c5278ae6f1cb8fa7e96c5289877d46981d9d2
2016-08-18sip_to_pjsip: Map externhost/ip to Transports.Alexander Traud
When using the migration script sip_to_pjsip.py, the externhost or externip of sip.conf were erroneously written to Endpoints instead to Transports. ASTERISK-22374 Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4
2016-08-18sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry.Alexander Traud
When using the migration script sip_to_pjsip.py, defaultexpiry, maxexpiry, and minexpiry were not migrated to pjsip.conf. ASTERISK-22374 Change-Id: I007fbf543dcadc96fc3ed71c54da502bcb209b7b
2016-08-18sip_to_pjsip: Write media_encryption.Alexander Traud
When using the migration script sip_to_pjsip.py, encryption=yes got missing and media_encryption=sdes was not written to pjsip.conf, because of a typo. ASTERISK-22374 Change-Id: I0fc3e55dc512a57603ae0fef41baacccf2a35c05
2016-08-18sip_to_pjsip: Write cos and tos.Alexander Traud
When using the migration script sip_to_pjsip.py, both tos_sip and cos_sip got missed, because of a typo. Therefore, cos and tos were not written to pjsip.conf. Furthermore, that revealed a misuse of an internal function, caused by a copy-and-paste error. ASTERISK-22374 Change-Id: Id245ebadf70ab9776eb280c026288540af3af5c2
2016-08-18sip_to_pjsip: Add cert_file and ca_list_path.Alexander Traud
When using the migration script sip_to_pjsip.py, cert_file and ca_list_path were not migrated to pjsip.conf. ASTERISK-22374 Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825
2016-08-03astconfigparser: Really handle case where line is simply a comment.Joshua Colp
The regular expression would match causing the code that handled the line if it was merely a comment to never get executed. Change-Id: I3e4022481037ebcba9905587fe8c764b4ce21819
2016-07-29astconfigparser: Handle case where line is simply a comment.Joshua Colp
Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5
2016-07-26astconfigparser.py: Update with realtime fixes.Joshua Colp
When configuring SIP URIs in the pjsip.conf file it is necessary to escape the semicolon so the parser does not treat it as a comment. This change allows this to work in the astconfigparser implementation. A secondary bug where some data was lost if a configuration option included a "=" in its value was also fixed. A bug where sections would be considered equal despite being different has also been fixed. Change-Id: If229f656ef22050b50e7b34e90c4bffe796431f8
2016-07-11install_prereq: Checkout of libSRTP 1.5.x.Alexander Traud
Since 5th November 2014, the master branch of libSRTP changed the prefix of several member names and is not compatible with the source code in Asterisk anymore. Therefore instead, this change checks out the latest version of the libSRTP 1.5.x branch. Furthermore now, libSRTP is compiled with OpenSSL as backend. This makes AES-GCM and AES-IN possible. ASTERISK-22131 #close Change-Id: I2e396cdc01da0ff610686e398ed210ca7408f7d6
2016-05-03pjproject_bundled: Various fixes discovered during testing of OSesGeorge Joseph
For all OSes: * Disabled third-party codecs in pjproject and added '--disable-speex-codec --disable-speex-aec --disable-gsm-codec' to the configure options since we don't use the pjsip codec capability. FreeBSD: * Added FreeBSD support to install_prereq. * Changed pjproject/configure.m4 to use $GNU_MAKE instead of hardcoding "make". * Added __progname and environ to asterisk.exports.in. * Reverted the use of ldconfig to create shared library symlinks to ln. * Only enable epoll in pjproject if `uname -s` is Linux. * Added a patch to pjproject to take the name of the 'make' command from an environment variable if supplied. This is needed for the python bindings. (merged by Teluu into pjproject trunk 5/3/2016) FreeBSD support isn't complete. Still some general issues regarding make/gmake having nothing to do with pjproject. With some handholding it DOES build successfully. CentOS: Added 'patch' and 'bzip2' to install_prereq PACKAGES_RH. CentOS 6/7 32/64 build and run the pjsip testsuite successfully. Ubuntu: No changes required. Ubuntu 15/16 32/64 build and run the pjsip testsuite successfully. Debian: No changes required. Debian 6/7/8 32/64 build and run the pjsip testsuite successfully. There will utimately be a follow-up patch to create an install_prereq for the testsuite as I've discovered a few missing requirements. ASTERISK-25968 #close Change-Id: I5756a07facfc63798115a5e73a8709382fe9259c
2016-04-04install_prereq: Fix check_installed_debs remove subversionGeorge Joseph
check_installed_debs wasn't handling virtual packages like libsrtp-dev and libresample-dev and on multiarch systems it was accidentally filtering out all packages if any :i386 packages were found instead of just filtering out the :i386 packages themselves. Change-Id: Ifd68da0d1ee30cc84df14de3f9b9079d7c3cecda
2016-03-17Merge "install_prereq: Check if is installed aptitude otherwise to install." ↵zuul
into 13
2016-03-17install_prereq: Update repositories before install on Debian systemsRodrigo Ramírez Norambuena
When to install packages the indexed local is more old of the version of software on the repository they have been upgraded by security update then get the package will give 404 not found. The patch prevent by update local index to repository for aptitude before install. ASTERISK-25495 #close Reporte by: Rodrigo Ramírez Norambuena Change-Id: I645959e553aac542805ced394cac2dca964051fa (cherry picked from commit 88f3dbaec9509bfba8bc1de7799aa0dc65304bb5)
2016-03-17install_prereq: Check if is installed aptitude otherwise to install.Rodrigo Ramírez Norambuena
If in Debian or system based, dont have aptitude installed the script do nothing. This patch checked if aptitude installed, if not installed. Also, if execute script with all packages installed yet, the script not show nothing and return exit 1 because the command 'grep' get nothing from pipe from 'awk'. ASTERISK-25113 #close Reported By: Rodrigo Ramírez Norambuena <decipher.hk@gmail.com> Change-Id: Iebdff55805d3917166e5e08e0a1e2176f36ff27f (cherry picked from commit 6737ded0581a9e1256bdfe30c1d747e7ca93f8b3)
2016-03-05install_prereq: Add packages for bundled pjprojectGeorge Joseph
RedHat/CentOS needs python-devel Debian/Ubuntu needs automake, libsrtp-dev and python-dev Ubuntu also needed libncurses5-dev for cmenuselect so while not needed for pjproject, I adedd it anyway. Change-Id: Idf5fa16e2d87c687439621507e122cb9461d7089
2016-01-12res_pjsip_log_forwarder.c: Add CLI "pjsip show buildopts".Richard Mudgett
PJPROJECT has a function available to dump the compile time options used when building the library. * Add CLI "pjsip show buildopts" command. * Update contrib/scripts/autosupport to get pjproject information. Change-Id: Id93a6a916d765b2a2e5a1aeb54caaf83206be748
2015-10-19contrib/scripts/autosupport: Update for Asterisk 13Matt Jordan
This patch adds some minor tweaks for autosupport to update it for Asterisk 13. This includes: * Finally removing most references to Zaptel * Adding support for some additional 'core' commands, and fixing nomenclature that generally hasn't been used for some time * Adding some PJSIP/SIP commands to gather endpoints/peers and active channels Change-Id: Ic997b418cbd9313588b6608e50f47b0ce6f4f1f1