I am using kamailio and asterisk together where jssip client registers with kamailio. I have created a pjsip endpoint in asterisk with webrtc = yes. Kamailio and asterisk is in same network and call is dialed from webrtc client. Asterisk sending back callprogress. I don’t have voice at all. I have checked the ice candidates and found that asterisk is sending its private and public candidates with same priority and because of that reason ICE is getting failed in kamailio side. I will attach the sdp logs on asterisk of both direction.
<— Transmitting SIP response (1621 bytes) to TCP:10.13.1.127:41032 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/TCP 103.25.164.61:5060;received=10.13.1.127;branch=z9hG4bKc3b3.04ecb257edfbab2f21e4b4416a01918f.0
Via: SIP/2.0/WSS 0cktptae4dnn.invalid;rport=64286;received=122.161.108.16;branch=z9hG4bK4011224
Record-Route: sip:10.13.1.127:41032;transport=TCP;lr;r2=on;ftag=8nsd6s7hfn;nat=yes
Record-Route: sip:103.25.164.61:8089;transport=ws;lr;r2=on;ftag=8nsd6s7hfn;nat=yes
Call-ID: fap49hfajug4c8fhdvmb
From: sip:developer@kamalio.teleforce.in;tag=8nsd6s7hfn
To: sip:09496381412@kamalio.teleforce.in;tag=0bc60320-be7a-4d9a-9bd6-9a238a967846
CSeq: 9542 INVITE
Server: Asterisk PBX 18.12.1
Contact: sip:10.13.1.152:5060;transport=TCP
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Type: application/sdp
Content-Length: 772
v=0
o=- 4199482373 4 IN IP4 10.13.1.152
s=Asterisk
c=IN IP4 10.13.1.152
t=0 0
a=msid-semantic:WMS *
m=audio 13876 UDP/TLS/RTP/SAVPF 111 126
a=connection:new
a=setup:active
a=fingerprint:SHA-256 DD:17:C3:FE:EB:15:B8:37:91:DB:82:C5:EA:56:CB:44:82:2D:BA:C0:16:28:27:BC:9C:F7:46:96:E8:15:67:5F
a=ice-ufrag:09863eff19be4ea21fd4a30d11a61a89
a=ice-pwd:68b6d6676592ce9545de91e1635a20dc
a=candidate:Ha0d0198 1 UDP 2130706431 10.13.1.152 13876 typ host
a=candidate:H6719a439 1 UDP 2130706431 103.25.164.57 13876 typ host
a=rtpmap:111 opus/48000/2
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
a=rtcp-mux
a=msid:8d9ccb41-7fdd-4a48-ae2e-84ddb7ca2732 e3d75c5d-441e-4b45-946d-4c34672b2b8e
a=rtcp-fb:* transport-cc
a=mid:0
ice candiate from kamailio
<— Received SIP request (3403 bytes) from TCP:10.13.1.127:41032 —>
INVITE sip:09496381412@kamalio.teleforce.in SIP/2.0
Record-Route: sip:103.25.164.61:5060;r2=on;lr=on;ftag=8nsd6s7hfn;nat=yes
Record-Route: sip:103.25.164.61:8089;transport=ws;r2=on;lr=on;ftag=8nsd6s7hfn;nat=yes
Via: SIP/2.0/TCP 103.25.164.61:5060;branch=z9hG4bKc3b3.04ecb257edfbab2f21e4b4416a01918f.0
Via: SIP/2.0/WSS 0cktptae4dnn.invalid;rport=64286;received=122.161.108.16;branch=z9hG4bK4011224
Max-Forwards: 68
To: sip:09496381412@kamalio.teleforce.in
From: sip:developer@kamalio.teleforce.in;tag=8nsd6s7hfn
Call-ID: fap49hfajug4c8fhdvmb
CSeq: 9542 INVITE
Contact: sip:f4puumj2@0cktptae4dnn.invalid;transport=ws;ob;alias=122.161.108.16~64286~6;alias=122.161.108.16~64286~6
Content-Type: application/sdp
Session-Expires: 90
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Supported: timer,ice,replaces,outbound
User-Agent: JsSIP 3.7.1
Content-Length: 2494
v=0
o=- 6881340990319166469 2 IN IP4 10.13.1.127
s=-
t=0 0
a=extmap-allow-mixed
a=msid-semantic: WMS lI2eG8H2CFw4kQKiLkszHrGIFNRoF90Pqe07
m=audio 10092 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126
c=IN IP4 10.13.1.127
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 docs/native-code/rtp-hdrext/abs-send-time - src - Git at Google
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=msid:lI2eG8H2CFw4kQKiLkszHrGIFNRoF90Pqe07 f8acd33b-1b43-4944-a1aa-ba9a6671123c
a=ssrc:723746002 cname:pJp0YOp9CJOOIMVa
a=ssrc:723746002 msid:lI2eG8H2CFw4kQKiLkszHrGIFNRoF90Pqe07 f8acd33b-1b43-4944-a1aa-ba9a6671123c
a=mid:0
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=rtcp-fb:111 transport-cc
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:126 telephone-event/8000
a=sendrecv
a=rtcp:10093
a=rtcp-mux
a=crypto:1 AEAD_AES_256_GCM inline:XbSGPX4CtVyYLEiOa6iSaRIYbXHW4NZcXxPnl+/es5tONPYHTmz1c16isHA
a=crypto:2 AEAD_AES_128_GCM inline:IrgDnYF01oykhjebCpDMBKX0x85vMoP773wzyg
a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:cOaDZUau7Dg48uJP7ZDbHrJ06X+VDOMRvBm3nz8V1prrIvHuvXkbAeMqrhvPUA
a=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:1z4qTnIivg2uPWE3YUCln/s8ABIPdL8B/Y2quVShRHa5g1Qai3nldIOIlI6+2A
a=crypto:5 AES_192_CM_HMAC_SHA1_80 inline:LSpxTibPE/G26UyRdArtAEEde6rjk1VyTfnb7OLc3PbyXPD8uQ4
a=crypto:6 AES_192_CM_HMAC_SHA1_32 inline:tmlOosUw5/aa376Tb6GRZzrM+rVLcMRtmbfhkJOmt+mstSxwUBM
a=crypto:7 AES_CM_128_HMAC_SHA1_80 inline:j10Da8AarGxvV4wmwpq/Uz7eNhlB2LgdjMFDm9fg
a=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:qlFMDmrVC1X7Yku/5HwPQq/YjzW2FlG827yca1Z+
a=crypto:9 F8_128_HMAC_SHA1_80 inline:Pj8hXGg7IzZ42V/q8gGbtWujpqT3awRWGQT6dsx1
a=crypto:10 F8_128_HMAC_SHA1_32 inline:57xFgm/9mMjHzy49fUlcSb2xQk0jS4Um6mLp/2vG
a=crypto:11 NULL_HMAC_SHA1_80 inline:YmYzNf9g69jWBAhDMAKBdo89z46DOySKUl11WBV0
a=crypto:12 NULL_HMAC_SHA1_32 inline:xCfut+lLEaU08Q6eeXCQorblrqZvXemzpYSo9vWl
a=setup:actpass
a=fingerprint:sha-256 22:92:3F:62:7C:BC:3A:A1:B2:B9:18:EC:AE:97:AE:B9:17:DF:AE:E5:7F:11:7E:DC:8E:34:C7:E7:A5:2F:6B:99
a=tls-id:438ec95acf5b927c14a994d24225a00a
a=ice-ufrag:EyddjnAK
a=ice-pwd:e4e677VWZfh18syHA19UMQYPc6
a=candidate:smpiGs4Ss7Jqunp4 1 UDP 2130706431 10.13.1.127 10092 typ host
a=candidate:smpiGs4Ss7Jqunp4 2 UDP 2130706430 10.13.1.127 10093 typ host