summaryrefslogtreecommitdiff
path: root/configs
AgeCommit message (Collapse)Author
2017-10-11Merge "res_pjsip_registrar.c: Update remove_existing AOR contact handling." ↵Jenkins2
into 14
2017-10-09res_pjsip_registrar.c: Update remove_existing AOR contact handling.Richard Mudgett
When "rewrite_contact" is enabled, the "max_contacts" count option can block re-registrations because the source port from the endpoint can be random. When the re-registration is blocked, the endpoint may give up re-registering and require manual intervention. * The "remove_existing" option now allows a registration to succeed by displacing any existing contacts that now exceed the "max_contacts" count. Any removed contacts are the next to expire. The behaviour change is beneficial when "rewrite_contact" is enabled and "max_contacts" is greater than one. The removed contact is likely the old contact created by "rewrite_contact" that the device is refreshing. ASTERISK-27192 Change-Id: I64c107a10b70db1697d17136051ae6bf22b5314b
2017-10-09res_config_sqlite: Don't enable SQLite CDRs when running 'make samples'Sean Bright
Change-Id: I65a5190b2732b2246d67472db70dd37db64ddad4
2017-09-14res_pjsip: Filter out non SIP(S) requestsGeorge Joseph
Incoming requests with non sip(s) URIs in the Request, To, From or Contact URIs are now rejected with PJSIP_SC_UNSUPPORTED_URI_SCHEME (416). This is performed in pjsip_message_filter (formerly pjsip_message_ip_updater) and is done at pjproject's "TRANSPORT" layer before a request can even reach the distributor. URIs read by res_pjsip_outbound_publish from pjsip.conf are now also checked for both length and sip(s) scheme. Those URIs read by outbound registration and aor were already being checked for scheme but their error messages needed to be updated to include scheme failure as well as length failure. Change-Id: Ibb2f9f1d2dc7549da562af4cbd9156c44ffdd460
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-08-30AST-2017-006: Fix app_minivm application MinivmNotify command injectionCorey Farrell
An admin can configure app_minivm with an externnotify program to be run when a voicemail is received. The app_minivm application MinivmNotify uses ast_safe_system() for this purpose which is vulnerable to command injection since the Caller-ID name and number values given to externnotify can come from an external untrusted source. * Add ast_safe_execvp() function. This gives modules the ability to run external commands with greater safety compared to ast_safe_system(). Specifically when some parameters are filled by untrusted sources the new function does not allow malicious input to break argument encoding. This may be of particular concern where CALLERID(name) or CALLERID(num) may be used as a parameter to a script run by ast_safe_system() which could potentially allow arbitrary command execution. * Changed app_minivm.c:run_externnotify() to use the new ast_safe_execvp() instead of ast_safe_system() to avoid command injection. * Document code injection potential from untrusted data sources for other shell commands that are under user control. ASTERISK-27103 Change-Id: I7552472247a84cde24e1358aaf64af160107aef1
2017-08-15res_xmpp: Google OAuth 2.0 protocol support for XMPP / MotifAndrey Egorov
Add ability to use tokens instead of passwords according to Google OAuth 2.0 protocol. ASTERISK-27169 Reported by: Andrey Egorov Tested by: Andrey Egorov Change-Id: I07f7052a502457ab55010a4d3686653b60f4c8db
2017-07-19Merge "core: Add PARSE_TIMELEN support to ast_parse_arg and ACO." into 14Joshua Colp
2017-07-13core: Add PARSE_TIMELEN support to ast_parse_arg and ACO.Corey Farrell
This adds support for parsing timelen values from config files. This includes support for all flags which apply to PARSE_INT32. Support for this parser is added to ACO via the OPT_TIMELEN_T option type. Fixes an issue where extra characters provided to ast_app_parse_timelen were ignored, they now cause an error. Testing is included. ASTERISK-27117 #close Change-Id: I6b333feca7e3f83b4ef5bf2636fc0fd613742554
2017-07-12basic-pbx: Remove res_pjsip_multihomed from sample configSean Bright
ASTERISK-27127 #close Reported by: HZMI8gkCvPpom0tM Change-Id: I2b0c54570d58156e37166ac536728af3b6c01789
2017-07-11res_musiconhold: Add kill_escalation_delay, kill_method to classGeorge Joseph
By default, when res_musiconhold reloads or unloads, it sends a HUP signal to custom applications (and all descendants), waits 100ms, then sends a TERM signal, waits 100ms, then finally sends a KILL signal. An application which is interacting with an external device and/or spawns children of its own may not be able to exit cleanly in the default times, expecially if sent a KILL signal, or if it's children are getting signals directly from res_musiconhoild. * To allow extra time, the 'kill_escalation_delay' class option can be used to set the number of milliseconds res_musiconhold waits before escalating kill signals, with the default being the current 100ms. * To control to whom the signals are sent, the "kill_method" class option can be set to "process_group" (the default, existing behavior), which sends signals to the application and its descendants directly, or "process" which sends signals only to the application itself. Change-Id: Iff70a1a9405685a9021a68416830c0db5158603b
2017-06-29chan_pjsip: Fix ability to send UPDATE on COLPGeorge Joseph
When connected_line_method is "invite", we're supposed to determine if the client can support UPDATE and if it can, send UPDATE instead of INVITE to avoid the SDP renegotiation. Not only was pjproject not setting the PJSIP_INV_SUPPORT_UPDATE flag, we were testing that invite_tsx wasn't NULL which isn't always the case. * Updated chan_pjsip/update_connected_line_information to drop the requirement that invite_tsx isn't NULL. * Submitted patch to pjproject sip_inv.c that sets the PJSIP_INV_SUPPORT_UPDATE flag correctly. * Updated pjsip.conf.sample to clarify what happens when "invite" is specified. ASTERISK-27095 Change-Id: Ic2381b3567b8052c616d96fbe79564c530e81560
2017-06-22app_voicemail: IMAP connection controlAlexei Gradinari
A new global option "imap_poll_logout" was added to specify whether need to disconnect from the IMAP server after polling of mailboxes. ASTERISK-27068 #close Closing IMAP connection after loading mailbox from voicemail.conf ASTERISK-24052 #close Change-Id: Ib7558ba04516240a32b65f42e9be64372a0ae12a
2017-06-20cdr: fix mistake spelling of a word for Unanswered.Rodrigo Ramírez Norambuena
Change-Id: I7a610bef369924523a445c7e849ee88cc45dc5df
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-06-11codecs.conf.sample: Fix max_bandwidth speling errorSean Bright
Reported by Sylvain Boily via asterisk-dev mailing list. Change-Id: Idc7623f335aea3e144dd369ba383b9a757480a9d
2017-06-01Merge "res_pjsip: New endpoint option "refer_blind_progress"" into 14Jenkins2
2017-05-17Fix spelling queues.conf.sample fileRodrigo Ramírez Norambuena
Change-Id: Ie1c2d83af66f27a449da09a68d987e0992627fee
2017-05-11Merge "res_hep_rtcp: Provide chan_sip Call-ID for RTCP messages." into 14Joshua Colp
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-05-09res_hep_rtcp: Provide chan_sip Call-ID for RTCP messages.Joshua Colp
This change adds the required logic to allow the SIP Call-ID to be placed into the HEP RTCP traffic if the chan_sip module is used. In cases where the option is enabled but the channel is not either SIP or PJSIP then the code will fallback to the channel name as done previously. Based on the change on Nir's branch at: team/nirs/hep-chan-sip-support ASTERISK-26427 Change-Id: I09ffa5f6e2fdfd99ee999650ba4e0a7aad6dc40d
2017-05-08logger: Added logger_queue_limit to the configuration options.George Joseph
All log messages go to a queue serviced by a single thread which does all the IO. This setting controls how big that queue can get (and therefore how much memory is allocated) before new messages are discarded. The default is 1000. Should something go bezerk and log tons of messages in a tight loop, this will prevent memory escalation. When the limit is reached, a WARNING is logged to that effect and messages are discarded until the queue is empty again. At that time another WARNING will be logged with the count of discarded messages. There's no "low water mark" for this queue because the logger thread empties the entire queue and processes it in 1 batch before going back and waiting on the queue again. Implementing a low water mark would mean additional locking as the thread processes each message and it's not worth it. A "test" was added to test_logger.c but since the outcome is non-deterministic, it's really just a cli command, not a unit test. Change-Id: Ib4520c95e1ca5325dbf584c7989ce391649836d1
2017-04-11res_rtp_asterisk.c: Add stun_blacklist optionRichard Mudgett
Added the stun_blacklist option to rtp.conf. Some multihomed servers have IP interfaces that cannot reach the STUN server specified by stunaddr. Blacklist those interface subnets from trying to send a STUN packet to find the external IP address. Attempting to send the STUN packet needlessly delays processing incoming and outgoing SIP INVITEs because we will wait for a response that can never come until we give up on the response. Multiple subnets may be listed. ASTERISK-26890 #close Change-Id: I3ff4f729e787f00c3e6e670fe6435acce38be342
2017-04-08samples: Undo removal of include from canonicalize-app-names commit.Walter Doekes
This include was accidentally removed in changeset Ia79aea64de89531362e993e34230c2044a70aa93. My bad. Change-Id: I1d716c7f9590b4e97909fb8bca1f2ed9bd0e4082
2017-04-07Merge "pjsip: Add Alembic for PUBLISH support." into 14Joshua Colp
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-04-06samples: Canonicalize app names in extensions.conf.sample.Walter Doekes
This takes care of warnings by ossobv/asterisklint. Change-Id: Ia79aea64de89531362e993e34230c2044a70aa93
2017-04-05sample_config: Add samples for pubsub to pjsip.conf.sampleGeorge Joseph
Added: * outbound-publish * resource_list * inbound-publication * asterisk-publication Change-Id: I65043a896c35483f30a92d30b5b118359af7ba5a
2017-03-28res_pjsip_config_wizard: Add 2 new parameters to help with proxy configGeorge Joseph
Two new parameters have been added to the pjsip config wizard. * Setting 'sends_line_with_registrations' to true will cause the wizard to skip the creation of an identify object to match incoming request to the endpoint and instead add the line and endpoint parameters to the outbound registration object. * Setting 'outbound_proxy' is a shortcut for adding individual endpoint/outbound_proxy, aor/outbound_proxy and registration/outbound_proxy parameters. Change-Id: I678e5f80765734c056620528a6d40d82736ceeb0 (cherry picked from commit a827892ff77cd37912b528d9c45b446be091bbc0)
2017-03-27res_musiconhold: Document the 'format' optionSean Bright
ASTERISK-26086 #close Reported by: Jens Bürger Change-Id: I6aab666c0bf01fd0c64d7a5bcb22fa7f5d41335e
2017-03-24Merge "rtp_engine: allocate RTP dynamic payloads per session" into 14Joshua Colp
2017-03-22rtp_engine: allocate RTP dynamic payloads per sessionKevin Harwell
Dynamic payload types were statically defined in Asterisk. This unfortunately limited the number of dynamic payloads that could be registered. With this patch dynamic payload type numbers are now assigned dynamically and per RTP instance. However, in order to limit any issues where some clients expect the old statically defined value this patch makes it so the value Asterisk used to pre- designate is used for the dynamic assignment if available. An option, "rtp_use_dynamic", has also been added (can be set in asterisk.conf) that turns the new dynamic behavior on or off. When off it reverts back to using statically defined payload values. This option defaults to "no" in Asterisk 14. ASTERISK-26515 #close patches: ASTERISK-26515.diff submitted by jcolp (license 5000) Change-Id: If282877199b85da8dde7eb9452cdedaa19da586a
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-17chan_sip: Add rtcp-mux supportSean Bright
ASTERISK-26846 #close Change-Id: I541a1602ff55ab73684e9f8002edb9e0e745d639
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-14configs/samples/hep.conf.sample: Clarify how the HEP stack worksMatt Jordan
This patch updates the documenation in hep.conf.sample to better specify how the various HEP modules interact. ASTERISK-26717 #close Change-Id: I337fb742a89e3ec5edc7fc7a7a0295218d841124
2017-03-08app_voicemail: Cannot set fromstring on a per-mailbox basisDaniel Journo
* apps/app_voicemail.c fromstring field added to mailbox which will override the global fromstring if set. ASTERISK-24562 #close Change-Id: I5e90e3a1ec2b2d5340b49a0db825e4bbb158b2fe
2017-02-28Merge "config: Improve documentation and behavior of outbound_proxy option." ↵Joshua Colp
into 14
2017-02-28pjsip.conf.sample: user_agent: not a specific versionTzafrir Cohen
Use the description of useragent from sip.conf here. ASTERISK-26825 #close Change-Id: I5b33a4aaa0ae1d793289d05e3bc09521affbf755
2017-02-24config: Improve documentation and behavior of outbound_proxy option.Joshua Colp
This change updates the documentation for the outbound_proxy option to ensure it is consistently stated that a full SIP URI must be provided for the option. The res_pjsip_outbound_registration module has also been changed so that the provided outbound_proxy value is checked to ensure it is a URI and if not an error is output stating so. ASTERISK-26782 Change-Id: I6c239a32274846fd44e65b44ad9bf6373479b593
2017-02-20res_pjsip: Update authentication realm documentation.Richard Mudgett
Using the same auth section for inbound and outbound authentication is not recommended. There is a difference in meaning for an empty realm setting between inbound and outbound authentication uses. An empty inbound auth realm represents the global section's default_realm value when the authentication object is used to challenge an incoming request. An empty outgoing auth realm is treated as a don't care wildcard when the authentication object is used to respond to an incoming authentication challenge. ASTERISK-26799 Change-Id: Id3952f7cfa1b6683b9954f2c5d2352d2f11059ce
2017-02-14app_voicemail: Allow 'Comedian Mail' branding to be overridenSean Bright
Original patch by John Covert, slight modifications by me. ASTERISK-17428 #close Reported by: John Covert Patches: app_voicemail.c.patch (license #5512) patch uploaded by John Covert Change-Id: Ic3361b0782e5a5397a19ab18eb8550923a9bd6a6
2017-02-10configs/samples: Fix placement of 'identify' entry in sorcery.confGeorge Joseph
The entry for 'identify' was incorrectly placed in the res_pjsip section when it should be in res_pjsip_endpoint_identifier_ip. ASTERISK-26785 #close Change-Id: Ia1372b12a952bfe2df6b1b1e0e725ca306a5d41a
2017-02-02res_odbc: Remove deprecated settings from sample configuration fileSean Bright
ASTERISK-26704 #close Reported by: Anthony Messina Change-Id: I976a1f94cf79c5f31e76174c61f5c6a65fd6354f
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 c70915287837704090d75f181525765de7a17221)
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 (cherry picked from commit cb47b4556053cd50d9102eef913671ad0306062d)
2016-11-30PJPROJECT logging: Made easier to get available logging levels.Richard Mudgett
Use of the new logging is as simple as issuing the new CLI command or setting the new pjproject.conf option. Other options that can affect the logging are how you have the pjproject log levels mapped to Asterisk log types in pjproject.conf and if you have configured Asterisk to log the DEBUG type messages. Altering the pjproject.conf level mapping shouldn't be necessary for most installations as the default mapping is sensible. Configuring Asterisk to log the DEBUG message type is standard practice for collecting debug information. * Added CLI "pjproject set log level" command to dynamically adjust the maximum pjproject log message level. * Added CLI "pjproject show log level" command to see the currently set maximum pjproject log message level. * Added pjproject.conf startup section "log_level" option to set the initial maximum pjproject log message level so all messages could be captured from initialization. * Set PJ_LOG_MAX_LEVEL to 6 to compile in all defined logging levels into bundled pjproject. Pjproject will use the currently set run time log level to determine if a log message is generated just like Asterisk verbose and debug logging levels. * In log_forwarder(), made always log enabled and mapped pjproject log messages. DEBUG mapped log messages are no longer gated by the current Asterisk debug logging level. * Removed RAII_VAR() from res_pjproject.c:get_log_level(). ASTERISK-26630 #close Change-Id: I6dca12979f482ffb0450aaf58db0fe0f6d2e5389
2016-11-14res_ari: Add support for channel variables in ARI events.Sebastien Duthil
This works the same as for AMI manager variables. Set "channelvars=foo,bar" in your ari.conf general section, and then the channel variables "foo" and "bar" (along with their values), will appear in every Stasis websocket channel event. ASTERISK-26492 #close patches: ari_vars.diff submitted by Mark Michelson Change-Id: I5609ba239259577c0948645df776d7f3bc864229
2016-11-02rtp_engine: Allow more than 32 dynamic payload types.Alexander Traud
Since adding all remaining rates of Signed Linear (ASTERISK-24274) and SILK (Gerrit 3136), only one RTP Payload Type is left in the dynamic range (96-127). RFC 3551 section 3 allows to reassign other ranges. Consequently, when the dynamic range is exhausted, you can go for "rtp_pt_dynamic = 35" (or 0) in asterisk.conf. This enables the range 35-63 (or 0-63) giving room for another 29 (or 64) payload types. ASTERISK-26311 #close Change-Id: I7bc96ab764bc30098a178b841cbf7146f9d64964
2016-11-01codecs.conf.sample: Add sample and option descriptions for codec_opusKevin Harwell
codecs.conf.sample was missing codec opus's configuration options, descriptions, and examples. This patch adds the configuration options and examples to codecs.conf.sample that can be used with codec_opus. ASTERISK-26538 #close Change-Id: I1d89bb5e01d3e3b5bd78951b8dd0ff077a83dc8b