<div dir="ltr">Thank you for your suggestion, We initially considered only using Call-id as unique id to grep the logs. But there were several reason for us not to:<div>1) This Call-Identifier variable gets reset after we shut down asterisk and starts again from C-00000001.</div><div>2) We're using CDR and unique-id by default as it is saved in CDR table and so we can take unique id from cdr to grep the logs.</div><div>3) We needed unique-id to be in every log line e.g. executing Dialplan applications, sip debug logs, rtp streaming logs, etc. So to achieve this customisation, we had to modify logger.c file to easily grep the logs related to a call using that id, so that we can trace / debug it if some error occurs.</div><div><br></div><div>Hence, we had to re-implement this functionality to suffice our needs. So, please kindly can you re-verify our approach to this.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 3, 2018 at 2:32 AM Richard Mudgett <<a href="mailto:rmudgett@digium.com">rmudgett@digium.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>You are trying to reimplement callid[1] which has been in Asterisk since v11.  Callid</div><div> is accessible from dialplan using CHANNEL(callid)[2].  Accessibility from the</div><div> dialplan has been in Asterisk 13 since 13.15.0 and in Asterisk 15 since it was first</div><div> released. The callid is created when the incoming channel goes into dialplan not</div><div> when it is bridged.</div><br><div>As to the approach.  You do know that Asterisk is multi-threaded and can handle</div><div> more than one call at a time?  Using a simple global variable sets the uniqueid</div><div>for ALL log messages regardless of whether that message has anything to do with</div><div> the channel of that uniqueid.<br></div><div><div><br></div><div>You really should use callid rather than attempt to re-implement this wheel.  The</div><div>callid functionality was a large change to the codebase when it was added in v11.<br></div><div></div><br></div><div>Richard<br></div><div><br></div><div>[1] <a href="https://wiki.asterisk.org/wiki/display/AST/Call+Identifier+Logging" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Call+Identifier+Logging</a></div><div>[2] <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Function_CHANNEL" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Function_CHANNEL</a><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 2, 2018 at 2:57 PM, Balraj Singh <span dir="ltr"><<a href="mailto:balraj.singh@zemosolabs.com" target="_blank">balraj.singh@zemosolabs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Asterisk version : 15.4.1 ( current )<div><br></div><div>Ok so I added in :</div><div>cdr.h :</div><div><br></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">extern</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">volatile</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">char</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">* </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-en m_-2153153400436191865gmail-m_-9065289496112350380gmail-x m_-2153153400436191865gmail-m_-9065289496112350380gmail-x-first m_-2153153400436191865gmail-m_-9065289496112350380gmail-x-last" style="box-sizing:border-box;color:rgb(36,41,46);border-radius:0.2em;background-color:rgb(172,242,189);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;text-decoration-style:initial;text-decoration-color:initial">getUniqueId</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">void</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">);</span><br></div><div><br></div><div>cdr.c :</div><div><br></div><div>//save unique id in this variable</div><div>//this is a global variable</div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">volatile</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">char</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-x m_-2153153400436191865gmail-m_-9065289496112350380gmail-x-first m_-2153153400436191865gmail-m_-9065289496112350380gmail-x-last" style="box-sizing:border-box;border-radius:0.2em;color:rgb(36,41,46);background-color:rgb(172,242,189);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;text-decoration-style:initial;text-decoration-color:initial"> *UNIQUEID</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">;</span><br></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">//function to get unique id</span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">volatile</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">char</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> *</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193);text-decoration-style:initial;text-decoration-color:initial">getUniqueId</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">() {</span><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">    return</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> UNIQUEID;</span><br></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">}</span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">//start saving unique id from channel</span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">static</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> cdr_object *</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193);text-decoration-style:initial;text-decoration-color:initial">cdr_object_alloc</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> ast_channel_snapshot *chan) {</span><br></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    <span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">UNIQUEID = chan-></span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-smi" style="box-sizing:border-box;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">uniqueid</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">;</span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">}</span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">static</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> cdr_object *</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193);text-decoration-style:initial;text-decoration-color:initial">cdr_object_create_and_append</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> cdr_object *cdr) {</span><br></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    <span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">if</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> (!UNIQUEID || (UNIQUEID[</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">0</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">] != </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">'</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-cce" style="box-sizing:border-box">\0</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">'</span></span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">)) {</span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">        <span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">UNIQUEID = cdr_last-></span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-smi" style="box-sizing:border-box;text-decoration-style:initial;text-decoration-color:initial">uniqueid</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">;</span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    }</span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">}</span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">static</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> ast_cdr *</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">cdr_object_create_public_records</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> cdr_object *cdr) {</span><br></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    <span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);text-decoration-style:initial;text-decoration-color:initial">ast_copy_string</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(UNIQUEID, party_a-></span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-smi" style="box-sizing:border-box;text-decoration-style:initial;text-decoration-color:initial">uniqueid</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">, </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);text-decoration-style:initial;text-decoration-color:initial">sizeof</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(party_a-></span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-smi" style="box-sizing:border-box;text-decoration-style:initial;text-decoration-color:initial">uniqueid</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">));</span></span></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">}</span></span></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">static</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">void</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-en" style="box-sizing:border-box;color:rgb(111,66,193);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">handle_channel_cache_message</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">void</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> *data, </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> stasis_subscription *sub, </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">struct</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> stasis_message *message) {</span><br></span></span></span></span></span></span></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></span></span></span></span></span></span></span></span></div><div><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237)">    <span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">UNIQUEID = <span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">new_snapshot ? new_snapshot-></span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-smi" style="box-sizing:border-box;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">uniqueid</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> : old_snapshot-></span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-smi" style="box-sizing:border-box;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">uniqueid</span><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">;</span></span></span></font></div><div><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237)"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    ....</span></span></span></font></div><div><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237)"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">} //end saving unique id</span></span></span></font></div><div><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237)"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></font></div><div>logger.c :</div><div><br></div><div>//include cdr header file</div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">#</span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">include</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>asterisk/cdr.h<span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span><br></div><div><br></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">static int format_log_default(struct logchannel *chan, struct logmsg *msg, char *buf, size_t size) {
    char call_identifier_str[13];</span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap"><br></span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">    //Get unique id from cdr here
    volatile char *UNIQUEID = getUniqueId();

    if (msg->callid) {
        snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", msg->callid);
    } else {
        call_identifier_str[0] = '\0';
    }

    switch (chan->type) {
        case LOGTYPE_SYSLOG:</span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap"><br></span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">            //Print unique id along with other log content</span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">
            snprintf(buf, size, "%s[%d][%s]: %s:%d in %s: %s",
                     levels[msg->level], msg->lwp, UNIQUEID, msg->file,
                     msg->line, msg->function, msg->message);
            term_strip(buf, buf, size);
            break;
        case LOGTYPE_FILE:</span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap"><br></span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">            /<span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">/Print unique id along with other log content</span></span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">            snprintf(buf, size, "[%s] %s[%d][%s] %s: %s",</span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">                     msg->date, msg->level_name, msg->lwp, UNIQUEID,
                     msg->file, msg->message);
            term_strip(buf, buf, size);
            break;
        case LOGTYPE_CONSOLE: {
            char linestr[32];

            /*
             * Verbose messages are interpreted by console channels in their own
             * special way
             */
            if (msg->level == __LOG_VERBOSE) {
                return logger_add_verbose_magic(msg, buf, size);
            }

            /* Turn the numeric line number into a string for colorization */
            snprintf(linestr, sizeof(linestr), "%d", msg->line);

            snprintf(buf, size, "[%s] "
            COLORIZE_FMT
            "[%d][%s]: "
            COLORIZE_FMT
            ":"
            COLORIZE_FMT
            " "
            COLORIZE_FMT
            ": %s",
                    msg->date,
                    COLORIZE(colors[msg->level], 0, msg->level_name),
                    msg->lwp,</span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap"><br></span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">                    //add unique id here too 
                    UNIQUEID,</span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap">
                    COLORIZE(COLOR_BRWHITE, 0, msg->file),
                    COLORIZE(COLOR_BRWHITE, 0, linestr),
                    COLORIZE(COLOR_BRWHITE, 0, msg->function),
                    msg->message);
        }
            break;
    }

    return 0;
}</span></font><br></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><span style="font-size:12px;white-space:pre-wrap"><br></span></font></span></span></span></span></div><div><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="m_-2153153400436191865gmail-m_-9065289496112350380gmail-pl-pds" style="box-sizing:border-box"><span style="background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline;font-size:12px;white-space:pre-wrap"><font face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" color="#24292e"><div>void __ast_verbose(const char *file, int line, const char *func, int level, const char *fmt, ...) {</div><div>    ast_callid callid;</div><div>    va_list ap;</div><div><br></div><div>    callid = ast_read_threadstorage_callid();</div><div><br></div><div>    va_start(ap, fmt);</div><div><br></div><div>    //get the unique id</div><div>    const char *UNIQUEID = getUniqueId();</div><div>    </div><div>    //check if unique id is null or empty and print debug statement accordingly</div><div>    if (UNIQUEID) {</div><div>        if (UNIQUEID[0] != '\0') {</div><div>            printf("[%s]", UNIQUEID);</div><div>        } else {</div><div>            printf("UNIQUEID IS EMPTY ");</div><div>        }</div><div>    }</div><div><br></div><div>    __ast_verbose_ap(file, line, func, level, callid, fmt, ap);</div><div>    va_end(ap);</div><div>}</div><div><br></div><div><br></div><div><br></div><div>Thank you.</div></font></span></span></span></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div></div><br><br><div class="gmail_quote"><div><div class="m_-2153153400436191865gmail-h5"><div dir="ltr">On Mon, Jul 2, 2018 at 7:33 PM Tech Support <<a href="mailto:asterisk@voipbusiness.us" target="_blank">asterisk@voipbusiness.us</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="m_-2153153400436191865gmail-h5"><div lang="EN-US"><div class="m_-2153153400436191865gmail-m_-9065289496112350380m_7909344683997406948WordSection1"><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Hello;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">    What version of Asterisk are you using? Do you want to post your modifications to the two files?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Thanks;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">John V.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> asterisk-dev [mailto:<a href="mailto:asterisk-dev-bounces@lists.digium.com" target="_blank">asterisk-dev-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Balraj Singh<br><b>Sent:</b> Monday, July 02, 2018 03:07 AM<br><b>To:</b> <a href="mailto:asterisk-dev@lists.digium.com" target="_blank">asterisk-dev@lists.digium.com</a><br><b>Cc:</b> Mani Kanta Gadde <<a href="mailto:manikanta.gadde@zemosolabs.com" target="_blank">manikanta.gadde@zemosolabs.com</a>><br><b>Subject:</b> [asterisk-dev] Regarding Unique Id In Logs<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi,<u></u><u></u></p><div><p class="MsoNormal">Problem Statement : How to print $(UNIQUEID) in every log line. <u></u><u></u></p></div><div><p class="MsoNormal">So we posted this query on asterisk community (<a href="https://community.asterisk.org/t/how-to-print-uniqueid-in-every-log-line/75041" target="_blank">here</a>), and I was able to get that uniqueid in every log line by modifying the source code of logger.c and cdr.c files of asterisk. <u></u><u></u></p></div><div><p class="MsoNormal">So further we had a doubt that the way we approached to that solution was correct or not? . The developers on that forum told us to post this in asterisk-dev community as this was unrelated to that forum. So, please tell us, that the approach <span style="background:white none repeat scroll 0% 0%">( please read the approach in the link provided ) </span>we used is correct or not.<u></u><u></u></p></div><div><p class="MsoNormal">Technically what could be the caveats related to the approach if any?, could there be any alternates of that? . <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thank you.<u></u><u></u></p></div></div></div></div></div></div><span class="m_-2153153400436191865gmail-HOEnZb"><font color="#888888">-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></font></span></blockquote></div>
<br>-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br></div></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div>