<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi, Kirill!<br>
      <br>
      There's no mistake in your code, but in our documentation :).
      We've recently added two more parameters[1] in the dialog event
      that contain the hash_entry and hash_id, but we didn't document
      the change. I've just updated the page[1].<br>
      <br>
      So in order to get the state, you need to add two more AVPs before
      the state, to also fetch the dialog hash entry and id. If you only
      need the state, you can fetch the parameters by their name:<br>
      <br>
      fetch_event_params("ostate=</tt><tt><span
        style="font-family:monospace">$avp(ostate); nstate=</span></tt><tt><span
        style="font-family:monospace"><span
          style="font-family:monospace">$avp(nstate)");<br>
          <br>
        </span></span>[1]
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/dialog#idp6390288">http://www.opensips.org/html/docs/modules/2.3.x/dialog#idp6390288</a><br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 05/17/2017 09:09 AM, Kirill
      Galinurov wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPDUut9eJkpkTp78rZvhJHM_V3eZs2jvXufCz16nrEErmU-rNg@mail.gmail.com">
      <div dir="ltr">Hi all. I try to monitoring opensips using new
        rabbitmq module and EVENT_ROUTE.  I try to trace dialog state. 
        <div>My config is</div>
        <span style="font-family:monospace"><span
            style="color:rgb(0,0,0)">event_route[E_DLG_STATE_CHANGED] {
          </span><br>
             fetch_event_params("$avp(nstate);$avp(ostate)");
          <br>
             xlog("L_INFO", "newstate $avp(nstate) oldstate
           $avp(ostate) of dialog );</span>
        <div><span style="font-family:monospace">}</span></div>
        <div><font face="arial, helvetica, sans-serif">I thought
            $avp(nstate) variables like </font><span
            style="color:rgb(0,0,0);font-family:helvetica,arial">$DLG_status.
            But in logs I see:</span></div>
        <div><font color="#000000">
            <div style="font-family:helvetica,arial"><br>
            </div>
            <div><font face="times new roman, serif">DBG:event_route:scriptroute_fetch:
                Fetching parameters for event E_DLG_STATE_CHANGED</font></div>
            <div><font face="times new roman, serif">May 17 09:24:14
                [44736] DBG:event_route:scriptroute_fetch: Successfully
                fetched 2 parameters</font></div>
            <div><font face="times new roman, serif">May 17 09:24:14
                [44736] newstate 3984 oldstate  171237808 of dialog to </font></div>
          </font>
          <div><font face="times new roman, serif"> </font></div>
        </div>
        <div><font face="arial, helvetica, sans-serif">Not 1-5. Where is
            my mistake?</font></div>
        <div><br>
        </div>
        <div>
          <pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">Thank you.</font></pre>
          <pre><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">Best regards Kirill Galinurov</span></font><font color="#000000"><span style="white-space:pre-wrap">
</span></font></pre>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>