Hello,
I’m trying to use Sip.js with an Asterisk 12 installation. The call is done correctly but when answered by my sip phone, Sip.js end directly the call. The error message is:
sip.inviteclientcontext | Failed to set remote answer sdp: Called with SDP without ice-ufrag and ice-pwd.
uuid and uuid-dev are installed. The problem come from the fact that Asterisk don’t use ICE. Can someone help me with that issue? The asterisk’s response:
[size=85]SIP/2.0 200 OK
Via: SIP/2.0/WS 192.0.2.148;branch=z9hG4bK3038236;received=127.0.0.1
From: sip:1060@127.0.0.1;tag=sm89j6j6gm
To: sip:1061@127.0.0.1;tag=as1b4ff48e
Call-ID: 1mrda29lqq8d1l6dmjos
CSeq: 2869 INVITE
Server: Asterisk PBX 12.6.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:1061@127.0.0.1:5060;transport=WS
Content-Type: application/sdp
Content-Length: 468
v=0
o=root 1182539646 1182539646 IN IP4 127.0.0.1
s=Asterisk PBX 12.6.0
c=IN IP4 127.0.0.1
t=0 0
m=audio 13232 RTP/SAVPF 0 8 126
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=ptime:20
a=maxptime:150
a=connection:new
a=setup:active
a=fingerprint:SHA-256 97:5F:D2:63:A1:BA:5B:C0:47:A3:61:F7:0D:76:81:42:8F:BB:48:7B:28:01:B0:57:77:B4:4B:2E:24:1B:E6:87
a=sendrecv
m=video 0 UDP/TLS/RTP/SAVPF 100 116 117 96
[/size]
My sip.conf file contains ‘icesupport=yes’ globally and 2 clients:
[size=85][1060] ; This will be WebRTC client
type=friend
username=1060 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=1234 ; The SIP Password for SIP.js
encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is dialing
directmedia=no ; Asterisk will relay media for this peer
transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
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
[1061] ; This will be the legacy SIP client
type=friend
username=1061
host=dynamic
secret=1234
context=default[/size]