【问题标题】:Asterisk ignores DTMF during all calls - cannot use keypress featuresAsterisk 在所有通话中都忽略 DTMF - 不能使用按键功能
【发布时间】:2014-05-20 06:43:52
【问题描述】:

ATCOM IP01 上 uClinux 下的 Asterisk 1.4.21.2。 (编辑:顺便说一句,我认为不可能在 uClinux 上将 Asterisk 升级到 1.4 的更新版本,但如果有人知道方法,我很想知道。但我认为问题不在于特定于版本。)

features.conf中的featuremap如下,通话中按键无效。

[featuremap]
blindxfer => *#         ; Blind transfer  (default is #)
disconnect => ***0              ; Disconnect  (default is *)
;automon => *1                  ; One Touch Record a.k.a. Touch Monitor
atxfer => *0                    ; Attended transfer
;parkcall => #72                ; Park call (one step parking)

CLI显示配置的featuremap已经生效:

IP0x*CLI> feature show channels
No feature channels in use

IP0x*CLI> feature show
Builtin Feature           Default Current
---------------           ------- -------
Pickup                    *8      *8
Blind Transfer            #       *#
Attended Transfer                 *0
One Touch Monitor
Disconnect Call           *       ***0
Park Call

Dynamic Feature           Default Current
---------------           ------- -------
(none)

Call parking
------------
Parking extension   :   700
Parking context     :   parkedcalls
Parked call extensions: 701-750

使用各种不同的手机(Grandstream BT-200、Panasonic KX-TGP500、X-Lite 4),但总是同样的问题。所有电话配置为使用 rfc2833,这是 Asterisk 的默认 DTMF 模式;还尝试在 sip.conf 中显式设置 dtmfmode=rfc2833。

在通话过程中按下的任何键都不会得到 Asterisk 的任何响应。 *# 键在不在通话中(在拨号方案中或在语音邮件中)时总是被 Asterisk 识别。

如果使用full => verbose,debug,dtmffull => verbose,error,warning,dtmf 开启DTMF 记录,则尽管在通话过程中按了许多键,但日志中不会出现DTMF 条目。

问题可能是什么?


编辑:现在有附加信息,显示拨号计划中使用的拨号命令。

编辑:我发现在不使用 ael 宏的情况下问题仍然存在,只需在 extensions.conf 中添加 exten=261,1,Dial(SIP/261)。所以我已经从问题中删除了 ael 来整理它。

我现在尝试在 sip.conf 中添加 canreinvite = norelaxdtmf=yes,但问题仍然存在。

我现在还发现 DTMF 记录确实发生在 ZAP 频道(与我之前尝试的 SIP 频道相反)上的通话期间。但是 DTMF 仍然不会触发这些功能。示例 DTMF 日志如下。

[May 22 08:25:46] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '*' received on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2116 __ast_read: DTMF end '*' received on SIP/251-01354004, duration 180 ms
[May 22 08:25:46] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '*' received on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2116 __ast_read: DTMF end '*' received on SIP/251-01354004, duration 160 ms
[May 22 08:25:46] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '*' received on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '*' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2116 __ast_read: DTMF end '*' received on SIP/251-01354004, duration 140 ms
[May 22 08:25:47] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '*' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '*' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '0' received on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '0' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2116 __ast_read: DTMF end '0' received on SIP/251-01354004, duration 280 ms
[May 22 08:25:47] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '0' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '0' on SIP/251-01354004
IP0x*CLI>

【问题讨论】:

  • 您在拨号方案中使用的 Dial 命令是什么?
  • 我已编辑问题以包含详细信息。
  • 升级是不可能的吗? 1.4 是 2012 年的 EOL,wiki.asterisk.org/wiki/display/AST/Asterisk+Versions - 没有很多 1.4 安装可以与之比较。
  • @dougBTV 升级会很好,但我认为在 uClinux 下无法升级到高于 1.4 的版本?我已经编辑了问题以提及这一点。
  • @RegEdit 我建议从源代码安装它。它实际上相当简单,并且有一个不错的 ncurses 界面用于选择您想要的模块。查看规范指令@wiki.asterisk.org/wiki/display/AST/…

标签: asterisk transfer phone-call dtmf uclinux


【解决方案1】:

终于破解了。

确实,设置canreinvite=no 确实会阻止 SIP 电话在 Asterisk 最初建立呼叫后协商它们之间的直接连接,因此将 Asterisk 保留在媒体路径中(从而知道它们发送的任何 DTMF)。

但即便如此,要让 Asterisk 真正响应 DTMF 并调用配置的转接功能,您必须在每次通话时明确启用转接基础,通过将T 和/或t 选项作为拨号命令参数传递。

features.conf 的较新版本提请注意:

;atxfer => *2                   ; Attended transfer  -- Make sure to set the T and/or t option in the Dial() or Queue()  app call!

所以解决方法是,我必须更改我的 AEL 代码以在代码使用 Dial 命令的任何位置添加 T 和/或 t 参数。

我剩下的唯一难题是如何中止有人值守的转移;例如,如果没有回复,使得等待超时变得乏味,或者转移已经开始进入语音信箱,可能需要返回到另一方。通过实验,我最终发现使用按键断开呼叫的功能也可以中止转接:

;disconnect => *0               ; Disconnect  (default is *)  

features.conf 的较新版本包含扩展注释,但与转移无关:

;disconnect => *0               ; Disconnect  (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call!

我发现,即使没有将 H 和/或 h 参数传递给 Dial 命令,断开连接功能也可用于中止有人值守的传输。这与将 H 和/或 h 选项传递给 Dial 命令之间没有冲突:如果您想这样做并将该功能用于任何类型的断开连接,它对于中止传输仍然有效而不断开整个连接调用(尽管可能需要使用默认值 * 以外的其他东西,因为任何以 * 开头的序列现在都会中断调用!)。

我的 AEL 代码中用于在 Zap/1 上拨出电话的 Dial 命令现在是:

Dial(Zap/1/${number},,T);

所有传输功能现在都可以正常工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-04
    • 1970-01-01
    相关资源
    最近更新 更多