[sip-comm-dev] Question about RTP packet length


#1

All,

while reviewing some code in the RTP packet handling and packet
receive process I discovered some parts that could be improved.
Currently the receiver part (TransformInputStream) misses some
checks and other stuff:

- no check is done if the received data could be a RTP packet:
  no check regarding the minimum number of bytes received (length
  of fixed RTP header, extension header, etc). I'll do that
  in the next few days - maybe next weekend.

- the class is designed to receive and process only _one_ RTP
  packet at a time. If the processing thread, for example the
  thread that processes the codec, plays sound or video, is not
  fast enough then packet loss occur because the internal buffer
  is overwritten. Here I propose to implement of a packet ring
  buffer (maybe 10 to 20 pre-allocated RTP packet buffers) to
  minimize the possibility of packet loss (for example in some
  network loads situations we may receive several RTP packets
  in fast succession, maybe to fast for the processing thread).

- to reduce the number of "new" operations I could preallocate
  the buffers in the constructor. To to this efficiently I need some
  estimates about received data size:
  = Audio with aLaw or uLaw code is between 160 and 240 bytes
    (typically) plus RTP header overhead
  = Other audio codecs use even less AFAIK
  = Video codecs - I don't have a clue about the size of video packet.
    Can some kind soul provide some insight here?

Thanks.

Regards,
Werner

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi

I dont need to log all sip messages exchanged, in the jainsipserver.log
file.

How can i inhibit this feature ?

Thankyou

carlos

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Carlos,

I dont need to log all sip messages exchanged, in the jainsipserver.log
file.

Here is what you could do to get rid of them:

--- a/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java
@@ -166,7 +166,7 @@ public class SipStackProperties
         // NIST SIP specific properties
         this.setProperty(NSPNAME_DEBUG_LOG, NSPVALUE_DEBUG_LOG);

- this.setProperty(NSPNAME_SERVER_LOG, NSPVALUE_SERVER_LOG);
+ //this.setProperty(NSPNAME_SERVER_LOG, NSPVALUE_SERVER_LOG);

         this.setProperty(NSPNAME_DEBUG_LOG_OVERWRITE,
                          NSPVALUE_DEBUG_LOG_OVERWRITE);

How can i inhibit this feature ?

This looks more like a bug to me ;). It would make sense to disable the
JAIN-SIP logging of well-formed messages by default.

Should this be commited to SVN?

Cheers,

···

On Mon, Feb 09, 2009 at 07:26:03PM -0000, Carlos Alexandre wrote:

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hey Seb,

Sébastien Mazy wrote:

- this.setProperty(NSPNAME_SERVER_LOG, NSPVALUE_SERVER_LOG);
+ //this.setProperty(NSPNAME_SERVER_LOG, NSPVALUE_SERVER_LOG);

<snip/>

Should this be commited to SVN?

Well it seems to me that your change would disable message logging for
all messages (as opposed to only well-formed). I seem to recall that
jain-sip had log level control. Doesn't it apply to message logs?

Cheers
Emil

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hi Emil,

Sébastien Mazy wrote:
> - this.setProperty(NSPNAME_SERVER_LOG, NSPVALUE_SERVER_LOG);
> + //this.setProperty(NSPNAME_SERVER_LOG, NSPVALUE_SERVER_LOG);

<snip/>

> Should this be commited to SVN?

Well it seems to me that your change would disable message logging for
all messages (as opposed to only well-formed). I seem to recall that
jain-sip had log level control. Doesn't it apply to message logs?

Short answer: no

According to the javadoc, JAIN-SIP only logs "valid incoming messages"
in the server log. I've just checked and malformed keep-alive messages
coming from the registrar are not present in the server log (there are
parse exceptions written in the debug log though). Valid outgoing
messages are also logged, despite what the javadoc says (an outgoing
message for SC could be an incoming message from the stack pow?). With
JAIN-SIP log level, one can choose the verbosity of the logging and
whether to log valid messages in the debug log if no server log is set.

I propose to disable logging of valid SIP messages in SC for now so as
not to flood users' server log. The drawback is that it would require a
new compilation to enable JAIN-SIP server log but our SIP service
implementation already logs valid messages for higher log levels anyway.

JAIN-SIP relevant Javadoc for reference:

* <li><b>gov.nist.javax.sip.TRACE_LEVEL = integer </b><br/> You can use the standard log4j
* level names here (i.e. ERROR, INFO, WARNING, OFF, DEBUG) If this is set to INFO (or TRACE) or
* above, then incoming valid messages are logged in SERVER_LOG. If you set this to 32 and specify
* a DEBUG_LOG then vast amounts of trace information will be dumped in to the specified
* DEBUG_LOG. The server log accumulates the signaling trace. <a href="{@docRoot}/tools/tracesviewer/tracesviewer.html">
* This can be viewed using the trace viewer tool .</a> Please send us both the server log and
* debug log when reporting non-obvious problems. You can also use the strings DEBUG or INFO for
* level 32 and 16 respectively. If the value of this property is set to LOG4J, then the effective
* log levels are determined from the log4j settings file (e.g. log4j.properties). The logger name
* for the stack is specified using the gov.nist.javax.sip.LOG4J_LOGGER_NAME property. By default
* log4j logger name for the stack is the same as the stack name. For example, <code>
* properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "LOG4J");
* properties.setProperty("gov.nist.javax.sip.LOG4J_LOGGER_NAME", "SIPStackLogger");
* </code>
* allows you to now control logging in the stack entirely using log4j facilities. </li>

···

On Wed, Feb 11, 2009 at 06:33:20PM +0100, Emil Ivov wrote:
*
* <li><b>gov.nist.javax.sip.SERVER_LOG = fileName </b><br/> Log valid incoming messages here.
* If this is left null AND the TRACE_LEVEL is above INFO (or TRACE) then the messages are printed
* to stdout. Otherwise messages are logged in a format that can later be viewed using the trace
* viewer application which is located in the tools/tracesviewer directory. <font color=red> Mail
* this to us with bug reports. </font> </li>
*
* <li><b>gov.nist.javax.sip.LOG_MESSAGE_CONTENT = true|false </b><br/> Set true if you want to
* capture content into the log. Default is false. A bad idea to log content if you are using SIP
* to push a lot of bytes through TCP. </li>

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

As of r5016, JAIN-SIP RI server messages are no longer logged by
default.

···

On Sat, Feb 14, 2009 at 05:23:48PM +0100, Sébastien Mazy wrote:

I propose to disable logging of valid SIP messages in SC for now so as
not to flood users' server log. The drawback is that it would require a
new compilation to enable JAIN-SIP server log but our SIP service
implementation already logs valid messages for higher log levels anyway.

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#7

Im sorry for my ignorance....

What is r5016?

Thanks
Carlos

···

-----Original Message-----

From: Sébastien Mazy [mailto:melyadon@gmail.com] On Behalf Of Sébastien Mazy

Sent: segunda-feira, 16 de Fevereiro de 2009 19:14
To: dev@sip-communicator.dev.java.net
Subject: Re: [sip-comm-dev] How to inhibit jainsipserver log

On Sat, Feb 14, 2009 at 05:23:48PM +0100, Sébastien Mazy wrote:

I propose to disable logging of valid SIP messages in SC for now so as
not to flood users' server log. The drawback is that it would require a
new compilation to enable JAIN-SIP server log but our SIP service
implementation already logs valid messages for higher log levels anyway.

As of r5016, JAIN-SIP RI server messages are no longer logged by
default.

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#8

Sorry, I meant: "the modification you wanted as been commited to our
source code repository in revision 5016", or shorter: "problem fixed" :wink:

···

On Fri, Feb 20, 2009 at 12:12:20PM -0000, Carlos Alexandre wrote:

Im sorry for my ignorance....

What is r5016?

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#9

In terms of nightly builts of SC, it means it will be available from wich build?

Thankyou

Carlos

···

-----Original Message-----

From: Carlos Alexandre [mailto:Carlos.Alexandre@nav.pt]

Sent: sexta-feira, 20 de Fevereiro de 2009 12:12
To: dev@sip-communicator.dev.java.net
Subject: RE: [sip-comm-dev] How to inhibit jainsipserver log

Im sorry for my ignorance....

What is r5016?

Thanks
Carlos

-----Original Message-----

From: Sébastien Mazy [mailto:melyadon@gmail.com] On Behalf Of Sébastien Mazy

Sent: segunda-feira, 16 de Fevereiro de 2009 19:14
To: dev@sip-communicator.dev.java.net
Subject: Re: [sip-comm-dev] How to inhibit jainsipserver log

On Sat, Feb 14, 2009 at 05:23:48PM +0100, Sébastien Mazy wrote:

I propose to disable logging of valid SIP messages in SC for now so as
not to flood users' server log. The drawback is that it would require a
new compilation to enable JAIN-SIP server log but our SIP service
implementation already logs valid messages for higher log levels anyway.

As of r5016, JAIN-SIP RI server messages are no longer logged by
default.

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#10

Any build >= 1690

···

On Fri, Feb 20, 2009 at 06:58:19PM -0000, Carlos Alexandre wrote:

In terms of nightly builts of SC, it means it will be available from
wich build?

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net