[sr-dev] range transformation or var

Henning Westerholt hw at skalatan.de
Tue Jul 6 11:15:52 CEST 2021


Hi,

Look at the cfgutils Module. $RANDOM with arithmetic operation in cfg.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
________________________________
From: sr-dev <sr-dev-bounces at lists.kamailio.org> on behalf of Brandon Armstead <brandon at cryy.com>
Sent: Tuesday, July 6, 2021 1:31:50 AM
To: Kamailio (SER) - Development Mailing List <sr-dev at lists.kamailio.org>
Subject: [sr-dev] range transformation or var

Is there a way to generate a random number between min and max currently?

i.e.

$var(rand) = $rand(0, 5) // generates a random int between 0 and 5?

This could be useful for in configuration weighting / load distribution without a dispatcher module.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210706/f02215c1/attachment.htm>


More information about the sr-dev mailing list