[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-users
Subject:    Re: [SR-Users] How to read "duid" from dispatcher.list in kamamilio.cfg
From:       Federico Cabiddu <federico.cabiddu () gmail ! com>
Date:       2020-10-21 8:10:27
Message-ID: CAFOaF_iHx6BWAsOpciYNu3nvEJD6wM4UJ4GrE9_WeGyykf-RSw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,
actually you can access it directly from the xvap without transformations.

$var(duid) = $xavp(dsdst=>dstid);

(
http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.xavp_dst_mode
)

Cheers,

Federico

On Wed, Oct 21, 2020 at 9:28 AM Federico Cabiddu <federico.cabiddu@gmail.com>
wrote:

> 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@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@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div>actually you can access it directly from the xvap without \
transformations.</div><div><br></div><div>$var(duid) = \
$xavp(dsdst=&gt;dstid);<br></div><div><br></div><div>(<a \
href="http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p. \
xavp_dst_mode">http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#disp \
atcher.p.xavp_dst_mode</a>)</div><div><br></div><div>Cheers,</div><div><br></div><div>Federico</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 21, 2020 at 9:28 AM \
Federico Cabiddu &lt;<a \
href="mailto:federico.cabiddu@gmail.com">federico.cabiddu@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">Hi,<div>you can access it through the xavp_dst (<a \
href="http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.xavp_dst" \
target="_blank">http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.xavp_dst</a>) \
using transformations.</div><div>E.g. if your xavp is called &quot;dsdst&quot; you \
can do something like this:</div><div><br></div>$var(duid) = \
$(xavp(dsdst=&gt;attrs){param.value,duid});<div><span \
style="font-family:monospace"><span \
style="color:rgb(0,0,0)"><br></span></span></div><div>Cheers,</div><div><br></div><div>Federico<span \
style="font-family:monospace"><span \
style="color:rgb(0,0,0)"><br></span></span></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 21, 2020 at 8:18 AM \
Jani Biju Babjan &lt;<a href="mailto:mathpseudo@gmail.com" \
target="_blank">mathpseudo@gmail.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div>I have a dispatcher.list \
file like the following:</div><div>1 sip:<a href="http://127.0.0.1:5060" \
target="_blank">127.0.0.1:5060</a> 0 0 duid=abcd;maxload=5<br></div><div>1 sip:<a \
href="http://127.0.0.2:5060" target="_blank">127.0.0.2:5060</a> 0 0 \
duid=efgh;maxload=5    <br></div><div><br></div><div>After calling the \
ds_select_dst(&quot;1&quot;, &quot;4&quot;) function(ie, round-robin selection),  

I want to read the value of the &quot;duid&quot; attribute of the selected \
destination and then pass it to a database. How can I read this value in the \
configuration file?</div><div><br></div><div>Jani Biju Babjan</div></div> \
_______________________________________________<br> Kamailio (SER) - Users Mailing \
List<br> <a href="mailto:sr-users@lists.kamailio.org" \
target="_blank">sr-users@lists.kamailio.org</a><br> <a \
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" \
target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br> \
</blockquote></div> </blockquote></div>



_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic