[asterisk-bugs] [JIRA] (ASTERISK-22765) [patch]South Africa end of call detection
Joshua Colp (JIRA)
noreply at issues.asterisk.org
Mon Dec 18 11:28:07 CST 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-22765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joshua Colp updated ASTERISK-22765:
-----------------------------------
Affects Version/s: 13.18.4
> [patch]South Africa end of call detection
> -----------------------------------------
>
> Key: ASTERISK-22765
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-22765
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Core/General, Core/Internationalization
> Affects Versions: SVN, 13.18.4
> Environment: Any
> Reporter: Michael Walton
> Severity: Minor
> Attachments: dsp.za-call-progress.r401701.patch
>
>
> South Africa (and possibly other regions) uses 400Hz cadenced tone to indicate far end hangup on analog line. Most common cadences mark/space are 500/500 and 2500/500. The existing end-of-call mechanisms in main/dsp.c do not combine tone detection with cadence validation, but use only one or the other and are notoriously unreliable in our environment. This leads to (best case) lines being held open indefinitely and (worst case) actual billable calls being held open for long periods of time.
> The attached patch adds tone + cadence based call progress, specifically for hangup detection in the ZA region. It is activated when the chan_dahdi progzone is set to za. It has been proven over more than a year in the field.
> The algorithm introduces a new state DSP_TONE_STATE_MAYBE_HUNGUP to the __ast_dsp_call_progress state machine, along with two state variables dsp->hangupcount and dsp->hangupmark. As described below, the algorithm indicates AST_CONTROL_HANGUP only if mark-space-mark-space-mark is detected, and the mark and space are valid in terms of tone and cadence.
> * When in ZA mode and Goertzel detects 400Hz, state machine enters DSP_TONE_STATE_MAYBE_HUNGUP (mark)
> * dsp->tcount is monitored in DSP_TONE_STATE_MAYBE_HUNGUP state, if mark>=400ms the hangupcount is incremented and hangupmark set to expect space next, if mark>=3000ms the detection is cancelled
> * When in ZA mode and silence is detected (DSP_TONE_STATE_SILENCE) and hangupmark indicates expecting space, if space>=400ms hangupmark set to expect mark next, if space>=600ms, detection is cancelled
> * In DSP_TONE_STATE_MAYBE_HUNGUP, if the hangupcount reaches 3, AST_CONTROL_HANGUP is returned and the channel is hung up
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list