<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font size="-1">Works!</font></p>
<p><font size="-1">I can access location data presents only in the
memory. Now, next step is using $(ulc(contacto=>socket)) to
decide which Kamailio have to process the call.</font></p>
<p><font size="-1">Thank you</font><br>
</p>
<pre class="moz-signature" cols="72">---
I'm SoCIaL, MayBe</pre>
<div class="moz-cite-prefix">El 30/07/2021 a las 11:51 a. m.,
Henning Westerholt escribió:<br>
</div>
<blockquote type="cite"
cite="mid:PAXPR05MB855839B7F571A2F962A6F405C5EC9@PAXPR05MB8558.eurprd05.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:Consolas;}span.E-MailFormatvorlage22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">just quickly looked in the registrar code, it
uses the standard usrloc functions to get data from memory
or database.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Maybe just give it a try, I think it should
work also in in-memory/dmq mode.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-GB"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b>
sr-users <a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a>
<b>On Behalf Of </b>Social Boh<br>
<b>Sent:</b> Friday, July 30, 2021 6:42 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
<b>Subject:</b> Re: [SR-Users] Access via script to
location data in the memory<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<p style="margin-left:35.4pt"><span style="font-size:10.0pt">Hello,</span><o:p></o:p></p>
<p style="margin-left:35.4pt"><span style="font-size:10.0pt">reg_fetch_contacts
use a table (I understood) to looking for data about a user.
</span><o:p></o:p></p>
<p style="margin-left:35.4pt"><span style="font-size:10.0pt">I'm
using USRLOC module without database.</span><o:p></o:p></p>
<p style="margin-left:35.4pt"><span style="font-size:10.0pt">Regards</span><o:p></o:p></p>
<p style="margin-left:35.4pt"><o:p> </o:p></p>
<pre style="margin-left:35.4pt">---<o:p></o:p></pre>
<pre style="margin-left:35.4pt">I'm SoCIaL, MayBe<o:p></o:p></pre>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">El 30/07/2021
a las 11:18 a. m., Henning Westerholt escribió:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US">Hello,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB">have you
looked to the reg_fetch_contact as already pointed out?
Then you can access e.g. the socket with the $ulc PV, see
the end of the registrar docs for an example.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Cheers,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Henning</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB">--
</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Henning
Westerholt –
</span><span style="mso-fareast-language:EN-US"><a
href="https://skalatan.de/blog/"
moz-do-not-send="true"><span style="color:#0563C1"
lang="EN-GB">https://skalatan.de/blog/</span></a></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Kamailio
services –
</span><span style="mso-fareast-language:EN-US"><a
href="https://gilawa.com/" moz-do-not-send="true"><span
style="color:#0563C1" lang="EN-GB">https://gilawa.com</span></a>
</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:EN-US" lang="EN-GB"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:70.8pt"><b>From:</b>
sr-users <a
href="mailto:sr-users-bounces@lists.kamailio.org"
moz-do-not-send="true">
<sr-users-bounces@lists.kamailio.org></a> <b>On
Behalf Of </b>Social Boh<br>
<b>Sent:</b> Friday, July 30, 2021 6:11 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <a
href="mailto:sr-users@lists.kamailio.org"
moz-do-not-send="true">
<sr-users@lists.kamailio.org></a><br>
<b>Subject:</b> Re: [SR-Users] Access via script to
location data in the memory<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:70.8pt"> <o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">Hello,</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">maybe
is better I explain what I'd like to achieve:</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">I
have two Kamailio using DMQ and DMQ_USRLOC modules so each
REGISTER is replicate on each Kamailio. I'm using DNS
weight to distribute the REGISTERs between the 2
Kamailios.</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">The
only difference I have seen in the location data, with
<b>kamctl ul show</b> command, is the Kamailio receives
REGISTER have socket parameter with transport, ip, y port
like udp:1.2.3.4:5060 where 1.2.3.4 is Kamailio public IP;
the other Kamailio have this field empty.</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">When
a call arrive to one Kamailio, querying the Socket field I
can known if I have to send the INVITE locally or forward
the INVITE to second Kamailio.</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">I
don't know if there is other way to achieve this goal.
</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">I
think PATH protocol not apply here because If I reply the
REGISTER to the second Kamailio adding path header, I
don't need DMQ_USRLOC.</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">The
idea is to take advantage of using these DMQ related
modules.</span><o:p></o:p></p>
<p style="margin-left:70.8pt"><span style="font-size:10.0pt">Regards</span><o:p></o:p></p>
<pre style="margin-left:70.8pt">---<o:p></o:p></pre>
<pre style="margin-left:70.8pt">I'm SoCIaL, MayBe<o:p></o:p></pre>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">El
29/07/2021 a las 5:16 p. m., Henning Westerholt escribió:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre style="margin-left:70.8pt">Hello,<o:p></o:p></pre>
<pre style="margin-left:70.8pt"> <o:p></o:p></pre>
<pre style="margin-left:70.8pt">There are different functions in the registrar module, check them out: <a href="https://kamailio.org/docs/modules/devel/modules/registrar.html#idm576" moz-do-not-send="true">https://kamailio.org/docs/modules/devel/modules/registrar.html#idm576</a><o:p></o:p></pre>
<pre style="margin-left:70.8pt"> <o:p></o:p></pre>
<pre style="margin-left:70.8pt">reg_fetch_contacts(..) might be something you could use.<o:p></o:p></pre>
<pre style="margin-left:70.8pt"> <o:p></o:p></pre>
<pre style="margin-left:70.8pt">Cheers,<o:p></o:p></pre>
<pre style="margin-left:70.8pt"> <o:p></o:p></pre>
<pre style="margin-left:70.8pt">Henning<o:p></o:p></pre>
<pre style="margin-left:70.8pt"> <o:p></o:p></pre>
</blockquote>
</blockquote>
</div>
</blockquote>
</body>
</html>