Fix a typo. Someone on IRC copied this literally and then wondered why it
[asterisk-bristuff.git] / doc / siptls.txt
blob8901a75ce44b3104f70c8d61c08e6a43d6768ac3
1 Asterisk SIP/TLS Transport
2 ==========================
4 When using TLS the client will typically check the validity of the
5 certificate chain.  So that means you either need a certificate that is
6 signed by one of the larger CAs, or if you use a self signed certificate
7 you must install a copy of your CA certificate on the client.
9 So far this code has been test with:
10 - Asterisk as client and server (TLS and TCP)
11 - Polycom Soundpoint IP Phones (TLS and TCP)
12         Polycom phones require that the host (ip or hostname) that is
13         configured match the 'common name' in the certificate
14 - Minisip Softphone (TLS and TCP)
15 - Cisco IOS Gateways (TCP only)
16 - SNOM 360 (TLS only)
17 - Zoiper Biz Softphone (TLS and TCP)
20 sip.conf options
21 ----------------
22 tlsenable=[yes|no]
23         Enable TLS server, default is no
25 tlsbindaddr=<ip address>
26         Specify IP address to bind TLS server to, default is 0.0.0.0
28 tlscertfile=</path/to/certificate>
29         The server's certificate file. Should include the key and 
30         certificate.  This is mandatory if your going to run a TLS server.
32 tlscafile=</path/to/certificate>
33         If the server your connecting to uses a self signed certificate
34         you should have their certificate installed here so the code can 
35         verify the authenticity of their certificate.
37 tlscadir=</path/to/ca/dir>
38         A directory full of CA certificates.  The files must be named with 
39         the CA subject name hash value. 
40         (see man SSL_CTX_load_verify_locations for more info) 
42 tlsdontverifyserver=[yes|no]
43         If set to yes, don't verify the servers certificate when acting as 
44         a client.  If you don't have the server's CA certificate you can
45         set this and it will connect without requiring tlscafile to be set.
46         Default is no.
48 tlscipher=<SSL cipher string>
49         A string specifying which SSL ciphers to use or not use
50         A list of valid SSL cipher strings can be found at: 
51                 http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
54 Sample config
55 -------------
57 Here are the relevant bits of config for setting up TLS between 2
58 asterisk servers.  With server_a registering to server_b
60 On server_a:
62 [general]
63 tlsenable=yes
64 tlscertfile=/etc/asterisk/asterisk.pem
65 tlscafile=/etc/ssl/ca.pem  ; This is the CA file used to generate both certificates
66 register => tls://100:test@192.168.0.100:5061
68 [101]
69 type=friend
70 context=internal
71 host=192.168.0.100 ; The host should be either IP or hostname and should 
72                    ; match the 'common name' field in the servers certificate
73 secret=test
74 dtmfmode=rfc2833
75 disallow=all
76 allow=ulaw
77 transport=tls 
78 port=5061
80 On server_b:
81 [general]
82 tlsenable=yes
83 tlscertfile=/etc/asterisk/asterisk.pem
85 [100]
86 type=friend
87 context=internal
88 host=dynamic
89 secret=test
90 dtmfmode=rfc2833
91 disallow=all
92 allow=ulaw
93 ;You can specify transport= and port=5061 for TLS, but its not necessary in
94 ;the server configuration, any type of SIP transport will work
95 ;transport=tls 
96 ;port=5061