[SR-Users] Received ipv6 problem

Ahmed Marsou amarsou1988 at gmail.com
Wed Jun 3 01:44:46 CEST 2020


Hi;
I'm using the received parameter to send a MESSAGE to unregsiter the first
user that is registered to register the second one.
Using:
*modparam("usrloc", "received_column"*

*modparam("registrar|nathelper", "received_avp",*

and when I do a:
select received from location;
as you can see is null.
+----------+
| received |
+----------+
| NULL     |
+----------+

In IPV4 is working fine, but in IPV6 is not. Can you tell me how can I get
this value?
Im going crazy with that.

                reg_fetch_contacts("location", "$fu", "existingContact");
                if( $(ulc(existingContact=>user_agent)[0]) =~ "SPI/v"){
                        $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*)[0]);
                                $var(ruri) = $(var(address){s.substr,4,0});
                                #Send a SIP Request signalling the problem
and its reason on the body
                                $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();
                                drop;
                                }
                        }


Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/289695f2/attachment.html>


More information about the sr-users mailing list