[SR-Users] Problem with selection Transport Protocol - MultiHomed Problem

YAS0 CANER caner_yaso at hotmail.com
Sat Dec 15 15:35:59 CET 2018


Hello,
I removed SRV and NAPTR and no change. Kamailio tried to send over UDP:IPV6

In addition i realized that Register works well but it failed on INVITE.

I tried below and Middle Kamailio try to send over UDP:IPv6.

UAC IPV6:TCP----> Kamailio   ---> (TCP:IPV6) Kamailio

I think i can set it with rewritehostporttrans function but i dont know  address family. Because if i route it over  IPv6 it  should be TCP , on the other hand,  , it should be UDP over IPv4 . If i can know address family of sending , i can do rewritehostporttrans.

i think again , i can solve it that appending to R-URI ";transport=tcp" .
i will try.

Thanks.

________________________________
From: Daniel-Constantin Mierla <miconda at gmail.com>
Sent: Friday, December 14, 2018 5:08 PM
To: Kamailio (SER) - Users Mailing List; YAS0 CANER
Subject: Re: [SR-Users] Problem with selection Transport Protocol - MultiHomed Problem


Hello,


is there any naptr or srv dns record behind test1.test domain? Or just A/CNAME record?


Cheers,
Daniel


On 14.12.18 14:35, YAS0 CANER wrote:
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-bounces at lists.kamailio.org><mailto:sr-users-bounces at lists.kamailio.org> on behalf of YAS0 CANER <caner_yaso at hotmail.com><mailto:caner_yaso at 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:ali at 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 at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com<http://www.kamailioworld.com>
Kamailio Advanced Training -- www.asipto.com<http://www.asipto.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181215/0f8e9e9a/attachment.html>


More information about the sr-users mailing list