TT#81700 check: add check for rtpengine session per test

* reduce rtpengine delete_delay to 2 secs

Change-Id: Icd89d8800d14b306fcf9f7663ddefe9b80ac2978
mr9.2
Victor Seva 6 years ago committed by Víctor Seva
parent 66ec76377e
commit c93bacb3ca

@ -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

@ -118,7 +118,7 @@ else
$yaml->{witnessd}{gather}{sip_responsiveness} = 'no';
$yaml->{security}->{ngcp_panel}->{scripts}->{restapi}->{sslverify} = 'no';
$yaml->{mediator}{interval} = '1'; # Necessary to speedup the creation of the CDRs
$yaml->{rtpproxy}{delete_delay} = '5'; # Necessary to speedup the deletetion of the used ports in rtpengine
$yaml->{rtpproxy}{delete_delay} = '2'; # Necessary to speedup the deletetion of the used ports in rtpengine
$yaml->{rtpproxy}{log_level} = '7';
$net_yaml = LoadFile($file_net_yaml);

Loading…
Cancel
Save