我有一个小问题,我的 SIP 客户端正常工作,我更改了代码的结构。SIP对象的创建过程我保持了以前的样子,但是现在不行了。
我不断得到:
java.lang.NullPointerException 在 gov.nist.javax.sip.SipProviderImpl.getNewClientTransaction(SipProviderImpl.java:285)
并且文档中没有提到此类错误……这是什么意思?
这是 sip 的实例化代码:
sipFactory.setPathName(host);
sipFactory.resetFactory();
sipStack = sipFactory.createSipStack(getProperties());
String address = Inet4Address.getLocalHost().getHostAddress();
sipFactory.createHeaderFactory();
sipFactory.createAddressFactory();
sipFactory.createMessageFactory();
udpPoint = sipStack.createListeningPoint(address, SIPPort, SIPConstants.UDP);
udpSipProvider = sipStack.createSipProvider(udpPoint);
udpSipProvider.addSipListener(this);
tcpPoint = sipStack.createListeningPoint(address, SIPPort, SIPConstants.TCP);
tcpSipProvider = sipStack.createSipProvider(tcpPoint);
tcpSipProvider.addSipListener(this);
sipStack.start();
setSessionState(SipSessionState.Connected);
请问有什么帮助吗??
亚当。