RE: SIP Stack Error. Please help (Part II)

"Eduardo Miguel Martins" <[email protected]>
Newsgroups gmane.comp.voip.nist-sip
Message-ID <1938133605DC6341A139363AF212430A081C5C@inolsbex01.ptin.corpPT.com>
Inside 

private final boolean hopsBackToMe(String host, int port, String transport);

you have 
 
if ((lp.getIPAddress().equals(host)||lp.getSentBy().equalsIgnoreCase(host))

lp.getIPAddress() != host and lp.getSentBy() returns null, and that throws the null pointer exception

Regards,

Eduardo

-----Original Message-----
From: M. (Ranga) Ranganathan [mailto:[email protected]] 
Sent: segunda-feira, 6 de Março de 2006 19:36
To: Eduardo Miguel Martins
Cc: [email protected]
Subject: Re: [nist-sip] SIP Stack Error. Please help (Part II)

Eduardo,

It appears that the topmost route header has a parameter lr=on which
is not a valid way of specifying lose routing. Having said that, i'd
like to investigate this error further. Can you put some println in
the method than bombs and see which of the compares is causing the
null pointer.

Thanks

Ranga.

On 3/6/06, Eduardo Miguel Martins <[email protected]> wrote:
> I didn't got a reply for my issue with the last jain sip so here is the error info again.
>
> --------
>
> Hi all, I'm in beta testing a SIMPLE (rfc 3856) service. I'm getting an error with the Route header.
>
> The SIP client sends the following SUBSCRIBE request:
>
> SUBSCRIBE sip:[email protected] SIP/2.0
> Record-Route: <sip:10.112.128.248;ftag=7c13710e;lr=on>
> Via: SIP/2.0/UDP 10.112.128.248;branch=z9hG4bK534a.2988384.0,SIP/2.0/UDP 10.112.128.58:8811;branch=z9hG4bK-d87543-78005747da4e4c72-1--d87543-;rport=8811
> Max-Forwards: 69
> Contact: <sip:[email protected]:8811>
> To: <sip:[email protected]>;tag=8640
> From: "teste1" <sip:[email protected]>;tag=7c13710e
> Call-ID: 011d241435295973@Y3JlYXIwOC5wdGluLmNvcnBQVC5jb20.
> CSeq: 1 SUBSCRIBE
> Expires: 3600
> Accept: application/watcherinfo+xml
> Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
> Supported: eventlist
> User-Agent: eyeBeam/release/3013o/stamp/24712
> Event:  presence.winfo
> Content-Length: 0
>
> and my service responds
>
> SIP/2.0 200 OK
> Record-Route: <sip:10.112.128.248;ftag=7c13710e;lr=on>
> Via: SIP/2.0/UDP 10.112.128.248;branch=z9hG4bK534a.2988384.0,SIP/2.0/UDP 10.112.128.58:8811;branch=z9hG4bK-d87543-78005747da4e4c72-1--d87543-;rport=8811
> To: <sip:[email protected]>;tag=8640
> From: "teste1" <sip:[email protected]>;tag=7c13710e
> Call-ID: 011d241435295973@Y3JlYXIwOC5wdGluLmNvcnBQVC5jb20.
> CSeq: 1 SUBSCRIBE
> Contact: <sip:10.112.128.58:5060>
> Content-Length: 0
>
> then the problem comes, I need to send a NOTIFY sip request and for that I use the dialog saved after the response above has been sent. The final notify xml after some headers added is:
>
> NOTIFY sip:[email protected]:8811;lr;transport=udp SIP/2.0
> Via: SIP/2.0/UDP 10.112.128.58:5060
> CSeq: 1 NOTIFY
> To: "teste1" <sip:[email protected]>;tag=7c13710e
> From: <sip:[email protected]>;tag=8640
> Call-ID: 011d241435295973@Y3JlYXIwOC5wdGluLmNvcnBQVC5jb20.
> Contact: <sip:10.112.128.58:5060>
> Route: <sip:10.112.128.248;ftag=7c13710e;lr=on>,<sip:[email protected]:8811;lr;transport=udp>
> Event:  presence.winfo
> Max-Forwards: 70
> Subscription-State: active;expires=3600
> Content-Type: application/watcherinfo+xml
> Content-Length: 226
> <?xml version="1.0" encoding="UTF-8"?>
> <watcherinfo xmlns="urn:ietf:params:xml:ns:watcherinfo" version="0" state="full">
>   <watcher-list resource="sip:[email protected]" package="presence">
>   </watcher-list>
> </watcherinfo>
>
> I ask the provider for a new client transaction for the notify and boom, the sip ra throws this exception:
>
> 16:20:04,334 INFO  [STDOUT] java.lang.NullPointerException
> 16:20:04,334 INFO  [STDOUT]  at gov.nist.javax.sip.stack.DefaultRouter.hopsBackToMe(DefaultRouter.java:98)
> 16:20:04,334 INFO  [STDOUT]  at gov.nist.javax.sip.stack.DefaultRouter.createHop(DefaultRouter.java:280)
> 16:20:04,334 INFO  [STDOUT]  at gov.nist.javax.sip.stack.DefaultRouter.getNextHop(DefaultRouter.java:186)
> 16:20:04,334 INFO  [STDOUT]  at gov.nist.javax.sip.stack.SIPTransactionStack.getNextHop(SIPTransactionStack.java:1379)
> 16:20:04,334 INFO  [STDOUT]  at gov.nist.javax.sip.SipProviderImpl.getNewClientTransaction(SipProviderImpl.java:291)
> 16:20:04,334 INFO  [STDOUT]  at org.mobicents.slee.resource.sip.SipProviderProxy.getNewClientTransaction(SipProviderProxy.java:106)
> 16:20:04,349 INFO  [STDOUT]  at pt.ptinovacao.presence.translator.SIMPLEPresenceTranslatorSbb.newSubscription(SIMPLEPresenceTranslatorSbb.java:677)
> ...
>
> I'm using the last nist sip with support for subscribe and publish from the nist cvs
> If I use p2p instead of a sip proxy, and the Route header has just one element everything is ok.
>
>
> Thanks in advance for your help,
>
>
>
> Eduardo Martins
>
> PT Inovação
>
>
>
> _______________________________________________
> nist-sip mailing list
> [email protected]
> http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
>


--
M. Ranganathan
"There are two ways to write error-free programs; only the third one
works." --  Alan Perlis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.