old-www/HOWTO/VoIP-HOWTO-7.html

305 lines
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>VoIP Howto: Setup</TITLE>
<LINK HREF="VoIP-HOWTO-8.html" REL=next>
<LINK HREF="VoIP-HOWTO-6.html" REL=previous>
<LINK HREF="VoIP-HOWTO.html#toc7" REL=contents>
</HEAD>
<BODY>
<A HREF="VoIP-HOWTO-8.html">Next</A>
<A HREF="VoIP-HOWTO-6.html">Previous</A>
<A HREF="VoIP-HOWTO.html#toc7">Contents</A>
<HR>
<H2><A NAME="s7">7. Setup</A></H2>
<P>In this chapter we try to setup VoIP system, simple at first,
then more and more complex.
<H2><A NAME="ss7.1">7.1 Simple communication: IP to IP</A>
</H2>
<P>
<PRE>
A (Sound card) - - - B (Sound card)
192.168.1.1 - - - 192.168.1.2
192.168.1.1 calls 192.168.1.2 and viceversa.
</PRE>
<P>A and B should have
<P>
<OL>
<LI>an application like Microsoft Netmeeting, Internet Switchboard,
Openh323 (under Windows environment) or Ohphone, Gnomemeeting (under
Linux), installed and properly configured.</LI>
<LI>a network card or other kind of TCP/IP interface to talk each
other.</LI>
</OL>
<P>In this kind of view A can make a H323 call to B (if B has server
side application active) using B IP address. Then B can answer to
it if it wants. After accepting call, VoIP data packets start to
flow.
<H2><A NAME="ss7.2">7.2 Using names</A>
</H2>
<P>Under Microsoft Windows a NetBIOS name can be used instead of
an IP address.
<P>
<PRE>
A - - - B
192.168.1.1 - - - 192.168.1.2
John - - - Alice
John calls Alice.
</PRE>
<P>This is possible cause John call request to Alice is converted
to IP calling by the NetBIOS protocol.
<P>The above 2 examples are very easy to implement but aren't scalable.
<P>
<P>In a more big view such as Internet it is impossible to use direct
calling cause, usually, the callers don't know the destination IP
address. Furthermore NetBIOS naming feature cannot work cause it
uses broadcast messages, which typically don't pass ISP routers .
<P>You can also use DNS to solve name in IP address: for example
you can call ''box.domain.com''.
<H2><A NAME="ss7.3">7.3 Internet calling using a WINS server</A>
</H2>
<P>The NetBIOS name calling idea can be implemented also in a Internet
environment, using a WINS server: NetBIOS clients can be configured
to use a WINS server to resolve names.
<P>PCs using the same WINS server will be able to make direct calling
between them.
<P>
<PRE>
A (WINS Server is S) - - - - I - - - - B (WINS Server is S)
N
T
E - - - - - S (WINS Server)
C (WINS Server is S) - - - - R
N
E - - - - D (WINS Server is S)
T
Internet communication
</PRE>
<P>A, B, C and D are in different subnets, but they can call each
other in a NetBIOS name calling fashion. The needed is that all are
using S as WINS Server.
<P>Note: WINS server hasn't very high performance cause it use NetBIOS
feature and should only be used for joining few subnets.
<H2><A NAME="ss7.4">7.4 ILS server</A>
</H2>
<P>ILS is a kind of server which allows you to solve your name during
an H323 calling: when you start VoIP application you first register
to ILS server using a name, then everyone will be able to see you
using that name (if he uses same Server ILS!).
<H2><A NAME="ss7.5">7.5 A big problem: the masquering.</A>
</H2>
<P>A problem of few IPs is commonly solved using the so called masquering
(also NAT, network address translation): there is only 1 IP public
address (that Internet can directly "see"), the others machines are
"masqueraded" using all this IP.
<P>
<PRE>
A - - -
B - - - Router with NAT - - - Internet
C - - -
This doesn't work
</PRE>
<P>In the example A,B and C can navigate, pinging, using mail and
news services with Internet people, but they CANNOT make a VoIP call.
This because H323 protocol send IP address at application level,
so the answer will never arrive to source (that is using a private
IP address).
<P>Solutions:
<P>
<UL>
<LI>there is a Linux module that modifies H323 packets avoiding this
problem. You can download the module
<A HREF="http://www.coritel.it/coritel/ip/sofia/nat/nat2/nat2.htm">here</A>. To install it you have to
copy it to source directory specified, modify Makefile and go compiling
and installing module with "modprobe ip_masq_h323". Unfortunately this
module cannot work with ohphone software at this moment (I don't
know why).</LI>
</UL>
<P>
<PRE>
A - - - Router with NAT
B - - - + - - - Internet
C - - - ip_masq_h323 module
This works
</PRE>
<P>
<UL>
<LI>There is a application program that also solves this problem:
for more see
<A HREF="VoIP-HOWTO-5.html#Phonepatch">Par 5.7</A></LI>
</UL>
<P>
<PRE>
A - - -
B - - - PhonePatch - - - Internet
C - - -
This works
</PRE>
<H2><A NAME="ss7.6">7.6 Open Source applications</A>
</H2>
<H3>Ohphone Sintax</H3>
<P>Sintax is:
<P>"ohphone -l|--listen [options]"
<P>"ohphone [options]... address"
<P>
<UL>
<LI>"-l", listen to standard port (1720)</LI>
<LI>"address", mean that we don't wait for a call, but we connect to
"address" host</LI>
<LI>"-n", "--no-gatekeeper", this is ok if we haven't a gatekeeper</LI>
<LI>"-q num", "--quicknet num", it uses Quicknet card, device /dev/phone(num)</LI>
<LI>"-s device", "--sound device", it uses /dev/device sound device.</LI>
<LI>"-j delay", "--jitter delay", it change delay buffer to "delay".</LI>
</UL>
<P>Also, when you start ohphone, you can give command to the interpreter
directly (like decrease AEC, Automatic Echo Cancellation).
<H3>Gnomemeeting</H3>
<P>Gnomemeeting is an application using GUI interface to make call
using VoIP. It is very simple to use and allows you to use ILS server,
chat and other things.
<H2><A NAME="ss7.7">7.7 Setting up a gatekeeper</A>
</H2>
<P>You can also experiment gatekeeper feature
<P>
<PRE>
Example
(Terminal H323) A - - -
\
(Terminal H323) B - - - D (Gatekeeper)
/
(Terminal H323) C - - -
Gatekeeper configuration
</PRE>
<P>
<OL>
<LI>Hosts A,B and C have gatekeeper setting to point to D. </LI>
<LI>At start time each host tells D own address and own name (also
with aliases) which could be used by a caller to reach it.</LI>
<LI>When a terminal asks D for an host, D answers with right IP address,
so communication can be established.</LI>
</OL>
<P>We have to notice that the Gatekeeper is able only to solve name
in IP address, it couldn't join hosts that aren't reachable each
other (at IP level), in other words it couldn't act as a NAT router.
<P>You can find gatekeeper code
<A HREF="http://www.opengatekeeper.org">here</A>:
<A HREF="http://www.openh323.org/code.html">openh323 library</A> is also required.
<P>Program has only to be launch with -d (as daemon) or -x (execute)
parameter.
<P>In addition you can use a config file (.ini) you find
<A HREF="http://www.opengatekeeper.org/opengate.ini">here</A>.
<H2><A NAME="ss7.8">7.8 Setting up a gateway</A>
</H2>
<P>As we said, gateway is an entity that can join VoIP to PSTN lines
allowing us to made call from Internet to a classic telephone. So,
in addition, we need a card that could manage PSTN lines: Quicknet
LineJack does it.
<P>From
<A HREF="http://www.openh323.org">OpenH323 web site</A> we download:
<P>
<OL>
<LI>driver for Linejack</LI>
<LI>PSTNGw application to create our gateway.</LI>
</OL>
<P>If executable doesn't work you need to download source code and
<A HREF="http://www.openh323.org/code.html">openh323 library</A>, then install all in a home user directory.
<P>After that you only need to launch PSTNGw to start your H323
gateway.
<H2><A NAME="ss7.9">7.9 Compatibility Matrix</A>
</H2>
<P>First Matrix refers to:
<P>
<OL>
<LI>Software intercommunications (i.e. Netmeeting with SwitchBoard)</LI>
<LI>Software/Driver/Hardware talking (i.e. Netmeeting can use a PhoneJACK
card).</LI>
</OL>
<P>
<PRE>
_____________________________________________________________________________________________________________________
| | Netmeeting |SwitchBoard | Simph323 | OhPhone | LinPhone |Speak-Freely|HW PhoneJACK|HW LineJACK |
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| Netmeeting | V V V V X X V V
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|SwitchBoard | V V V V X X V V
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| Simph323 | V V V V X X X X
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| OhPhone | V V V V X X V V
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
| LinPhone | X X X X V X X X
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|SpeakFreely | X X X X X V X X
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|HW PhoneJACK| V V X V X X _ _
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
|HW LineJACK | V V X V X X _ _
|____________|____________|____________|____________|____________|_____________|____________|____________|____________|
</PRE>
<P>Second Matrix refers to Gateway softwares that manage LineJACK
card.
<P>
<PRE>
___________________________________________________________
| |HW LineJACK GW| SwitchBoard | PSTNGW |
|______________|______________|______________|______________|
|HW LineJACK GW| _ | V | V |
|______________|______________|______________|______________|
| SwitchBoard | V | _ | _ |
|______________|______________|______________|______________|
| PSTNGW | V | _ | _ |
|______________|______________|______________|______________|
</PRE>
<P>Notation:
<P>
<UL>
<LI>V : Works</LI>
<LI>X : Doesn't Work</LI>
<LI>-- : Doesn't care</LI>
</UL>
<HR>
<A HREF="VoIP-HOWTO-8.html">Next</A>
<A HREF="VoIP-HOWTO-6.html">Previous</A>
<A HREF="VoIP-HOWTO.html#toc7">Contents</A>
</BODY>
</HTML>