[Users] rewriteuser

Daniel-Constantin Mierla daniel at voice-system.ro
Mon Sep 26 13:24:22 CEST 2005


Hello,

you can implement this with avpops module 
(http://www.voice-system.ro/docs/avpops/). Functions of interest for you 
are avp_write() and avp_pushto().

...
avp_write("1234", "s:client_n");

alias_db_lookup("dbaliases"); 

lookup("location);

avp_pushto("$ruri/username", "s:client_n");

t_relay();

...

For optimization reasons, you may consider replacing the name of avp 
"s:client_n" to an integer id, e.g., "i:500" (faster operations).

Cheers,
Daniel


On 09/26/05 14:14, Nelson Silva wrote:

> Have been using openser for a couple of months and i run into a problem.
>
> Currently i'm using alias_db_lookup, location and t_relay to do the 
> routing.
>
> Since many clients have many numbers, i need to to rewrite the contact 
> to the right client. It's doing it but only for a client with one 
> number. Need for clients with more numbers.
>
> This is what i want:
>
>  
> $client_n = 1234
>
> alias_db_lookup("db_aliases"); -> client_number at provider.com
>
> location("location"); -> client_number at client_ip
>
> rewriteuser($client_n);
>
> t_relay(); 
>
> This is what i have:
>
> alias_db_lookup("dbaliases"); 
>
> lookup("location);
>
> t_relay();
>
>  
>
> Anyone have this implemented? 
>
>
> Nelson Silva
> -----------------
> email: nelson.silva at neuvex.com
> website: http://www.neuvex.com
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>  
>




More information about the Users mailing list