<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>If there is no sip message part of dialog available for that
      moment, then a faked request with predefined content is used.</p>
    <p>You should use the $dlg(...) var to get the attributes related to
      that call:</p>
    <p>  - <a
href="https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#dlg_attr">https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#dlg_attr</a></p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 12.06.19 12:48, Igor Olhovskiy
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:da32ab44-bb59-4768-81d8-224a58f8ecad@Spark">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <title></title>
      <div name="messageBodySection">
        <div dir="auto">CallID actually.
          <div dir="auto"><br>
          </div>
          <div dir="auto">I'm receiving in dialog:failed something
            completely different from initiated dialog.</div>
        </div>
      </div>
      <div name="messageSignatureSection"><br>
        <div dir="auto">Regards, Igor</div>
      </div>
      <div name="messageReplySection">On Jun 12, 2019, 12:36 +0300,
        Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a>, wrote:<br>
        <blockquote type="cite" class="spark_quote" style="margin: 5px
          5px; padding-left: 10px; border-left: thin solid #1abc9c;">
          <p>Can you be more specific about: "I can't get which dialog
            failed exactly"?</p>
          <p>What do you want to get? Which attribute/value related to
            dialog?</p>
          <p>Cheers,<br>
            Daniel<br>
          </p>
          <div class="moz-cite-prefix">On 12.06.19 10:57, Igor Olhovskiy
            wrote:<br>
          </div>
          <blockquote type="cite"
            cite="mid:db7a38a0-b215-462f-8c88-02c80fafba21@Spark"
            class="spark_quote" style="margin: 5px 5px; padding-left:
            10px; border-left: thin solid #e67e22;">
            <meta http-equiv="content-type" content="text/html;
              charset=UTF-8">
            <div name="messageBodySection">
              <div dir="auto">Yes, sorry, `dialog:failed` exactly.
                <div dir="auto"><br>
                </div>
                <div dir="auto">Issue I found is quite strange. Schema
                  of testing is</div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">A calling B through Kamailio. B is not
                  answering, jut keep sending 180.</div>
                <div dir="auto">On dialog:failed I have this code:</div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">
                  <div style="line-height: 18px; white-space: pre;">
<div style="font-size: 12px; font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(212, 212, 212); background-color: rgb(30, 30, 30);"><span style="color: #4ec9b0;">event_route</span><span style="color: #dcdcaa;">[dialog:failed]</span> {</div>
<div style="font-size: 12px; font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(212, 212, 212); background-color: rgb(30, 30, 30);">xlog(<span style="color: #ce9178;">"L_ALERT"</span>, <span style="color: #ce9178;">'[DIALOG:FAILED] "req":"$rm", "cs":"$cs", "dst":"$du", "from":"$fU", "to":"$tU", "cid":"$ci", "si":"$si", "sp":"$sp", "kts":$TV(Sn)'</span> + <span style="color: #ce9178;">"</span><span style="color: #d7ba7d;">\n</span><span style="color: #ce9178;">"</span>);</div>
<div style="font-size: 12px; font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(212, 212, 212); background-color: rgb(30, 30, 30);">}</div>

<div dir="auto">Quite simple. But when actual dialog failed on fr_inv_timer excite, in logs I have</div>

<div dir="auto">ALERT: <script>: [DIALOG:FAILED] "req":"OPTIONS", "cs":"1", "dst":"<null>", "from":"you", "to":"you", "cid":"123", "si":"1.0.0.127", "sp":"5060", "kts":1560329373.947588</div>

<div dir="auto">And I can't get which dialog failed exactly. But on the other hand, I can catch it on failure_route on t_branch_timeout()</div>

<div dir="auto">That was a question actually. Cause on call reject (with 5xx or 6xx) or similar I have correct dialog:failed event.</div>
</div>
                </div>
              </div>
            </div>
            <div name="messageSignatureSection"><br>
              <div dir="auto">Regards, Igor</div>
            </div>
            <div name="messageReplySection">On Jun 11, 2019, 13:23
              +0300, Daniel-Constantin Mierla <a
                class="moz-txt-link-rfc2396E"
                href="mailto:miconda@gmail.com" moz-do-not-send="true"><miconda@gmail.com></a>,
              wrote:<br>
              <blockquote type="cite" class="spark_quote" style="margin:
                5px 5px; padding-left: 10px; border-left: thin solid
                #3498db;">Hello,<br>
                <br>
                On 10.06.19 13:35, Igor Olhovskiy wrote:<br>
                <blockquote type="cite" class="spark_quote"
                  style="margin: 5px 5px; padding-left: 10px;
                  border-left: thin solid #d35400;">Hi!<br>
                  <br>
                  Just to confirm, is event route [dialog:end] not
                  called on<br>
                  fr_inv_timer expiry?<br>
                  Cause it's called on call busy (486) and reject
                  (whatever 6xx). So,<br>
                  what's the idea of not calling it on timeout? Or I'm
                  missing something?<br>
                  <br>
                  Kamailio 5.2<br>
                </blockquote>
                <br>
                if the INVITE does not get 200ok, then another event
                route is executed:<br>
                <br>
                  -<br>
                <a class="moz-txt-link-freetext"
href="https://www.kamailio.org/docs/modules/stable/modules/dialog.html#idm1039307844"
                  moz-do-not-send="true">https://www.kamailio.org/docs/modules/stable/modules/dialog.html#idm1039307844</a><br>
                <br>
                Cheers,<br>
                Daniel<br>
                <br>
                --<br>
                Daniel-Constantin Mierla -- <a
                  class="moz-txt-link-abbreviated"
                  href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a><br>
                <a class="moz-txt-link-abbreviated"
                  href="http://www.twitter.com/miconda"
                  moz-do-not-send="true">www.twitter.com/miconda</a> --
                <a class="moz-txt-link-abbreviated"
                  href="http://www.linkedin.com/in/miconda"
                  moz-do-not-send="true">www.linkedin.com/in/miconda</a><br>
                <br>
              </blockquote>
            </div>
          </blockquote>
          <pre class="moz-signature" cols="72">--  
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a></pre>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
  </body>
</html>