Вы находитесь на странице: 1из 15

: IP ( VoIP) - SIP

IP-,

. ,
" ",
.
IP-,
SIP, .
SIP (Session Initiat Protocol, )
IP-. H.323
IP-, IP-,
"" . H.323
, ,
, SIP.
H.323 .
,
, . SIP-
,
, ( HTTP,
SIP). SIP
H.323.

SIP
(Session Initiation Protocol - SIP)
,
(, , ).
,
.
SIP MMUSIC IETF,
RFC 2543.
:
1. .
.
, ,
.
2. . , ,
. ,
SIP, .
3. .

.
SIP
, IANA.

SIP- ,
.
SIP
.
4. , IETF.
SIP ,
IETF.
: (Resource Reservation Protocol - RSVP, RFC
2205), (Real-Time Transport Protocol RTP, RFC 1889),
(Real-Time Streaming Protocol - RTSP, RFC 2326),
(SDP, RFC 2327). SIP
.
5. . SIP
.323.
SIP IP-
SIP
.
IP UDP. ,

.
, .
UDP,
TCP. UDP , TCP,
(
),
.
, TCP (firewall),
. TCP
, , TCP,
TCP-. , SIP
TCP/IP.

SIP TCP/IP
IP
: , ,
.
,
(), ,
. ,
SIP
. SDP (Session Description Protocol).
, SIP
SDP.
IETF RTP,
, SIP
.
SIP :

( multicasting ),
multicast -, ;
(MCU),
"-",
(. . )
;
"-".
SIP
, . . .


IP-
SIP ,
.
-
SIP URL (Universal Resource Locators).
SIP- :

@;
@;
@I-;
@.
, . - ,
.
- , .
, .
IP- Domain Name Service (DNS). SIP- IP-,
.
SIP- "sip:", , SIP-.
SIP-:
sip: als@rts.loniis.ru
sip: user1@192.168.100.152
sip: 294-75-47@gateway.ru

SIP-
:
"-"

, ,
. , ,
,
, .

SIP. ,
, .
, .

SIP

SIP- :
.
, ,
, , - User Agent Client (UAC)
- User Agent Server (UAS).

-.
- , , ,
. ,
, . . -
, ,
.-
.

- - (stateful)
(stateless).
,
.
.
, . . .
, , .
, ,
. - , :
o
o
o

TCP ;
;
.
, -
, . . ,
-, .
,
. , ,
,
. ,
. , -

- .
- .
IP- - .
- .
,
, ,
, , . ,
, ,
, SIP- ,
.

.

.
,
.
.

.
,
.


,
. ,
.
-
-, .

.
SIP
SIP- :




( ,
, ,
).
, ,
.
.
SIP 2.0 6 (
):
INVITE .
(
), ,

ACK .

( )

Cancel (
)

BYE

Register

OPTIONS
( , ,
INVITE ACK)

, ,
. HTTP.
3- , ,
.
, , .
6 :

1 () - , ;
2 () - , ;
3 () - ;
4 ( ) - ;
5 ( ) - ;
6 ( ) - .
SIP/2.0 200 OK
Via: SIP/2.0/UDP kton.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com>
To: <sip:wstson@bell-tel.com>;
all-ID:3298420296@kton.bell-tel.com
seq: 1 INVITE
Content-Type: application/sdp
Content-Length: ...
v =0
0 =watson 4858949 4858949 IN IP4 192.1.2.3
t =3149329600 0
SIP =IN IP4 boston.bell-tel.com
m =audio 5004 RTP/AVP 0 3
a =rtpmap:0 PCMU/8000
a =rtpmap: 3 GSM/8000
. 6.3. SIP-

,
. .

SIP ( UAS), -
.
, SIP-.
: user@domain, IP-
DNS. .
,
, , , .
, - .
, .

: Asterisk
Linux
Asterisk
Digium,
. Asterisk
, VoIP
, , (IVR),
(
), CDR .

Asterisk , C,
AGI,
.
AGI .

Asterisk is an open source framework for building communications applications.


Asterisk turns an ordinary computer into a communications server. Asterisk powers IP
PBX systems, VoIP gateways, conference servers and more. It is used by small
businesses, large businesses, call centers, carriers and governments worldwide.
Asterisk is free and open source. Asterisk is sponsored by Digium, the Asterisk
Company. Asterisk is under the hood in countless voice communications applications
and is capable of interfacing with many traditional Telcom protocols, VoIP protocols,
and codecs. Asterisk provides a staggering list of capabilities and
features including: IVR,ACD, Audio and Video Conferencing, Voicemail, Call
Recording,Fax termination,CDR
Downloading
The Asterisk source packages are available at: http://www.asterisk.org/downloads
1. Log in to Linux machine as the root user (superuser). If you are using Ubuntu
Linux log in as normal and prefix each command with sudo.
2. If you are using an X window system, open a terminal window.
3. Download the current Asterisk source tarball to the host machine. This will
download
the latest (minor) version:
4. Unzip and extract all of the contained source files:
5. Enter the newly created source directory and execute the install_prereq in the
contrib/scripts subdirectory. This will not only install the required dependencies but also
install all packages necessary to build all option Asterisk components.
root@localhost:~# cd /usr/src
root@localhost:/usr/src# wget
http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
root@localhost:/usr/src# tar zxvf asterisk-1.8-current.tar.gz
Compiling and Installing
Configuring Asterisk
The previous command make samples created sample configuration files in the
default

10

directory /etc/asterisk/. The commands below show how to create backups of some of
these
files and how to create new simplified configuration for demo or testing purposes.
Issue each command as shown. The mv (move) command is used here to rename
(backup) the provided sample configuration files:
root@localhost:/user/src/asterisk-1.8.16.0#
root@localhost:/etc/asterisk# mv modules.conf modules.conf.sample
root@localhost:/etc/asterisk# mv extensions.conf extensions.conf.sample
root@localhost:/etc/asterisk# mv sip.conf sip.conf.sample
root@localhost:/etc/asterisk# mv iax.conf iax.conf.sample
root@localhost:/usr/src/asterisk-1.8.16.0# ./configure
root@localhost:/usr/src/asterisk-1.8.16.0# make
root@localhost:/usr/src/asterisk-1.8.16.0# make install
root@localhost:/usr/src/asterisk-1.8.16.0# make samples
root@localhost:/usr/src# cd /asterisk-1.8.16.0
root@localhost:/usr/src/asterisk-1.8.16.0# ./contrib/scripts/install_prereq
: All Asterisk configuration files can be found under /etc/asterisk

root@localhost:/etc/asterisk# gedit modules.conf


[modules]
autoload=no
load=pbx_config.so
load=chan_sip.so
load=chan_iax2.so
load=res_rtp_asterisk.so
load=app_hangup.so
load=app_dial.so
load=codec_ulaw.so
load=codec_gsm.so
Repeat for extensions.conf:
root@localhost:/etc/asterisk# gedit extensions.conf
[default]
exten=>1000,1,Dial(SIP/1000)
exten=>1001,1,Dial(SIP/1001)

Repeat for sip.conf:


root@localhost:/etc/asterisk# gedit sip.conf
[1000]
type=friend
host=dynamic
username=1000
secret=1000
[1001]
type=friend
host=dynamic
username=1001
secret=1001

11

We have created 2 users and have set their properties. Consider the 2 users as the 2 telephone
extensions in the network.
type=friend - This means that the extension can make and receive calls.
host=dynamic - This is how the devices register with the Asterisk Server. When set to
dynamic the devices can be register with a different IP each time the connect to the server.
Once these files have been edited to look as above you can reload the configurations for the
Asterisk Server from the Asterisk CLI.
To start the CLI use the following command:
asterisk -r
Configuring a SIP client
There are myriad freely available VoIP clients. The soft-phone used in this example,
linphone, is
available for Linux, Windows, and Mac OS. No preference or endorsement is
implied. The
instructions provided are for Linux only.

I used Linphone softphone for Linux for this. It can be installed using the following command:
#apt-get install linphone
Once installed start the Linphone Client :

12

As you can see I have configured a new contact in this client to point to extension 1001.
Following is the configuration for extension 1001.

The identity for this client is 1000. Configuration details for the current identity is as follows:

Similarly you can configure another softphone client as identity 1001. Next, you can add the
contact details of extension 1000 in the second client. Once you have done this you can call
between the two clients. The calls are routed by the Asterisk Server.

13

14


1. .., .., .. IP--. .: ,
2001.
2. : SIP. . ,
.. , ..
3.AsteriskTM: The Future of Telephony
Jim Van Meggelen,Leif Madsen, and Jared Smith
:
http://www.intuit.ru/studies/courses/8/8/lecture/129
http://asteriskonvps.com/how-to-install-asterisk-and-a2billing-on-an-ubuntu-server-10-04/
http://www.rohitmenon.com/index.php/howto-connect-2-phones-and-make-a-simple-call-usingasterisk/

15

Вам также может понравиться