<p>If you configure kamailio to listen on a multicast address (eg. <code>224.0.1.75</code>) it <em>auto</em> selects the interface that joins the multicast group. The selection happens on what the kernel thinks the multicast IP address is active on. This is decided by the kernel route table since you cannot configure a multicast address on your interface. In the default scenario this would mean the default route interface will be selected to join the multicast group. In case you want to select another interface this is possible by altering the route for that particular multicast address to the interface you desire. This is a workable solution but it has the following downsides:</p>

<ul>
<li>need to add route manually to specify interface</li>
<li>multicast for 1 specific address only possible on 1 interface</li>
</ul>

<p>I would like to propose a solution by adding a config parameter to kamailio (eg. <code>mcast_interface</code>) which could then be defined before each <code>listen</code> directive that is a multicast address. This would allow for selecting an interface per listen socket in the same way as you can specify the amount of workers for an interface. In this scenario there is no need for manually adding a route to specify the interface.</p>

<p>Please let me know if this is a feature that is of interest to kamailio. If so I'd be willing to work on this myself, but somebody else can also do it.</p>

<p>If something isn't clear or needs more explanation don't hesitate to ask.</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/813">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZaX9DFUZRoi3CknAApBXB6hW95N7ks5qw2dJgaJpZM4KOkU1">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZdzTvGgPCYy4stNE6H2lpf97JHH2ks5qw2dJgaJpZM4KOkU1.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/813"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Interface selection for multicast listen socket (#813)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/813"}}}</script>