Hello everyone, I managed to successfully configure my Asterisk/Ubuntu server, but I don’t know how to use it and I’m encountering some errors. I’d like to know if everything is alright… My goal is to manipulate Asterisk with some programming language, so I would really appreciate it if you could tell me if there’s any issue
Connected to Asterisk 20.8.1 currently running on teste (pid = 7195)
[Jun 6 15:51:20] WARNING[7290]: res_http_websocket.c:831 __ast_websocket_uri_cb: WebSocket connection from ‘XXXXXX:62418’ could not be accepted - did not request WebSocket
[Jun 6 15:51:25] ERROR[7291]: iostream.c:563 ast_iostream_close: SSL_shutdown() failed: error:00000001:lib(0)::reason(1), Internal SSL error
[Jun 6 15:51:25] ERROR[7290]: iostream.c:563 ast_iostream_close: SSL_shutdown() failed: error:00000001:lib(0)::reason(1), Internal SSL error
So, I created my let’s encrypt certificate following the steps bellow:
1 - Firtly I used those commands
$ sudo snap install --classic certbot
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot
$ sudo certbot --apache
$ sudo certbot certonly --apache
$ sudo certbot renew --dry-run
2- After that I configured the ssl.conf in this way:
ServerAdmin webmaster@localhost ServerName MY.DOMAIN; DocumentRoot /var/www Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerAlias MY.DOMAIN
SSLCertificateFile /etc/letsencrypt/live/MY.DOMAIN/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/MY.DOMAIN/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
3 - And after this step my apache server was running
$ crontab -e
0 2 * * * certbot -q renew
4- So I followed another tutorial to generate the asterisk certificate
$ sudo mkdir /etc/asterisk/keys
$ sudo cd /usr/src/ASTERISK_FOLDER
$ sudo contrib/scripts/ast_tls_cert -C DOMAIN.COM -O “ALIAS” -d /etc/asterisk/keys
$ ls -l /etc/asterisk/keys
5- After step 4 I configure the http.conf
$ nano /etc/asterisk/http.conf
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/etc/letsencrypt/live/DOMAIN.COM/fullchain.pem
tlsprivatekey=/etc/letsencrypt/live/DOMAIN.COM/privkey.pem
6- Finally here is my pjsip.conf
[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0
; All other transport
