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

[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...
 
  }