|
|
|
|
@ -35,6 +35,10 @@ CDR=false
|
|
|
|
|
ERR_FLAG=0
|
|
|
|
|
RETRANS_SIZE=2
|
|
|
|
|
|
|
|
|
|
rtpengine_ctl_ip=$(grep 'listen-cli' /etc/rtpengine/rtpengine.conf|\
|
|
|
|
|
awk '{print $3}')
|
|
|
|
|
RTPENGINE_CTL="rtpengine-ctl -ip ${rtpengine_ctl_ip}"
|
|
|
|
|
|
|
|
|
|
# $1 kamailio msg parsed to yml
|
|
|
|
|
# $2 destination png filename
|
|
|
|
|
graph() {
|
|
|
|
|
@ -399,6 +403,7 @@ error_helper() {
|
|
|
|
|
find "${SCEN_CHECK_DIR}/" -type f -name 'sipp_scenario*errors.log' \
|
|
|
|
|
-exec mv {} "${LOG_DIR}" \;
|
|
|
|
|
stop_capture
|
|
|
|
|
check_rtp
|
|
|
|
|
exit "$2"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -429,6 +434,20 @@ stop_capture() {
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
check_rtp() {
|
|
|
|
|
local uuid
|
|
|
|
|
|
|
|
|
|
uuid=$(awk '/^test_uuid:/ { print $2 }' "${SCEN_CHECK_DIR}/scenario.yml")
|
|
|
|
|
mapfile -t callids < <(${RTPENGINE_CTL} list sessions all|awk '{print $2}')
|
|
|
|
|
for callid in "${callids[@]}" ; do
|
|
|
|
|
if [[ "${callid}" =~ NGCP%${uuid}%/// ]]; then
|
|
|
|
|
echo "$(date) - Terminate RTP sessions for ${callid}"
|
|
|
|
|
${RTPENGINE_CTL} terminate "${callid}"
|
|
|
|
|
ERR_FLAG=1
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# $1 port to check
|
|
|
|
|
check_port() {
|
|
|
|
|
local status=0
|
|
|
|
|
@ -919,10 +938,12 @@ if ! "$SKIP_RUNSIPP" ; then
|
|
|
|
|
((a++))
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "$(date) - Done"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "$(date) - check RTP sessions, wait 5 secs first"
|
|
|
|
|
sleep 5
|
|
|
|
|
check_rtp
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|