summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2018-02-28pjproject: Add cache_pools debugging option.Richard Mudgett
The pool cache gets in the way of finding use after free errors of memory pool contents. Tools like valgrind and MALLOC_DEBUG don't know when a pool is released because it gets put into the cache instead of being freed. * Added the "cache_pools" option to pjproject.conf. Disabling the option helps track down pool content mismanagement when using valgrind or MALLOC_DEBUG. The cache gets in the way of determining if the pool contents are used after free and who freed it. To disable the pool caching simply disable the cache_pools option in pjproject.conf and restart Asterisk. Sample pjproject.conf setting: [startup] cache_pools=no * Made current users of the caching pool factory initialization and destruction calls call common routines to create and destroy cached pools. ASTERISK-27704 Change-Id: I64d5befbaeed2532f93aa027a51eb52347d2b828
2018-02-23Add extended properties to rtp_engine for RTP retransmission support.Ben Ford
A couple of additional properties are needed in rtp_engine to enable support for packet retransmission: AST_RTP_PROPERTY_RETRANS_RECV and AST_RTP_PROPERTY_RETRANS_SEND. These will both be enabled automatically if an endpoint has the webrtc option enabled. While this adds no functionality currently, it will serve as a building block for future changes for RTP retransmission support. For more information, refer to the wiki page: https://wiki.asterisk.org/wiki/display/AST/WebRTC+User+Experience+Improvements Change-Id: Ic598acd042a045f9d10e5bdccb66f4efc9e587cc
2018-02-23Merge "res_rtp_asterisk: Fix ICE candidate nomination"George Joseph
2018-02-21Merge "AST-2018-006: Properly handle WebSocket frames with 0 length payload."Kevin Harwell
2018-02-21Merge "AST-2018-005: res_pjsip_transport_management: Move to core"George Joseph
2018-02-21Merge "AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)"George Joseph
2018-02-21Merge "AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request"George Joseph
2018-02-21AST-2018-006: Properly handle WebSocket frames with 0 length payload.Sean Bright
In ast_websocket_read() we were not adequately checking that the payload_len was non-zero before passing it to ws_safe_read(). Calling ws_safe_read with a len argument of 0 will result in a busy loop until the underlying socket is closed. ASTERISK-27658 #close Change-Id: I9d59f83bc563f711df1a6197c57de473f6b0663a
2018-02-21AST-2018-005: res_pjsip_transport_management: Move to coreGeorge Joseph
Since res_pjsip_transport_management provides several attack mitigation features, its functionality moved to res_pjsip and this module has been removed. This way the features will always be available if res_pjsip is loaded. ASTERISK-27618 Reported By: Sandro Gauci Change-Id: I21a2d33d9dda001452ea040d350d7a075f9acf0d
2018-02-21AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)George Joseph
pjsip_distributor: authenticate() creates a tdata and uses it to send a challenge or failure response. When pjsip_endpt_send_response2() succeeds, it automatically decrements the tdata ref count but when it fails, it doesn't. Since we weren't checking for a return status, we weren't decrementing the count ourselves on error and were therefore leaking tdatas. res_pjsip_session: session_reinvite_on_rx_request wasn't decrementing the ref count if an error happened while sending a 491 response. pre_session_setup wasn't decrementing the ref count if while sending an error after a pjsip_inv_verify_request failure. res_pjsip: ast_sip_send_response wasn't decrementing the ref count on error. ASTERISK-27618 Reported By: Sandro Gauci Change-Id: Iab33a6c7b6fba96148ed465b690ba8534ac961bf
2018-02-21AST-2018-005: Add a check for NULL tdata in ast_sip_failover_requestGeorge Joseph
It was discovered that there are some corner cases where a pjsip tsx might have no last_tx so calling ast_sip_failover_request with a NULL last_tx as its tdata would cause a crash. ASTERISK-27618 Reported By: Sandro Gauci Change-Id: Ic2b63f6d4ae617c4c19dcdec2a7a6156b54fd15b
2018-02-21AST-2018-004: Restrict the number of Accept headers in a SUBSCRIBE.Joshua Colp
When receiving a SUBSCRIBE request the Accept headers from it are stored locally. This operation has a fixed limit of 32 Accept headers but this limit was not enforced. As a result it was possible for memory outside of the allocated space to get written to resulting in a crash. This change enforces the limit so only 32 Accept headers are processed. ASTERISK-27640 Reported By: Sandro Gauci Change-Id: I99a814b10b554b13a6021ccf41111e5bc95e7301
2018-02-20Merge "res_http_websocket: Don't leak memory on read failure"Jenkins2
2018-02-19Merge "res_pjsip_header_funcs: Various cleanups"Jenkins2
2018-02-19Merge "res_pjsip: Use pjsip_sip_uri.user_param instead of other_param"Jenkins2
2018-02-19res_rtp_asterisk: Fix ICE candidate nominationThomas Guebels
If the ICE role is not set right away, we might have a role conflict that stays undetected and ICE finishing with successful tests and no candidate nominated. This was introduced by ASTERISK-27088. To avoid this, we set the role as soon as before but only if the ICE state permits it: still checking and not yet nominating candidates or completed. ASTERISK-27646 Change-Id: I5dbc69ad63cacbb067922850fbb113d479bd729c
2018-02-19res_http_websocket: Don't leak memory on read failureSean Bright
Change-Id: Ic449ea832bc81a1671c0e910c5fbe8c683e3da89
2018-02-19Merge "Deprecate legacy modules."Jenkins2
2018-02-18res_pjsip_header_funcs: Various cleanupsSean Bright
* Prefer strcasecmp() over stricmp() * Use a list with no lock since we never actually lock * Minor cleanups to error messages Change-Id: I8446f44795ee8f3072e1c1f9193c6912dfc0c42b
2018-02-16res_pjsip: Endpoint destruction does not free DTLS configurationSean Bright
ASTERISK-27679 #close Reported by: Mak Dee Change-Id: I89a2783a11be0763bf123d1619ed176b6225cf42
2018-02-16res_calendar: Specialized calendars depend on symbols of general calendar.Alexander Traud
ASTERISK-27680 Change-Id: Ifb77912e424fe3710a025c18526fada673ec0b79
2018-02-15res_pjsip: Use pjsip_sip_uri.user_param instead of other_paramSean Bright
There is a dedicated slot in the pjsip_sip_uri for the 'user' parameter, so use that instead of adding to the list of generic URI parameters. Change-Id: I0a0ce8a60ecee27489735bf56fd707719d8c2ed6
2018-02-13Deprecate legacy modules.Corey Farrell
* app_fax (replaced by res_fax). * res_config_sqlite (replaced by res_config_sqlite3). * res_monitor (replaced by app_mixmonitor). This is related to ASTERISK~23657 but does not resolve that ticket. Resolving that ticket would require complete removal of res_monitor. ASTERISK-27671 #close Change-Id: I16a3edd61fc1abd4a7b2e9357693ed663f62dd49
2018-02-06Merge "endpoint identifiers: Some code cleanup."Jenkins2
2018-02-05Merge "res_pjsip/config_domain_aliases.c: Add check for missing domain."Jenkins2
2018-02-05Merge "res_sorcery_realtime.c: Fix ref leak if object failed to apply."Jenkins2
2018-02-03Merge "res_pjsip.c: Fix documentation typos."Jenkins2
2018-02-02endpoint identifiers: Some code cleanup.Richard Mudgett
res_pjsip_endpoint_identifier_user.c: * Fix copy/paste error in find_endpoint(). We were using a constant "anonymous" string instead of the passed in endpoint_name when checking the transport domain for an endpoint match. * Eliminate RAII_VAR in find_endpoint(). * Remove always true check in find_transport_state_in_use(). * Remove useless CMD_STOP in find_transport_state_in_use(). res_pjsip_endpoint_identifier_anonymous.c: * Eliminate RAII_VAR in anonymous_identify(). * Remove always true check in find_transport_state_in_use(). * Remove useless CMD_STOP in find_transport_state_in_use(). Change-Id: I86924c31db5bd225ca0c1219c761b668c6f91189
2018-02-02res_pjsip/config_domain_aliases.c: Add check for missing domain.Richard Mudgett
What is the point of defining an alias and not saying what is being aliased? Change-Id: I98a892016ed61dcf5efeb6619fd748925103f0be
2018-02-02res_pjsip.c: Fix documentation typos.Richard Mudgett
Change-Id: I82ae0b92bfa2ece84a5c684efd9eefdc83ebd068
2018-02-02res_sorcery_realtime.c: Fix ref leak if object failed to apply.Richard Mudgett
Change-Id: I3c7106ff77009754725cee790eadf5da44154ab6
2018-02-01res_pjsip_mwi.c: Fix null pointer crashJoshua Elson
ASTERISK-27652 #close Change-Id: I78a0d38bfd8d0d82830f3d53da04872d6b67284d
2018-02-01Merge "res_pjsip_pubsub: Prune subs with reliable transports at startup"George Joseph
2018-02-01Merge "res_pjsip_registrar_expire: Delete empty module."Jenkins2
2018-01-31Merge "res_pjsip_session: Prevent crash during shutdown."Jenkins2
2018-01-31res_pjsip_registrar_expire: Delete empty module.Corey Farrell
Verified nothing in the testsuite lists this module as a dependency. Change-Id: I90c7d52c7e15e85fde3389d5eaccb05b97848813
2018-01-31res_pjsip_registrar.c: Fix compiler error.Richard Mudgett
Need to include signal.h to define pthread_kill() and SIGURG. Change-Id: I10ae3aa4bf8e7386ac29ade78c0f2caed8e674fa
2018-01-30res_pjsip_session: Prevent crash during shutdown.Corey Farrell
pjproject does not have a function to reverse pjsip_inv_usage_init. This means we need to ignore any calls to the functions once shutdown is final. ASTERISK-27571 #close Change-Id: Ia550fcba563e2328f03162d79fb185f16b7c9b9d
2018-01-30res_pjsip_pubsub: Prune subs with reliable transports at startupGeorge Joseph
In an earlier release, inbound registrations on a reliable transport were pruned on Asterisk restart since the TCP connection would have been torn down and become unusable when Asterisk stopped. This same process is now also applied to inbound subscriptions. Also fixed issues in res_pjsip_registrar where it wasn't handling the monitoring correctly when multiple registrations came in over the same transport. To accomplish this, the pjsip_transport_event feature needed to be refactored to allow multiple monitors (multiple subcriptions or registrations from the same endpoint) to exist on the same transport. Since this changed the API, any external modules that may have used the transport monitor feature (highly unlikey) will need to be changed. ASTERISK-27612 Reported by: Ross Beer Change-Id: Iee87cf4eb9b7b2b93d5739a72af52d6ca8fbbe36
2018-01-29res_pjsip_registrar_expire: Refactor into res_pjsip_registerGeorge Joseph
res_pjsip_registrar_expire remains as an empty module for now. Change-Id: Ib93698938bae548d2199cb542f3692d1a171239f
2018-01-29Merge "Remove redundant module checks and references."Jenkins2
2018-01-26Merge "Add missing OPTIONAL_API and ARI dependences."Jenkins2
2018-01-24Remove redundant module checks and references.Corey Farrell
This removes references that are no longer needed due to automatic references created by module dependencies. In addition this removes most calls to ast_module_check as they were checking modules which are listed as dependencies. Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
2018-01-24Merge "res_pjsip: Add AMI action 'PJSIPShowContacts'"Jenkins2
2018-01-23res_pjsip: Add AMI action 'PJSIPShowContacts'Sungtae Kim
Add an AMI action which provides information on all configured Contacts. ASTERISK-27581 Change-Id: I2eed42c74bbc725fad26b8b33b1a5b3161950c73
2018-01-22Add missing OPTIONAL_API and ARI dependences.Corey Farrell
I've audited all modules that include any header which includes asterisk/optional_api.h. All modules which use OPTIONAL_API now declare those dependencies in AST_MODULE_INFO using requires or optional_modules as appropriate. In addition ARI dependency declarations have been reworked. Instead of declaring additional required modules in res/ari/resource_*.c we now add them to an optional array "requiresModules" in api-docs for each module. This allows the AST_MODULE_INFO dependencies to include those missing modules. Change-Id: Ia0c70571f5566784f63605e78e1ceccb4f79c606
2018-01-18res_pjsip: Document tlsv1_1 and tlsv1_2 methodsSean Bright
Change-Id: I67ed9039bf3f132fb20ee7a750e0aef0f704d7d3
2018-01-16res_pjsip: Split type=identify to IP address and SIP header matching prioritiesRichard Mudgett
The type=identify endpoint identification method can match by IP address and by SIP header. However, the SIP header matching has limited usefulness because you cannot specify the SIP header matching priority relative to the IP address matching. All the matching happens at the same priority and the order of evaluating the identify sections is indeterminate. e.g., If you had two type=identify sections where one matches by IP address for endpoint alice and the other matches by SIP header for endpoint bob then you couldn't predict which endpoint is matched when a request comes in that matches both. * Extract the SIP header matching criteria into its own "header" endpoint identification method so the user can specify the relative priority of the SIP header and the IP address matching criteria in the global endpoint_identifier_order option. The "ip" endpoint identification method now only matches by IP address. ASTERISK-27491 Change-Id: I9df142a575b7e1e3471b7cda5d3ea156cef08095
2018-01-16Merge "res_stasis_recording: Allow symbolic links in configured recordings dir."Jenkins2
2018-01-15loader: Add dependency fields to module structures.Corey Farrell
* Declare 'requires' and 'enhances' text fields on module info structure. * Rename 'nonoptreq' to 'optional_modules'. * Update doxygen comments. Still need to investigate dependencies among modules I cannot compile. Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf