AckClientTransaction constructor

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

Implementation

AckClientTransaction(PitelUA ua, Transport transport, OutgoingRequest request,
    EventManager eventHandlers) {
  id = 'z9hG4bK${Math.floor(Math.random() * 10000000)}';
  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);
}