[SIP] "Encrypt media streams (SRTP)" setting doesn't stick nor work
Describe your environment
- OS: Guix System
- Jami version:20220726.1515.da8d1da
- What build you are using: from system (Guix)
Steps to reproduce
Note: Better the scenario is, better we will be able to reproduce and debug.
- Can you reproduce the bug: at will
- Steps:
- Add voip.ms account which has the "Encrypted SIP Traffic" advanced setting enabled (Main Menu -> Account Settings -> Advanced).
- In the Jami account advanced settings, make sure the "Encrypt media streams (SRTP)" and "Encrypt negotiation (TLS)" options are enabled.
- Dial the voip.ms echo service number (4443).
- Actual result: The call fails with "Missed outgoing call". If I quit and relaunch Jami, when I visit the advanced settings of the account, the "Encrypt media streams (SRTP)" appears disabled although I had enabled it in step 2 above.
- Expected result: The call succeeds and I can hear my echo. The "Encrypt media streams (SRTP)" stays enabled upon relaunching Jami.
Additional information
This is the log of the failed call (username redacted):
[1659488529.155|23734|manager.cpp :1013 ] try outgoing call to '4443' with account '0c5b1f1227e59d00'
[1659488529.155|23734|sipaccount.cpp :186 ] [Account 0c5b1f1227e59d00] Calling SIP peer 4443
[1659488529.155|23734|sipcall.cpp :139 ] [call:5466167670334068] Create a new [OUTGOING] SIP call with 1 media
[1659488529.155|23734|audio_rtp_session.cpp:56 ] Created Audio RTP session: 0xe43410 - call Id 5466167670334068
[1659488529.155|23734|ringbuffer.cpp :55 ] Create new RingBuffer 5466167670334068
[1659488529.155|23734|sipcall.cpp :1927 ] [call:5466167670334068] Added media @0: type [AUDIO] enabled [YES] muted [NO] label [audio_0] source [camera://046d_HD_Pro_Webcam_C920_79D3DE2F] secure [NO]
[1659488529.155|23734|sipcall.cpp :1933 ] [call:5466167670334068] Created 1 Media streams
[1659488529.155|23734|sipcall.cpp :402 ] [call:5466167670334068] Setting transport to [0x7f605c004e30]
[1659488529.155|23734|sipcall.cpp :423 ] [call:5466167670334068] The signaling channel is encrypted but the media is not encrypted
[1659488529.155|23734|sipaccount.cpp :226 ] UserAgent: New registered account call to 4443
[1659488529.155|23734|ice_transport.cpp :332 ] [ice:0x62e24f0] Creating IceTransport session for "5466167670334068"
[1659488529.156|23734|sipcall.cpp :3134 ] [call:5466167670334068] Successfully created media ICE transport [ice:0xd876c0]
[1659488529.156|23734|sipcall.cpp :3296 ] [call:5466167670334068] Setting ICE session [0xd876c0]
[1659488529.156|23734|sipcall.cpp :3156 ] [call:5466167670334068] Init media ICE transport
[1659488529.156|23734|ice_transport.cpp :405 ] [ice:0x62e24f0] Initializing the session - comp count 2 - as a master
[1659488529.156|23734|ice_transport.cpp :446 ] [ice:0x62e24f0] Add host candidates
[1659488529.156|23734|ice_transport.cpp :908 ] [ice:0x62e24f0] added host stun config for UDP transport
[1659488529.156|23734|ice_transport.cpp :908 ] [ice:0x62e24f0] added host stun config for UDP transport
[1659488529.156|23734|ice_transport.cpp :1018 ] [ice:0x62e24f0] Missing local address, generic srflx candidates wont be generated!
[1659488529.156|23734|ice_transport.cpp :473 ] [ice:0x62e24f0] No server reflexive candidates added
[1659488529.159|23734|ice_transport.cpp :707 ] [ice:0x62e24f0] UDP initialization success
[1659488529.159|23734|ice_transport.cpp :770 ] [ice:0x62e24f0] as master
[1659488529.160|23734|ice_transport.cpp :883 ] [ice:0x62e24f0] (local) ufrag=6970830f, pwd=63778940482065704283076a
[1659488529.160|23734|sdp.cpp :557 ] Creating SDP offer with 1 media
[1659488529.160|23734|sdp.cpp :264 ] Add media description [type [AUDIO] enabled [YES] muted [NO] label [audio_0] source [] secure [NO]]
[1659488529.161|23734|sdp.cpp :504 ] [SDP OFFER] Local session (initial):
v=0
o=hurd 3868477329 0 IN IP4 66.158.151.182
s=Call ID 5466167670334068
c=IN IP4 66.158.151.182
t=0 0
m=audio 17228 RTP/AVP 104 9 2 112 111 110 8 0 101
a=rtpmap:104 opus/48000/2
a=rtpmap:9 G722/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:112 speex/32000
a=rtpmap:111 speex/16000
a=rtpmap:110 speex/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtcp:17229 IN IP4 66.158.151.182
a=sendrecv
[1659488529.161|23734|manager.cpp :604 ] ----- Switch current call id to '5466167670334068' -----
[1659488529.161|23745|sipcall.cpp :1795 ] [call:5466167670334068] Add local attributes for ICE instance [0xd876c0]
[1659488529.161|23745|sipcall.cpp :1835 ] [call:5466167670334068] add ICE local candidates for media [type [AUDIO] enabled [YES] muted [NO] label [audio_0]] @ 0
[1659488529.161|23745|sipaccount.cpp :377 ] contact header: "voip.ms" <sips:myuser@66.158.151.182:42375;transport=tls> / "voip.ms" <sips:myuser@montreal6.voip.ms;transport=TLS> -> <sips:4443@montreal6.voip.ms;transport=TLS>
[1659488529.161|23745|sipaccountbase.cpp:82 ] Creating SIP dialog:
From: "voip.ms" <sips:myuser@montreal6.voip.ms;transport=TLS>
Contact: "voip.ms" <sips:myuser@66.158.151.182:42375;transport=tls>
To: <sips:4443@montreal6.voip.ms;transport=TLS>
[1659488529.162|23745|sipaccountbase.cpp:93 ] No target provided, using 'to' as target
[1659488529.162|23745|sipcall.cpp :664 ] [call:5466167670334068] Set new invite session [0x7f605021cb38]
[1659488529.162|23745|sip_utils.cpp :221 ] Add header to SIP message: "User-Agent: Jami Daemon 13.4.0 (linux)"
[1659488529.163|23745|sipvoiplink.cpp :891 ] [call:5466167670334068] INVITE@0x7f605021cb38 state changed to 1 (CALLING): cause=0, tsx@0x7f609018df98 status 0 (Default status message)
[1659488529.163|23745|call.cpp :239 ] [call:5466167670334068] state change 0/1, cnx 0/2, code 0
[1659488529.163|23745|call.cpp :273 ] [call:5466167670334068] emit client call state change CONNECTING, code 0
"slotCallStateChanged (call: 5466167670334068), from Searching to Connecting"
CallAdapter::updateCallOverlay
[1659488529.211|23748|sipvoiplink.cpp :891 ] [call:5466167670334068] INVITE@0x7f605021cb38 state changed to 6 (DISCONNCTD): cause=488, tsx@0x7f605c3a9d68 status 488 (Not Acceptable Here)
[1659488529.212|23748|call.cpp :239 ] [call:5466167670334068] state change 1/5, cnx 2/0, code 488
[1659488529.213|23748|call.cpp :273 ] [call:5466167670334068] emit client call state change FAILURE, code 488
[1659488529.213|23745|manager.cpp :2024 ] [call:5466167670334068] Parent call failed
[1659488529.214|23745|manager.cpp :1650 ] [call:5466167670334068] Remove local audio
[1659488529.214|23745|ringbufferpool.cpp:262 ] Unbind call 5466167670334068 from all bound calls
[1659488529.214|23745|sipcall.cpp :1512 ] [call:5466167670334068] removeCall()
[1659488529.214|23745|call_factory.cpp :72 ] Removing call 5466167670334068
[1659488529.214|23745|call_factory.cpp :75 ] Remaining 0 call
[1659488529.214|23745|call.cpp :239 ] [call:5466167670334068] state change 5/6, cnx 0/0, code 0
[1659488529.214|23745|call.cpp :273 ] [call:5466167670334068] emit client call state change OVER, code 0
[1659488529.214|23745|sipcall.cpp :650 ] [call:5466167670334068] Delete current invite session
[1659488529.214|23776|ice_transport.cpp :337 ] [ice:0x62e24f0] destroying 0x62e8c08
[1659488529.214|23745|sipcall.cpp :402 ] [call:5466167670334068] Setting transport to [(nil)]
[1659488529.214|23745|audio_rtp_session.cpp:218 ] [0xe43410] Stopping receiver
[1659488529.214|23745|audio_rtp_session.cpp:65 ] Destroyed Audio RTP session: 0xe43410 - call Id 5466167670334068
[1659488529.214|23745|ringbuffer.cpp :60 ] Destroy RingBuffer 5466167670334068
"slotCallStateChanged (call: 5466167670334068), from Connecting to Finished"
CallAdapter::updateCallOverlay
CallAdapter::updateCallOverlay
[1659488529.661|23776|ice_transport.cpp :351 ] [ice:0x62e24f0] Destroying ice_strans 0x62e8c08
[1659488529.661|23776|ice_transport.cpp :669 ] [ice:0x62e24f0] Timer heap flushed after 0 ms
[1659488529.661|23776|ice_transport.cpp :383 ] [ice:0x62e24f0] done destroying
"slotCallStateChanged (call: 5466167670334068), from Finished to Finished"
CallAdapter::updateCallOverlay
CallAdapter::updateCallOverlay
Invalid JSON: ""
[1659488530.204|23769|connectionmanager.cpp:681 ] Received request answer from a3e0e932f08809757b6acb5ddaa355c8e0b7ea559604b63f7b02b6c09641b566
[1659488530.204|23774|connectionmanager.cpp:654 ] [Account 80852682ccb25a32] New response received from a3e0e932f08809757b6acb5ddaa355c8e0b7ea559604b63f7b02b6c09641b566
[1659488530.205|23774|connectionmanager.cpp:661 ] [Account 80852682ccb25a32] respond received, but cannot find request
Edited by Maxim Cournoyer