RU_LineDetect компиляция из NVFaxDetect, и NVLineDetect для зоны RU
http://volody.com:8080/app_ru_linedetect.c
Определение busy/ring/dialtone по длительности тона без учета длительности промежутков тишины обязательно изменить в dsp.c
(dsp->tcount==THRESH_RING)) {
на
(dsp->tcount>=THRESH_RING)) {
RULineDetect([waitdur[|options[|sildur[|mindur[|maxdur][|harmonicring][|minbusy][|minring][|mindialtone]]]]]):
This application listens for certain tones (on ZAP and other channels) for zone tone RU,
for waitdur seconds of time. In addition, it can be interrupted by digits,
or non-silence. Audio is only monitored in the receive direction. If
digits interrupt, they must be the start of a valid extension unless the
option is included to ignore. If fax is detected, it will jump to the
'fax' extension. If a period of non-silence greater than 'mindur' ms,
yet less than 'maxdur' ms is followed by silence at least 'sildur' ms
then the app is aborted and processing jumps to the 'talk' extension.
If period detected between busy/ring/dialtone less than 'harmonicring' ms,
then the consider not busy/ring/dialtone as is set busy/ring/dialtone.
If a period of detected ton busy/ring/dialtone greater than 'mindialtone' ms,
then the app is aborted and processing jumps to the 'dialtone' extension.
If a period of non-busy/ring/dialtone greater than 'harmonicring' ms,
and time busy/ring/dialtone greater minbusy less minring then
the app is aborted and processing jumps to the 'busy' extension,
or time busy/ring/dialtone greater minring less mindialtone then
the app is aborted and processing jumps to the 'ring' extension,
or time busy/ring/dialtone greater mindialtone then the app is aborted
and processing jumps to the 'dialtone' extension.
If all undetected, control will continue at the next priority.
waitdur: Maximum number of seconds to wait (default=5)
options:
'n': Attempt on-hook if unanswered (default=no)
'x': DTMF digits terminate without extension (default=no)
'd': Ignore DTMF digit detection (default=no)
'f': Ignore fax detection (default=no)
't': Ignore talk detection (default=no)
'r': Ignore busy/ring/dialtone detection (default=no)
'b': Ignore busy detection (default=no)
sildur: Silence ms after mindur/maxdur before aborting (default=1000)
mindur: Minimum non-silence ms needed (default=100)
maxdur: Maximum non-silence ms allowed (default=0/forever)
harmonicring: Harmonic ms busy/ring/dialtone detect (default=50)-прерывестость детектирования dsp.c сигнала 425Гц + зашумленность линии
minbusy: Minimum ms needed (default=300)
minring: Minimum ms needed (default=700)
mindialtone: Minimum ms needed (default=1400)