【问题标题】:Android pjsip DTMF codes not sendingAndroid pjsip DTMF 代码未发送
【发布时间】:2014-08-13 14:01:30
【问题描述】:

从此处找到的示例开始:https://trac.pjsip.org/repos/wiki/Getting-Started/Android,我设法构建并运行了 pjsua2 示例应用程序。

问题是我无法发送 DTMF 代码,它们出现在 logcat 中,但根本没有发送(我检查了 wireshark)。一旦通话状态得到确认,我会尝试发送这样的 DTMF 代码:

currentCall.dialDtmf("123#");

currentCall.dialDtmf("1");
currentCall.dialDtmf("2");
currentCall.dialDtmf("3");
currentCall.dialDtmf("#");

如果我发送这些代码,服务器应该会开始播放声音,所以我有一些反馈表明代码发送正确。问题不在服务器端,因为我已经使用其他 3rd 方应用进行了测试。

我也尝试了以下方法,但没有成功:

OnDtmfDigitParam dtmfDigitParam = new OnDtmfDigitParam();
dtmfDigitParam.setDigit("1");
currentCall.onDtmfDigit(prm);

还有其他想法吗?

编辑:我认为这与 RTP 有关吗?该库似乎没有响应它发送到 Android 应用程序的服务器消息(RTP g711A - 这是在 ACK @call 建立/确认之后发送的)。

谢谢!

【问题讨论】:

    标签: android sip pjsip dtmf


    【解决方案1】:

    检查您的服务器接受的 DTMF 类型。

    Pjsua2 dialDtmf 方法将使用 RFC 2833 有效负载格式将 DTMF 数字发送到远程。

    您可以在 Wireshark 中将 DTMF 数据包视为 RTP 事件。

    请参阅下面的链接以供参考...

    http://www.pjsip.org/docs/book-latest/html/call.html

    【讨论】:

    • 服务器确实支持RFC2883。
    【解决方案2】:

    基于pjsip doc

    PJSIP will only send RFC 2833 DTMF to remote if remote has indicated its capability to accept RFC 2833 events in its SDP. This is done by putting this line in the SDP:
    
    a=rtpmap:101 telephone-event/8000
    

    因此,您需要确保被调用方具有 RFC 2833 功能,并且在 SDP 中附加了电话事件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-12
      • 1970-01-01
      • 2012-11-23
      • 1970-01-01
      • 2011-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多