[asterisk-dev] Feature request: Ability to assign which nic card or mac address to use for each trunk in sip.conf

John Todd jtodd at digium.com
Fri May 29 09:36:41 CDT 2009


On May 27, 2009, at 9:53 PM, JwexlerAt MailDotCom wrote:

> This feature request was initially documented in the following url  
> but was suggested that I submit it to this mailing list instead:
> https://issues.asterisk.org/view.php?id=15190
>
> Description:
> For devices with more than one ethernet nic card (mac address), when  
> configuring trunks in sip.conf or users.conf, need ability to assign  
> which ethernet nic card (or mac address) to use for each trunk.

[snip]

This has been discussed for quite a few years, but nobody has yet  
developed a patch for such a feature.

I understand the belief that such tasks should be handled by the  
"network" and not by the application.  I think that distinction is  
fine from the routing side, but not the packet origin.  The  
application can't determine where the packet will be sent - that's the  
job of the routing table.  The packet origin should be able to be  
associated with any IP address that is available as a local interface  
on the system, and depending on configuration, perhaps that means on a  
separate interface (though it could be on the same interface via  
virtual IP address.)  This is not unusual - many applications have  
this ability.

So who's up for writing the patch?  :-)

As Atis said, the quick hack is to run another instance of Asterisk  
and bind it to the IP address of the other interface, and just  
transparently pass those calls to your "real" instance of Asterisk on  
a loopback address.  Ugly hack, but it probably will do what you need  
for the short run until the SIP stack can understand multiple IP  
address  originations.

JT

---
John Todd                       email:jtodd at digium.com
Digium, Inc. | Asterisk Open Source Community Director
445 Jan Davis Drive NW -  Huntsville AL 35806  -   USA
direct: +1-256-428-6083         http://www.digium.com/






More information about the asterisk-dev mailing list