[Kamailio-Users] Prefix with variable?

Robin Vleij robin at swip.net
Tue Sep 9 18:20:51 CEST 2008


Hi!

I'm running into a little problem using the prefix() function. According
to the docs I can only use strings as prefixes and this works fine
everywhere in our config.

Now I'm trying to do something like this:

prefix($avp(s:t_prefix));

Customer should be able to choose their own prefixes for certain types
of traffic. We get a custom prefix in from the PSTN gateways, where we
want to then replace that "internal" prefix (strip(4)) with a
configurable prefix. Why can't we use variables in the prefix function?

I could try to use $ru = $avp(s:t_prefix) + $original_ru or something,
but on a short try-run this didn't seem as easy as that.

Any ideas or anyone doing something like this?

/robin

-- 
Robin Vleij
robin at swip.net




More information about the sr-users mailing list