Hello,
On 02/12/2016 03:40, Colin Morelli wrote:
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?
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.
Anyhow, you can test the address family for received request:
if(af==INET6) {
# force an ipv6 socket
# set $du to an ipv6 address
} else {
# force an ipv4 socket
# set $du to an ipv4 address
}
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 -
www.kamailioworld.com