<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
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-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></span><span style="mso-fareast-language:EN-US">
<span lang="EN-GB"><o:p></o:p></span></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><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 <sr-users-bounces@lists.kamailio.org>
<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 <sr-users@lists.kamailio.org><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">maybe is better I explain what I'd like to achieve:</span><o:p></o:p></p>
<p style="margin-left:35.4pt"><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:35.4pt"><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:35.4pt"><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:35.4pt"><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:35.4pt"><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:35.4pt"><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:35.4pt"><span style="font-size:10.0pt">Regards</span><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 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:35.4pt">Hello,<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><o:p> </o:p></pre>
<pre style="margin-left:35.4pt">There are different functions in the registrar module, check them out: <a href="https://kamailio.org/docs/modules/devel/modules/registrar.html#idm576">https://kamailio.org/docs/modules/devel/modules/registrar.html#idm576</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><o:p> </o:p></pre>
<pre style="margin-left:35.4pt">reg_fetch_contacts(..) might be something you could use.<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><o:p> </o:p></pre>
<pre style="margin-left:35.4pt">Cheers,<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><o:p> </o:p></pre>
<pre style="margin-left:35.4pt">Henning<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><o:p> </o:p></pre>
</blockquote>
</div>
</body>
</html>