<p>Thk for the fast reply and for the help. :)</p><p>&nbsp;it worked :)<br /><br /><br />Nelson Silva
<br />-----------------
<br />email: nelson.silva@neuvex.com
<br />website: http://www.neuvex.com
<br /> <br /><br /><strong>On Mon Sep 26 11:24 , Daniel-Constantin Mierla  sent:<br /><br /></strong><blockquote style="border-left: 2px solid rgb(245, 245, 245); margin-left: 5px; margin-right: 0px; padding-left: 5px; padding-right: 0px;">Hello,<br />
<br />
you can implement this with avpops module <br />
(<a target="_blank" href="../parse.pl?redirect=http%3A%2F%2Fwww.voice-system.ro%2Fdocs%2Favpops%2F%29.">http://www.voice-system.ro/docs/avpops/\).</a> Functions of interest for you <br />
are avp_write() and avp_pushto().<br />
<br />
...<br />
avp_write(&quot;1234&quot;, &quot;s:client_n&quot;);<br />
<br />
alias_db_lookup(&quot;dbaliases&quot;); <br />
<br />
lookup(&quot;location);<br />
<br />
avp_pushto(&quot;$ruri/username&quot;, &quot;s:client_n&quot;);<br />
<br />
t_relay();<br />
<br />
...<br />
<br />
For optimization reasons, you may consider replacing the name of avp <br />
&quot;s:client_n&quot; to an integer id, e.g., &quot;i:500&quot; (faster operations).<br />
<br />
Cheers,<br />
Daniel<br />
<br />
<br />
On 09/26/05 14:14, Nelson Silva wrote:<br />
<br />
&gt; Have been using openser for a couple of months and i run into a problem.<br />
&gt;<br />
&gt; Currently i'm using alias_db_lookup, location and t_relay to do the <br />
&gt; routing.<br />
&gt;<br />
&gt; Since many clients have many numbers, i need to to rewrite the contact <br />
&gt; to the right client. It's doing it but only for a client with one <br />
&gt; number. Need for clients with more numbers.<br />
&gt;<br />
&gt; This is what i want:<br />
&gt;<br />
&gt;  <br />
&gt; $client_n = 1234<br />
&gt;<br />
&gt; alias_db_lookup(&quot;db_aliases&quot;); -&gt; <a href="javascript:top.opencompose('client_number@provider.com','','','')">client_number@provider.com</a><br />
&gt;<br />
&gt; location(&quot;location&quot;); -&gt; <a href="javascript:top.opencompose('client_number@client','','','')">client_number@client</a>_ip<br />
&gt;<br />
&gt; rewriteuser($client_n);<br />
&gt;<br />
&gt; t_relay(); <br />
&gt;<br />
&gt; This is what i have:<br />
&gt;<br />
&gt; alias_db_lookup(&quot;dbaliases&quot;); <br />
&gt;<br />
&gt; lookup(&quot;location);<br />
&gt;<br />
&gt; t_relay();<br />
&gt;<br />
&gt;  <br />
&gt;<br />
&gt; Anyone have this implemented? <br />
&gt;<br />
&gt;<br />
&gt; Nelson Silva<br />
&gt; -----------------<br />
&gt; email: <a href="javascript:top.opencompose('nelson.silva@neuvex.com','','','')">nelson.silva@neuvex.com</a><br />
&gt; website: <a target="_blank" href="../parse.pl?redirect=http%3A%2F%2Fwww.neuvex.com">http://www.neuvex.com</a><br />
&gt;<br />
&gt;<br />
&gt;------------------------------------------------------------------------<br />
&gt;<br />
&gt;_______________________________________________<br />
&gt;Users mailing list<br />
&gt;<a href="javascript:top.opencompose('Users@openser.org','','','')">Users@openser.org</a><br />
&gt;<a target="_blank" href="../parse.pl?redirect=http%3A%2F%2Fopenser.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers">http://openser.org/cgi-bin/mailman/listinfo/users</a><br />
&gt;  <br />
&gt;<br />
</blockquote></p><BR>