static pj_status_t logging_on_tx_msg(pjsip_tx_data *tdata)
{
    char addr[PJ_INET6_ADDRSTRLEN+10];
    pj_str_t input_str = pj_str(tdata->tp_info.dst_name);
    
    /* Important note:
     *	tp_info field is only valid after outgoing messages has passed
     *	transport layer. So don't try to access tp_info when the module
     *	has lower priority than transport layer.
     */
    PJ_LOG(4,(THIS_FILE, "TX %d bytes %s to %s %s:\n"
			 "%.*s\n"
			 "--end msg--",
			 (tdata->buf.cur - tdata->buf.start),
			 pjsip_tx_data_get_info(tdata),
			 tdata->tp_info.transport->type_name,
			 pj_addr_str_print(&input_str, 
					   tdata->tp_info.dst_port, 
					   addr,
					   sizeof(addr), 
					   1),
			 (int)(tdata->buf.cur - tdata->buf.start),
			 tdata->buf.start));


    /* Always return success, otherwise message will not get sent! */
    return PJ_SUCCESS;
}
static pj_status_t logging_on_tx_msg(pjsip_tx_data *tdata)
{
    char addr[PJ_INET6_ADDRSTRLEN+10];
    pj_str_t input_str = pj_str(tdata->tp_info.dst_name);
    
     
    PJ_LOG(4,(THIS_FILE, "TX %d bytes %s to %s %s:\n"
			 "%.*s\n"
			 "--end msg--",
			 (tdata->buf.cur - tdata->buf.start),
			 pjsip_tx_data_get_info(tdata),
			 tdata->tp_info.transport->type_name,
			 pj_addr_str_print(&input_str, 
					   tdata->tp_info.dst_port, 
					   addr,
					   sizeof(addr), 
					   1),
			 (int)(tdata->buf.cur - tdata->buf.start),
			 tdata->buf.start));


     
    return PJ_SUCCESS;
}