×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    204

    Thumbs down SIP Message With Public IP?

    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

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: SIP Message With Public IP?

    Quote Originally Posted by srivatsan.d View Post
    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.
    That initial assumption is not necessarily wrong, if IM function is provided by an external AS, it may work on a different set of ports than the SIP functions.

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    204

    Re: SIP Message With Public IP?

    Quote Originally Posted by wizard_hu_ View Post
    That initial assumption is not necessarily wrong, if IM function is provided by an external AS, it may work on a different set of ports than the SIP functions.
    Thanks wizard_hu_,

    I am using device default profile(under settings->connection->SIP Settings) in which i set port as 5060, in same port the server is also running.

    Also is their any port we need to set in code for IM? Can you please explain me detail / any doc. for IM. I have posted my code here...

    Please let me know how to sort this problem.

    Regards,
    Srivatsan

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: SIP Message With Public IP?

    Unfortunately I am also a beginner with SIP. A thing you can try is monitoring network traffic (in the local network-case), and see if some ports are explicitly negotiated (since most negotiations are done in ASCII).
    But this approach may be a bit overkill indeed.

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    204

    Re: SIP Message With Public IP?

    Thanks wizard_hu_.

    Please let me know if you come across same problem and a solution for that. I'll also let all to know if i break this problem.

    Also looking for the other who faced same issue and got a solution for that.

    Thanks,
    Srivatsan

Similar Threads

  1. sip send MESSAGE on Nokia E61 fails.
    By infy_gcl in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2009-11-30, 11:15
  2. How to use public EtelGsmPhoneId getPhoneId() ?
    By cassioli in forum Mobile Java General
    Replies: 2
    Last Post: 2007-01-30, 12:49
  3. How to add Authorization header in REGISTER of SIP message
    By quexitao in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2006-12-01, 11:39
  4. Some SIP message bypass SIP Proxy server
    By ft_omersaleem in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-04-20, 16:28
  5. some problems with label
    By vivienzhung in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-21, 09:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×