Re: [OpenSIPStack] Call back for an Invite Response in the Testapplication
Brought to you by:
joegenbaclor
|
From: Joegen B. <joe...@gm...> - 2009-04-02 11:37:07
|
You should start by reading RFC 3261. ACK should follow the rules of constructing messages within the dialog. Looking briefly at the code, the ACK that will be sent out will be missing a to-tag. This must be why the UAS is discarding the ACK.
From: Jyothsna Banda
Sent: Thursday, April 02, 2009 3:24 PM
To: Joegen Baclor
Cc: ope...@li...
Subject: Re: [OpenSIPStack] Call back for an Invite Response in the Testapplication
Hi Joegen,
If i send the message in the below way,if we chekc in th wireshar ACK message is having
CSeq as 1 INVITE only.
so what i did is:
Send_ACK(
const SIPMessage & message)
{
SIPMessage ack;
SIPMessage sdp;
const Via & via = message.GetTopVia();
OString branch = via.GetBranch();
if( sdp.HasSDP() )
{
ack.SetBody( sdp.GetBody() );
}
ack.SetInterfaceAddress(via.GetAddress());
ack.SetInterfacePort(via.GetPort());
CSeq cseq;
cseq.SetMethod(
"ACK" );
cseq.SetSequence( message.GetCSeqNumber() );
ack.SetCSeq( cseq );
if
( message.GetTransaction() != NULL )
{
SIPFSM::InviteClientTransaction * trn =
dynamic_cast<SIPFSM::InviteClientTransaction*>(message.GetTransaction());
if( trn != NULL )
trn->SetFinalACK( ack );
}
m_UA->GetStack().EnqueueTransportWriteEvent(ack);
}
but when i debug the code internally in the EnqueueTransportWriteEvent(),it is calling SIPMessage method ProcessOutBound there it is cleaning all the message varaibles and deleting the event.so the message is not at all going from one to the other end.
How to proceed further?Please can u look in to this?
Br,
Jyothsna
On Thu, Apr 2, 2009 at 11:11 AM, Jyothsna Banda <jyo...@gm...> wrote:
Hi Joegen,
Thanks again for the quick response.
By using that method iam sending the ACK,in wireshark it is showing ,but the SJphone is not receiving the ACK message? check the below sample code how iam sending from the test application.
/*********** sample code ***********/
OStringStream msg;
msg <<
"ACK " << "sip:" << m_Domain <<":"<<"5060"<< " SIP/2.0" << "\r\n";
msg <<
"From: <sip:" << m_ListenerIP<< ">" << ";tag=" << ParserTools::GenTagParameter() << "\r\n";
msg <<
"To: <sip:" << m_ToUser << m_Domain << ">" << "\r\n";
msg <<
"Contact: " << "<" << m_ContactURI << ">" << "\r\n";
msg <<
"Via:" << "SIP/2.0/UDP " << m_ListenerIP <<";branch=" << ParserTools::GenBranchParameter() << "\r\n";
msg <<
"CSeq: 1 ACK" << "\r\n";
msg <<
"Max-Forwards:" << "70" << "\r\n";
msg <<
"Call-ID: " << ParserTools::GenGUID() << "\r\n";
msg <<
"Content-Length: 0" <<"\r\n";
Parse( msg.str() );
TransactionId tid;
m_UA->GetStack().EnqueueTransportWriteEvent(*
this);
/************************************************************************/
Can we use call session from test application,How to call the call session methods?
where it is being used?
i think call session is having full functionality for call establishment?
Can u tell me the code flow for eatblishing a call from my test application?
Br,
Jyothsna
On Thu, Apr 2, 2009 at 6:03 AM, Joegen Baclor <joe...@gm...> wrote:
Ahhh, I see what you are doing wrong. You don’t use FindTransactionAndAddEvent() to send ACK because ACK never creates a transaction. Instead you must use GetStack().EnqueueTransportWriteEvent( ack );
Look at BOOL CallSession::SendAck( const SIPMessage & response, const SIPMessage & sdp ) for a sample implementation.
HTH,
Joegen
From: Jyothsna Banda
Sent: Wednesday, April 01, 2009 8:41 PM
To: Joegen Baclor ; ope...@li...
Subject: Re: [OpenSIPStack] Call back for an Invite Response in the Testapplication
Hi Joegen,
Thanks for the reply.
Iam using the same test registration application.
Scenario: Sending Invite from Testapplication to SJPhone(running in another system)
I have added few methods in Register Class for Invite,ACK and 200_OK.
Instead of sending the Registration ,iam calling the Invite method which i have added.
Find the attached Source file and XML ,reading the values from this file.
Now iam getting call back (200OK)to onreceived message,there iam preparing the ACK and sending back.but ACk is not going.
Please check the code and let me know whether iam doing something wrong .
Br,
Jyothsna
On Wed, Apr 1, 2009 at 5:14 PM, Joegen Baclor <joe...@gm...> wrote:
Can you publish the test application code? I want to see how you are
sending the INVITE out so we have something in common to look at.
Tools/TestRegistration sample application in OpenSBC demonstrates pretty
basic transaction callbacks. You might want to start with that as well.
--------------------------------------------------
From: "Jyothsna Banda" <jyo...@gm...>
Sent: Wednesday, April 01, 2009 5:53 PM
To: <ope...@li...>
Subject: [OpenSIPStack] Call back for an Invite Response in the
Testapplication
> Hi,
>
> I have tried two scenarios for sending an Invite Request:
>
> First Scenario:
>
> Iam sending an Invite request thru test application to SJPhone running on
> another machine.
>
> receiving the 200 Ok from Sjphone to test application. Where will we get
> the
> call back in Test application, so that we can send an Ack for the 200 ok
> response.
>
> Second Scenario:
>
> when sending the Invite message from test application to OpensipStack
> server
> running on the other message,
> getting the 100 Trying call back in the test application Onreceived
> message.Here how to send the 200 ok response from test application acting
> as
> a user agent server.Also how to set the test application as User Agent
> server?
>
>
>
> Can any one please help.
>
> Br,
> Jyothsna
> ------------------------------------------------------------------------------
> _______________________________________________
> opensipstack-devel mailing list
> ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opensipstack-devel
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.238 / Virus Database: 270.11.35/2033 - Release Date: 03/31/09
> 13:05:00
>
------------------------------------------------------------------------------
_______________________________________________
opensipstack-devel mailing list
ope...@li...
https://lists.sourceforge.net/lists/listinfo/opensipstack-devel
----------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.35/2033 - Release Date: 03/31/09 13:05:00
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.37/2036 - Release Date: 04/01/09 21:02:00
|