summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-19Merge "format_wav: Read 16khz wav samples properly" into 13Joshua Colp
2017-04-19Merge "format_ogg_vorbis: Clear ogg/vorbis data structures on close" into 13Joshua Colp
2017-04-19Merge "Revert "bridging: Ensure successful T.38 negotation"" into 13Joshua Colp
2017-04-17format_wav: Read 16khz wav samples properlySean Bright
When opening a PCM wave file for reading, we aren't tracking the frequency of the opened file, so we treat 16khz files as 8khz and do half reads. This patch also cleans up some of the data types and an unnecessarily complex `if` expression. ASTERISK-26613 #close Reported by: Vitaly K Change-Id: I05f8b263058dc573ea8ffe0c62e7964506e11815
2017-04-15format_ogg_vorbis: Clear ogg/vorbis data structures on closeSean Bright
On filestream close, we need to clear out the ogg & vorbis data structures to prevent a memory leak. ASTERISK-26169 #close Reported by: Ivan Myalkin Change-Id: Iee94c5a5d5bdafbf8b181c5c064d15d90ace8274
2017-04-14Revert "bridging: Ensure successful T.38 negotation"Richard Mudgett
This reverts commit 3e7c396a51b240088c475dd53e7bac9869376129. Change-Id: I61d49d563babff788bb557345729b200d116bd88
2017-04-14format_pcm: Track actual header size of .au filesSean Bright
Sun's Au file format has a minimum data offset 24 bytes, but this offset is encoded in each .au file. Instead of assuming the minimum, read the actual value and store it for later use. ASTERISK-20984 #close Reported by: Roman S. Patches: asterisk-1.8.20.0-au-clicks-2.diff (license #6474) patch uploaded by Roman S. Change-Id: I524022fb19ff2fd5af2cc2d669d27a780ab2057c
2017-04-13Merge "modules: change module LOAD_FAILUREs to LOAD_DECLINES" into 13Joshua Colp
2017-04-12Merge "strings.h: Avoid overflows in the string hash functions" into 13zuul
2017-04-12Merge "bridging: Ensure successful T.38 negotation" into 13Joshua Colp
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-12Merge "res_rtp_asterisk.c: Add stun_blacklist option" into 13zuul
2017-04-12Merge changes from topics 'ASTERISK-26890', 'ASTERISK-26851' into 13Joshua Colp
* changes: stun.c: Fix ast_stun_request() erratic timeout. sorcery.c: Speed up ast_sorcery_retrieve_by_id() res_pjsip: Fix pointer use after unref. res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member.
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-11stun.c: Fix ast_stun_request() erratic timeout.Richard Mudgett
If ast_stun_request() receives packets other than a STUN response then we could conceivably never exit if we continue to receive packets with less than three seconds between them. * Fix poll timeout to keep track of the time when we sent the STUN request. We will now send a STUN request every three seconds regardless of how many other packets we receive while waiting for a response until we have completed three STUN request transmission cycles. Change-Id: Ib606cb08585e06eb50877f67b8d3bd385a85c266
2017-04-11sorcery.c: Speed up ast_sorcery_retrieve_by_id()Richard Mudgett
Return early if ast_sorcery_retrieve_by_id() is not passed an id to find. Also eliminated the RAII_VAR() usage in the function. Change-Id: I871dbe162a301b5ced8b4393cec27180c7c6b218
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-11tcptls.c: Cleanup TCP/TLS listener thread on abnormal exit.Richard Mudgett
Temporarily running out of file descriptors should not terminate the listener thread. Otherwise, when there becomes more file descriptors available, nothing is listening. * Added EMFILE exception to abnormal thread exit. * Added an abnormal TCP/TLS listener exit error message. * Closed the TCP/TLS listener socket on abnormal exit so Asterisk does not appear dead if something tries to connect to the socket. ASTERISK-26903 #close Change-Id: I10f2f784065136277f271159f0925927194581b5
2017-04-10strings.h: Avoid overflows in the string hash functionsTorrey Searle
On 2's compliment machines abs(INT_MIN) behavior is undefined and results in a negative value still being returnd. This results in negative hash codes that can result in crashes. ASTERISK-26528 #close Change-Id: Idff550145ca2133792a61a2e212b4a3e82c6517b
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 "pjproject_bundled: Crash on pj_ssl_get_info() while ↵zuul
ioqueue_on_read_complete()." into 13
2017-04-07Merge "pjsip: Add Alembic for PUBLISH support." into 13zuul
2017-04-07Merge "samples: Canonicalize app names in extensions.conf.sample." into 13zuul
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-07pjproject_bundled: Crash on pj_ssl_get_info() while ioqueue_on_read_complete().Alexander Traud
When the Asterisk channel driver res_pjsip offers SIP-over-TLS, sometimes, not reproducible, Asterisk crashed in pj_ssl_sock_get_info() because a NULL pointer was read. This change avoids this crash. ASTERISK-26927 #close Change-Id: I24a6011b44d1426d159742ff4421cf806a52938b
2017-04-06Merge "chan_sip: Session Timers required but refused wrongly." into 13Joshua Colp
2017-04-06Merge "pjproject_bundled: Add 3 upstream patches" into 13Joshua Colp
2017-04-06bridging: Ensure successful T.38 negotationTorrey Searle
When a T.38 happens immediatly after call establishment, the control frame can be lost because the other leg is not yet in the bridge. This patch detects this case an makes sure T.38 negotation happens when the 2nd leg is being made compatible with the negotating first leg ASTERISK-26923 #close Change-Id: If334125ee61ed63550d242fc9efe7987e37e1d94
2017-04-06Merge "sample_config: Add samples for pubsub to pjsip.conf.sample" into 13Joshua Colp
2017-04-06Merge "Unused realtime MOH classes not purged on 'moh reload'" into 13Joshua Colp
2017-04-05Merge "res_pjsip_session: Allow BYE to be sent on disconnected session." into 13Joshua Colp
2017-04-05pjproject_bundled: Add 3 upstream patchesGeorge Joseph
0035-r5572-svn-backport-dialog-transaction-deadlock.patch 0036-r5573-svn-backport-ua-pjsua-transaction-deadlock.patch 0037-r5576-svn-backport-session-timer-crash.patch Also removed the progress bar from wget download to stdout. ASTERISK-26905 #close Reported-by: Ross Beer Change-Id: I268fb3cf71a3bb24283ff0d24bd8b03239d81256
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-04-05samples: Canonicalize app names in extensions.conf.sample.Walter Doekes
This takes care of warnings by ossobv/asterisklint. Change-Id: Ia79aea64de89531362e993e34230c2044a70aa93
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-04CDR: Protect from data overflow in ast_cdr_setuserfield.Corey Farrell
ast_cdr_setuserfield wrote to a fixed length field using strcpy. This could result in a buffer overrun when called from chan_sip or func_cdr. This patch adds a maximum bytes written to the field by using ast_copy_string instead. ASTERISK-26897 #close patches: 0001-CDR-Protect-from-data-overflow-in-ast_cdr_setuserfie.patch submitted by Corey Farrell (license #5909) Change-Id: Ib23ca77e9b9e2803a450e1206af45df2d2fdf65c
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-03chan_sip: Session Timers required but refused wrongly.Alexander Traud
SIP user-agents indicate which protocol extensions are allowed in headers like Supported and Required. Such protocol extensions are Session Timers (RFC 4028) for example. Session Timers are supported since Mantis-10665. Since ASTERISK-21721, not only the first but multiple Supported/Required headers in a message are parsed. In that change, an existing variable was re-used within a newly added do-loop. Currently, at the end of that loop, that variable is an empty string always. Previously, that variable was used within log output. However, the log output was not changed. ASTERISK-26915 #close Change-Id: I09315f31b4d78fb214bb2a9fb6c0f5e143eae990
2017-04-01Merge "Forward declare 'struct ast_json' in asterisk.h" into 13zuul
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-31Merge "build: Fix deb build issues with fakeroot" into 13George Joseph
2017-03-31Merge "cdr_pgsql: Fix buffer overflow calling libpq" into 13zuul
2017-03-30Forward declare 'struct ast_json' in asterisk.hCorey Farrell
The ast_json structure is used in many Asterisk headers and is often the only part of json.h used. This adds a forward declaration to asterisk.h and removes the include of json.h from many headers. The declaration has been left in endpoints.h and stasis.h to avoid problems with source files that use ast_json functions without directly including json.h. ari.h continues to include json.h as it uses enum ast_json_encoding_format. Change-Id: Id766aabce6bed56626d27e8d29f559b5e687b769
2017-03-30Merge "CEL: Remove header declarations of non-existant functions." into 13zuul
2017-03-30cdr_pgsql: Fix buffer overflow calling libpqSean Bright
Implement the same buffer size checking done in cel_pgsql. ASTERISK-26896 #close Reported by: twisted Change-Id: Iaacfa1f1de7cb1e9414d121850d2d8c2888f3f48
2017-03-30Merge "res_pjsip_config_wizard: Add 2 new parameters to help with proxy ↵George Joseph
config" into 13
2017-03-30build: Fix deb build issues with fakerootWalter Doekes
If DESTDIR is set, don't call ldconfig. Assume that DESTDIR is used to create a binary archive. The ldconfig call should be delegated to the archive postinst script. This fixes the case where fakeroot wraps 'make install' causing $EUID to be 0 even though it doesn't have permission to call ldconfig. The previous logic in configure.ac to detect and correct libdir has been removed as it was not completely accurate. CentOS 64-bit users should again specifiy --libdir=/usr/lib64 when configuring to prevent install to /usr/lib. Updated Makefile:check-old-libdir to check for orphans in lib64 when installing to lib as well as orphans in lib when installing to lib64. Updated Makefile and main/Makefile uninstall targets to remove the orphans using the new logic. ASTERISK-26705 Change-Id: I51739d4a03e60bff38be719b8d2ead0007afdd51
2017-03-30astobj2: Prevent potential deadlocks with ao2_global_obj_releaseSean Bright
The ao2_global_obj_release() function holds an exclusive lock on the global object while it is being dereferenced. Any destructors that run during this time that call ao2_global_obj_ref() will deadlock because a read lock is required. Instead, we make the global object inaccessible inside of the write lock and only dereference it once we have released the lock. This allows the affected destructors to fail gracefully. While this doesn't completely solve the referenced issue (the error message about not being able to create an IQ continues to be shown) it does solve the backtrace spew that accompanied it. ASTERISK-21009 #close Reported by: Marcello Ceschia Change-Id: Idf40ae136b5070dba22cb576ea8414fbc9939385