yes, there is. you can us pjsua_logging_config you can set the log and call back function pjsua_logging_config loggingConfig; pjsua_logging_config_default(&loggingConfig); then you can assign your values , for example: loggingConfig.level = 5; loggingConfig.console_level = 5; loggingConfig.cb = rpm_log_func; hope this helps On Mar 5, 2013, at 9:53 AM, Pai Peng wrote: Hello all again, the same problem with another question: How can I log SIP tracking message in TEXT without modify pjsip? THere is some call back functions available in pjsua_app? Thank you Regards, Pai On Mon, Mar 4, 2013 at 9:56 PM, Pai Peng <sipaipv6 at gmail.com<mailto:sipaipv6 at gmail.com>> wrote: Hello allo PJSIP experts, I have now a problem with logging SIP messages, which are sent out. I am using the following code to do it at this moment: PJ_LOG(5,(tsx->obj_name, "===>Raw data:\n%s", (tdata && tdata->buf.start)?tdata->buf.start:"NULL")); but sometime it gets "NULL" back, and sometimes it works fine. Must I call "pjsip_tx_data_invalidate_msg" before using the buf? Is there any other way to printf the SIP message out? Thanks a lot Regards, Pai _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip at lists.pjsip.org<mailto:pjsip at lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org Statement of Confidentiality The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or at 508.683.2500 and delete this message and its attachments, if any. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130305/c3a77a0b/attachment-0001.html>