Hi,
I try to replace the user-name of the Request URI and save that into a AVP later.
I tried: $var(old_user) = $oU; $var(new_uri) = $(ou{re.subst,/$var(old_user)/004444444444/g});
and $var(new_uri) = $(ou{re.subst,/$oU/004444444444/g});
Both did not work: [lvalue.c:351]: non existing right pvar
I am using latest git version of kamailio.
Does someone has an idea?
Best regards, Bernhard
Bernhard Suttner Senior Entwickler Entwicklung _______________________
Winet Network Solutions AG Täfernstrasse 2a CH-5405 Baden-Dättwil
E-Mail Winet: info@winet.ch E-Mail pers.: bernhard.suttner@winet.ch Voice: +41 56 470 4626 Fax: +41 56 470 4627
Hi,
thanks for your fast response. $ou is the original request uri but I tried with $rU and it still does not work. Is it not possible to use a pseudo variable with re.subst ?
Best regards, Bernhard
-----Ursprüngliche Nachricht----- Von: Juha Heinanen [mailto:jh@tutpro.com] Gesendet: Montag, 3. Januar 2011 16:04 An: Bernhard Suttner Cc: sr-users@lists.sip-router.org Betreff: [SR-Users] Replace number in pseudo variable
Bernhard Suttner writes:
I try to replace the user-name of the Request URI and save that into a AVP later.
userpart of request uri is $rU. se pvar doc.
-- juha
Am 03.01.2011 15:56, schrieb Bernhard Suttner:
Hi,
I try to replace the user-name of the Request URI and save that into a AVP later.
I tried: $var(old_user) = $oU; $var(new_uri) = $(ou{re.subst,/$var(old_user)/004444444444/g});
unless this is just a test (and you need regexp) I would use:
$var(new_uri) = "sip:004444444" + $rd;
if you need all parameters as well you could use e.g.
$rU = "00444444";
regards klaus