Enabling debug logs on JAIN SIP (NIST implementation)

你说的曾经没有我的故事 提交于 2019-12-08 06:32:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!