Search code examples
iosquickblox

Quickblox didn't send xmppStream message


I'm trying to solve the next puzzle.

After I changed something in my code (I don't remember what exactly) QuickBlox again can't perform video call. But in this time the symptoms are different.

The log of standard video call example with my users:

2013-09-13 17:15:25.363 VideoChat[6971:1303] -[QBChat loginWithUser:] -> JID: [email protected]
2013-09-13 17:15:26.224 VideoChat[6971:1303] QBChat/didConnect
2013-09-13 17:15:26.835 VideoChat[6971:2203] -[QBChat xmppStreamDidAuthenticate:] -> user: 290427, supportsStartTLS: 1, isSecure: 0
2013-09-13 17:15:26.857 VideoChat[6971:1303] -[QBVideoChat init] -> 
2013-09-13 17:15:26.857 VideoChat[6971:1303] -[QBVideoChat orientatioDidChange:] -> Portrait
2013-09-13 17:15:26.891 VideoChat[6971:1303] -[QBChat xmppStream:didSendIQ:] -> IQ: <iq type="get" id="561006823"><query xmlns="jabber:iq:roster"/></iq>
2013-09-13 17:15:26.892 VideoChat[6971:1303] -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>
2013-09-13 17:15:26.989 VideoChat[6971:1303] -[QBChat xmppStream:didReceiveIQ:] -> <iq xmlns="jabber:client" id="561006823" type="result" to="[email protected]/tigase-10437"><query xmlns="jabber:iq:roster"/></iq>
2013-09-13 17:15:29.573 VideoChat[6971:2203] -[QBVideoChat callUser:conferenceType:customParameters:] -> VideoChat configuration: {
    kQBVideoChatBadConnectionTimeout = 5;
    kQBVideoChatCallTimeout = 20;
    kQBVideoChatFrameQualityPreset = AVCaptureSessionPresetLow;
    kQBVideoChatP2PTimeout = "1.5";
    kQBVideoChatTURNServerEndPoint = "turnserver.quickblox.com";
    kQBVideoChatVideoFramesPerSecond = 10;
    kQBVideoChatWriteQueueMaxAudioOperationsThreshold = 25;
    kQBVideoChatWriteQueueMaxVideoOperationsThreshold = 25;
}
2013-09-13 17:15:29.574 VideoChat[6971:2203] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="282475249" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:31.574 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1622650073" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:33.574 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="984943658" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:35.574 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1144108930" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:37.573 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="470211272" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:39.573 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="101027544" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:41.573 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1457850878" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:43.573 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1458777923" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:45.573 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="2007237709" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:47.573 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="823564440" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:49.572 VideoChat[6971:c07] chatCallUserDidNotAnswer 503867
2013-09-13 17:15:49.711 VideoChat[6971:1303] -[QBVideoChat finishCallWithStatus:customParameters:] -> kStopVideoChatCallStatus_OpponentDidNotAnswer
2013-09-13 17:15:49.711 VideoChat[6971:1303] -[QBVideoChat deinitialization] -> 
2013-09-13 17:15:49.711 VideoChat[6971:1303] -[QBVideoChat releaseVideoCapture] -> 
2013-09-13 17:15:49.711 VideoChat[6971:1303] -[QBVideoChat releaseAudioCapture] -> 
2013-09-13 17:15:49.712 VideoChat[6971:1303] -[QBVideoChat releaseSocketConnection] -> 
2013-09-13 17:15:49.712 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1115438165" type="qbvideochat_call" to="[email protected]" from="[email protected]"><body>1</body></message>
2013-09-13 17:15:49.712 VideoChat[6971:1303] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1784484492" type="qbvideochat_stopCall" to="[email protected]" from="[email protected]"><body>kStopVideoChatCallStatus_OpponentDidNotAnswer</body></message>
2013-09-13 17:15:57.267 VideoChat[6971:1307] -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>

My own application used to look exactly the same, but now it looks like this:

2013-09-13 17:21:20.884 DimChat[619:7e0f] -[QBChat loginWithUser:] -> Chat server endpoint: muc.chat.quickblox.com, User JID: [email protected]
2013-09-13 17:21:22.244 DimChat[619:7e0f] QBChat/didConnect
2013-09-13 17:21:23.056 DimChat[619:7e0f] -[QBChat xmppStreamDidAuthenticate:] -> user: 290427, supportsStartTLS: 1, isSecure: 0
2013-09-13 17:21:23.063 DimChat[619:7e0f] -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>
2013-09-13 17:21:23.064 DimChat[619:7e0f] -[QBChat xmppStream:didSendIQ:] -> IQ: <iq type="get" id="561006823"><query xmlns="jabber:iq:roster"/></iq>
2013-09-13 17:21:23.069 DimChat[619:7e0f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="0" type="chat" to="[email protected]" from="[email protected]"><body>Are you listen to me?</body></message>
2013-09-13 17:21:23.463 DimChat[619:7e0f] -[QBChat xmppStream:didReceiveIQ:] -> <iq xmlns="jabber:client" id="561006823" type="result" to="[email protected]/tigase-11219"><query xmlns="jabber:iq:roster"/></iq>
2013-09-13 17:21:23.491 DimChat[619:907] -[ASCallManager chatDidReceiveMessage:] [Line 169] received a message: Are you listen to me? from user: 290427
2013-09-13 17:21:39.798 DimChat[619:7e0f] -[QBVideoChat callUser:conferenceType:customParameters:] -> VideoChat configuration: {
    kQBVideoChatBadConnectionTimeout = 5;
    kQBVideoChatCallTimeout = 15;
    kQBVideoChatFrameQualityPreset = AVCaptureSessionPresetLow;
    kQBVideoChatP2PTimeout = "1.5";
    kQBVideoChatTURNServerEndPoint = "turnserver.quickblox.com";
    kQBVideoChatVideoFramesPerSecond = 10;
    kQBVideoChatWriteQueueMaxAudioOperationsThreshold = 25;
    kQBVideoChatWriteQueueMaxVideoOperationsThreshold = 25;
}
2013-09-13 17:21:43.058 DimChat[619:7e0f] -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>
2013-09-13 17:21:54.782 DimChat[619:1733] -[QBVideoChat finishCallWithStatus:customParameters:] -> kStopVideoChatCallStatus_OpponentDidNotAnswer
2013-09-13 17:21:54.785 DimChat[619:1733] -[QBVideoChat deinitialization] -> 
2013-09-13 17:21:54.787 DimChat[619:1733] -[QBVideoChat releaseVideoCapture] -> 
2013-09-13 17:21:54.788 DimChat[619:1733] -[QBVideoChat releaseAudioCapture] -> 
2013-09-13 17:21:54.790 DimChat[619:1733] -[QBVideoChat releaseSocketConnection] -> 
2013-09-13 17:22:03.057 DimChat[619:1733] -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>

As can you see there aren't any xmppStream:didSendMessage before kStopVideoChatCallStatus_OpponentDidNotAnswer. Does anybody know what the problem may be?


Solution

  • My mistake was in that: I used to make [QBVideoChat init] before [QBChat loginWithUser:]

    If I make them in the right order the application can perform video call as expected.