<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 02/12/2016 03:40, Colin Morelli
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPtU-UqrmBRuxZXNH7mBHkoSmB=+yynWz9-9Ke=Qz21Jz-EnBw@mail.gmail.com"
      type="cite">
      <div style="white-space:pre-wrap">Hey all,

Sorry for two questions out at the same time!

I'm using kamailio in front of FS, and I'm about to enable IPv6, but I have a question that I'm not entirely clear on.

What's the proper way to forward traffic using the same interface that it came in on? Specifically, if a client connects to kamailio on IPv6, it should connect to FS on IPv6, so that FS knows to advertise its v6 address in the SDP. The same should be true for v4.

Is this possible?
</div>
    </blockquote>
    Kamailio tries to use the socket where the request was received for
    sending out as well. So it should just work in most of the case.<br>
    <br>
    Anyhow, you can test the address family for received request:<br>
    <br>
    if(af==INET6) {<br>
      # force an ipv6 socket<br>
      # set $du to an ipv6 address<br>
    } else {<br>
      # force an ipv4 socket<br>
      # set $du to an ipv4 address<br>
    }<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>