【发布时间】:2010-06-27 09:21:32
【问题描述】:
我有一个小问题,我的 SIP 客户端正常工作,我更改了代码的结构。 SIP对象的创建过程我保持之前的样子,但是现在不行了。
我不断得到:
gov.nist.javax.sip.SipProviderImpl.getNewClientTransaction(SipProviderImpl.java:285) 处的 java.lang.NullPointerException
并且文档中没有提到此类错误...这是什么意思?
这里是 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);
有什么帮助吗??
亚当。
【问题讨论】: