<div dir="ltr">Thanks Loic, <br>Yes, thats correct Kernel decides the interface to take. That is why I want to figure out if we have any way to foresee that decision ! <div><br>I got to know a new thing: onsend_route: <a href="http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#onsend_route">http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#onsend_route</a><br><br>I will try and make use of this route and see if it helps me select the rtp-proxy instance to use. <br><br>Here is how it looks like:<br><img src="cid:ii_155e4f7232a2a34f" alt="Inline image 2" width="562" height="275"><br>For Inbound leg all is fine, but for outbound call leg, if I know which Interface it is taking I can engage the rtpproxy instance for this.</div><div><br></div><div>Regards,</div><div>Sammy</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 13, 2016 at 11:08 AM, Loic Chabert <span dir="ltr"><<a href="mailto:chabert.loic.74@gmail.com" target="_blank">chabert.loic.74@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><p dir="ltr">Hi,</p>Interface selection is done by kernel when routing lookup is done, no ?<br></div>If you have the same destination and multiple interface to reach it, kernel will chose the best one (according metric values).<br><br></div>If you want to force trafic to go through an interface, interface must be attached to different routing table (rt_table), and with ip rule command, you can select  routing table for this packet (using packet marking).<br><br></div>Another recent kernel feature is VRF: <a href="https://www.kernel.org/doc/Documentation/networking/vrf.txt" target="_blank">https://www.kernel.org/doc/Documentation/networking/vrf.txt</a><br><br></div>Regards.<br><div><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">Le 12 juil. 2016 19:45, "SamyGo" <<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>> a écrit :<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<br><br>Question: <br>Is there a function in kamailio to get the interface/listen IP kamailio would use to route a packet out for a domain / ip ?<br><br>Example: <br><br>$avp(interface_ip) = find_interface_for_request("192.168.12.123");<br><br>And it gives me the Kamailio's Listen address that would be used for sending call out to this IP/Domain !<br><br>I've a weird situation where a multi-homed kamailio with about 7 different interfaces needs to send call out, I've so many RTProxy instances to engage but I can't decide which instance to engage since I do not know which Interface the Packet would route out from.<br><br>Regards,<div>Sammy</div><div><br><div><br></div></div></div>
<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div></div>
</div></div></div></div></div></div></div>
<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" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>