Professional Documents
Culture Documents
Christian Stredicke
June 2003
1. Introduction to VoIP 2. H.323 3. SIP 4. snom technology suite 5. Installation of snom 4S 6. Conclusion 7. Test
V1.0
The Internet evolved from a research network into a real-time communications network
PPPoE PPTP PPP SOAP DiffSrv RSVP HTTP
IM
Presence PBX
IPv6
Version Length DiffSrv ID Flags Fragment Time to live Protocol Checksum Source Destination 20 Bytes
Version Padding Extension Source IDs Marker Payload Type Sequence Number Timestamp Sync ID
V1.0
RTP = Real-time transport protocol 54 Bytes header for every audio packet = 21.6 kBit @ 20 ms! Packets can easily be viewed with Ethereal (www.ethereal.com)
Receiver in India
LH710
May take different routes Packet are sent with Priority tag
* Just faster!
Computer networks are designed for high bandwidth, but no delivery guarantee
ISDN BRI = 128 kBit/s Ethernet 10 BT = 78 BRI Ethernet 100 BT = 781 BRI At 39 for a PC card! Ethernet 1000 BT = 7812 BRI WLAN 802.11 11 MBit/s = 85 BRI 54 MBit/s = 421 BRI 802.16
V1.0
Phone
Router Router
Other
TCP RTP
RTP
Distance
Other
DSL Line
Backbone
V1.0
Bandwidth
Amongst the attempts to get telephony working on a IP-based network SIP seems to be the best
MGCP H.323 MEGACO H.323v2 SIP (RFC2543)
ISDN over IP
V1.0
H.323
Official standard Some devices in the market already (legacy devices) Most devices do not support supplementary services (H.450)
SIP
Similar to HTTP Less requirement on program space than H.323 Suitable for large operators Cisco and Microsoft support SIP Darling of the Internet society Almost everybody jumping on the train
V1.0
10
Windows XP embedded and Windows Pocket PC Includes SIP stack as well as other features Many gateways and stand alone equipment will this stuff
V1.0
11
1. Introduction to VoIP 2. H.323 3. SIP 4. snom technology suite 5. Installation of snom 4S 6. Conclusion 7. Test
V1.0
12
Gateways
Gatekeepers Multipoint Control Units (MCUs)
V1.0
13
Gateways
Gateways interface an H.323 network to other networks (ISDN,PSTN etc). Composed of Media Gateway Controller (MGC) and Media Gateway (MG). MGC handles all the call signaling functions. MG handles the media related functions.
V1.0
14
Gatekeepers
V1.0
15
Responsible for managing multipoint conferences (two or more endpoint engaged in a conference). The MCU contains a Multipoint Controller (MC) that manages the call signaling and may optionally have Multipoint Processors (MPs) to handle media mixing, switching, or other media processing.
V1.0
16
V1.0
17
V1.0
18
ROSE
Software concept works for stand alone PC, but can not be used on embedded systems
ASN.1
openh323 Features
V1.0
19
1. Introduction to VoIP 2. H.323 3. SIP 4. snom technology suite 5. Installation of snom 4S 6. Conclusion 7. Test
V1.0
20
3. SIP 3.1 User Point of View 3.2 Architecture 3.3 Registration 3.4 Basic Call 3.5 Call Control 3.6 PSTN interoperability
V1.0
21
V1.0
22
23
3. SIP 3.1 User Point of View 3.2 Architecture 3.3 Registration 3.4 Basic Call 3.5 Call Control 3.6 PSTN interoperability
V1.0
24
Internet
Proxy 1 Registrar 1 UA Gateway 1
UA
Intranet VPN
Registrar 2
V1.0
UA
UA
UA
UA
25
The SIP proxy can be compared to a HTTP proxy: Taking complexity away from the client
Finding a destination Comparable to HTTP proxy But real-time Requests may be redirected to other proxies Stateless proxies Just forwarding packets Stateful proxies Taking care of a call Other functions Billing Maintenance Outbound proxy handles all traffic of a dumb phone
V1.0
26
Proxy
(1) INVITE
(2) INVITE (3) 100 Trying (5) 180 Ringing (7) 200 Ok
(10) ACK
V1.0
27
(1) INVITE (2) 100 Trying (3a) INVITE (3b) INVITE (4a) 100 Trying (5) 180 Ringing (4b) 180 Ringing (6a) 100 Trying (6b) 180 Ringing (8) 200 Ok (10) ACK V1.0 (7) 200 Ok (9) ACK
28
V1.0
29
UAS and UAC may change during a call From and To-Fields are exchanges in this case
V1.0
30
SIP URLs provide a powerful way to describe a contact and its parameters
Like HTTP URL Examples: sip:cs@snom.de: Simple URL <sip:cs@snom.de:5061>: Adding port number Fred F. Feuerstein <sip:fff@snom.de>: Real name <sip:fff@snom.de>;q=1.0: Probability of presence <sip:fff@snom.de:5061;transport=tls>: Transport layer <sip:fff@snom.de>;q=1.0;expires=360: Several parameters sip:j.doe@big.com?subject=project%20x&priority=ur gent Details in RFC 3261
V1.0
31
V1.0
32
V1.0
33
Via headers trace the path of a request and allow a respond to travel that path back
Every instance tags the path of a request taken so far by adding a via field Replies must be send back popping Via fields off the message Forking proxies add branch parameters to the via fields to tag different branches
Via: host1
V1.0
34
Record-Route fields are used to ensure that some proxies are part of subsequent requests
SIP does not mandate 1st request that requests between two UA take the same Record-Route: h2, h4 path Contact: h1 Actually, SIP encourages taking a direct path even Record-Route: h2 for ACK Contact: h1 That causes problems with stateful proxies and billing systems Record-Route: h2 Record-Route ensures that proxies that add themselves to the route are in the message chain in future requests
V1.0 Contact: h1 Subsequent requests
3 Route: h4 2
Contact: h1 1
Route: h2, h4
35
V1.0
36
Requests until a response arrives (same CSeq) Responses if a request repetition arrives ACK if a response arrives twice
TCP Like HTTP Content-Length becomes very important TLS Is a SSL (Secure Socket Layer) version Keeps SIP traffic secure Like TCP Different port to avoid misunderstandings (e.g. 5061)
V1.0
37
See draft
V1.0
38
3. SIP 3.1 User Point of View 3.2 Architecture 3.3 Registration 3.4 Basic Call 3.5 Call Control 3.6 PSTN interoperability
V1.0
39
V1.0
40
SIP/2.0 200 OK Via: SIP/2.0/UDP 62.254.248.56:5060 Call-ID: 20010816172922294833@62.254.248.56 From: <sip:1@62.254.248.7> To: <sip:1@62.254.248.7> CSeq: 1 REGISTER Contact: <sip:1@62.254.248.56:5060;transport=udp>;expires="Th u, 16 Aug 2001 15:31:14 GMT" Contact: <sip:1@62.254.248.213;method=INVITE>;description="OP EN";expires="Thu, 16 Aug 2001 21:57:01 GMT" Expires: 3600 Content-Length: 0
41
SIP/2.0 100 Trying Via: SIP/2.0/UDP 62.254.248.56:5060 From: sip:1@a1.sipbakeoff.org To: sip:1@a1.sipbakeoff.org Call-ID: 200108161729012916541@62.254.248.56 CSeq: 1 REGISTER Content-Length: 0
SIP/2.0 403 - Forbidden Via: SIP/2.0/UDP 62.254.248.56:5060 From: sip:1@a1.sipbakeoff.org To: sip:1@a1.sipbakeoff.org Call-ID: 200108161729012822929@62.254.248.56 CSeq: 1 REGISTER Content-Length: 0
V1.0
42
V1.0
43
Which information does a client has to set up for port forwarding in NAT equipment?
Router needs information where to send packets in private network Map port to private address and port By default packets will be rejected or sent to DMZ Router needs hint for security checking Accept packets from any destination Accept packets only from associated host Accept packets only from associated host and port
V1.0
123.123.123.123
192.168.0.1
Client
Client Router
44
RTP ports are allocated dynamically when starting a call Otherwise keep-alive traffic would be double RTCP port can not be allocated because next port allocation is unlikely Long ringing and putting caller on hold is problematic (no port refresh during this time)
V1.0
45
V1.0
46
47
3. SIP 3.1 User Point of View 3.2 Architecture 3.3 Registration 3.4 Basic Call 3.5 Call Control 3.6 PSTN interoperability
V1.0
48
(2) 100 Trying (3) 180 Ringing (4) 200 Ok (5) ACK
49
50
SIP/2.0 180 Ringing To: sip:abc@62.254.248.105 From: <sip:snom1@a1.sb.org:7071>;tag=7q30roe94y Via: SIP/2.0/UDP 62.254.248.56:5060 Call-ID: 20010817113103899961@62.254.248.56 CSeq: 1 INVITE Content-Length: 0
V1.0
51
V1.0
52
V1.0
53
54
V1.0
55
V1.0
56
3. SIP 3.1 User Point of View 3.2 Architecture 3.3 Registration 3.4 Basic Call 3.5 Call Control 3.6 PSTN interoperability
V1.0
57
Hold is just a modification of the SDP record that has been sent to the other party
To put the other party on hold, either party may send a re-INVITE The IP address 0.0.0.0 indicates the other party that it should stop sending media Re-INVITE must be replied to with a 200 Ok 100 Trying not necessary 180 Ringing not allowed here
INVITE sip:789@62.254.248.56:5060;transport=udp SIP/2.0 Via:SIP/2.0/UDP 62.254.248.6:5060;branch=bw.62.254.248.6 From:<sip:3015553333@62.254.248.6>;tag=247792666997982268876 To:<sip:789@62.254.248.56:5060>;tag=oe94ywxqnb Call-ID:20010816141657975436@62.254.248.56 CSeq:774927797 INVITE Contact:<sip:62.254.248.6:5060> Allow:ACK,BYE,CANCEL,INFO,INVITE,PRACK,REFER Supported:100rel,timer Content-Length:210 Content-Type:application/sdp v=0 o=CiscoSystemsSIP-IPPhone-UserAgent 6734 5093 IN IP4 62.254.249.87 s=SIP Call c=IN IP4 0.0.0.0 t=0 0 m=audio 16392 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0
V1.0
58
INVITE sip:user1@62.254.249.92 SIP/2.0 From: <sip:789@62.254.248.57:5060>;tag=nxawl7blpm To: sip:19785551111@62.254.249.86 Via: SIP/2.0/UDP 62.254.248.57:5060 Call-ID: 200108151150451812316@62.254.248.57 CSeq: 1 INVITE ...
59
(2) 200 Ok
(3) ACK (4) REFER (5) 202 Accepted (6) INVITE (7) 200 Ok (9) NOTIFY (10) 200 Ok (11) BYE (12) 200 Ok V1.0 (8) ACK
60
61
V1.0
62
V1.0
63
V1.0
64
Message waiting indication (MWI) is a good example for the usage of the NOTIFY mechanism
NOTIFY goes through proxy as unknown message All registered users (including mailbox) receives NOTIFY All users answer and effectively stop sender from repeating Whoever reads the message responds with a 200 Ok
NOTIFY sip:123@62.254.248.56 SIP/2.0 Via: SIP/2.0/UDP 62.254.248.89:5060 From: <sip:Comverse_vm@62.254.248.89>;tag=19140-1058962.254.248.89 To: <sip:123@62.254.248.56> CSeq: 21911 NOTIFY Call-ID: 31961-997948029-177396725@62.254.248.89 Content-Type: application/simple-message-summary Event: simple-message-summary Content-Length: 48
SIP/2.0 200 OK From: <sip:Comverse_vm@62.254.248.89>;tag=19140-1058962.254.248.89 To: <sip:123@62.254.248.56> Via: SIP/2.0/UDP 62.254.248.89:5060 Call-ID: 31961-997948029-177396725@62.254.248.89 CSeq: 21911 NOTIFY User-Agent: snom V1.6c Content-Length: 0
V1.0
65
3. SIP 3.1 User Point of View 3.2 Architecture 3.3 Registration 3.4 Basic Call 3.5 Call Control 3.6 PSTN interoperability
V1.0
66
(1) INVITE (CSeq = 1) (2) 484 Address Incomplete (3) ACK Timeout (4) INVITE (CSeq = 2) (5) 100 Trying (8) 180 Ringing (10) 200 Ok (11) ACK (6) INVITE (7) 180 Ringing (9) 200 Ok (12) ACK SAM Subsequent Address Message IAM Initial Address Message
V1.0
67
See example
V1.0
68
V1.0
69
1. Introduction to VoIP 2. H.323 3. SIP 4. snom technology suite 5. Installation of snom 4S 6. Conclusion 7. Test
V1.0
70
The snom 4S consists of a real-time part (media server) and a call control part Intelligent, but sometimes takes a little time
Proxy
Media Server
71
The proxy consists of several components that are necessary for SIP
Web Interface
Scripting
Billing
Registrar
Proxy
Location Server
Logging
XML
V1.0
DNS
72
V1.0
73
V1.0
74
The scripting makes customization and programming of the proxy simple and safe
Copy success story of PHP (Apache) Easy to understand Extremely flexible Cannot crash proxy so easily No CPL (Call Processing Language)! Too complicated Not powerful enough Web Interface sets variables that are interpreted by default script Quick setup for most typical cases No programming necessary
V1.0
75
V1.0
76
Instant messaging is not the job of the proxy; however the proxy does its best to support it
Normal request handling rules Implements full IM functionality Store & Forward Store messages on file system until user registered again Simple & effective
Welcome Message When users sign in first time they get a greeting message
V1.0
77
Presence can be done on the user agents; caution has to be taken about performance
Number of presence updates can easily kill the proxy 10000 users with 50 contacts each changing their state every hour generate more than 100 transactions per second! Questions the presence promise We wait until a feasible solution for this problem has been identified When user agents support presence (like Microsoft Messenger) proxy can handle it
V1.0
78
Problems Bypassing proxy (solution for PSTN termination: gateway setup) Caller information Hangup upon account expiration
V1.0
79
V1.0
80
The user may access the proxy to see the call list, messages, redirection settings, passwords, etc.
See missed calls even if not registered Independent from location where phone is Simple redirection Simple setup for redirecting to cell phone Voice mail integration with different account number
V1.0
81
82
Auto Attendant
Auto attendant initiates transfer of existing call or early media call (REFER or 3xx redirect).
Calling Card
Simple Calling Card application with precise billing.
V1.0
83
Performance measurements have shown good performance for G.711 and caution for G.729A
1 0,9 0,8 0,7 0,6 0,5 0,4 0,3 0,2 0,1 0
V1.0
84
Calling Cards
Main problem: What happens when card becomes empty? User continues talking User is not warned User may want to hear a gong for every coin he uses Solution: Calling Card in media server Media server keeps track on used coins No multiple call problem Media server generates tones for billing information
V1.0
85
Scaling snom 4S
SIP can inherently be scaled If user agents support DNS SRV Proxy supports database replication Performance is not the issue on the proxy 1 Mio calls per day results in a approx. 50 transactions per second (no problem) Media Server needs to
V1.0
86
We run our proxy and media server for more than a year now at snom.com
Several domains snom.info for snom 200 phones Plug & Play snomag.de as free proxy for everyone who wants to try snom.com for our telephony traffic stredicke.de for sip:christian@stredicke.de Pubic media accounts sip:conf@snom.com for sample conferencing sip:info1@snomag.de for test calls sip:moh@snomag.de for Internet music on hold Plug & Play setup of snom.info mailboxes Exposed to the public Internet We had a few DoS attacks But no problems with the proxy stability Performance seems not to be an issue Currently, approx. 1000 users are actively using the proxy
V1.0
87
V1.0
88
V1.0
89
V1.0
90
91
1. Introduction to VoIP 2. H.323 3. SIP 4. snom technology suite 5. Installation of snom 4S 6. Conclusion 7. Test
V1.0
92
Installation on Windows Platforms can be done easily if you follow some rules
Just follow the dialog and the manual! Be sure to be administrator Otherwise you might have problems adding the proxy as a new service In this case, the proxy does not start automatically
You dont need to reboot the machine Manually starting from the service manager But make sure that after a reboot the proxy is coming up
Check the event log for extraordinary messages
V1.0
93
Windows stores some basic information in the registry and then reads the rest from the files
Get the root directory from the registry HKEY_LOCAL_MACHINE/SOFTWARE/snom/proxy is the root path reg_dir contains the root directory for the proxy html_port_number and sip_port_number define the ports Other configuration information is stored in config.xml Configuration of the admin account Domains are stored in the domain directories Dont edit this file when the proxy is running (changes will overwrite it)
V1.0
94
Updating the Windows service is not so easy, you have to follow some voodoo-tricks (warp II)
Mark the service for manual starting Keeps Windows from using this file after reboot Reboot Uninstall the old software Is now safe because image is not being used Install the new software Start it in the service manager Check the version number and the build If they did not change you have a problem
V1.0
95
The install.sh script simplifes the Linux installation for SuSE and RedHat
Follow the descriptions in the manual Make sure you are root The script sets up run level information and copies the executable into the /usr/sbin directory Be careful with name mixing (rcsnomproxy, snomproxy) Old proxy was named sip-proxy, new has name snomproxy
V1.0
96
V1.0
97
98
V1.0
99
V1.0
100
V1.0
101
First you should make sure that the fundamental settings are ok
Choose Ports Logging helps identifying problems Use this only if the proxy runs on several IP addresses Set a password
102
Before you can start operating the proxy, you need to set up a domain
103
Take a look at the domain settings first and set the password for the domain administrator
104
105
Choose password that cannot be guessed easily Single registration avoids problems when clients register with changing addresses Other names for the account
V1.0
106
V1.0
107
Define the expiration Password Username as Default defined on the for probability proxy (not userthe agents account!)
V1.0
108
Enter the account information in the SIP/Line Settings menu on the phone web interface
Choose on of the accounts
The account name of the proxy (not the username) Mailbox address (leave empty for now)
Domain name
Leave as is
Leave as is
109
Current local time How the phone can be reached, maybe including the path to the user agent
Phone type
110
Looking at the SIP trace you also get an idea what's going on
Local time of reception IP address Packet behind link
Good registration
UDP or TCP Rx = Received (normally) Tx = Send (normally) Rr = Repetition received Ta = Send automatic answer Tr = Send message repetition Tf = Send failed
V1.0
111
After making your first call, you should see the call in the call trace
Local time of call Source; clicking here show details of the call Destination
Duration V1.0
112
Mailbox picks the calls up Acknowledgement of cancel Proxy cancels the call to the phone
V1.0
Hang up
113
V1.0
114
Before operating the media server, you should check the fundamental settings
Make sure the IP address is correct
Make sure these ports are available Avoid CPU overload V1.0
115
Message repetition (in ms) Automatic hang-up when clients dont reconnect
V1.0
116
V1.0
Media server automatically detects DTMF, this setting is about indicating this
117
118
You can add accounts by selecting its type and account name
Name of the account Type of the account
V1.0
119
The music on hold account type just plays music; the user may select the type with DTMF
Authentication information All accounts have a language setting
120
If password is present, the caller is prompted for the password before he can join the conference
V1.0
121
122
User defined account types may implement all kinds of media-related services like calling-card
<?xml version ="1.0" standalone="yes"?> <media_definition>
Hidden settings
<!-- global options for the mailbox --> <option name="x-type">Mailbox2</option> <option name="x-conference">false</option> <option name="x-msg_send_mwi">true</option> <option name="x-msg_send_email_summary">true</option> <option name="email_url"></option> <option name="email_name"></option> <option name="x-email_file"></option>
<!-- find the start state --> <start condition="equal ${owner} true">welcome_main_menu</start> <start condition="equal ${x-mailbox_mode} mb_name">mailbox_enabled_name</start> <start>mailbox_enabled_stand</start> <!-- default -->
State the
<!-- Welcome to the voicemail system of 123. Leave your message after the beep --> <state name="mailbox_enabled_stand"> Description of <!-- define the audio output: --> audio <audio type="file">${audio}/${lang}/mb_you_have_reached_the_voicemail_system.wav</audio> <audio type="file">${audio}/${lang}/mb_leave_msg_after_tone_two_minutes.wav</audio> <audio type="file">${audio}/${lang}/bi_beep.wav</audio>
V1.0
<!-- define the behavior: --> State transition <event name="audio_end"><cmd>msg_create</cmd><cmd>goto record_message</cmd></event> <event name="0-9"><cmd>set collect ${digit}</cmd><cmd>goto collect_digits</cmd></event> description <event name="#"><cmd>set collect</cmd><cmd>goto collect_digits</cmd></event> <event name="*"><cmd>set collect</cmd><cmd>goto collect_digits</cmd></event> </state>
123
1. Introduction to VoIP 2. H.323 3. SIP 4. snom technology suite 5. Installation of snom 4S 6. Conclusion 7. Test
V1.0
124
Conclusion
Voice over IP is a complex technology! However, has huge potentials Using computer infrastructure instead of specialized equipment Integration with computer network makes things easier (web browser, email-notification, etc.) SIP is getting mature Most of the services known from PSTN are possible Many new features that were not possible with PSTN snom offers phones and SIP proxy, media server VoIP technology can be integrated with any vendor Quality is important
V1.0
125
1. Introduction to VoIP 2. H.323 3. SIP 4. snom technology suite 5. Installation of snom 4S 6. Conclusion 7. Test
V1.0
126
Examination
V1.0
sip:info@snom.com
2003 snom technology Aktiengesellschaft Written by: Dr. Christian Stredicke Version: 1.0
The author has made his best effort to prepare this document. The content is based upon latest information whenever possible. The author makes no representation or warranties of any kind with regard to the completeness or accuracy of the contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this document.
For more information, mail info@snom.de, Pascalstr. 10B, 10587 Berlin, Germany.