I was trying to implement SIP video call functionality in my React Native app but I encountered an error while answering incoming video call and trying to set the remote description for the rtcsession connection using the offer sdp. I am new in this. Appreciate for the help.
Error that i get when setRemoteDescription
JsSIP:ERROR:RTCSession emit "peerconnection:setremotedescriptionfailed" [error:%o] +0ms Failed to set remote offer sdp: Failed to set remote video description send parameters.
local stream added to the rtcconnection
{
"active": true,
"_tracks": [
{
"_enabled": true,
"id": "8372103c-1c4a-442f-8841-97867af30da9",
"kind": "audio",
"label": "8372103c-1c4a-442f-8841-97867af30da9",
"muted": false,
"readonly": true,
"remote": false,
"readyState": "live"
},
{
"_enabled": true,
"id": "87132b30-e772-45dd-b019-df6cadb8861b",
"kind": "video",
"label": "87132b30-e772-45dd-b019-df6cadb8861b",
"muted": false,
"readonly": true,
"remote": false,
"readyState": "live"
}
],
"id": "39022e08-74c6-49fb-8dd9-afa5d794ca74",
"_reactTag": "39022e08-74c6-49fb-8dd9-afa5d794ca74"
}
RTCSessionDescription object that is used for setREmoteDescription
{
"sdp": "v=0\r\no=root 1578253156 1578253156 IN IP4 113.23.226.15\r\ns=Asterisk PBX 13.38.1\r\nc=IN IP4 113.23.226.15\r\nb=CT:384\r\nt=0 0\r\nm=audio 11916 RTP/SAVPF 0 8 101\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=maxptime:150\r\na=ice-ufrag:735bba93288ac39d423403dd62b029de\r\na=ice-pwd:5807641f17cfbadc38d4ca5f09006960\r\na=candidate:H7117e20f 1 UDP 2130706431 113.23.226.15 11916 typ host\r\na=candidate:Hac10f052 1 UDP 2130706431 172.16.240.82 11916 typ host\r\na=candidate:H7117e20f 2 UDP 2130706430 113.23.226.15 11917 typ host\r\na=candidate:Hac10f052 2 UDP 2130706430 172.16.240.82 11917 typ host\r\na=connection:new\r\na=setup:actpass\r\na=fingerprint:SHA-256 E3:81:B1:E2:C0:7D:A6:C3:81:CF:3E:5D:E6:2C:05:DD:31:33:EA:A8:21:F7:22:E2:64:FF:D5:20:15:3D:76:30\r\na=rtcp-mux\r\na=sendrecv\r\nm=video 13930 RTP/SAVPF 99 103 34 31\r\na=ice-ufrag:5c9dc2e13f4f02145f72eee9786ad40a\r\na=ice-pwd:557172d62f08d05734d46fe95a0ed915\r\na=candidate:H7117e20f 1 UDP 2130706431 113.23.226.15 13930 typ host\r\na=candidate:Hac10f052 1 UDP 2130706431 172.16.240.82 13930 typ host\r\na=candidate:H7117e20f 2 UDP 2130706430 113.23.226.15 13931 typ host\r\na=candidate:Hac10f052 2 UDP 2130706430 172.16.240.82 13931 typ host\r\na=connection:new\r\na=setup:actpass\r\na=fingerprint:SHA-256 E3:81:B1:E2:C0:7D:A6:C3:81:CF:3E:5D:E6:2C:05:DD:31:33:EA:A8:21:F7:22:E2:64:FF:D5:20:15:3D:76:30\r\na=rtpmap:99 H264/90000\r\na=fmtp:99 profile-level-id=42801F\r\na=rtpmap:103 h263-1998/90000\r\na=rtpmap:34 H263/90000\r\na=rtpmap:31 H261/90000\r\na=rtcp-mux\r\na=sendrecv\r\n",
"type": "offer"
}
The actual offer sdp
v=0
o=root 1578253156 1578253156 IN IP4 113.23.226.15
s=Asterisk PBX 13.38.1
c=IN IP4 113.23.226.15
b=CT:384
t=0 0
m=audio 11916 RTP/SAVPF 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=ice-ufrag:735bba93288ac39d423403dd62b029de
a=ice-pwd:5807641f17cfbadc38d4ca5f09006960
a=candidate:H7117e20f 1 UDP 2130706431 113.23.226.15 11916 typ host
a=candidate:Hac10f052 1 UDP 2130706431 172.16.240.82 11916 typ host
a=candidate:H7117e20f 2 UDP 2130706430 113.23.226.15 11917 typ host
a=candidate:Hac10f052 2 UDP 2130706430 172.16.240.82 11917 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 E3:81:B1:E2:C0:7D:A6:C3:81:CF:3E:5D:E6:2C:05:DD:31:33:EA:A8:21:F7:22:E2:64:FF:D5:20:15:3D:76:30
a=rtcp-mux
a=sendrecv
m=video 13930 RTP/SAVPF 99 103 34 31
a=ice-ufrag:5c9dc2e13f4f02145f72eee9786ad40a
a=ice-pwd:557172d62f08d05734d46fe95a0ed915
a=candidate:H7117e20f 1 UDP 2130706431 113.23.226.15 13930 typ host
a=candidate:Hac10f052 1 UDP 2130706431 172.16.240.82 13930 typ host
a=candidate:H7117e20f 2 UDP 2130706430 113.23.226.15 13931 typ host
a=candidate:Hac10f052 2 UDP 2130706430 172.16.240.82 13931 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 E3:81:B1:E2:C0:7D:A6:C3:81:CF:3E:5D:E6:2C:05:DD:31:33:EA:A8:21:F7:22:E2:64:FF:D5:20:15:3D:76:30
a=rtpmap:99 H264/90000
a=fmtp:99 profile-level-id=42801F
a=rtpmap:103 h263-1998/90000
a=rtpmap:34 H263/90000
a=rtpmap:31 H261/90000
a=rtcp-mux
a=sendrecv