<div dir="auto">Specially if you don’t show the script source.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 9 Mar 2021 at 08:51, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <p>Hello,</p>
    <p>it is hard to say why your shell script does not work, when the
      command runs ok in the terminal. Maybe missing/empty parameters,
      or insufficient access rights, ...</p>
    <p>Cheers,<br>
      Daniel<br>
    </p></div><div>
    <div>On 08.03.21 20:23, Andrew Chen wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi all,
        <div><br>
        </div>
        <div>I have a script that cleans up hanging dialog and for some
          reason, executing 'kamcmd dlg.end_dlg' does not seem to work. 
          Below I log events of stuck calls and as you can see it just
          keeps logging the same call until I manually run the kamcmd
          either in bash shell prompt or in kamcmd cli:</div>
        <div><br>
        </div>
        <div>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:00:04.347807+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:00:04 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:01:02.531822+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:01:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:02:02.689823+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:02:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:03:02.044960+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:03:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:04:02.436588+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:04:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:05:02.685572+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:05:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:06:02.775561+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:06:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:07:01.867021+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:07:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:08:01.888512+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:08:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:09:02.146887+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:09:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:10:02.649627+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:10:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:11:01.904948+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:11:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:12:01.932267+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:12:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:13:02.428128+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:13:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:14:02.617683+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:14:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:15:01.863099+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:15:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:16:01.650299+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:16:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:17:02.338576+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:17:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:18:01.743163+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:18:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:19:02.257369+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:19:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:20:01.624170+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:20:01 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">2021-03-08T19:21:02.287343+00:00
              sjointgkama51 /scripts/get-call-from-hepic.sh -
              get-call-from-hepic: Mon Mar 8 19:21:02 UTC 2021 Found
              active dialog on completed call. Delete call using
              h_entry: 1333 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)"><b>h_id</b></span><span style="font-variant-ligatures:no-common-ligatures">: 11225
              on SIP Call-ID 7j5r1msitcvg9siohoul</span></p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(170,171,37)"><br>
          </p>
          <p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(170,171,37)"><span style="font-variant-ligatures:no-common-ligatures"><span>Thoughts?</span></span></p>
        </div>
        <div>
          <div><br>
          </div>
          <div>Thanks!</div>
          <div><br>
          </div>
          -- <br>
          <div dir="ltr" data-smartmail="gmail_signature">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr" style="font-size:12.8px">Andy Chen</div>
                <div dir="ltr" style="font-size:12.8px">
                  <div>Sr. Telephony Lead Engineer</div>
                  <div><a href="mailto:achen@thinkingphones.com" target="_blank">achen@</a><a href="http://fuze.com" target="_blank">fuze.com</a><br>
                  </div>
                  <div><br>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">*Confidentiality
        Notice: The information contained in this e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments
        may be confidential. If you are not an intended recipient, you</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">are
        hereby notified that any dissemination, distribution or copying
        of this</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">e-mail
        is strictly prohibited. If you have received this e-mail in
        error,</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">please
        notify the sender and permanently delete the e-mail and any</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">attachments
        immediately. You should not retain, copy or use this e-mail or</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">any
        attachment for any purpose, nor disclose all or any part of the</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">
      <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">contents
        to any other person. Thank you.*</span>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank">https://www.paypal.me/dcmierla</a></pre>
  </div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>