aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2010-07-14Remove the old stub files, preferring the optional_api method.tilghman4-85/+90
(closes issue #17475) Reported by: tilghman Review: https://reviewboard.asterisk.org/r/695/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276490 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14Expand the caller ANI field to an ast_party_idrmudgett1-6/+10
Expand the ani field in ast_party_caller and ast_party_connected_line to an ast_party_id. This is an extension to the ast_callerid restructuring patch in review: https://reviewboard.asterisk.org/r/702/ Review: https://reviewboard.asterisk.org/r/744/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276393 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14ast_callerid restructuringrmudgett2-125/+563
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09Kill some startup warnings and errors and make some messages more helpful in ↵tilghman2-9/+14
tracking down the source. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275105 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09Merged revisions 275021 via svnmerge from russell1-1/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r275021 | russell | 2010-07-09 10:33:08 -0500 (Fri, 09 Jul 2010) | 4 lines Document that a leading and trailing slash is expected for test categories. Also, emit a warning if a test is registered without one of these. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275022 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09Extend length limit on country name in indications.conf.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274907 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-08Add IPv6 to Asterisk.mmichelson6-36/+578
This adds a generic API for accommodating IPv6 and IPv4 addresses within Asterisk. While many files have been updated to make use of the API, chan_sip and the RTP code are the files which actually support IPv6 addresses at the time of this commit. The way has been paved for easier upgrading for other files in the near future, though. Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne for their hard work on this. (closes issue #17565) Reported by: russell Patches: asteriskv6-test-report.pdf uploaded by russell (license 2) Review: https://reviewboard.asterisk.org/r/743 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274783 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-08Implement AstData API data providers as part of the GSOC 2010 project,eliel4-109/+159
midterm evaluation. Review: https://reviewboard.asterisk.org/r/757/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274727 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-03Merged revisions 273793 via svnmerge from tilghman1-12/+43
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r273793 | tilghman | 2010-07-02 16:36:39 -0500 (Fri, 02 Jul 2010) | 9 lines Have the DEADLOCK_AVOIDANCE macro warn when an unlock fails, to help catch potentially large software bugs. (closes issue #17407) Reported by: pdf Patches: 20100527__issue17407.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/751/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273830 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-30Remove unnecessary if test in CV_DSTR()rmudgett1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273198 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-30Misc doxygen cleanup in config.hrmudgett1-41/+156
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273197 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-29Exclude libical for insufficient versions.tilghman1-21/+30
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@273055 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-25Implemement support for handling multiple documents when sending.mnicholson1-4/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@272558 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-23Update configure when changing autconf m4 files...twilson1-30/+21
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@272256 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-22Merged revisions 271689 via svnmerge from mnicholson1-0/+17
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r271689 | mnicholson | 2010-06-22 07:52:27 -0500 (Tue, 22 Jun 2010) | 8 lines Modify chan_sip's packet generation api to automatically calculate the Content-Length. This is done by storing packet content in a buffer until it is actually time to send the packet, at which time the size of the packet is calculated. This change was made to ensure that the Content-Length is always correct. (closes issue #17326) Reported by: kenner Tested by: mnicholson, kenner Review: https://reviewboard.asterisk.org/r/693/ ........ This change also adds an ast_str_copy_string() function (similar to ast_copy_string), that copies one ast_str into another, properly handling embedded nulls. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@271690 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-18Merged revisions 271399 via svnmerge from jpeeler1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r271399 | jpeeler | 2010-06-18 14:28:24 -0500 (Fri, 18 Jun 2010) | 11 lines Fix crash when parsing some heavily nested statements in AEL on reload. Due to the recursion used when compiling AEL in gen_prios, all the stack space was being consumed when parsing some AEL that contained nesting 13 levels deep. Changing a few large buffers to be heap allocated fixed the crash, although I did not test how many more levels can now be safely used. (closes issue #16053) Reported by: diLLec Tested by: jpeeler ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@271483 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-17adds speex 16khz audio supportdvossel1-1/+4
(closes issue #17501) Reported by: fabled Patches: asterisk-trunk-speex-wideband-v2.patch uploaded by fabled (license 448) Tested by: malcolmd, fabled, dvossel git-svn-id: http://svn.digium.com/svn/asterisk/trunk@271231 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-16addition of G.719 pass-through supportdvossel1-0/+4
(closes issue #16293) Reported by: malcolmd Patches: g719.passthrough.patch.7 uploaded by malcolmd (license 924) format_g719.c uploaded by malcolmd (license 924) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270940 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-15Add distributed devicestate via the XMPP protocol.tilghman1-5/+13
(closes issue #15757) Reported by: Marquis Patches: distributed_devstate-XMPP.txt uploaded by lmadsen (license 10) Tested by: Marquis, lmadsen, marcelloceschia Review: https://reviewboard.asterisk.org/r/351/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270519 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-13Reverting patch and reopening issue #16155, as patch breakspabelanger1-21/+30
FreeBSD / OSX builds. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270151 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-11Use pkg-config to find gmime librariespabelanger1-30/+21
This way the libraries can be found even if they are in non-standard locations. (closes issue #16155) Reported by: jcollie Patches: 0008-change-configure.ac-to-look-for-pkg-config-gmime-2.0.patch uploaded by jcollie (license 412) Tested by: jsmith, tilghman, pabelanger git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270042 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-09Resolve an invalid memory read on an event.russell1-2/+3
Valgrind pointed out that attempting to get an IE value from an event that has no IEs produces an invalid memory read past the end of the event. Thanks to mmichelson for pointing the problem out to me and then testing the fix. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@269417 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-08Fix build on Mac OS X (and maybe FreeBSD, too)tilghman2-22/+39
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@269119 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-08Fix some doxygen warnings.lmadsen22-60/+93
(closes issue #17336) Reported by: snuffy Patches: doxygen-fixes1.diff uploaded by snuffy (license 35) Tested by: russell git-svn-id: http://svn.digium.com/svn/asterisk/trunk@268969 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-08Add SRTP support for Asterisktwilson5-30/+101
After 5 years in mantis and over a year on reviewboard, SRTP support is finally being comitted. This includes generic CHANNEL dialplan functions that work for getting the status of whether a call has secure media or signaling as defined by the underlying channel technology and for setting whether or not a new channel being bridged to a calling channel should have secure signaling or media. See doc/tex/secure-calls.tex for examples. Original patch by mikma, updated for trunk and revised by me. (closes issue #5413) Reported by: mikma Tested by: twilson, notthematrix, hemanshurpatel Review: https://reviewboard.asterisk.org/r/191/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@268894 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-07Seems strange (and the code backs up) that if the max and min of a statistic ↵tilghman1-3/+3
is expressed as a double, the last value would not also need to be a double. (closes issue #15807) Reported by: klaus3000 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@268773 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-04As signed linear audio data is accessed as 16-bit values, certain processors ↵tilghman1-41/+41
require the values to be aligned in memory. (closes issue #16912) Reported by: michaelevdokimov Patches: asterisk.patch uploaded by michaelevdokimov (license 997) Tested by: michaelevdokimov git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267877 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-04As signed linear audio data is accessed as 16-bit values, certain processors ↵tilghman1-2/+2
require the values to be aligned in memory. (closes issue #16912) Reported by: michaelevdokimov git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267862 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-04Merged revisions 267759 via svnmerge from tilghman1-17/+29
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r267759 | tilghman | 2010-06-03 20:16:26 -0500 (Thu, 03 Jun 2010) | 7 lines Make the default install path appear to be /usr on Linux, instead of /usr/local. Also, reorganize the options, so that they're more alphabetical. (closes issue #17013) Reported by: klaus3000 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267775 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-03Remove unnecessary code relating to PLC.mmichelson1-2/+0
The logic for handling generic PLC is now handled in ast_write in channel.c instead of in translation code. Review: https://reviewboard.asterisk.org/r/683/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267492 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-03Add ETSI Message Waiting Indication (MWI) support.rmudgett1-0/+3
Add the ability to report waiting messages to ISDN endpoints (phones). Relevant specification: EN 300 650 and EN 300 745 Review: https://reviewboard.asterisk.org/r/599/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267399 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Add ETSI Malicious Call ID support.rmudgett2-0/+23
Add the ability to report malicious callers as an AMI event in the call event class. Relevant specification: EN 300 180 Review: https://reviewboard.asterisk.org/r/576/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267350 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Add ETSI Call Waiting support.rmudgett1-0/+4
Add the ability to announce a call to an endpoint when there are no B channels available. A call waiting call is a SETUP message with no B channel selected. Relevant specification: EN 300 056, EN 300 057, EN 300 058 For DAHDI/ISDN channels, the CHANNEL() dialplan function now supports the "no_media_path" option. * Returns "0" if there is a B channel associated with the call. * Returns "1" if no B channel is associated with the call. The call is either on hold or is a call waiting call. If you are going to allow incoming call waiting calls then you need to use CHANNEL(no_media_path) do determine if you must drop a call to accept the new call. Review: https://reviewboard.asterisk.org/r/568/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267261 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Generic Advice of Charge.rmudgett2-0/+585
Asterisk Generic AOC Representation - Generic AOC encode/decode routines. (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame) - AST_CONTROL_AOC frame type to represent generic encoded AOC data - Manager events for AOC-S, AOC-D, and AOC-E messages Asterisk App Support - app_dial AOC-S pass-through support on call setup - app_queue AOC-S pass-through support on call setup AOC Unit Tests - AOC Unit Tests for encode/decode routines - AOC Unit Test for manager event representation. SIP AOC Support - Pass-through of generic AOC-D and AOC-E messages to snom phones via the snom AOC specification. - Creation of chan_sip page3 flags for the addition of the new 'snom_aoc_enabled' sip.conf option. IAX AOC Support - Natively supports AOC pass-through through the use of the new AST_CONTROL_AOC frame type DAHDI AOC Support - ETSI PRI full AOC Pass-through support - 'aoc_enable' chan_dahdi.conf option for independently enabling pass-through of AOC-S, AOC-D, AOC-E. - 'aoce_delayhangup' option for retrieving AOC-E on disconnect. - DAHDI A() dial string option for requesting AOC services. example usage: ;requests AOC-S, AOC-D, and AOC-E on call setup exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e)) Review: https://reviewboard.asterisk.org/r/552/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267096 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Fix infinite loop when loading codec speexjpeeler1-60/+36
This changes the sample slinear frame data to contain non-zero data so that translation calculations for speex works when preprocessing and VAD is turned on. The encoder expects samples to be returned, but when attempted with the mentioned two options and silent sample frames everything was discarded. (closes issue #17240) Reported by: seandarcy Review: https://reviewboard.asterisk.org/r/682/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267065 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Add ETSI Advice Of Charge (AOC) event reporting.rmudgett2-0/+5
This feature generates AMI events in the new aoc event class from the events passed up by libpri. Review: https://reviewboard.asterisk.org/r/537/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267008 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Add ETSI Explicit Call Transfer (ECT) support.rmudgett1-29/+21
Added ability to send and receive ETSI Explicit Call Transfer (ECT) messages to eliminate tromboned calls. Note: Asterisk already supported initiating the transfer of calls to eliminate tromboned calls to libpri so there was nothing to do for the asterisk portion. Review: https://reviewboard.asterisk.org/r/520/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266926 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-01Support setting locale per-mailbox (changes date/time languages for email, ↵tilghman2-23/+48
pager messages). (closes issue #14333) Reported by: klaus3000 Patches: 20090515__issue14333.diff.txt uploaded by tilghman (license 14) app_voicemail.c-svn-trunk-rev211675-patch.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266828 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-26Ensure that libneon > 0.29.0 is installed for res_calendar_ewstwilson1-30/+24
This uses a modified version of pabelanger's patch that checks for NTLM support instead, which was added in 0.29.0 which is what is required for res_calendar_ews. (closes issue #17391) Reported by: loloski Patches: issue17391.patch.v2 uploaded by pabelanger (license 224) Tested by: twilson git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265793 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-26Use configure to determine the prefixes and include directories properly.tilghman1-3/+0
This ensures cross-platform compatibility, even among Linux distributions, which don't always put headers in the same place. (closes issue #17391) Reported by: loloski git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265747 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-21Merged revisions 265089 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r265089 | mmichelson | 2010-05-21 15:59:14 -0500 (Fri, 21 May 2010) | 8 lines Don't hang up on a queue caller if the file we attempt to play does not exist. This also fixes a documentation mistake in file.h that made my original attempt to correct this problem not work correctly. (closes issue #17061) Reported by: RoadKill ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265090 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-21Merged revisions 264999 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r264999 | mmichelson | 2010-05-21 11:53:53 -0500 (Fri, 21 May 2010) | 3 lines Fix grammatical error in comment. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265000 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-21Merged revisions 264996 via svnmerge from mmichelson1-0/+16
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r264996 | mmichelson | 2010-05-21 11:28:34 -0500 (Fri, 21 May 2010) | 32 lines Allow ast_safe_sleep to defer specific frames until after the sleep has concluded. From reviewboard Background: A Digium customer discovered a somewhat odd bug. The setup is that parties A and B are bridged, and party A places party B on hold. While party B is listening to hold music, he mashes a bunch of DTMF. Party A takes party B off hold while this is happening, but party B continues to hear hold music. I could reproduce this about 1 in 5 times. The issue: When DTMF features are enabled and a user presses keys, the channel that the DTMF is streamed to is placed in an ast_safe_sleep for 100 ms, the duration of the emulated tone. If an AST_CONTROL_UNHOLD frame is read from the channel during the sleep, the frame is dropped. Thus the unhold indication is never made to the channel that was originally placed on hold. The fix: Originally, I discussed with Kevin possible ways of fixing the specific problem reported. However, we determined that the same type of problem could happen in other situations where ast_safe_sleep() is used. Using autoservice as a model, I modified ast_safe_sleep_conditional() to defer specific frame types so they can be re-queued once the sleep has finished. I made a common function for determining if a frame should be deferred so that there are not two identical switch blocks to maintain. Review: https://reviewboard.asterisk.org/r/674/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@264997 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-21Log spandsp's fax debug output to the FAX logger level.mmichelson1-0/+11
Review: https://reviewboard.asterisk.org/r/658 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@264953 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-19Fix transcode_via_sln option with SIP calls and improve PLC usage.mmichelson2-0/+10
From reviewboard: The problem here is a bit complex, so try to bear with me... It was noticed by a Digium customer that generic PLC (as configured in codecs.conf) did not appear to actually be having any sort of benefit when packet loss was introduced on an RTP stream. I reproduced this issue myself by streaming a file across an RTP stream and dropping approx. 5% of the RTP packets. I saw no real difference between when PLC was enabled or disabled when using wireshark to analyze the RTP streams. After analyzing what was going on, it became clear that one of the problems faced was that when running my tests, the translation paths were being set up in such a way that PLC could not possibly work as expected. To illustrate, if packets are lost on channel A's read stream, then we expect that PLC will be applied to channel B's write stream. The problem is that generic PLC can only be done when there is a translation path that moves from some codec to SLINEAR. When I would run my tests, I found that every single time, read and write translation paths would be set up on channel A instead of channel B. There appeared to be no real way to predict which channel the translation paths would be set up on. This is where Kevin swooped in to let me know about the transcode_via_sln option in asterisk.conf. It is supposed to work by placing a read translation path on both channels from the channel's rawreadformat to SLINEAR. It also will place a write translation path on both channels from SLINEAR to the channel's rawwriteformat. Using this option allows one to predictably set up translation paths on all channels. There are two problems with this, though. First and foremost, the transcode_via_sln option did not appear to be working properly when I was placing a SIP call between two endpoints which did not share any common formats. Second, even if this option were to work, for PLC to be applied, there had to be a write translation path that would go from some format to SLINEAR. It would not work properly if the starting format of translation was SLINEAR. The one-line change presented in this review request in chan_sip.c fixed the first issue for me. The problem was that in sip_request_call, the jointcapability of the outbound channel was being set to the format passed to sip_request_call. This is nativeformats of the inbound channel. Because of this, when ast_channel_make_compatible was called by app_dial, both channels already had compatibly read and write formats. Thus, no translation path was set up at the time. My change is to set the jointcapability of the sip_pvt created during sip_request_call to the intersection of the inbound channel's nativeformats and the configured peer capability that we determined during the earlier call to create_addr. Doing this got the translation paths set up as expected when using transcode_via_sln. The changes presented in channel.c fixed the second issue for me. First and foremost, when Asterisk is started, we'll read codecs.conf to see the value of the genericplc option. If this option is set, and ast_write is called for a frame with no data, then we will attempt to fill in the missing samples for the frame. The implementation uses a channel datastore for maintaining the PLC state and for creating a buffer to store PLC samples in. Even when we receive a frame with data, we'll call plc_rx so that the PLC state will have knowledge of the previous voice frame, which it can use as a basis for when it comes time to actually do a PLC fill-in. So, reviewers, now I ask for your help. First off, there's the one line change in chan_sip that I have put in. Is it right? By my logic it seems correct, but I'm sure someone can tell me why it is not going to work. This is probably the change I'm least concerned about, though. What concerns me much more is the set of changes in channel.c. First off, am I even doing it right? When I run tests, I can clearly see that when PLC is activated, I see a significant increase in RTP traffic where I would expect it to be. However, in my humble opinion, the audio sounds kind of crappy whenever the PLC fill-in is done. It sounds worse to me than when no PLC is used at all. I need someone to review the logic I have used to be sure that I'm not misusing anything. As far as I can see my pointer arithmetic is correct, and my use of AST_FRIENDLY_OFFSET should be correct as well, but I'm sure someone can point out somewhere where I've done something incorrectly. As I was writing this review request up, I decided to give the code a test run under valgrind, and I find that for some reason, calls to plc_rx are causing some invalid reads. Apparently I'm reading past the end of a buffer somehow. I'll have to dig around a bit to see why that is the case. If it's obvious to someone reviewing, speak up! Finally, I have one other proposal that is not reflected in my code review. Since without transcode_via_sln set, one cannot predict or control where a translation path will be up, it seems to me that the current practice of using PLC only when transcoding to SLINEAR is not useful. I recommend that once it has been determined that the method used in this code review is correct and works as expected, then the code in translate.c that invokes PLC should be removed. Review: https://reviewboard.asterisk.org/r/622/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@264452 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-19Merged revisions 264248 via svnmerge from tilghman2-0/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r264248 | tilghman | 2010-05-19 12:41:29 -0500 (Wed, 19 May 2010) | 17 lines Internal timing is now on by default, if you're using DAHDI 2.3 or above. The reason for ensuring DAHDI 2.3 or above is that this version ensures that a timer is always available, whereas in previous versions, it was possible for DAHDI to be loaded, but have no drivers to actually generate timing. If internal_timing was turned on in this circumstance, a complete lack of audio would result. This is the reason why internal_timing was not on by default. However, now that DAHDI ensures the availability of a timer, there is no reason for this setting to be off (and in fact, it solves a great many initial user problems). (closes issue #15932) Reported by: dimas Patches: 20100519__issue15932.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@264249 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17Cache sound tarfiles in a common directory, such that a clean reinstall does ↵tilghman1-3/+0
not force a re-download of the tarballs. (closes issue #15370) Reported by: pprindeville Patches: asterisk-trunk-bugid15370.patch uploaded by pprindeville (license 347) Tested by: pprindeville, tilghman, seanbright git-svn-id: http://svn.digium.com/svn/asterisk/trunk@263724 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-17Enhancements to connected line and redirecting work.mmichelson2-0/+62
From reviewboard: Digium has a commercial customer who has made extensive use of the connected party and redirecting information present in later versions of Asterisk Business Edition and which is to be in the upcoming 1.8 release. Through their use of the feature, new problems and solutions have come about. This patch adds several enhancements to maximize usage of the connected party and redirecting information functionality. First, Asterisk trunk already had connected line interception macros. These macros allow you to manipulate connected line information before it was sent out to its target. This patch adds the same feature except for redirecting information instead. Second, the ast_callerid and ast_party_id structures have been enhanced to provide a "tag." This tag can be set with func_callerid, func_connectedline, func_redirecting, and in the case of DAHDI, mISDN, and SIP channels, can be set in a configuration file. The idea behind the callerid tag is that it can be set to whatever value the administrator likes. Later, when running connected line and redirecting macros, the admin can read the tag off the appropriate structure to determine what action to take. You can think of this sort of like a channel variable, except that instead of having the variable associated with a channel, the variable is associated with a specific identity within Asterisk. Third, app_dial has two new options, s and u. The s option lets a dialplan writer force a specific caller ID tag to be placed on the outgoing channel. The u option allows the dialplan writer to force a specific calling presentation value on the outgoing channel. Fourth, there is a new control frame subclass called AST_CONTROL_READ_ACTION added. This was added to correct a very specific situation. In the case of SIP semi-attended (blond) transfers, the party being transferred would not have the opportunity to run a connected line interception macro to possibly alter the transfer target's connected line information. The issue here was that during a blond transfer, the SIP transfer code has no bridged channel on which to queue the connected line update. The way this was corrected was to add this new control frame subclass. Now, we queue an AST_CONTROL_READ_ACTION frame on the channel on which the connected line interception macro should be run. When ast_read is called to read the frame, ast_read responds by calling a callback function associated with the specific read action the control frame describes. In this case, the action taken is to run the connected line interception macro on the transferee's channel. Review: https://reviewboard.asterisk.org/r/652/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@263541 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-13Add kqueue(2) implementation to Asterisk in various places.tilghman1-17/+44
This will save a considerable amount of CPU on the BSDs, including Mac OS X, as it eliminates several places in the code that we previously used a busy loop. Additionally, this adds a res_timing interface, using kqueue timers. Review: https://reviewboard.asterisk.org/r/543/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262852 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-12Convert to AST_CLI_YESNO and AST_CLI_ONOFFpabelanger1-0/+7
Clean up chan_sip.c to use new AST_CLI functions (closes issue #17287) Reported by: pabelanger Patches: issue17287.patch uploaded by pabelanger (license 224) Tested by: russell git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262613 f38db490-d61c-443f-a65b-d21fe96a405b