Asterisk producing ICE candidate with same priority

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

Are you using bundled PJSIP or external? Does this occur under the latest version of Asterisk?

Yes I am using bundled PJSIP and the asterisk version is 18.12.1

candidates sending by asterisk is
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

Then as I stated I’d suggest using the latest version of Asterisk first and confirming it’s an issue.

which version i should use, can i use asterisk 18.17 ?

The latest version of Asterisk 18 is 18.17.0.

ok i will check with that version and getback to you, Thank you

hello, i have updated the version to 18.17 and that issue got solved. But I still have no voice and i can see asterisk is converting RTP to SRTP And sending back to kamailio. Why this is happened ? user is a webrtc user registered with kamailio

Asterisk converts everything to an internal media frame format and then converts that back out to an appropriate format on the other side, so there will be no direct conversion of RTP to SRTP.

I think you need to provide the full INVITE and SDP response for both legs.

in the below can rtp sending to 10.13.1.127 is in srtp, how can i force it to RTP only

T 10.13.1.127:45334 → 10.13.1.170:5060 [AP] #80
INVITE sip:09496381412@kamalio.teleforce.in SIP/2.0…Record-Route: sip:103.25.164.61:5060;r2=on;lr=on;ftag=6jr07hd13n;nat=yes…Record-Route: <s
ip:103.25.164.61:8089;transport=ws;r2=on;lr=on;ftag=6jr07hd13n;nat=yes>…Via: SIP/2.0/TCP 103.25.164.61:5060;branch=z9hG4bKaeb4.91d7034afd1e4cab3
cc90d03a5430e90.0…Via: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK6491113…Max-Forwards: 68…To: <sip:09
496381412@kamalio.teleforce.in>…From: sip:developer@kamalio.teleforce.in;tag=6jr07hd13n…Call-ID: 0q3riecg7aiolsgav5ub…CSeq: 8838 INVITE…Con
tact: sip:ipj4pga4@8pf2s54pm4pi.invalid;transport=ws;ob;alias=122.161.108.16~52439~6;alias=122.161.108.16~52439~6…Content-Type: application/sd
p…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: 1247…v=0…o=- 1870683977681579020 2 IN IP4 10.13.1.127…s=-…t=0 0…a=extmap-allow-mixed…a=msid-semantic: WMS
WUDSOg9swH8RLcGBbzi8IAHFBzNEemw33Cay…m=audio 11444 RTP/AVP 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 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time..a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-tra
nsport-wide-cc-extensions-01…a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid…a=msid:WUDSOg9swH8RLcGBbzi8IAHFBzNEemw33Cay 6af1aa3b-e86b-4ab3-9125
-ad62abe86501…a=ssrc:2282244195 cname:TFHN1tYa/TsJncj7…a=ssrc:2282244195 msid:WUDSOg9swH8RLcGBbzi8IAHFBzNEemw33Cay 6af1aa3b-e86b-4ab3-9125-ad62
abe86501…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:1
26 telephone-event/8000…a=sendrecv…a=rtcp:11445…a=rtcp-mux…a=ice-ufrag:IKo2xj9q…a=ice-pwd:M1e5SLVCo02pS04mVkkNKnBU90…a=candidate:smpiGs4Ss7
Jqunp4 1 UDP 2130706431 10.13.1.127 11444 typ host…a=candidate:smpiGs4Ss7Jqunp4 2 UDP 2130706430 10.13.1.127 11445 typ host…

T 10.13.1.170:5060 → 10.13.1.127:45334 [AP] #82
SIP/2.0 100 Trying…Via: SIP/2.0/TCP 103.25.164.61:5060;rport=45334;received=10.13.1.127;branch=z9hG4bKaeb4.91d7034afd1e4cab3cc90d03a5430e90.0…V
ia: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK6491113…Record-Route: <sip:10.13.1.127:45334;transport=TC
P;lr;r2=on;ftag=6jr07hd13n;nat=yes>…Record-Route: sip:103.25.164.61:8089;transport=ws;lr;r2=on;ftag=6jr07hd13n;nat=yes…Call-ID: 0q3riecg7aiol
sgav5ub…From: sip:developer@kamalio.teleforce.in;tag=6jr07hd13n…To: sip:09496381412@kamalio.teleforce.in…CSeq: 8838 INVITE…Server: Asteri
sk PBX 18.17.0…Content-Length: 0…

U 10.13.1.170:5060 → 10.13.1.102:5060 #83
INVITE sip:09496381412@10.13.1.102:5060 SIP/2.0…Via: SIP/2.0/UDP 10.13.1.170:5060;rport;branch=z9hG4bKPjeba846ff-9131-49b7-b38f-ce3c92108a41…Fr
om: sip:00917969146223@10.13.1.152;tag=ec46b228-847d-48b9-bfb2-789e735f1fe3…To: sip:09496381412@10.13.1.102…Contact: <sip:asterisk@10.13.1.
170:5060>…Call-ID: 5cf1f7a2-c2b0-46a4-9517-20360c9bfefb…CSeq: 1336 INVITE…Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, B
YE, CANCEL, UPDATE, PRACK, MESSAGE, REFER…Supported: 100rel, timer, replaces, norefersub, histinfo…Session-Expires: 1800…Min-SE: 90…Max-Forwa
rds: 70…User-Agent: Asterisk PBX 18.17.0…Content-Type: application/sdp…Content-Length: 235…v=0…o=- 1742293368 1742293368 IN IP4 10.13.1.
170…s=Asterisk…c=IN IP4 10.13.1.170…t=0 0…m=audio 10114 RTP/AVP 8 101…a=rtpmap:8 PCMA/8000…a=rtpmap:101 telephone-event/8000…a=fmtp:101 0-
16…a=ptime:20…a=maxptime:150…a=sendrecv…

U 10.13.1.102:5060 → 10.13.1.170:5060 #84
SIP/2.0 100 trying – your call is important to us…Via: SIP/2.0/UDP 10.13.1.170:5060;rport=5060;branch=z9hG4bKPjeba846ff-9131-49b7-b38f-ce3c9210
8a41;received=10.13.1.170…From: sip:00917969146223@10.13.1.152;tag=ec46b228-847d-48b9-bfb2-789e735f1fe3…To: sip:09496381412@10.13.1.102…Ca
ll-ID: 5cf1f7a2-c2b0-46a4-9517-20360c9bfefb…CSeq: 1336 INVITE…Server: kamailio (5.2.8 (x86_64/linux))…Content-Length: 0…

U 10.13.1.102:5060 → 10.13.1.170:5060 #86
SIP/2.0 183 Session Progress…Require:100rel…Content-Type:application/sdp…Via: SIP/2.0/UDP 10.13.1.170:5060;received=10.13.1.170;rport=5060;bra
nch=z9hG4bKPjeba846ff-9131-49b7-b38f-ce3c92108a41…Record-Route: sip:10.53.64.246;r2=on;lr=on;ftag=ec46b228-847d-48b9-bfb2-789e735f1fe3;nat=yes
…Record-Route: sip:10.13.1.102;r2=on;lr=on;ftag=ec46b228-847d-48b9-bfb2-789e735f1fe3;nat=yes…Call-ID:5cf1f7a2-c2b0-46a4-9517-20360c9bfefb…CS
eq:1336 INVITE…From:sip:00917969146223@10.13.1.152;tag=ec46b228-847d-48b9-bfb2-789e735f1fe3…To:sip:09496381412@10.13.1.102;tag=uc13CA5F37…
Allow:INVITE,ACK,OPTIONS,BYE,CANCEL,UPDATE,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,MESSAGE…Contact:sip:09496381412@10.60.19.16:5061…RSeq:167965636
5…Content-Length:227…v=0…o=UTSTARCOM 808493398 3911661753 IN IP4 10.53.64.246…s=-…c=IN IP4 10.53.64.246…t=0 0…m=audio 51230 RTP/AVP 8 10
1…a=sendrecv…a=rtpmap:8 PCMA/8000…a=rtpmap:101 telephone-event/8000…a=fmtp:101 0-16…a=nortpproxy:yes…

U 10.13.1.170:5060 → 10.13.1.102:5060 #87
PRACK sip:09496381412@10.60.19.16:5061 SIP/2.0…Via: SIP/2.0/UDP 10.13.1.170:5060;rport;branch=z9hG4bKPjcbaa8094-de0c-4a32-bc21-31773e7eac97…Fro
m: sip:00917969146223@10.13.1.152;tag=ec46b228-847d-48b9-bfb2-789e735f1fe3…To: sip:09496381412@10.13.1.102;tag=uc13CA5F37…Call-ID: 5cf1f7a2
-c2b0-46a4-9517-20360c9bfefb…CSeq: 1337 PRACK…Route: sip:10.13.1.102:5060;lr;r2=on;ftag=ec46b228-847d-48b9-bfb2-789e735f1fe3;nat=yes…Route:
sip:10.53.64.246;lr;r2=on;ftag=ec46b228-847d-48b9-bfb2-789e735f1fe3;nat=yes…RAck: 1679656365 1336 INVITE…Max-Forwards: 70…User-Agent: Asteri
sk PBX 18.17.0…Content-Length: 0…

T 10.13.1.170:5060 → 10.13.1.127:45334 [AP] #88
SIP/2.0 183 Session Progress…Via: SIP/2.0/TCP 103.25.164.61:5060;rport=45334;received=10.13.1.127;branch=z9hG4bKaeb4.91d7034afd1e4cab3cc90d03a54
30e90.0…Via: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK6491113…Record-Route: <sip:10.13.1.127:45334;tr
ansport=TCP;lr;r2=on;ftag=6jr07hd13n;nat=yes>…Record-Route: sip:103.25.164.61:8089;transport=ws;lr;r2=on;ftag=6jr07hd13n;nat=yes…Call-ID: 0q3
riecg7aiolsgav5ub…From: sip:developer@kamalio.teleforce.in;tag=6jr07hd13n…To: sip:09496381412@kamalio.teleforce.in;tag=1b998aa9-5c31-4ae1-b
a28-c4563fc9af37…CSeq: 8838 INVITE…Server: Asterisk PBX 18.17.0…Contact: sip:10.13.1.170:5060;transport=TCP…Allow: OPTIONS, REGISTER, SUBSC
RIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER…Content-Type: application/sdp…Content-Length: 283…v=0…o=-
2562305036 4 IN IP4 10.13.1.170…s=Asterisk…c=IN IP4 10.13.1.170…t=0 0…m=audio 16340 RTP/AVP 111 0 126…a=rtpmap:111 opus/48000/2…a=fmtp:111
useinbandfec=1…a=rtpmap:0 PCMU/8000…a=rtpmap:126 telephone-event/8000…a=fmtp:126 0-16…a=ptime:20…a=maxptime:20…a=sendrecv…

U 10.13.1.102:5060 → 10.13.1.170:5060 #90
SIP/2.0 200 OK…Via: SIP/2.0/UDP 10.13.1.170:5060;received=10.13.1.170;rport=5060;branch=z9hG4bKPjcbaa8094-de0c-4a32-bc21-31773e7eac97…Call-ID:5
cf1f7a2-c2b0-46a4-9517-20360c9bfefb…CSeq:1337 PRACK…From:sip:00917969146223@10.13.1.152;tag=ec46b228-847d-48b9-bfb2-789e735f1fe3…To:<sip:094
96381412@10.13.1.102>;tag=uc13CA5F37…Content-Length:0…

U 10.13.1.102:5060 → 10.13.1.170:5060 #229
SIP/2.0 500 Internal Server Error…Reason:Q.850;cause=88…Via: SIP/2.0/UDP 10.13.1.170:5060;received=10.13.1.170;rport=5060;branch=z9hG4bKPjeba84
6ff-9131-49b7-b38f-ce3c92108a41…Record-Route: sip:10.53.64.246;r2=on;lr=on;ftag=ec46b228-847d-48b9-bfb2-789e735f1fe3;nat=yes…Record-Route: <s
ip:10.13.1.102;r2=on;lr=on;ftag=ec46b228-847d-48b9-bfb2-789e735f1fe3;nat=yes>…Call-ID:5cf1f7a2-c2b0-46a4-9517-20360c9bfefb…CSeq:1336 INVITE…Fr
om:sip:00917969146223@10.13.1.152;tag=ec46b228-847d-48b9-bfb2-789e735f1fe3…To:sip:09496381412@10.13.1.102;tag=uc13CA5F37…Content-Length:0…

U 10.13.1.170:5060 → 10.13.1.102:5060 #230
ACK sip:09496381412@10.13.1.102:5060 SIP/2.0…Via: SIP/2.0/UDP 10.13.1.170:5060;rport;branch=z9hG4bKPjeba846ff-9131-49b7-b38f-ce3c92108a41…From:
sip:00917969146223@10.13.1.152;tag=ec46b228-847d-48b9-bfb2-789e735f1fe3…To: sip:09496381412@10.13.1.102;tag=uc13CA5F37…Call-ID: 5cf1f7a2-c
2b0-46a4-9517-20360c9bfefb…CSeq: 1336 ACK…Max-Forwards: 70…User-Agent: Asterisk PBX 18.17.0…Content-Length: 0…

T 10.13.1.170:5060 → 10.13.1.127:45334 [AP] #231
SIP/2.0 603 Decline…Via: SIP/2.0/TCP 103.25.164.61:5060;rport=45334;received=10.13.1.127;branch=z9hG4bKaeb4.91d7034afd1e4cab3cc90d03a5430e90.0…
Via: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK6491113…Record-Route: <sip:10.13.1.127:45334;transport=T
CP;lr;r2=on;ftag=6jr07hd13n;nat=yes>…Record-Route: sip:103.25.164.61:8089;transport=ws;lr;r2=on;ftag=6jr07hd13n;nat=yes…Call-ID: 0q3riecg7aio
lsgav5ub…From: sip:developer@kamalio.teleforce.in;tag=6jr07hd13n…To: sip:09496381412@kamalio.teleforce.in;tag=1b998aa9-5c31-4ae1-ba28-c4563
fc9af37…CSeq: 8838 INVITE…Server: Asterisk PBX 18.17.0…Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE,
PRACK, MESSAGE, REFER…Reason: Q.850;cause=88…Content-Length: 0…

T 10.13.1.127:45334 → 10.13.1.170:5060 [AP] #233
ACK sip:09496381412@kamalio.teleforce.in SIP/2.0…Via: SIP/2.0/TCP 103.25.164.61:5060;branch=z9hG4bKaeb4.91d7034afd1e4cab3cc90d03a5430e90.0…Max-
Forwards: 68…To: sip:09496381412@kamalio.teleforce.in;tag=1b998aa9-5c31-4ae1-ba28-c4563fc9af37…From: sip:developer@kamalio.teleforce.in;tag
=6jr07hd13n…Call-ID: 0q3riecg7aiolsgav5ub…CSeq: 8838 ACK…Content-Length: 0…

That’s unreadable. Even the raw posting is unreadable.

i have attached the file in the below link

why it is converting rtp from 10.13.1.102 ---- asterisk ----- 10.13.1.127

The only unencrypted INVITEs I can find are:

INVITE sip:09496381412@kamalio.teleforce.in SIP/2.0
Record-Route: <sip:103.25.164.61:5060;r2=on;lr=on;ftag=44pptomrpr;nat=yes>
Record-Route: <sip:103.25.164.61:8089;transport=ws;r2=on;lr=on;ftag=44pptomrpr;nat=yes>
Via: SIP/2.0/TCP 103.25.164.61:5060;branch=z9hG4bKeba9.328dc0067dbf72b1896dd8724704d576.0
Via: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK2214876
Max-Forwards: 68
To: <sip:09496381412@kamalio.teleforce.in>
From: <sip:developer@kamalio.teleforce.in>;tag=44pptomrpr
Call-ID: 0q3ri3ifl0cu30euffsc
CSeq: 4572 INVITE
Contact: <sip:ipj4pga4@8pf2s54pm4pi.invalid;transport=ws;ob;alias=122.161.108.16~52439~6;alias=122.161.108.16~52439~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: 1247

v=0
o=- 7780065080334026344 2 IN IP4 10.13.1.127
s=-
t=0 0
a=extmap-allow-mixed
a=msid-semantic: WMS jbt3xpdU6ZguleOrOqrsWH0KHVm743N11ieX
m=audio 11476 RTP/AVP 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 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
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:jbt3xpdU6ZguleOrOqrsWH0KHVm743N11ieX 12dd1220-6ae2-4875-83b5-0a2b15ff62c8
a=ssrc:1044065842 cname:uSh2sJdD/8ZVbNGC
a=ssrc:1044065842 msid:jbt3xpdU6ZguleOrOqrsWH0KHVm743N11ieX 12dd1220-6ae2-4875-83b5-0a2b15ff62c8
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:11477
a=rtcp-mux
a=ice-ufrag:Xv4bo0Ix
a=ice-pwd:i8S4N4R5x5pfnrByM7mnXsAlRA
a=candidate:smpiGs4Ss7Jqunp4 1 UDP 2130706431 10.13.1.127 11476 typ host
a=candidate:smpiGs4Ss7Jqunp4 2 UDP 2130706430 10.13.1.127 11477 typ host
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 103.25.164.61:5060;rport=45334;received=10.13.1.127;branch=z9hG4bKeba9.328dc0067dbf72b1896dd8724704d576.0
Via: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK2214876
Record-Route: <sip:10.13.1.127:45334;transport=TCP;lr;r2=on;ftag=44pptomrpr;nat=yes>
Record-Route: <sip:103.25.164.61:8089;transport=ws;lr;r2=on;ftag=44pptomrpr;nat=yes>
Call-ID: 0q3ri3ifl0cu30euffsc
From: <sip:developer@kamalio.teleforce.in>;tag=44pptomrpr
To: <sip:09496381412@kamalio.teleforce.in>
CSeq: 4572 INVITE
Server: Asterisk PBX 18.17.0
Content-Length:  0

SIP/2.0 183 Session Progress
Via: SIP/2.0/TCP 103.25.164.61:5060;rport=45334;received=10.13.1.127;branch=z9hG4bKeba9.328dc0067dbf72b1896dd8724704d576.0
Via: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK2214876
Record-Route: <sip:10.13.1.127:45334;transport=TCP;lr;r2=on;ftag=44pptomrpr;nat=yes>
Record-Route: <sip:103.25.164.61:8089;transport=ws;lr;r2=on;ftag=44pptomrpr;nat=yes>
Call-ID: 0q3ri3ifl0cu30euffsc
From: <sip:developer@kamalio.teleforce.in>;tag=44pptomrpr
To: <sip:09496381412@kamalio.teleforce.in>;tag=f624a238-536a-4173-ab75-1c04ac08def6
CSeq: 4572 INVITE
Server: Asterisk PBX 18.17.0
Contact: <sip:10.13.1.170:5060;transport=TCP>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Type: application/sdp
Content-Length:   283

v=0
o=- 1387988584 4 IN IP4 10.13.1.170
s=Asterisk
c=IN IP4 10.13.1.170
t=0 0
m=audio 16706 RTP/AVP 111 0 126
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1
a=rtpmap:0 PCMU/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
SIP/2.0 603 Decline
Via: SIP/2.0/TCP 103.25.164.61:5060;rport=45334;received=10.13.1.127;branch=z9hG4bKeba9.328dc0067dbf72b1896dd8724704d576.0
Via: SIP/2.0/WSS 8pf2s54pm4pi.invalid;rport=52439;received=122.161.108.16;branch=z9hG4bK2214876
Record-Route: <sip:10.13.1.127:45334;transport=TCP;lr;r2=on;ftag=44pptomrpr;nat=yes>
Record-Route: <sip:103.25.164.61:8089;transport=ws;lr;r2=on;ftag=44pptomrpr;nat=yes>
Call-ID: 0q3ri3ifl0cu30euffsc
From: <sip:developer@kamalio.teleforce.in>;tag=44pptomrpr
To: <sip:09496381412@kamalio.teleforce.in>;tag=f624a238-536a-4173-ab75-1c04ac08def6
CSeq: 4572 INVITE
Server: Asterisk PBX 18.17.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Reason: Q.850;cause=88
Content-Length:  0

ACK sip:09496381412@kamalio.teleforce.in SIP/2.0
Via: SIP/2.0/TCP 103.25.164.61:5060;branch=z9hG4bKeba9.328dc0067dbf72b1896dd8724704d576.0
Max-Forwards: 68
To: <sip:09496381412@kamalio.teleforce.in>;tag=f624a238-536a-4173-ab75-1c04ac08def6
From: <sip:developer@kamalio.teleforce.in>;tag=44pptomrpr
Call-ID: 0q3ri3ifl0cu30euffsc
CSeq: 4572 ACK
Content-Length: 0

and

INVITE sip:09496381412@10.13.1.102:5060 SIP/2.0
Via: SIP/2.0/UDP 10.13.1.170:5060;rport;branch=z9hG4bKPj4350e231-f09f-4424-ab27-4acdf3ece77b
From: <sip:00917969146223@10.13.1.152>;tag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac
To: <sip:09496381412@10.13.1.102>
Contact: <sip:asterisk@10.13.1.170:5060>
Call-ID: a206ef19-0d36-4b99-9f99-f30191f420a5
CSeq: 15360 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.0
Content-Type: application/sdp
Content-Length:   235

v=0
o=- 1612693796 1612693796 IN IP4 10.13.1.170
s=Asterisk
c=IN IP4 10.13.1.170
t=0 0
m=audio 19878 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 10.13.1.170:5060;rport=5060;branch=z9hG4bKPj4350e231-f09f-4424-ab27-4acdf3ece77b;received=10.13.1.170
From: <sip:00917969146223@10.13.1.152>;tag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac
To: <sip:09496381412@10.13.1.102>
Call-ID: a206ef19-0d36-4b99-9f99-f30191f420a5
CSeq: 15360 INVITE
Server: kamailio (5.2.8 (x86_64/linux))
Content-Length: 0

SIP/2.0 183 Session Progress
Require:100rel
Content-Type:application/sdp
Via: SIP/2.0/UDP 10.13.1.170:5060;received=10.13.1.170;rport=5060;branch=z9hG4bKPj4350e231-f09f-4424-ab27-4acdf3ece77b
Record-Route: <sip:10.53.64.246;r2=on;lr=on;ftag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac;nat=yes>
Record-Route: <sip:10.13.1.102;r2=on;lr=on;ftag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac;nat=yes>
Call-ID:a206ef19-0d36-4b99-9f99-f30191f420a5
CSeq:15360 INVITE
From:<sip:00917969146223@10.13.1.152>;tag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac
To:<sip:09496381412@10.13.1.102>;tag=ucDB6B8E33
Allow:INVITE,ACK,OPTIONS,BYE,CANCEL,UPDATE,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,MESSAGE
Contact:sip:09496381412@10.60.19.16:5061
RSeq:1679657666
Content-Length:227

v=0
o=UTSTARCOM 806907550 3911674763 IN IP4 10.53.64.246
s=-
c=IN IP4 10.53.64.246
t=0 0
m=audio 51836 RTP/AVP 8 101
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=nortpproxy:yes
PRACK sip:09496381412@10.60.19.16:5061 SIP/2.0
Via: SIP/2.0/UDP 10.13.1.170:5060;rport;branch=z9hG4bKPjea2a2407-df67-42ef-afcc-24c7506a0763
From: <sip:00917969146223@10.13.1.152>;tag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac
To: <sip:09496381412@10.13.1.102>;tag=ucDB6B8E33
Call-ID: a206ef19-0d36-4b99-9f99-f30191f420a5
CSeq: 15361 PRACK
Route: <sip:10.13.1.102:5060;lr;r2=on;ftag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac;nat=yes>
Route: <sip:10.53.64.246;lr;r2=on;ftag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac;nat=yes>
RAck: 1679657666 15360 INVITE
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.0
Content-Length:  0

SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.13.1.170:5060;received=10.13.1.170;rport=5060;branch=z9hG4bKPjea2a2407-df67-42ef-afcc-24c7506a0763
Call-ID:a206ef19-0d36-4b99-9f99-f30191f420a5
CSeq:15361 PRACK
From:<sip:00917969146223@10.13.1.152>;tag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac
To:<sip:09496381412@10.13.1.102>;tag=ucDB6B8E33
Content-Length:0

SIP/2.0 500 Internal Server Error
Reason:Q.850;cause=88
Via: SIP/2.0/UDP 10.13.1.170:5060;received=10.13.1.170;rport=5060;branch=z9hG4bKPj4350e231-f09f-4424-ab27-4acdf3ece77b
Record-Route: <sip:10.53.64.246;r2=on;lr=on;ftag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac;nat=yes>
Record-Route: <sip:10.13.1.102;r2=on;lr=on;ftag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac;nat=yes>
Call-ID:a206ef19-0d36-4b99-9f99-f30191f420a5
CSeq:15360 INVITE
From:<sip:00917969146223@10.13.1.152>;tag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac
To:<sip:09496381412@10.13.1.102>;tag=ucDB6B8E33
Content-Length:0

ACK sip:09496381412@10.13.1.102:5060 SIP/2.0
Via: SIP/2.0/UDP 10.13.1.170:5060;rport;branch=z9hG4bKPj4350e231-f09f-4424-ab27-4acdf3ece77b
From: <sip:00917969146223@10.13.1.152>;tag=7bb14de4-066e-4b8c-b8f3-f85d4eedadac
To: <sip:09496381412@10.13.1.102>;tag=ucDB6B8E33
Call-ID: a206ef19-0d36-4b99-9f99-f30191f420a5
CSeq: 15360 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.0
Content-Length:  0

Both of which fail, and both of which have both sides offering RTP/AVP, so not SRTP.

yes sorry, in this pcap file i got both side rtp only. I have disabled webrtc = no and after that it sending plain rtp… let me check in detail about it, coz still i have no voice and call get disconnected immedeatly after answering

This was also posted on sr-users:

https://www.mail-archive.com/sr-users@lists.kamailio.org/msg19142.html

when webrtc = yes then it is sending srtp, how can i use plain rtp

– Executing [09496381412@agent-voip-outgoing:1] NoOp(“PJSIP/developer-0000003c”, “testing of outgoing”) in new stack
– Executing [09496381412@agent-voip-outgoing:2] Set(“PJSIP/developer-0000003c”, “CALLERID(ALL)=00917969146223”) in new stack
– Executing [09496381412@agent-voip-outgoing:3] Dial(“PJSIP/developer-0000003c”, “PJSIP/09496381412@SM00917969146223”) in new stack
– Called PJSIP/09496381412@SM00917969146223
> 0x7f1cd8161960 – Strict RTP learning after remote address set to: 10.53.64.246:53978
– PJSIP/SM00917969146223-0000003d is making progress passing it to PJSIP/developer-0000003c
> 0x7f1cd82510e0 – Strict RTP learning after remote address set to: 10.13.1.127:10306
> 0x7f1cd82510e0 – Strict RTP learning after ICE completion
– PJSIP/developer-0000003c requested media update control 26, passing it to PJSIP/SM00917969146223-0000003d
> 0x7f1cd8161960 – Strict RTP switching to RTP target address 10.53.64.246:53978 as source
> 0x7f1cd82510e0 – Strict RTP learning after remote address set to: 10.13.1.127:10306
> 0x7f1cd8161960 – Strict RTP learning complete - Locking on source address 10.53.64.246:53978
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [09496381412@agent-voip-outgoing:4] Hangup(“PJSIP/developer-0000003c”, “”) in new stack
== Spawn extension (agent-voip-outgoing, 09496381412, 4) exited non-zero on ‘PJSIP/developer-0000003c’

I have a question, I understand that the jssip webrtc client i am using is not providing ice candidates. But when that is connecting to asterisk its working fine without offering SDP without ice candidates. How does asterisk handle this when client sending invite with SDP which has no ice candidates?. what alternative way asterisk handle this ?

If you don’t want to use WebRTC, then you don’t set “webrtc”. The option enables all the required aspects of WebRTC - ICE, DTLS-SRTP, and more.

As for JsSIP directly to Asterisk you haven’t provided any trace or log to show it, so I can’t comment.

Actuay my jssip webrtc client register with kamailio and forwards the registration requests to asterisk also. The same user is configured in asterisk with webrtc =yes, done because otherwise asterisk giving me error no media or nothing, when call routing from kamailio to asterisk.
When i remove kamailio and connect jssip directly with asterisk it works fine. The issue is only when the jssip is connected to kamailio and then route the call to asterisk.
But here i understood that jssip is not sending ICE candidates, still asterisk doesnot have any issue to handle call. that is what i am asking. I will take the logs and will getback to you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.