示例#1
0
void SIPFSMDispatch::sendRequest(
  const SIPMessage::Ptr& pRequest,
  const OSS::Net::IPAddress& localAddress,
  const OSS::Net::IPAddress& remoteAddress,
  SIPTransaction::Callback& callback,
  SIPTransaction::TerminateCallback& terminateCallback)
{
  SIPTransaction::Ptr trn = createClientTransaction(pRequest);
 
  if (trn)
  {
    if (!trn->transportService())
    {
      //
      // This is a newly created transaction
      //
      trn->transportService() = &_transport;
      trn->localAddress() = localAddress;
      trn->remoteAddress() = remoteAddress;
    }
    trn->sendRequest(pRequest, localAddress, remoteAddress, callback, terminateCallback);
  }
}