|Summary:||ASTERISK-06268: When SIP is bound to 0.0.0.0 it answers only on the first interface|
|Reporter:||Dirk Willbrandt (dirkw)||Labels:|
|Date Opened:||2006-02-07 08:56:10.000-0600||Date Closed:||2011-06-07 14:02:52|
|Description:||today i tried to bind Asterisk to more than one IP-Address.|
The First thing i see is that i can Asterisk bind only to one or all IPs.
A nice feature will be to bind Asterisk to Two oder Three IP-Addresses of for example 5 IP-Addresses.
The Second thing that i figured out was that when my Phone tries to Register or Invite on the Second IP, the Asterisk answers on the First IP.
A very nice Feature will be that Asterisk answers with the interface on which he gets the Request.
I will wait for any comments
****** ADDITIONAL INFORMATION ******
Here is my currently Setup, for anyone who wants to reproduce this:
Debian Linux with Kernel 2.6.8-2
Asterisk SVN-trunk 9124.
In sip.conf is bindaddr set to 0.0.0.0
eth0 : 192.168.1.10/24
eth0:1 : 192.168.1.20/24
eth0:2 : 192.168.1.30/24
I want to use 192.168.1.10 for SSH Management only.
192.168.1.20 is for a group of customers that wants to registers with SIP and i want to transfer the old IP-Address 192.168.1.30 of another Asterisk Server to this new Server. So the customers from the old Asterisk-Server don't have to change anything. They Register with SIP-Protocol too.
I'm open for any comments or questions.
|Comments:||By: Tilghman Lesher (tilghman) 2006-02-08 08:22:08.000-0600|
That's correct. It actually uses your route tables to decide how to reply, so if your routing is configured to send on a particular IP for a particular destination, that's the IP that will be encoded in the request.
This works for things like NATted hosts, where you don't want to send your internal address to external hosts and it's more efficient to send your internal IP to internal hosts.
You're correct in that it doesn't work for multi-homed hosts, where your interface is bound to multiple addresses, but that is seen as a feature, not as a bug. I'm therefore moving this to Feature Requests.
By: Kevin P. Fleming (kpfleming) 2006-02-14 18:16:57.000-0600
I am closing this one for now... the work required to make chan_sip able to reply using the same IP address it received on is under way, but it will take some time to complete.