[Devel] avp_db_load regress the source data
Raymond Chen
rchen at broadz.com
Mon Sep 5 15:58:26 CEST 2005
Hi Daniel,
Thanks for your help. But I am stuck on how to add the avp_db_loaded value
to the uri as a prefix. Any idea?
Thanks
Ray
-----Original Message-----
From: Daniel-Constantin Mierla [mailto:daniel at voice-system.ro]
Sent: Monday, August 29, 2005 5:36 PM
To: Raymond Chen
Cc: Bogdan-Andrei Iancu; devel at openser.org
Subject: Re: [Devel] avp_db_load regress the source data
Hello Ray,
if you have some well defined patterns regarding how many digits you
have to match you can use a set o avpops functions to achieve your goal.
For example, if all usernames in rpid tables have three digits and '%',
then remove the '%' character and you can use:
modparam("avpops", "avp_aliases", "tmpuri=i:20");
avp_write("$from", "$tmpuri");
avp_subst("$tmpuri","/([0-9]{3})[0-9]+@(.*)/sip:\1@\2/d");
avp_load("$tmpuri/uri", "s:username/rpid")
Daniel
On 08/29/05 12:22, Bogdan-Andrei Iancu wrote:
> Hi Ray,
>
> no, I'm afraid it's not possible. avp_db_load support only "equal"
> matching.
>
> regards,
> bogdan
>
> Raymond Chen wrote:
>
>> Dear all,
>>
>> can avpops regres the source data like avp_db_load("$from/uri",
>> "s:username/rpid") and uri = 123123132 username in rpid talbe is 123%.
>>
>> Regards
>>
>> Ray
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/devel
>>
>>
>
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>
More information about the Devel
mailing list