Topic
2 replies Latest Post - ‏2012-06-19T14:43:59Z by rafalak
rafalak
rafalak
2 Posts
ACCEPTED ANSWER

Pinned topic how to capture all SIP messages sent and received by JSR289 stack?

‏2012-06-18T10:52:10Z |
Hello there!

I have (hopefully) a very simple question: is there a way to capture all SIP messages sent and received by WebSphere's JSR289 stack? I want to capture all SIP messages and store them in a single log file so I'm interested in SIP messages text only i.e. it can be a String or byte[] as opposed to JSR289 SipServletMessage object. I'd like to do this from within JSR289 container i.e. without resorting to using Wireshark.

I couldn't find anything in JSR289 itself but perhaps there's a WebSphere specific extension to achieve this?

I know that I do get all incoming SIP messages in my SipServlet's doRequest() method and for most outgoing messages it's easy as well: once SipServletMessage.send() returns without exception I can assume that the message has been sent. However it's more tricky with API's like Proxy.doProxy() which does not return sent SIP message (with SIP headers modified by doProxy() method).

I'm hoping that there's some listener for all sent/received SIP messages that can be registered with JSR289 containter.

I'd appreciate any pointers.

Thank you in advance for your feedback.
Updated on 2012-06-19T14:43:59Z at 2012-06-19T14:43:59Z by rafalak
  • NitzanNissim
    NitzanNissim
    3 Posts
    ACCEPTED ANSWER

    Re: how to capture all SIP messages sent and received by JSR289 stack?

    ‏2012-06-19T14:14:40Z  in response to rafalak
    If you are only interested in the SIP message text, you can make WebSphere SIP container print those to the server log.

    You will have to set the following custom properties in the admin console at
    Application servers > server_name > SIP container > Custom properties

    Name: javax.sip.trace.msg.in
    Value: true  

    Name: javax.sip.trace.msg.out
    Value: true

    Then restart the server, to let change take effect.

    This will make all incoming and outgoing messages print to SystemOut.log that resides in the profile logs/server_name folder.

    Note that this will only show the text of these messages that the SIP stack was able to parse.

    If you would like to also see any malformed messages that were received, you will need to take some extra actions:

    The default behavior of the container is not to print the raw packet received on the wire, due to security\privacy concerns, so you will have to add the following additional custom property in the same place as above:

    Name: javax.sip.hide.message.headers
    Value: None

    Then go to
    Logging and tracing > server_name > Change log detail levels

    and set the log details level to be:
    *=info: com.ibm.ws.sip.stack.dispatch.Dispatcher=all

    Now you will be able to see both the raw packet and the parsed packets in the trace.log file that is in the same folder as the SystemOut.log

    Thanks,
    Nitzan
    • rafalak
      rafalak
      2 Posts
      ACCEPTED ANSWER

      Re: how to capture all SIP messages sent and received by JSR289 stack?

      ‏2012-06-19T14:43:59Z  in response to NitzanNissim
      Hi Nitzan,

      Thank you very much for such quick and detailed response! This is exactly the information I was looking for!