[Serusers] Get alias for user

Jan Janak jan at iptel.org
Mon Oct 24 14:24:17 CEST 2005


On 24-10-2005 14:12, Damien Sandras wrote:
> Le lundi 24 octobre 2005 ? 14:06 +0200, Samuel Osorio Calvo a écrit :
> > lookup("aliases"); 
> > 
> > will do the job for you if aliases is the name of the table containing the alias bindings (by default it will be).
> > 
> 
> I had understood this, but the problem here is that I need the reverse:
> the original request uri contains the username and I need to rewrite it
> into the user alias.
> 
> Example, SER receives INVITE dsandras @   gnomemeeting.net, and I want
> to use rewriteuri to rewrite the INVITE into INVITE 600001 @
> gnomemeeting.net.
> 
> Is that possible?

  Just setup reverse aliases. You can either use aliases table or create
  your own, let's say revaliases.

  Revaliases should have exactly same structure as aliases table and you
  should als add a row in version table for it. revaliases could contain
  usernames and map them to numbers. That is username would be dsandras
  and contact sip:600001 at gnomemeeting.net. You can then call
  lookup("realiases") in the script.

    Jan.




More information about the sr-users mailing list