cmeng-git / atalk-android

xmpp/jabber client for android
Apache License 2.0
155 stars 56 forks source link

Auto discover STUN/TURN servers does not use XEP-0215 #195

Closed licaon-kter closed 1 year ago

licaon-kter commented 1 year ago

...and still connects to Google.

cmeng-git commented 1 year ago

In aTalk implementation, if none is found in auto discovery, it automatic fallback to the default stunServers i.e. google

Please refer to IceUdpTransportManager#createIceAgent() source:

        // Found no configured or discovered STUN server; so takes default stunServers provided if user allows it
        if (!atLeastOneStunServer && accID.isUseDefaultStunServer()) {
            for (String stunServer : stunServers) {
                String[] hostPort = stunServer.split(":");
                for (TransportAddress addr : getTransportAddress(hostPort[0], Integer.parseInt(hostPort[1]), Transport.UDP)) {
                    agent.addCandidateHarvester(new StunCandidateHarvester(addr));
                    atLeastOneStunServer = true;
                }

                // Skip the rest if one has set up successfully
                if (atLeastOneStunServer) break;
            }
        }
licaon-kter commented 1 year ago

I've got at least Jitsi Meet, Conversations and Snikket iOS using my advertised local TURN server just fine.

Do you want me to provide you with an account to test?

cmeng-git commented 1 year ago

Just realise that XEP-0215 is a new XEP protocol currently not supported by aTalk, nor it in the smack standard library used by aTalk.

Please provide a test account on a XMPP server that support: XEP-0215: External Service Discovery v1.0.0 (2022-08-23

cmeng-git commented 1 year ago

aTalk v3.0.3 has added support for XEP-0215. Please check and verify.

licaon-kter commented 1 year ago

Since you have 2 accounts now, can you also test this? My Android 6 device errors out on calls.

cmeng-git commented 1 year ago

Since you have 2 accounts now, can you also test this? My Android 6 device errors out on calls.

Please provide the following info for further investigation: a. Ensure the call are made between two aTalk clients and using the latest aTalk versions. Conversations media call is still under implementation. What are device models and OS installed on the devices?

b. What is the audio and video codec selected for the call?

c. Is the call using encryption, if so what is it?

d. Are the two clients call on the same network, or via NAT etc?

e. What is errors messages displayed on the phone when call failed?

f. Was the android device (android 6) working when installed with older version of aTalk release?

g. Other environment setup deems importance for the investigation

cmeng-git commented 1 year ago

After reviewing aTalk sources and the ReleaseNotes: It looks like aTalk after v2.9.0, has ported to use ice4j v3.0 which requires min android API-24. Therefore aTalk after v2.9.0 can only support android API-24 min.

licaon-kter commented 1 year ago

So is https://github.com/cmeng-git/atalk-android/blob/master/build.gradle#L32 gonna be bumped?

cmeng-git commented 1 year ago

I still leaving as it, as I may want to make ice4j v3.0 be compatible to API-21 when I have more time.

cmeng-git commented 1 year ago

aTalk v3.1.1 media call is now compatible with android-5.0