[SR-Users] Access via script to location data in the memory

Henning Westerholt hw at skalatan.de
Fri Jul 30 18:18:00 CEST 2021


Hello,

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.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Social Boh
Sent: Friday, July 30, 2021 6:11 PM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Access via script to location data in the memory


Hello,

maybe is better I explain what I'd like to achieve:

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.

The only difference I have seen in the location data, with kamctl ul show 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.

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.

I don't know if there is other way to achieve this goal.

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.

The idea is to take advantage of using these DMQ related modules.

Regards

---

I'm SoCIaL, MayBe
El 29/07/2021 a las 5:16 p. m., Henning Westerholt escribió:

Hello,



There are different functions in the registrar module, check them out: https://kamailio.org/docs/modules/devel/modules/registrar.html#idm576



reg_fetch_contacts(..) might be something you could use.



Cheers,



Henning


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210730/966bb137/attachment.htm>


More information about the sr-users mailing list