What about setport [1] core function? [1] https://www.opensips.org/Documentation/Script-CoreFunctions-3-4#setport -- best regards, Alexey https://alexeyka.zantsev.com/