<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="gmail-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;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;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="gmail-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;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;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="gmail-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;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;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">* </span><span class="gmail-pl-en gmail-x gmail-x-first gmail-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;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;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(</span><span class="gmail-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;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;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="gmail-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;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;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="gmail-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;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial">char</span><span class="gmail-x gmail-x-first gmail-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;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;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;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;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;background-color:rgb(230,255,237);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span class="gmail-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="gmail-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="gmail-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;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="gmail-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;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;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;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;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;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="gmail-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="gmail-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="gmail-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="gmail-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;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;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="gmail-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;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;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;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;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="gmail-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="gmail-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="gmail-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="gmail-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;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;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="gmail-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="gmail-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="gmail-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="gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">'</span><span class="gmail-pl-cce" style="box-sizing:border-box">\0</span><span class="gmail-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;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="gmail-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;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;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;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;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;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="gmail-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="gmail-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="gmail-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="gmail-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;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;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="gmail-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="gmail-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="gmail-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="gmail-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;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;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;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;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="gmail-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="gmail-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="gmail-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="gmail-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="gmail-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="gmail-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;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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre;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="gmail-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="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre;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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre;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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre;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;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">#</span><span class="gmail-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;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;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span class="gmail-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;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>asterisk/cdr.h<span class="gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span><br></div><div><br></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">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="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre"><br></span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">    //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="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre"><br></span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">            //Print unique id along with other log content</span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">
            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="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre"><br></span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">            /<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="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre"><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="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">            snprintf(buf, size, "[%s] %s[%d][%s] %s: %s",</span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">                     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="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre"><br></span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">                    //add unique id here too 
                    UNIQUEID,</span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre">
                    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="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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 color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="font-size:12px;white-space:pre"><br></span></font></span></span></span></span></div><div><span class="gmail-pl-s" style="box-sizing:border-box;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-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"><font color="#24292e" face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace"><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;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 dir="ltr">On Mon, Jul 2, 2018 at 7:33 PM Tech Support <<a href="mailto:asterisk@voipbusiness.us">asterisk@voipbusiness.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_7909344683997406948WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hello;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">    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:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">John V.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;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">( 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>-- <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>