Thank you Fred. This looks like exactly what I'm after. I appreciate your help.
________________________________
From: Fred Posner via sr-users <sr-users(a)lists.kamailio.org>
Sent: Thursday, September 19, 2024 2:53 PM
To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
Cc: Fred Posner <fred(a)qxork.com>
Subject: [SR-Users] Re: Accessing User-Agent from usrloc at runtime.
[EXTERNAL]
On Sep 19, 2024, at 2:45 PM, Kevin Kaczmarski <KKaczmarski(a)sorenson.com> wrote:
Thanks Fred. Is it true that $ua will only access the User-Agent value of the current
request? That will definitely work for me if the header is present in an initial INVITE,
however I'm considering the case where the header is only present in the REGISTER and
not in subsequent requests from the endpoint.
If I use SQLops I can just select from the location table, but I want to rely on DMQ more
than DB for usrloc.
There’s reg_fecth_contacts and associated $ulc values.
if (reg_fetch_contacts("location", "$ru", "whatever")){
xinfo("$cfg(route) - callee=>aor: $(ulc(whatever=>aor))\n");
xinfo("$cfg(route) - $rU is regged to server id
$(ulc(whatever=>server_id)[0]) \n");
xinfo("$cfg(route) - $rU regged with ua $(ulc(whatever=>user_agent)[0])
\n");
}
Regards,
Fred Posner
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: