×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    11

    SIP Invite Procedures

    Hello,

    I´m writing an application thas makes use of the SIP stack to take part in a communication
    and I´m having some problems in the last part of the INVITE procedure, so I´ll describe
    what I´m doing in case any of you may me help out.

    I´m using SIP Stack 1.0 working on Symbian Series 60 2.0.

    Here are the steps I followed:



    1. Send INVITE request from user A to user B (using SIP Server bundled with the SIP stack):



    void CSIPTransactionStateRegistered::InviteL()
    {

    ...

    iSIPEngine.iSIPClientTransaction=iSIPEngine.iSIPInviteDialogAssoc->SendInviteL();
    ...

    }


    2. user B receives Invitation and sends back 200 OK response:


    void CSIPTransactionStateRegistered::IncomingRequest (CSIPServerTransaction* aTransaction)
    {


    ...

    if (aTransaction->Type() == CSIPTransactionBase::EINVITE)
    {
    ...


    CSIPResponseElements* response = CSIPResponseElements::NewL(200,_L8("OK"));
    CleanupStack::PushL(response);
    aTransaction->SendResponseL(response);
    CleanupStack::Pop(response);
    ...

    }

    }

    3. User A receives 200 OK response and issues an ACK request to end the transaction:


    void CSIPTransactionStateWaitInvite200OK::IncomingResponse (CSIPClientTransaction& aTransaction, CSIPDialogAssocBase& aDialogAssoc)
    {
    User::InfoPrint(_L("Incoming Response"));
    if (aTransaction.Type() == CSIPTransactionBase::EINVITE)
    {


    if ((aTransaction.ResponseElements()->StatusCode() >=200)&&
    (aTransaction.ResponseElements()->StatusCode() <300) )

    {

    //seems like it doesn´t send this ACK
    iSIPEngine.iSIPInviteDialogAssoc->SendAckL(aTransaction);



    iSIPEngine.iConsole->PrintNotify(_L("INVITE accepted"));

    CSIPTransactionStateBase* nextState=new(ELeave) CSIPTransactionStateSessionConnected(iSIPEngine);
    iSIPEngine.SetCurrentState(nextState);

    }

    ...


    4. User B waits ACK to assume the connection has been stablished

    void CSIPTransactionStateWaitInviteACK::IncomingRequest (CSIPServerTransaction* aTransaction, CSIPDialog& /*aSIPDialog*/)
    {

    if (aTransaction->Type() == CSIPTransactionBase::EACK)
    {
    delete aTransaction;
    User::InfoPrint(_L("ACK Received!"));


    ...




    The problem here is that user B never seems to receive this ACK user A is supposed to send him. And
    user B keeps sending 200 OK messages periodically ( I guess until it receives this ACK)

    By looking at the SIP Server log (that I include at the end of the post) it looks like the ACK is never
    sent and I don´t find the reason why.

    Debugging the code I see the SendAckL(...) line is executed but not a trace of the message or anything in the log.

    Hope any of you guys can help. Thanks.



    In case it may help here is the extract of the operation from the log:




    [0x0810 13:19:49] SipTcpHandle: 5055376 received data (370):
    INVITE sip:almu@tartec SIP/2.0

    Route: <sip:192.168.1.2:5060;lr;transport=TCP>

    Via: SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    From: sip:nari@tartec;tag=ZrL94MMOsR

    To: sip:almu@tartec

    Contact: <sip:nari@192.168.1.11;comp=sigcomp>

    Supported: sec-agree

    CSeq: 316 INVITE

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    Max-Forwards: 70

    Content-Length: 0



    [0x0810 13:19:49] SipUdpHandle: 5056752 SendMessage: sending datagram:
    INVITE sip:almu@192.168.1.12;comp=sigcomp SIP/2.0

    Via: SIP/2.0/UDP 192.168.1.2;branch=z9hG4bK8a361833f9bbdfee685b403d7bbb8a97

    Route: <sip:192.168.1.2:5060;lr;transport=TCP>

    Via: SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    From: <sip:nari@tartec>;tag=ZrL94MMOsR

    To: <sip:almu@tartec>

    Contact: <sip:nari@192.168.1.11;comp=sigcomp>

    Supported: sec-agree

    CSeq: 316 INVITE

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    Max-Forwards: 69

    Content-Length: 0



    [0x0810 13:19:49] SipHandleManagerImpl: 4980808 ProcessUdpEvent: received datagram:
    SIP/2.0 100 Trying

    Via: SIP/2.0/UDP 192.168.1.2;branch=z9hG4bK8a361833f9bbdfee685b403d7bbb8a97,SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: sip:almu@tartec

    From: sip:nari@tartec;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0



    [0x0810 13:19:49] SipTcpHandle: 5055376 SendMessage: message generated:
    SIP/2.0 100 Trying

    Via: SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: <sip:almu@tartec>

    From: <sip:nari@tartec>;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0



    [0x0810 13:19:49] SipHandleManagerImpl: 4980808 ProcessUdpEvent: received datagram:
    SIP/2.0 200 OK

    Via: SIP/2.0/UDP 192.168.1.2;branch=z9hG4bK8a361833f9bbdfee685b403d7bbb8a97,SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: sip:almu@tartec;tag=I3qviXVpYV

    From: sip:nari@tartec;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0



    [0x0810 13:19:49] SipTcpHandle: 5055376 SendMessage: message generated:
    SIP/2.0 200 OK

    Via: SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: <sip:almu@tartec>;tag=I3qviXVpYV

    From: <sip:nari@tartec>;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0



    [0x0810 13:19:51] SipHandleManagerImpl: 4980808 ProcessUdpEvent: received datagram:
    SIP/2.0 200 OK

    Via: SIP/2.0/UDP 192.168.1.2;branch=z9hG4bK8a361833f9bbdfee685b403d7bbb8a97,SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: sip:almu@tartec;tag=I3qviXVpYV

    From: sip:nari@tartec;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0



    [0x0810 13:19:51] SipTcpHandle: 5055376 SendMessage: message generated:
    SIP/2.0 200 OK

    Via: SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: <sip:almu@tartec>;tag=I3qviXVpYV

    From: <sip:nari@tartec>;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0



    [0x0810 13:19:55] SipHandleManagerImpl: 4980808 ProcessUdpEvent: received datagram:
    SIP/2.0 200 OK

    Via: SIP/2.0/UDP 192.168.1.2;branch=z9hG4bK8a361833f9bbdfee685b403d7bbb8a97,SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: sip:almu@tartec;tag=I3qviXVpYV

    From: sip:nari@tartec;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0



    [0x0810 13:19:55] SipTcpHandle: 5055376 SendMessage: message generated:
    SIP/2.0 200 OK

    Via: SIP/2.0/TCP 192.168.1.11:5060;branch=z9hG4bKnTn94Z2FX5TQg

    To: <sip:almu@tartec>;tag=I3qviXVpYV

    From: <sip:nari@tartec>;tag=ZrL94MMOsR

    Call-ID: vqv94SjvClWqXYjhuX60k7yT5B9xY-

    CSeq: 316 INVITE

    Content-Length: 0

  2. #2
    Registered User
    Join Date
    Jul 2005
    Posts
    12

    Doubt regarding REGISTER

    Hi,

    I have newly started working on Nokia SIP Stack.
    I was trying to REGISTER but the am not able to establish the connection with SIP server (emulator)

    Please help me in this issue. can u send me a sample code?

    -Mini

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

    Re: SIP Invite Procedures

    Have u found the solution for the issue in sending ack?
    I am sending a invite request from x to y, i get 100-trying, 180- ringing and 200-ok from y and x sends ack to y, but y doesn't receives ack and getting error ack time out.
    Can u please let me know if the problem is solved?
    I am trying for making VOIP call , should we need to implement any socket as given in sip example provided with sdk. Please help me in how to make a SIP call...


    Thanks,
    Srivatsan.D

  4. #4
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: SIP Invite Procedures

    hey jgarinf,
    May be the connection from the emulator is facing some problems while u are connecting to the server while u are trying to send the ACK.

    just a guess, Just check weather everything is properly initialized.

    Also if u could let me know what exactly are u doing to receive a request from a remote host. Can u tell me how is that working.

    regards.
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

Posting Permissions

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