[SR-Users] Wrong Record-Route and Via header fields when TCP is used
miconda at gmail.com
Mon Jul 8 20:01:45 CEST 2019
when you look at the network traffic 9e.g., with ngrep, sngrep, ...)
what is shown as source address for outbound leg?
On 08.07.19 19:21, Leonid Fainshtein wrote:
> I just found Daniel's response to a similar question (ref.:
> "check the routing rules/table of the operating systems, there should be
> some differences between the two servers.
> If you mhomed=1 and an unexpected interface is used for routing out the
> traffic, it means that the operating system has internal routing rules that
> allow going from that interface to the target address."
> Don't see anything suspicious in my server routing table:
> default via 192.168.0.1 dev eno1 proto static
> 10.159.65.0/24 dev lxdbr0 proto kernel scope link src 10.159.65.1
> 18.104.22.168/24 dev eno1 proto kernel scope link src 22.214.171.124
> 192.168.0.0/20 dev eno1 proto kernel scope link src 192.168.0.31
> The request is received on the lxdbr0 interface (10.159.65.1) and sent
> out from the eno1 interface (192.168.0.31).
> I even tried to delete the default route but nothing helped. The
> request is sent out with 10.159.65.1 in the via and Record-Route
> Best regards,
> On Thu, Jul 4, 2019 at 6:20 PM Leonid Fainshtein
> <leonid.fainshtein at xorcom.com> wrote:
>> Kamailio server has two legs that are connected to different networks.
>> I'm using Kamailio v.5.2.3 and the "enable_double_rr" is implicitly set to "1".
>> The leg "A" IP address is 10.159.65.1
>> The leg "B" IP address is 192.168.0.31
>> The call is initiated from 10.159.65.18
>> According to the "rr" module documentation, function record_route()
>> should insert two "Record_Route" header fields when a request is
>> accepted on one leg is should go out via the second leg. This works as
>> expected in case of UDP protocol:
>> INVITE sip:2000 at 192.168.6.106:5460;transport=UDP SIP/2.0
>> Record-Route: <sip:192.168.0.31;r2=on;lr;did=e2c.a191>
>> Record-Route: <sip:10.159.65.1;r2=on;lr;did=e2c.a191>
>> Via: SIP/2.0/UDP
>> Via: SIP/2.0/UDP 10.159.65.18:5060;rport=5060;branch=z9hG4bK3a9e9a4d
>> But when the TCP protocol is used then the outbound message looks like this:
>> INVITE sip:2005 at 192.168.0.178:35058;transport=tcp SIP/2.0
>> Record-Route: <sip:10.159.65.1;transport=tcp;lr;did=bb6.7dc1>
>> Via: SIP/2.0/TCP
>> Via: SIP/2.0/TCP 10.159.65.18:5060;rport=58616;branch=z9hG4bK1469331f
>> There are two problems there:
>> a) only one Record-Route with leg is inserted
>> b) the added "Via" header field contains the leg "A" IP address
>> instead of expected leg "B" IP address (192.168.0.31). In the LAN
>> trace I see that in reality the message was sent from leg "B".
>> Is it a bug?
>> Best regards,
>> Leonid Fainshtein
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
More information about the sr-users