Ok I did it like this, every xlog I'm calling is in the form:
xlog("L_INFO","XLOG: $ci [ROUTENAME] debuginformation");
and also after every sql_query I have
xlog("L_INFO","XLOG: $ci [ROUTENAME] SQL: select * from ....");
and when SIP message is received/sent
xlog("L_INFO","XLOG: $ci [MAIN] $mb");
xlog("L_INFO","XLOG: $ci [event:onsend_route] $snd(buf)");
So when I'm vizualizing the siptrace, I can view all SQL queries, raw packets (it is done already by siptrace however) and additional debug logs associated to one particular callid.
The question is, has xlog maximum length of the second parameter ? Because when SIP message length exceed some value (around 1500bytes, maybe some relation to packet max size) it is stripped.
So when calling xlog("L_INFO","XLOG: $ci [event:onsend_route] START $snd(buf) END"); and $snd(buf) is too big, it is stripped and END is not in the logs.
Are you aware of maximum length of this xlog message parameter? I cannot find it in documentation.
Mino.