Hi. I've an asterisk box with 2 nics, one with a local ip 192.168.1.xxx and the other with a public ip. The default route is via the public ip route. I need to use sip on both ends, since I have phones on the lan and on the internet... but.. if I set bindaddr=0.0.0.0 in sip.conf, I had that error messages: Jun 19 13:07:21 WARNING[7176]: File chan_sip.c, Line 386 (__sip_xmit): sip_xmit of 0x813400c (len 475) to 192.168.1.209 returned -1: Bad file descriptor for every ip of my local phones. And they can't register... and/ore make calls on both side (public & private ip) If I set bindaddr=192.168.1.xxx all is ok, but obviously can't register/call from outside. Or if the default route isn't set or is a local ip, like 192.168.1.1, all is ok for local phones... but from outside we can't get in, of course. So seems that with dualhomed setup, and binding sip to all interfaces, it works only on the interface with a default route... Any hint on how to get rid of that problem ? (apart having another box that listens only on a public ip and then connect them via IAX ;-> ) Matteo.
I have many dual homed asterisk boxes that work fine. Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 172.18.192.0 0.0.0.0 255.255.240.0 U 40 0 0 eth0 10.10.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth1 0.0.0.0 172.18.207.254 0.0.0.0 UG 40 0 0 eth0 Asterisk binds to: udp 0 0 0.0.0.0:5060 0.0.0.0:*
Just found it! The problem was in gethostbyname ... simply my hostname was not defined into /etc/hosts , so sip was disabled on startup if bindaddr was = 0.0.0.0 . Adding the hostname to /etc/hosts solved the issue. Thanks a lot... Matteo. Il dom, 2003-06-22 alle 17:20, David P. Boswell ha scritto:> I have many dual homed asterisk boxes that work fine. > > Kernel IP routing table > Destination Gateway Genmask Flags MSS Window irtt Iface > 172.18.192.0 0.0.0.0 255.255.240.0 U 40 0 0 eth0 > 10.10.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth1 > 0.0.0.0 172.18.207.254 0.0.0.0 UG 40 0 0 eth0 > > Asterisk binds to: > > udp 0 0 0.0.0.0:5060 0.0.0.0:* > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users