servername=Asterisk
enabled=Yes
bindaddr=0.0.0.0
bindport=8088
tlsenable=yes ; enable tls - default no.
tlsbindaddr=192.168.1.227:8089 ; address and port to bind to - default is bindaddr and port 8089.
;tlsdontverifyserver=yes
tlscertfile=/etc/asterisk/keys/asterisk.pem ; path to the certificate file (*.pem) only.
;tlscafile=/etc/asterisk/keys/asterisk.crt
;tlsprivatekey=/etc/asterisk/keys/asterisk_key.pem ; path to private key file (*.pem) only.
;tlsprivatekey=/etc/asterisk/keys/ca.pem
Here the tutorial seems to be not very clear as it requires in the key private a .pem file but the script does not create one.
Am i missing something there?
And when trying to connect through https://www.websocket.org/echo.html using
wss://<ip_address>:5061/ws
i’m getting in the console this errors WARNING[21949]: pjproject: <?>: | SSL SSL_ERROR_SSL (Handshake): Level: 0 err: <337625269> len: 0 peer: 192.168.1.1:47932| |—|---| WARNING[21949]: pjproject: <?>: | SSL SSL_ERROR_SSL (Handshake): Level: 0 err: <337625269> len: 0 peer: 192.168.1.1:47934|
I’m trying to connect Odoo which uses a wss://<ip_adrr>:<_port>/ws to connect to asterisk, but with no luck.
Internally everything works fine with calling extensions and also external connections with 3cx softphones to asterisk.
I think that my mistake is about the ssl certificates as i pointed above with the 2 .pem files required
Is the certificate self signed? Does Odoo allow self signed certificates? What does it say when you try? Did you use the 8089 port and address? I should also add that I don’t believe Odoo has ever been tested against Asterisk over websockets.
To test the connection to wss://…/ws i use https://www.websocket.org/echo.html with the port 8089 but no reply from asterisk. If i change to 5061 the console replies with the handshake error.