views:

21

answers:

1

Hi,

I have a small issue, I had my SIP client working, and I changed the structure of the code. I kept the creation process of the SIP objects as it was before, but now it does not work.

I keep getting:

java.lang.NullPointerException at gov.nist.javax.sip.SipProviderImpl.getNewClientTransaction(SipProviderImpl.java:285)

and there is no reference to such error in the documentation... what does it mean?

here is the instantiation code for the 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);

Any Help please??

Adam.

A: 

WWWWWWWWWWWOOOOOOOOOOOWWWWWWWWWWWWW

If anyone would had ever guessed this, I'll eat my LapTop....

in the first project I was using the Jain-Sip 1.2 and in the new one I use the 1.2.1

BIG issue that in the 1.2, as far as I can tell, request.getMethod() returns the method of the CSeq header in case I don't use the request.setMethod(method).

While in the 1.2.1, if not setting the request.setMethod(method), the request.getMethod() method returns null.

that was my error...

now if you read this please commend or something... I'm so frustrated, I was sitting on this bugger for 4 hours now. Damn.

Adam.

TacB0sS
I still can't believe that was the bug... very deep debugging really!
TacB0sS