Hi,
I am using s60 3rd ed. phone for developing a VOIP application.
The application also have Instant messaging function and i have my own SIP server using JAIN-SLEE.
When i run the server in LAN, everything works fine(Registration, Invite and Messaging.
My problem is,
1. When i moved the server to a public IP(static IP), only the registration and invite is working. Messaging doesn't reach server itself.
My initial assumption was because of some firewall the problem could be, but registration and invite works fine and so my assumption is wrong.
2. What could be the problem when moving to Public IP? is their any thing additionally added to messaging?
I am posting my messaging code here, please someone let me know if any additional things to be taken in account.
void CSIPIMEngine::SendInstantMessageL(const TDesC8& aMessage,
const TDesC8& aSipUri)
{
_LIT8 ( KMediaType, "text" );
_LIT8 ( KMediaSubType, "plain" );
CSIPRequestElements* reqElem = CreateReqElementsL(aSipUri);
CleanupStack::PushL(reqElem);
CSIPToHeader* toHeader = CreateToHeaderL(aSipUri);
CleanupStack::PushL(toHeader);
reqElem->SetToHeaderL(toHeader);
CleanupStack::Pop(toHeader);
const TDesC8* aor = NULL;
iProfile->GetParameter(KSIPUserAor, aor);
__ASSERT_ALWAYS ( aor && *aor != KNullDesC8, User::Leave ( KErrNotFound ) );
CSIPAddress* addr = CSIPAddress:ecodeL(*aor);
CleanupStack::PushL(addr);
CSIPFromHeader* fromHeader = CSIPFromHeader::NewL(addr);
CleanupStack::Pop(addr);
CleanupStack::PushL(fromHeader);
reqElem->SetFromHeaderL(fromHeader);
CleanupStack::Pop(fromHeader);
reqElem->SetMethodL(SIPStrings::StringF(SipStrConsts::EMessage));
CSIPMessageElements& msgElem = reqElem->MessageElements();
CSIPContentTypeHeader* ct = CSIPContentTypeHeader::NewLC(KMediaType,
KMediaSubType);
msgElem.SetContentL(aMessage.AllocL(), ct);
CleanupStack::Pop(ct);
CSIPConnection& conn = ConnectionL();
if (conn.State() == CSIPConnection::EActive && reqElem->FromHeader() != 0)
{
CSIPClientTransaction* clientTx = conn.SendRequestL(reqElem);
//CleanupStack::Pop(reqElem);
delete clientTx;
}
}
Thanks,
Srivatsan

ecodeL(*aor);



