SIP wrote:
There's a very simple reason. Asterisk and SER are on the same machine. So the traffic from SER to asterisk doesn't need to leave the box. This is why I'm using the loopback interface - there's no need to use the real world one.
Your problems seems to be concerned to the RTP part of the comunication... as SIP pointed, where should the clients send the RTP traffic? To 127.0.0.1 (Your Asterisk IP)? I don't think so... ;)
So, from what I see and understand from Your explanation, You have two choices: 1- bind Asterisk to an external IP like SER (can be the same IP), but in another port; 2- try to include in Your design a RTP-Proxy application (rtproxy or mediaproxy are good choices).
Edson.
Edson wrote:
Ok, we are already using MediaProxy which is listening on the external interface because we do have real-world clients.
I will try moving asterisk to listen on the external interface, though I don't understand how that's going to change things?
John Breen wrote:
127.0.0.1 is a special address. If MY machine, for instance, tries to connect to 127.0.0.1, it's connecting to itself. If Bob's machine tries to connect to 127.0.0.1, he's connecting to Bob's machine. While, technically, you COULD accomplish having Asterisk on an internal IP address on the local machine, in order for it to actually work, you'd need to turn the computer into a router (start doing RIP or some such), which would immeasurably complicate things.
Remember, a SIP call has two parts. One is the signaling portion (the actual SIP portion of the call) and one is the media portion (RTP -- the voice stuff). SER handles the SIP portion but doesn't do anything with the RTP portion. It can't, itself, 'proxy' that voice portion from the outside world to an internal-only IP on your box, so you won't ever get any audio to your Asterisk server that way. What happens in that scenario is that your softphone calls the SER box. SER tells the softphone that it needs to connect its RTP/audio portion of the call to the IP of the asterisk server directly. If the IP of the asterisk server is internal (or the loopback IP), then the softphone has no way to know how to get to it, so it can't connect the audio properly.
If you were running mediaproxy or RTPproxy on the SAME box, IT could proxy the audio portion from the outside world to the Asterisk server running on the same machine with an internal IP. However, then you're creating an incredibly complex scenario and using even more resources for each call.
Your best bet if you need both servers to run on the same box is simply to run Asterisk on the same external IP as SER but with a different port. That way, the outside world can connect its audio to the Asterisk server and you won't get some of the weird issues you're getting now.
N.