<div dir="ltr">Hi guys;<div>Im using "REGISTRAR MODULE" to control the users login by device. </div><div>        </div><div>if (af==INET6){<br>            reg_fetch_contacts("location", "$fu", "existingContact");<br>            xlog("L_INFO","****************$si******************************");<br>            xlog("L_INFO","****************$(hdr(Call-ID){s.substr,0,4})******************************");<br>            if ( $(ulc(existingContact=>user_agent)[0]) =~ "SPI/v") && ($(hdr(Call-ID){s.substr,0,4}) != "TTCN") {<br>                    $var(oldDeviceId) = $(ulc(existingContact=>callid)[0]{s.substr,9,0});<br>                    $var(newDeviceId) = $(hdr(Call-ID){s.substr,9,0});<br>                    if($var(oldDeviceId) !=  $var(newDeviceId) ){<br>                            xlog("L_INFO","New device id is different:warn previous user another user overide him");<br>                            $var(address) = $(ulc(existingContact=>received){s.substr,9,0});<br>                            $var(ruri) = $(var(address){s.substr,4,0});<br>                         #$var(ruri) = "[" + $var(address)+ "]" + ":" + $sp + ";" + "transport" + "=" + $proto;<br>                         #Send a SIP Request signalling the problem and its reason on the body<br>                            xlog("L_INFO","****************** $var(address)***************************");<br>                            $uac_req(method)="MESSAGE";<br>                            $uac_req(ruri) = "sip:"+ $au + "@" + $var(ruri);<br>                            $uac_req(furi) = "sip:kamailio@sip_domain";<br>                            $uac_req(turi) = $fu;<br>                            $uac_req(hdrs)="Max-Forwards: 70\r\nEvent: reg\r\nContent-Type: text/plain\r\nAccept-Contact:*;+g.ext.app.registration\r\n";<br>                            $uac_req(body)="Already registered with another device id";<br>                            uac_req_send();<br>                        }<br>            }<br></div><div>So as you can see Im trynig to get the variable 

$var(address) from  reg_fetch_contacts but is working for ipv4 unfortunatly not for ipv6. For ipv6 it give me '0'.</div><div>Somthing is happening related to "[" "]". </div><div>How can I solve this problem?</div><div>Thank you.</div><div><br></div><div>OS: Centos 7</div><div>KAMILIO: version: kamailio 4.4.7 (x86_64/linux) 35d8ab</div><br></div>