On 21 January 2012 23:19, Reda Aouad <
reda.aouad@gmail.com> wrote:
> After endless tests, I tried to replace record_route_preset with insert_hf,
> writing the complete record route headers. A light started to come out of
> the tunnel.....
>
> Suppose User A is registered to port 53, User B to port 5060.
>
> In the case of double record route, when A sends an INVITE to B, I write the
> following in the SIP header of the INVITE forwarded to B :
> Record-Route: <sip:public_ip:5060;r2=on;lr=on>
> Record-Route: <sip:public_ip:53;r2=on;lr=on>
>
> The first transaction, INVITE / 200OK goes well, with Kamailio forwarding
> packets correctly from the corresponding socket of each user.
>
> The problem arises when User B sends BYE to the 5060 port, with both route
> headers in the SIP header of the BYE. I get the following error :
> WARNING: rr [loose.c:747]: no socket found for match second RR
>
> after which Kamailio forwards the BYE from the 5060 socket to User A. User A
> being registered on port 53, ignores the packet coming with source port
> 5060. The BYE is never replied to.
>
> I guess that means that Kamailio is not able to find the private_ip:53
> socket from the public_ip:53 record-route header.
> I hope it was clear.
One way to get around this is to populate the RR with a hostname