1

I'm developing a Java application based on JAIN SIP with the NIST implementation and would like to enable/view SIP stack debugging.

I can't find a working way to achieve that - any help would be appreciated.

Thanks! Joe

Johannes Liebermann
  • 811
  • 1
  • 10
  • 20
  • I'd try to set Log4J to DEBUG level for `gov.nist.*`. – Eli Acherkan Apr 16 '12 at 13:43
  • Thanks for your response :-) To be honest I'm not sure my application is sending any logs to Log4J... any idea how to verify that? – Johannes Liebermann Apr 16 '12 at 14:25
  • The question is whether JAIN-SIP writes SIP debugging info to Log4J. If you're not sure where to look for logs, try to locate Log4J's configuration file (it's usually called `log4j.properties`). It's possible that no such file exists and you'll have to create it yourself - see [here](http://logging.apache.org/log4j/1.2/manual.html). Also, since JAIN-SIP is open source, you can step into its code with a debugger and see what kind of debugging info it prints. – Eli Acherkan Apr 17 '12 at 06:46
  • Thanks a lot - will have a look into that. – Johannes Liebermann Apr 17 '12 at 08:52

2 Answers2

2

Try passing the following properties when you initialize the stack

gov.nist.javax.sip.LOG_MESSAGE_CONTENT=true
gov.nist.javax.sip.TRACE_LEVEL=32
gov.nist.javax.sip.DEBUG_LOG=logs/mss-jsip-debuglog.txt
gov.nist.javax.sip.SERVER_LOG=logs/mss-jsip-messages.xml
jeand
  • 2,325
  • 14
  • 12
1

Try this

    Properties properties = new Properties();
    properties.setProperty("com.g5.javax.sip.STACK_NAME",Profile.getUserName());
    properties.setProperty("com.g5.javax.sip.IP_ADDRESS", Profile.getProxyIp());

    // DEBUGGING: Information will go to files

    properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "32");
    properties.setProperty("gov.nist.javax.sip.SERVER_LOG",
            "textclient.txt");
    properties.setProperty("gov.nist.javax.sip.DEBUG_LOG",
            "textclientdebug.log");
    try{
        sipStack = sipFactory.createSipStack(properties);

    }catch(Exception e){
        System.out.println(e.getMessage());
    }
  • in the latest SIP JAIN implementation this way is defined as deprecated. You should use gov.nist.javax.sip.SERVER_LOGGER and gov.nist.javax.sip.STACK_LOGGER sadly could not configure it properly – cilap Oct 14 '16 at 20:50