<div dir="ltr"><p>t_replicate specifies the destination and it does not change the request, so you can not modify the user part with the t_replicate call. </p><p>You may try to change the user part of ther req-URI (rewriteuser,avps,...) and afterwards issuing the replication.</p>
<p>Hope it help,</p><p>Samuel.<br></p><br><div class="gmail_quote">2008/7/16 Pascal Maugeri <<a href="mailto:pascal.maugeri@gmail.com">pascal.maugeri@gmail.com</a>>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">Hum it does not look to work...<br><br>If I keep the t_replicate("<a href="mailto:sip%3Apascal@company.com" target="_blank">sip:pascal@company.com</a>") it will try resolve the destination with DNS server. I believe I should resolve first the user SIP URI with the location using USRLOC and then replicate using the location (eg.: sip:pascal@<host>:<port>) but I don't know how to do that. I haven't found anything in the module documentation for that purpose.<br>
<br>Regards,<br><font color="#888888">Pascal</font><div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Wed, Jul 16, 2008 at 3:08 PM, Iñaki Baz Castillo <<a href="mailto:ibc@in.ilimit.es" target="_blank">ibc@in.ilimit.es</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
El Wednesday 16 July 2008 14:59:51 Pascal Maugeri escribió:<br>
<div>> Hi<br>
><br>
> Is it possible to replicate incoming SIP requests (eg. REGISTER) to another<br>
> remote user SIP URI instead of host URI:<br>
><br>
> For instance I want to do (having previously registered to OpenSER the user<br>
> <a href="mailto:pascal.maugeri@company.com" target="_blank">pascal.maugeri@company.com</a>):<br>
><br>
</div>> t_replicate("<a href="mailto:sip%3Apascal@company.com" target="_blank">sip:pascal@company.com</a> <<a href="mailto:sip%253Apascal@company.com" target="_blank">sip%3Apascal@company.com</a>>");<br>
<div>><br>
> instead of<br>
><br>
> t_replicate("sip:<a href="http://10.2.3.4:5060" target="_blank">10.2.3.4:5060</a>");<br>
><br>
><br>
> I tried it with OpenSER 1.3 but I get the error message when it tries to<br>
> replicate:<br>
><br>
> 3(8113) Main routing block. Method [REGISTER]<br>
> 3(8113) ERROR: mk_proxy: could not resolve hostname: "<a href="http://company.com" target="_blank">company.com</a>"<br>
> 3(8113) ERROR: uri2proxy: bad host name in URI<br>
</div>> <<a href="mailto:sip%3Apascal@company.net" target="_blank">sip:pascal@company.net</a><<a href="mailto:sip%253Apascal@company.net" target="_blank">sip%3Apascal@company.net</a>><br>
<br>
I don't know if t_replicate generates a request than runs<br>
into "on_branch_route", but if that works then you could process<br>
on_branch_route, so both request run it separately and match the set URI,<br>
something as:<br>
<br>
t_replicate("sip:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a>"); <-- facked URI<br>
<br>
<br>
on_branch_route[X] {<br>
<br>
if $ru == "sip:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a>" {<br>
$ru = <a href="mailto:sip%253Apascal@company.com" target="_blank">sip%3Apascal@company.com</a><br>
}<br>
<br>
}<br>
<br>
<br>
but not sure if it would work.<br>
<font color="#888888"><br>
<br>
--<br>
Iñaki Baz Castillo<br>
<a href="mailto:ibc@in.ilimit.es" target="_blank">ibc@in.ilimit.es</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org" target="_blank">Users@lists.openser.org</a><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
</font></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org">Users@lists.openser.org</a><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>