TT#8007 ngcp-dlgcnt-check: use dlg.dlg_list with callid

* dlg.list will fail if the number of dialogs is big
* dlg.dlg_list need from-tag optional
  https://github.com/kamailio/kamailio/pull/889

Change-Id: I2531ee7ab8a40b7547e943206e4a57c1f1f9dd63
changes/98/10198/2
Victor Seva 9 years ago
parent 2a9dd10eed
commit dff76b7ba1

@ -40,12 +40,10 @@ ngcp-redis-helper -n "$REDIS_DB" dump | egrep -v "^$" > "$REDIS_CALLIDS" || true
REDIS_CALLIDS_FILTER=$(mktemp)
egrep -v '^list:' "$REDIS_CALLIDS" > "$REDIS_CALLIDS_FILTER" || true
# list of dialogs known by kamailio
KAM_CALLIDS=$(mktemp)
ngcp-sercmd proxy dlg.list | awk -F' ' '/call-id:/ { print $2}' > "$KAM_CALLIDS"
while read -r i ; do
if ! grep -q "$i" "$KAM_CALLIDS" ; then
if ! ngcp-sercmd proxy dlg.dlg_list "$i"| \
awk '/call-id:/ { print $NF}'| grep -q "$i"
then
printf "CallID:[%s] unknown\n" "$i"
if $REMOVE ; then
ngcp-dlgcnt-clean "$i" || true
@ -56,4 +54,4 @@ while read -r i ; do
fi
done < "$REDIS_CALLIDS_FILTER"
rm -f "$KAM_CALLIDS" "$REDIS_CALLIDS" "$REDIS_CALLIDS_FILTER"
rm -f "$REDIS_CALLIDS" "$REDIS_CALLIDS_FILTER"

Loading…
Cancel
Save