[asterisk-bugs] [Asterisk 0009225]: sip doesnt bind to all

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Jan 21 18:16:00 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9225 
====================================================================== 
Reported By:                junky
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   9225
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:            1.4.0 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             03-07-2007 10:45 CST
Last Modified:              01-21-2008 18:16 CST
====================================================================== 
Summary:                    sip doesnt bind to all
Description: 
if you set your bindaddr=0.0.0.0 in sip.conf this supposes to bind to all
addresses (WAN and LAN).
In this scenario, if the wan cant get an ip, it will disable the stack.


module reload chan_sip.so
  == Parsing '/flash/asterisk/configs/sip.conf': Found
  == Parsing '/flash/asterisk/configs/users.conf': Found
[Dec 31 19:01:48] WARNING[1070]: acl.c:383 ast_ouraddrfor: Cannot connect
[Dec 31 19:01:48] WARNING[1070]: chan_sip.c:16474 reload_config: Unable to
get own IP address, SIP disabled

It should listen to lan adresses even when the wan is down.

But setting the bindaddr=192.168.0.10 works perfectly.



====================================================================== 

---------------------------------------------------------------------- 
 loloski - 01-21-08 18:16  
---------------------------------------------------------------------- 
eth0      Link encap:Ethernet  HWaddr 00:0C:29:84:9E:39
          inet6 addr: fe80::20c:29ff:fe84:9e39/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1539 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:131616 (128.5 KiB)  TX bytes:1098 (1.0 KiB)
          Interrupt:169 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:0C:29:84:9E:43
          inet addr:192.168.1.120  Bcast:192.168.1.255 
Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe84:9e43/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1955 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3600 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:336616 (328.7 KiB)  TX bytes:405183 (395.6 KiB)
          Interrupt:185 Base address:0x2080

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

netstat -nr

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0
eth1

Corydon76

your patch is work as expected !! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-21-08 18:16  loloski        Note Added: 0080978                          
======================================================================




More information about the asterisk-bugs mailing list