< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

RE: [reSIProcate] basic calling in DUM


This may not be desirable if the INVITE get's forked.  You could end up with multiple invite sessions for the same ID.  You should likely be using overridden AppDialog and AppDialogSet. 

 

Check out:  http://warsaw.sjc.purplecomm.com/wiki/index.php?title=Associating_Application_Data_with_Dialogs/DialogSets

 

Scott

 

 


From: Jeff Knighton [mailto:jeff.knighton@xxxxxxxxxxxxxx]
Sent: Wednesday, May 18, 2005 3:05 PM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] basic calling in DUM

 

Hello all,

  I'm trying to understand the sequence of setting up an outbound call using DUM.  Specifically, I'm trying to make sure that when I am placing an outbound call (by sending an INVITE) that I match up that activity with the correct ClientInviteSession handle that comes to me with the onNewSession.

 

Below is my approach, please let me know if this is a good way, or if there is a better way to do this.

 

Thanks,

Jeff Knighton

 

Step 1:  make an invite and send it.

  SipMessage& msg =   dum->makeInviteSession (target, sdp);

 

  const char* myCallID = msg.header(h_CallID).value().c_str();

  //at this point I store a copy of myCallID so that I can link up the proper ClientInviteSession with this INVITE message

 

    dum->send(msg);

 

 

 

Step 2:  get an "onNewSession" event

 void eventHandler::onNewSession(ClientInviteSessionHandle cis, InviteSession::OfferAnswerType oat, const SipMessage& msg)

  {

      const char* sessionId = cis->getDialogId().c_str();

 

    //The sessionId here matches the value I stored when I sent the invite so that I can match up the two...

 

  }