Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't receive calls but can make calls using the example dart-sip-ua-example on android #474

Open
tfn290181662 opened this issue Sep 6, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@tfn290181662
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

System Infomation()
Flutter SDK Version:
Target OS and Version:
Host OS and Version:

@tfn290181662 tfn290181662 added the bug Something isn't working label Sep 6, 2024
@tfn290181662 tfn290181662 changed the title Can't receive calls but can make calls when use the example dart-sip-ua-example Can't receive calls but can make calls using the example dart-sip-ua-example Sep 6, 2024
@tfn290181662 tfn290181662 changed the title Can't receive calls but can make calls using the example dart-sip-ua-example Can't receive calls but can make calls using the example dart-sip-ua-example on android Sep 6, 2024
@kevalKathiriya258
Copy link

i facing same issue did you got any solution for this?

@mikaelwills
Copy link
Contributor

In the world of open source, no ones going to help when your provide such little information.

@md-riaz
Copy link

md-riaz commented Sep 24, 2024

same issue

@mikaelwills
Copy link
Contributor

Just tested receiving and making calls using the example app on android with both a 3cx server and a FreePBX server using both WS and TCP. You need to provide more info.

@savan15
Copy link

savan15 commented Sep 26, 2024

i have faced something like same issue.

i have register my endpoint in TCP.
now when i place call from one endpoint to second endpoint then call not receive on second endpoint.

let's clarify more

i have used two android device with this demo installed. now i have login with two sip account.

100 and 101 now i have place call from 100 to 101 but on 101 side call not received.

for my endpoint i have tested on linephone application. it's work fine call are work fine.

@mikaelwills
Copy link
Contributor

@savan15

What do you SIP logs say

@savan15
Copy link

savan15 commented Sep 26, 2024

@mikaelwills
there is no any error on show android device. when i see run windows in android studio.

@mikaelwills
Copy link
Contributor

@savan15 dart-sip-ua outputs SIP flow logs, just make sure to uncomment 'Logger.level = Level.warning;'
in the main.dart of the example app.

Those logs will tell you what your problem is, everyone else here should be posting their logs too.

@savan15
Copy link

savan15 commented Sep 26, 2024

also one more thing i want to clear.

for use this library does my endpoint need to be enable webrtc?
@mikaelwills

@savan15
Copy link

savan15 commented Sep 26, 2024

here are that log. when i place call that time this log are seeing i have.

D/FlutterWebRTCPlugin( 7415): onIceCandidate

I/flutter ( 7415): input => , rule => Request_Response

I/flutter ( 7415): Format exception: Expected !, %, ', 'ACK', 'BYE', 'CANCEL', 'INVITE', 'NOTIFY', 'OPTIONS', 'REFER', 'REGISTER', 'SUBSCRIBE', *, +, -, ., SIP, _, `, alphanum, ~ but found end of file
I/flutter ( 7415): [2024-09-22 16:53:35.373] Level.error parser.dart:32 ::: parseMessage() | error parsing first line of SIP message: ""
D/FlutterWebRTCPlugin( 7415): onIceGatheringChangeCOMPLETE

@mikaelwills
Copy link
Contributor

also one more thing i want to clear.

for use this library does my endpoint need to be enable webrtc? @mikaelwills

Yes

@mikaelwills
Copy link
Contributor

here are that log. when i place call that time this log are seeing i have.

D/FlutterWebRTCPlugin( 7415): onIceCandidate

I/flutter ( 7415): input => , rule => Request_Response

I/flutter ( 7415): Format exception: Expected !, %, ', 'ACK', 'BYE', 'CANCEL', 'INVITE', 'NOTIFY', 'OPTIONS', 'REFER', 'REGISTER', 'SUBSCRIBE', *, +, -, ., SIP, _, `, alphanum, ~ but found end of file I/flutter ( 7415): [2024-09-22 16:53:35.373] Level.error parser.dart:32 ::: parseMessage() | error parsing first line of SIP message: "" D/FlutterWebRTCPlugin( 7415): onIceGatheringChangeCOMPLETE

Yea ive come across this issue before, and unfortunately its stumped me.

What I noticed with this is a SIP message seems to be split into two somewhere.
Half of it comes in, dart-sip-ua detects that the body is less that the content length header so it throws it out.
The second half of the message comes in and the parser can't parse it because it doesnt start with the correct info, so you get that error you pasted.

Anytime ive come across this, ive logged the outgoing message at the very edge of the plugin as it gets sent on the socket and just when it comes in and I can't see anywhere within the package where it might be split in two.

My only theory on this is that possibly the message is too big for a packet so the network infrastructure splits it up.

Maybe we could implement something where if a message comes in thats two short, it could wait for the next one and pair them up, but we shouldnt need to do this... any thoughts @cloudwebrtc ?

@savan15
Copy link

savan15 commented Sep 26, 2024

Ok,
Can we setup any custom codec in this library?

@BarakatMohamad
Copy link

BarakatMohamad commented Oct 1, 2024

@savan15 @mikaelwills @md-riaz any thing for this error I receive the call but I can not make that ????
note : I test my username on another app work correctly ,but in the dart_sip_ua example did not work

@BarakatMohamad
Copy link

@mikaelwills any ideas?

@savan15
Copy link

savan15 commented Oct 3, 2024

@BarakatMohamad
As we have debug on our server side.
We have found webrtc option on endpoint are not enabled. so we have enable it and issue has been resolved.

On your case need to check endpoint configuration and call server configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants