I try to create an INVITE dialog with SIP plugin for Series60 v2.1. Here's how I do it:
a. Phone A sends an INVITE request with sdp content.
b. Phone B sends an OK response with altered sdp content (accepted media selected)
c. Phone A sends an ACK. But at this point Phone B gets a SIP -33 error (ErrorOccured(-33) gets called) , and no dialog is created. What could be a problem? How can I figure out what SIP -33 means? (I don't think it is a system wide error code because in Symbian it would mean KErrTimedOut, but I am pretty sure it has nothing to do with timeout)
I also tried it without SDP content, no success.
Here's my code:
///////////////////SENDING INVITE
CSIPAddress* toAddress = CSIPAddress::DecodeL(aBuddyAddr8);
CSIPToHeader* toHeader = CSIPToHeader::NewL(toAddress);
// and construct CSIPInviteDialogAssoc by using
// from- and toHeaders:
CSIPInviteDialogAssoc* inviteDialogAssoc =
CSIPInviteDialogAssoc::NewL(*iConnection, toHeader, *iProfile);
iSIPClientTransaction = inviteDialogAssoc->SendInviteL(/*msgElements*/);
///////////////////RECEIVING INVITE, RESPONSE WITH OK
void CSIPEngine::IncomingRequest (CSIPServerTransaction* aTransaction)
{
if (aTransaction->Type() == CSIPTransactionBase::EINVITE)
{
CSIPResponseElements* response;
response= CSIPResponseElements::NewL(200, _L8("OK"));
aTransaction->SendResponseL(response);
}
Error number like -33 seems to be one of the "system wide" errors and not specific to SIP stuff...
So I guess it can be related to sockets, where -33 is KErrTimeOut.
When writing my application I have the very same problem with the ACK proccessing... instead of launching the IncomingRequest (CSIPServerTransaction* aTransaction, CSIPDialog& /*aSIPDialog*/) callback function, I always see the ErrorOccured (TInt aError, CSIPTransactionBase& aTransaction) function getting called, saying I have a -33 (KErrTimeOut) error ( I don´t think it has anything to do with this either).
If you find (or already found ) the solution to this problem please let me know.. I´m going crazy trying to work this out!!
Hope it helps. My code is working now, so if you can't get yours to work, feel free ask!
I answered at once when I got informed of your post. However somehow this was weeks after you posted it (see the dates). So this informing system does not work very well, so if you want to contact me, do it through my email address. It is faster.
//NEXT LINE IS VERY IMPORTANT!!! IT IS THE SOLUTION TO -33 ERROR
iSIPInviteDialogAssoc=CSIPInviteDialogAssoc::NewL(*aTransaction);
was the thing I was missing and as soon as I included it in my code I finally got the "ACK Received!" message I was so desperately after.
You wouldn´t happen to know why this has to be done like that , would you? I went over the sample code and documentation time and again I didn´t see anything of the kind... It´s weird that you have to "create" a new association if that ACK is supposed to belong to the same INVITE procedure.
Thank you very much once again.. and be sure I´ll contact you if I come across any more problems with this SIP stack (didn´t add any SDP content yet..that´s my next step now that I know how to engage in a communication)
This may be because on Side A you have a CSIPInviteDialogAssoc object - you yourself created it. But on side B you don't. You need to create it somehow.
I can't recall where I found this solution. I browsed forum nokia for SIP guides and tutorials, and one of them had this line, so I tried and it did the trick.