VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Проблема с DTMF на аналоговом канале

Проблемы Asterisk без вэб-оболочек и их решения

Модераторы: april22, Zavr2008

Ответить
andy lee
Сообщения: 7
Зарегистрирован: 07 фев 2011, 22:10

Проблема с DTMF на аналоговом канале

Сообщение andy lee »

Привет всем)
Есть машина с установленным asterisk 1.4 и zaptel.
Есть план набора, который при наборе определенной комбинации цифр в аналоговую линию роутит звонок дальше. Суть проблемы, при наборе аналоговой линии астериска из ТФОП и пикания DTMF - все хорошо, все работает, плохо, когда астериск набирается по сотовому телефону - он отвечает и ждет набора DTMF, но практически каждый раз не успеваю набрать до конца нужную комбинацию (9 цифр), происходит HangUp линии. Вот лог этого момента:

Код: Выделить всё

    -- Starting simple switch on 'Zap/1-1'
[Feb  7 22:17:09] NOTICE[11082]: chan_zap.c:6563 ss_thread: Got event 18 (Ring Begin)...
    -- Executing [s@from-pstn:1] Answer("Zap/1-1", "") in new stack
    -- Executing [s@from-pstn:2] Set("Zap/1-1", "TIMEOUT(digit)=5") in new stack
    -- Digit timeout set to 5
    -- Executing [s@from-pstn:3] Set("Zap/1-1", "TIMEOUT(response)=10") in new stack
    -- Response timeout set to 10
    -- Executing [s@from-pstn:4] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:5] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:6] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:7] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:8] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:9] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:10] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:11] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:12] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:13] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:14] GotoIf("Zap/1-1", "0?400") in new stack
    -- Executing [s@from-pstn:15] GotoIf("Zap/1-1", "0?400") in new stack
    -- Executing [s@from-pstn:16] BackGround("Zap/1-1", "zdravstujte") in new stack
    -- <Zap/1-1> Playing 'zdravstujte' (language 'ru')
    -- Executing [s@from-pstn:17] BackGround("Zap/1-1", "speed-enternumber") in new stack
    -- <Zap/1-1> Playing 'speed-enternumber' (language 'ru')
[Feb  7 22:17:13] DTMF[11082]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  7 22:17:13] DTMF[11082]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  7 22:17:13] DTMF[11082]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  7 22:17:13] DTMF[11082]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  7 22:17:13] DTMF[11082]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  7 22:17:13] DTMF[11082]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  7 22:17:14] DTMF[11082]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  7 22:17:14] DTMF[11082]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  7 22:17:14] DTMF[11082]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  7 22:17:15] DTMF[11082]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  7 22:17:15] DTMF[11082]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  7 22:17:15] DTMF[11082]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
    -- Hungup 'Zap/1-1'
А это лог успешного звонка по ТФОП:

Код: Выделить всё

    -- Starting simple switch on 'Zap/1-1'
[Feb  7 22:25:18] NOTICE[11178]: chan_zap.c:6563 ss_thread: Got event 18 (Ring Begin)...
    -- Executing [s@from-pstn:1] Answer("Zap/1-1", "") in new stack
    -- Executing [s@from-pstn:2] Set("Zap/1-1", "TIMEOUT(digit)=5") in new stack
    -- Digit timeout set to 5
    -- Executing [s@from-pstn:3] Set("Zap/1-1", "TIMEOUT(response)=10") in new stack
    -- Response timeout set to 10
    -- Executing [s@from-pstn:4] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:5] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:6] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:7] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:8] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:9] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:10] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:11] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:12] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:13] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:14] GotoIf("Zap/1-1", "0?400") in new stack
    -- Executing [s@from-pstn:15] GotoIf("Zap/1-1", "0?400") in new stack
    -- Executing [s@from-pstn:16] BackGround("Zap/1-1", "zdravstujte") in new stack
    -- <Zap/1-1> Playing 'zdravstujte' (language 'ru')
    -- Executing [s@from-pstn:17] BackGround("Zap/1-1", "speed-enternumber") in new stack
    -- <Zap/1-1> Playing 'speed-enternumber' (language 'ru')
[Feb  7 22:25:21] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:21] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  7 22:25:21] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  7 22:25:22] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:22] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  7 22:25:22] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  7 22:25:22] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:22] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  7 22:25:22] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  7 22:25:22] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:22] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  7 22:25:22] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  7 22:25:23] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:23] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  7 22:25:23] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  7 22:25:23] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '7' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:23] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '7' on Zap/1-1
[Feb  7 22:25:23] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '7' on Zap/1-1
[Feb  7 22:25:24] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '1' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:24] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '1' on Zap/1-1
[Feb  7 22:25:24] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '1' on Zap/1-1
[Feb  7 22:25:24] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '5' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:24] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '5' on Zap/1-1
[Feb  7 22:25:24] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '5' on Zap/1-1
[Feb  7 22:25:24] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '4' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:24] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '4' on Zap/1-1
[Feb  7 22:25:24] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '4' on Zap/1-1
[Feb  7 22:25:25] DTMF[11178]: channel.c:2133 __ast_read: DTMF end '#' received on Zap/1-1, duration 0 ms
[Feb  7 22:25:25] DTMF[11178]: channel.c:2185 __ast_read: DTMF end accepted without begin '#' on Zap/1-1
[Feb  7 22:25:25] DTMF[11178]: channel.c:2196 __ast_read: DTMF end passthrough '#' on Zap/1-1
  == CDR updated on Zap/1-1
    -- Executing [900997154#@from-pstn:1] Playback("Zap/1-1", "pls-hold-while-try") in new stack
    -- <Zap/1-1> Playing 'pls-hold-while-try' (language 'ru')
    -- Executing [900997154#@from-pstn:2] Macro("Zap/1-1", "trunkdial|IAX2/spain/900997154") in new stack
    -- Executing [s@macro-trunkdial:1] Dial("Zap/1-1", "IAX2/spain/900997154") in new stack
    -- Called spain/900997154
    -- Call accepted by xx.xx.xx.xx (format g729)
    -- Format for call is g729
    -- IAX2/spain-16384 answered Zap/1-1
Вот диалплан:

Код: Выделить всё

[from-pstn]
exten => s,1,Answer
exten => s,n,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?100)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?100)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?200)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?200)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?300)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?300)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?200)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?100)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?300)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?300)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?400)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?400)
exten => s,n,Background(zdravstujte)
exten => s,n(number),Background(speed-enternumber)
exten = s,100,Playback(pls-hold-while-try)
exten = s,101,Macro(trunkdial,{TRUNK-IAX-SPAIN}/$№№)
exten = s,199,Hangup
exten = s,200,Background(pls-hold-while-try)
exten = s,201,Macro(trunkdial,${trunk_2}/№№)
exten = s,299,Hangup
exten = s,300,Background(connecting)
exten = s,301,Macro(trunkdial,${trunk_2}/№№)
exten = s,399,Hangup
exten = s,400,Background(connecting)
exten = s,401,Macro(trunkdial,${trunk_2}/№№)
exten = s,499,Hangup
exten = s,500,Hangup
exten => _*NXXXXXXXX#,1,Playback(pls-hold-while-try)
exten => _*NXXXXXXXX#,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN:1:10})
exten => _NXXXXXXXX#,1,Playback(pls-hold-while-try)
exten => _NXXXXXXXX#,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN:0:9})
exten => _NXXXXXXXX,1,Playback(pls-hold-while-try)
exten => _NXXXXXXXX,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN})
exten => _34NXXXXXXXX#,1,Playback(pls-hold-while-try)
exten => _34NXXXXXXXX#,n,Macro(trunkdial,${TRUNK-SIPNET}/${EXTEN:0:11})
exten => _34NXXXXXXXX,1,Playback(pls-hold-while-try)
exten => _34NXXXXXXXX,n,Macro(trunkdial,${TRUNK-SIPNET}/${EXTEN})
exten => i,1,Background(invalid)
exten => i,n,Goto(s,number)
exten => t,1,Playback(vremja-ozhidanija-isteklo)
exten => t,n,Playback(goodbye)
exten => t,n,Hangup
exten = 5#,1,Goto(voicemenu-custom-1|s|1)
exten = 4#,1,Goto(dtmf-test|s|1)

[voicemenu-custom-1]
exten = s,1,Background(thank-you-for-calling)
exten = s,n,Background(if-u-know-ext-dial)
exten = s,n,Wait,5
exten = s,n,Playback(vm-goodbye)
exten = s,n,Hangup
exten = s,n,NoOp
exten = _NXXXXXXXX,1,Background(pls-wait-connect-call)
exten = _NXXXXXXXX,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN})
exten = i,1,Background(you-dialed-wrong-number)
exten = i,n,Background(pls-try-again)
exten = i,n,Background(goodbye)
exten = i,n,Hangup

[dtmf-test]
exten = s,1(collect),Read(digito,,11)
exten = s,n,SayDigits(${digito})
exten = s,n,GoTo(collect)
exten = s,n,Hangup
exten = s,n,NoOp
relaxdtmf пробовал - не помогает.
andy lee
Сообщения: 7
Зарегистрирован: 07 фев 2011, 22:10

Re: Проблема с DTMF на аналоговом канале

Сообщение andy lee »

Это пробовалось, пробовалось и WaitExten.
Лог без TIMEOUT:

Код: Выделить всё

    -- Starting simple switch on 'Zap/1-1'
[Feb  8 09:13:16] NOTICE[4294]: chan_zap.c:6563 ss_thread: Got event 18 (Ring Begin)...
    -- Executing [s@from-pstn:1] Answer("Zap/1-1", "") in new stack
    -- Executing [s@from-pstn:2] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:3] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:4] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:5] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:6] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:7] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:8] GotoIf("Zap/1-1", "0?200") in new stack
    -- Executing [s@from-pstn:9] GotoIf("Zap/1-1", "0?100") in new stack
    -- Executing [s@from-pstn:10] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:11] GotoIf("Zap/1-1", "0?300") in new stack
    -- Executing [s@from-pstn:12] GotoIf("Zap/1-1", "0?400") in new stack
    -- Executing [s@from-pstn:13] GotoIf("Zap/1-1", "0?400") in new stack
    -- Executing [s@from-pstn:14] BackGround("Zap/1-1", "zdravstujte") in new stack
    -- <Zap/1-1> Playing 'zdravstujte' (language 'ru')
    -- Executing [s@from-pstn:15] BackGround("Zap/1-1", "speed-enternumber") in new stack
    -- <Zap/1-1> Playing 'speed-enternumber' (language 'ru')
[Feb  8 09:13:20] DTMF[4294]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 09:13:20] DTMF[4294]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 09:13:20] DTMF[4294]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  8 09:13:20] DTMF[4294]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 09:13:20] DTMF[4294]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 09:13:20] DTMF[4294]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 09:13:21] DTMF[4294]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 09:13:21] DTMF[4294]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 09:13:21] DTMF[4294]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 09:13:21] DTMF[4294]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 09:13:21] DTMF[4294]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 09:13:21] DTMF[4294]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
    -- Hungup 'Zap/1-1'
ded
Сообщения: 15623
Зарегистрирован: 26 авг 2010, 19:00

Re: Проблема с DTMF на аналоговом канале

Сообщение ded »

Невозможно рассматривать всю конструкцию из
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?100)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?100)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?200)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?200)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?300)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?300)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?200)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?100)
exten => s,n,GotoIf($["${CALLERID(num)}" = "№№"]?300)
как рабочую.

exten => s используется обычно в макросах, там он оправдан, у вас простой контекст, [from-pstn]
для перенаправления в различные части диалплана в зависимости от CALLERID(num) лучше используйте вместо GotoI
exten => _X./100,1,
exten => _X./200,1,
exten => _X./300,1,
andy lee
Сообщения: 7
Зарегистрирован: 07 фев 2011, 22:10

Re: Проблема с DTMF на аналоговом канале

Сообщение andy lee »

За наводку спасибо, но проблему это не решает.
Вот из диалплана убраны эти строчки:

Код: Выделить всё

[from-pstn]
exten => s,1,Answer
;exten => s,n,Set(TIMEOUT(digit)=5)
;exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,Background(zdravstujte)
exten => s,n(number),Background(speed-enternumber)
exten => _NXXXXXXXX#,1,Playback(pls-hold-while-try)
exten => _NXXXXXXXX#,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN:0:9})
exten => _NXXXXXXXX,1,Playback(pls-hold-while-try)
exten => _NXXXXXXXX,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN})
exten => _34NXXXXXXXX#,1,Playback(pls-hold-while-try)
exten => _34NXXXXXXXX#,n,Macro(trunkdial,${TRUNK-SIPNET}/${EXTEN:0:11})
exten => _34NXXXXXXXX,1,Playback(pls-hold-while-try)
exten => _34NXXXXXXXX,n,Macro(trunkdial,${TRUNK-SIPNET}/${EXTEN})
exten => i,1,Background(invalid)
exten => i,n,Goto(s,number)
exten => t,1,Playback(vremja-ozhidanija-isteklo)
exten => t,n,Playback(goodbye)
exten => t,n,Hangup
;exten = 5#,1,Goto(voicemenu-custom-1|s|1)
;exten = 4#,1,Goto(dtmf-test|s|1)
Вот лог проблемы:

Код: Выделить всё

    -- Starting simple switch on 'Zap/1-1'
[Feb  8 14:17:21] NOTICE[4675]: chan_zap.c:6563 ss_thread: Got event 18 (Ring Begin)...
    -- Executing [s@from-pstn:1] Answer("Zap/1-1", "") in new stack
    -- Executing [s@from-pstn:2] BackGround("Zap/1-1", "zdravstujte") in new stack
    -- <Zap/1-1> Playing 'zdravstujte' (language 'ru')
    -- Executing [s@from-pstn:3] BackGround("Zap/1-1", "speed-enternumber") in new stack
    -- <Zap/1-1> Playing 'speed-enternumber' (language 'ru')
[Feb  8 14:17:26] DTMF[4675]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 14:17:26] DTMF[4675]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 14:17:26] DTMF[4675]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  8 14:17:26] DTMF[4675]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 14:17:26] DTMF[4675]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 14:17:26] DTMF[4675]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 14:17:27] DTMF[4675]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 14:17:27] DTMF[4675]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 14:17:27] DTMF[4675]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 14:17:27] DTMF[4675]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 14:17:27] DTMF[4675]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 14:17:27] DTMF[4675]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
    -- Hungup 'Zap/1-1'
ded
Сообщения: 15623
Зарегистрирован: 26 авг 2010, 19:00

Re: Проблема с DTMF на аналоговом канале

Сообщение ded »

На шагах
exten => s,1,Answer
exten => s,n,Background(zdravstujte)
exten => s,n(number),Background(speed-enternumber)
у вас практически нет никакого WaitExten

Код: Выделить всё

*CLI> 
  -= Info about application 'WaitExten' =-                                                                                                                                
                                                                                                                                                                          
[Synopsis]                                                                                                                                                                
Waits for an extension to be entered                                                                                                                                      
                                                                                                                                                                          
[Description]                                                                                                                                                             
  WaitExten([seconds][,options]): This application waits for the user to enter                                                                                            
a new extension for a specified number of seconds.                                                                                                                        
  Note that the seconds can be passed with fractions of a second. For example,                                                                                            
'1.5' will ask the application to wait for 1.5 seconds.                                                                                                                   
  Options:                                                                                                                                                                
    m[(x)] - Provide music on hold to the caller while waiting for an extension.                                                                                          
               Optionally, specify the class for music on hold within parenthesis.                                                                                        
Warning: Attempting to use this application from within a Macro will not work as                                                                                          
desired. The Read() application is recommended as an alternative to WaitExten when                                                                                        
used from a macro                                                                                                                                                         
See Also: Playback(application), Background(application).     
Попробуйте внедрить.
andy lee
Сообщения: 7
Зарегистрирован: 07 фев 2011, 22:10

Re: Проблема с DTMF на аналоговом канале

Сообщение andy lee »

ddkprog писал(а):дебаг включайте расширеный и колупайте от чего там Hungup
Чем не расширенный дебаг?

Код: Выделить всё

console => notice,warning,error,debuf,verbose,dtmf
andy lee
Сообщения: 7
Зарегистрирован: 07 фев 2011, 22:10

Re: Проблема с DTMF на аналоговом канале

Сообщение andy lee »

С WaitExten пробоволось, таже самая проблема.
Лог:

Код: Выделить всё

    -- Starting simple switch on 'Zap/1-1'
[Feb  8 16:21:38] NOTICE[4844]: chan_zap.c:6563 ss_thread: Got event 18 (Ring Begin)...
    -- Executing [s@from-pstn:1] Answer("Zap/1-1", "") in new stack
    -- Executing [s@from-pstn:2] BackGround("Zap/1-1", "zdravstujte") in new stack
    -- <Zap/1-1> Playing 'zdravstujte' (language 'ru')
    -- Executing [s@from-pstn:3] BackGround("Zap/1-1", "speed-enternumber") in new stack
    -- <Zap/1-1> Playing 'speed-enternumber' (language 'ru')
[Feb  8 16:21:41] DTMF[4844]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 16:21:41] DTMF[4844]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 16:21:41] DTMF[4844]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  8 16:21:42] DTMF[4844]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 16:21:42] DTMF[4844]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 16:21:42] DTMF[4844]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 16:21:42] DTMF[4844]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 16:21:42] DTMF[4844]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 16:21:42] DTMF[4844]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 16:21:42] DTMF[4844]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 16:21:42] DTMF[4844]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 16:21:42] DTMF[4844]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  8 16:21:43] DTMF[4844]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 16:21:43] DTMF[4844]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 16:21:43] DTMF[4844]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  8 16:21:43] DTMF[4844]: channel.c:2133 __ast_read: DTMF end '7' received on Zap/1-1, duration 0 ms
[Feb  8 16:21:43] DTMF[4844]: channel.c:2185 __ast_read: DTMF end accepted without begin '7' on Zap/1-1
[Feb  8 16:21:43] DTMF[4844]: channel.c:2196 __ast_read: DTMF end passthrough '7' on Zap/1-1
[Feb  8 16:21:44] DTMF[4844]: channel.c:2133 __ast_read: DTMF end '1' received on Zap/1-1, duration 0 ms
[Feb  8 16:21:44] DTMF[4844]: channel.c:2185 __ast_read: DTMF end accepted without begin '1' on Zap/1-1
[Feb  8 16:21:44] DTMF[4844]: channel.c:2196 __ast_read: DTMF end passthrough '1' on Zap/1-1
    -- Hungup 'Zap/1-1'
Диалплан:

Код: Выделить всё

[from-pstn]
exten => s,1,Answer
;exten => s,n,Set(TIMEOUT(digit)=5)
;exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,Background(zdravstujte)
exten => s,n(number),Background(speed-enternumber)
exten => s,n,WaitExten(20)
exten => _NXXXXXXXX#,1,Playback(pls-hold-while-try)
exten => _NXXXXXXXX#,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN:0:9})
exten => _NXXXXXXXX,1,Playback(pls-hold-while-try)
exten => _NXXXXXXXX,n,Macro(trunkdial,${TRUNK-IAX-SPAIN}/${EXTEN})
exten => _34NXXXXXXXX#,1,Playback(pls-hold-while-try)
exten => _34NXXXXXXXX#,n,Macro(trunkdial,${TRUNK-SIPNET}/${EXTEN:0:11})
exten => _34NXXXXXXXX,1,Playback(pls-hold-while-try)
exten => _34NXXXXXXXX,n,Macro(trunkdial,${TRUNK-SIPNET}/${EXTEN})
exten => i,1,Background(invalid)
exten => i,n,Goto(s,number)
exten => t,1,Playback(vremja-ozhidanija-isteklo)
exten => t,n,Playback(goodbye)
exten => t,n,Hangup
;exten = 5#,1,Goto(voicemenu-custom-1|s|1)
;exten = 4#,1,Goto(dtmf-test|s|1)
andy lee
Сообщения: 7
Зарегистрирован: 07 фев 2011, 22:10

Re: Проблема с DTMF на аналоговом канале

Сообщение andy lee »

ddkprog писал(а):
Чем не расширенный дебаг?
это вообще не расширеный дебаг
это указания астериску какие дебаг уровни логировать
но сами то уровни не активированы
set debug
set verbose
левелы устанавливают
Про это не знал, но помимо этого там неверно был указан debug (написано debuf). Сейчас исправил, получил в консоль вот что:

Код: Выделить всё

    -- Starting simple switch on 'Zap/1-1'
[Feb  8 16:40:08] NOTICE[4960]: chan_zap.c:6563 ss_thread: Got event 18 (Ring Begin)...
    -- Executing [s@from-pstn:1] Answer("Zap/1-1", "") in new stack
[Feb  8 16:40:08] DEBUG[4960]: chan_zap.c:2917 zt_answer: Took Zap/1-1 off hook
[Feb  8 16:40:08] DEBUG[4960]: chan_zap.c:1519 zt_train_ec: No echo training requested
    -- Executing [s@from-pstn:2] BackGround("Zap/1-1", "zdravstujte") in new stack
    -- <Zap/1-1> Playing 'zdravstujte' (language 'ru')
    -- Executing [s@from-pstn:3] BackGround("Zap/1-1", "speed-enternumber") in new stack
    -- <Zap/1-1> Playing 'speed-enternumber' (language 'ru')
[Feb  8 16:40:10] DTMF[4960]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 16:40:10] DTMF[4960]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 16:40:10] DTMF[4960]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  8 16:40:11] DTMF[4960]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 16:40:11] DTMF[4960]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 16:40:11] DTMF[4960]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 16:40:11] DTMF[4960]: channel.c:2133 __ast_read: DTMF end '0' received on Zap/1-1, duration 0 ms
[Feb  8 16:40:11] DTMF[4960]: channel.c:2185 __ast_read: DTMF end accepted without begin '0' on Zap/1-1
[Feb  8 16:40:11] DTMF[4960]: channel.c:2196 __ast_read: DTMF end passthrough '0' on Zap/1-1
[Feb  8 16:40:12] DTMF[4960]: channel.c:2133 __ast_read: DTMF end '9' received on Zap/1-1, duration 0 ms
[Feb  8 16:40:12] DTMF[4960]: channel.c:2185 __ast_read: DTMF end accepted without begin '9' on Zap/1-1
[Feb  8 16:40:12] DTMF[4960]: channel.c:2196 __ast_read: DTMF end passthrough '9' on Zap/1-1
[Feb  8 16:40:12] DEBUG[4960]: dsp.c:1360 ast_dsp_busydetect: ast_dsp_busydetect detected busy, avgtone: 240, avgsilence 200
Вижу что он ложно понимает сигнал busy. Буду крутить настройки.
Спасибо, что обновили мысли))
andy lee
Сообщения: 7
Зарегистрирован: 07 фев 2011, 22:10

Re: Проблема с DTMF на аналоговом канале

Сообщение andy lee »

Поставил busycount=8, пока не отбивает.
Думаю в этом и крылась проблема. Спасибо всем участникам ветки)
Ответить
© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH