<div dir="ltr">Hello, <div><br>Yes. By not killed i meant BYE is not sent. However I followed the link you have sent and yes i needed to enable the param modparam("dialog", "send_bye", 1). <br><br>It helped me to kill (terminate) all calls related to that specific customer profile. Issue resolved.<div><br></div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Thanking You,<br>Sunil More<br>Ph : 9503338275</div></div></div>
<br><div class="gmail_quote">On Thu, Sep 14, 2017 at 1:22 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></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">
    <p>Hello,</p>
    <p>what do you mean that the call is not killed? No BYE is sent? If
      yes, have you set the appropriate parameter:</p>
    <p>  -
<a class="m_4288159284065284501moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.p.send_bye" target="_blank">https://www.kamailio.org/docs/<wbr>modules/stable/modules/dialog.<wbr>html#dialog.p.send_bye</a></p>
    <p>Cheers,<br>
      Daniel<br>
    </p><div><div class="h5">
    <br>
    <div class="m_4288159284065284501moz-cite-prefix">On 13.09.17 13:12, Sunil More wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hello Daniel ,
        <div><br>
        </div>
        <div>Thank you for prompt response.</div>
        <div><br>
        </div>
        <div>I set the dialog profile of a customer using </div>
        <div>set_dlg_profile("custChannels"<wbr>, "$avp(customer_id)");</div>
        <div><br>
        </div>
        <div>my xhttp event block looks like below</div>
        <div><span id="m_4288159284065284501gmail-docs-internal-guid-62952b27-7aec-cc36-2ad8-b695a790a320">
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">event_route[xhttp:request] {</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">xlog("L_INFO","http request ");</span></p>
            <br>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> if($hu =~ "^/endcall") {</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">      $avp(customer_id)=$(hu{s.<wbr>select,1,?});</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">      dlg_set_timeout_by_<wbr>profile("custChannels","$avp(<wbr>customer_id)","3");</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">xhttp_reply("200", "OK", "text/html","<html><body><wbr>Ending Calls for $avp(customer_id) ; </body></html>");</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">  return;</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">}</span></p>
            <div><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">
</span></div>
          </span></div>
        <div><br>
        </div>
        <div>The call is answered and running. After I make the http
          request i get the following in kamailio logs <br>
          <br>
          <p class="m_4288159284065284501gmail-p1"><span class="m_4288159284065284501gmail-s1">WARNING: dialog
              [dlg_handlers.c:1564]: dlg_ontimeout(): timeout for dlg
              with CallID
              '<wbr>86896ZGUwYzFjY2YwN2YzNDg0NjQyZ<wbr>jFiMWY3ZDg3NTA2MDg' and
              tags 'f79f1301' 'gK07db5dbb'</span></p>
          <p class="m_4288159284065284501gmail-p1"><span class="m_4288159284065284501gmail-s1">
            </span></p>
          <p class="m_4288159284065284501gmail-p1"><span class="m_4288159284065284501gmail-s1">CRITICAL: dialog
              [dlg_hash.c:933]: dlg_unref_helper(): bogus ref -1 with
              cnt 2 for dlg 0x7f50a5938548 [2854:177] with clid
              '<wbr>86896ZGUwYzFjY2YwN2YzNDg0NjQyZ<wbr>jFiMWY3ZDg3NTA2MDg' and
              tags 'f79f1301' 'gK07db5dbb'</span></p>
          <p class="m_4288159284065284501gmail-p1"><span class="m_4288159284065284501gmail-s1">The call is not
              killed after 3 secs. </span></p>
          the mod params for dialog are as below </div>
        <div><br>
        </div>
        <div><span id="m_4288159284065284501gmail-docs-internal-guid-62952b27-7aef-e9e5-f580-f7b8c5e7f6fc">
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">loadmodule "dialog.so"</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">modparam("dialog", "db_url", DBURL)</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">modparam("dialog", "enable_stats", 1)</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">modparam("dialog", "dlg_match_mode", 1)</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">modparam("dialog", "db_mode", 1)</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">modparam("dialog", "db_update_period", 45)</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">modparam("dialog", "profiles_with_value", "endptChannels;custChannels;<wbr>sharedChannels;<wbr>dedicatedChannels;<wbr>carrierChannels;Ichannels;")</span></p>
            <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">modparam("dialog", "dlg_flag", 4)</span></p>
            <div><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">
</span></div>
          </span><br>
          <br>
        </div>
        <div class="gmail_extra"><br clear="all">
          <div>
            <div class="m_4288159284065284501gmail_signature" data-smartmail="gmail_signature">
              <div dir="ltr">Thanking You,<br>
                Sunil More<br>
                Ph : 9503338275</div>
            </div>
          </div>
          <br>
          <div class="gmail_quote">On Wed, Sep 13, 2017 at 3:19 PM,
            Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></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">
                <p>Hello,<br>
                </p>
                <span> <br>
                  <div class="m_4288159284065284501m_-5686538646251013631moz-cite-prefix">On
                    13.09.17 08:42, Sunil More wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hello All,
                      <div><br>
                      </div>
                      <div>Is there a method / command to kill calls
                        related to one dialog profile. Right now i have
                        to find all dialogs for a customer and loop
                        through all the <span style="color:rgb(80,0,80);font-size:12.8px">dialog
                          hashes to run </span><span style="color:rgb(80,0,80);font-size:12.8px">kamcmd
                          dlg.end_dlg till i can kill all calls. Is
                          there a easier way to do this.</span></div>
                      <div><font color="#500050"><span style="font-size:12.8px"><br>
                          </span></font></div>
                    </div>
                  </blockquote>
                </span> if you don't want to go down the path of adding
                a RPC command for it (which requires C coding), then you
                can try some workaround leveraging the function that
                sets the timeout by profile:<br>
                <br>
                  -
                <a class="m_4288159284065284501m_-5686538646251013631moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.f.dlg_set_timeout_by_profile" target="_blank">https://www.kamailio.org/docs/<wbr>modules/stable/modules/dialog.<wbr>html#dialog.f.dlg_set_timeout_<wbr>by_profile</a><br>
                <br>
                This is a function to be executed in config, you can
                trigger it by sending a special sip packet with sipsak
                or sipp. The alternative is to send an http request that
                will be handled via xhttp module, which then executes an
                event route block from config and you call the function
                there.<br>
                <br>
                Because the function is not terminating the calls
                immediately, the workaround is to use a very short time
                out, like few seconds.<br>
                <br>
                Cheers,<br>
                Daniel<span class="m_4288159284065284501HOEnZb"><font color="#888888"><br>
                    <pre class="m_4288159284065284501m_-5686538646251013631moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_4288159284065284501m_-5686538646251013631moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_4288159284065284501m_-5686538646251013631moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_4288159284065284501m_-5686538646251013631moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - <a class="m_4288159284065284501m_-5686538646251013631moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
                  </font></span></div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="m_4288159284065284501moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_4288159284065284501moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_4288159284065284501moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_4288159284065284501moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - <a class="m_4288159284065284501moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </div></div></div>

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