Comments (4)
The line numbers you provided don't seem to quite line up, but are you referring to this one? https://github.com/asterisk/asterisk/blob/master/apps/app_amd.c#L372
The DSP itself is responsible for accumulation so we shouldn't be incrementing in the application, the value is set by the core DSP function. Is there another issue you're seeing here?
from asterisk.
Yes that is the one I was reffetring.
We pass the DSP a pointer to dspsilence here. Since dspsilence is set to zero each time, this means the DSP will only accumulate the current frame's calculated silence duration to dspsilence (which is 0), as shown here. Consequently, in each iteration, dspsilence is actually reset to zero, except if the type is not AST_FRAME_VOICE, which is not the case for this issue.
The main question is how will this line ever be true, if the default value for initialSilence was 2.5 seconds and the the silence duration variable only contains the length for the current frame, as in here
from asterisk.
Yes that is the one I was reffetring. We pass the DSP a pointer to dspsilence here. Since dspsilence is set to zero each time, this means the DSP will only accumulate the current frame's calculated silence duration to dspsilence (which is 0), as shown [here]
I'm not following... dsp->totalsilence does accumulate internally and this just sets it to whatever that currently is.
Technically the initialization is unnecessary, since that should always be assigned as it's non-NULL. But I don't think the initialization does any harm.
(https://github.com/asterisk/asterisk/blob/master/main/dsp.c#L1248). Consequently, in each iteration, dspsilence is actually reset to zero, except if the type is not AST_FRAME_VOICE, which is not the case for this issue.
The main question is how will this line ever be true, if the default value for initialSilence was 2.5 seconds and the the silence duration variable only contains the length for the current frame, as in here
I guess I disagree that it's for the current frame... I might have missed something but that's what a quick scan of the code in dsp.c suggests. The link you linked shows an increment, nore a replace. The dsp is stateful and keeps track of things between frames. Also, the logic does work for existing use cases.
from asterisk.
I guess I disagree that it's for the current frame... I might have missed something but that's what a quick scan of the code in dsp.c suggests. The link you linked shows an increment, nore a replace. The dsp is stateful and keeps track of things between frames. Also, the logic does work for existing use cases.
Thanks for the explanation this looks quite confincing to me, I oversaw this line which means its working normally, and I am sorry for the time that this cost you. Good luck.
from asterisk.
Related Issues (20)
- [new-feature]: app_queue: Allow queue strategy to be manipulated externally
- [bug]: Asterisk segfault HOT 2
- [bug] Document the `Events` argument of the `Login` AMI action HOT 3
- [bug]: Unable to Cancel Schedule ID ... probably a bug dtls_srtp_stop_timeout_timer, line 2914 HOT 3
- [new-feature]: new module: format_aac HOT 10
- [bug]: commit ddb5c37 makes database id columns nullable HOT 1
- [bug]: Unexpected control subclass '14' HOT 3
- [bug]: ODBC_STORAGE not found in Asterisk 20.7 HOT 9
- [improvement]: Add support for multi-rate DTMF
- [bug]: Expires value on 200 OK one second less then expires value on REGISTER request; causes ever-diminishing cycle HOT 1
- [bug]: invalid queue strategy from realtime not properly handled
- [bug]: RTP inactivity monitor hang up calls after 500ms.
- [bug]: SNI isn't being set on websocket client connections
- [bug]: Memory leak in res_stir_shaken tn_config, plus a few other issues
- [bug]: chan_pjsip uses wrong IP in SIP messages if at least two ip addresses are configured HOT 4
- [bug]: segfault on start if compiled with DETECT_DEADLOCKS HOT 6
- [improvement]: logger: Add unique verbose prefixes for higher verbose levels
- [bug]: libxml2-2.12 deprecates API calls asterisk uses
- [bug]: FATAL: unhandled exception PJLIB/No memory! HOT 11
- [bug]: Build failure with uclibc-ng
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asterisk.