[OpenSIPS-Users] Random decision
medeanwz at gmail.com
Sat Jul 16 15:42:04 UTC 2022
If your list is large, you can add them to a database, give each row an Id
number, then use it with sql_cacher and random number generator to randomly
look up a number in table.
On Sat, Jul 16, 2022 at 4:06 PM John Burke via Users <
users at lists.opensips.org> wrote:
> Hey Alexey,
> One solution might be to use a parallel set of AVPs (1 for CIDs, 1 for
> weight) and use "set_select_weight"  to select a random index. There is
> also a PR in to shuffle an AVP list in place .
> If your list of CIDs is large, then it may not be performant to load the
> list on every request and you may need to look into leveraging another
> module that has similar functionality (like dispatcher).
>  https://github.com/OpenSIPS/opensips/pull/2852
> -------- Original message --------
> From: Alexey Kazantsev via Users <users at lists.opensips.org>
> Date: 7/16/22 7:52 AM (GMT-06:00)
> To: users at lists.opensips.org
> Subject: [OpenSIPS-Users] Random decision
> Hi list.
> I’m looking for a solution how to set caller id from a pre-defined list of
> phone numbers _randlomly_ .
> So, there is some number of caller ids allowed by our VoIP provider for
> outgoing calls.
> And I need to set it randomly, from the list.
> I know the solution how it can be achieved in Asterisk, but I also would
> like to know
> how to configure it in OpenSIPS.
> Not sure if the dialplan module is what I need.
> BR, Alexey
> * Please be cautious!* This email was sent from outside of Voxtelesys.
> Users mailing list
> Users at lists.opensips.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users