**** MS Teams sends initial RTP/SAVP invite with a=crypto parameter for AES_CM_128_HMAC_SHA_80 ==================== tag: rcv pid: 16314 process: 49 time: 1646290002.141628 date: Thu Mar 3 17:46:42 2022 proto: tls ipv4 srcip: 52.114.16.74 srcport: 1154 dstip: kamailio_vip dstport: 5061 ~~~~~~~~~~~~~~~~~~~~ INVITE sip:+61XXXX@cust.teams-fqdn:5061;user=phone;transport=tls SIP/2.0^M FROM: "Rhys Hanrahan";tag=a1ec700dcf3d4ae292c3d896f281cee0^M TO: ^M CSEQ: 1 INVITE^M CALL-ID: 359cc414e67f55d48d27dfebaaa334c1^M MAX-FORWARDS: 70^M VIA: SIP/2.0/TLS 52.114.16.74:5061;branch=z9hG4bK1db396a9^M RECORD-ROUTE: ^M CONTACT: ^M CONTENT-LENGTH: 1096^M MIN-SE: 300^M SUPPORTED: timer^M USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2022.2.21.3 i.AUEA.0^M CONTENT-TYPE: application/sdp^M ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY^M SESSION-EXPIRES: 3600^M ^M v=0^M o=- 57931 0 IN IP4 127.0.0.1^M s=session^M c=IN IP4 52.113.76.53^M b=CT:10000000^M t=0 0^M m=audio 51398 RTP/SAVP 104 9 103 111 18 0 8 97 101 13 118^M c=IN IP4 52.113.76.53^M a=rtcp:51399^M a=ice-ufrag:C8ss^M a=ice-pwd:2bV9D6GcXF5f8m0px/wufQD/^M a=rtcp-mux^M a=candidate:1 1 UDP 2130706431 52.113.76.53 51398 typ srflx raddr 10.0.32.179 rport 51398^M a=candidate:1 2 UDP 2130705918 52.113.76.53 51399 typ srflx raddr 10.0.32.179 rport 51399^M a=candidate:2 1 tcp-act 2121006078 52.113.76.53 49152 typ srflx raddr 10.0.32.179 rport 49152^M a=candidate:2 2 tcp-act 2121006078 52.113.76.53 49152 typ srflx raddr 10.0.32.179 rport 49152^M a=label:main-audio^M a=mid:1^M a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:geUHLB1mshmnI5hN83bnO57Hbdm2i7dD14sDAnpA|2^31^M a=sendrecv^M a=rtpmap:104 SILK/16000^M a=rtpmap:9 G722/8000^M a=rtpmap:103 SILK/8000^M a=rtpmap:111 SIREN/16000^M a=fmtp:111 bitrate=16000^M a=rtpmap:18 G729/8000^M a=fmtp:18 annexb=no^M a=rtpmap:0 PCMU/8000^M a=rtpmap:8 PCMA/8000^M a=rtpmap:97 RED/8000^M a=rtpmap:101 telephone-event/8000^M a=fmtp:101 0-16^M a=rtpmap:13 CN/8000^M a=rtpmap:118 CN/16000^M a=ptime:20^M |||||||||||||||||||| **** We forward the invite as RTP/AVP and get back from the PBX a 183 Session Progress: ==================== tag: rcv pid: 16272 process: 11 time: 1646290004.590580 date: Thu Mar 3 17:46:44 2022 proto: udp ipv4 srcip: asterisk_pbx srcport: 5060 dstip: kamailio_vip dstport: 5060 ~~~~~~~~~~~~~~~~~~~~ SIP/2.0 183 Session Progress^M Via: SIP/2.0/UDP kamailio_vip;rport=5060;received=kamailio_vip;branch=z9hG4bK269a.8fe1338ba39497f70d087ea4b68c1e70.0;i=8^M Via: SIP/2.0/TLS 52.114.16.74:5061;rport=1154;branch=z9hG4bK1db396a9^M Record-Route: ^M Record-Route: ^M Record-Route: ^M Call-ID: 359cc414e67f55d48d27dfebaaa334c1^M From: "Rhys Hanrahan" ;tag=a1ec700dcf3d4ae292c3d896f281cee0^M To: ;tag=647ccc49-0f82-405c-9df1-0aaa477a6c0a^M CSeq: 1 INVITE^M Server: NexusOne VocalPoint^M Contact: ^M Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M Content-Type: application/sdp^M Content-Length: 379^M ^M v=0^M o=- 57931 2 IN IP4 asterisk_pbx^M s=NexusOne^M c=IN IP4 asterisk_pbx^M t=0 0^M m=audio 24706 RTP/AVP 9 8 0 101^M a=rtpmap:9 G722/8000^M a=rtpmap:8 PCMA/8000^M a=rtpmap:0 PCMU/8000^M a=rtpmap:101 telephone-event/8000^M a=fmtp:101 0-16^M a=ptime:20^M a=maxptime:150^M a=sendrecv^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M |||||||||||||||||||| **** We send the 183 Session Progress to MS Teams as RTP/SAVP as intended. No a=crypto parameter, but I don't think there is meant to be. ==================== tag: snd pid: 16273 process: 12 time: 1646290004.613196 date: Thu Mar 3 17:46:44 2022 proto: tls ipv4 srcip: kamailio_vip srcport: 5061 dstip: 52.114.16.74 dstport: 1154 ~~~~~~~~~~~~~~~~~~~~ SIP/2.0 183 Session Progress^M Via: SIP/2.0/TLS 52.114.16.74:5061;rport=1154;branch=z9hG4bK1db396a9^M Record-Route: ^M Record-Route: ^M Record-Route: ^M Call-ID: 359cc414e67f55d48d27dfebaaa334c1^M From: "Rhys Hanrahan" ;tag=a1ec700dcf3d4ae292c3d896f281cee0^M To: ;tag=647ccc49-0f82-405c-9df1-0aaa477a6c0a^M CSeq: 1 INVITE^M Server: NexusOne VocalPoint^M Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M Contact: ^M Content-Type: application/sdp^M Content-Length: 403^M ^M v=0^M o=- 57931 2 IN IP4 kamailio_local^M s=NexusOne^M c=IN IP4 kamailio_local^M t=0 0^M m=audio 37820 RTP/SAVP 9 8 0 101^M a=maxptime:150^M a=mid:1^M a=rtpmap:9 G722/8000^M a=rtpmap:8 PCMA/8000^M a=rtpmap:0 PCMU/8000^M a=rtpmap:101 telephone-event/8000^M a=fmtp:101 0-16^M a=sendrecv^M a=rtcp:37821^M a=ptime:20^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M |||||||||||||||||||| **** We get an OK response as RTP/AVP from the Asterisk PBX: ==================== tag: rcv pid: 16277 process: 16 time: 1646290007.354565 date: Thu Mar 3 17:46:47 2022 proto: udp ipv4 srcip: asterisk_pbx srcport: 5060 dstip: kamailio_vip dstport: 5060 ~~~~~~~~~~~~~~~~~~~~ SIP/2.0 200 OK^M Via: SIP/2.0/UDP kamailio_vip;rport=5060;received=kamailio_vip;branch=z9hG4bK269a.8fe1338ba39497f70d087ea4b68c1e70.0;i=8^M Via: SIP/2.0/TLS 52.114.16.74:5061;rport=1154;branch=z9hG4bK1db396a9^M Record-Route: ^M Record-Route: ^M Record-Route: ^M Call-ID: 359cc414e67f55d48d27dfebaaa334c1^M From: "Rhys Hanrahan" ;tag=a1ec700dcf3d4ae292c3d896f281cee0^M To: ;tag=647ccc49-0f82-405c-9df1-0aaa477a6c0a^M CSeq: 1 INVITE^M Server: NexusOne VocalPoint^M Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M Contact: ^M Supported: 100rel, timer, replaces, norefersub^M Session-Expires: 3600;refresher=uac^M Require: timer^M Content-Type: application/sdp^M Content-Length: 379^M ^M v=0^M o=- 57931 2 IN IP4 asterisk_pbx^M s=NexusOne^M c=IN IP4 asterisk_pbx^M t=0 0^M m=audio 24706 RTP/AVP 9 8 0 101^M a=rtpmap:9 G722/8000^M a=rtpmap:8 PCMA/8000^M a=rtpmap:0 PCMU/8000^M a=rtpmap:101 telephone-event/8000^M a=fmtp:101 0-16^M a=ptime:20^M a=maxptime:150^M a=sendrecv^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M |||||||||||||||||||| **** We send the SDP OK response to MS Teams with RTP/SAVP but there is no a=crypto parameter in the OK which as per the attach diagram, there should be in response to the initial invite. ==================== tag: snd pid: 16277 process: 16 time: 1646290007.360803 date: Thu Mar 3 17:46:47 2022 proto: tls ipv4 srcip: kamailio_vip srcport: 5061 dstip: 52.114.16.74 dstport: 1154 ~~~~~~~~~~~~~~~~~~~~ SIP/2.0 200 OK^M Via: SIP/2.0/TLS 52.114.16.74:5061;rport=1154;branch=z9hG4bK1db396a9^M Record-Route: ^M Record-Route: ^M Record-Route: ^M Call-ID: 359cc414e67f55d48d27dfebaaa334c1^M From: "Rhys Hanrahan" ;tag=a1ec700dcf3d4ae292c3d896f281cee0^M To: ;tag=647ccc49-0f82-405c-9df1-0aaa477a6c0a^M CSeq: 1 INVITE^M Server: NexusOne VocalPoint^M Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M Contact: ^M Supported: 100rel, timer, replaces, norefersub^M Session-Expires: 3600;refresher=uac^M Require: timer^M Content-Type: application/sdp^M Content-Length: 403^M ^M v=0^M o=- 57931 2 IN IP4 kamailio_local^M s=NexusOne^M c=IN IP4 kamailio_local^M t=0 0^M m=audio 37820 RTP/SAVP 9 8 0 101^M a=maxptime:150^M a=mid:1^M a=rtpmap:9 G722/8000^M a=rtpmap:8 PCMA/8000^M a=rtpmap:0 PCMU/8000^M a=rtpmap:101 telephone-event/8000^M a=fmtp:101 0-16^M a=sendrecv^M a=rtcp:37821^M a=ptime:20^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M m=audio 0 RTP/AVP 104 9 103 111 18 0 8 97 101 13 118^M |||||||||||||||||||| **** We get an ACK from MS Teams of the SDP OK packet: ==================== tag: rcv pid: 16315 process: 50 time: 1646290007.411543 date: Thu Mar 3 17:46:47 2022 proto: tls ipv4 srcip: 52.114.16.74 srcport: 1155 dstip: kamailio_vip dstport: 5061 ~~~~~~~~~~~~~~~~~~~~ ACK sip:asterisk_pbx:5060 SIP/2.0^M FROM: "Rhys Hanrahan";tag=a1ec700dcf3d4ae292c3d896f281cee0^M TO: ;tag=647ccc49-0f82-405c-9df1-0aaa477a6c0a^M CSEQ: 1 ACK^M CALL-ID: 359cc414e67f55d48d27dfebaaa334c1^M MAX-FORWARDS: 70^M VIA: SIP/2.0/TLS 52.114.16.74:5061;branch=z9hG4bKafa01473^M ROUTE: ,^M CONTACT: ^M CONTENT-LENGTH: 0^M USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2022.2.21.3 i.AUEA.0^M ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY^M ^M |||||||||||||||||||| ==================== **** MS Teams sends BYE to Kamailio. Says unable to negotiate: ==================== tag: rcv pid: 16316 process: 51 time: 1646290007.437455 date: Thu Mar 3 17:46:47 2022 proto: tls ipv4 srcip: 52.114.16.74 srcport: 1156 dstip: kamailio_vip dstport: 5061 ~~~~~~~~~~~~~~~~~~~~ BYE sip:asterisk_pbx:5060 SIP/2.0^M FROM: "Rhys Hanrahan";tag=a1ec700dcf3d4ae292c3d896f281cee0^M TO: ;tag=647ccc49-0f82-405c-9df1-0aaa477a6c0a^M CSEQ: 2 BYE^M CALL-ID: 359cc414e67f55d48d27dfebaaa334c1^M MAX-FORWARDS: 70^M VIA: SIP/2.0/TLS 52.114.16.74:5061;branch=z9hG4bKe0101cc7^M REASON: Q.850;cause=79;text="1db96a9d-0603-48ee-ab04-5967e9ff375a;InternalDiagCode: SrtpNegotiationFailed, InternalErrorPhrase: Cannot negotiate SRTP encryption with remote participant"^M ROUTE: ,^M CONTACT: ^M CONTENT-LENGTH: 0^M USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2022.2.21.3 i.AUEA.0^M ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY^M ^M ||||||||||||||||||||