[SR-Users] How to read "duid" from dispatcher.list in kamamilio.cfg

Federico Cabiddu federico.cabiddu at gmail.com
Wed Oct 21 09:28:31 CEST 2020


Hi,
you can access it through the xavp_dst (
http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.xavp_dst)
using transformations.
E.g. if your xavp is called "dsdst" you can do something like this:

$var(duid) = $(xavp(dsdst=>attrs){param.value,duid});

Cheers,

Federico

On Wed, Oct 21, 2020 at 8:18 AM Jani Biju Babjan <mathpseudo at gmail.com>
wrote:

> Hi,
> I have a dispatcher.list file like the following:
> 1 sip:127.0.0.1:5060 0 0 duid=abcd;maxload=5
> 1 sip:127.0.0.2:5060 0 0 duid=efgh;maxload=5
>
> After calling the ds_select_dst("1", "4") function(ie, round-robin
> selection),  I want to read the value of the "duid" attribute of the
> selected destination and then pass it to a database. How can I read this
> value in the configuration file?
>
> Jani Biju Babjan
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201021/ad7f70f2/attachment.htm>


More information about the sr-users mailing list