Subject: [dispatch] RFC 5626 and double Record-Route

From: Iñaki Baz Castillo <[email-masked]>
Date: Sun, 23 Oct 2011 14:13:12 +0200

Hi, when SIP natted clients (implementing Outbound) connect to a proxy
which also acts as registrar (so a single server with Outbound
support), usage of double Record-Route is a MUST in order to allow
dialogs between two SIP natted clients. So if for example Alice and
Bob are two SIP UDP clients behind NAT and use Proxy as
proxy/registrar, when Alice calls Bob:

- Proxy detects Outbound request in Alice's INVITE so adds a
Record-Route with token flow A (associated to Alice's public IP:port).

- Proxy gets Bob location (is natted and requested Outbund during registration).

- Proxy inserts a second Record-Route (on top) with token flow B
(associated to Bob public IP:port).

- Bob mirrors Record-Routes in the 200 response.

- When Alice sends the ACK it contains:
    Route: <sip:flow-token-A@Proxy>
    Route: <sip:flow-token-B@Proxy>

- Proxy inspects the *bottom* Route's token flow (B) so routes the ACK
to the IP:port associated to Bob (after removing both Route).

- When Bob sends a BYE it contains:
    Route: <sip:flow-token-B@Proxy>
    Route: <sip:flow-token-A@Proxy>

- Proxy inspects the *bottom* Route's token flow (A) so routes the BYE
to the IP:port associated to Alice (after removing both Route).

I've successfully implemented it, but IMHO this should be explained in
the RFC 5626 (somethere in the section "3.2. Single Registrar and
UA").

Regards.

-- 
Iñaki Baz Castillo
<[email-masked]>