问题
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
回答1:
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
回答2:
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());
}
来源:https://stackoverflow.com/questions/10174286/enabling-debug-logs-on-jain-sip-nist-implementation