Comments (19)
Error logs when LTE with IPV6: https://gist.github.com/suyashbhatt/cfb69328cd4229cc968e212351b7ea06
My suspect from the logs is that ipv6 address are being messed up with square brackets.
for example in line 140 of error log Via: SIP/2.0/TCP [fe80::3ea3:13e7:928d:857d]:5090;rport
ipv6 address is enclosed in brackets and again in line 143 ipaddress and the port are enclosed in brackets like this: Contact: <sip:[fe80::3ea3:13e7:928d:857d:5090];transport=tcp;registering_acc=my-cool-domain.com>
. With the port 5090
inside brackets, the sip address is invalid. I am doing some more research into this but if anyone could provide some info on where root of the cause could be, than that would help me address this issue
Update: I finally managed to get it working, had to brainstorm on how SIP is trying to communicate with RC server in first place.
I had to go back and forth by testing lots of thing. First thing was to understand how sip was sending request to RC. when wifi is connected phone/pc has 2 ip addresses, 1 is local and another is global (which remote computers can see or when you check your ip in any ipaddress checking website). when sip is sending request, this is what it sends when connected to wifi:
Sending SIP request:
REGISTER sip:envoychat.com:5080 SIP/2.0
Call-ID: [email protected]
CSeq: 1 REGISTER
From: "alice" <sip:[email protected]>;tag=1517349930988
To: "alice" <sip:[email protected]>
Via: SIP/2.0/TCP 10.0.0.67:5090;rport
Max-Forwards: 70
Route: <sip:165.227.90.178:5080;dns_route=true;transport=tcp;lr>
Contact: <sip:10.0.0.67:5090;transport=tcp;registering_acc=envoychat.com>
User-Agent: TelScale Restcomm Android Client UNOFFICIAL#1
Expires: 3600
Content-Length: 0
In above example Contact
is sip:10.0.0.67:5090
where 10.0.0.67
is ipaddress within my wifi network. Now in case of Cellular data devices have lot of interfaces, in my example I had rmnet-data0
, rmnet-data1
, rmnet-data2
, rmnet-data3
, rmnet-data4
, rmnet-data5
, rmnet-data6
, rmnet-data7
and v4-rmnet-data0
. But the active interface was rmnet-data0
which had 2 inet6 address (Network carrier were forcing the use of ipv6 address). One of the address being global scope ip and another being link scope. Link scope address is valid only on that device so it did not work as expected when ipv6 was allowed in sdk. Since there is no local ipv6 while in cellular network, I had to use ipv4 of local scope. now the interface I used was v4-rmnet-data0
and regex used in JainSipClient
does not cover it. I have done all the possible tests I could on multiple phones and emulators and everything seems to work perfectly. I will post a pull-request with the fix soon..
from restcomm-android-sdk.
Issue resolved with ipv6 on cellular data
from restcomm-android-sdk.
@suyashbhatt thanks for the contribution, much appreciated! Yeah, interface selection is always tricky, and tends to break easily. We'll try to review your PR as soon as we get some free cycles and get back to you -hopefully by next week!
Also can you accept our CLA from here, so that we can accept your code?
from restcomm-android-sdk.
@suyashbhatt one thing though, after you fixed the issue with IPV6, did you manage to make an actual call? If so can you share the logcat?
In that sense you might have already made the first step for this issue too :)
from restcomm-android-sdk.
from restcomm-android-sdk.
I have posted logs in pull-request #845
from restcomm-android-sdk.
And yes #647 is also fixed, it was basically the same thing. I was not able to test IPv6 on wifi network but cellular data works as expected.
from restcomm-android-sdk.
Thanks for following up with this @suyashbhatt! Just had a look at the logs and seems ipv4 is still used for signaling:
01-31 04:12:23.056 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: Use IPV4 is true
01-31 04:12:23.057 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Current address (if): 192.0.0.4 (v4-rmnet_data0)
01-31 04:12:23.057 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: regular expression matched
01-31 04:12:23.058 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: Use IPV4 is true
01-31 04:12:23.058 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: is ipv4 in interface (v4-rmnet_data0)
01-31 04:12:23.059 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Interface not matching or down: name:rmnet_data2 (rmnet_data2) isUp: false
01-31 04:12:23.059 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Current address (if): 2607:FC20:6515:8963:0:4D:DB05:E601 (rmnet_data1)
01-31 04:12:23.060 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: regular expression matched
01-31 04:12:23.060 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: Use IPV4 is true
01-31 04:12:23.061 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Interface not matching or down: name:rmnet_data4 (rmnet_data4) isUp: false
01-31 04:12:23.061 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Interface not matching or down: name:bond0 (bond0) isUp: false
01-31 04:12:23.062 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Interface not matching or down: name:rmnet_data3 (rmnet_data3) isUp: false
01-31 04:12:23.062 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Interface not matching or down: name:rmnet_data6 (rmnet_data6) isUp: false
01-31 04:12:23.062 431-14098/org.restcomm.android.olympus.premium.debug I/JainSipClient: interface2Address(): Interface not matching or down: name:rmnet_data5 (rmnet_data5) isUp: false
01-31 04:12:23.063 431-14098/org.restcomm.android.olympus.premium.debug V/JainSipClient: interface2Address(): stringAddress: 192.0.0.4, for currently active network: rmnet, interfaces: [name:dummy0 (dummy0), name:epdg1 (epdg1), name:epdg0 (epdg0), name:lo (lo), name:epdg4 (epdg4), name:epdg3 (epdg3), name:epdg2 (epdg2), name:sit0 (sit0), name:rmnet_data7 (rmnet_data7), name:rmnet_data0 (rmnet_data0), name:p2p0 (p2p0), name:v4-rmnet_data0 (v4-rmnet_data0), name:wlan0 (wlan0), name:rmnet_data2 (rmnet_data2), name:rmnet_data1 (rmnet_data1), name:rmnet_data4 (rmnet_data4), name:bond0 (bond0), name:rmnet_data3 (rmnet_data3), name:rmnet_data6 (rmnet_data6), name:rmnet_data5 (rmnet_data5), name:rmnet_ipa0 (rmnet_ipa0)]
01-31 04:12:23.063 431-14098/org.restcomm.android.olympus.premium.debug V/JainSipClient: getIPAddress(): 192.0.0.4
Do you think you can do a test with useIPv4 set to false and provide the logcat?
Also I'm afraid we won't be able to close #647 until we do a thorough verification that all aspects of ipv6 are covered and part of this should probably be testing in a ipv6-only network. So let's leave it open for now. Unless, you want to bite the bullet and go all the way of course ;)
from restcomm-android-sdk.
I had few hiccups with useIPv4 set to false, for some reason addresses were messed up.
for example this was the sip address I got sip:[fe80::3ea3:13e7:928d:857d:5090]
where its supposed to be sip:[fe80::3ea3:13e7:928d:857d:]:5090
I will have to find the actual cause behind the mess-ups in addresses when ipv4 is fully disabled.
from restcomm-android-sdk.
Ok @suyashbhatt, appreciate the efforts! Please let us know if you need any help there
from restcomm-android-sdk.
Hi @atsakiridis, I dont think header is much of the issue right now, though it might create issue later after successful connection is made with the server. At this moment I am still trying to find why client is unable to connect to server regardless of using either local link or global ipv6 (I assume local link should be used while making connection). At first my server did not have ipv6 so connection would never be successful, but then I added ipv6 to my server and still unable to find out why client is unable to connect to host/server. Following are the known issues that needs to be fixed before we get ipv6 support:
- dns query returns both ipv4 and ipv6 for the host/server and ipv4 is used regardless of
useIPv4 = false
6022-6229/org.restcomm.android.olympus.premium.debug I/JainSipMessageBuilder: createRouteHeader(): DNS query time: 381 ms, hops: [165.227.90.178:5080/tcp, [2604:a880:400:d0::896:9001]:5080/tcp]
6022-6229/org.restcomm.android.olympus.premium.debug W/System.err: Caused by: android.javax.sip.SipException: Could not connect to /165.227.90.178:5080
-
need to get ipv6 from wifi interface. From current implementation when Network Status is WIFI,
getIPAddress
method will return only ipv4 -
Need to fix messed up sip address in header when using ipv6 if it causes issue. (Optional)
Since log is not helping much on why send request is failing when both client and server are using ipv6, I might need your help in this. I think I have an idea but I could be wrong on this as well. There is little or some possibility that sendRequest, sendMessage or any other network io methods are using ipv4 only. I have this assumption coz ipv4 from dns query is being used regardless of using ipv6 and its unable to establish connection with server. It would be great if you could point me to correct direction, or possibly help get better logs on why it is unable to connect. Following is the log where its unclear why client is unable to connect to service:
02-05 03:53:10.550 10944-10974/org.restcomm.android.olympus.premium.debug I/JainSipClient: Sending SIP request:
REGISTER sip:[2604:a880:400:d0::896:9001]:5080 SIP/2.0
Call-ID: 7bbf5e3f679c1798c543fc91749754dc@2607:fc20:1395:6b3b:0:45:b1d6:6601
CSeq: 1 REGISTER
From: "alice" <sip:alice@[2604:a880:400:d0::896:9001]>;tag=1517820790528
To: "alice" <sip:alice@[2604:a880:400:d0::896:9001]>
Via: SIP/2.0/TCP [2607:fc20:1395:6b3b:0:45:b1d6:6601]:5090;rport
Max-Forwards: 70
Route: <sip:[2604:a880:400:d0::896:9001]:5080;dns_route=true;transport=tcp;lr>
Contact: <sip:[2607:fc20:1395:6b3b:0:45:b1d6:6601:5090];transport=tcp;registering_acc=[2604:a880:400:d0::896:9001]>
User-Agent: TelScale Restcomm Android Client UNOFFICIAL#1
Expires: 3600
Content-Length: 0
02-05 03:53:14.251 10944-10965/org.restcomm.android.olympus.premium.debug V/FA: Inactivity, disconnecting from the service
02-05 03:53:18.582 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipException
02-05 03:53:18.582 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipClient.jainSipClientRegister(JainSipClient.java:568)
02-05 03:53:18.582 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipJob$JainSipFsm.process(JainSipJob.java:186)
02-05 03:53:18.582 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipJob.startFsm(JainSipJob.java:783)
02-05 03:53:18.582 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipJobManager.add(JainSipJobManager.java:53)
02-05 03:53:18.582 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipJobManager.add(JainSipJobManager.java:61)
02-05 03:53:18.582 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipClient.open(JainSipClient.java:226)
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.SignalingHandler.handleMessage(SignalingHandler.java:75)
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.os.Handler.dispatchMessage(Handler.java:105)
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.os.Looper.loop(Looper.java:164)
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.os.HandlerThread.run(HandlerThread.java:65)
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: Caused by: android.javax.sip.SipException: Could not connect to /2604:a880:400:d0::896:9001:5080
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.gov.nist.javax.sip.stack.SIPClientTransactionImpl.sendRequest(SIPClientTransactionImpl.java:1099)
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at org.restcomm.android.sdk.SignalingClient.JainSipClient.JainSipClient.jainSipClientRegister(JainSipClient.java:559)
02-05 03:53:18.583 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: ... 9 more
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: Caused by: java.io.IOException: Could not connect to /2604:a880:400:d0::896:9001:5080
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.gov.nist.javax.sip.stack.IOHandler.sendBytes(IOHandler.java:391)
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.gov.nist.javax.sip.stack.TCPMessageChannel.sendMessage(TCPMessageChannel.java:350)
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.gov.nist.javax.sip.stack.MessageChannel.sendMessage(MessageChannel.java:286)
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.gov.nist.javax.sip.stack.SIPTransactionImpl.sendMessage(SIPTransactionImpl.java:925)
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.gov.nist.javax.sip.stack.SIPClientTransactionImpl.sendMessage(SIPClientTransactionImpl.java:495)
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: at android.gov.nist.javax.sip.stack.SIPClientTransactionImpl.sendRequest(SIPClientTransactionImpl.java:1092)
02-05 03:53:18.584 10944-10974/org.restcomm.android.olympus.premium.debug W/System.err: ... 10 more
02-05 03:53:18.586 10944-10974/org.restcomm.android.olympus.premium.debug V/SignalingHandler: onClientOpenedReply: jobId: 1517820789501, connectivityStatus: RCConnectivityStatusNone, status: ERROR_DEVICE_REGISTER_COULD_NOT_CONNECT, text: Device could not connect to Service
from restcomm-android-sdk.
Thanks for taking the time to investigate this @suyashbhatt! Android SDK underneath, for SIP implementation uses JAIN SIP, so let me check with our JAIN SIP lead, if he can verify that JAIN SIP fully supports IPV6. @jaimecasero any hints?
from restcomm-android-sdk.
Any updates here?
from restcomm-android-sdk.
JAIN-SIP should support IPV6. As part of a customer integration, we recently added some support for IPV6 ScopedAddrs, and some header parsing fixings.
from restcomm-android-sdk.
@atsakiridis I have ipv6 enabled on my server but turns out RC does not use ipv6 in server side. Thus all connections over ipv6 to RC server are refused. Is there any way I can enable it?
/bin/restcomm/restcomm.conf
needs PRIVATE_IP
, SUBNET_MASK
, NETWORK
BROADCAST_ADDRESS
and STATIC_ADDRESS
. Ipv6 networking does not have broadcast, it supports multicast. Is there any proper way to set these values so that RC could be used over both ipv6 and ipv4? JBoss supports ipv6 connection but I dont know how RC server configuration works, any help on this would be appreciated.
Thanks,
Suyash
from restcomm-android-sdk.
@suyashbhatt I would suggest that you ask that on [email protected], so that the Restcomm Connect guys can get back to you. This is outside the scope of restcomm SDKs.
from restcomm-android-sdk.
Well eventually this is about test of ipv6 capability of android sdk.
And actually all I wanted was to fix RC connection under cellular network, which has been fixed with me last pull request. I was just trying to help. there was no need for me to dive this deep into ipv6 concerns.. Thanks for advice though, I will close the issue with this.
from restcomm-android-sdk.
@suyashbhatt haven't gone into too much detail here, but was this essentially a duplicate of #647 ?
from restcomm-android-sdk.
@gsaslis, yes. Seems like sdk does support ipv6 after all my test. But its ther RC that cannot be deployed with ipv6 support at the moment. Or at least there is no documentation on how to do it. I tried a lot, got ipv6 connection to my server but RC doesnt use ipv6 at all, admin apge or olympus or anything else in RC cannot be accessed with ipv6.
Just to make clear, SDK does support ipv6. JainSip and sdk has everything that is required for ipv6 connection. It is trying to make connection through ipv6 but server is not accessable at all.
from restcomm-android-sdk.
Related Issues (20)
- Address state issues in App HOT 1
- When 2nd call comes in, 1st call is not muted HOT 2
- Pre-release binary crashed in reconfigure()
- When tapping on missed call in the Notification Drawer the call fails
- Improve TF reporting
- Going back in the App after background call has been hung up from peer messes UX
- No exception if FCM server key is missing
- Consider adding support for direct calling using dialer HOT 1
- ICE Question HOT 4
- Update documentation to make it clear that a client is required in Restcomm Connect
- Can i use it with asterisk ? HOT 3
- Issues with PN
- What's the way to retry initialization?
- Secure connection (TLS) not working HOT 1
- setSDP error: Faild to set remote offer sdp: Called with SDP without DTLS fingerprint. HOT 2
- Call Failed from Android to Android Call HOT 1
- build helloworld failed HOT 1
- java.security.NoSuchAlgorithmException: The BC provider no longer provides an implementation for KeyPairGenerator.EC HOT 1
- App crashes immediately after call accept. Libjingle issue?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restcomm-android-sdk.