简体   繁体   English

jain sip如何在android中连接WiFi

[英]jain sip how to connect with WiFi in android

I am developing a softphone using jain sip which is about to complete except the following problem: I am using restcomm-android-sdk on android-jain-sip-ri-1.2.233.jar and the problem is let say two clients are client A and client B , 我正在开发一个使用jain sip的软电话即将完成,除了以下问题:我在android-jain-sip-ri-1.2.233.jar上使用restcomm-android-sdk ,问题是让两个客户端是客户端A客户B

  1. If client A and client B are using 3G/4G , then everything is working fine as they both can call each other and can here each others voice properly. 如果客户端A客户端B正在使用3G / 4G,那么一切正常,因为他们都可以互相呼叫,并且可以在这里彼此发声。

  2. If client A is using 3G/4G network and clent B is on public WiFi then both can call each other but only client A can hear voice of Client B , client B cannot hear anything. 如果客户端A正在使用3G / 4G网络,并且B是公共WiFi,那么两者都可以互相呼叫,但只有客户端A可以听到客户端B的声音, 客户 端B听不到任何声音。

I think is something relating to routing and nat, here is my android manifest 我认为是与路由和nat有关的东西,这是我的android清单

<uses-permission android:name="android.permission.USE_SIP" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-feature android:name="android.hardware.telephony" android:required="true"/>
<uses-feature android:name="android.hardware.sip.voip" android:required="true" />
<uses-feature android:name="android.hardware.wifi" android:required="true" />
<uses-feature android:name="android.hardware.microphone" android:required="true" />

Could anyone please help in solving this problem? 有人可以帮忙解决这个问题吗?

The NAT may be too restrictive in the public Wifi that you're using. 在您正在使用的公共Wifi中,NAT可能过于严格。 Did you try on a non public wifi ? 你试过非公共wifi吗? Which SIP Server do you use ? 您使用哪个SIP服务器? Do you use RestComm as Server ? 你使用RestComm作为服务器吗?

To be sure a network capture aka wireshark trace would needed (on the client side - you can try https://play.google.com/store/apps/details?id=lv.n3o.shark&hl=fr and on the server side too) 为了确保网络捕获还需要wireshark跟踪(在客户端 - 您可以尝试https://play.google.com/store/apps/details?id=lv.n3o.shark&hl=fr并在服务器端太)

If that's the case (NAT too restrictive, STUN And TURN will need to be implemented on the Android client, planned on the roadmap). 如果是这种情况(NAT限制太多,则需要在Android客户端上实施STUN和TURN,计划在路线图上)。 Another option if you use RestComm is to create a conferencing application and have both clients call the conferencing application to see if that helps. 如果您使用RestComm,另一个选择是创建会议应用程序并让两个客户端调用会议应用程序以查看是否有帮助。

Did you try with both clients on different public wifi networks ? 您是否尝试过在不同公共wifi网络上的两个客户端?

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

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