[Kamailio-Users] avp

Anders vaerge at gmail.com
Mon Nov 9 14:13:08 CET 2009


Hi all,

Here I am - back with more "Kamailio 101"-questions! ;-)

I need to strip the first character from the uri and write this to the
'acc' table. What I'm doing so far in kamailio.cfg is:

modparam("acc", "db_extra", "............., $avp(s:user_ip_tag)");

So I've added the avp-thing in that line. And independently I've
created a new column in the 'acc' table called "user_ip_tag".

If the above is correct, my next step is to write something to this
variable. In the routing, I have this:

	if (uri=~"^sip:[1-9]00*")
		{

do_something_here_to_take_first_character_of_the_uri_and_put_to_avp...but_how?
			strip(1);
		}

What I want to do, is to take the 1-9 digit, if it starts with that
and has to zeroes after, and put that to the avp - and the strip it
off before I move on in the routing.

Yes, I have browsed the documentation, but I'm not sharp enough to
understand it, it seems. (or alternatively, the documentation is not
made for beginners).

Thanks!



More information about the Users mailing list