Hello,
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.
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.
Cheers,
Daniel
On 24.06.17 00:12, Luis Azedo wrote:
Hi,
i don't think we can access this info at runtime from the script and i
was thinking of implementing it.
we have a timer proc that runs a script block and we need to access
this info from that script.
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)
what would be the best module to put this ? pv ?
Thanks
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training -
www.asipto.com
Kamailio World Conference -
www.kamailioworld.com