星号AMI:SIP信道上未接收到DTMF



我正在使用python和pyst向Asterisk发送DTMF。代码为:

def playDTMF(self, channel, digit):
        print "DTMF: Sending %s to %s" % (digit, channel)
        response = self.manager.send_action({
            "Action" : "PlayDTMF",
            "Channel" : channel,
            "Digit" : digit
        })
        print "DTMF: %s - %s" % (response['Response'], response['Message'])

脚本输出良好:

DTMF: Sending 1 to SIP/S3bc9c3c-00000081
DTMF: Success - DTMF successfully queued

但Asterisk的反应是这样的:

[Jul  2 17:48:53] DEBUG[6967] manager.c: Running action 'PlayDTMF'
[Jul  2 17:48:53] DEBUG[6967] channel.c: Set channel SIP/S3bc9c3c-00000081 to write format slin
[Jul  2 17:48:53] DEBUG[6967] channel.c: Scheduling timer at (50 requested / 50 actual) timer ticks per second
[Jul  2 17:48:53] DEBUG[6967] channel.c: Thread 140629726328576 Blocking 'SIP/S3bc9c3c-00000081', already blocked by thread 140628353554176 in procedure ast_
waitfor_nandfds

有趣的是,这种情况只发生在SIP信道上。在"本地"频道上,它按预期工作:

[Jul  2 18:00:07] DTMF[7951]: channel.c:4083 __ast_read: DTMF begin '1' received on Local/901@AC000001-19ca;1
[Jul  2 18:00:07] DTMF[7951]: channel.c:4093 __ast_read: DTMF begin passthrough '1' on Local/901@AC000001-19ca;1

如何让DTMF在SIP频道上正常播放?

UPD

在Asterisk错误追踪器上发现此:https://issues.asterisk.org/jira/browse/ASTERISK-13224

似乎,如果我把DTMF发送到SIP频道,手机只会自己播放,它不会进一步发送到Asterisk。有什么办法处理它吗?

使用SendDTMF应用程序。SendDTMF(数字[|timeout_ms])

在SIP.CONF中,确保您有

dtmfmode=rfc2833

用于适当的SIP中继。通常,使用SIP在频带内发送DTMF(音频)并不如您所希望的那样有效。

最新更新