summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2018-03-21Merge "chan_sip: Peers with distinct source ports don't match, regardless of ↵Jenkins2
transport."
2018-03-20Merge "BuildSystem: Enable Advanced Linux Sound Architecture (ALSA) in NetBSD."Jenkins2
2018-03-16BuildSystem: Enable Advanced Linux Sound Architecture (ALSA) in NetBSD.Alexander Traud
In the script ./configure, AST_EXT_LIB_CHECK checks for external libraries. Some libraries do not specify all their dependencies and require additional shared libraries. In AST_EXT_LIB_CHECK, this is the fifth parameter. However, if a library is specified there, it must exist on the platform, because ./configure tries to compile/link/execute a small app using those statements. For example, the library libdl.so is Linux specific and does not exist on BSD-like platforms. Furthermore, no supported platform/version was found, which still (ever?) requires those additional libraries. Therefore, they were simply removed. Finally, this change adds the error code ESTRPIPE to the channel driver chan_alsa for those platforms which lack it, again for example NetBSD. ASTERISK-27720 Change-Id: I3b21f2135f6cbfac7590ccdc2df753257f426e0b
2018-03-14loader: Convert reload_classes to built-in modules.Corey Farrell
* acl (named_acl.c) * cdr * cel * ccss * dnsmgr * dsp * enum * extconfig (config.c) * features * http * indications * logger * manager * plc * sounds * udptl These modules are now loaded at appropriate time by the module loader. Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so the module loader will abort startup on failure of these modules. Some of these modules are still initialized or shutdown from outside the module loader. logger.c is initialized very early and shutdown very late, manager.c is initialized by the module loader but is shutdown by the Asterisk core (too much uses it without holding references). Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
2018-03-12Merge "Replace direct checks of option_debug with DEBUG_ATLEAST macro."Jenkins2
2018-03-07Replace direct checks of option_debug with DEBUG_ATLEAST macro.Corey Farrell
Checking option_debug directly is incorrect as it ignores file/module specific debug settings. This system-wide change replaces nearly all direct checks for option_debug with the DEBUG_ATLEAST macro. Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
2018-03-07chan_sip: Fix improper RTP framing on outgoing callsJean Aunis
The "ptime" SDP parameter received in a SIP response was not honoured. Moreover, in the abscence of this "ptime" parameter, locally configured framing was lost during response processing. This patch systematically stores the framing information in the ast_rtp_codecs structure, taking it from the response or from the configuration as appropriate. ASTERISK-27674 Change-Id: I828a6a98d27a45a8afd07236a2bd0aa3cbd3fb2c
2018-03-05Merge "chan_unistim: NetBSD has an incompatible struct in_pktinfo."Jenkins2
2018-03-03chan_unistim: NetBSD has an incompatible struct in_pktinfo.Alexander Traud
ASTERISK-27714 Reported by: John Nemeth Change-Id: I1b84a89315a5f61222123d21bf35c59224da8990
2018-02-20chan_sip: Emit a second ringing event to ensure channel is found.Joshua Colp
When constructing a dialog-info+xml NOTIFY message a ringing channel is found if the state is ringing and further information is placed into the message. Due to the migration to the Stasis message bus this did not always work as expected. This change raises a second ringing event in such a way to guarantee that the event is received by chan_sip and another lookup is done to find the ringing channel. ASTERISK-24488 Change-Id: I547a458fc59721c918cb48be060cbfc3c88bcf9c
2018-02-12chan_sip.c: Fix crash processing CANCEL.Richard Mudgett
Check if initreq data string exists before using it when processing a CANCEL request. ASTERISK-27666 Change-Id: Id1d0f0fa4ec94e81b332b2973d93e5a14bb4cc97
2018-02-03chan_console: don't read and write at the same timeOron Peled
It seems that the ALSA backend of PortAudio doesn't know how to both read and write at the same time by adding a per-device mutex. FIXME: currently only a draft version. Need to either auto-detect we work with the ALSA backend or add an extra configuration option to use this mutex. ASTERISK-27426 #close Change-Id: I635eacee45f5413faa18f5a3b606af03b926dacb
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-18chan_unistim: Fix hold function ability to lock/crash asteriskIgor Goncharovsky
This patch fix chan_unistim hold functions to correctly support hold function in different states possible in case of multiple lines established on the phone ASTERISK-26596 #close Change-Id: Ib1e04e482e7c8939607a42d7fddacc07e26e14d4
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
2018-01-11chan_sip: Check that an iostream exists before accessing.Joshua Colp
Before getting the file descriptor for an iostream check that it is present. ASTERISK-27534 Change-Id: Ie0aa1394007a37c30e337ea1176a6fb3a63bc99c
2017-12-31ice: Increase foundation buffer sizeSean Bright
Per RFC 5245, the foundation specified with an ICE candidate can be up to 32 characters but we are only allowing for 31. ASTERISK-27498 #close Reported by: Michele Prà Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf
2017-12-22astobj.h: Remove from Asterisk core.Corey Farrell
This is the old ASTOBJ macro's which are no longer used except by the deprecated netsock.c. Move it to the chan_iax2 include folder so it does not get used elsewhere. Change-Id: I7e4ae96678b36b9f41d3cae14b167f110eb5d349
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-20Fix Common Typo's.Corey Farrell
Fix instances of: * Retreive * Recieve * other then * different then * Repeated words ("the the", "an an", "and and", etc). * othterwise, teh ASTERISK-24198 #close Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
2017-12-19Merge "chan_sip: Fix memory leaks."Jenkins2
2017-12-19Merge "Remove constant conditionals (dead-code)."Jenkins2
2017-12-19chan_sip: Fix memory leaks.Corey Farrell
In change_redirecting_information variables we use ast_strlen_zero to see if a value should be saved. In the case where the value is not NULL but is a zero length string we leaked. handle_response_subscribe leaked a reference to the ccss monitor instance. Change-Id: Ib11444de69c3d5b2360a88ba2feb54d2c2e9f05f
2017-12-19Remove constant conditionals (dead-code).Corey Farrell
Some variables are set and never changed, making them constant. This means that code in the 'false' block of the conditional is unreachable. In chan_skinny and res_config_ldap I used preprocessor directive `#if 0` as I'm unsure if the unreachable code could be enabled in the future. Change-Id: I62e2aac353d739fb3c983cf768933120f5fba059
2017-12-19chan_console: Use correct parameter for 'set active'Oron Peled
chan_console supports multiple devices but the CLI only works on a single device. 'console set active' selects this device. Sadly that CLI picks the wrong command-line parameter and will only work for a device called 'active'. ASTERISK-27490 #close Change-Id: I2f0e5fe63db19845bee862575b739360797dc73d
2017-12-18Merge "netsock: Remove from Asterisk core."Jenkins2
2017-12-18Merge changes from topic 'faster-aco'Joshua Colp
* changes: aco: Minimize use of regex. aco: Create ways to minimize use of regex.
2017-12-18netsock: Remove from Asterisk core.Corey Farrell
This moves netsock.c / netsock.h to the chan_iax2 module. netsock.h has been marked deprecated since 13.0.0, chan_iax2 is the only remaining user. Change-Id: I28c6578043bac18de5ea608e136acec4f83d5dd3
2017-12-18Merge "chan_pjsip.c: Improve ast_request() diagnostic msgs."Jenkins2
2017-12-15chan_pjsip.c: Improve ast_request() diagnostic msgs.Richard Mudgett
Attempting to dial PJSIP/endpoint when the endpoint doesn't exist and disable_multi_domain=no results in a misleading empty endpoint name message. The message should say the endpoint was not found. * Added missing endpoint not found message. * Added more information to the empty endpoint name msgs if available. * Eliminated RAII_VAR in request(). Change-Id: I21da85ebd62dcc32115b2ffcb5157416ebae51e4
2017-12-15chan_sip: Add security event for calls to invalid extension.Corey Farrell
Log a message to security events when an INVITE is received to an invalid extension. ASTERISK-25869 #close Change-Id: I0da40cd7c2206c825c2f0d4e172275df331fcc8f
2017-12-15aco: Minimize use of regex.Corey Farrell
Remove nearly all use of regex from ACO users. Still remaining: * app_confbridge has a legitamate use of option name regex. * ast_sorcery_object_fields_register is implemented with regex, all callers use simple prefix based regex. I haven't decided the best way to fix this in both 13/15 and master. Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
2017-12-14Merge "chan_sip: 3PCC patch for AMI "SIPnotify""Joshua Colp
2017-12-13Merge "chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)"Joshua Colp
2017-12-13Merge "chan_sip: Don't crash in Dial on invalid destination"Jenkins2
2017-12-13chan_sip: 3PCC patch for AMI "SIPnotify"Yasuhiko Kamata
A patch for sending in-dialog SIP NOTIFY message with "SIPnotify" AMI action. ASTERISK-27461 Change-Id: I5797ded4752acd966db6b13971284db684cc5ab4
2017-12-12chan_sip: Don't send trailing \0 on keep alive packetsSean Bright
This is a partial fix for ASTERISK~25817 but does not address the comments regarding RFC 5626. Change-Id: I227e2d10c0035bbfa1c6e46ae2318fd1122d8420
2017-12-12chan_sip: Don't crash in Dial on invalid destinationSean Bright
Stripping the DNID in a SIP dial string can result in attempting to call the argument parsing macros on an empty string, causing a crash. ASTERISK-26131 #close Reported by: Dwayne Hubbard Patches: dw-asterisk-master-dnid-crash.patch (license #6257) patch uploaded by Dwayne Hubbard Change-Id: Ib84c1f740a9ec0539d582b09d847fc85ddca1c5e
2017-12-12chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)Richard Mudgett
This patch does three things associated with the initial incoming INVITE request URI. 1) Add access to the full initial incoming INVITE request URI. 2) We were not setting DNID on incoming PJSIP channels. The DNID is the user portion of the initial incoming INVITE Request-URI. The value is accessed by reading CALLERID(dnid). 3) Fix CHANNEL(pjsip,target_uri) documentation. * The initial incoming INVITE request URI is now available using CHANNEL(pjsip,request_uri). * Set the DNID on PJSIP channel creation so CALLERID(dnid) can return the initial incoming INVITE request URI user portion. * CHANNEL(pjsip,target_uri) now correctly documents that the target URI is the contact URI. * Refactored print_escaped_uri() out of channel_read_pjsip() to handle pjsip_uri_print() error condition when the buffer is too small. ASTERISK-27478 Change-Id: I512e60d1f162395c946451becb37af3333337b33
2017-12-08utils: Add convenience function for setting fd flagsSean Bright
There are many places in the code base where we ignore the return value of fcntl() when getting/setting file descriptior flags. This patch introduces a convenience function that allows setting or clearing file descriptor flags and will also log an error on failure for later analysis. Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
2017-12-04security-events: Fix SuccessfulAuth using_password declaration.Richard Mudgett
The SuccessfulAuth using_password field was declared as a pointer to a uint32_t when the field was later read as a uint32_t value. This resulted in unnecessary casts and a non-portable field value reinterpret in main/security_events.c:add_json_object(). i.e., It would work on a 32 bit architecture but not on a 64 bit big endian architecture. Change-Id: Ia08bc797613a62f07e5473425f9ccd8d77c80935
2017-12-04chan_sip: Peers with distinct source ports don't match, regardless of transport.Alexander Traud
Previously, peers connected via TCP (or TLS) were matched by ignoring their source port. One cannot say anything when protocol:IP:port match, yes (see <http://stackoverflow.com/q/3329641>). However, when the ports do not match, the peers do not match as well. This change allows two peers connected to an Asterisk server via TCP (or TLS) behind a NAT (= same source IP address) to be differentiated via their port as well. ASTERISK-27457 Reported by: Stephane Chazelas Change-Id: Id190428bf1d931f2dbfd4b293f53ff8f20d98efa
2017-12-01AST-2017-013: chan_skinny: Call pthread_detach when sess threads endGeorge Joseph
chan_skinny creates a new thread for each new session. In trying to be a good cleanup citizen, the threads are joinable and the unload_module function does a pthread_cancel() and a pthread_join() on any sessions that are active at that time. This has an unintended side effect though. Since you can call pthread_join on a thread that's already terminated, pthreads keeps the thread's storage around until you explicitly call pthread_join (or pthread_detach()). Since only the module_unload function was calling pthread_join, and even then only on the ones active at the tme, the storage for every thread/session ever created sticks around until asterisk exits. * A thread can detach itself so the session_destroy() function now calls pthread_detach() just before it frees the session memory allocation. The module_unload function still takes care of the ones that are still active should the module be unloaded. ASTERISK-27452 Reported by: Juan Sacco Change-Id: I9af7268eba14bf76960566f891320f97b974e6dd (cherry picked from commit 8f5dff543e457ee3450d21e741901609af0cd779)
2017-11-21chan_sip: ICE contained square brackets around IPv6 addresses.Alexander Traud
ASTERISK-27434 Change-Id: Iaeed89b4fa05d94c5f0ec2d3b7cd6e93d2d5a8f7
2017-11-15chan_pjsip.c: Improve answer failure log messages.Richard Mudgett
* Balanced the session->inv_session refs on answer failure. Change-Id: I33542d639d37e692cb46550b972a5fcfc3b804b8
2017-11-11core: Add cache_media_frames debugging option.Richard Mudgett
The media frame cache gets in the way of finding use after free errors of media frames. Tools like valgrind and MALLOC_DEBUG don't know when a frame is released because it gets put into the cache instead of being freed. * Added the "cache_media_frames" option to asterisk.conf. Disabling the option helps track down media frame mismanagement when using valgrind or MALLOC_DEBUG. The cache gets in the way of determining if the frame is used after free and who freed it. NOTE: This option has no effect when Asterisk is compiled with the LOW_MEMORY compile time option enabled because the cache code does not exist. To disable the media frame cache simply disable the cache_media_frames option in asterisk.conf and restart Asterisk. Sample asterisk.conf setting: [options] cache_media_frames=no ASTERISK-27413 Change-Id: I0ab2ce0f4547cccf2eb214901835c2d951b78c00
2017-11-09chan_pjsip.c: Fix uninitialized cause value on failure.Richard Mudgett
Change-Id: I3f9dd3c31bd582e54a30381500077de2319d8cc3
2017-11-06Merge "dtls: Add support for ephemeral DTLS certificates."Joshua Colp
2017-11-06dtls: Add support for ephemeral DTLS certificates.Sean Bright
This mimics the behavior of Chrome and Firefox and creates an ephemeral X.509 certificate for each DTLS session. Currently, the only supported key type is ECDSA because of its faster generation time, but other key types can be added in the future as necessary. ASTERISK-27395 Change-Id: I5122e5f4b83c6320cc17407a187fcf491daf30b4
2017-11-02Add missing menuselect dependencies.Corey Farrell
This adds menuselect dependencies for modules that use symbols of other modules. ASTERISK-27390 Change-Id: Ia2d2849f5b87a72af7324a82edc3f283eafb5385