Hi,

I have identified the problem now. The IMS server use two ports, one for 
service and answer (5081 in my case) and that what is used for REGISTER and 
INVITE and works like a charm. The other port (5082) is used for request 
initiated by the server. The OPTIONS sent will not be answered on 5081 but send 
as new OPTIONS to us from port 5082. But since the NAT will discard it for not 
being 5081 we never get the message.

I now see in Wireshark that The 200 OK on register contains a "Service-Route" 
of:
"Service-Route: <sip:IMSSERVERIP:5081;lr>,<sip:orig@ IMSSERVERIP:5082;lr>"

I do not know what this param is for but it do contain the port 5082 so what I 
wonder is if this should be used by SOFIA-SIP in any way.

My idea is that the keep-alive (outbound stuff) should send OPTIONS to 5081 but 
also send empty ("\r\n\r\n") to 5082 to make the NAT happy. What do you think? 
Your input is very valuable.

Regards,
Bengt Werstén

-----Original Message-----
From: Pekka Pessi [mailto:ppe...@gmail.com] 
Sent: Thursday, February 12, 2009 2:46 PM
To: Bengt Werstén
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: Re: [Sofia-sip-devel] NAT keep-alive

2009/2/11 Bengt Werstén <bengt.wers...@enea.com>:
> I have a problem with NAT usage. First I thought I needed STUN but the rport
> thing did it so much better and now it works fine doing a register. The
> connect fields looks perfect but the problem now is that the keep-alive
> mechanism does not work.

The first OPTIONS is used to check that there is nothing fishy with
NAT and SIP server. Unfortunately, it looks like there is something
fishy here.

> As I understand it Sofia-SIP send OPTIONS to itself to keep the NAT happy.
> The problem is that both SIP (IMS actually) servers I have tested with reply
> using a different source port as the sent to. I try to illustrate where is
> goes wrong:
>
> Sofia SIP (from port X to port 5800) -> REGISTER -> NAT (from port Y to port
> 5800) -> Server // Fine so far
>
> ... Authentication and things
>
> Server (from port 5800 to port Y) -> 200 OK -> NAT (from port 5800 to port
> X) -> Server // Fine so far
>
> Sofia SIP (from port X to port 5800) -> OPTIONS -> NAT (from port Y to port
> 5800) -> Server // Fine so far
>
> Server (from port 5801 to port Y) -> 200 OK -> NAT (5801 is not 5800 so NAT
> throws this away)

> After a while Sofia-SIP prints:
>
> outbound(015D0100): FAILED to validate <sip:ROUTERIP:Y;transport=udp>
> outbound(015D0100): FAILED with 408 Request Timeout

> It there any workaround for this? I cannot change the NAT or SIP Server
> behaviors. I really like it to work independent of SIP server assuming that
> it supports rport.

Assuming that you turn off the contact validation (AFAIK add
"no-validate" to NUTAG_OUTBOUND()), can you get back responses from
any other SIP requests but REGISTER? If yes, perhaps fiddling with
OPTIONS would help, if no, you probably want to get better IMS...

-- 
Pekka.Pessi mail at nokia.com

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to