[SR-Users] Re: Randomize calling number

2023-07-06 Thread Henning Westerholt
Hello Ali, you can just build the new From URI the way you like it, e.g.: uac_replace_from("$var(from_user)", sip:$var(from_user)@$fd); Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com From: Ali Taher Sent: Donnerst

[SR-Users] Re: Randomize calling number

2023-07-06 Thread Ali Taher
Hi Henning, Is there a way to change From URI user part without touching the domain ? As I can see in uac_replace_from there is an option to either change the display part or the whole URI part. Regards, From: Henning Westerholt Sent: Thursday, July 6, 2023 6:42 PM To: Kamailio (SER) - Users

[SR-Users] Re: Randomize calling number

2023-07-06 Thread Ali Taher
Thanks Alex, Yes I'm aware of that, this is just for testing purposes. Regards, -Original Message- From: Alex Balashov Sent: Thursday, July 6, 2023 6:37 PM To: Kamailio (SER) - Users Mailing List Subject: [SR-Users] Re: Randomize calling number You can just modify the domain portion

[SR-Users] Re: Randomize calling number

2023-07-06 Thread Henning Westerholt
Hello, ah, you want to change the From URI user. Yes, uac_replace_from is a common approach for that. This function will change the From URI when you send out the message, you will not see it with a xlog in the cfg. https://www.kamailio.org/wikidocs/tutorials/faq/main/#why-changes-made-to-heade

[SR-Users] Re: Randomize calling number

2023-07-06 Thread Alex Balashov
You can just modify the domain portion of the RURI, i.e. by manipulating $rd. For example, $rd = "some.ip"; Then, t_relay(). However, beware that sending the call back to the same gateway from which it came is likely to cause call loops. Proxies don't create new call legs, they are just part of

[SR-Users] Re: Randomize calling number

2023-07-06 Thread Ali Taher
Hi Henning, I used the uac_replace_from() function to replace the fU, but the value is still the same when i printed it using xlog. I also dont know how to send the invite back to the switch. What function to use? Thanks, Sent from my iPhone On Jul 6, 2023, at 5:31 PM, Henning Westerholt wr

[SR-Users] Re: Randomize calling number

2023-07-06 Thread Henning Westerholt
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 us

[SR-Users] Randomize calling number

2023-07-06 Thread Ali Taher
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 *