Hello everyone,
I've been working on a fairly large SIP servlet and have been testing
it in the Mobicents SIP container. So far so good, I just have a few
problems that I have run across. The first two are small but I
consider the third issue to be important. If you would like me to open
issues or provide more information on these please let me know and I
will do so. Any replies would be appreciated.
1) org.mobicents.servlet.sip.address.SipURIImpl.getUser(), line 120:
RFC2396UrlDecoder.decode(...) throws a NullPointerException if the
argument - the underlying SIP URI's user part - is null. A quick fix
might be:
return getSipURI().getUser()==null ? null :
RFC2396UrlDecoder.decode(getSipURI().getUser());
I'm not sure if there are any implications if
javax.servlet.sip.SipURI.getUser() were to return null? JAIN SIP does
return null if there is no user portion, e.g. in registrar SIP URIs.
2) When we first tried out Mobicents 0.4.1 we had trouble with the
Click-To-Call example (we're now on 0.6 but I see the code for the
example hasn't changed much). We believe the problem stemmed from our
phones sending SIP URIs in the format "sip:
12...@sip.test.com:
5080;user=phone" (i.e. with the user=phone parameter). We were able to
fix the problem and get the example to work by changing "fromAddr" to
"from" in the following line:
org.mobicents.servlet.sip.example.SimpleWebServlet.doGet(...), line
110:
req.getSession().setAttribute("SecondPartyAddress",
sipFactory.createAddress(fromAddr));
3)
org.mobicents.servlet.sip.message.SipFactoryImpl.createSipServletRequest(...),
line 410:
callIdHeader = SipFactories.headerFactory.createCallIdHeader(
MobicentsSipApplicationSession.getKey().getId());
So the App. Session ID is being used as the Call-ID header. However,
if I have previously created the App. Session myself (e.g.
SipSessionsUtil.getApplicationSessionByKey("testing", true)), this
means that the Call-ID header will always be set to "testing", which
is obviously a problem. I am not sure of a fix at this point - perhaps
the Call-ID should be generated the same way it is in
createApplicationSession(...) in the same class, but I am not sure of
all the implications?
Thanks, Regards,
-- Hauke D
P.S. All files & line numbers refer to the trunk revision (3177).