linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] SRTP and updateCall


From: Michael S
Subject: [Linphone-developers] SRTP and updateCall
Date: Tue, 14 Feb 2017 15:21:57 +0700

Hi,

We are using SRTP and we were able to get this working with audio, but failed 
with video.

For video calls, we are calling lc.updateCall() when camera turned on or 
switched front/back.

updateCall() leads to INVITE with "Subject: Media changed" but liblinphone 
forgot about a=crypto attributes.

As result, since SIP proxy server configured with mandatory SRTP, server 
responds with 488.

For example, initial INVITE


   INVITE sip:address@hidden SIP/2.0
   Via: SIP/2.0/TLS 172.17.254.7:46160;branch=z9hG4bK.IKYuBZnFr;rport
   From: <sip:address@hidden>;tag=e~bm1pyC2
   To: sip:address@hidden
   CSeq: 20 INVITE
   Call-ID: RC1cHuZLOb
   Max-Forwards: 70
   Supported: replaces, outbound
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO, UPDATE
   Content-Type: application/sdp
   Content-Length: 1210
   Contact: 
<sip:address@hidden:46160;transport=tls>;+sip.instance="<urn:uuid:bf87b5fd-20d9-4613-87bd-d5ef4a5ab559>"
   User-Agent: Unknown (belle-sip/1.5.0)

   v=0
   o=111111 568 153 IN IP4 172.17.254.7
   s=Talk
   c=IN IP4 172.17.254.7
   t=0 0
   a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
   m=audio 7078 RTP/SAVPF 96 101
   a=rtpmap:96 SILK/8000
   a=rtpmap:101 telephone-event/8000
   a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:XiIh1YhpXxRYTdanGEKZRqfbo/+i9ctxVL8I8hnN
   a=crypto:2 AES_CM_128_HMAC_SHA1_32 
inline:z+8cgOd6LbhI2v1HF2kXxceg/3PELL5ea+N6Phyl
   a=crypto:3 AES_256_CM_HMAC_SHA1_80 
inline:OAKH+Y7jiFJ3OSI0zRcqjpWEX0ZWk6RzdNPUbigNCUBPKuHeIMcdBpfOo1s76g==
   a=crypto:4 AES_256_CM_HMAC_SHA1_32 
inline:l26+a3G8HAh2D2re3cQ02O3d4O3D2JeyQQvVWAXcN+NXsQa2/1OzEtM75JU31Q==
   a=rtcp-fb:* trr-int 5000
   m=video 9078 RTP/SAVPF 96
   a=rtpmap:96 VP8/90000
   a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:3SNxSjXVQsLqUPFCBDrAtyFcrUYCmP0ANL8aWUcX
   a=crypto:2 AES_CM_128_HMAC_SHA1_32 
inline:s+8vqzhpK6smHtEYLtkiCIWjPXoj0buWrBzEtmUl
   a=crypto:3 AES_256_CM_HMAC_SHA1_80 
inline:XvtzoDTyUpmiqKYHummTsH54JWszOSrzAADPHXXma0Wdy1MkPF9CDaIYNXpd5Q==
   a=crypto:4 AES_256_CM_HMAC_SHA1_32 
inline:3goEB6m0TOgcmGNs6n3bgHd9Gh5J1JfIPFStjiCMLRTrNm31IHdJj8lP6WYlsQ==
   a=rtcp-fb:* trr-int 5000
   a=rtcp-fb:96 nack pli
   a=rtcp-fb:96 nack sli
   a=rtcp-fb:96 ack rpsi
   a=rtcp-fb:96 ccm fir



And INVITE, caused by updateCall()


   INVITE sip:address@hidden:55061;transport=tls SIP/2.0
   Via: SIP/2.0/TLS 172.17.254.5:46595;branch=z9hG4bK.~uiob3qVr;rport
   From: <sip:address@hidden>;tag=xf4Iqg~
   To: "+111111" <sip:address@hidden>;tag=9FF3pyeZQFrBg
   CSeq: 111 INVITE
   Call-ID: 0de0e1db-6cb9-1235-48b9-6cae8b3b6e92
   Max-Forwards: 70
   Subject: Media change
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, 
INFO, UPDATE
   Content-Type: application/sdp
   Content-Length: 295
   Contact: 
<sip:address@hidden:46595;transport=tls>;expires=604800;+sip.instance="<urn:uuid:89df6d19-8b7e-4b78-abe7-5e0793bd8865>"
   User-Agent: Unknown (belle-sip/1.5.0)

   v=0
   o=222222 570 103 IN IP4 172.17.254.5
   s=Talk
   c=IN IP4 172.17.254.5
   t=0 0
   a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
   m=audio 7078 RTP/AVP 96 101
   a=rtpmap:96 SILK/8000
   a=rtpmap:101 telephone-event/8000
   m=video 9078 RTP/AVP 96
   a=rtpmap:96 VP8/90000


And server response:


389347c6-e4b2-4436-bd2a-d7898e04c1f3 2017-02-13 23:59:56.765808 [DEBUG] 
switch_core_media.c:4843 Video Codec Compare [VP8:96]/[VP8:99]
389347c6-e4b2-4436-bd2a-d7898e04c1f3 2017-02-13 23:59:56.765808 [DEBUG] 
switch_core_media.c:4885 Video Codec Compare [VP8:96] +++ is saved as a match
389347c6-e4b2-4436-bd2a-d7898e04c1f3 2017-02-13 23:59:56.765808 [WARNING] 
switch_core_media.c:4901 Crypto not negotiated but required.
389347c6-e4b2-4436-bd2a-d7898e04c1f3 2017-02-13 23:59:56.765808 [ERR] 
sofia.c:7884 Reinvite Codec Error!
send 563 bytes to tls/[202.202.202.202]:46595 at 23:59:56.773338:
   ------------------------------------------------------------------------
   SIP/2.0 488 Not Acceptable Here
   Via: SIP/2.0/TLS 
172.17.254.5:46595;branch=z9hG4bK.~uiob3qVr;rport=46595;received=202.202.202.202
   From: <sip:address@hidden>;tag=xf4Iqg~
   To: "+111111" <sip:address@hidden>;tag=9FF3pyeZQFrBg
   Call-ID: 0de0e1db-6cb9-1235-48b9-6cae8b3b6e92
   CSeq: 111 INVITE
   User-Agent: FreeSWITCH-mod_sofia/1.6.13-21-e755b43~64bit
   Accept: application/sdp
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE
   Supported: timer, path, replaces
   Content-Length: 0

   ------------------------------------------------------------------------


Please help.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]