Hi Daniel, We are trying to change the dialing pattern in openser, because some of the gateways don't support such feature. In the database we have abc000001 account which assigned to some area's customer, We need to translate that customer's dialing pattern to add or strip prefix to make it as country code + area code + destination.
So we just strip the incoming FROM to a fix length as abc (according to your solution earlier), then load the database abc's prefix and add to the URI as prefix. We are currently stuck on how to add the avp_db_load abc's prefix to the URI. Thanks Ray -----Original Message----- From: Daniel-Constantin Mierla [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 06, 2005 12:05 AM To: Raymond Chen Cc: 'Bogdan-Andrei Iancu'; [email protected] Subject: Re: [Devel] avp_db_load regress the source data Could you give an example of what you have in database and what you want to achieve? I am not sure I understand what you exactly want. Take a look at avp_printf() function, maybe that is what you need and my help is not more necessary. http://www.voice-system.ro/docs/avpops/ar01s06.html#avp_printf Daniel On 09/05/05 16:58, Raymond Chen wrote: >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:[EMAIL PROTECTED] >Sent: Monday, August 29, 2005 5:36 PM >To: Raymond Chen >Cc: Bogdan-Andrei Iancu; [email protected] >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:[EMAIL PROTECTED]/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 >>>[email protected] >>>http://openser.org/cgi-bin/mailman/listinfo/devel >>> >>> >>> >>> >>_______________________________________________ >>Devel mailing list >>[email protected] >>http://openser.org/cgi-bin/mailman/listinfo/devel >> >> >> > > > > > > _______________________________________________ Devel mailing list [email protected] http://openser.org/cgi-bin/mailman/listinfo/devel
