summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2017-03-14res_pjsip_endpoint_identifier_ip: Add an option to match requests by headerMatt Jordan
This patch adds a new features to the endpoint identifier module, 'match_header'. When set, inbound requests are matched by a provided SIP header: value pair. This option works in conjunction with the existing 'match' configuration option, such that if any 'match*' attribute matches an inbound request, the request is associated with the specified endpoint. Since this module now identifies by more than just IP address, appropriate renaming of the module and/or variables can be done in a non-release branch. ASTERISK-26863 #close Change-Id: Icfc14835c962f92e35e67bbdb235cf0589de5453 (cherry picked from commit 30f52d79d7fc9ab0b628bef2b61ea515413795a2)
2017-01-31debug_utilities: Install ast_logescalator to /var/lib/asterisk/scriptsGeorge Joseph
Forgot to install it with the original patch Change-Id: I8bdb540a6694971ae5fe21f48d532332c6482e4c
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
2017-01-06res_pjsip_endpoint_identifier_ip: Add support for SRV lookups.Joshua Colp
This change implements SRV support for the IP based endpoint identifier module. All possible addresses through SRV are looked up and added as matches. If no SRV records are available a fallback to normal host resolution is done. If an IP address is provided then no SRV lookup occurs. This is configured using the "srv_lookups" option on the identify section and defaults to "yes". ASTERISK-26693 Change-Id: I6b641e275bf96629320efa8b479737062aed82ac
2016-12-15autosupport: Add 'pjproject show buildopts'Richard Mudgett
Change-Id: I8aa55a7c3fb175235ddc7f85e9457d5102d06fa7
2016-12-02Remove files that got merged in error somehow to the 13 branch.Richard Mudgett
Change-Id: Id79e2226c31084f9252d5aede9050d3cf13322c8
2016-12-02Merge "tcptls: Use new certificate upon sip reload" into 13Joshua Colp
2016-10-26pjsip: Fix a few media bugs with reinvites and asymmetric payloads.Joshua Colp
When channel format changes occurred as a result of an RTP re-negotiation the bridge was not informed this had happened. As a result the bridge technology was not re-evaluated and the channel may have been in a bridge technology that was incompatible with its formats. The bridge is now unbridged and the technology re-evaluated when this occurs. The chan_pjsip module also allowed asymmetric codecs for sending and receiving. This did not work with all devices and caused one way audio problems. The default has been changed to NOT do this but to match the sending codec to the receiving codec. For users who want asymmetric codecs an option has been added, asymmetric_rtp_codec, which will return chan_pjsip to the previous behavior. The codecs returned by the chan_pjsip module when queried by the bridge_native_rtp module were also not reflective of the actual negotiated codecs. The nativeformats are now returned as they reflect the actual negotiated codecs. ASTERISK-26423 #close Change-Id: I6ec88c6e3912f52c334f1a26983ccb8f267020dc
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-10-17Update for 13.12.0-rc113.12.0-rc1Mark Michelson
2016-10-11Add text of cdr directory into README.md for ast-db-manageRodrigo Ramírez Norambuena
Change-Id: I68321c4bea50730c39fdb486e5f23aeadd1ad636
2016-10-07alembic: Allow cdr, config and voicemail to exist in the same schemaGeorge Joseph
cdr, config and voicemail are all separate alembic trees. Because alembic's default is to use a table named 'alembic_version' to store the current tree revision, the 3 trees can't exist in the same schema without stepping on each other. Now each tree uses 'alembic_version_<tree_name>' as the version table. Each tree's env.py script now first checks for 'alembic_version'. If it finds it AND its revision is in the tree's history, the script renames it to 'alembic_version_<tree_name>'. Regardless, the script then continues with the migration using 'alembic_version_<tree_name>' and creates that table if it's not found. The result is that if an existing 'alembic_version' table was found but it didn't belong to this tree, it's left alone and 'alembic_version_<tree_name>' is used or created. WARNING: If multiple trees are using the same schema, they MUST NOT CRU or D any objects with names that might exist in the other trees. An example would be 'yesno_values' type. If two trees perform operations on it, one tree could pull it out from under the other. Thankfully we currently don't share any names among cdr, config and voicemail. NOTE: Since the env.py scripts in each tree were identical, a common env.py has been placed in the ast-db-manage directory and a symlink to it has been placed in each tree directory. ASTERISK-24311 #close Reported-by: Dafi Ni Change-Id: I4d593f000350deb5d21a14fa1e9bc3896844d898
2016-09-14Merge "sip_to_pjsip.py: Map legacy_useroption_parsing." into 13zuul
2016-09-14Merge "res_pjsip: Add ignore_uri_user_options option." 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-09res_pjsip: Add ignore_uri_user_options option.Richard Mudgett
This implements the chan_sip legacy_useroption_parsing option but with a better name. * Made the caller-id number and redirecting number strings obtained from incoming SIP URI user fields always truncated at the first semicolon. People don't care about anything after the semicolon showing up on their displays even though the RFC allows the semicolon. ASTERISK-26316 #close Reported by: Kevin Harwell Change-Id: Ib42b0e940dd34d84c7b14bc2e90d1ba392624f62
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-19Merge "sip_to_pjsip: Add cert_file." into 13zuul
2016-08-19Merge "res_pjsip: Add contact_user to endpoint" 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