Hi Razvan,<br>I just did a fresh download from <a href="http://opensips.org/pub/opensips/latest/src/" target="_blank">http://opensips.org/pub/opensips/latest/src/</a>.
 I did apply the patch successfully and I still have the problem of CDR 
not being recorded after restart. Here is the syslog pasted after 
opensips was being shut down:<br>
<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[<div id=":uk">15700]: DBG:dialog:dialog_update_db: inserting new dialog 0x7f3d323bd5f8<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;accX_flags&gt; value: &lt;#026&gt;<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;accX_flags##026&gt; (16)<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;accX_db&gt; value: &lt;(&gt;<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;accX_db#(&gt; (263)<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;accX_leg&gt; value: &lt;&gt;<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;accX_leg#&gt; (14)<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;accX_core&gt; value: &lt;#006&gt;<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: escaping char 53<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;accX_core##006&gt; (165)<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;accX_created&gt; value: &lt;&lt;95&gt;+ÃN&gt;<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;accX_created#&lt;95&gt;+ÃN&gt; (22)<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_vars: var string is &lt;accX_flags##026&gt;(480)<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;carrierChannels&gt; value: &lt;1002&gt;<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;carrierChannels#1002|&gt; (21)<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;carrierChannels&gt; value: &lt;1003&gt;<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;carrierChannels#1003|&gt; (21)<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Dumping var name: &lt;carrierChannels&gt; value: &lt;1007&gt;<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_pair: Serialized string &lt;carrierChannels#1007|&gt; (21)<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:dialog:write_dialog_profiles: profile string is &lt;carrierChannels#1002|carrierChannels#1003|carrierChannels#1007|&gt;(63)<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:has_stmt_ctx: ctx found for dialog<br>Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x810858 (tail=8454488) MC=0x8101b8<br>

Dec  6 20:20:13 dev /usr/local/sbin/opensips[15700]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run<br><br>I hope this will help you figure out something more relevant.<div class="yj6qo ajU"><div id=":tw" class="ajR" tabindex="0">
<img class="ajT" src="images/cleardot.gif"></div></div><span class="HOEnZb adL"><font color="#888888"><br><br>--- Jayesh</font></span><div class="HOEnZb adL"><div class="im"><br><br>
<div class="gmail_quote">On Tue, Dec 6, 2011 at 7:56 PM, Razvan Crainea <span dir="ltr">&lt;<a href="mailto:razvancrainea@opensips.org" target="_blank">razvancrainea@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF">
    Hi, Jayesh!<br>
    <br>
    Can you post your dlg_db_handler.c file on pastebin? I think you are
    using an old version of the dialog module, and that&#39;s why you have
    this problem.<div><br>
    <br>
    Regards,<br>
    <pre cols="72">--
Răzvan Crainea
OpenSIPS Developer</pre></div></div></blockquote></div></div></div></div>