<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Daniel,<br>
      <br>
      Indeed, there is none. Why is so important to know if the dialog
      really existed ? you want to know if it was terminated by YOU and
      not by something else prior to your terminate_dlg() ?<br>
      <br>
      We may consider returning a different positive code if no dialog
      was found.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 13.07.2016 21:21, Daniel Zanutti
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAN0jgiPDvrkNuNyOOdCGmPCeBodqh2eK+XKRCQ2Ad=8fsfXKag@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi
        <div><br>
          <div>Anyone could please help on this? </div>
          <div><br>
          </div>
          <div>Thanks</div>
          <div><br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Jul 11, 2016 at 3:23 PM, Daniel
          Zanutti <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:daniel.zanutti@gmail.com" target="_blank">daniel.zanutti@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi
              <div><br>
              </div>
              <div>I need to confirm if a call is UP and terminate it
                from my code. I have previously stored callid, h_entry
                and h_id on an internal list, so I'm executing at a
                specific time:</div>
              <div><br>
              </div>
              <div>dlg_api.terminate_dlg(h_entry, h_id);<br>
              </div>
              <div><br>
              </div>
              <div>If the call is still running, it works nicely and
                hangup the call. If there is a problem, I get a negative
                value and solve too. The problem is if the call is not
                up anymore, I get a return == 0. This is the code of
                terminate_dlg function:</div>
              <div>
                <div><br>
                </div>
                <div>
                  <div>struct dlg_cell * dlg = NULL;</div>
                </div>
                <div><br>
                </div>
                <div>dlg = lookup_dlg(h_entry, h_id);</div>
                <div><br>
                </div>
                <div>        if(!dlg)</div>
                <div>                return 0;</div>
              </div>
              <div><br>
              </div>
              <div>This function "lookup_dlg" isn't exported.<br>
              </div>
              <div><br>
              </div>
              <div>Is there anyway to confirm if the call is still
                running, if I have these values Callid, h_entry and
                h_id?</div>
              <div><br>
              </div>
              <div>Thanks!</div>
              <div><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>