I have tried by setting flag only but still no luck,Here is the configuration i am using.
# sip trace
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "db_url", "")
modparam("siptrace", "duplicate_uri", "sip:
homer.com:9060")
modparam("siptrace", "duplicate_with_hep", 1)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)
#HEPv2 == timestamp will be included to HEP header
modparam("siptrace", "hep_version", 2)
setflag(22);
if (!t_relay()) {
xlog("L_ERR", "CALL $ci - Relay error\n");
sl_reply_error();
exit;
}