aboutsummaryrefslogtreecommitdiffstats
path: root/main/dsp.c
AgeCommit message (Collapse)AuthorFilesLines
2009-12-20restarts busydetector (if enabled) when DTMF is received after call is bridged.alecdavis1-7/+11
(closes issue #16389) Reported by: alecdavis Tested by: alecdavis Patch dtmf_busydetector.diff2.txt uploaded by alecdavis (license 585) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@235775 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-15Whitespace.alecdavis1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@234939 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-15restarts busydetector (if enabled) when DTMF is received.alecdavis1-0/+6
(closes issue #16389) Reported by: alecdavis Tested by: alecdavis Patch dtmf_busydetector.diff.txt uploaded by alecdavis (license 585) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@234898 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-04Merged revisions 233046 via svnmerge from mnick1-1/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r233046 | mnick | 2009-12-04 09:38:33 -0600 (Fri, 04 Dec 2009) | 17 lines Merged revisions 233014 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r233014 | mnick | 2009-12-04 09:17:03 -0600 (Fri, 04 Dec 2009) | 11 lines Warning message gets displayed only once Added additional field 'int display_inband_dtmf_warning', which when set to '1' displays the warning ('Inband DTMF is not supported on codec %s. Use RFC2833'), and when set to '0' doesn't display the warning. Otherwise you would get hundreds of warnings every second. (closes issue #15769) Reported by: falves11 Patches: patch_15769_14.txt uploaded by mnick (license 874) Tested by: mnick, falves11 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@233049 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211580 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25Add an option, waitfordialtone, for UK analog lines which do not end a calltilghman1-71/+120
until the originating line hangs up. (closes issue #12382) Reported by: one47 Patches: zap-waitfordialtone-trunk.080901.patch uploaded by one47 (license 23) zap-waitfordialtone-bra-1.4.21.2.patch uploaded by fleed (license 463) Tested by: fleed git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159317 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-24Add a bit of documentation (thanks, I-MOD) on what the silence thresholdtilghman1-0/+7
constant actually does and what values are valid for it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158857 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingtilghman1-0/+3
when a file is invalid from when a file is missing. This is most important when we have two configuration files. Consider the following example: Old system: sip.conf users.conf Old result New result ======== ========== ========== ========== Missing Missing SIP doesn't load SIP doesn't load Missing OK SIP doesn't load SIP doesn't load Missing Invalid SIP doesn't load SIP doesn't load OK Missing SIP loads SIP loads OK OK SIP loads SIP loads OK Invalid SIP loads incompletely SIP doesn't load Invalid Missing SIP doesn't load SIP doesn't load Invalid OK SIP doesn't load SIP doesn't load Invalid Invalid SIP doesn't load SIP doesn't load So in the case when users.conf doesn't load because there's a typo that disrupts the syntax, we may only partially load users, instead of failing with an error, which may cause some calls not to get processed. Worse yet, the old system would do this with no indication that anything was even wrong. (closes issue #10690) Reported by: dtyoo Patches: 20080716__bug10690.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11Janitor patch to change uses of sizeof to ARRAY_LENbbryant1-2/+2
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130129 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-09arbitrary formatting change to test mantis changerussell1-1/+0
(closes issue #12824) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121286 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causemvanbaak1-5/+5
- make data member of the ast_frame struct a named union instead of a void Recently the ast_queue_hangup function got a new parameter, the hangupcause Feedback came in that this is no good and that instead a new function should be created. This I did. The hangupcause was stored in the seqno member of the ast_frame struct. This is not very elegant, and since there's already a data member that one should be used. Problem is, this member was a void *. Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone wants to store another type in there in the future. This commit is so massive, because all ast_frame.data uses have to be altered to ast_frame.data.data Thanks russellb and kpfleming for the feedback. (closes issue #12674) Reported by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-17Merged revisions 114207 via svnmerge from mmichelson1-0/+27
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114207 | mmichelson | 2008-04-17 11:28:03 -0500 (Thu, 17 Apr 2008) | 12 lines It was possible for a reference to a frame which was part of a freed DSP to still be referenced, leading to memory corruption and eventual crashes. This code change ensures that the dsp is freed when we are finished with the frame. This change is very similar to a change Russell made with translators back a month or so ago. (closes issue #11999) Reported by: destiny6628 Patches: 11999.patch uploaded by putnopvut (license 60) Tested by: destiny6628, victoryure ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114208 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Only try to detect silence when we actually need to, instead of...always.qwell1-1/+5
If this is wrong, I'd love to hear why. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111028 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Large cleanup of DSP codeqwell1-226/+274
Per comments from dimas: 1. The code now generates DTMF_BEGIN frames in addition to DTMF_END ones. 2. "quelching" rewritten - now each detector (MF/DTMF/generic tone) may mark fragment of a frame for suppression (squelching, muting) with a call to mute_fragment. Actual muting happens only once at the very end of ast_dsp_process where all marked fragments are zeroed. This way every detector sees original data in the frame without any piece of a frame being zeroed by a detector which was run before. 3. DTMF detector tries to "mute" one block before and one block after the block where actual tone was detected. Muting of previois block is something new for this patch. Obviously this operation is not always possible - if current frame does not contain data for previous block - it is too late. But at least we make our best. Muting of next block was already done by the old code but it only affects part of the next block which is in the frame being processed. New code keeps this information in state structures so it will mute proper number of samples in the next frame(s) too. 4. Removed ast_dsp_digitdetect and ast_dsp_getdigits APIs because these are not used. 5. DSP API extended a bit - ast_dsp_was_muted() function added which returns true if DSP code was muting any fragment in the last frame. chan_zap uses this function to decide it needs to turn on confmute on the channel. This is to replace AST_FRAME_DTMF 'm'/'u' (mute/unmute) functionality. (closes issue #11968) Reported by: dimas Patches: v2-11968-dsp.patch uploaded by dimas (license 88) v4-11968-zap.patch uploaded by dimas (license 88) Tested by: dimas, qwell git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111022 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Add the "config reload <conffile>" command, which allows you to tell Asterisktilghman1-1/+1
to reload any file that references a given configuration file. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111012 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19Rename DSP_FEATURE_DTMF_DETECT, because we are *NOT* only detecting DTMF digits.qwell1-3/+3
This was very misleading. Early cleanup for issue #11968 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110161 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19Rename very poorly named function to reflect what it actually does. This ↵qwell1-1/+1
was causing quite a bit of confusion for me... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110132 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05Fix code up to what it was meant to be.file1-2/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106110 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05Create a centralized configuration option for silencethresholdtilghman1-3/+68
(closes issue #11236) Reported by: philipps Patches: 20080218__bug11236.diff.txt uploaded by Corydon76 (license 14) Tested by: philipps git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106072 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04Whitespace changes onlytilghman1-7/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105840 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-20Largely refactor DSP tone detection routines.qwell1-215/+384
Separate fax detection from digit detected. Added CED (called) tone detection for fax (previously, only CNG (calling) was supported). Separate DTMF/MF code paths where appropriate. Allow detection of arbitary tones. (closes issue #11796) Reported by: dimas Patches: v6-dsp-faxtones.patch uploaded by dimas (license 88) Tested by: dimas, IgorG, Cache git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103903 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17Add several busy detection related defines to menuselect.qwell1-60/+13
Allow better busy detect debugging (with BUSYDETECT_DEBUG). Remove very old BUSYDETECT and BUSY_DETECT_MARTIN defines. (closes issue #11107) Patches: busydetect_enhancement.patch uploaded by agx (license 298) busydetect-r94975.diff uploaded by sergee (license 138) Additional changes/cleanup by me. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98998 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Merged revisions 91890 via svnmerge from qwell1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #11273) ........ r91890 | qwell | 2007-12-07 17:29:01 -0600 (Fri, 07 Dec 2007) | 4 lines We need to make sure we free the input frame if we return a different frame in ast_dsp_process. Issue 11273, pointed out by dimas, with a patch by eliel. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91891 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove a bunch of useless #include "options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21Remove obsolete OLD_DSP_ROUTINES code. Also, remove the FAX_DETECT define andrussell1-379/+14
only do the calculations if fax detection is enabled on the dsp. (closes issue #11331) Reported by: dimas Patches: dsp.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89490 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another few errno.h removalsrizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89433 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-5/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20trivial formatting changerussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83298 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-24Merged revisions 80820 via svnmerge from russell1-19/+33
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80820 | russell | 2007-08-24 15:24:05 -0500 (Fri, 24 Aug 2007) | 7 lines Improve the debouncing logic in the DTMF detector to fix some reliability issues. Previously, this code used a shift register of hits and non-hits. However, if the start of the digit isn't clean, it is possible for the leading edge detector to miss the digit. These changes replace the flawed shift register logic and also does the debouncing on the trailing edge as well. (closes issue #10535, many thanks to softins for the patch) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80821 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.russell1-6/+3
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-1/+1
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Yet another minor change to test mantis/svnrussell1-1/+1
(issue #9828) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67805 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06minor formatting change ... testing mantis/svnrussell1-1/+1
(issue #9828) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67803 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06minor formatting change ... testing mantis/svnrussell1-1/+1
(issue #9828) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67799 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-29Changed the dtmf detection to integer based goertzel algorithm.dbailey1-57/+42
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66471 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-08Merged revisions 58389 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r58389 | file | 2007-03-08 11:07:10 -0500 (Thu, 08 Mar 2007) | 10 lines Merged revisions 58388 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r58388 | file | 2007-03-08 11:04:58 -0500 (Thu, 08 Mar 2007) | 2 lines Only print out debug message if the definition that makes the variables shows up was actually defined. (issue #9233 reported by serginuez) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58390 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23Cosmetic changes. Make main source files better conform to coding guidelines ↵file1-5/+5
and standards. (issue #8679 reported by johann8384) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51486 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-03bug #8076 check option_debug before printing to debug channel.mogorman1-4/+9
patch provided in bugnote, with minor changes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla ↵file1-30/+33
Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41507 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-0/+1761
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b