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

call failed with cause: Code: [488]

Open rddewan opened this issue 2 years ago • 6 comments

Describe the bug Level.debug sip_ua_helper.dart:214 ::: call failed with cause: Code: [488], Cause: Incompatible SDP, Reason: Not Acceptable Here

System Infomation() Flutter SDK Version:3.0.1 Target OS and Version:Android 10 Host OS and Version:Android 11

rddewan avatar Jul 05 '22 12:07 rddewan

dart sip ua uses WebRTC for audio and voice calls, make sure that your server supports WebRTC.

treirouxel88 avatar Jul 07 '22 13:07 treirouxel88

@treirouxel88 Hi, Do you know the "Microsip" program on wiondows that can be used to make sip audio calls, I want to create a similar program on macOS with flutter, the server is freeswitch and does not support webrtc, it looks like this repo is not very applicable, do you have any suggestions?

ingangi avatar Jul 12 '22 08:07 ingangi

seems that freeswitch supports WebRTC, try checking your freeswitch config.

treirouxel88 avatar Jul 12 '22 08:07 treirouxel88

@treirouxel88 Thank you for the reply. The server is not maintained by me, I can't change anything on it. I wounder if I can disable DTLS checking in my App?
Below is my issue(https://github.com/flutter-webrtc/dart-sip-ua/issues/299 ):

flutter: [2022-07-12 15:28:57.758] Level.error rtc_session.dart:2452 ::: emit "peerconnection:setremotedescriptionfailed" [error:Unable to RTCPeerConnection::setRemoteDescription: Error Failed to set remote answer sdp: Called with SDP without DTLS fingerprint.]

I'm getting this error, I'm using the dart sip_ua lib in Flutter, I want to create a desktop App on MacOS, which is like the App named "microsip" on the Windows. This App only makes audio calls just like phones, and the Server is a Freeswitch, microsip works fine this the server, but my App raised this error when Server response 200, seems the server doesn't support DTLS, can I disable it in my App code?

SIP/2.0 200 OK
Via: SIP/2.0/WS 504h4a3z7sk8.invalid;branch=z9hG4bK11247848500000000;received=10.100.144.238;rport=50214
From: "2461" <sip:[email protected]>;tag=570109n08y
To: <sip:[email protected]>;tag=Ft6g041cy818Q
Call-ID: n9gd5tifb0tbg90nhtxc
CSeq: 5843 INVITE
Contact: <sip:[email protected]:5060;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.4.26+git~20191219T025647Z~958cb6f6e9~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Require: timer
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Session-Expires: 120;refresher=uac
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 261
Remote-Party-ID: "Outbound Call" <sip:[email protected]>;party=calling;privacy=off;screen=no

v=0
o=MS 1657592459 1657592460 IN IP4 10.100.124.20
s=MS
c=IN IP4 10.100.124.20
t=0 0
m=audio 18482 RTP/AVP 0 126
a=rtpmap:0 PCMU/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-15
a=ptime:20
a=rtcp-mux
a=rtcp:18482 IN IP4 10.100.124.20


ACK sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/WS 504h4a3z7sk8.invalid;branch=z9hG4bK6238067540000000
Max-Forwards: 69
To: <sip:[email protected]>;tag=Ft6g041cy818Q
From: "2461" <sip:[email protected]>;tag=570109n08y
Call-ID: n9gd5tifb0tbg90nhtxc
CSeq: 5843 ACK
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: outbound
User-Agent: v1.0.0
Content-Length: 0



BYE sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/WS 504h4a3z7sk8.invalid;branch=z9hG4bK1901186472
Max-Forwards: 69
To: <sip:[email protected]>;tag=Ft6g041cy818Q
From: "2461" <sip:[email protected]>;tag=570109n08y
Call-ID: n9gd5tifb0tbg90nhtxc
CSeq: 5844 BYE
Reason: SIP ;cause=488; text="Not Acceptable Here"
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: outbound
User-Agent: v1.0.0
Content-Length: 0

flutter: [2022-07-12 15:28:57.756] Level.debug rtc_session.dart:2966 ::: session failed
flutter: [2022-07-12 15:28:57.756] Level.debug rtc_session.dart:2969 ::: emit "_failed"
flutter: [2022-07-12 15:28:57.757] Level.debug rtc_session.dart:1483 ::: close()
flutter: [2022-07-12 15:28:57.757] Level.debug rtc_session.dart:2980 ::: emit "failed"
flutter: [2022-07-12 15:28:57.757] Level.debug sip_ua_helper.dart:214 ::: call failed with cause: Code: [488], Cause: Bad Media Description, Reason: Not Acceptable Here
flutter: [2022-07-12 15:28:57.758] Level.error rtc_session.dart:2452 ::: emit "peerconnection:setremotedescriptionfailed" [error:Unable to RTCPeerConnection::setRemoteDescription: Error Failed to set remote answer sdp: Called with SDP without DTLS fingerprint.]

ingangi avatar Jul 12 '22 08:07 ingangi

you cannot disable DTLS as it is part of webrtc, as i said, it seems that freeswitch is supporting webrtc. personnally, i already got the 488 error on my project, the solution was to enable webrtc on asterisk. you can check if you can enable this option on your freeswitch installation (if it exists).

treirouxel88 avatar Jul 12 '22 09:07 treirouxel88