Hi, when setting TRACE_JB to 1 in stream.c a trace file is created with the following call: pj_file_open(pool, trace_name, PJ_O_RDWR, &stream->trace_jb_fd); This will in turn cause a call to fopen with the mode set to "r+b" which won't create the file if it doesn't exist (at least on Linux, the situation might be different on Windows). If we instead call pj_file_open() with the parameter PJ_O_WRONLY the mode in the call to fopen will be "wb" which will indeed create the file if it doesn't exist. I'm attaching a patch file which will replace PJ_O_RDWR with PJ_O_WRONLY. Regards, Dan -------------- next part -------------- A non-text attachment was scrubbed... Name: trace_jb.patch Type: text/x-patch Size: 682 bytes Desc: not available URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20111018/267a05fc/attachment.patch>