SIP IPv6 Support

From Yate Documentation
Jump to: navigation, search

Contents

Description

This page describes IPv6 support in the SIP channel.

IPv6 address usage

When an IPv6 address is specified in a SIP URI it must be enclosed in square brackets.
regexroute.conf example:

[default]
^1$=sip/sip:1@[2a00::1:2]

The URI parser will fail if the address is not enclosed in square brackets.
E.g. sip/sip:1@2a00::1:2 will be parsed as host='2a00' and port=':1:2'.

When an IPv6 address is set in configuration followed by a port it must be enclosed in square brackets. It is not mandatory to put the square brackets when the port is missing.
accfile.conf example:

[1]
protocol=sip
username=1
registrar=[2a00::1:2]:9000

[2]
protocol=sip
username=2
registrar=2a00::1:2

When an IPv6 address is used to bind to a local interface an interface name can be added after the address.
The interface name is required for Link Local addresses (fe80::/10). For these addresses bind will fail if no interface is specified or the address is not assigned to the specified interface.
ysipchan.conf example:

[general]
tcp_out_rtp_localip=fe80::1:2%eth0

[listener udp6]
type=udp
addr=::1%lo

IPv6 support enable

The global parameter ipv6_support controls how the addresses are used.
If enabled the module will first try IPv6 addresses then IPv4.
If disabled the module will always try to bind or connect to IPv4 addresses.
ysipchan.conf:

[general]
; ipv6_support: boolean: Enable or disable IPv6 support
; This parameter is applied on reload for new connections or listeners
; This parameter is ignored if yate was not built with IPv6 support
; Defaults to no
;ipv6_support=no

Listeners

The ipv6 parameter of the listeners controls the listen address family.
The parameter is present because the user is required to clearly state what type of listener it should be created (detecting the address family is not enough: a local host name may set in bind address).
If global IPv6 support is not enabled the listener won't start.
Example:

[listener udp6]
type=udp
addr=2c00::1:2
ipv6=yes

Calls

IPv6 addresses are handled in SIP URIs.
regexroute.conf example:

[default]
^1$=sip/sip:1@[2a00::1:2]

Generate SIP messages

SIP messages can be generated to IPv6 addresses by setting the ip_transport_remoteip or host parameters to an IPv6 address.

Line registration

Lines can be registered to an IPv6 registrar by setting an IPv6 address or domain name.

NOTES

  • The local and remote address family must always be the same. E.g. trying to send a message from a local IPv4 address to a remote IPv6 address (or IPv6 to IPv4) will fail.

Wrong configuration example:
ysipchan.conf:

[listener udp4]
type=udp
addr=10.0.0.1

regexroute.conf:

[default]
^1$=sip/sip:1@[2a00::1:2];oconnection_id=udp4

References

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers