InviteClientTransaction constructor
InviteClientTransaction(
- PitelUA ua,
- Transport transport,
- OutgoingRequest request,
- EventManager eventHandlers,
Implementation
InviteClientTransaction(PitelUA ua, Transport transport,
OutgoingRequest request, EventManager eventHandlers) {
id = 'z9hG4bK${Math.floor(Math.random() * 10000000)}';
this.ua = ua;
this.transport = transport;
this.request = request;
_eventHandlers = eventHandlers;
request.transaction = this;
String via = 'SIP/2.0/${transport.via_transport}';
via += ' ${ua.configuration!.via_host};branch=$id';
this.request.setHeader('via', via);
this.ua!.newTransaction(this);
}