Hi all,
I have a problem with
routing BYE messages (when called UAC sends BYE) when connection between two
Kamailio (1.5.1 with identical configurations) proxies is done by TLS/TCP.
WORKING:
UAC#1 <-- UDP/TCP/TLS --> Proxy#1 <--UDP--> Proxy#2 <-- UDP/TCP/TLS
--> UAC#2
NOT WORKING:
UAC#1 <-- UDP/TCP/TLS --> Proxy#1 <-- TCP or TLS --> Proxy#2 <--
UDP/TCP/TLS --> UAC#2
By looking at ngrep
log I found out that when “UAC#1” sends INVITE, “Proxy#1” sends right “Contact”
header (Contact:<sip:bob@IP_ADDRESS_OF_UAC#1:6126;transport=udp>)
to “Proxy#2” , but “Proxy#2” sends wrong “Contact” header
(Contact:<sip:bob@IP_ADDRESS_OF_PROXY#1:39879;transport=udp>)
to “UAC#2”.
When UAC#2 sends BYE,
it is sends message with this wrong header and when it arrives on “Proxy#1” proxy
doesn’t sends BYE message to UAC#1. Or when UACs with TCP, this are “Proxy#1”
errors:
DBG:core:tcp_send: no
open tcp connection found, opening new one
ERROR:core:tcp_blocking_connect:
poll error: flags 18
ERROR:core:tcp_blocking_connect:
failed to retrieve SO_ERROR (111) Connection refused
ERROR:core:tcpconn_connect:
tcp_blocking_connect failed
ERROR:core:tcp_send:
connect failed
ERROR:tm:msg_send:
tcp_send failed
ERROR:tm:t_forward_nonack:
sending request failed
DBG:tm:t_relay_to:
t_forward_nonack returned error
What bothers me is
that when I call the other UAC, he can hangup the call (even when he is CALLED UAC),
then I restart both proxies and it is other way around.
I do not know if I
described problem clearly but I am lost in where to look next so any help would
be appreciated. Why proxy change Contact header when I switch from UDP to TCP
between proxies? I'm not rewriting Contact header and only thing that I change in
configuration when switching from UDP to TCP is this:
if($rd=="example.com")
{
t_relay("tcp: example.com:5063");
exit;
}
Thanks a lot
/dubravko