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 
<[email protected]> Date: 7/16/22  7:52 AM  (GMT-06:00) To: 
[email protected] 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.




_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to