Re: [OpenSIPStack] doubt on opensipstack call backs...
Brought to you by:
joegenbaclor
From: kishore k. <kk...@gm...> - 2009-04-02 11:14:38
|
Hi Matthias, Thanks a lot for the reply. Yes as you said it is better to use SoftPhoneInterface, thats what i am trying to do now, But i am not able to create instance for SopftPhoneInterface from TestRegistration. Will you please help me in this issue. BR, Kishore. 2009/4/2 Matthias Dreißig <mdr...@gm...> > Hi Kishore, > > when I look at the code of this TestRegistration I think you have to add > your own callback to the method > > Scenario_Normal::OnReceivedMessage(const SIPMessage & message, > SIPTransaction * transaction) > > > Something like: > > if( message.IsResponse() ) > { > switch( message.GetStatusCode() ) > { > case( SIPMessage::Code401_Unauthorized ): > m_Reg.SendAuthenticator( message ); > break; > case( SIPMessage::Code200_Ok ): > m_Reg.StartRefreshTimer( message ); > break; > default: > m_Reg.StartRefreshTimer( 10 ); > break; > } > } > } else { > OString method = message.GetMethod().ToUpper(); > > if ( method == "MESSAGE" ) { > m_Reg.OnInstantMessageReceived(message); > } > } > > And in class REGISTER there you have to create the callback > OnInstantMessageReceived(const SIPMessage & message). > > But if you want to implement your own SIP client it is better to use the > Softphone/SoftphoneInterface from opensipstack. There are already all > callbacks and methods to send MESSAGEs and you don't have to implement > it by yourself. > > Joegen if there are any mistakes please correct me. > > Regards, > Matthias > > kishore kumar schrieb: > > Hi Matthias, > > find the answers for your questions: > > 1. How do you send the message? > > Ans: I kept one more test application called TestMessaging in > opensbc/Tools > > just as TestRegistration. > > Using the same code in the TestRegistration.cxx. but instead of REGISTER > > method, i am sending MESSAGE method. > > > > 2. How do you use the other callbacks? > > Ans: After sending the MESSAGE method i am able to get the call back to > void > > REGISTER::OnReceivedMessage for 200_ok from the other opensipstack which > is > > running on another machine. > > > > 3. Are you using the OpalOSSEndPoint directly or do use the > > SoftPhone/SoftPhoneInterface? > > Ans: I am not using any Softphoe/SoftPhoneInterface on the other side. I > am > > running one more opensipstack in other machine, to where i am sending the > > MESSAGE method. in this stack i am expecting callback at > > OpalOSSEndPoint::OnInstantMessaging(), which is not implemented yet and > not > > able to keep the break point itself. > > > > Regards, > > Kishore. > > > > 2009/4/1 Matthias Dreißig <mdr...@gm...> > > > > > >> I have some questions so I can give you any solution for your problem. > >> > >> How do you send the message? > >> > >> How do you use the other callbacks? > >> > >> Are you using the OpalOSSEndPoint directly or do use the > >> SoftPhone/SoftPhoneInterface? > >> > >> Regards, > >> Matthias > >> > >> > >> kishore kumar schrieb: > >> > >>> Hi Matthias, > >>> > >>> Thanks for the quick reply. > >>> > >>> the call back you mentioned is not implemented yet it seems. and i am > not > >>> able to keep the call back in that file. and i am explaining my > scenario > >>> more clearly here. > >>> > >>> USER 1: > >>> > >>> 1. Running OpenSIPStack. > >>> 2. An application called USER 1 is registered to that stack on the same > >>> machine just as TestResgistration application. > >>> 3. Expecting callback from USER 2 which is sending MESSSAGE to USER > 1(for > >>> which call back we are getting in USER 1 OpenSIPStack. and from where > we > >>> > >> are > >> > >>> sending the 200_OK to USER 2)---This is the actual question. > >>> > >>> USER 2: > >>> > >>> 1. Running OpenSIPStack. > >>> 2. Sending MESSAGE to USER 1 which is already registered on another > >>> machine. > >>> 3. Got 200_ok response from USER 1. > >>> > >>> I think this description may help you people to understand the scenario > >>> clearly.. > >>> > >>> Regards, > >>> Kishore. > >>> > >>> On Wed, Apr 1, 2009 at 5:15 PM, Joegen Baclor <joe...@gm... > >>> wrote: > >>> > >>> > >>> > >>>> Yes, that is absolutely correct. > >>>> > >>>> -------------------------------------------------- > >>>> From: "Matthias Dreißig" <mdr...@gm...> > >>>> Sent: Wednesday, April 01, 2009 6:45 PM > >>>> To: <ope...@li...> > >>>> Subject: Re: [OpenSIPStack] doubt on opensipstack call backs... > >>>> > >>>> > >>>> > >>>>> Hello Kishore, > >>>>> > >>>>> I think what you are looking for is this callback > >>>>> > >>>>> virtual void OpalOSSEndPoint::OnReceivedInstantMessage( const > >>>>> > >> SIPMessage > >> > >>>>> & message ) > >>>>> > >>>>> > >>>>> Regards, > >>>>> Matthias > >>>>> > >>>>> kishore kumar schrieb: > >>>>> > >>>>> > >>>>>> Hi All, > >>>>>> > >>>>>> I am trying to send MESSAGE from the opensipstack to the another > >>>>>> opensipstack which is running on the other machine. > >>>>>> I am able to send MESSAGE and able to get the 200_OK from the other > >>>>>> machine > >>>>>> where another opensipstack is running. > >>>>>> > >>>>>> But i am not able to find the call back in opensipstack, which is > >>>>>> > >>>>>> > >>>> calling > >>>> > >>>> > >>>>>> when MESSAGE is received to other machine and from where it is > sending > >>>>>> the > >>>>>> 200_OK in opensipstack, > >>>>>> > >>>>>> Can anyone look in to this please. > >>>>>> > >>>>>> Regards, > >>>>>> Kishore. > >>>>>> > >>>>>> > >>>>>> > >> > ------------------------------------------------------------------------------ > >> > >>>>>> _______________________________________________ > >>>>>> opensipstack-devel mailing list > >>>>>> ope...@li... > >>>>>> https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > >>>>>> > >>>>>> > >>>>>> > >>>>> > >> > ------------------------------------------------------------------------------ > >> > >>>>> _______________________________________________ > >>>>> 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 > >>>> > >>>> > >>>> > >> > ------------------------------------------------------------------------------ > >> > >>> _______________________________________________ > >>> opensipstack-devel mailing list > >>> ope...@li... > >>> https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > >>> > >>> > >>> > >> > ------------------------------------------------------------------------------ > >> _______________________________________________ > >> opensipstack-devel mailing list > >> ope...@li... > >> https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > >> > >> > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > opensipstack-devel mailing list > > ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > opensipstack-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > |