MSS: short list of problems

96 views
Skip to first unread message

Mariusz Rutkowski

unread,
May 4, 2009, 8:04:17 AM5/4/09
to mobicent...@googlegroups.com
Hey all,

According to an e-mail discussion with Jean Deruelle I post a short list of questions/problems I've observed using mss-0.9-jboss-4.2.3.GA-0904211307 here. Most of them're spreading over both Mobicents Sip Servlets and Mobicents Media Server. Here is the list:

1. Is there a chance to set codecs priority in media-server config ? Changing the codecs order in config seems not help.

2. When there is no common audio codecs between UA and media-server, mss reports:
 IOException while trying to create Connection
    java.io.IOException: Codecs are not negotiated


If UA send, this sdp payload (doesn't put telephone-event (101)):
v=0
o=bpawlikowska 5972727 56415 IN IP4 87.204.222.10
s=SIP Call
c=IN IP4 213.218.116.71
t=0 0
m=audio 11506 RTP/AVP 2
a=rtpmap:2 g726-32/8000
a=ptime:20
a=sendrecv

mss response with:

2009-04-28 10:35:49,942 INFO [org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher] Request event dispatched to AnnouncementServer
2009-04-28 10:35:49,943 ERROR [org.mobicents.mscontrol.impl.MsConnectionImpl] IOException while trying to create Connection
java.io.IOException: Codecs are not negotiated
        at org.mobicents.media.server.impl.RtpConnectionImpl.setRemoteDescriptor(RtpConnectionImpl.java:289)
        at org.mobicents.mscontrol.impl.MsConnectionImpl$CreateTx.run(MsConnectionImpl.java:246)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

Shouldn't be better if MSS responses with 488 sip code ?

3. When I send, invite with SDP payload like:
v=0
o=- 1 2 IN IP4 10.0.0.160
s=CounterPath eyeBeam 1.5
c=IN IP4 217.98.91.252
t=0 0
m=audio 10846 RTP/AVP 9 101
a=alt:1 1 : HaS3RB9N rp63cD4N 10.0.0.160 29094
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv

MSS responses with:

v=0
o=MediaServer 4583091 4583091 IN IP4 217.98.91.250
s=session
c=IN IP4 217.98.91.250
t=0 0
m=audio 1066 RTP/AVP 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=fmtp:101 0-15

Shouldn't I get 488 too? There is no negotiated audio codecs.

4. Media server puts twice: Media Attribute (a): fmtp:101 0-15 the sdp, Why ?:)

5. From times to times I see in logs:
     2009-04-28 09:05:17,393 ERROR [Mobicents-SIP-Servlets] Receiver port not set
java.io.IOException: Receiver port not set
        at gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:636)
        at gov.nist.javax.sip.stack.MessageChannel.sendMessage(MessageChannel.java:237)
        at gov.nist.javax.sip.stack.SIPTransaction.sendMessage(SIPTransaction.java:738)
        at gov.nist.javax.sip.stack.SIPServerTransaction.fireRetransmissionTimer(SIPServerTransaction.java:1175)
        at gov.nist.javax.sip.stack.SIPTransaction.fireTimer(SIPTransaction.java:643)
        at gov.nist.javax.sip.stack.SIPServerTransaction$TransactionTimer.runTask(SIPServerTransaction.java:382)
        at gov.nist.javax.sip.stack.SIPStackTimerTask.run(SIPStackTimerTask.java:29)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

and:

2009-04-29 08:33:45,220 ERROR [STDERR] java.lang.NullPointerException
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.AbstractSignal.getMediaSource(AbstractSignal.java:46)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.events.announcement.AnnSignal.apply(AnnSignal.java:40)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.SignalQueue.next(SignalQueue.java:68)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.SignalQueue.offer(SignalQueue.java:51)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.BaseEndpoint$ExecuteCommand.run(BaseEndpoint.java:890)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)

Is that normal ?

5.  I'd also ask about Via, and Record-Route header. Format of headers MSS responses is kinda strange. Doesn't the server should put each Route or Via into separate header, not just separate them with comma char?.
We're using Kamalio SIP server at our platform and those headers are not compatible with them.

6. How should I configure DAR (or anything else, servlet-selection in sip.xml seems not work) to  route  incoming  invites to each sip-servlets (deployed on the same server) based on theirs sip-uri. For example:
sip:voic...@domain.com is routing to voicemail sip-servlet
sip:an...@domain.com is routing to announcement sip-servlet

7.  Doesn't the MSS has memory leaks or this is just an development issue?

2009-04-30 11:21:15,504 ERROR [org.mobicents.servlet.sip.core.dispatchers.DispatchTask] Unexpected exception while processing message
[message here]

java.lang.OutOfMemoryError: unable to create new native thread
       at java.lang.Thread.start0(Native Method)
       at java.lang.Thread.start(Thread.java:574)
       at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:426)
       at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:859)
       at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:31)
       at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:603)
       at org.mobicents.mscontrol.impl.MsSessionImpl.sendEvent(MsSessionImpl.java:117)
       at org.mobicents.mscontrol.impl.MsSessionImpl.setState(MsSessionImpl.java:135)
       at org.mobicents.mscontrol.impl.MsSessionImpl.<init>(MsSessionImpl.java:58)
       at org.mobicents.mscontrol.impl.MsProviderImpl.createSession(MsProviderImpl.java:74)
       at pl.carrierex.AnnouncementServer.doInvite(AnnouncementServer.java:47)
       at javax.servlet.sip.SipServlet.doRequest(SipServlet.java:225)
       at javax.servlet.sip.SipServlet.service(SipServlet.java:325)
       at org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher.callServlet(MessageDispatcher.java:202)
       at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher$1.dispatch(InitialRequestDispatcher.java:405)
       at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.run(DispatchTask.java:51)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)

Best Regards,
Mariusz Rutkowski

Vladimir Ralev

unread,
May 4, 2009, 8:31:48 AM5/4/09
to mobicent...@googlegroups.com
Hi,

That's a good list of issues :)

About MSS returning error responses - I think it is responsibility of your app to catch these exceptions/events and return whatever response you want. Dont you receive a connection failed event or something like this?

Via Headers separated with commas - that's perfectly legal in terms of the SIP protocol and saves bandwidth. May be there should be a a switch about it handle your case, but it looks to me that your server is not SIP compliant.

Servlet selection should work, I will test and see. If there is a problem it will be fixed.

Out of memory exception - we havent seen such in our soak tests and we will need more info how it occured.

We will look at the MSS separately. For now I can confirm it puts 101 twice for now reason and that should be fixed.

The rest

2009/5/4 Mariusz Rutkowski <mka...@gmail.com>

Amit Bhayani

unread,
May 4, 2009, 10:21:42 AM5/4/09
to mobicent...@googlegroups.com
My answers in-line for MMS

2009/5/4 Mariusz Rutkowski <mka...@gmail.com>

Hey all,

According to an e-mail discussion with Jean Deruelle I post a short list of questions/problems I've observed using mss-0.9-jboss-4.2.3.GA-0904211307 here. Most of them're spreading over both Mobicents Sip Servlets and Mobicents Media Server. Here is the list:

1. Is there a chance to set codecs priority in media-server config ? Changing the codecs order in config seems not help.
It really depends on UA. For example UA sends PCM-U, PCM-A, GSM, G-711 of which first three are supported by MMS and hence MMS will send SDP with first 3 that is PCM-U, PCM-A, GSM.Now it depends on UA on which one it selects and makes RTP Connection
 

The exception is logged and CONNECTION_FAILED event is fired. Have you registered MsConnectionListener with MsConnection?


3. When I send, invite with SDP payload like:
v=0
o=- 1 2 IN IP4 10.0.0.160
s=CounterPath eyeBeam 1.5
c=IN IP4 217.98.91.252
t=0 0
m=audio 10846 RTP/AVP 9 101
a=alt:1 1 : HaS3RB9N rp63cD4N 10.0.0.160 29094
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv

MSS responses with:

v=0
o=MediaServer 4583091 4583091 IN IP4 217.98.91.250
s=session
c=IN IP4 217.98.91.250
t=0 0
m=audio 1066 RTP/AVP 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=fmtp:101 0-15

Shouldn't I get 488 too? There is no negotiated audio codecs.

Technically speaking this is correct  as 101 is also looked upon as negotiated SDP. But we will think over this.


4. Media server puts twice: Media Attribute (a): fmtp:101 0-15 the sdp, Why ?:)
Sure shot bug :) Thanks for pointing.We will test and fix


5. From times to times I see in logs:
     2009-04-28 09:05:17,393 ERROR [Mobicents-SIP-Servlets] Receiver port not set
java.io.IOException: Receiver port not set
        at gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:636)
        at gov.nist.javax.sip.stack.MessageChannel.sendMessage(MessageChannel.java:237)
        at gov.nist.javax.sip.stack.SIPTransaction.sendMessage(SIPTransaction.java:738)
        at gov.nist.javax.sip.stack.SIPServerTransaction.fireRetransmissionTimer(SIPServerTransaction.java:1175)
        at gov.nist.javax.sip.stack.SIPTransaction.fireTimer(SIPTransaction.java:643)
        at gov.nist.javax.sip.stack.SIPServerTransaction$TransactionTimer.runTask(SIPServerTransaction.java:382)
        at gov.nist.javax.sip.stack.SIPStackTimerTask.run(SIPStackTimerTask.java:29)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

and:

2009-04-29 08:33:45,220 ERROR [STDERR] java.lang.NullPointerException
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.AbstractSignal.getMediaSource(AbstractSignal.java:46)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.events.announcement.AnnSignal.apply(AnnSignal.java:40)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.SignalQueue.next(SignalQueue.java:68)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.SignalQueue.offer(SignalQueue.java:51)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.BaseEndpoint$ExecuteCommand.run(BaseEndpoint.java:890)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)

Is that normal ?
No the NPE is not normal. Will have to look at log files. Can u please explain how did u get this NPE and pass the server.log please?
 

Jean Deruelle

unread,
May 4, 2009, 10:29:52 AM5/4/09
to mobicent...@googlegroups.com
Hi Mariusz,

Thanks for forwarding this to the public list. See inline

2009/5/4 Mariusz Rutkowski <mka...@gmail.com>

Hey all,

According to an e-mail discussion with Jean Deruelle I post a short list of questions/problems I've observed using mss-0.9-jboss-4.2.3.GA-0904211307 here. Most of them're spreading over both Mobicents Sip Servlets and Mobicents Media Server. Here is the list:

1. Is there a chance to set codecs priority in media-server config ? Changing the codecs order in config seems not help.

Media Server team will be able to help there
 

This exception is thrown by the Media Server so there is nothing MSS can do about it. Ideally, the application code should catch this exception and constructs the appropriate response.
But, from the stack trace,  it looks like the exception is not thrown back to your application. Can you confirm ? Do you have the call flow or SIP messages exchanged (as a wireshark trace maybe ?) so that we can try to replicate that.
Media Server might be able to provide some insights here
 


3. When I send, invite with SDP payload like:
v=0
o=- 1 2 IN IP4 10.0.0.160
s=CounterPath eyeBeam 1.5
c=IN IP4 217.98.91.252
t=0 0
m=audio 10846 RTP/AVP 9 101
a=alt:1 1 : HaS3RB9N rp63cD4N 10.0.0.160 29094
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv

MSS responses with:

v=0
o=MediaServer 4583091 4583091 IN IP4 217.98.91.250
s=session
c=IN IP4 217.98.91.250
t=0 0
m=audio 1066 RTP/AVP 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=fmtp:101 0-15

Shouldn't I get 488 too? There is no negotiated audio codecs.

Same as above, if there is no negotiated codec, Media Server should notify you by some means (through one of the listener that you implement probably) and you should contructs the 488 response there and send it.

 


4. Media server puts twice: Media Attribute (a): fmtp:101 0-15 the sdp, Why ?:)

Media Server team will help there :-)


5. From times to times I see in logs:
     2009-04-28 09:05:17,393 ERROR [Mobicents-SIP-Servlets] Receiver port not set
java.io.IOException: Receiver port not set
        at gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:636)
        at gov.nist.javax.sip.stack.MessageChannel.sendMessage(MessageChannel.java:237)
        at gov.nist.javax.sip.stack.SIPTransaction.sendMessage(SIPTransaction.java:738)
        at gov.nist.javax.sip.stack.SIPServerTransaction.fireRetransmissionTimer(SIPServerTransaction.java:1175)
        at gov.nist.javax.sip.stack.SIPTransaction.fireTimer(SIPTransaction.java:643)
        at gov.nist.javax.sip.stack.SIPServerTransaction$TransactionTimer.runTask(SIPServerTransaction.java:382)
        at gov.nist.javax.sip.stack.SIPStackTimerTask.run(SIPStackTimerTask.java:29)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

never seen this one. It seems the underlying jain sip stack throws this exception on sending a retransmission. Are you able to reproduce it ? do you have the sequence of messages leading to this exception ?
 


and:

2009-04-29 08:33:45,220 ERROR [STDERR] java.lang.NullPointerException
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.AbstractSignal.getMediaSource(AbstractSignal.java:46)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.events.announcement.AnnSignal.apply(AnnSignal.java:40)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.SignalQueue.next(SignalQueue.java:68)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.SignalQueue.offer(SignalQueue.java:51)
2009-04-29 08:33:45,221 ERROR [STDERR] at org.mobicents.media.server.impl.BaseEndpoint$ExecuteCommand.run(BaseEndpoint.java:890)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
2009-04-29 08:33:45,222 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)

Is that normal ?

Media Server will tell


5.  I'd also ask about Via, and Record-Route header. Format of headers MSS responses is kinda strange. Doesn't the server should put each Route or Via into separate header, not just separate them with comma char?.
We're using Kamalio SIP server at our platform and those headers are not compatible with them.

Your SIP Server doesn't seem RFC 3261 compliant. However there is a setter in jain sip to allow pretty encoding and have them in separate headers. I will create an Issue to allow the configuration of it through MSS.


6. How should I configure DAR (or anything else, servlet-selection in sip.xml seems not work) to  route  incoming  invites to each sip-servlets (deployed on the same server) based on theirs sip-uri. For example:
sip:voic...@domain.com is routing to voicemail sip-servlet
sip:an...@domain.com is routing to announcement sip-servlet

Please have a look at http://mobicents.googlecode.com/svn/trunk/servers/sip-servlets/sip-servlets-test-suite/applications/servlet-mapping-servlet/src/main/sipapp/WEB-INF/sip.xml.
Servlet Selection based on servlet mapping is tested in our testsuite. this should work. Can you provide us  with the sip.xml or have a standalone war reproducing the problem ?
 


7.  Doesn't the MSS has memory leaks or this is just an development issue?

2009-04-30 11:21:15,504 ERROR [org.mobicents.servlet.sip.core.dispatchers.DispatchTask] Unexpected exception while processing message
[message here]

java.lang.OutOfMemoryError: unable to create new native thread
       at java.lang.Thread.start0(Native Method)
       at java.lang.Thread.start(Thread.java:574)
       at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:426)
       at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:859)
       at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:31)
       at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:603)
       at org.mobicents.mscontrol.impl.MsSessionImpl.sendEvent(MsSessionImpl.java:117)
       at org.mobicents.mscontrol.impl.MsSessionImpl.setState(MsSessionImpl.java:135)
       at org.mobicents.mscontrol.impl.MsSessionImpl.<init>(MsSessionImpl.java:58)
       at org.mobicents.mscontrol.impl.MsProviderImpl.createSession(MsProviderImpl.java:74)
       at pl.carrierex.AnnouncementServer.doInvite(AnnouncementServer.java:47)
       at javax.servlet.sip.SipServlet.doRequest(SipServlet.java:225)
       at javax.servlet.sip.SipServlet.service(SipServlet.java:325)
       at org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher.callServlet(MessageDispatcher.java:202)
       at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher$1.dispatch(InitialRequestDispatcher.java:405)
       at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.run(DispatchTask.java:51)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)

This is a Media Server problem it seems not Sip Servlets. Media Server teeam will help there.
 

Best Regards,
Mariusz Rutkowski

Jean Deruelle

unread,
May 4, 2009, 10:45:58 AM5/4/09
to mobicent...@googlegroups.com

5.  I'd also ask about Via, and Record-Route header. Format of headers MSS responses is kinda strange. Doesn't the server should put each Route or Via into separate header, not just separate them with comma char?.
We're using Kamalio SIP server at our platform and those headers are not compatible with them.

Your SIP Server doesn't seem RFC 3261 compliant. However there is a setter in jain sip to allow pretty encoding and have them in separate headers. I will create an Issue to allow the configuration of it through MSS.

Issue created at http://code.google.com/p/mobicents/issues/detail?id=678

Mariusz Rutkowski

unread,
May 4, 2009, 4:51:01 PM5/4/09
to mobicent...@googlegroups.com
Hey Amit,

I'll add my answers here:

Ad. 2:
    Of course I've had registered MsConnectionListener and I'm able to catch CONNECTION_FAILED event. After I checking documentation I see that this means: "Fired as soon as the creation of MsConnection fails for reasons specified in MsConnectionEventCause". Next, I checking event cause (I get FACILITY_FAILURE). Once again I looking into documentation where I can read "FACILITY_FAILURE Represents the MsConnectionEvent creation failed due to facility failure like Endpoint already has reached its maximum number of MsConnection that it can handle".
In my opinion this a bit miss understanding. How can endpoint reach maximum connection number if I already dialled only once to the server. REMOTE_SDP_INVALID would be more advisable for this occasion.
Of course when I catch CONNECTION_FAILED event I create 500 response. But  better , should be 488, this will tell remote UA that's there is something wrong with codecs.
This is not a big problem since this happened only few times for us, but its worth to regulate.

Ad. 3:
    From technically point of view its OK, but practise shows that it's other world :) The problem is when remote client set "use only preferred codec" and picks one of the unsupported codecs by the mediaserver. In this time mediaserver doesn't fire any  exception,  anything. As I mentioned in previous mails I setting simple AnnoncemnetSever and in this case better would be 488. In future we would like to move our services platform to MSS, after that this problem may occur more often and it can annoy our clients.

Ad. 4:
    It's great news. I'm looking forward for newer version of mss.

Ad 5:
    At this time it's a bit hard to me reproduce this or even diagnose this problem. I'm setting MSS in pre-production system for test purpose. So now I only reporting issues and  trying  to figure what can forced this. We think about using mss wider at our platform, but I'd also like to reduce all unpredicted exception from server side.

Cheers,
Mariusz Rutkowski

Mariusz Rutkowski

unread,
May 4, 2009, 5:10:30 PM5/4/09
to mobicent...@googlegroups.com
This fits my needs. Thanks.

Mariusz Rutkowski

unread,
May 4, 2009, 5:09:04 PM5/4/09
to mobicent...@googlegroups.com
Hey Jean,

First of all, I really appreciate your answer. I'm glad to see that mobicents team are open to any suggestion from public. I'm sure that together we'll make MSS better ;). Here you are my answers (check also my previous post):

Ad 5:
    We've checked. Kamalio SIP Server works with comma separated headers. Of course you're right this is fully compatible with RFC3261, but when I reporting this I more thought about remote UAs. From our knowledge results that more of "made in china" UA, may not support all of the needed RFC. If we can built wide services this may lead to unneeded issues;/
Configure this at server side would be more appreciate for us.

Ad 6:
    Of cores I've tried common sip.xml file for servlet-mapping. It works very well.The problem begins when I try to map more than one servlet (I'm able to register my sip container with two servlets, but every deploy failes:(). I get exeption:
23:03:16,542 ERROR [Digester] Begin event threw exception
java.lang.IllegalArgumentException: only one of the <servlet-mapping> or <main-servlet> can be present in the sip.xml
        at org.mobicents.servlet.sip.startup.SetServletSelection.begin(SipRuleSet.java:450)
        at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1354)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

I checked http://www.jcp.org/xml/ns/sipservlet/sip-app_1_1.xsd and if I'm right I can use more than one servlet-mapping element (<xs:element maxOccurs="unbounded" name="servlet-mapping" type="servlet-mappingType"/>).

My sip.xml looks like (i've modifed my announcementserver sip.xml for test purpose only):

<?xml version="1.0" encoding="UTF-8"?>

<sip-app>
    <app-name>pl.carrierex.AnnouncementServer</app-name>
    <display-name>AnnouncementServer</display-name>
    <description>AnnouncementServer</description>
   
    <servlet-selection>
        <servlet-mapping>
            <servlet-name>AnnouncementServlet</servlet-name>
            <pattern>
                <and>
                    <equal>
                        <var>request.method</var>
                        <value>INVITE</value>
                    </equal>
                    <equal>
                        <var>request.uri.user</var>
                        <value>annc</value>
                    </equal>
                </and>
            </pattern>
        </servlet-mapping>
       
        <servlet-mapping>
            <servlet-name>VoicemailServlet</servlet-name>
            <pattern>
                <and>
                    <equal>
                        <var>request.method</var>
                        <value>INVITE</value>
                    </equal>
                    <equal>
                        <var>request.uri.user</var>
                        <value>voicemail</value>
                    </equal>
                </and>
            </pattern>
        </servlet-mapping>
    </servlet-selection>

    <servlet>
        <servlet-name>AnnouncementServlet</servlet-name>
        <display-name>AnnouncementServlet</display-name>
        <description>AnnouncementServlet</description>
        <servlet-class>
            pl.carrierex.AnnouncementServer
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
   
    <servlet>
        <servlet-name>VoicemailServlet</servlet-name>
        <display-name>VoicemailServlet</display-name>
        <description>VoicemailServlet</description>
        <servlet-class>
            pl.carrierex.VoicemailServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
</sip-app>


Best Regards
Mariusz Rutkowski

Mariusz Rutkowski

unread,
May 4, 2009, 5:41:13 PM5/4/09
to mobicent...@googlegroups.com
Hey Vladimir,

I'll answer you for my last question:

Ad 7.:
    This might by something wrong with my application or maybe something with server. Lately I was testing MSS with visualvm and checking how looks memory management there. I've observed that java heap was cleaning more regularly but count of MsSessionEventQueue threads were increasing per each call. Maybe this is a good lead to solve this problem ? I'm reproducing this problem with sipp now.

Best Regards,
Mariusz Rutkowski

Bartosz Baranowski

unread,
May 4, 2009, 7:00:56 PM5/4/09
to mobicent...@googlegroups.com
@ 5th: Are those triggered under certain load(or after certain time?) or is it just an ocasional exception that pops up?
@ 7th: indeed seems bug in mms, possibly worker threads are not reclaimed for some reason. Or jvm runs out of memory - this can happen for various reason, we tried to optimize processing and memory usage as much as we could but it still can eat a lot - depending what else runs and takes place on server, it may require to change memory allocated for jvm.
--
Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.

Vladimir Ralev

unread,
May 4, 2009, 7:30:33 PM5/4/09
to mobicent...@googlegroups.com
FYI, the servlet mapping issue is a confirmed bug now http://code.google.com/p/mobicents/issues/detail?id=681 and fixed in the trunk. Soon we will spin the snapshot binary for download, if you dont want to build from trunk.

Mariusz Rutkowski

unread,
May 5, 2009, 3:55:23 AM5/5/09
to mobicent...@googlegroups.com
Hey Bartosz,

Ad. 5:
These exceptions pops up  occasionally. In practise I've seen them only few times.

Ad. 7:
I appreciate that. If you need any additionally informations just let me know.

Best Regards,
Mariusz Rutkowski

Mariusz Rutkowski

unread,
May 5, 2009, 4:06:21 AM5/5/09
to mobicent...@googlegroups.com
Hey Vladimir,

I'd like to add one more issue to my list :):

8. Missing appname param in Via header causes NullPointerException while it should be DispatcherException. Here's my trace:

2009-05-05 08:56:03,891 INFO  [org.mobicents.servlet.sip.core.dispatchers.ResponseDispatcher] viaHeader = Via: SIP/2.0/UDP [xxx]:5080;branch=z9hG4bK8a01950fcd383afbb8d5cec58f54429f

2009-05-05 08:56:03,891 ERROR [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] An unexpected exception happened while routing the response SIP/2.0 200 OK
Call-ID: 96a94-292c3...@192.168.1.190
From: <sip:055264467@[xxx];user=phone>;tag=8535535
To: "0334446026" <sip:0334446026@[xxx];user=phone>;tag=524ec-292c33c3
CSeq: 1 BYE
Via: SIP/2.0/UDP [xxx]:5080;branch=z9hG4bK8a01950fcd383afbb8d5cec58f54429f
Content-Length: 0

java.lang.NullPointerException
        at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
        at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:730)
        at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.getApplicationNameFromHash(SipApplicationDispatcherImpl.java:849)
        at org.mobicents.servlet.sip.core.dispatchers.ResponseDispatcher.dispatchMessage(ResponseDispatcher.java:133)
        at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.processResponse(SipApplicationDispatcherImpl.java:676)
        at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:290)
        at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:158)
        at gov.nist.javax.sip.DialogFilter.processResponse(DialogFilter.java:1045)
        at gov.nist.javax.sip.stack.SIPClientTransaction.nonInviteClientTransaction(SIPClientTransaction.java:643)
        at gov.nist.javax.sip.stack.SIPClientTransaction.processResponse(SIPClientTransaction.java:551)
        at gov.nist.javax.sip.stack.SIPClientTransaction.processResponse(SIPClientTransaction.java:1479)
        at gov.nist.javax.sip.stack.UDPMessageChannel.processMessage(UDPMessageChannel.java:497)
        at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:414)
        at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:258)

Jean Deruelle

unread,
May 5, 2009, 4:54:42 AM5/5/09
to mobicent...@googlegroups.com

Oleg Kulikov

unread,
May 5, 2009, 5:33:55 AM5/5/09
to mobicent...@googlegroups.com
Regarding 7.
 
Can you explain message flow. We need to be sure that application cleans all connections and sessions.

2009/5/5 Jean Deruelle <jean.d...@gmail.com>

Jean Deruelle

unread,
May 6, 2009, 2:22:21 AM5/6/09
to mobicent...@googlegroups.com
Hi Mariusz,

Regarding Mobicents Sip Servlets Issues :
Missing appname from ViaHeader Issue 683 (http://code.google.com/p/mobicents/issues/detail?id=683), Servlet mapping issue 681 (http://code.google.com/p/mobicents/issues/detail?id=681), Multi line Headers Issue 678 (http://code.google.com/p/mobicents/issues/detail?id=678) are all fixed and you can test them out from the binary snapshot available from here :
http://hudson.jboss.org/hudson/job/MobicentsSipServletsRelease/358/

Please report back if the Mobicents Sip Servlets is behaving according to what is expected now wrt those issues.

Thanks in advance
Best regards
Jean

Jean Deruelle

unread,
May 6, 2009, 2:23:44 AM5/6/09
to mobicent...@googlegroups.com
Also please note that for the multi line headers Issue you'll have to change the configuration
in the connector tag of server.xml, use the following attribute
usePrettyEncoding="true" to enable it. This is similar to useStun attribute as mentionned in
http://www.mobicents.org/configuration.html

Mariusz Rutkowski

unread,
May 6, 2009, 9:29:23 AM5/6/09
to mobicent...@googlegroups.com
Hi Jean,

#683: works now.
#678: works great with Via Header. Can we do the same thing with Recor-Route headers?
#681: works now.

Thanks for fixing my issues.:) Outstanding work!:)

Best Regards,
Mariusz Rutkowski

Jean Deruelle

unread,
May 6, 2009, 9:33:21 AM5/6/09
to mobicent...@googlegroups.com
#678 will need a new version of the jain sip stack so that might take a bit more time to get but I'll discuss it with the jain sip stack lead and revert back to you.
Thanks for reporting the issues !

Mariusz Rutkowski

unread,
May 6, 2009, 9:40:39 AM5/6/09
to mobicent...@googlegroups.com
I'll look forward word that :)

Mariusz Rutkowski

unread,
May 6, 2009, 9:42:02 AM5/6/09
to mobicent...@googlegroups.com
Hey Oleg,

I don't realy know what you mean about message flow. Here you're sipp message scenario (I was dialing through our SIP Proxy):

------------------------------ Scenario Screen -------- [1-9]: Change Screen --
  Call-rate(length)   Port   Total-time  Total-calls  Remote-host
  10.0(0 ms)/1.000s   5060    2685.00 s         4785  [xxx]:5060(UDP)

  0 new calls during 0.975 s period      1 ms scheduler resolution
  0 calls (limit 13)                     Peak was 16 calls, after 956 s
  0 Running, 0 Paused, 0 Woken up
  3351 dead call msg (discarded)         0 out-of-call msg (discarded)
  3 open sockets

                                 Messages  Retrans   Timeout   Unexpected-Msg
      INVITE ---------->         4785      29        0
         407 <----------         4785      0         0         0
         ACK ---------->         4785      0
      INVITE ---------->         4785      10        0
         100 <----------         4777      4         0         0
         180 <----------         4749      1         0         29
         200 <----------  E-RTD1 4128      69        0         628
       Pause [    100ms]         4128                          2
         ACK ---------->         4126      0
       Pause [   3000ms]         4126                          3
         BYE ---------->         4123      177       0
         200 <----------         4123      0         0         0
------------------------------ Test Terminated --------------------------------


After proceeding 4k  invites  MSS starts responding sip sip response 500, and every incoming invite ended with OutOfMemory error.

ps. Oleg, i can mail you my app's source code. Maybe there's the bug. I would better not publicate it at  public  forum.

Best Regards,
Mariusz Rutkowski

Bartosz Baranowski

unread,
May 6, 2009, 12:00:10 PM5/6/09
to mobicent...@googlegroups.com
Controll protocol/api flow would also be of interest.

Jean Deruelle

unread,
May 6, 2009, 12:52:02 PM5/6/09
to mobicent...@googlegroups.com
I'm gonna make the change to jain sip stack to allow that on Route and  Record Route headers also.
Do you need it on some other headers too ?

Mariusz Rutkowski

unread,
May 6, 2009, 6:07:12 PM5/6/09
to mobicent...@googlegroups.com
These changes should cover our needs. Thanks for implementing that.

Mariusz Rutkowski

unread,
May 6, 2009, 6:19:18 PM5/6/09
to mobicent...@googlegroups.com
What you exactly mean on control protocol/api flow ?

It's simple sip-servlet application, with half-duplex link created between Packet/Relay endpoint and announcement media trunk.

Bartosz Baranowski

unread,
May 6, 2009, 6:33:24 PM5/6/09
to mobicent...@googlegroups.com
What commands and when are invoked - and through what, on mms.

Mariusz Rutkowski

unread,
May 6, 2009, 6:52:01 PM5/6/09
to mobicent...@googlegroups.com
Here you are (in a short way:)):

onInvite:
1. Creates MsConnection by throwing createNetwork Connection (media/trunk/PacketRelay/$) on MsSession
2. registering MsConnectionListener to MsConnection
3. modifing sdp

when connectionOpen event is captured:
1. creating halfduplex link on MsSession
2. registering MsNotificationListener, MsLinkListener to this link
3. joining media/trunk/Announcement/$ to this link
4. sending 200 OK, response

when link is connected.
1. creates MsRequestedEvent events: COMPLETED, FAILED and MsPlayRequestedSignal: play
2. generating requested signal (play wav file) on MsLink

when link completed update event is captured:
1. releasing MsConnection and MsLink

onBye:
1. Releasing MsConnection and MsLink

Mariusz Rutkowski

unread,
May 7, 2009, 4:32:18 AM5/7/09
to mobicent...@googlegroups.com
Issue no. 9:
    I've observed strange problem with Cisco SPA-941(this might be common problem for all cisco's hardware) IP phone and media-server. When dialing media-server the voice quality is very poor. After changing "RTP Packet Size" to 0.020 it works greate. I've checked RTPManager settings. There is the PacketizationPeriod setting setted to 20. Changing this to 30 and set proper value at phone  also generates poor quality of voice.

So I think, it might be something wrong with mss pakcetization process. My guess is that:
1. media-server should put a=ptime:20 into sdp payload (it should inform remote UA about the period of packetization)
2. changing value of PacketizationPeriod in config file don't fork

Cheers,
Mariusz Rutkowsi

Oleg Kulikov

unread,
May 7, 2009, 5:54:49 AM5/7/09
to mobicent...@googlegroups.com
20 ms is default packetization period for G711. ptime attribute is used when packetization period differs from default value


2009/5/7 Mariusz Rutkowski <mka...@gmail.com>

Oleg Kulikov

unread,
May 7, 2009, 5:56:00 AM5/7/09
to mobicent...@googlegroups.com
looks correct, link and connection dropped.

2009/5/7 Mariusz Rutkowski <mka...@gmail.com>

Mariusz Rutkowski

unread,
May 7, 2009, 6:38:50 AM5/7/09
to mobicent...@googlegroups.com
So.. if I'm right if incoming INVITE request contains ptime attribute setted to for example to 30 then media-server should respond with ptime 30, and use 30ms timeout for packetizing ?

Oleg Kulikov

unread,
May 8, 2009, 5:45:41 AM5/8/09
to mobicent...@googlegroups.com
Media server responds without ptime and source should reset packetization period back to 20ms.

2009/5/7 Mariusz Rutkowski <mka...@gmail.com>

Mariusz Rutkowski

unread,
May 10, 2009, 7:50:06 AM5/10/09
to mobicent...@googlegroups.com
Lets summarise what we've got:

@1:
Amit, what about an outgoing connection, made from mobicents ?

@2,@3:
Any decisions have been taken ?

@4:
confirmed and waiting for fix

@5: occasional  exceptions:
We'll see if this disappear  at next release :)
 
@5: Via/RR
confirmed(678) and fixed

@6: Serlvlet mapping:
confirmed(681) and fixed

@7: memory leaks:
Unfortunately still unresolved :( After certain of time MSS starts reporting OutOfMemoryError exceptions :(

@8: Missing appname param in Via header causes NullPointerException
confirmed(683) and fixed

@9: ptime
Oleg, so it looks like Ciscio's hardware (I observed that on SPA 942) doesn't work like you said. Any other suggestion how can I avoid this problem ? I'll see, if we can set this parameter via provisioning.

Cheers,
Mariusz

Oleg Kulikov

unread,
May 11, 2009, 3:29:48 AM5/11/09
to mobicent...@googlegroups.com
@9: ptime
Oleg, so it looks like Ciscio's hardware (I observed that on SPA 942) doesn't work like you said. Any other suggestion how can I avoid this problem ? I'll see, if we can set this parameter via provisioning.
 
Should be able to configure. At least default values. 

@7: memory leaks:
Unfortunately still unresolved :( After certain of time MSS starts reporting OutOfMemoryError exceptions :(
did you profile it? which objects cause leaks?
 
2009/5/10 Mariusz Rutkowski <mka...@gmail.com>

Mariusz Rutkowski

unread,
May 12, 2009, 9:57:45 AM5/12/09
to mobicent...@googlegroups.com
Hey Oleg,

I've already profiled my app. Here's the summary when outofmomeruerror occur:

Heap Memory:
    Allocated:           314MB
    Used:                 149MB
    Limit:                  493MB
Non-Heap Memory:
    Allocated:           49MB
    Used:                  39MB
    Limit:                  112MB
Garbage Collector:
    Number of callections:       264
    Time:                                 0:13
Classes:
    Currently loaded:                 6374
    Total unloaded:                    159
Threads:
    Currently live:                       2319
    Currently live daemon:              93
    Peak:                                    2319
    Total created:                        2336

Operating System:                 Linux
Version:                                2.6.24.2-grsec
Arch:                                     i386
Number of processors                4

Correct me, but imho this problem might be caused by hanging MsSessionEventQueue's threads. As I mentioned in one of my previous mail I've got bunch of them.

Cheers,
Mariusz Rutkowski

Oleg Kulikov

unread,
May 12, 2009, 3:04:36 PM5/12/09
to mobicent...@googlegroups.com
If this is happen then something abnormal in signal/event request sequence

2009/5/12 Mariusz Rutkowski <mka...@gmail.com>

Mariusz Rutkowski

unread,
May 13, 2009, 5:54:32 AM5/13/09
to mobicent...@googlegroups.com
Hey Oleg,

I've just posted a little piece of my code at:
https://zephyr.us.to/~mkaziu/servlet/

You might check if there is anything what can lead to OutOfMemoryError. I'm open to any suggestion.


-----------------
Issue no #10:

2009-05-13 09:30:24,061 ERROR [Mobicents-SIP-Servlets] Event: Mic=0,Speaker=0
:Event: Mic=0,Speaker=0

Expecting  >>>
<<< got >>>=<<<
java.text.ParseException: Event: Mic=0,Speaker=0
:Event: Mic=0,Speaker=0

Expecting  >>>
<<< got >>>=<<<
        at gov.nist.javax.sip.parser.Parser.createParseException(Parser.java:45)
        at gov.nist.javax.sip.parser.EventParser.parse(EventParser.java:88)
        at gov.nist.javax.sip.parser.StringMsgParser.processHeader(StringMsgParser.java:398)
        at gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:194)
        at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:298)

        at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:258)
        at java.lang.Thread.run(Thread.java:595)

What does this error stand for ?:)

Cheers,
Mariusz

Oleg Kulikov

unread,
May 13, 2009, 6:48:35 AM5/13/09
to mobicent...@googlegroups.com
will look at it

2009/5/13 Mariusz Rutkowski <mka...@gmail.com>

Jean Deruelle

unread,
May 13, 2009, 7:14:50 AM5/13/09
to mobicent...@googlegroups.com
This error means that the Event Header received is not compliant with RFC3265.
event type is not present See Section 7.2.1. "Event" header of RFC3265

Do you have the full message received by any chance ?

Thanks
Jean

Mariusz Rutkowski

unread,
May 13, 2009, 7:31:22 AM5/13/09
to mobicent...@googlegroups.com
Here you are:

2009-05-13 09:30:24,066 INFO  [org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher] Dispatching response SIP/2.0 200 OK
Via: SIP/2.0/UDP [xxx]:5080;branch=z9hG4bKcf7d773275beb48db3f124aac8d27f06;appname=7397f1f8
From: "081469" <sip:081469@[xxx]>;tag=7723465
To: "xxx" <sip:814775421@[xxx]>;tag=206204708
Call-ID: 182762384818214...@192.168.208.34
CSeq: 1 BYE
Contact: <sip:814775421@[xxx]:15722>
Event: Mic=0,Speaker=0
Content-Length: 0

Mariusz

Jean Deruelle

unread,
May 13, 2009, 7:48:46 AM5/13/09
to mobicent...@googlegroups.com
Yeah the Event Header cannot be used outside SUBSCRIBE NOTIFY.
See Section 7.2. New Headers of RFC 3265.

If that's a custom header of yours (and I hope it is), you should change to another name not clashing with an existing RFC such as My-Event by example.

Hope this helps
Jean

Jean Deruelle

unread,
May 13, 2009, 8:34:22 AM5/13/09
to mobicent...@googlegroups.com
This snapshot contains the new jain sip version allowing it for Record Route and
Route headers too

http://hudson.jboss.org/hudson/job/MobicentsSipServletsRelease/366/

Could you verify and revert back to us ?
Thanks

Mariusz Rutkowski

unread,
May 13, 2009, 9:33:32 AM5/13/09
to mobicent...@googlegroups.com
It's an event arrived from one of our customers. I think we can skip this ;)

Cheers,
Mariusz

Mariusz Rutkowski

unread,
May 13, 2009, 9:34:14 AM5/13/09
to mobicent...@googlegroups.com
That's it! Looks great :)

Thanks,
Mariusz

Mariusz Rutkowski

unread,
May 16, 2009, 6:14:22 AM5/16/09
to mobicent...@googlegroups.com
Does anyone has any idea ? Oleg ?

Jean Deruelle

unread,
May 18, 2009, 3:11:50 AM5/18/09
to mobicent...@googlegroups.com
Maybe close the connection if the link fails to be created too so that there is no leak of connection in this case

Oleg Kulikov

unread,
May 18, 2009, 4:24:18 AM5/18/09
to mobicent...@googlegroups.com
Code looks correct.

2009/5/18 Jean Deruelle <jean.d...@gmail.com>

Mariusz Rutkowski

unread,
May 19, 2009, 4:48:29 AM5/19/09
to mobicent...@googlegroups.com
So, it looks like there is something wrong elsewhere, but where? :(.

Please, let me know if I can do some more useful tests to fix this. All I know has been written in my previous posts.
I run jboss with default settings, with logs limited.

Best Regards,
Mariusz
Reply all
Reply to author
Forward
0 new messages