Excuse the ASCII diagramme - you will need a fixed width font to understand it. ------ ------- ------- ----- | A | ==> | NAT | === === | NAT | <== | B | ------ ------- | | ------- ----- ------------------- | The Internet | ------------------- | WAN interface (82.44.22.127) ------------- | S (NAT) | ------------- | LAN interface (192.168.0.20) ==================================== | 192.168.0.0/24 range | ------ ------- | C | | D | ------ ------- I am at home on machine D (and with wife on machine C), with some family at machines A and B. I am trying to setup an arrangement whereby clients on machines A, B, C and D can talk to each other on Softphones. A,B,C are are all Windows XP machines, machines D and S are linux. This has to include A talking to B and ultimately conference calls with potentially all parties. Machine S is my firewall/router providing NAT services to clients C and D (based soley on my own IPTABLES script) but is ALSO the machine I plan to put Asterisk on (it can therefore bind to two interfaces, with separate configurations for each if I so desire). If appropriate, I could install a STUN server on S. I would prefer if media traffic between A and B avoids using my WAN interface pipe but if that is unavoidable, so be it. I could use SIP or IAX softphones in this setup as long as it is no more complicated that telling A and B what to download and giving them simple setup instructions. They could probably adjust their NAT routers to forward particular ports to them, but its not certain (A shares a flat with others). I have a slight preference for SIP as it means I could potentially replace machines A,B and C with hardware devices in the future. I have been round and round in circles reading the documentation but I am not sure I understand a) to what extent Asterisk can manage everything necessary to allow machines A and B to communicate if they were SIP phones. Is it possible to go for a setup with the firewalls/NAT devices as shown b) if I go with IAX softphones, does communication between A and B have to go through S, or can Asterisk "hand-off" the IAX conversation so that A and B talk directly. c) the example documentation shows seperate entries in iax.conf for incoming and outgoing calls. In my case (assuming IAX softphones) would I just have entries for A and B of type friend? Can someone give me some advice about how to proceed. Thanks -- Alan Chandler http://www.chandlerfamily.org.uk
> > a) to what extent Asterisk can manage everything necessary to allow > machines A and B to communicate if they were SIP phones. Is it > possible to go for a setup with the firewalls/NAT devices as shown >If the asterisk machine isn't NATed you shouldn't have a problem at all. If you're using SIP clients just make sure nat=yes is set in each of the client definitions in sip.conf> b) if I go with IAX softphones, does communication between A and B have > to go through S, or can Asterisk "hand-off" the IAX conversation so > that A and B talk directly. >I'm not sure in this case since both clients are going to be NATed. I'm pretty sure that this wouldn't work with SIP clients. Since IAX has less problems with NAT traversal it might work fine - try setting canreinvite=yes in your iax.conf and monitor rtp traffic at the asterisk CLI> c) the example documentation shows seperate entries in iax.conf for > incoming and outgoing calls. In my case (assuming IAX softphones) > would I just have entries for A and B of type friend? > > Can someone give me some advice about how to proceed. >type=friend works for me... If you decide to use iax check out moziax - a firefox plugin iax client that's simple to set up.
On Wednesday 28 February 2007 3:45 pm, Alan Chandler wrote:> I am trying to setup an arrangement whereby clients on machines A, B, C > and D can talk to each other on Softphones. A,B,C are are all Windows > XP machines, machines D and S are linux. This has to include A talking > to B and ultimately conference calls with potentially all parties.Personally I make my Asterisk box the firewall. It eliminates all NAT troubles. :-) If that's not your style, I'd use IAX over SIP, as it only requires a port-forward to D on D's NAT box. SIP you may be able to get work with port forwarding 5060 and 10000-20000 (all udp) over to D, but I'm not sure... Naturally, nat=yes and canreinvite=no should be set all around. -A.
Answers in-line... Hope this helps! Jason -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Alan Chandler Sent: Wednesday, February 28, 2007 3:46 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Newbie Planning Help <snip> ------ ------- a) to what extent Asterisk can manage everything necessary to allow machines A and B to communicate if they were SIP phones. Is it possible to go for a setup with the firewalls/NAT devices as shown - Asterisk can register and manage both A & B even though they are behind NAT devices. NAT=yes is required, of course, for Asterisk and the endpoint to properly communicate. You probably know but just in case, SIP endpoints maintain a signaling channel through port 5060. When a call comes in, they open a RTP media stream somewhere between port 10000 and port 20000. NAT can sometimes mess this up and it usually shows itself as one-way audio. IAX endpoints send signaling and media over the same port so there is less risk in NAT problems. b) if I go with IAX softphones, does communication between A and B have to go through S, or can Asterisk "hand-off" the IAX conversation so that A and B talk directly. - I do not believe IAX allows for a hand-off between the two endpoints. Most people don't want the hand-off anyway as it prevents the parties from using in-call feature codes. This is why most everyone sets canreinvite=no for SIP endpoints. c) the example documentation shows seperate entries in iax.conf for incoming and outgoing calls. In my case (assuming IAX softphones) would I just have entries for A and B of type friend? - yes. 'friend' is you friend for IAX softphones! Can someone give me some advice about how to proceed. Thanks -- Alan Chandler http://www.chandlerfamily.org.uk _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users