Hi,

I am using Kamailio v4.4.2 revision 892ad6 on Debian wheezy 32bit platform.

The machine has public IPv6 and IPv4 addresses and Kamailio is listening on both of them.

The problem is that kamailio pseudo variables such as $si, $du, $ct etc. when contain an IPv6 address, they are not enclosed in square brackets i.e. "[" and "]". Which creates many problems in writing route script (kamailio.cfg) and I have to manually check for IPv6 address and if matched add these square brackets.

For example,

$si returns 2A01:X35:2X71:X02:490X:DDF:61X5:B5X1 but it should return [2A01:X35:2X71:X02:490X:DDF:61X5:B5X1] instead.

similarly,

$du returns sip:2A01:X35:2X71:X02:490X:DDF:61X5:B5X1:35670;transport=ws which fails and gives this error,

ERROR: tm [ut.h:254]: uri2dst2(): ERROR: uri2dst: bad_uri: sip:2A01:X35:2X71:X02:490X:DDF:61X5:B5X1:35670;transport=ws

it should instead return,
sip:[2A01:X35:2X71:X02:490X:DDF:61X5:B5X1]:35670;transport=ws

and so on.

Can we have these brackets for IPv6 addresses everywhere by default? This will make script writer's life a lot easier.

Thank you.