use of org.mobicents.tools.sip.balancer.ProtocolObjects in project load-balancer by RestComm.
the class BackToBackUserAgent method start.
public void start() {
SipFactory sipFactory = null;
sipFactory = SipFactory.getInstance();
sipFactory.setPathName("gov.nist");
this.protocolObjects = new ProtocolObjects("backtobackua", "gov.nist", transport, true, true, false);
try {
messageFactory = protocolObjects.messageFactory;
lp = protocolObjects.sipStack.createListeningPoint("127.0.0.1", port, transport);
sp = protocolObjects.sipStack.createSipProvider(lp);
sp.addSipListener(this);
protocolObjects.start();
node = new Node("Node", "127.0.0.1");
node.getProperties().put(transport.toLowerCase() + "Port", "" + port);
node.getProperties().put("version", "0");
node.getProperties().put(Protocol.SESSION_ID, "" + System.currentTimeMillis());
node.getProperties().put(Protocol.HEARTBEAT_PORT, "" + heartbeatPort);
clientController = new ClientController(this, lbAddress, lbHBPort, node, 2000, heartbeatPeriod, executor);
clientController.startClient();
} catch (Exception ex) {
}
}
Aggregations