<div dir="ltr"><div><div>I dont know why I thought of not having the pseudo variable directly in the modparam. Thank you very much for such a simple solution. I&#39;m just feeling stupid about why I didn&#39;t think about this before :(<br>
<br></div>Thanks again.<br><br></div>--- Jayesh<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 25, 2014 at 8:32 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@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 text="#000000" bgcolor="#FFFFFF">
    <div><tt>Hi Jayesh,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>have you tried to do directly:</tt><tt><br>
      </tt><tt><br>
      </tt><tt>modparam(&quot;acc&quot;, &quot;db_extra_bye&quot;,
        &quot;sip_dlg_end_reason=$DLG_end_reason&quot;)</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Regards,</tt><br>
      <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
      On 23.08.2014 14:25, Jayesh Nambiar wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>Hello,<br>
          </div>
          How do you insert the $DLG_end_reason in a particular column
          in acc table?? I basically did set a db_extra_bye modparam as
          follows:<br>
          modparam(&quot;acc&quot;, &quot;db_extra_bye&quot;,
          &quot;sip_dlg_end_reason=$avp(dlg_end_reason)&quot;)<br>
          <br>
        </div>
        <div>The problem is; when I do this before the loose route:<br>
          <br>
        </div>
        <div>if(is_method(&quot;BYE&quot;)) {<br>
        </div>
        <div>   $avp(dlg_end_reason) = $DLG_end_reason<br>
        </div>
        <div>   xlog(&quot;L_INFO&quot;, &quot;Dialog End Reason is
          $avp(dlg_end_reason)&quot;);<br>
        </div>
        <div>}<br>
          <br>
        </div>
        <div>The $DLG_end_reason returns NULL, since the dialog is not
          ended yet. And if I do the same after loose route, the xlog
          shows up proper dialog end reason but the same is not inserted
          into the DB since once the transaction enters into loose route
          and probably it cannot set the values for cdr.<br>
        </div>
        <div>So I am in kind of a deadlock here. Is there a solution to
          this??<br>
          <br>
          Thanks in advance,<br>
          <br>
        </div>
        <div>--- Jayesh<br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>