[asterisk-users] sip.conf and binaddr issue

Olle E. Johansson oej at edvina.net
Tue Jul 10 03:24:18 CDT 2012


6 jul 2012 kl. 23:18 skrev Felix Salfelder:

> Hi there.
> 
> i am seriously stuck with an asterisk and sip problem.
> 
> the following sip.conf works with respect to some_peer:
> 
> [general]
> bindaddr = x.y.z.w
> nat = no
> 
> [some_peer]
> type=peer
> host=somehost
> secret=somesecret
> some other
> unrelated options
> 
> here x.y.z.w is the ip address of the interface pointing to the network
> containing somehost. more precisely its the address of tun0 and route -n
> prints
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> [..]
> x.y.z.0         0.0.0.0         255.255.255.0   U     0      0      0   tun0
> [..]
> 
> here 'it works' implies that i have to change and reload sip.conf after
> ifup tun0, or anything that forces tun0 to go down, like my dsl
> provider. also, the bindaddr line is suboptimal for the other peers...
> 
> the same thing -- without the bindaddr part -- doesnt work. more
> precisely it almost works. its just incoming sound that doesnt. this
> must have something to do with how asterisk picks up interface addresses
> and communicates them to the peer in question. inspecting the packages
> sent to somehost, gave me the impression that asterisk uses the ip
> adress of ppp0 (a dsl modem) instead.
> 
> how am i supposed to tell asterisk to use tun0 as the interface for
> [some_peer] so i can remove the bindaddr line? i've found many
> nat-related options in the manual, but there is no nat involved here.
> also, i couldnt find anything similar to "iface=tun0", although the sip
> dialogue apparently relies on ip adresses and routing.
> 
> this is about asterisk on sid, version 1:1.8.13.0~dfsg-1, but of course
> i'm going to switch to whatever you might suggest.
> 
The Asterisk SIP channel has no knowledge about interfaces and can't
bind to a specific interface for communication. In fact, it's a well known
bug that if you have multiple interfaces with different IP networks,
Asterisk will send from the wrong IP on some of the interfaces.

Sorry,
/O




More information about the asterisk-users mailing list