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")
{
strip(2);
};
# It is NL
if (uri=~"^sip:0")
{
strip(1);
prefix("31");
};
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 ?
thanks,
Arne.