try {
headerFactory = protocolObjects.headerFactory;
addressFactory = protocolObjects.addressFactory;
messageFactory = protocolObjects.messageFactory;
SipStack sipStack = protocolObjects.sipStack;
ListeningPoint lp1 = sipStack.createListeningPoint("127.0.0.1", port1, "tcp");
ListeningPoint lp2 = sipStack.createListeningPoint("127.0.0.1", port2, "tcp");
SipProvider sp1 = sipStack.createSipProvider(lp1);
SipProvider sp2 = sipStack.createSipProvider(lp2);
this.listeningPoints[0] = lp1;
this.listeningPoints[1] = lp2;
this.providers[0] = sp1;