dart-sip-ua icon indicating copy to clipboard operation
dart-sip-ua copied to clipboard

Not responding to 407 Proxy Authentication Required from sip server

Open andrewudxgen opened this issue 2 years ago • 11 comments

Hello,

we are integration with sip server, when we receive 407 Proxy Authentication Required from sip server, our app not responding return invite along with authorization user details. when we checked with jssip online (https://tryit.jssip.net/), it is working perfectly fine.

can you please help us the same, what we are missing on.

we are checking android flutter app(dart-sip-ua) with latest version(0.5.3)

thank in advance!!!

  • Andrew

andrewudxgen avatar Oct 20 '22 16:10 andrewudxgen

What SIP server?

ghenry avatar Oct 23 '22 21:10 ghenry

we are using freeswitch as backend server. when server sends a 407 proxy authentication to app, app not responding to it.

andrewudxgen avatar Oct 23 '22 21:10 andrewudxgen

Are you sure it's reaching it?

ghenry avatar Oct 23 '22 21:10 ghenry

yes, sip server sending 407 proxy authentication, but not responding to the same, when we tested with tryit.jssip.com it working with same network.

andrewudxgen avatar Oct 23 '22 21:10 andrewudxgen

Debug on? You need to validate the network layer etc. as there's nothing wrong with dart-sip-ua here. Have you configured as per the example app?

ghenry avatar Oct 23 '22 21:10 ghenry

ok sure, let us share here the debug logs and update the same, yes, we're configured as per example app only.

Thank you for quick responses.

andrewudxgen avatar Oct 23 '22 22:10 andrewudxgen

I'm facing similar problem here. Flutter app REGISTERs OK with asterisk server, and when making a call the 2nd INVITE (with auth details) for the "401 Unauthorized" is not received on the server, although it is displayed on the android logs. The last that the server sees is the ACK for the 401.

I've tried with allowBadCertificates on and off The TLS used for the webSocket/SIP is working, since it can REGISTER and ACK, right?

the problem showed both on the android emulator and on the phone

You mentioned network layer, what should I look for? I'm trying to capture traffic, but since it's encrypted is harder

elbriga avatar Nov 25 '22 18:11 elbriga

Did you guys find a fix? I'm facing the same issue, even weird is the fact that Flutter logs shows Proxy-Authorization is sent, but server doesn't recieve it and It works fine with WS but not with WSS.

avnotaklu avatar Dec 18 '22 16:12 avnotaklu

I'm facing similar problem here. Flutter app REGISTERs OK with asterisk server, and when making a call the 2nd INVITE (with auth details) for the "401 Unauthorized" is not received on the server, although it is displayed on the android logs. The last that the server sees is the ACK for the 401.

I've tried with allowBadCertificates on and off The TLS used for the webSocket/SIP is working, since it can REGISTER and ACK, right?

the problem showed both on the android emulator and on the phone

You mentioned network layer, what should I look for? I'm trying to capture traffic, but since it's encrypted is harder

Yes encryption makes it harder, furthermore everything is fine on WS :smiling_face_with_tear:

avnotaklu avatar Dec 18 '22 16:12 avnotaklu

I haven't been able to check network logs hence don't know if message are being sent, but issue seems to be server needing some delay between messages to process the messages, I added a parameter to create some delay between the messages. https://github.com/flutter-webrtc/dart-sip-ua/pull/335. This fixes the issue for me.

avnotaklu avatar Dec 22 '22 03:12 avnotaklu

I haven't been able to check network logs hence don't know if message are being sent, but issue seems to be server needing some delay between messages to process the messages, I added a parameter to create some delay between the messages. https://github.com/flutter-webrtc/dart-sip-ua/pull/335. This fixes the issue for me.

This worked fine for me too

D-Mick avatar Feb 06 '23 06:02 D-Mick