summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-21Fix some invalid Unicode charactersSean Bright
configs/samples/minivm.conf.sample contains invalid UTF-8, but that appears to be intentional. Change-Id: I7b1e0d332f3380fd0425962a3c9c55f9b200c8cc
2017-11-15ast_coredumper: Add ability to use directory other than /tmpGeorge Joseph
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-04install_prereq: Checkout of libSRTP 2.x.Alexander Traud
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-10-31Merge "ast_coredumper: allow setting asterisk binary explicitly" into 13Jenkins2
2017-10-30Merge "ast_coredumper: Add gzipping of binaries and display of signal info" ↵Jenkins2
into 13
2017-10-30ast_coredumper: allow setting asterisk binary explicitlyTzafrir Cohen
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-25res_pjsip: Add 'ip' as a valid option to 'identify_by' on endpoint.Joshua Colp
When the identify_by option on an endpoint is set to ip it will only be identified using the res_pjsip_endpoint_identifier_ip module. This ensures that it is not mistakenly matched using the username of the From header. To ensure behavior has not changed the default has been changed to "username,ip" for the identify_by option. ASTERISK-27206 Change-Id: I2170b86a7f7e221b4f00bf14aa1ef1ac5b050bbd
2017-10-25ast_coredumper: Add gzipping of binaries and display of signal infoGeorge Joseph
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-12contrib/script/sip_to_pjsip: implement 'all' for allow/disallowTorrey Searle
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-04contrib/thirdparty/sip_to_pjsip: add additional flag mappingsTorrey Searle
add mappings for udptl redundancy, rtptimeout, and debug flags Change-Id: Ie73cf5c83c05dee01eb9624ede76c1a30225d73a
2017-09-14Merge "res_pjsip: Add handling for incoming unsolicited MWI NOTIFY" into 13Jenkins2
2017-09-13res_pjsip: Add handling for incoming unsolicited MWI NOTIFYGeorge Joseph
A new endpoint parameter "incoming_mwi_mailbox" allows Asterisk to receive unsolicited MWI NOTIFY requests and make them available to other modules via the stasis message bus. res_pjsip_pubsub has a new handler "pubsub_on_rx_mwi_notify_request" that parses a simple-message-summary body and, if endpoint->incoming_mwi_account is set, calls ast_publish_mwi_state with the voice-message counts from the message. Change-Id: I08bae3d16e77af48fcccc2c936acce8fc0ef0f3c
2017-09-12Merge "alembic: Fix typo in add_auto_info_to_endpoint_dtmf_mode" into 13Jenkins2
2017-09-11alembic: Fix typo in add_auto_info_to_endpoint_dtmf_modeGeorge Joseph
The downgrade function was missing "_v2" at the end of the alter column type. Change-Id: Iaa9bcef48d6f3590ce07a61342d8e66f00263d8e
2017-09-08alembic: Add support for MS-SQLFlorian Floimair
MS-SQL has no native Enum-type support and therefore needs to work with constraints. Since these constraints need unique names the suggested approach referenced in the following alembic documentation has been applied: http://bit.ly/2x9r8pb ASTERISK-27255 #close Change-Id: I4a399ba3eed41a33ce8cb294968ad340221580ee
2017-09-06Merge "alembic: Fix enum creation for dtls_fingerprint" into 13Joshua Colp
2017-09-06alembic: Fix enum creation for dtls_fingerprintGeorge Joseph
Change-Id: Ic061c5066a146616a68376881c7e4cf6d6e7e7db
2017-09-06alembic: fix erroneous commit for add_prune_on_bootFlorian Floimair
Added include for postgresql ENUM type and redefined values in the same way as in the other migration scripts. ASTERISK-27254 #close Change-Id: Id667304cdf3891b1c2f7d35fab3e2a84026159fa
2017-08-25alembic: Add dtls_fingerprint column in ps_endpoints tableFlorian Floimair
The ps_endpoints table was missing the dtls_fingerprint column introduced with commit adba2a8d7fd. ASTERISK-27168 #close Change-Id: I9cb5006f7f50718b5239919562773adabb334cfd
2017-08-10res_pjsip: Remove ephemeral registered contacts on transport shutdown.Richard Mudgett
The fix for the issue is broken up into three parts. This is part two which handles the server side of REGISTER requests when rewrite_contact is enabled. Any registered reliable transport contact becomes invalid when the transport connection becomes disconnected. * Monitor the rewrite_contact's reliable transport REGISTER contact for shutdown. If it is shutdown then the contact must be removed because it is no longer valid. Otherwise, when the client attempts to re-REGISTER it may be blocked because the invalid contact is there. Also if we try to send a call to the endpoint using the invalid contact then the endpoint is not likely to see the request. The endpoint either won't be listening on that port for new connections or a NAT/firewall will block it. * Prune any rewrite_contact's registered reliable transport contacts on boot. The reliable transport no longer exists so the contact is invalid. * Websockets always rewrite the REGISTER contact address and the transport needs to be monitored for shutdown. * Made the websocket transport set a unique name since that is what we use as the ao2 container key. Otherwise, we would not know which transport we find when one of them shuts down. The names are also used for PJPROJECT debug logging. * Made the websocket transport post the PJSIP_TP_STATE_CONNECTED state event. Now the global keep_alive_interval option, initially idle shutdown timer, and the server REGISTER contact monitor can work on wetsocket transports. * Made the websocket transport set the PJSIP_TP_DIR_INCOMING direction. Now initially idle websockets will automatically shutdown. ASTERISK-27147 Change-Id: I397a5e7d18476830f7ffe1726adf9ee6c15964f4
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-07-06Fix alembic branchesGeorge Joseph
Change-Id: I04f607f084bda9b1b7f626e8e9735c37dc751187
2017-06-23res_pjsip: Add DTMF INFO Failback modeTorrey Searle
The existing auto dtmf mode reverts to inband if 4733 fails to be negotiated. This patch adds a new mode auto_info which will switch to INFO instead of inband if 4733 is not available. ASTERISK-27066 #close Change-Id: Id185b11e84afd9191a2f269e8443019047765e91
2017-06-16res_pjsip: New endpoint option "notify_early_inuse_ringing"Alexei Gradinari
This option was added to control whether to notify dialog-info state 'early' or 'confirmed' on Ringing when already INUSE. The value "yes" is useful for some SIP phones (Cisco SPA) to be able to indicate and pick up ringing devices. ASTERISK-26919 #close Change-Id: Ie050bc30023543c7dfb4365c5be3ce58c738c711
2017-05-11res_pjsip: New endpoint option "refer_blind_progress"Alexei Gradinari
This option was added to turn off notifying the progress details on Blind Transfer. If this option is not set then the chan_pjsip will send NOTIFY "200 OK" immediately after "202 Accepted". Some SIP phones like Mitel/Aastra or Snom keep the line busy until receive "200 OK". ASTERISK-26333 #close Change-Id: Id606fbff2e02e967c02138457badc399144720f2
2017-04-25alembic: Add table for 'resource_list' PJSIP RLS type.Joshua Colp
This change adds an Alembic migration which adds a ps_resource_list table that can contain resource_list RLS configuration objects. ASTERISK-26929 Change-Id: I7c888fafc67b3e87012de974f71ca7a5b8b1ec05
2017-04-07pjsip: Add Alembic for PUBLISH support.Joshua Colp
This change adds database tables for the PUBLISH support so it can be configured using realtime. A minor fix to the res_pjsip_publish_asterisk module was done so that it read the sorcery configuration from the correct section. Finally the sample configuration files have been updated. ASTERISK-26928 Change-Id: I81991ae5c75af98d247f7eacd1c0b0a763675952
2017-03-30Revert "Update for 13.15.0-rc1"Joshua Colp
This reverts commit 552cf009c0939c8b6597708135412bdc596df4bb. Change-Id: Ie345bea481261b761c44079e9472622040fda302
2017-03-30Merge "cel_pgsql.c: Fix buffer overflow calling libpq" into 13Joshua Colp
2017-03-28alembic: Turn off execute bit on non-executable python scriptsSean Bright
Change-Id: I744c986da4a38aeff8c00837eb89de7841fbc86c
2017-03-23Update for 13.15.0-rc113.15.0-rc1Kevin Harwell
2017-03-22res_pjsip_session: Enable RFC3578 overlap dialing support.Richard Begg
Support for RFC3578 overlap dialling (i.e. 484 Response to partially matched destinations) as currently provided by chan_sip is missing from res_pjsip. This patch adds a new endpoint attribute (allow_overlap) [defaults to yes] which when set to yes enables 484 responses to partial destination matches rather than the current 404. ASTERISK-26864 Change-Id: Iea444da3ee7c7d4f1fde1d01d138a3d7b0fe40f6
2017-03-16res_pjsip: Symmetric transportsGeorge Joseph
A new transport parameter 'symmetric_transport' has been added. When a request from a dynamic contact comes in on a transport with this option set to 'yes', the transport name will be saved and used for subsequent outgoing requests like OPTIONS, NOTIFY and INVITE. It's saved as a contact uri parameter named 'x-ast-txp' and will display with the contact uri in CLI, AMI, and ARI output. On the outgoing request, if a transport wasn't explicitly set on the endpoint AND the request URI is not a hostname, the saved transport will be used and the 'x-ast-txp' parameter stripped from the outgoing packet. * config_transport was modified to accept and store the new parameter. * config_transport/transport_apply was updated to store the transport name in the pjsip_transport->info field using the pjsip_transport->pool on UDP transports. * A 'multihomed_on_rx_message' function was added to pjsip_message_ip_updater that, for incoming requests, retrieves the transport name from pjsip_transport->info and retrieves the transport. If transport->symmetric_transport is set, an 'x-ast-txp' uri parameter containing the transport name is added to the incoming Contact header. * An 'ast_sip_get_transport_name' function was added to res_pjsip. It takes an ast_sip_endpoint and a pjsip_sip_uri and returns a transport name if endpoint->transport is set or if there's an 'x-ast-txp' parameter on the uri and the uri host is an ipv4 or ipv6 address. Otherwise it returns NULL. * An 'ast_sip_dlg_set_transport' function was added to res_pjsip which takes an ast_sip_endpoint, a pjsip_dialog, and an optional pjsip_tpselector. It calls ast_sip_get_transport_name() and if a non-NULL is returned, sets the selector and sets the transport on the dialog. If a selector was passed in, it's updated. * res_pjsip/ast_sip_create_dialog_uac and ast_sip_create_dialog_uas were modified to call ast_sip_dlg_set_transport() instead of their original logic. * res_pjsip/create_out_of_dialog_request was modified to call ast_sip_get_transport_name() and pjsip_tx_data_set_transport() instead of its original logic. * Existing transport logic was removed from endpt_send_request since that can only be called after a create_out_of_dialog_request. * res_pjsip/ast_sip_create_rdata was converted to a wrapper around a new 'ast_sip_create_rdata_with_contact' function which allows a contact_uri to be specified in addition to the existing parameters. (See below) * res_pjsip_pubsub/internal_pjsip_evsub_send_request was eliminated since all it did was transport selection and that is now done in ast_sip_create_dialog_uac and ast_sip_create_dialog_uas. * 'contact_uri' was added to subscription_persistence. This was necessary because although the parsed rdata contact header has the x-ast-txp parameter added (if appropriate), subscription_persistence_update stores the raw packet which doesn't have it. subscription_persistence_recreate was then updated to call ast_sip_create_rdata_with_contact with the persisted contact_uri so the recreated subscription has the correct transport info to send the NOTIFYs. * res_pjsip_session/internal_pjsip_inv_send_msg was eliminated since all it did was transport selection and that is now done in ast_sip_create_dialog_uac. * pjsip_message_ip_updater/multihomed_on_tx_message was updated to remove all traces of the x-ast-txp parameter from the outgoing headers. NOTE: This change does NOT modify the behavior of permanent contacts specified on an aor. To do so would require that the permanent contact's contact uri be updated with the x-ast-txp parameter and the aor sorcery object updated. If we need to persue this, we need to think about cloning permanent contacts into the same store as the dynamic ones on an aor load so they can be updated without disturbing the originally configured value. You CAN add the x-ast-txp parameter to a permanent contact's uri but it would be much simpler to just set endpoint->transport. Change-Id: I4ee1f51473da32ca54b877cd158523efcef9655f
2017-03-15Add rtcp-mux supportMark Michelson
This commit adds support for RFC 5761: Multiplexing RTP Data and Control Packets on a Single Port. Specifically, it enables the feature when using chan_pjsip. A new option, "rtcp_mux" has been added to endpoint configuration in pjsip.conf. If set, then Asterisk will attempt to use rtcp-mux with whatever it communicates with. Asterisk follows the rules set forth in RFC 5761 with regards to falling back to standard RTCP behavior if the far end does not indicate support for rtcp-mux. The lion's share of the changes in this commit are in res_rtp_asterisk.c. This is because it was pretty much hard wired to have an RTP and an RTCP transport. The strategy used here is that when rtcp-mux is enabled, the current RTCP transport and its trappings (such as DTLS SSL session) are freed, and the RTCP session instead just mooches off the RTP session. This leads to a lot of specialized if statements throughout. ASTERISK-26732 #close Reported by Dan Jenkins Change-Id: If46a93ba1282418d2803e3fd7869374da8b77ab5
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