<div dir="ltr">Thanks Daniel,<div><br></div><div>Is there a way to add additional custom fields? like the value of a custom global variable.?</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Abdirahman<div><div><br></div></div></div></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 27 May 2021 at 14:15, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>Hello,<br>
</p>
<div>On 27.05.21 18:37, Abdirahman Osman
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello everyone,
<div><br>
</div>
<div>Tried to use the log-engine to push json formatted logs,
here is a what kamailio is sending, my question is, How can I
set the kamailio prefix?</div>
<div><br>
</div>
<div>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(127,0,0);background-color:rgb(251,237,237)">(232) { "kamailio.level": "DEBUG", "kamailio.module": "tm", "kamailio.file": "timer.c", "kamailio.line": 634, "kamailio.function": "wait_handler", "kamailio.callid": "", "kamailio.logprefix": "", "message": "finished transaction: 0x7f232236b1c0 (p:0x7f232216ae58/n:0x7f232216ae58)" }</span></p>
</div>
</div>
</blockquote>
<p>set log_prefix global parameter, like:</p>
<p> *
<a href="https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L174" target="_blank">https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L174</a></p>
<p>But note that it is actually set only when processing SIP
traffic. The log you pasted above is from a timer routine, not
from a sip handling function. So in such case the log prefix is
going to be empty always.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online - June 7-10, 2021 (America Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote></div></div></div>