[asterisk-bugs] [JIRA] (ASTERISK-22765) [patch]South Africa end of call detection

Rusty Newton (JIRA) noreply at issues.asterisk.org
Fri Oct 25 16:54:04 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-22765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton updated ASTERISK-22765:
------------------------------------

    Status: Open  (was: Triage)
    
> [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
>         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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list