<div dir="ltr">This is what i did but its not working, getting error SIP/2.0 403 Forbidden, it is thinking number i am dialing is local and checking in local DB . by the way SIP provider Trunk is already registered using UAC module.  I am using Multi-domain setup. <br>
<br> # do lookup with method filtering<br>        if (!lookup("location","m")) {<br>                if (!db_does_uri_exist()) {<br><br>                if ( $rU =~ "sip:1[0-9]@*") {<br>                t_relay("65.xxx.xxx.xxx:5065");<br>
                xlog("Redirecting to SIP Provider... $rU\n");<br>                exit;<br>        };<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 20, 2014 at 10:04 AM, Daniel Tryba <span dir="ltr"><<a href="mailto:daniel@pocos.nl" target="_blank">daniel@pocos.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wednesday 20 August 2014 14:54:42 Satish Patel wrote:<br>
> I am new in Kamailio so could you please give me code example how to use<br>
> t_relay() to forward traffic to Provide, I know how to use rewritehost()<br>
> but i never use t_relay() function<br>
<br>
</div>Well, my guess is your routing ends with t_relay().<br>
<br>
But routing will normally be done based on $ru unless $du is set (after for<br>
example location()).<br>
<a href="http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#ru_-_request_uri" target="_blank">http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#ru_-_request_uri</a><br>
<a href="http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#du_-" target="_blank">http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#du_-</a><br>
_destination_uri<br>
<br>
So changing destination can be accomplished by simply setting $rd to an other<br>
ip/domain (and setting $du=null). But TIMTOWTDI.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<br>
POCOS B.V. - Croy 9c - 5653 LC Eindhoven<br>
Telefoon: 040 293 8661 - Fax: 040 293 8658<br>
<a href="http://www.pocos.nl/" target="_blank">http://www.pocos.nl/</a>   - <a href="http://www.sipo.nl/" target="_blank">http://www.sipo.nl/</a><br>
K.v.K. Eindhoven 17097024<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>