summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-30Merge "chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no"zuul
2016-11-30Merge "chan_sip: Fix segfault during module unload"Joshua Colp
2016-11-30chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=noAlexei Gradinari
The sending codec is switched to the receiving codec and then is switched back to the best native codec on EVERY receiving RTP packets. This is because after call of ast_channel_set_rawwriteformat there is call of ast_set_write_format which calls set_format which sets rawwriteformat to the best native format. This patch adds a new function ast_set_write_format_path which set specific write path on channel and uses this function to switch the sending codec. ASTERISK-26603 #close Change-Id: I5b7d098f8b254ce8f45546e6c36e5d324737f71d
2016-11-28Merge "res/res_pjsip: Fix documentation whitespace issues"Joshua Colp
2016-11-28Merge "build_tools: Fix download_externals to handle certified branches"zuul
2016-11-28res/res_pjsip: Fix documentation whitespace issuesMatt Jordan
Tabs > Spaces. Change-Id: If1e43a71822615a898e958e0f8b2e882606f0bd0
2016-11-28Merge "autoconf: more variants for OSARCH linux-gnu"Joshua Colp
2016-11-28build_tools: Fix download_externals to handle certified branchesGeorge Joseph
download_externals wasn't handling the "certified/13.x" version correctly. Change-Id: I124d195bb117ca36fd7bf1150c630f3b474a9d9a
2016-11-28Merge "codec_dahdi: Fix poll.h include."Joshua Colp
2016-11-28Merge "ast_format: Adds an identifier for interleaved audio formats to the ↵Joshua Colp
ast_format"
2016-11-28iostream: Move include of asterisk.hJoshua Colp
The asterisk.h header file needs to be included first or else some things go awry, such as: implicit declaration of function 'vasprintf' Change-Id: I981dc2a77a1ba791888e4f1726644d4656c0407c
2016-11-26chan_sip: Fix segfault during module unloadMichael Kuron
If a TCP/TLS connection was pending (not accepted and not timed out) during unload of chan_sip, Asterisk would segfault when trying to send a signal to a thread whose thread ID hadn't been recorded yet. This commit fixes that by recording the thread ID before calling the blocking connect() syscall. This was a regression introduced by 776a14386a55b5425c7e9617eff8af8b45427144. The above wasn't enough to fix the segfault, which was now delayed to the point where connect() timed out. Therefore, it was necessary to also remove the SA_RESTART flag from the SIGURG sigaction so that pthread_kill() could be used to interruput the connect() syscall. This was a regression introduced by 5d313f51b982a18f7321adcf7c7a4e822d8b2714. ASTERISK-26586 #close Change-Id: I76fd9d47d56e4264e2629bce8ec15fecba673e7b
2016-11-23res_rtp_asterisk: RTT miscalculation in RTCPgestoip2
When retrieving RTCP stats for PJSIP channels, RTT values are unreliable. RTT calculation is correct, but the data representation isn't. RTT is represented by a 32-bit fixed-point number with the integer part in the first 16 bits and the fractional part in the last 16 bits. In order to get the RTT value, the fractional part is miscalculated, there is an unnecessary 16 bit shift that causes overflow. Besides this there is another mistake, when transforming the integer value to the fixed point fractional part via bitwise operation, that loses precision. * RTT fractional part is no longer shifted, avoiding overflow. * RTT fractional part is transformed to its fixed-point value more precisely. * Fixed timeval2ntp() and ntp2timeval() second fraction conversions. * Fixed NTP timestamp report logging. The usec was inexplicably multiplied by 4096. ASTERISK-26566 #close Reported by Hector Royo Concepcion Change-Id: Ie09bdabfee75afb3f1b8ddfd963e5219ada3b96f
2016-11-22Merge "addons/chan_mobile: do not use strerror_r"Joshua Colp
2016-11-22Merge "Add support for older name resolving version libraries like openBSD"Joshua Colp
2016-11-21pjproject_bundled: Use $(LIB_RT) for link of libasteriskpjGeorge Joseph
libasteriskpj was hard coded to use -lrt but librt is linux specific so we now use the LIB_RT variable which gets set by configure. Change-Id: I41148884517e3031f7675a413d524c86e8614694
2016-11-21Merge "pjproject_bundled: Improve reliability of pjproject download"zuul
2016-11-21Merge "main/app.c: Transmit Silence on ControlPlayback pause"Joshua Colp
2016-11-20Merge "Add support for building RADIUS with radcli"zuul
2016-11-20Add support for older name resolving version libraries like openBSDsnuffy
Fix support of OS's like openBSD that use an older nameser.h, this change reverts the defines to the older style which on other systems is found in nameser_compat.h Tested on openBSD 6.0, Debian 8 ASTERISK-26608 #close Change-Id: Iffb36caab8c5aa9dece0ce2d009041f7b56cc86a
2016-11-18Bump ARI version to 2.0.0Mark Michelson
In order to not have version number overlap between different versions of Asterisk, each new major version of Asterisk will mean we also bump the ARI major version number. This particular change does NOT introduce any known breaking changes to ARI. For discussion relating to this topice, see: http://lists.digium.com/pipermail/asterisk-dev/2016-November/075964.html Change-Id: I712ee0df177a8fe1252da2bc029705268b97b665
2016-11-18Merge "build: Various OpenBSD issues"zuul
2016-11-18pjproject_bundled: Improve reliability of pjproject downloadGeorge Joseph
The download process now has a timeout which will cause wget to retry if it stops retrieving data for 5 seconds and fetch and curl to timeout if the whole retrieval take smore than 30 seconds. If the tarball retrieval works, the MD5SUM file is retrieved from the downloads site and the md5 checksum is verified. If either the tarball retrieval or MD5SUM retrieval fails, or the checksums don't match, the entire process is retried once. If it fails again, any incomplete tarball is deleted. .DELETE_ON_ERROR: was also added to the Makefile. Not only does this delete the tarball on failure, it till also delete corrupted library files from the pjproject source directory should they fail to build correctly. Tested all the way back to FreeBSD 9, CentOS 6, Debian 6 and Ubuntu 14. Change-Id: Iea7d33b96a31622ab1b6e54baebaf271959514e1
2016-11-18Merge "manager: update minor version"Joshua Colp
2016-11-17main/app.c: Transmit Silence on ControlPlayback pausemisha
ASTERISK-26562 #close Change-Id: Ie6cb0ffc2b8c775639ce7784fe96f4ea00cfa2f8
2016-11-17Merge "Implement internal abstraction for iostreams"Joshua Colp
2016-11-17manager: update minor versionMark Michelson
Based on bridge video AMI event changes, bump the minor version of AMI. Change-Id: Idf84507354170400813cda780906c94c9f1b60b4
2016-11-17codec_dahdi: Fix poll.h include.Timo Teräs
POSIX defines poll.h. sys/poll.h should not be used as it is c-library internal header which may or may not exist. Notably in musl including sys/poll.h generates warning of being incorrect. Change-Id: Ib318c1c7142a737bcf3caa4d8d72560bebe39252
2016-11-17Merge "res_pjsip_outbound_authenticator_digest.c: Fix memory pool leak."Joshua Colp
2016-11-17Merge "codec_opus: Fix warning when Opus negotiated but codec_opus not loaded."Joshua Colp
2016-11-16Merge "res_format_attr_opus: Fix fmtp generation."zuul
2016-11-16build: Various OpenBSD issuesGeorge Joseph
OpenBSD's 'find' doesn't take the -delete argument so you have to pipe through 'xargs rm -rf'. 'echo -e' doesn't like \t starting a line. It just prints 't' which causes the libasteriskpj.exports file to be garbage. They were just cosmetic so they were removed. librt doesn't exist so the link of libasteriskpj.so fails. It's not actually needed for linux anyway so -lrt was removed from the link. res_rtp_asterisk was failing to load because of an undefined DTLS_method. '|| defined(LIBRESSL_VERSION_NUMBER)' was added to the #if so DTLSv1_method is used instead. ASTERISK-26608 Change-Id: I926ec95b0b69633231e3ad1d6e803b977272c49c
2016-11-16Merge "channel: Fix issues in hangup scenarios caused by frame deferral"George Joseph
2016-11-16Merge "Revert "Revert "channel: Use frame deferral API for safe sleep."""George Joseph
2016-11-16Merge "Revert "Revert "autoservice: Use frame deferral API"""George Joseph
2016-11-16Merge "Revert "Revert "AGI: Only defer frames when in an interception ↵George Joseph
routine."""
2016-11-16Merge "Revert "Revert "Add API for channel frame deferral."""George Joseph
2016-11-16Merge "res/ari/resource_bridges: Add the ability to manipulate the video source"zuul
2016-11-16res_format_attr_opus: Fix fmtp generation.Mark Michelson
res_format_attr_opus assumed that the string being passed into it was empty. It tried to determine if the only thing it had written was a=fmtp:<num> And if it had, it would reset the string. Its calculation was off when working with chan_sip, though. chan_sip passes the entire built SDP rather than an empty string. This resulted in always putting an empty fmtp line in the SDP. ASTERISK-26520 #close Reported by scgm11 Change-Id: Ib2e8712d26a47067e5f36d5973577added01dbb5
2016-11-16Merge "apps/app_echo: Only relay a single video source change frame"Joshua Colp
2016-11-16Merge "file.c/__ast_file_read_dirs: Fix issues on filesystems without d_type"George Joseph
2016-11-16codec_opus: Fix warning when Opus negotiated but codec_opus not loaded.Richard Mudgett
When Opus is negotiated but not loaded, the log is spammed with messages because the system does not know how to calculate the number of samples in a frame. * Suppress the warning by supplying a function that assumes 20ms of samples in the frame. For pass through support it doesn't really seem to matter what number of samples is returned anyway. ASTERISK-26605 #close Change-Id: Icf2273692f040dc2c45b01e72a790d11092f9e0f
2016-11-16Merge "cli: Fix ast_el_read_char to work with libedit >= 3.1"Joshua Colp
2016-11-16res_pjsip_outbound_authenticator_digest.c: Fix memory pool leak.Richard Mudgett
Responding to authentication challenges leaks PJSIP memory pools. The leak was introduced with a pjproject 2.5.5 API change. https://trac.pjsip.org/repos/ticket/1929 changed the API usage of pjsip_auth_clt_init() to require the new API pjsip_auth_clt_deinit() to clean up cached authentication allocations that get allocated with pjsip_auth_clt_reinit_req(). ASTERISK-26516 #close Change-Id: I4473141b8c3961d0dc91c382beb3876b3efb45c8
2016-11-16Merge "pjproject: Use a much higher limit for PJ_ICE_MAX_CHECKS"Joshua Colp
2016-11-15file.c/__ast_file_read_dirs: Fix issues on filesystems without d_typeGeorge Joseph
One of the code paths in __ast_file_read_dirs will only get executed if the OS doesn't support dirent->d_type OR if the filesystem the particular file is on doesn't support it. So, while standard Linux systems support the field, some filesystems like XFS do not. In this case, we need to call stat() to determine whether the directory entry is a file or directory so we append the filename to the supplied directory path and call stat. We forgot to truncate path back to just the directory afterwards though so we were passing a complete file name to the callback in the dir_name parameter instead of just the directory name. The logic has been re-written to only create a full_path if we need to call stat() or if we need to descend into another directory. Change-Id: I54e4228bd8355fad65200c6df3ec4c9c8a98dfba
2016-11-15Merge "manager: Bump AMI version number."Joshua Colp
2016-11-15Merge "res_ari: Add support for channel variables in ARI events."Joshua Colp
2016-11-15Implement internal abstraction for iostreamsTimo Teräs
fopencookie/funclose is a non-standard API and should not be used in portable software. Additionally, the way FILE's fd is used in non-blocking mode is undefined behaviour and cannot be relied on. This introduces internal abstraction for io streams, that allows implementing the desired virtualization of read/write operations with necessary timeout handling. ASTERISK-24515 #close ASTERISK-24517 #close Change-Id: Id916aef418b665ced6a7489aef74908b6e376e85
2016-11-15manager: Bump AMI version number.Joshua Colp
During the development of Asterisk 14 the behavior of the Command AMI action was altered such that the result was returned on lines with a prefix of "Output: ". While this was documented in the UPGRADE.txt file it is also reasonable that this should bump the AMI version number. ASTERISK-26556 Change-Id: Idf1bf01608e53f7bfdf43ddb4d0683e53f74ee42