freeswitch / sofia-sip

Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification.
GNU Lesser General Public License v2.1
270 stars 175 forks source link

Freeswitch responds to inbound late-offer INVITE with RTP/AVP when rtp_secure_media = MANDATORY #230

Closed tomeeo closed 11 months ago

tomeeo commented 11 months ago

Freeswitch can respond to late-offer Invites when enable-3pcc=true. However, it will only respond with RTP/AVP ( non-secure ) SDP. We have <X-PRE-PROCESS cmd="set" data="rtp_secure_media=mandatory"/> set in vars.xml but we still get a 200OK response with RTP/AVP.

Here is inbound invite:

recv 746 bytes from tls/[x.y.z.q]:41549 at 15:58:52.949040:
------------------------------------------------------------------------
INVITE sip:test@x.y.z.q:5060;transport=tls SIP/2.0
Via: SIP/2.0/TLS x.y.z.q:5567;branch=z9hG4bK79b6.1a970c011ff40715727891c63261d300.0
Via: SIP/2.0/UDP x.y.z.q:5060;received=x.y.z.q;branch=z9hG4bK79b6.1153f75622019d94f74737739b30d08d.0
From: <sip:tester@a.b.c.d:13882>;tag=34744SIPpTag001
To: test <sip:test@x.y.z.q:5060>
Call-ID: 1-34744@10.2.193.27
CSeq: 1 INVITE
Max-Forwards: 68
Contact: <sip:btpsh-652ee274-2bfd-6@a.b.c.d>
Content-Length: 0

Here is 200 OK response from FS:

send 1238 bytes to tls/[x.y.z.q]:41549 at 15:58:52.949880:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/TLS x.y.z.q:5567;branch=z9hG4bK79b6.1a970c011ff40715727891c63261d300.0;rport=41549
Via: SIP/2.0/UDP x.y.z.q:5060;branch=z9hG4bK79b6.1153f75622019d94f74737739b30d08d.0
From: <sip:tester@a.b.c.d:13882>;tag=34744SIPpTag001
To: test <sip:test@x.y.z.q:5060>;tag=D49p805N7tHrc
Call-ID: 1-34744@10.2.193.27
CSeq: 1 INVITE
Contact: <sip:test@10.x.y.z:5568;transport=tls>
User-Agent: FreeSWITCH-mod_sofia/1.10.7-release+git~20211024T163933Z~883d2cb662~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 240

v=0
o=FreeSWITCH 1697626116 1697626117 IN IP4 10.x.y.z
s=FreeSWITCH
c=IN IP4 10.x.y.z
t=0 0
m=audio 18616 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
dragos-oancea commented 11 months ago

was there a resolution ?

tomeeo commented 11 months ago

@dragos-oancea no - just tracking this over here since seemed more appropriate