<p>First, you have to set mhomed=1.</p>
<p>However, if you have an IP route from the first network interface to the second target address, then it is not going to help. The kernel will say that the first network interface is still good to use. You have to isolate ip routing between the two networks.</p>
<p>Via DNS SRV is no way to specify what local socket/network interface to use, Kamailio relies on the kernel to say which local ip has a route to the target.</p>
<p>If you cannot isolate the IP routing to get it work with mhomed=1, the alternative is to use dispatcher where you can specify the local socket for each destination.</p>
<p>In case you want to discuss further, then use sr-users mailing list. This doesn't look like an issue in the code.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2152?email_source=notifications&email_token=ABO7UZIGLCIWVLZYNGLZK3DQV5WSFA5CNFSM4JSFXB5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFLVWBY#issuecomment-559373063">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZK7B4YYNFJTJOEEDWDQV5WSFANCNFSM4JSFXB5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNADZRRQSNQY4X2FSLQV5WSFA5CNFSM4JSFXB5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFLVWBY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2152?email_source=notifications\u0026email_token=ABO7UZIGLCIWVLZYNGLZK3DQV5WSFA5CNFSM4JSFXB5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFLVWBY#issuecomment-559373063",
"url": "https://github.com/kamailio/kamailio/issues/2152?email_source=notifications\u0026email_token=ABO7UZIGLCIWVLZYNGLZK3DQV5WSFA5CNFSM4JSFXB5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFLVWBY#issuecomment-559373063",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>