Hi All, Coming back to this. Any other suggestions here?
Thanks On Wed, Mar 10, 2021 at 9:24 AM Andrew Chen <[email protected]> wrote: > So the strange thing is that I use kamcmd to get the list of users and > that works. Are there special permissions needed to delete them? > > On Wed, Mar 10, 2021 at 4:38 AM Ilie Soltanici <[email protected]> > wrote: > >> Hello, >> >> Sorry, there is actually no need for the callid argument, I mixed it up >> with another command. >> As Daniel recommended try to check the permissions. Which user the script >> is running with and what are the permission for /var/run/kamailio/ >> >> Regards, >> >> On Wed, 10 Mar 2021 at 09:26, Ilie Soltanici <[email protected]> >> wrote: >> >>> Hello, >>> >>> kamcmd dlg.end_dlg $h_entry $h_id >>>> >>> >>> I think you are missing the callid parameter when calling kamcmd command: >>> Try kamcmd dlg.end_dlg $h_entry $h_id $SIPCallID >>> >>> Regards, >>> >>> On Tue, 9 Mar 2021 at 13:03, Andrew Chen <[email protected]> wrote: >>> >>>> Thanks guys. >>>> Here is the whole function I created: >>>> >>>> function FollowUpAction >>>> >>>> { >>>> >>>> SIPCallID=$1 >>>> >>>> >>>> if [ $callStatus -ge 7 ] && [ $callStatus -le 15 ]; then >>>> >>>> GetDialogID $SIPCallID >>>> >>>> log "$(date) Found active dialog on completed call. Delete call >>>> using $h_entry $h_id on SIP Call-ID $SIPCallID" >> deleted-calls-list.txt >>>> >>>> kamcmd dlg.end_dlg $h_entry $h_id >>>> >>>> fi >>>> >>>> } >>>> >>>> >>>> >>>> On Tue, Mar 9, 2021 at 6:53 AM David Villasmil < >>>> [email protected]> wrote: >>>> >>>>> Specially if you don’t show the script source. >>>>> >>>>> On Tue, 9 Mar 2021 at 08:51, Daniel-Constantin Mierla < >>>>> [email protected]> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> 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, ... >>>>>> >>>>>> Cheers, >>>>>> Daniel >>>>>> On 08.03.21 20:23, Andrew Chen wrote: >>>>>> >>>>>> Hi all, >>>>>> >>>>>> 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: >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> 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 *h_id*: 11225 on SIP Call-ID 7j5r1msitcvg9siohoul >>>>>> >>>>>> >>>>>> Thoughts? >>>>>> >>>>>> Thanks! >>>>>> >>>>>> -- >>>>>> Andy Chen >>>>>> Sr. Telephony Lead Engineer >>>>>> [email protected] >>>>>> >>>>>> >>>>>> >>>>>> *Confidentiality Notice: The information contained in this e-mail and >>>>>> any >>>>>> attachments may be confidential. If you are not an intended >>>>>> recipient, you >>>>>> are hereby notified that any dissemination, distribution or copying >>>>>> of this >>>>>> e-mail is strictly prohibited. If you have received this e-mail in >>>>>> error, >>>>>> please notify the sender and permanently delete the e-mail and any >>>>>> attachments immediately. You should not retain, copy or use this >>>>>> e-mail or >>>>>> any attachment for any purpose, nor disclose all or any part of the >>>>>> contents to any other person. Thank you.* >>>>>> >>>>>> _______________________________________________ >>>>>> Kamailio (SER) - Users Mailing >>>>>> [email protected]https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>>>>> >>>>>> -- >>>>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- >>>>>> www.linkedin.com/in/miconda >>>>>> Funding: https://www.paypal.me/dcmierla >>>>>> >>>>>> _______________________________________________ >>>>>> Kamailio (SER) - Users Mailing List >>>>>> [email protected] >>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>>>>> >>>>> -- >>>>> Regards, >>>>> >>>>> David Villasmil >>>>> email: [email protected] >>>>> phone: +34669448337 >>>>> >>>> >>>> >>>> -- >>>> Andy Chen >>>> Sr. Telephony Lead Engineer >>>> 415 516 5535 (M) >>>> [email protected] >>>> >>>> >>>> *Confidentiality Notice: The information contained in this e-mail and >>>> any >>>> attachments may be confidential. If you are not an intended recipient, >>>> you >>>> are hereby notified that any dissemination, distribution or copying of >>>> this >>>> e-mail is strictly prohibited. If you have received this e-mail in >>>> error, >>>> please notify the sender and permanently delete the e-mail and any >>>> attachments immediately. You should not retain, copy or use this e-mail >>>> or >>>> any attachment for any purpose, nor disclose all or any part of the >>>> contents to any other person. Thank you.* >>>> _______________________________________________ >>>> Kamailio (SER) - Users Mailing List >>>> [email protected] >>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>>> >>> _______________________________________________ >> Kamailio (SER) - Users Mailing List >> [email protected] >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > > > -- > Andy Chen > Sr. Telephony Lead Engineer > 415 516 5535 (M) > achen@ <[email protected]>fuze.com > > -- Andy Chen Sr. Telephony Lead Engineer 415 516 5535 (M) achen@ <[email protected]>fuze.com -- *Confidentiality Notice: The information contained in this e-mail and any attachments may be confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately. You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person. Thank you.*
_______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
