[asterisk-dev] Feature request: Ability to assign which nic card or mac address to use for each trunk in sip.conf
Atis Lezdins
atis at iq-labs.net
Fri May 29 05:16:44 CDT 2009
On Fri, May 29, 2009 at 5:17 AM, Jeff LaCoursiere <jeff at jeff.net> wrote:
>
>
> On Thu, 28 May 2009, David Backeberg wrote:
>
>> On Thu, May 28, 2009 at 4:08 AM, Kaloyan Kovachev <kkovachev at varna.net>
>> wrote:
>>>
>>> If each trunk is using diferent router IP - you don't need any changes in
>>> Asterisk, but configuring the routing on the machine.
>>>
>>> Example:
>>> trunk 1 uses src IP 1.1.1.1 on eth0 and router 2.2.2.2
>>> trunk 2 uses src IP 1.1.1.2(but the same as on eth0 will also work) on
>>> eth1
>>> and router 2.2.2.3
>>>
>>> ip a a dev eth0 1.1.1.1
>>> ip a a dev eth1 1.1.1.2
>>> ip r a 2.2.2.2 dev eth0 src 1.1.1.1
>>> ip r a 2.2.2.3 dev eth1 src 1.1.1.2
>>>
>>> with this setup Asterisk will pickup the outgoing IP for each trunk
>>> properly
>>
>> This is true, and you can of course make this dramatically more
>> complicated by adding more physical NICs, or virts on the same system,
>> or ethernet bridging techniques.
>
> I am guessing this won't help the OP, as he describes registering to the
> device on his network (otherwise the MAC wouldn't matter). There is only
> one of them, and must assume only one IP. There is no way for the routing
> layer to know which MAC should handle the outbound packet, as the
> determining factor is actually in the application layer.
>
>>
>> I second that you are trying to solve a solveable problem using a much
>> harder approach than what to me and the other poster is the obvious
>> solution already supported by asterisk.
>
> I don't know that there is a solution already in asterisk, but the bottom
> line is code gets written by frustrated programmers. It will be hard to
> find someone on this list that is frustrated with this particular problem
> because none of us actually have to deal with it. One of NTT's customers
> will have to step up to the plate, probably, as I cannot really think of any
> other use for this patch. The multipath example perhaps, but anyone needing
> that is probably already using routing equipment to solve that issue.
>
A quick workaround idea:
keep 2 asterisk instances on the box, with second being minimal setup,
using eth1 and forwarding all calls to main instance.
Regards,
Atis
--
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835
More information about the asterisk-dev
mailing list