[OpenSER-Users] Not possible variables or AVP's in alias_db_lookup() ?

Iñaki Baz Castillo ibc at in.ilimit.es
Fri Aug 3 09:41:41 CEST 2007


El Thursday 02 August 2007 18:44:01 Daniel-Constantin Mierla escribió:
> On 08/02/07 19:34, Iñaki Baz Castillo wrote:
> > El Thursday 02 August 2007 18:15:58 Iñaki Baz Castillo escribió:
> >> El Thursday 02 August 2007 18:07:32 Daniel-Constantin Mierla escribió:
> >>> Hello,
> >>>
> >>> if the alias translates in a single SIP user, it is easy to do it with
> >>> avp_db_query() of avpops module. You load the result in avps and then
> >>> push it to R-URI.
> >>
> >> Ok, I'll try that.
> >
> > Thanks, it works perfectly and I tell how it's finally:
>
> great, next is a beautification for 1.2.x:
> > $avp(s:dominio) = $rd;
> > avp_subst("$avp(s:dominio)", "/\./_/g");
> > avp_db_query("select username,domain from dbaliases_$avp(s:dominio) where
> > alias_username='$rU' AND alias_domain='$rd'", "$avp(s:alias_username);
> > $avp(s:alias_domain)");
>
> $ru = "sip:"+$avp(s:alias_username)+"@"+$avp(s:alias_domain);
>
> and remove next two.

Ok, I was already thinking about it, but what about if the protocolo is sips ? 
Note that you are forcing "sip", couldn't it cause problems using sips?

Thanks for all.


-- 
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