Closed icodelifee closed 1 year ago
I've been scratching my head over this issue for a couple of days now. Is there a way to know if the client has been logged in through the client class? because I'm relying on registered state variable in my notifier class which updates when observer triggers CLIENT_READY case to know that i have logged in and is ready to make calls
hey @icodelifee.
I can look into this for you - generally, though, the REGED state is what you should be looking for in terms of when the client is ready to make and receive calls.
hey @icodelifee.
I can look into this for you - generally, though, the REGED state is what you should be looking for in terms of when the client is ready to make and receive calls.
Yes, i know about REGED but the observer onSocketMessage handler is not logging any messages.
Hello, @Oliver-Zimmerman im having another issue, Websocket automatically closes. for now, i have a workaround, a timer which checks every couple of seconds if the telnyx client is connected or not. Should i create another issue?. logs below thanks. https://katb.in/opafixoqisu
Update: got a close with close reason
@icodelifee sorry for the late reply, the mobile team is under heavy load at the moment. This is my priority today. I will look into both issues. and update you here
@icodelifee Can I ask if you are testing on iOS, Android or Web? Or is it happening on all?
Hey @icodelifee
In regards to the socket closing. This should be fixed by this PR https://github.com/team-telnyx/flutter-voice-sdk/pull/21
I can let you know once it has merged and we do a release, but you should be able to test it from there first if you like.
In regards to the client ready message. There might be some confusion as to how onSocketMessageReceived works.
I believe you are receiving Client Ready but are perhaps only looking at the message instead of the SocketMethod provided with the message. For example here is the Client_Ready socket method we receive on a successful REGED state:
We monitor this in our view model in the sample app like this, regardless of the containing message:
https://pub.dev/packages/telnyx_webrtc
The new version is available @icodelifee
telnyx_webrtc: ^0.0.8
Please close this issue if it is resolved, otherwise let me know here and we can investigate further
both issues. and update you here
Im testing on Android
Hey @icodelifee
In regards to the socket closing. This should be fixed by this PR #21
I can let you know once it has merged and we do a release, but you should be able to test it from there first if you like.
In regards to the client ready message. There might be some confusion as to how onSocketMessageReceived works.
I believe you are receiving Client Ready but are perhaps only looking at the message instead of the SocketMethod provided with the message. For example here is the Client_Ready socket method we receive on a successful REGED state:
We monitor this in our view model in the sample app like this, regardless of the containing message:
Oh, i also observe all the Telnyx messages using the messageRecieved handler
In the latest version im getting a stream sink close issue
In the latest version im getting a stream sink close issue
After this error gets thrown, the messageReceived callback is not working
@icodelifee I can't reproduce this. Can you confirm it is happening on the sample app too? If not then I believe we need to look into your implementation.
I've had an application up and running for over 30 minutes now without the error: https://pastebin.pl/view/cb847a9e
@icodelifee I can't reproduce this. Can you confirm it is happening on the sample app too? If not then I believe we need to look into your implementation.
I've had an application up and running for over 30 minutes now without the error: pastebin.pl/view/cb847a9e
Its still happening, but only after i call from SIP number to my SIP number, i still dont know the correct way to reproduce it!, maybe the websocket closed and its trying to access it? before its being reconnected? im not sure
@icodelifee I can't reproduce this. Can you confirm it is happening on the sample app too? If not then I believe we need to look into your implementation. I've had an application up and running for over 30 minutes now without the error: pastebin.pl/view/cb847a9e
Its still happening, but only after i call from SIP number to my SIP number, i still dont know the correct way to reproduce it!, maybe the websocket closed and its trying to access it? before its being reconnected? im not sure
One thing i found is that it only happens after the debug message ->
Received WebSocket message - Contains Method :: {jsonrpc: 2.0, id: 17786, method: telnyx_rtc.ping, params: {serno: 1665048277}}
, if that can help
Okay I will test after receiving a call and see if I can reproduce. I will update you here
@icodelifee and you're sure this is happening on the Sample app? I just ran a test logging in and receiving a call and then waiting for 2 successful Ping/Pong exchanges and it seems to be working. Video attached:
https://user-images.githubusercontent.com/9112652/194286037-0d62ca89-8a86-445a-bb6a-8f677f8197c2.mov
@icodelifee and you're sure this is happening on the Sample app? I just ran a test logging in and receiving a call and then waiting for 2 successful Ping/Pong exchanges and it seems to be working. Video attached:
Screen.Recording.2022-10-06.at.11.04.11.mov
Hey, i did some more testing, its fine the example app, i think its happening because i close the websocket after user logout. Is it necessary to disconnect the websocket when user sign out of the app and then relogs with a different credentials?
Hey @icodelifee
No that's not necessary. You can keep the same socket connection alive and just send another login message with the different credentials.
However, closing the socket theoretically shouldn't cause any issues if you then reopen it. I can look into this flow for you and see what is causing the issue. But for now, feel free to simply login with different credentials
hey @icodelifee
I found the issue with the disconnect. You can see the PR here. I will release a new version soon: https://github.com/team-telnyx/flutter-voice-sdk/pull/22
@icodelifee
Version 0.0.9 has been released. You should be able to use disconnect now.
Please close this issue if it is working for you
@icodelifee I am going to close this for now. Please re-open if the issue persists
Bug Category
SDK Version eg. telnyx_webrtc: latest
Describe the bug This only happens sometimes, but when i try to login with credentials sometimes the CLIENT_READY wont be logged. Please check the logs below
Expected behaviour socket method CLIENT_READY logs and should allow to receive or create calls
To Reproduce Steps to reproduce the behaviour:
Logs https://katb.in/sawawalikiz