From qq378806054 at hotmail.com Thu Mar 18 16:10:40 2021 From: qq378806054 at hotmail.com (J.H LIU) Date: Thu, 18 Mar 2021 15:10:40 +0000 Subject: [SR-Docs] =?gb2312?b?u9i4tDogIHJlZ19mZXRjaF9jb250YWN0cyBpcHY2?= =?gb2312?b?IHJlY2VpdmVkIHBhcmFtZXRlciBlbXB0eQ==?= In-Reply-To: References: Message-ID: How can I receive this letter ? ??? Windows 10 ????? ________________________________ ???: sr-docs ?? Ahmed Marsou ????: Saturday, May 23, 2020 9:43:25 AM ???: sr-docs at lists.kamailio.org ??: [SR-Docs] reg_fetch_contacts ipv6 received parameter empty Hi guys; Im using "REGISTRAR MODULE" to control the users login by device. if (af==INET6){ reg_fetch_contacts("location", "$fu", "existingContact"); xlog("L_INFO","****************$si******************************"); xlog("L_INFO","****************$(hdr(Call-ID){s.substr,0,4})******************************"); if ( $(ulc(existingContact=>user_agent)[0]) =~ "SPI/v") && ($(hdr(Call-ID){s.substr,0,4}) != "TTCN") { $var(oldDeviceId) = $(ulc(existingContact=>callid)[0]{s.substr,9,0}); $var(newDeviceId) = $(hdr(Call-ID){s.substr,9,0}); if($var(oldDeviceId) != $var(newDeviceId) ){ xlog("L_INFO","New device id is different:warn previous user another user overide him"); $var(address) = $(ulc(existingContact=>received){s.substr,9,0}); $var(ruri) = $(var(address){s.substr,4,0}); #$var(ruri) = "[" + $var(address)+ "]" + ":" + $sp + ";" + "transport" + "=" + $proto; #Send a SIP Request signalling the problem and its reason on the body xlog("L_INFO","****************** $var(address)***************************"); $uac_req(method)="MESSAGE"; $uac_req(ruri) = "sip:"+ $au + "@" + $var(ruri); $uac_req(furi) = "sip:kamailio at sip_domain"; $uac_req(turi) = $fu; $uac_req(hdrs)="Max-Forwards: 70\r\nEvent: reg\r\nContent-Type: text/plain\r\nAccept-Contact:*;+g.ext.app.registration\r\n"; $uac_req(body)="Already registered with another device id"; uac_req_send(); } } 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'. Somthing is happening related to "[" "]". How can I solve this problem? Thank you. OS: Centos 7 KAMILIO: version: kamailio 4.4.7 (x86_64/linux) 35d8ab -------------- next part -------------- An HTML attachment was scrubbed... URL: