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

2012-07-13 Thread Benny Amorsen
"Raj Mathur (राज माथुर)" 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 TC

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

2012-07-13 Thread Benny Amorsen
"Kevin P. Fleming" writes: > I've just looked into this a bit, and I don't see how using connect() > would actually solve the problem. If we receive a UDP datagram from a > SIP endpoint, we could use socket() and connect() to create a socket > specifically for sending to (and receiving from) that

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

2012-07-12 Thread Raj Mathur (राज माथुर)
On Thursday 12 Jul 2012, Kevin P. Fleming wrote: > On 07/11/2012 11:36 PM, Jeff LaCoursiere wrote: > > This does exhibit the problem though. Your OS stack assumes one of > > those addresses - the first identified interface? - is the one that > > all replies will appear to come from. So phones on

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

2012-07-12 Thread Kevin P. Fleming
On 07/12/2012 03:53 PM, Benny Amorsen wrote: chan_sip does have the ability to use connect()-ed sockets for dialogs now, since that is required for TCP, TLS and WebSocket support. It wouldn't be a huge leap to use them for UDP as well, if that was beneficial. It would be greatly appreciated :)

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

2012-07-12 Thread Benny Amorsen
"Kevin P. Fleming" writes: > I must be missing something. If a phone sends a UDP packet to > 192.168.1.1, how does that get routed to (arrive at) the 10.0.2.1 > interface on the Asterisk server? The easiest way is that the Asterisk server itself is the router. Phones on 10.0.2.0/24 have 10.0.2.1

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

2012-07-12 Thread Kevin P. Fleming
On 07/12/2012 12:38 PM, Freddi Hansen wrote: We have since Asterisk 1.2 been using a configuration with 6 NIC's bonding to 3 networks, one public internet and 2 private networks. Routing calls between networks and having phones on all 3 networks is no problem. There is one case though where we

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

2012-07-12 Thread Dave Platt
> I must be missing something. If a phone sends a UDP packet to > 192.168.1.1, how does that get routed to (arrive at) the 10.0.2.1 > interface on the Asterisk server? The only way I can imagine that > happening is if a router in between the phone and the server has been > told that 192.168.1.

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

2012-07-12 Thread Freddi Hansen
On 07/12/2012 09:19 AM, Benny Amorsen wrote: "Kevin P. Fleming" writes: That's quite interesting; can you describe a scenario where this occurs? Imagine you have a server with two interfaces, eth0 with 192.168.1.1/24 and eth1 with 10.0.2.1/24. Further imagine that you wish to be able to move

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

2012-07-12 Thread Kevin P. Fleming
On 07/11/2012 11:36 PM, Jeff LaCoursiere wrote: This does exhibit the problem though. Your OS stack assumes one of those addresses - the first identified interface? - is the one that all replies will appear to come from. So phones on the 192.168.2.0/24 network that try to register get replies

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

2012-07-12 Thread Kevin P. Fleming
On 07/12/2012 09:19 AM, Benny Amorsen wrote: "Kevin P. Fleming" writes: That's quite interesting; can you describe a scenario where this occurs? Imagine you have a server with two interfaces, eth0 with 192.168.1.1/24 and eth1 with 10.0.2.1/24. Further imagine that you wish to be able to move

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

2012-07-12 Thread Benny Amorsen
"Kevin P. Fleming" writes: > That's quite interesting; can you describe a scenario where this occurs? Imagine you have a server with two interfaces, eth0 with 192.168.1.1/24 and eth1 with 10.0.2.1/24. Further imagine that you wish to be able to move phones between the networks without changing t

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

2012-07-11 Thread Duncan Turnbull
Similar problem On 12/07/2012, at 4:36 PM, Jeff LaCoursiere wrote: > On Thu, 2012-07-12 at 15:49 +1200, Alec Davis wrote: >> I've seen similar. >> >> We tried 4 interfaces. On 4 lans, are these considered to be overlapping? >> 192.168.1.1 >> 192.168.2.1 >> 192.168.3.1 >> 192.168.4.1 >> > Runnin

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

2012-07-11 Thread Jeff LaCoursiere
erisk-users-boun...@lists.digium.com] On Behalf Of > > Kevin P. Fleming > > Sent: Thursday, 12 July 2012 2:28 a.m. > > To: asterisk-users@lists.digium.com > > Subject: Re: [asterisk-users] chan_sip sending from wrong > > source address when multiple interfaces are used &

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

2012-07-11 Thread Alec Davis
n...@lists.digium.com > [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of > Kevin P. Fleming > Sent: Thursday, 12 July 2012 2:28 a.m. > To: asterisk-users@lists.digium.com > Subject: Re: [asterisk-users] chan_sip sending from wrong > source address when multiple interfaces are u

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

2012-07-11 Thread Kevin P. Fleming
On 07/11/2012 07:51 AM, Olle E. Johansson wrote: 10 jul 2012 kl. 20:50 skrev Kevin P. Fleming: On 07/10/2012 03:24 AM, Olle E. Johansson wrote: 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