summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2017-04-12modules: change module LOAD_FAILUREs to LOAD_DECLINES (14)George Joseph
Change-Id: If99e3b4fc2d7e86fc3e61182aa6c835b407ed49e
2017-04-12modules: change module LOAD_FAILUREs to LOAD_DECLINESGeorge Joseph
In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed to AST_MODULE_LOAD_DECLINE. This prevents asterisk from exiting if a module can't be loaded. If the user wishes to retain the FAILURE behavior for a specific module, they can use the "require" or "preload-require" keyword in modules.conf. A new API was added to logger: ast_is_logger_initialized(). This allows asterisk.c/check_init() to print to the error log once the logger subsystem is ready instead of just to stdout. If something does fail before the logger is initialized, we now print to stderr instead of stdout. Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
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-11res_pjsip: Fix pointer use after unref.Richard Mudgett
Change-Id: I4b6e1b0070563eeaee223cb58326f1b962ed5bc1
2017-04-11res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member.Richard Mudgett
* create_rtp(): Eliminate use of deprecated transport struct member. That member and several others in the transport structure were deprecated because of an infinite loop created when using realtime configuration. See 2451d4e4550336197ee2e482750cc53f30afa352 ASTERISK-26851 Change-Id: I0533aa13c9ce3c6cc394e0fd2b5bf1cd1b2ef3bc
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-05Merge "Unused realtime MOH classes not purged on 'moh reload'"zuul
2017-04-05Merge "res_pjsip_session: Allow BYE to be sent on disconnected session."zuul
2017-04-04res_pjsip_sdp_rtp.c: Don't alter global addr variable.Richard Mudgett
* create_rtp(): Fix unexpected alteration of global address_rtp if a transport is bound to an address. * create_rtp(): Fix use of uninitialized memory if the endpoint RTP media address is invalid or the transport has an invalid address. ASTERISK-26851 Change-Id: Icde42e65164a88913cb5c2601b285eebcff397b7
2017-04-03Unused realtime MOH classes not purged on 'moh reload'Daniel Journo
Purge Realtime MOH classes on 'moh reload' even when musiconhold.conf hasn't changed. ASTERISK-25974 #close Change-Id: I42c78ea76528473a656f204595956c9eedcf3246
2017-04-03res_pjsip: Fix transport ref leak.Richard Mudgett
We were leaking a transport ref in multihomed_on_rx_message() which resulted in the FRACK about excessive ref counts. ASTERISK-26916 #close Change-Id: I7a96658a9614a060565bb9ad51cb1c9c11ee145f
2017-04-01res_pjsip_session: Allow BYE to be sent on disconnected session.Joshua Colp
It is perfectly acceptable for a BYE to be sent on a disconnected session. This occurs when we respond to a challenge to the BYE for authentication credentials. ASTERISK-26363 Change-Id: I6ef0ddece812fea6665a1dd2549ef44fb9d90045
2017-03-30Merge "res_pjsip_config_wizard: Add 2 new parameters to help with proxy config"zuul
2017-03-29Merge "srtp: Allow zero as tag value for a sRTP Crypto Suite."Joshua Colp
2017-03-29Merge "Add DTLS sanity check."zuul
2017-03-29Merge "res_musiconhold: Don't chdir() when scanning MoH files"zuul
2017-03-29srtp: Allow zero as tag value for a sRTP Crypto Suite.Alexander Traud
ASTERISK-25490 #close Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f
2017-03-29Merge "res_xmpp: Fix ref counting issue"Joshua Colp
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) (cherry picked from commit 27344675be1941d30508c6e6bd684acdd0791e1a)
2017-03-28Merge "res_xmpp: Use incremental backoff when a read error occurs"Joshua Colp
2017-03-27Add DTLS sanity check.Richard Mudgett
Change-Id: Ib32612cf6c7ce9213a11b9cba82f630f8cd3564b
2017-03-27res_musiconhold: Don't chdir() when scanning MoH filesSean Bright
There doesn't appear to be any reason that we are chdir'ing in moh_scan_files, and in the event of an Asterisk crash, the core files may not get written because we have changed into a read-only directory. ASTERISK-23996 #close Reported by: Walter Doekes Change-Id: Iac806dce01b3335963fbd62d4b4da9a65c614354
2017-03-25Merge "res_pjsip_sdp_rtp: Set hangup cause for RTP timeouts"Joshua Colp
2017-03-24res_xmpp: Use incremental backoff when a read error occursSean Bright
If a read error occurs, we immediately attempt a reconnect without any delay. Instead, let's sleep and backoff up to 60 seconds before we try again. ASTERISK-24712 #close Reported by: Matthias Urlichs Change-Id: I6fe10ef4734837727437beab715e336777f13f48
2017-03-24Merge "res_xmpp: Correct implementation of JABBER_STATUS & JabberStatus"zuul
2017-03-24Merge "res_xmpp: Include client name in connection related error messages"zuul
2017-03-24res_pjsip_sdp_rtp: Set hangup cause for RTP timeoutsSean Bright
chan_sip sets the hangup cause code to AST_CAUSE_REQUESTED_CHAN_UNAVAIL (44) when a channel is hung up due to an RTP timeout. So do the same when it happens with PJSIP for parity. Change-Id: I3546ebbde6460c22a27c9da1bf321711b5961ab8
2017-03-24Merge "res_xmpp: Don't crash when trying to send a message without a connection"Joshua Colp
2017-03-24Merge "res_xmpp: Correctly check return value of SSL_connect"zuul
2017-03-23res_xmpp: Correct implementation of JABBER_STATUS & JabberStatusSean Bright
The documentation for JABBER_STATUS (and the deprecated JabberStatus app) indicate that a return value of 7 indicates that the specified buddy was not in the roster. It also indicates that you can specify a "bare" JID (one without a resource). Unfortunately the actual behavior does not match the documented behavior. Assuming that our roster includes the buddy online and available "valid@example.org/Valid" and does *not* include the buddy "invalid@example.org", the JABBER_STATUS() function returns the following before this patch: +------------------------------+------------+--------------------------+ | Buddy | Status | Result | +------------------------------+------------+--------------------------+ | valid@example.org | Online | 7 (Not in roster) | | valid@example.org/Valid | Online | 1 (Online) | | valid@example.org/Invalid | N/A | 7 (Not in roster) | | invalid@example.org | N/A | Error logged, no return | | invalid@example.org/Valid | N/A | Error logged, no return | +------------------------------+------------+--------------------------+ And after this patch: +------------------------------+------------+--------------------------+ | Buddy | Status | Result | +------------------------------+------------+--------------------------+ | valid@example.org | Online | 1 (Online) | | valid@example.org/Valid | Online | 1 (Online) | | valid@example.org/Invalid | N/A | 6 (Offline) | | invalid@example.org | N/A | 7 (Not in roster) | | invalid@example.org/Valid | N/A | 7 (Not in roster) | +------------------------------+------------+--------------------------+ This brings the behavior in line with the documentation. ASTERISK-23510 #close Reported by: Anthony Critelli Change-Id: I9c3241035363ef4a6bdc21fabfd8ffcd9ec657bf
2017-03-23res_xmpp: Try to provide useful errors messages from OpenSSLSean Bright
If any errors occur during the TLS connection setup, we currently dump a fairly generic error message. So instead we try to pull in something useful from OpenSSL to report instead. ASTERISK-24712 Reported by: Matthias Urlichs Change-Id: I288500991a9681f447d92913b11fedaf426087f4
2017-03-23res_xmpp: Fix ref counting issueSean Bright
The only remaining reference to the endpoint is in the endpoints container, and because it is unlinked in ast_endpoint_shutdown, we don't have to explicitly cleanup the endpoint ourselves. Change-Id: I912a2692e52d3e2ed445b32d8ae3f9004bc2f2e8
2017-03-23res_xmpp: Correctly check return value of SSL_connectSean Bright
SSL_connect returns non-zero for both success and some error conditions so simply negating is inadequate. Change-Id: Ifbf882896e598703b6c615407fa456d3199f95b1
2017-03-23res_xmpp: Don't crash when trying to send a message without a connectionSean Bright
If we never establish a connection to our Jabber server, iksemel never sets up its internal transport pointer, so attempting to send a message dereferences a NULL pointer and causes a crash. ASTERISK-21855 #close Reported by: Jeremy Kister Change-Id: I204a568894e4a53ab929783ecc594a000f04d79c
2017-03-23res_xmpp: Include client name in connection related error messagesSean Bright
ASTERISK-25622 #close Reported by: Sean Darcy Change-Id: I8472cb7bfb58d411a3cfbd482da98cae2d94d1e9
2017-03-22Merge "res_pjsip_session: Enable RFC3578 overlap dialing support."Joshua Colp
2017-03-22Merge "res_pjsip_messaging: Check URI type before dereferencing"zuul
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-21res_hep: Capture actual transport type in useSean Bright
Rather than hard-coding UDP, allow consumers of the HEP API to specify which protocol is in use. Update the PJSIP provider to pass in the current protocol type. ASTERISK-26850 #close Change-Id: I54bbb0a001cfe4c6a87ad4b6f2014af233349978
2017-03-21res_pjsip_messaging: Check URI type before dereferencingSean Bright
We aren't validating that the URI we just parsed is a SIP/SIPS one before trying to access the user, host, and port members of a possibly uninitialized structure. Also update the MessageSend documentation to indicate what 'from' formats are accepted. ASTERISK-26484 #close Reported by: Vinod Dharashive Change-Id: I476b5cc5f18a7713d0ee945374f2a1c164857d30
2017-03-20Merge "res/res_pjsip_session: Only check localnet if it is defined"Joshua Colp
2017-03-19res_rtp_asterisk: Pass correct data length to ast_rtcp_interpretSean Bright
We are currently passing in the capacity of the read buffer instead of the number of bytes that we actually read off the wire. Change-Id: I60465049727d955c7f9a5e529e6f2aaff04cda36
2017-03-18Merge "res_rtp_asterisk: Fix crash when RTCP is not present when DTLS is ↵Joshua Colp
stopped."
2017-03-18Merge "res_pjsip_asterisk.c: Fix compile error if libsrtp is not installed."Joshua Colp
2017-03-17Merge "res_pjsip_sdp_rtp.c: Fix cut-n-paste error"Joshua Colp
2017-03-17Merge "res_pjsip_sdp_rtp: RTP instance does not use same IP as explicit ↵Joshua Colp
transport"
2017-03-16res_pjsip_asterisk.c: Fix compile error if libsrtp is not installed.Richard Mudgett
struct ast_rtcp does not define the dtls member if SRTP is not enabled. ASTERISK-26732 Change-Id: Id15ea212e04490e012f2cf4a56818b4dd948875e
2017-03-16Merge "res_pjsip: Symmetric transports"Joshua Colp
2017-03-16res_pjsip_sdp_rtp.c: Fix cut-n-paste errorRichard Mudgett
We were inadvertenly referencing the cos_video option to determine if we should set the tos_audio and cos_audio value on the RTP instance. Change-Id: Ia7964f486801d39dc6f5dae570baff079e1595b0
2017-03-16res/res_pjsip_session: Only check localnet if it is definedMatt Jordan
If local_net is not defined on a transport, transport_state->localnet will be NULL. ast_apply_ha will, be default, return AST_SENSE_ALLOW in this case, causing the external_media_address, if set, to be skipped. This patch causes us to only check if we are sending within a network if local_net is defined. ASTERISK-26879 #close Change-Id: Ib661c31a954cabc9c99f1f25c9c9a5c5b82cbbfb