[OpenSER-Users] Not possible variables or AVP's in	alias_db_lookup() ?
    Iñaki Baz Castillo 
    ibc at in.ilimit.es
       
    Thu Aug  2 18:03:40 CEST 2007
    
    
  
I want OpenSer to dinamically look for alias in a table for each domain, so 
I've in my database tables with name as:
  dbaliases_sip1_domain_org
  dbaliases_sip2_domain_com
  dbaliases_sip3_domain_net
  
And I do (thanks to Andreas Granig):
  $avp(s:dom) = $rd;
  avp_subst("$avp(s:dom)", "/\./_/g");
  alias_db_lookup("dbaliases_" + $avp(s:dominio));
but it fails because the SQL query is literally:
  select username,domain from dbaliases_$avp(s:dominio) where ...
I've tryed putting variables and more things into the function parameter, but 
it's never processed and the SQL query is always done literally. I use 
OpenSer 1.2.1.
What can I do for solving this? Thanks.
-- 
Iñaki Baz Castillo
ibc at in.ilimit.es
    
    
More information about the Users
mailing list