Reputation: 876
I trying to call from SIpJs to Asterisk 12. my peer is here
[6002]
type=friend
secret=6002
host=dynamic
context=public
transport=ws
avpf=yes
icesupport=no
encryption = no
and my JsSip code is here
var configuration = {
'ws_servers': 'ws://192.168.0.102:8088/ws',
'uri': 'sip:[email protected]',
'password': '6002'
};
var options = {
'eventHandlers': eventHandlers,
'mediaConstraints': {'audio': true, 'video': false}
};
function call() {
coolPhone.call('sip:[email protected]', options);
}
It is register corretly , but when i call "call" function asterisk logs this error
Rejecting secure audio stream without encryption details: audio 46421 RTP/SAVPF 111 103 104 0 8 106 105 13 126
JSSIp error is here
call failed with cause: Incompatible SDP
Can anybody help me?
Upvotes: 1
Views: 4576
Reputation: 3350
First, you need to create certificates for DTLS. Then enable DTLS from each of your peers.
Use the below command for creating certificates.(Replace X.X.X.X with your asterisk server IP)
mkdir /etc/asterisk/keys
cd ${ASTERISKSOURCE_PATH}/contrib/scripts/
./ast_tls_cert -C X.X.X.X -O "My Super Company" -d /etc/asterisk/keys
Then add the below keys with your peer:
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS
Upvotes: 2