Hello,
Not 100% sure if I understood your question correctly.
There are probably many ways. One option is to use the $RANDOM pseudo-variable that can
generate (pseudo-)random numbers. You can get it to the pattern you like with some script
operations in the cfg.
Just rewrite the request URI user of the INVITE in Kamailio to the new generated number
and send it out again.
Cheers,
Henning
--
Henning Westerholt -
https://skalatan.de/blog/
Kamailio services -
https://gilawa.com<https://gilawa.com/>
From: Ali Taher <ataher(a)vanrise.com>
Sent: Donnerstag, 6. Juli 2023 15:15
To: sr-users(a)lists.kamailio.org
Subject: [SR-Users] Randomize calling number
Hello,
What is the best way to change the calling number to a random number (based on specific
pattern, like number of digits for example) in an invite packet without using a database.
So the scenario is :
* receive an invite packet from certain source
* change the calling number
* send back the invite packet including the new calling number to the original
source.
Regards,
Ali Taher