Thanks Kaufman, Relying on DB is of course one way to do it, but I thought that there are some modules that could be used and are faster, like app_lua but I'm not sure if it can be used to select a number randomly from a pool saved in a file.
Regards, From: Kaufman <bkauf...@bcmone.com> Sent: Wednesday, August 2, 2023 7:36 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org> Subject: [SR-Users] Re: change A number using a pool of numbers There's functionally two parts to this question: 1. How to change a number 2. How to select a random number For selection of the number it's probably easiest to rely on DB lookup. With one column as the original number and another column as the possible replacement numbers, then just select with an order by random to get the replacement number. As far as changing the number, it can depend on specifically what number you're trying to change. The RURI can be changed just by setting $rU. Values in the To: or From: headers should be changed with the functions from the UAC module so that replies can have the original values restored. For other miscellaneous headers like P-Asserted-Identity, just remove the old header and append a new one. Regards, Kaufman From: Ali Taher <ata...@vanrise.com<mailto:ata...@vanrise.com>> Sent: Wednesday, August 2, 2023 1:20 AM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>> Subject: [SR-Users] change A number using a pool of numbers CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hello, I'm looking to change the A number (from number) to a number selected randomly from a pool of existing numbers (hundreds) and then relay the call to a certain gateway. What is the best and more efficient way to do it in kamailio? Thanks in advance
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: