[OpenSIPS-Users] Random decision
John Burke
john at voxtelesys.com
Sat Jul 16 14:01:47 UTC 2022
Hey Alexey,One solution might be to use a parallel set of AVPs (1 for CIDs, 1 for weight) and use "set_select_weight" [1] to select a random index. There is also a PR in to shuffle an AVP list in place [2].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).[1] https://opensips.org/html/docs/modules/3.1.x/cfgutils.html#func_set_select_weight[2] https://github.com/OpenSIPS/opensips/pull/2852Thanks,John
-------- 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, Alexeyhttps://alexeyka.zantsev.com/
--
Please be cautious!
This email was sent from outside of Voxtelesys.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220716/23959f8d/attachment.html>
More information about the Users
mailing list