Skip to content

Commit

Permalink
We don't have OPENSIPS_VER defined at the script level, use MM_VER
Browse files Browse the repository at this point in the history
instead.

Make ALICE_ARGS overridable.
  • Loading branch information
sobomax committed Oct 8, 2024
1 parent 54f103b commit 5e0d1af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ start_mm() {
--allowed_pts="18,0,2,4,8,96,98,98,101" \
-rtpp_hrtb_retr_ival=120 -u -acct_enable=0 -f >${MM_LOG} 2>&1 &
MM_PID=${!}
ALICE_ARGS="-46"
;;
b2bua)
MM_LOG="${BUILDDIR}/b2bua.log"
Expand All @@ -63,7 +62,6 @@ start_mm() {
--allowed_pts="18,0,2,4,8,[G726-40/8000],[G726-24/8000],[G726-16/8000],[telephone-event/8000]" \
--logfile="${MM_LOG}" &
MM_PID=${!}
ALICE_ARGS="-46"
;;

opensips)
Expand All @@ -85,13 +83,12 @@ start_mm() {
cat -n "${MM_CFG}"
echo "--- Config Ends ---"
_MM_ARGS="-f ${MM_CFG} ${MM_ARGS} -F -n 1"
if [ "${MM_BRANCH}" != "master" -a "${OPENSIPS_VER}" -lt 30 ]
if [ "${MM_BRANCH}" != "master" -a "${MM_VER}" -lt 30 ]
then
_MM_ARGS="${_MM_ARGS} -E"
fi
${MM_BIN} ${_MM_ARGS} &
MM_PID=${!}
ALICE_ARGS="-46"
;;

kamailio)
Expand Down Expand Up @@ -120,14 +117,14 @@ start_mm() {
set -e
"${KBIN}" ${KOPTS} -f "${MM_CFG}" -DD -E -n 1 &
MM_PID=${!}
ALICE_ARGS="-46"
;;

*)
echo "Unknown MM_TYPE: ${MM_TYPE}" 1>&2
return 1
esac

ALICE_ARGS="${ALICE_ARGS:-"-46"}"
echo ${MM_PID} > "${MM_PIDF}"
sleep ${MM_INIT_DELAY}
return 0
Expand Down

0 comments on commit 5e0d1af

Please sign in to comment.