[OpenSER-Users] Replacing "." of a domain with "_" and store the result in a variable

Iñaki Baz Castillo ibc at in.ilimit.es
Thu Aug 2 17:42:26 CEST 2007


El Thursday 02 August 2007 17:31:23 escribió:
> Hi,
>
> $avp(s:dom) = $rd;
> avp_subst("$avp(s:dom)", "/\./_/g");

Great, didn't realize of that :)

Thanks a lot.


>
> Andreas
>
> Iñaki Baz Castillo wrote:
> > Hi, I just need to take the requested domain $rd and store in a variable
> > that domain but with . replaced by _:
> >
> >   sip.domain.org  ->  sip_domain_org
> >
> > This is because I want tables in MySQL containing the domain name but
> > MySQL don't allow . in table name.
> >
> > So now, what should I do for that? I really thought "textops" could help
> > me but I don't see a function to replace text and store it in a variable.
> >
> > I see "replace()" and "subst()" but they seem to exist for replacing text
> > in the SIP message "on the fly", that is not that I'm looking for.
> >
> > Any suggestion? Thanks a lot.



-- 
ilimit...


*Iñaki Baz Castillo*
ibc at in.ilimit.es

ÀREA SISTEMES
0034 937 333 375
VOLTA 1, PIS 5
08224 TERRASSA.BCN

Aquest enviament és confidencial i està destinat únicament a la persona a qui 
s'ha enviat.
Pot contenir informació privada sotmesa al secret professional, la distribució 
de la qual està prohibida per la legislació vigent.




More information about the Users mailing list