[asterisk-users] chan_sip sending from wrong source address when multiple interfaces are used

Benny Amorsen benny+usenet at amorsen.dk
Fri Jul 13 06:33:24 CDT 2012


"Raj Mathur (राज माथुर)" <raju at linux-delhi.org> writes:

> Precisely.  In fact, if a packet from 192.168.2.n is received on /any/ 
> interface, the response will always go out from the 192.168.2.X 
> interface.  (Barring some weird routing/iptables configuration, of 
> course.)

This is only the case for TCP, because TCP accept() fixes the whole
five-tuple of protocol, srcaddr, srcport, dstaddr, dstport. UDP does not
have an accept() equivalent and most applications just use sendto()
which lets the OS pick a source address.


/Benny




More information about the asterisk-users mailing list