[Devel] avp_db_load regress the source data

Daniel-Constantin Mierla daniel at voice-system.ro
Mon Aug 29 11:35:43 CEST 2005


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