Hello;

i want to force message to send over TCP and IPv6 . so it should be R/W 
variable. When i set $fs or force_send_socket() it gives error about mismatch 
protocol !

Thanks.

Yasin CANER
________________________________
From: sr-users <sr-users-boun...@lists.kamailio.org> on behalf of YAS0 CANER 
<caner_y...@hotmail.com>
Sent: Friday, December 14, 2018 4:27 PM
To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] Problem with selection Transport Protocol - MultiHomed 
Problem

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:a...@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;
    }
  }
}
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to