Open rddewan opened 2 years ago
dart sip ua uses WebRTC for audio and voice calls, make sure that your server supports WebRTC.
@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?
seems that freeswitch supports WebRTC, try checking your freeswitch config.
@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:2461@10.100.124.24>;tag=570109n08y
To: <sip:14086380968@10.100.124.24>;tag=Ft6g041cy818Q
Call-ID: n9gd5tifb0tbg90nhtxc
CSeq: 5843 INVITE
Contact: <sip:14086380968@10.100.124.24: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:14086380968@10.100.124.24>;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:14086380968@10.100.124.24:5060;transport=udp SIP/2.0
Via: SIP/2.0/WS 504h4a3z7sk8.invalid;branch=z9hG4bK6238067540000000
Max-Forwards: 69
To: <sip:14086380968@10.100.124.24>;tag=Ft6g041cy818Q
From: "2461" <sip:2461@10.100.124.24>;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:14086380968@10.100.124.24:5060;transport=udp SIP/2.0
Via: SIP/2.0/WS 504h4a3z7sk8.invalid;branch=z9hG4bK1901186472
Max-Forwards: 69
To: <sip:14086380968@10.100.124.24>;tag=Ft6g041cy818Q
From: "2461" <sip:2461@10.100.124.24>;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.]
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).
@ingangi @treirouxel88 @rddewan @jbg @hiratake55
[2024-09-23 12:34:50.524] Level.debug socket_transport.dart:129 ::: Socket Transport send()
I/flutter (23190): [2024-09-23 12:34:50.527] Level.debug sip_message.dart:276 ::: Outgoing Message: v=0
I/flutter (23190): o=- 4190787705042332504 2 IN IP4 127.0.0.1
I/flutter (23190): s=-
I/flutter (23190): t=0 0
I/flutter (23190): a=group:BUNDLE 0
I/flutter (23190): a=extmap-allow-mixed
I/flutter (23190): a=msid-semantic: WMS 079e3259-f29b-466b-9375-3957b7c2557d
I/flutter (23190): m=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 102 0 8 13 110 126
I/flutter (23190): c=IN IP4 0.0.0.0
I/flutter (23190): a=rtcp:9 IN IP4 0.0.0.0
I/flutter (23190): a=ice-ufrag:ZRDg
I/flutter (23190): a=ice-pwd:SMxpDqqIQkQKk6pTShr+bk4z
I/flutter (23190): a=ice-options:trickle renomination
I/flutter (23190): a=fingerprint:sha-256 6C:2B:16:73:F9:EB:61:20:F0:EF:C0:E2:7B:E5:E7:5D:2A:97:E9:57:0D:1D:75:90:70:4E
:15:6D:9F:AA:38:90
I/flutter (23190): a=setup:actpass
I/flutter (23190): a=mid:0
I/flutter (23190): a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
I/flutter (23190): a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
I/flutter (23190): a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
I/flutter (23190): a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
I/flutter (23190): a=sendrecv
I/flutter (23190): a=msid:079e3259-f29b-466b-9375-3957b7c2557d 3854edf2-cdc0-43e7-9e01-d8791f3bd5f8
I/flutter (23190): a=rtcp-mux
I/flutter (23190): a=rtpmap:111 opus/48000/2
I/flutter (23190): a=rtcp-fb:111 transport-cc
I/flutter (23190): a=fmtp:111 minptime=10;us
I/flutter (23190): [2024-09-23 12:34:50.529] Level.debug tcp_socket.dart:125 ::: send()
I/flutter (23190): [2024-09-23 12:34:50.531] Level.debug invite_client.dart:90 ::: Timer D expired for transaction z9h
G4bK8959163930000000
I/flutter (23190): [2024-09-23 12:34:50.534] Level.debug tcp_socket_impl.dart:62 ::: send:
I/flutter (23190):
I/flutter (23190): ACK sip:303@sip.wasel.sa SIP/2.0
I/flutter (23190): Via: SIP/2.0/TCP sip.wasel.sa;branch=z9hG4bK8959163930000000
I/flutter (23190): Max-Forwards: 69
I/flutter (23190): To: sip:303@sip.wasel.sa;tag=as5b1ca647
I/flutter (23190): From: "Flutter SIP UA" sip:302@sip.wasel.sa;tag=331i430256
I/flutter (23190): Call-ID: 6902427s515g7y407330
I/flutter (23190): CSeq: 1465 ACK
I/flutter (23190): Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
I/flutter (23190): Supported: outbound
I/flutter (23190): User-Agent: Dart SIP Client v2.0.0
I/flutter (23190): Content-Length: 0
I/flutter (23190):
I/flutter (23190): [2024-09-23 12:34:50.537] Level.debug tcp_socket_impl.dart:62 ::: send:
I/flutter (23190):
I/flutter (23190): INVITE sip:303@sip.wasel.sa SIP/2.0
I/flutter (23190): Via: SIP/2.0/TCP sip.wasel.sa;branch=z9hG4bK10084679940000000
I/flutter (23190): Max-Forwards: 69
I/flutter (23190): To: sip:303@sip.wasel.sa
I/flutter (23190): From: "Flutter SIP UA" sip:302@sip.wasel.sa;tag=331i430256
I/flutter (23190): Call-ID: 6902427s515g7y407330
I/flutter (23190): CSeq: 1466 INVITE
I/flutter (23190): Authorization: Digest algorithm=MD5, username="302", realm="asterisk", nonce="0d9e273b", uri="sip:3
03@sip.wasel.sa", response="98da8cf81b4c957e86c257583c40e1a5"
I/flutter (23190): Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, INFO, PUBLISH
I/flutter (23190): Contact: sip:sip@sip.wasel.sa;ob
I/flutter (23190): Content-Type: application/sdp
I/flutter (23190): Session-Expires: 120
I/flutter (23190): Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
I/flutter (23190): Supported: timer,ice,replaces,outbound
I/flutter (23190): User-Agent: Dart SIP Client v2.0.0
I/flutter (23190): Content-Length: 1322
I/flutter (23190):
I/flutter (23190): v=0
I/flutter (23190): o=- 4190787705042332504 2 IN IP4 127.0.0.1
I/flutter (23190): s=-
I/flutter (23190): t=0 0
I/flutter (23190): a=group:BUNDLE 0
I/flutter (23190): a=extmap-allow-mixed
I/flutter (23190): a=msid-semantic: WMS 079e3259-f29b-466b-9375-3957b7c2557d
I/flutter (23190): m=audio 9 UDP/TLS/RTP/SAVPF
I/org.webrtc.Logging(23190): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps:
.0. Average render time: NA. Average swapBuffer time: NA.
I/flutter (23190): [2024-09-23 12:34:50.630] Level.debug tcp_socket.dart:160 ::: Received TcpSocket data
I/flutter (23190): [2024-09-23 12:34:50.633] Level.debug socket_transport.dart:275 ::: received binary message:
I/flutter (23190):
I/flutter (23190): SIP/2.0 488 Not acceptable here
I/flutter (23190): Via: SIP/2.0/TCP sip.wasel.sa;branch=z9hG4bK10084679940000000;received=148.153.233.227;rport=14014
I/flutter (23190): From: "Flutter SIP UA" sip:302@sip.wasel.sa;tag=331i430256
I/flutter (23190): To: sip:303@sip.wasel.sa;tag=as5b1ca647
I/flutter (23190): Call-ID: 6902427s515g7y407330
I/flutter (23190): CSeq: 1466 INVITE
I/flutter (23190): Server: Asterisk PBX 20.6.0~dfsg+~cs6.13.40431414-2build5
I/flutter (23190): Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
I/flutter (23190): Supported: replaces, timer
I/flutter (23190): Content-Length: 0
I/flutter (23190):
I/flutter (23190):
I/flutter (23190): [2024-09-23 12:34:50.649] Level.debug socket_transport.dart:129 ::: Socket Transport send()
I/flutter (23190): [2024-09-23 12:34:50.653] Level.debug tcp_socket.dart:125 ::: send()
I/flutter (23190): [2024-09-23 12:34:50.657] Level.debug rtc_session.dart:2315 ::: receiveInviteResponse()
I/flutter (23190): [2024-09-23 12:34:50.663] Level.debug rtc_session.dart:2974 ::: session failed
I/flutter (23190): [2024-09-23 12:34:50.667] Level.debug rtc_session.dart:2977 ::: emit "_failed"
I/flutter (23190): [2024-09-23 12:34:50.671] Level.debug rtc_session.dart:1463 ::: close()
I/flutter (23190): [2024-09-23 12:34:50.674] Level.debug rtc_session.dart:2988 ::: emit "failed"
I/flutter (23190): [2024-09-23 12:34:50.677] Level.debug sip_ua_helper.dart:383 ::: call failed with cause: Code: [488
], Cause: Incompatible SDP, Reason: Not acceptable here
I/flutter (23190): ==================== SIP Call State Log ====================
I/flutter (23190): Call State: CallStateEnum.FAILED
I/flutter (23190): Cause: Incompatible SDP
I/flutter (23190): Reason Phrase: Not acceptable here
I/flutter (23190): Status Code: 488
I/flutter (23190): ------ SDP Information ------
I/flutter (23190): Local SDP: 302
I/flutter (23190): Local SDP: null
I/flutter (23190): Local SDP: 302
I/flutter (23190): Local SDP: 302
I/flutter (23190): Remote SDP: 303
I/org.webrtc.Logging(23190): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps:
.0. Average render time: NA. Average swapBuffer time: NA.
I/flutter (23190): Remote SDP: false
I/flutter (23190): Remote SDP: true
I/flutter (23190): Remote SDP:
I/flutter (23190): ------ Media Information ------
I/flutter (23190): Audio Muted: null
I/flutter (23190): Video Muted: null
I/flutter (23190): ------ Stream Information ------
I/flutter (23190): No stream information available
I/flutter (23190): ==============================================================
I/flutter (23190): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%,lasd,almsdkvm
I/flutter (23190): CallStateEnum.FAILED
I/flutter (23190): Incompatible SDP
I/flutter (23190): Not acceptable here
I/flutter (23190): null
I/flutter (23190): null
I/flutter (23190): CallStateEnum.FAILED
I/flutter (23190): null
I/flutter (23190): null
I/flutter (23190): Call state changed: CallStateEnum.FAILED
I/flutter (23190): Call cause: Not acceptable here
I/flutter (23190): Audio muted: null
I/flutter (23190): Video muted: null
I/flutter (23190): Stream ID: null
do you have any suggestions?
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