Help with lookup() and save() for WebRTC traffic (dynamic instance ID issue)

Fernando Lopes via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <[email protected]>
Hello Everyone,

I'm having an issue with lookup() and save() when handling WebRTC traffic.
I need to send the SIP response back to my client, but this client uses an instance ID that isn’t fixed — it changes between browsers and sessions.

I’ve been trying to save the location using a custom URI, like this:
xlog("L_INFO", "Instance ID: $fn\n");
save("location", "0x00", "sip:[email protected]");

and for lookup I’m using a simple:
lookup("location");

but get this error:
lookup failed: Location lookup failed for user: 894aa72f-d7a3-437b-ac20-62b3943f7b5e

I’ve checked the module docs here but I’m still unclear on how the lookup process works internally or what’s missing in my configuration.:
https://kamailio.org/docs/modules/4.2.x/modules/registrar.html#registrar.f.lookup

Here are my my logs:

INFO: <script>: Instance ID: "bad2be9e-d9ff-41a8-8a19-5010acceb09d"

kamcmd ul.dump
{
        Domains: {
                Domain: {
                        Domain: location
                        Size: 1024
                        AoRs: {
                                Info: {
                                        AoR: "894aa72f-d7a3-437b-ac20-62b3943f7b5e"
                                        HashID: -680662917
                                        Contacts: {
                                                Contact: {
                                                        Address: sip:[email protected]
                                                        Expires: 480
                                                        Q: -1
                                                        Call-ID: fkjjsrvt84dkc6a33dsb
                                                        CSeq: 4
                                                        User-Agent: n/a
                                                        Received: sip:172.31.208.1:64941;transport=ws
                                                        Path: [not set]
                                                        State: CS_NEW
                                                        Flags: 0
                                                        CFlags: 0
                                                        Socket: udp:10.5.0.8:5060
                                                        Methods: -1
                                                        Ruid: uloc-68ed19b3-31-1
                                                        Instance: [not set]
                                                        Reg-Id: 0
                                                        Server-Id: 0
                                                        Tcpconn-Id: -1
                                                        Keepalive: 0
                                                        Last-Keepalive: 1760369199
                                                        KA-Roundtrip: 0
                                                        Last-Modified: 1760369199
                                                }
                                }
                        }
                        Stats: {
                                Records: 2
                                Max-Slots: 1
                        }
                }
        }
}
Any ideas on how to make lookup() find the right record or how to properly handle this dynamic instance ID scenario for WebRTC clients?

Thank you.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.