[jitsi-dev] iOS webrtc


#1

Hello,

i am going over steps to create this session and connection, i want to be sure that i am doing all the right things. With the sessions failing in the p2p i went back to the beginning and started rechecking.

the sequence as i understand it should be like this:

  IOS Jitsi-meet (via openfire)
  
      <-------- session-initiate
  create peerconnection observer
  create peer connection with observer
    add local streams to peer connection

  create offer
  translate jingle session-initiate to sdp
  create remote session descriptor from jingle session-initiate
    on callback for didcreatesessiondescription
      create local sessiondescription
    on callback for didsetsessiondescription
      for remote session
        drain candidates
      for local session
        ??? GET the sdp, build transport (session-accept)? I assume that this can not just be mocked up. it must be generated from something.
      
I believe now i should be constructing the jingle session-accept, from the LOCAL session description NOT the remote? isnt the remote what i just created from the sdp?

if i just let it go from here with this, it proceeds much farther than earlier, i do get ice callbacks. i get connections, then it falls apart and one by one drops them.

IT seems to me that getting this order right is important! and generating the session-accept must be complete.

how do i tell the other side about my local sdp? do i need to do something with that?

Ignored line: c=IN IP4 0.0.0.0
Ignored line: c=IN IP4 0.0.0.0
Created channel for audio
Created channel for audio
NACK enabled for channel 0
NACK enabled for channel 0
Created channel for video
Session:4674498588544665907 Old state:STATE_INIT New state:STATE_RECEIVEDINITIATE Type:urn:xmpp:jingle:apps:rtp:1 Transport:http://www.google.com/transport/p2p
2014-11-10 16:55:30.297 AppRTCDemo[5178:1463168] PCO onSignalingStateChange: 3
Setting remote voice description
Recv stream 672168196 reuse default channel
Stopping playout for channel #0
Add remote ssrc: 672168196
Disabling NACK for channel 2
Stopping playout for channel #2
New audio stream 3735928559 registered to VoiceEngine channel #2.
Add remote ssrc: 3735928559
Enabling audio level header extension with ID 1
Setting voice channel options: AudioOptions {}
Set voice channel options. Current options: AudioOptions {}
Changing voice state, recv=0 send=0
Setting remote voice description
Recv stream 672168196 reuse default channel
Stopping playout for channel #1
Add remote ssrc: 672168196
Disabling NACK for channel 3
Stopping playout for channel #3
New audio stream 3735928559 registered to VoiceEngine channel #3.
Add remote ssrc: 3735928559
Enabling audio level header extension with ID 1
Setting voice channel options: AudioOptions {}
Set voice channel options. Current options: AudioOptions {}
Changing voice state, recv=0 send=0
Setting remote video description
Hybrid NACK/FEC enabled for channel 0
Hybrid NACK/FEC enabled for channel 0
SetSendCodecs() : selected video codec VP8/1280x720x30fps@2000kbps (min=50kbps, start=300kbps)
Video max quantization: 56
VP8 number of temporal layers: 1
VP8 options : picture loss indication = 0, feedback mode = 0, complexity = normal, resilience = off, denoising = 0, error concealment = 0, automatic resize = 0, frame dropping = 1, key frame interval = 3000
Recv stream 3381205201 reuse default channel #0
Add remote ssrc: 3381205201
Hybrid NACK/FEC enabled for channel 1
New video stream 3735928559 registered to VideoEngine channel #1 and connected to channel #0
Add remote ssrc: 3735928559
Warning(webrtcvideoengine.cc:2685): SetReceiverBufferingMode(1, 0) failed, err=12606
Changing video state, recv=0 send=0
Warning(webrtcvoiceengine.cc:2622): SetOutputVolumePan(1, 1, 1) failed, err=8003
SetOutputScaling to left=1 right=1 for channel 1 and ssrc 672168196
Warning(webrtcvoiceengine.cc:2622): SetOutputVolumePan(3, 1, 1) failed, err=8003
SetOutputScaling to left=1 right=1 for channel 3 and ssrc 3735928559
RemoteVideoCapturer::Start
SetRenderer 3381205201 reuse default channel #0
RemoteVideoCapturer::Start
2014-11-10 16:55:30.364 AppRTCDemo[5178:1463168] PCO onAddStream.
2014-11-10 16:55:30.365 AppRTCDemo[5178:1463168] PCO onAddStream.
2014-11-10 16:55:30.365 AppRTCDemo[5178:1463168] PCO onAddStream.
Transport::ConnectChannels_w: No local description has been set. Will generate one.
Jingle:Channel[audio|1|__]: NULL DTLS identity supplied. Not doing DTLS
Jingle:Channel[audio|2|__]: NULL DTLS identity supplied. Not doing DTLS
Transport::ConnectChannels_w: No local description has been set. Will generate one.
Jingle:Channel[video|1|__]: NULL DTLS identity supplied. Not doing DTLS
Jingle:Channel[video|2|__]: NULL DTLS identity supplied. Not doing DTLS
Removing audio stream 3735928559 with VoiceEngine channel #3.
2014-11-10 16:55:30.375 AppRTCDemo[5178:1463040] SEQ4-Setup AppRTC video view
Destroyed channel
Warning(dtlstransport.h:86): Local fingerprint provided but no identity available
Warning(dtlstransport.h:86): Local fingerprint provided but no identity available
Error(webrtcsession.cc:268): SetLocalDescription failed: Failed to push down offer transport description.
Transport: audio, allocating candidates
Transport: audio, allocating candidates
2014-11-10 16:55:30.379 AppRTCDemo[5178:1463168] PCO onIceConnectionChange. 1
Transport: video, allocating candidates
Transport: video, allocating candidates
2014-11-10 16:55:30.380 AppRTCDemo[5178:1463168] SDP onSuccess() - possibly drain candidates
2014-11-10 16:55:30.380 AppRTCDemo[5178:1463168] SDP onFailure.
Jingle:Net[en0:9.2.50.0/23]: Allocation Phase=Udp
Jingle:Port[:1:0::Net[en0:9.2.50.0/23]]: Port created
Adding allocated port for video
Jingle:Port[video:1:0::Net[en0:9.2.50.0/23]]: Added port to allocator
Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:1:0:local:udp:9.2.55.184:5819|C--W|-]: Connection created
Jingle:Channel[video|1|__]: Created connection with origin=2, (1 total)
Jingle:Channel[video|1|__]: New best connection: Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:1:0:local:udp:9.2.55.184:5819|C--W|-]
Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:2:0:local:udp:9.2.55.184:5820|C--W|-]: Connection created
Jingle:Channel[video|2|__]: Created connection with origin=2, (1 total)
Jingle:Channel[video|2|__]: New best connection: Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:2:0:local:udp:9.2.55.184:5820|C--W|-]
Jingle:Net[pdp_ip0:10.55.84.67/32]: Allocation Phase=Udp
Jingle:Port[:1:0::Net[pdp_ip0:10.55.84.67/32]]: Port created
Adding allocated port for video

2014-11-10 16:55:34.743 AppRTCDemo[5178:1463168] PCO onIceGatheringChange. 1
2014-11-10 16:55:34.744 AppRTCDemo[5178:1463168] PCO onIceGatheringChange. 1
Jingle:Port[video:1:0::Net[pdp_ip0:10.55.84.67/32]]: Added port to allocator
2014-11-10 16:55:34.744 AppRTCDemo[5178:1463168] PCO onIceGatheringChange. 1
Jingle:Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:1:0:local:udp:9.2.55.184:5819|C--W|-]: Connection created
2014-11-10 16:55:34.744 AppRTCDemo[5178:1463168] PCO onIceGatheringChange. 1
Jingle:Channel[video|1|__]: Created connection with origin=2, (2 total)
2014-11-10 16:55:34.749 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:3131982484 1 udp 2113937151 9.2.50.11 56836 typ host generation 0

]
2014-11-10 16:55:34.750 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:3131982484 2 udp 2113937151 9.2.50.11 56836 typ host generation 0

]
Jingle:Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:2:0:local:udp:9.2.55.184:5820|C--W|-]: Connection created
Jingle:Channel[video|2|__]: Created connection with origin=2, (2 total)
Jingle:Net[en0:9.2.50.0/23]: Allocation Phase=Relay
2014-11-10 16:55:34.757 AppRTCDemo[5178:1463040] SEQ5-Starting AppRTC video view and camera capture
2014-11-10 16:55:34.770 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:3665899866 1 udp 2113937151 10.55.84.67 58815 typ host generation 0

]
2014-11-10 16:55:34.772 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:3665899866 2 udp 2113937151 10.55.84.67 58815 typ host generation 0

]
Jingle:Net[pdp_ip0:10.55.84.67/32]: Allocation Phase=Relay
2014-11-10 16:55:36.463 AppRTCDemo[5178:1463040] SDP onSuccess - drain candidates
Jingle:Net[en0:9.2.50.0/23]: Allocation Phase=Tcp
Jingle:Port[:1:0:local:Net[en0:9.2.50.0/23]]: Port created
Adding allocated port for video
Jingle:Port[video:1:0:local:Net[en0:9.2.50.0/23]]: Added port to allocator
2014-11-10 16:55:36.475 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:4096638564 1 tcp 1509957375 9.2.50.11 50817 typ host generation 0

]
2014-11-10 16:55:36.476 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:4096638564 2 tcp 1509957375 9.2.50.11 50817 typ host generation 0

]
Error(port.cc:409): Jingle:Port[video:1:0::Net[en0:9.2.50.0/23]]: Received STUN binding error: class=4 number=1 reason='unknown user ausmbNQdYoJafB0NpyWXY' from 9.2.55.184:5820
Error(port.cc:1270): Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:2:0:local:udp:9.2.55.184:5820|C--I|-]: Received STUN error response, code=1025; killing connection
Jingle:Channel[video|2|__]: Previous best connection: Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:2:0:local:udp:9.2.55.184:5820|C-xF|-]
Jingle:Channel[video|2|__]: New best connection: Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:2:0:local:udp:9.2.55.184:5820|C--I|-]
Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:2:0:local:udp:9.2.55.184:5820|C-xF|-]: Connection deleted
Jingle:Channel[video|2|__]: Removed connection (1 remaining)
Jingle:Net[pdp_ip0:10.55.84.67/32]: Allocation Phase=Tcp
Jingle:Port[:1:0:local:Net[pdp_ip0:10.55.84.67/32]]: Port created
Adding allocated port for video
Jingle:Port[video:1:0:local:Net[pdp_ip0:10.55.84.67/32]]: Added port to allocator
Jingle:Net[en0:9.2.50.0/23]: Allocation Phase=SslTcp
2014-11-10 16:55:36.522 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:2483211690 1 tcp 1509957375 10.55.84.67 50818 typ host generation 0

]
2014-11-10 16:55:36.524 AppRTCDemo[5178:1463168] PCO onICECandidate.
  Mid[video] Index[1] Sdp[a=candidate:2483211690 2 tcp 1509957375 10.55.84.67 50818 typ host generation 0

]
Error(port.cc:409): Jingle:Port[video:1:0::Net[en0:9.2.50.0/23]]: Received STUN binding error: class=4 number=1 reason='unknown user ausmbNQdYoJafB0NpyWXY' from 9.2.55.184:5819
Error(port.cc:1270): Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:1:0:local:udp:9.2.55.184:5819|C--I|-]: Received STUN error response, code=1025; killing connection
Jingle:Channel[video|1|__]: Previous best connection: Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:1:0:local:udp:9.2.55.184:5819|C-xF|-]
Jingle:Channel[video|1|__]: New best connection: Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:1:0:local:udp:9.2.55.184:5819|C--I|-]
Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:1:0:local:udp:9.2.55.184:5819|C-xF|-]: Connection deleted
Jingle:Channel[video|1|__]: Removed connection (1 remaining)
Jingle:Net[pdp_ip0:10.55.84.67/32]: Allocation Phase=SslTcp
All candidates gathered for video:1:0
Transport: video, component 1 allocation complete
Transport: video, component 2 allocation complete
Transport: video allocation complete
Jingle:Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:1:0:local:udp:9.2.55.184:5819|C--I|-]: Timed out after 15052 ms without a response, rtt=3000
Jingle:Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:2:0:local:udp:9.2.55.184:5820|C--I|-]: Timed out after 15051 ms without a response, rtt=3000
Jingle:Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:1:0:local:udp:9.2.55.184:5819|C-xI|-]: Connection deleted
Jingle:Channel[video|1|__]: Removed connection (0 remaining)
Jingle:Channel[video|1|__]: No best connection
Jingle:Conn[video:3tQ6vt+r:1:0:local:udp:10.55.84.67:58815->:2:0:local:udp:9.2.55.184:5820|C-xI|-]: Connection deleted
Jingle:Channel[video|2|__]: Removed connection (0 remaining)
Jingle:Channel[video|2|__]: No best connection
Jingle:Port[video:1:0::Net[en0:9.2.50.0/23]]: Port deleted
Jingle:Port[video:1:0::Net[en0:9.2.50.0/23]]: Removed port from allocator (3 remaining)
Removed port from p2p socket: 3 remaining
Removed port from p2p socket: 3 remaining
Jingle:Port[video:1:0::Net[pdp_ip0:10.55.84.67/32]]: Port deleted
Jingle:Port[video:1:0::Net[pdp_ip0:10.55.84.67/32]]: Removed port from allocator (2 remaining)
Removed port from p2p socket: 2 remaining
Removed port from p2p socket: 2 remaining
Jingle:Port[video:1:0:local:Net[en0:9.2.50.0/23]]: Port deleted
Jingle:Port[video:1:0:local:Net[en0:9.2.50.0/23]]: Removed port from allocator (1 remaining)
Removed port from p2p socket: 1 remaining
Removed port from p2p socket: 1 remaining
Jingle:Port[video:1:0:local:Net[pdp_ip0:10.55.84.67/32]]: Port deleted
Jingle:Port[video:1:0:local:Net[pdp_ip0:10.55.84.67/32]]: Removed port from allocator (0 remaining)
Removed port from p2p socket: 0 remaining
Removed port from p2p socket: 0 remaining

Peter Mycue
pmycue@us.ibm.com
pmycue@gmail.com
704-626-9772


#2

Hello,

i am going over steps to create this session and connection, i want to
be sure that i am doing all the right things. With the sessions failing
in the p2p i went back to the beginning and started rechecking.

the sequence as i understand it should be like this:

IOSJitsi-meet (via openfire)
<--------session-initiate
create peerconnection observer
create peer connection with observer
add local streams to peer connection

create offer

no. You get the offer from the session-initiate sdp two steps down.

translate jingle session-initiate to sdp
create remote session descriptor from jingle session-initiate

yes. do a setremotedescription with that.

on callback for didcreatesessiondescription

no. see above.

create local sessiondescription
on callback for didsetsessiondescription
for remote session
drain candidates
for local session
??? GET the sdp, build transport (session-accept)? I assume that this
can not just be mocked up. it must be generated from something.

Let me try to describe it another way.

You get the session-initiate.
You translate that into an SDP and do a SRD with type=offer
You get a SRD success callback. You call createAnswer.
You get a createAnswer callback with an sessiondescription whose type=answer
You do a SLD with the answer.
When you get the success callback, you transform the SDP to jingle and send it to the bridge/focus as session-accept.

https://github.com/LXJS/training-webrtc/blob/master/step3.png might be helpful (part of https://github.com/LXJS/training-webrtc/blob/master/WORKSHOP.md)

I believe now i should be constructing the jingle session-accept, from
the LOCAL session description NOT the remote?

Yes. From the answer. Simplified, session-initiate corresponds to offer, session-accept to answer.

isnt the remote what i
just created from the sdp?

if i just let it go from here with this, it proceeds much farther than
earlier, i do get ice callbacks. i get connections, then it falls apart
and one by one drops them.

*Warning(dtlstransport.h:86): Local fingerprint provided but no identity
available*

This looks like you're doing a SLD with the remote description.

*Error(port.cc <http://port.cc>:409):
Jingle:Port[video:1:0::Net[en0:9.2.50.0/23]]: Received STUN binding
error: class=4 number=1 reason='unknown user ausmbNQdYoJafB0NpyWXY' from
9.2.55.184:5819*
*Error(port.cc <http://port.cc>:1270):
Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:1:0:local:udp:9.2.55.184:5819|C--I|-]:
Received STUN error response, code=1025; killing connection*

This looks like the bridge is rejecting your connection because you're ice ufrag/pwd are wrong. But you seem to be sending / receiving udp to the bridge now at least.

···

Am 10.11.2014 um 14:10 schrieb Peter Mycue:


#3

That helps a lot.

looking at things so long it starts to spin sometimes.

I just went through all the signaling for the google app engine version and it makes more sense to me now, the key is on that, it does it backwards so i kept expecting behavior that would not
happen here.

it creates offer, creates local sdp, when it is created it signals back and then gets another message answer and creates the remote session description.

thanks,

Peter Mycue
pmycue@us.ibm.com
pmycue@gmail.com
704-626-9772

···

On Nov 10, 2014, at 5:41 PM, Philipp Hancke <fippo@goodadvice.pages.de> wrote:

Am 10.11.2014 um 14:10 schrieb Peter Mycue:

Hello,

i am going over steps to create this session and connection, i want to
be sure that i am doing all the right things. With the sessions failing
in the p2p i went back to the beginning and started rechecking.

the sequence as i understand it should be like this:

IOSJitsi-meet (via openfire)
<--------session-initiate
create peerconnection observer
create peer connection with observer
add local streams to peer connection

create offer

no. You get the offer from the session-initiate sdp two steps down.

translate jingle session-initiate to sdp
create remote session descriptor from jingle session-initiate

yes. do a setremotedescription with that.

on callback for didcreatesessiondescription

no. see above.

create local sessiondescription
on callback for didsetsessiondescription
for remote session
drain candidates
for local session
??? GET the sdp, build transport (session-accept)? I assume that this
can not just be mocked up. it must be generated from something.

Let me try to describe it another way.

You get the session-initiate.
You translate that into an SDP and do a SRD with type=offer
You get a SRD success callback. You call createAnswer.
You get a createAnswer callback with an sessiondescription whose type=answer
You do a SLD with the answer.
When you get the success callback, you transform the SDP to jingle and send it to the bridge/focus as session-accept.

https://github.com/LXJS/training-webrtc/blob/master/step3.png might be helpful (part of https://github.com/LXJS/training-webrtc/blob/master/WORKSHOP.md)

I believe now i should be constructing the jingle session-accept, from
the LOCAL session description NOT the remote?

Yes. From the answer. Simplified, session-initiate corresponds to offer, session-accept to answer.

isnt the remote what i
just created from the sdp?

if i just let it go from here with this, it proceeds much farther than
earlier, i do get ice callbacks. i get connections, then it falls apart
and one by one drops them.

*Warning(dtlstransport.h:86): Local fingerprint provided but no identity
available*

This looks like you're doing a SLD with the remote description.

*Error(port.cc <http://port.cc>:409):
Jingle:Port[video:1:0::Net[en0:9.2.50.0/23]]: Received STUN binding
error: class=4 number=1 reason='unknown user ausmbNQdYoJafB0NpyWXY' from
9.2.55.184:5819*
*Error(port.cc <http://port.cc>:1270):
Jingle:Conn[video:ZsJpbdjC:1:0:local:udp:9.2.50.11:56836->:1:0:local:udp:9.2.55.184:5819|C--I|-]:
Received STUN error response, code=1025; killing connection*

This looks like the bridge is rejecting your connection because you're ice ufrag/pwd are wrong. But you seem to be sending / receiving udp to the bridge now at least.

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev