<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p><br>
</p>
<p>if you use jsonrpcs, there is a functions that you can use to
execute RPC commands from kamailio.cfg and you will get the result
as a json document that you can parse using jansson (or json)
module. There is a rpc command to get listen sockets.</p>
<p><br>
</p>
If you prefer to add some pv, I would not involve XAVPs here, but
add a new class of variables which will refer directly to listen
structure, avoiding to duplicate values to xavp (which use shared
memory). It can be like $listen(id), where id can be like: socket,
advertise, ... and for the case of many listen values, and index can
be used.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 24.06.17 00:12, Luis Azedo wrote:<br>
</div>
<blockquote type="cite"
cite="mid:DM5PR13MB16434AD284E58ED733FEF94CA0D80@DM5PR13MB1643.namprd13.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
dir="ltr">
<p>Hi,</p>
<p><br>
</p>
<p>i don't think we can access this info at runtime from the
script and i was thinking of implementing it.</p>
<p>we have a timer proc that runs a script block and we need to
access this info from that script.</p>
<p><br>
</p>
<p>i'm think in adding a (maybe configurable name?) xavp with
that info that would be available (only needs to evaluate once
since listeners are not dynamic)</p>
<p><br>
</p>
<p>what would be the best module to put this ? pv ?</p>
<p><br>
</p>
<p>Thanks</p>
<p><br>
</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.kamailio.org">sr-dev@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>