[Serusers] uri translation based on username

Arne Scheffer arne.scheffer at ritstele.com
Tue Aug 17 13:21:43 UTC 2004

Hello all,

I would like to do some changes to the uri based upon the username.

I have SIP endpoints with numbered usernames expressing thier location

e.g. username 0361234567

I want to make translations to international format but also support local without having to dial 036

International en national are ok, see below.

#       it is Internationaly
        if (uri=~"^sip:00")


#       It is NL
        if (uri=~"^sip:0")

Local I am having problems with. I would like to use length but the fucntion does not seem to exist. In addition I run into the problem on how to add "3136" in this case but something else if username is different ?

        if (uri=~"^sip:[1-9][1-9][1-9][1-9][1-9][1-9][1-9]@")
                prefix("some nice trick based on username");

any ideas ?


More information about the Serusers mailing list