Hello , 
i have trouble  about selection transport protocol. i have tried so many thing but couldnt find TM selected which IPv? and protocol type (TCP or UDP)


For example;
i have 2 interface ipv6 and ipv4.  i will route my message (INVITE-Register etc.) another node  that use TCP and IPV6 , domain name is test1.test. TM module or some module resolve this domain to IPV6:UDP  but i want to sent it over IPV6:TCP socket.  so i cannot know which protocol is resolved and cannot route the right socket. 

$du variable show only sip:ali@test1.test 

Conclusion : There isn't any pseudo value about which destination of IP version  will use.


Thanks 


Flow:

UAC (IPv4:UDP) ----------> Kamailio (MultiHomed)  ---->  (TCP:IPv6)Kamailio

----
Kamailo (multiHomed ) cfg
------
auto_bind_ipv6=1
dns_try_ipv6=yes
dns_retr_time=1
dns_retr_no=1
dns_cache_flags=4
mhomed=1
fork=yes
tcp_source_ipv6 = [fd61:c23c:b3b6::5]
listen=tcp:[fd61:c23c:b3b2::5]:5060
listen=udp:[fd61:c23c:b3b2::5]:5060
listen=udp:192.168.1.107:5060
listen=tcp:192.168.1.107:5060


route []{

  if($dP=="TCP"){
    xlog("L_INFO","[route] [TCP] 1\n");
    if (!t_relay_to_tcp()) {
      xlog("L_ERR", "Error t_relay  [route] \n");
      t_reply("500","Server - ERROR ");
      exit;
    }
  } else if($dP=="TCP"){
    xlog("L_INFO","[route] [TCP] 2\n");
    if (!t_relay_to_tcp()) {
      xlog("L_ERR", "Error t_relay  [route] \n");
      t_reply("500","Server - ERROR ");
      exit;
    }
  }else if($dP=="UDP"){
    xlog("L_INFO","[route] [UDP] 1\n");
    if (!t_relay_to_udp()) {
      xlog("L_ERR", "Error t_relay  [route] \n");
      t_reply("500","Server - ERROR ");
      exit;
    }
  }else{
    xlog("L_INFO","[route] [??] 1\n");
    if (!t_relay()) {
      xlog("L_ERR", "Error t_relay  [route] \n");
      t_reply("500","Server - ERROR ");
      exit;
    }
  }
}