NonInviteClientTransaction constructor

NonInviteClientTransaction(
  1. PitelUA ua,
  2. Transport transport,
  3. OutgoingRequest request,
  4. EventManager eventHandlers,
)

Implementation

NonInviteClientTransaction(PitelUA ua, Transport transport,
    OutgoingRequest request, EventManager eventHandlers) {
  id = 'z9hG4bK${Math.floor(Math.random())}';
  this.ua = ua;
  this.transport = transport;
  this.request = request;
  _eventHandlers = eventHandlers;

  String via = 'SIP/2.0/${transport.via_transport}';

  via += ' ${ua.configuration!.via_host};branch=$id';

  request.setHeader('via', via);

  ua.newTransaction(this);
}