2009/2/10 Johansson Olle E <o...@edvina.net>: >> alice --- (NAT A) --- ProxyA & RtpProxyA --- ProxyB & RtpProxyB --- >> (NAT B) --- bob >> >> In this case, when alice calls bob, ProxyA will apply RtpProxyA so the >> SDP will contain a public IP. >> Since ProxyB knows that bob is registered behind NAT, it will try to >> apply RtpProxyB but this will "fail" because the incoming SDP contains >> a line: >> a=nortpproxy:yes >> This line was added by ProxyA when applying RtpProxyA. >> When ProxyB executes "force_rtpproxy()" this function will not modify >> the SDP since that line is present. If not, there will be no audio >> because RtpProxyA would be waiting for audio from RtpProxyB and vice >> versa (lock condition). > > On the INVITE there's no need for ProxyB to allocate an rtpproxy, since > the SDP already has public IP - fixed by Proxy A.
No, that's not an excuse. RtpProxy must be applied in both the request and response. If a PSTN gateway calls a SIP user behind NAT, you must apply RtpProxy even if the incoming SDP has public address. >> >> >> ProxyB must be well configured, this means that since >> "force_rtpproxy()" didn't success on the incoming INVITE, it must no >> execute "force_rtpproxy()" on the 18X/2XX response from bob. For this, >> I use a bflag(RTPPROXY_SET) which only set to 1 if "force_rtpproxy()" >> succeded in the incoming INVITE, and only run "force_rtpproxy()" for >> responses from bob if that bflag is on. > > It should force RTPproxy on teh response from Bob, since Bob is > a local user and the SDP includes a private IP. Not again, please re-read my explanation above :) In the example of a PSTN gateway calling a natted SIP user, if the proxy only applies RtpProxy in the user response then you will get asymmetric audio: user (NAT) RtpProxy Gateway --------------------------(RTP)-------------------> <---------(RTP)---------- <---------(RTP)---------- So the RTP from the gateway will not arrive to the user since the NAT router will not allow it (there is not an existing UDP mapping to allow UDP traffic from the RtpProxy, but just from the Gateway address). So RtpProxy must be present in the request and response, then the NAT router mapping will work and allow incoming data from RtpProxy after the user sends RTP data to the RtpProxy. Am I wrong? -- Iñaki Baz Castillo <i...@aliax.net> _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users