简体   繁体   English

Android pjsip DTMF代码不发送

[英]Android pjsip DTMF codes not sending

Starting from the example found here: https://trac.pjsip.org/repos/wiki/Getting-Started/Android , I managed to build and run the pjsua2 sample application. 从这里的示例开始: https ://trac.pjsip.org/repos/wiki/Getting-Started/Android,我设法构建并运行pjsua2示例应用程序。

The problem is that I can't send DTMF codes, they appear in logcat but they aren't sent at all (I checked with wireshark). 问题是我无法发送DTMF代码,它们出现在logcat中但它们根本没有发送(我用wireshark检查过)。 Once the call has the status confirmed, I try to send DTMF codes like this: 一旦呼叫状态得到确认,我就会尝试发送如下DTMF代码:

currentCall.dialDtmf("123#");

or 要么

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

If I send these codes the server should start playing a sound, so I have some feedback that the codes are sent correctly. 如果我发送这些代码,服务器应该开始播放声音,所以我有一些反馈说明代码是正确发送的。 The problem is not on the server side because I have tested with other 3rd party apps. 问题不在服务器端,因为我已经测试过其他第三方应用程序。

I have also tried the following but with no luck: 我也试过以下但没有运气:

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

Any other ideas? 还有其他想法吗?

EDIT: I think it's got something to do with RTP ? 编辑:我认为这与RTP有关? The library doesn't seem to respond to the server's message (RTP g711A - this is sent after ACK @call established/confirmed) that it sends to the Android app. 该库似乎没有响应它发送到Android应用程序的服务器消息(RTP g711A - 这是在ACK @call建立/确认之后发送的)。

Thanks! 谢谢!

check what type of DTMF your server accepts. 检查服务器接受的DTMF类型。

Pjsua2 dialDtmf method will send DTMF digits to remote using RFC 2833 payload formats. Pjsua2 dialDtmf方法将使用RFC 2833有效载荷格式将DTMF数字发送到远程。

You can see DTMF packets in wireshark as an RTP Event. 您可以在wireshark中将DTMF数据包视为RTP事件。

see below link for reference... 见以下链接供参考......

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

Based on pjsip doc : 基于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

So you need to make sure the callee has RFC 2833 capabilities and is attaching telephone-event in the SDP. 因此,您需要确保被调用者具有RFC 2833功能并在SDP中附加电话事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM