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

Kaloyan Kovachev kkovachev at varna.net
Thu May 28 03:08:06 CDT 2009


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

On Thu, 28 May 2009 10:53:50 +0900, 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.
> This is needed for users in Japan. NTT began configuring the firmware of its
internet access routers (that it supplies customers and requires them to use)
such that the routers now restrict registration of only one Mac Address for
each voip device that registers with its router. The NTT router will reject
any attempts to register a second trunk from the same mac address that was
used to register another trunk. This prevents the ability to register more
than one trunk from the same nic card connection which is needed to have the
Asterisk devices manage more than one phone number with NTT.
> Currently, even if there are more than one ethernet card within the asterisk
device, Asterisk always uses eth0 despite eth1 also being available and on the
same network. Need ability to specify to eth0 for one trunk (e.g. trunk 1) and
eth1 for another trunk (e.g. trunk 2).
> 
> The same trunk for more than one phone number cannot be used with NTT's
router setup. Inbound calls will only be received for one phone number even if
multiple numbers are assigned to the same trunk within the NTT router setup.
Additionally, outbound calls will all show the same caller-id because the
caller-id that is sent out on outgoing calls is set by the NTT router
regardless of what the Asterisk device sends the NTT router. Configuration for
the caller-id is made within the settings for the NTT router itself. Within
these settings, one specifies which of the phone numbers being rented from NTT
is to be used for the trunk.
> 
> This restriction is true for all of the routers that NTT now supplies
customers. It is a new policy change that became effective during 2008 (looks
like towards the end of last year).
> 
> Additional Information:
> The two companies NTT and KDDI form an oligopoly for physical internet
connection in Japan. NTT is more dominant than KDDI and hence has a virtual
monopoly on internet access accross Japan.
> 
> This new feature is critical for the expanding Asterisk user base in Japan.
> 
> Note from xrg (reporter) 2009-05-25 00:52:
> Some comments:
> This would be a major feature, better be developed against 1.6-trunk, not 1.4.
> 
> The feature would be the ability to bind to multiple interfaces for sip.c
and perhaps allow to explicitly choose the interfaces per sip peer. Last time
I'd seen the code, was doable but still required major restructure there. IAX
has such an infrastructure. At SIP, it is a little more complicated, since SIP
could be UDP and wouldn't have a "connection".
> 
> Multiple interfaces binding would also solve some routing problems, like the
case of multipath (*very* useful, once we could make it work).
> 
> I vote for the feature!
> 
> Note from loloski (reporter) 2009-05-25 03:25 edited on: 2009-05-25 03:26:
> without a patch, i think the bug marshall will close this :) i might be
wrong here but joining -dev channel will surely the right place to tackle this.
> 
> Note from lmadsen (administrator) 2009-05-26 09:51:
> lolski is right, I'm closing this issue.
> 
> Without a patch, this is considered a feature request which are not tracked
here. Thanks!
> 
> Note from me: Thank you kindly in advance for your reviewing this needed
feature for Japan.
> 
> =
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list