<div dir="ltr">Hi all,<div><br></div><div>  I was looking around cdr batch mode and I think that should be two signalling functions:</div><div><br></div><div>ast_cdr_batch_start();<br></div><div>ast_cdr_batch_finish();<br></div><div><br></div><div>This two functions would tell all the BackEnds about the batch mode happening, so in the PGSQL backend the CDR loading could be done in a single COPY sql command, which is much faster than single INSERTs</div><div><br></div><div>Sounds like a small addition for having a much faster CDR insertion</div><div><br></div><div>Gabriel Ortiz</div><div><br></div><div><br></div><div><br></div><div>The do_batch_backend_process would look like this:</div><div>static void *do_batch_backend_process(void *data)<br></div><div>{<br>       struct cdr_batch_item *processeditem;<br> struct cdr_batch_item *batchitem = data;<br><br>    ast_cdr_batch_start();<br><br>      /* Push each CDR into storage mechanism(s) and free all the memory */<br> while (batchitem) {<br>           post_cdr(batchitem->cdr);<br>          ast_cdr_free(batchitem->cdr);<br>              processeditem = batchitem;<br>            batchitem = batchitem->next;<br>               ast_free(processeditem);<br>      }<br><br>   ast_cdr_batch_finish();<br><br>     return NULL;<br>}<br></div></div>