diff options
42 files changed, 428 insertions, 63 deletions
diff --git a/asterisk-master/Dockerfile b/asterisk-master/Dockerfile index 789aeb5..8e508e4 100644 --- a/asterisk-master/Dockerfile +++ b/asterisk-master/Dockerfile @@ -28,6 +28,16 @@ RUN apt-get update && \ wget && \ apt-get clean +# AMR support in asterisk, catched at configure time: +RUN apt-get update && \ +apt-get upgrade -y && \ +DEBIAN_FRONTEND=noninteractive \ +apt-get install -y --no-install-recommends \ + libopencore-amrnb-dev \ + libopencore-amrwb-dev \ + libvo-amrwbenc-dev && \ +apt-get clean + # create a user ARG username=asterisk RUN useradd -m ${username} && \ @@ -77,3 +87,6 @@ RUN cd asterisk && \ make install && \ make samples && \ ldconfig + +# Required to set up ipsec: +RUN setcap 'cap_net_admin,cap_sys_resource=ep' /usr/sbin/asterisk diff --git a/debian-bookworm-build-arm/Dockerfile b/debian-bookworm-build-arm/Dockerfile index d7e963b..9b725a7 100644 --- a/debian-bookworm-build-arm/Dockerfile +++ b/debian-bookworm-build-arm/Dockerfile @@ -17,9 +17,8 @@ COPY .common/Release.key /etc/apt/trusted.gpg.d/obs.osmocom.org.asc # Configure build user, disable installing man pages # * man pages: without them we avoid waiting for "generating manpages" RUN set -x && \ - useradd --uid=${UID} build && \ - mkdir /build && \ - chown -R build:build /build /usr/local && \ + useradd --uid=${UID} -d /build -m build && \ + chown -R build:build /usr/local && \ \ echo "path-exclude=/usr/share/man/*" \ > /etc/dpkg/dpkg.cfg.d/exclude-man-pages && \ diff --git a/debian-bookworm-build/Dockerfile b/debian-bookworm-build/Dockerfile index d847bf1..952631b 100644 --- a/debian-bookworm-build/Dockerfile +++ b/debian-bookworm-build/Dockerfile @@ -18,9 +18,8 @@ COPY .common/Release.key /etc/apt/trusted.gpg.d/obs.osmocom.org.asc # * /usr/local: osmo-python-tests's contrib/jenkins.sh writes there # * man pages: without them we avoid waiting for "generating manpages" RUN set -x && \ - useradd --uid=${UID} build && \ - mkdir /build && \ - chown -R build:build /build /usr/local && \ + useradd --uid=${UID} -d /build -m build && \ + chown -R build:build /usr/local && \ \ echo "path-exclude=/usr/share/man/*" \ > /etc/dpkg/dpkg.cfg.d/exclude-man-pages && \ @@ -142,6 +141,7 @@ RUN set -x && \ patchelf \ picolibc-arm-none-eabi \ pkg-config \ + pylint \ python3 \ python3-gi \ python3-mako \ @@ -179,7 +179,6 @@ RUN set -x && \ 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse' \ 'git+https://github.com/podshumok/python-smpplib.git' \ 'pydbus' \ - 'pylint' \ 'pysispm' \ 'sphinx' \ 'sphinxcontrib-napoleon' \ diff --git a/debian-bookworm-erlang/Dockerfile b/debian-bookworm-erlang/Dockerfile index ec5ed52..60e7583 100644 --- a/debian-bookworm-erlang/Dockerfile +++ b/debian-bookworm-erlang/Dockerfile @@ -24,10 +24,11 @@ RUN set -x && \ apt-get install -y --no-install-recommends \ build-essential \ git \ + iproute2 \ + netcat-openbsd \ procps \ tcpdump \ vim \ - netcat-openbsd \ wget \ && \ apt-get clean diff --git a/debian-bookworm-obs-asan/Dockerfile b/debian-bookworm-obs-asan/Dockerfile new file mode 100644 index 0000000..370b845 --- /dev/null +++ b/debian-bookworm-obs-asan/Dockerfile @@ -0,0 +1,38 @@ +ARG REGISTRY=docker.io +ARG UPSTREAM_DISTRO=debian:bookworm +FROM ${REGISTRY}/${UPSTREAM_DISTRO} + +# Arguments used after FROM must be specified again +ARG OSMOCOM_REPO_MIRROR="https://downloads.osmocom.org" +ARG OSMOCOM_REPO_PATH="packages/osmocom:" +ARG OSMOCOM_REPO="${OSMOCOM_REPO_MIRROR}/${OSMOCOM_REPO_PATH}/nightly:/asan/Debian_12/" +ARG UID + +# Copy from common dir +COPY .common/respawn.sh /usr/local/bin/respawn.sh +COPY .common/Release.key /usr/share/keyrings/osmocom-nightly-asan.asc + +# Configure build user, disable installing man pages +# * /usr/local: osmo-python-tests's contrib/jenkins.sh writes there +# * man pages: without them we avoid waiting for "generating manpages" +RUN set -x && \ + useradd --uid=${UID} -d /build -m build && \ + chown -R build:build /usr/local && \ + \ + echo "path-exclude=/usr/share/man/*" \ + > /etc/dpkg/dpkg.cfg.d/exclude-man-pages && \ + rm -rf /usr/share/man/ + +# Configure Osmocom nightly asan repository, add telnet for debugging +RUN set -x && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + telnet \ + && \ + apt-get clean && \ + echo "deb [signed-by=/usr/share/keyrings/osmocom-nightly-asan.asc] $OSMOCOM_REPO ./" \ + > /etc/apt/sources.list.d/osmocom-nightly-asan.list + +# Invalidate cache once the repository is updated +ADD $OSMOCOM_REPO/Release /tmp/Release diff --git a/debian-bookworm-obs-asan/Makefile b/debian-bookworm-obs-asan/Makefile new file mode 100644 index 0000000..cdac90c --- /dev/null +++ b/debian-bookworm-obs-asan/Makefile @@ -0,0 +1,3 @@ +UPSTREAM_DISTRO=debian:bookworm +DISTRO=debian-bookworm +include ../make/Makefile diff --git a/debian-bookworm-obs-latest/Dockerfile b/debian-bookworm-obs-latest/Dockerfile index 9451902..523afb6 100644 --- a/debian-bookworm-obs-latest/Dockerfile +++ b/debian-bookworm-obs-latest/Dockerfile @@ -16,9 +16,8 @@ COPY .common/Release.key /usr/share/keyrings/osmocom-latest.asc # * /usr/local: osmo-python-tests's contrib/jenkins.sh writes there # * man pages: without them we avoid waiting for "generating manpages" RUN set -x && \ - useradd --uid=${UID} build && \ - mkdir /build && \ - chown -R build:build /build /usr/local && \ + useradd --uid=${UID} -d /build -m build && \ + chown -R build:build /usr/local && \ \ echo "path-exclude=/usr/share/man/*" \ > /etc/dpkg/dpkg.cfg.d/exclude-man-pages && \ diff --git a/debian-bookworm-titan-master/Dockerfile b/debian-bookworm-titan-master/Dockerfile index 2b0644a..161c933 100644 --- a/debian-bookworm-titan-master/Dockerfile +++ b/debian-bookworm-titan-master/Dockerfile @@ -20,6 +20,7 @@ RUN set -x && \ build-essential \ ca-certificates \ git \ + iproute2 \ iputils-ping \ netcat-openbsd \ procps \ diff --git a/debian-bookworm-titan/Dockerfile b/debian-bookworm-titan/Dockerfile index fcc00ba..c4af2ef 100644 --- a/debian-bookworm-titan/Dockerfile +++ b/debian-bookworm-titan/Dockerfile @@ -21,6 +21,7 @@ RUN set -x && \ ca-certificates \ ccache \ git \ + iproute2 \ iputils-ping \ netcat-openbsd \ procps \ diff --git a/debian-bullseye-erlang/Dockerfile b/debian-bullseye-erlang/Dockerfile index 9a90c0c..4abb7b6 100644 --- a/debian-bullseye-erlang/Dockerfile +++ b/debian-bullseye-erlang/Dockerfile @@ -25,10 +25,11 @@ RUN apt-get update && \ apt-get -y install \ build-essential \ git \ + iproute2 \ + netcat-openbsd \ procps \ tcpdump \ vim \ - netcat-openbsd \ wget \ && \ apt-get clean diff --git a/debian-bullseye-jenkins/Dockerfile b/debian-bullseye-jenkins/Dockerfile index 3c186cc..5132c0a 100644 --- a/debian-bullseye-jenkins/Dockerfile +++ b/debian-bullseye-jenkins/Dockerfile @@ -107,6 +107,7 @@ RUN \ patchelf \ picolibc-arm-none-eabi \ pkg-config \ + pylint \ python-setuptools \ python2.7 \ python3 \ @@ -148,7 +149,6 @@ RUN pip3 install \ 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse' \ 'git+https://github.com/podshumok/python-smpplib.git' \ 'pydbus' \ - 'pylint' \ 'pysispm' \ 'sphinx' \ 'sphinxcontrib-napoleon' \ diff --git a/debian-buster-jenkins/Dockerfile b/debian-buster-jenkins/Dockerfile index cf443f0..baa5931 100644 --- a/debian-buster-jenkins/Dockerfile +++ b/debian-buster-jenkins/Dockerfile @@ -104,6 +104,7 @@ RUN \ osc \ patchelf \ pkg-config \ + pylint \ python-pip \ python-setuptools \ python-yaml \ @@ -147,7 +148,6 @@ RUN pip3 install \ 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse' \ 'git+https://github.com/podshumok/python-smpplib.git' \ 'pydbus' \ - 'pylint' \ 'pysispm' \ 'sphinx' \ 'sphinxcontrib-napoleon' \ diff --git a/dnsmasq/Dockerfile b/dnsmasq/Dockerfile new file mode 100644 index 0000000..5e00957 --- /dev/null +++ b/dnsmasq/Dockerfile @@ -0,0 +1,18 @@ +FROM debian:stable + +LABEL name="dnsmasq" \ + description="Dnsmasq Server" \ + version="1.0" \ + maintainer="pespin@sysmocom.de" + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + dnsmasq && \ + apt-get clean + +EXPOSE 53/tcp \ + 53/udp + +VOLUME /etc/dnsmasq + +CMD ["/bin/sh", "-c", "dnsmasq -d -C /data/dnsmasq.conf >/data/dnsmasq.log 2>&1"] diff --git a/dnsmasq/Makefile b/dnsmasq/Makefile new file mode 100644 index 0000000..59dce87 --- /dev/null +++ b/dnsmasq/Makefile @@ -0,0 +1,2 @@ +IMAGE=registry.sysmocom.de/dnsmasq +include ../make/Makefile diff --git a/jenkins-common.sh b/jenkins-common.sh index eae0473..8ec6b29 100644 --- a/jenkins-common.sh +++ b/jenkins-common.sh @@ -21,8 +21,10 @@ docker_depends() { osmo-*-centos7) echo "centos7-build" ;; osmo-*-centos8) echo "centos8-build" ;; osmo-*-latest) echo "debian-$DEBIAN_DEFAULT-obs-latest" ;; + osmo-*-asan) echo "debian-$DEBIAN_DEFAULT-obs-asan" ;; osmo_dia2gsup-*) echo "debian-$DEBIAN_DEFAULT-erlang" ;; osmo-epdg-*) echo "debian-$DEBIAN_DEFAULT-erlang" ;; + osmo-s1gw-*) echo "debian-$DEBIAN_DEFAULT-erlang" ;; osmo-*) echo "debian-$DEBIAN_DEFAULT-build" ;; open5gs-master) echo "debian-$DEBIAN_DEFAULT-build" ;; ttcn3-*) echo "debian-bookworm-titan" ;; @@ -78,6 +80,13 @@ docker_dir_from_image_name() { # e.g. centos8-obs-2021q1 -> centos8-obs-latest echo "$1" | sed 's/20[0-9][0-9]q.*$/latest/' ;; + osmo-*-asan) + # Build Osmocom programs from the asan repository with the + # "-latest" docker containers (osmo-mgw-latest/Dockerfile etc.) + # so they are completely built from the OBS packages instead of + # building some of it from git (as in *-master/Dockerfile). + echo "$1" | sed 's/-asan/-latest/' + ;; *) echo "$1" ;; @@ -528,24 +537,25 @@ kernel_test_wait_for_vm() { exit 1 } -# Check if IMAGE_SUFFIX starts with "latest" (e.g. "latest-centos8") -image_suffix_is_latest() { +# Check if the "latest" repo is used (e.g. "latest-centos8") +osmo_repo_is_latest() { case "$IMAGE_SUFFIX" in latest*) return 0 ;; *) return 1 ;; esac } -# Check if IMAGE_SUFFIX starts with "master" (e.g. "master-centos8") -image_suffix_is_master() { +# Check if the "nightly" repo is used (e.g. "master-centos8") +osmo_repo_is_nightly() { case "$IMAGE_SUFFIX" in master*) return 0 ;; + asan*) return 0 ;; *) return 1 ;; esac } -# Check if IMAGE_SUFFIX starts with "2023q1" (e.g. "2023q1-centos8") -image_suffix_is_2023q1() { +# Check if the "2023q1" repo is used (e.g. "2023q1-centos8") +osmo_repo_is_2023q1() { case "$IMAGE_SUFFIX" in 2023q1*) return 0 ;; *) return 1 ;; diff --git a/osmo-epdg-master/Dockerfile b/osmo-epdg-master/Dockerfile index cdef31e..a5e9b14 100644 --- a/osmo-epdg-master/Dockerfile +++ b/osmo-epdg-master/Dockerfile @@ -4,14 +4,6 @@ FROM $USER/$DISTRO-erlang # Arguments used after FROM must be specified again ARG DISTRO -# $distro-erlang switched to user build, but we need to install more stuff beforehand: -USER root -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - iproute2 && \ - apt-get clean -USER build - WORKDIR /tmp ARG OSMO_EPDG_BRANCH="master" diff --git a/osmo-s1gw-master/Dockerfile b/osmo-s1gw-master/Dockerfile new file mode 100644 index 0000000..34028f8 --- /dev/null +++ b/osmo-s1gw-master/Dockerfile @@ -0,0 +1,24 @@ +ARG USER +ARG DISTRO +FROM $USER/$DISTRO-erlang +# Arguments used after FROM must be specified again +ARG DISTRO + +WORKDIR /tmp + +ARG OSMO_S1GW_BRANCH="master" + +RUN git clone https://gerrit.osmocom.org/erlang/osmo-s1gw.git +ADD https://gerrit.osmocom.org/plugins/gitiles/erlang/osmo-s1gw/+/$OSMO_S1GW_BRANCH?format=TEXT /tmp/commit-osmo-s1gw + +RUN cd osmo-s1gw && \ + git fetch && git checkout $OSMO_S1GW_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_S1GW_BRANCH || exit 1); \ + git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ + make build + +VOLUME /data + +COPY osmo-s1gw.config /data/osmo-s1gw.config + +CMD ["/bin/sh", "-c", "ERL_FLAGS='-config /data/osmo-s1gw.config' /tmp/osmo-s1gw/_build/default/bin/osmo-s1gw > /data/osmo-s1gw.log 2>&1"] diff --git a/osmo-s1gw-master/Makefile b/osmo-s1gw-master/Makefile new file mode 100644 index 0000000..8d0e10b --- /dev/null +++ b/osmo-s1gw-master/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/osmo-s1gw-master/osmo-s1gw.config b/osmo-s1gw-master/osmo-s1gw.config new file mode 100644 index 0000000..ef48a29 --- /dev/null +++ b/osmo-s1gw-master/osmo-s1gw.config @@ -0,0 +1,2 @@ +[{osmo_s1gw, [ +]}]. diff --git a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg index e8e5058..35eb420 100644 --- a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg +++ b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg @@ -5,12 +5,11 @@ [LOGGING] [TESTPORT_PARAMETERS] -*.AMI.CTRL_HOSTNAME := "172.18.11.10" Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_local_address := "172.18.11.103" Asterisk_Tests_LOCAL_SIP_EMU.SIP.local_sip_port := "5061" Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_dest_address := "172.18.11.10" Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_dest_port := "5094" -Asterisk_Tests_IMS_SIP_EMU.SIP.default_local_address := "172.18.11.103" +Asterisk_Tests_IMS_SIP_EMU.SIP.default_local_address := "172.18.11.104" Asterisk_Tests_IMS_SIP_EMU.SIP.local_sip_port := "5060" # Disabled for Server mode: #Asterisk_Tests_IMS_SIP_EMU.SIP.default_dest_address := "172.18.11.10" @@ -21,6 +20,12 @@ Asterisk_Tests.mp_local_sip_host := "172.18.11.103" Asterisk_Tests.mp_remote_sip_host := "172.18.11.10" Asterisk_Tests.mp_local_sip_port := 5061 Asterisk_Tests.mp_remote_sip_port := 5094 +Asterisk_Tests.mp_local_ims_host := "172.18.11.104" +Asterisk_Tests.mp_local_ims_port := 5060 +Asterisk_Tests.mp_ims_domain := "ims.mnc001.mcc238.3gppnetwork.org" +Asterisk_Tests.mp_ims_imsi := "238010000090828" +Asterisk_Tests.mp_ami_remote_host := "172.18.11.10" +IMS_ConnectionHandler.mp_ipsec_setup_script_path := "/osmo-ttcn3-hacks/asterisk/IMS_ipsec_setup.sh" [MAIN_CONTROLLER] diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf index a17d606..3ec5f17 100644 --- a/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf +++ b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf @@ -14,7 +14,7 @@ astsbindir => /usr/sbin [options] ;verbose = 3 -;debug = 3 +debug = 1 ;trace = 0 ; Set the trace level. ;refdebug = yes ; Enable reference count debug logging. ;alwaysfork = yes ; Same as -F at startup. diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh index c79408d..fb5e82e 100755 --- a/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh +++ b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh @@ -2,16 +2,25 @@ set +e set -x +if [[ -z "${DNS_IPADDR}" ]]; then + echo "env var DNS_IPADDR undefined!" + exit 1 +fi + ASTERISK_CFG_PATH="/etc/asterisk" +echo "nameserver $DNS_IPADDR" > /etc/resolv.conf + #rm -rf "${ASTERISK_CFG_PATH}" #mkdir -p "${ASTERISK_CFG_PATH}" #cp -r /etc/asterisk/* "${ASTERISK_CFG_PATH}/" cp /data/asterisk.conf "${ASTERISK_CFG_PATH}/" #sed -i "s#/etc/asterisk#${ASTERISK_CFG_PATH}#" "${ASTERISK_CFG_PATH}/asterisk.conf" +cp /data/pjproject.conf "${ASTERISK_CFG_PATH}/" cp /data/pjsip.conf "${ASTERISK_CFG_PATH}/" cp /data/manager.conf "${ASTERISK_CFG_PATH}/" +cp /data/logger.conf "${ASTERISK_CFG_PATH}/" cat /data/extensions.conf >>"${ASTERISK_CFG_PATH}/extensions.conf" /usr/sbin/asterisk -C "${ASTERISK_CFG_PATH}/asterisk.conf" -f -g -vvvvv -ddddd diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf index 3c78a2d..0b98707 100644 --- a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf +++ b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf @@ -30,8 +30,16 @@ exten => _050X,1,Verbose(5,${EXTEN}: Call pjsip endpoint from ${CALLERID(num)}) same => n,Dial(PJSIP/${EXTEN}) same => n,Hangup(16) -exten => _X,1,Verbose(5,${EXTEN}: Call external number from ${CALLERID(num)}) - same => n,Dial(PJSIP/${EXTEN}@973171) +exten => _.!,1,Verbose(5,${EXTEN}: Call external number from ${CALLERID(num)}) + same => n,Dial(PJSIP/${EXTEN}@volte_ims) same => n,Hangup(16) +[volte_ims] + +exten => _.!,1,Verbose(5,${EXTEN}: Call internal number from ${CALLERID(num)}) + same => n,Gosub(get-valid-endpoints,s,1()) + same => n,Set(DIALGROUP(CALL_EVERYONE_LIST)=${GOSUB_RETVAL}) + same => n,Set(DIALGROUP(CALL_EVERYONE_LIST,del)=PJSIP/${CALLERID(num)}) ; remove the caller + same => n,Dial(${DIALGROUP(CALL_EVERYONE_LIST)}) + same => n,Hangup(16) diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/logger.conf b/ttcn3-asterisk-ims-ue-test/asterisk/logger.conf new file mode 100644 index 0000000..292e624 --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/asterisk/logger.conf @@ -0,0 +1,5 @@ +[logfiles] +;messages = notice,warning,error +;console = verbose,notice,warning,error,debug,trace,dtmf +console = * +;security = security diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/pjproject.conf b/ttcn3-asterisk-ims-ue-test/asterisk/pjproject.conf new file mode 100644 index 0000000..fdcc545 --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/asterisk/pjproject.conf @@ -0,0 +1,13 @@ +[startup] +;https://docs.asterisk.org/Certified-Asterisk_18.9_Documentation/API_Documentation/Module_Configuration/res_pjproject/ +; These logging level meanings are typically used by pjproject: +; - 0: fatal error +; - 1: error +; - 2: warning +; - 3: info +; - 4: debug +; - 5: trace +; - 6: more detailed trace +; +; log_level 6 "trace" is too much. +log_level=5 diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf b/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf index 57cab41..f3ac374 100644 --- a/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf +++ b/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf @@ -1,4 +1,6 @@ - +;############ +; LOCAL SIP +;############ [transport-udp] type=transport protocol=udp @@ -68,3 +70,63 @@ password=secret [0504](aor_phone_template) +;############ +; VoLTE +;############ +[transport-tcp] +type=transport +protocol=tcp +bind=172.18.11.10:5060 +sec_port_c_min=5555 +sec_port_c_max=5559 +sec_port_s_min=5060 +sec_port_s_max=5069 +p_access_network_info=3GPP-E-UTRAN-FDD\; utran-cell-id-3gpp=2380100010000101 + +[volte_ims] +type=registration +transport=transport-tcp +outbound_auth=volte_ims +server_uri=sip:ims.mnc001.mcc238.3gppnetwork.org +client_uri=sip:238010000090828@ims.mnc001.mcc238.3gppnetwork.org +retry_interval=30 +fatal_retry_interval=30 +expiration=600000 +ims_aka=yes +contact_user=volte_ims +contact_header_params=+g.3gpp.icsi-ref="urn\%3Aurn-7\%3A3gpp-service.ims.icsi.mmtel"\;+g.3gpp.smsip\;audio\;+sip.instance="<urn:gsma:imei:35876110-027790-0>" +endpoint=volte_ims +line=yes +manual_register=yes + +[volte_ims] +type=endpoint +context=volte_ims +disallow=all +allow=vevs +transport=transport-tcp +outbound_auth=volte_ims +aors=volte_ims +rewrite_contact=yes +direct_media=no +ims_aka=yes + +[volte_ims] +type=auth +auth_type=ims_aka +username=238010000090828@ims.mnc001.mcc238.3gppnetwork.org +usim_ami=yes +usim_opc=775A1F887D2AD66F9719C2C79F847B50 +usim_k=D534E07854B75E475C667A856AA31F9C +usim_sqn=000000011000 + +[volte_ims] +type=aor +contact=sip:238010000090828@ims.mnc001.mcc238.3gppnetwork.org +max_contacts=1 + +[volte_ims] +type=identify +endpoint=volte_ims +match=ims.mnc001.mcc238.3gppnetwork.org +;match=172.18.11.10 diff --git a/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf b/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf new file mode 100644 index 0000000..8aea943 --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf @@ -0,0 +1,19 @@ +#log all dns queries +log-queries +#dont use hosts nameservers +no-resolv +listen-address=::1,127.0.0.1,172.18.11.200 + +#use google as default nameservers +server=8.8.4.4 +server=8.8.8.8 + +# PCSCF IP! +host-record=ims.mnc001.mcc238.3gppnetwork.org,172.18.11.104 +srv-host=_sip._tcp.ims.mnc001.mcc238.3gppnetwork.org,ims.mnc001.mcc238.3gppnetwork.org,5060 +srv-host=_sip._udp.ims.mnc001.mcc238.3gppnetwork.org,ims.mnc001.mcc238.3gppnetwork.org,5060 + +#naptr-record= <name> ,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>] +#naptr-record=ims.mnc001.mcc238.3gppnetwork.org, 2, 0 ,s ,SIP+D2U ,"" ,_sip._udp.ims.mnc001.mcc238.3gppnetwork.org +naptr-record=ims.mnc001.mcc238.3gppnetwork.org,0,0,s,SIP+D2U,!(.*)!_sip._udp.\1! +naptr-record=ims.mnc001.mcc238.3gppnetwork.org,0,0,s,SIP+D2T,!(.*)!_sip._tcp.\1!
\ No newline at end of file diff --git a/ttcn3-asterisk-ims-ue-test/jenkins.sh b/ttcn3-asterisk-ims-ue-test/jenkins.sh index 7e5361d..a5da1d0 100755 --- a/ttcn3-asterisk-ims-ue-test/jenkins.sh +++ b/ttcn3-asterisk-ims-ue-test/jenkins.sh @@ -4,13 +4,18 @@ IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" docker_images_require \ "asterisk-$IMAGE_SUFFIX" \ - "ttcn3-asterisk-ims-ue-test" + "ttcn3-asterisk-ims-ue-test" \ + "dnsmasq" set_clean_up_trap set -e +mkdir $VOL_BASE_DIR/dnsmasq +cp dnsmasq/* $VOL_BASE_DIR/dnsmasq/ + mkdir $VOL_BASE_DIR/asterisk-ims-ue-tester mkdir $VOL_BASE_DIR/asterisk-ims-ue-tester/unix +cp ttcn3.sh $VOL_BASE_DIR/asterisk-ims-ue-tester/ cp Asterisk_Tests.cfg $VOL_BASE_DIR/asterisk-ims-ue-tester/ write_mp_osmo_repo "$VOL_BASE_DIR/asterisk-ims-ue-tester/Asterisk_Tests.cfg" @@ -19,10 +24,28 @@ cp asterisk/* $VOL_BASE_DIR/asterisk/ network_create network_replace_subnet_in_configs +SUBNET_IP_PREFIX="172.18.$SUBNET" +ASTERISK_IP_SUFFIX="10" +TTCN3_IP_SUFFIX="103" +IMSCORE_IP_SUFFIX="104" +DNS_IP_SUFFIX="200" + +echo Starting container with dnsmasq +docker run --rm \ + --cap-add=NET_ADMIN \ + $(docker_network_params $SUBNET $DNS_IP_SUFFIX) \ + --ulimit core=-1 \ + -v $VOL_BASE_DIR/dnsmasq:/data \ + --name ${BUILD_TAG}-dnsmasq -d \ + $DOCKER_ARGS \ + $REPO_USER/dnsmasq echo Starting container with Asterisk docker run --rm \ - $(docker_network_params $SUBNET 10) \ + --cap-add=NET_ADMIN \ + --cap-add=SYS_RESOURCE \ + $(docker_network_params $SUBNET $ASTERISK_IP_SUFFIX) \ + -e "DNS_IPADDR=${SUBNET_IP_PREFIX}.${DNS_IP_SUFFIX}" \ --ulimit core=-1 \ -v $VOL_BASE_DIR/asterisk:/data \ --name ${BUILD_TAG}-asterisk -d \ @@ -35,10 +58,14 @@ sleep 3 echo Starting container with Asterisk testsuite docker run --rm \ - $(docker_network_params $SUBNET 103) \ + --cap-add=NET_ADMIN \ + --cap-add=SYS_RESOURCE \ + $(docker_network_params $SUBNET $TTCN3_IP_SUFFIX) \ --ulimit core=-1 \ -e "TTCN3_PCAP_PATH=/data" \ + -e "EXTRA_IPADDR=${SUBNET_IP_PREFIX}.${IMSCORE_IP_SUFFIX}/24" \ -v $VOL_BASE_DIR/asterisk-ims-ue-tester:/data \ --name ${BUILD_TAG}-ttcn3-asterisk-ims-ue-test \ $DOCKER_ARGS \ - $REPO_USER/ttcn3-asterisk-ims-ue-test + $REPO_USER/ttcn3-asterisk-ims-ue-test \ + /data/ttcn3.sh diff --git a/ttcn3-asterisk-ims-ue-test/ttcn3.sh b/ttcn3-asterisk-ims-ue-test/ttcn3.sh new file mode 100755 index 0000000..6c50af0 --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/ttcn3.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set +e +set -x + +if [[ -z "${EXTRA_IPADDR}" ]]; then + echo "env var EXTRA_IPADDR undefined!" + exit 1 +fi + +ip addr add "${EXTRA_IPADDR}" dev eth0 + +ttcn3-docker-run asterisk Asterisk_Tests diff --git a/ttcn3-bsc-test/BSC_Tests.cfg b/ttcn3-bsc-test/BSC_Tests.cfg index 80e06ee..2eefc85 100644 --- a/ttcn3-bsc-test/BSC_Tests.cfg +++ b/ttcn3-bsc-test/BSC_Tests.cfg @@ -73,3 +73,4 @@ BSC_Tests_CBSP.mp_bsc_cbsp_ip6 := "fd02:db8:2::20"; BSC_Tests.control BSC_Tests_LCLS.control BSC_Tests_CBSP.control +BSC_Tests_ASCI.control diff --git a/ttcn3-bts-test/generic/BTS_Tests.cfg b/ttcn3-bts-test/generic/BTS_Tests.cfg index cd1e739..a87c99f 100644 --- a/ttcn3-bts-test/generic/BTS_Tests.cfg +++ b/ttcn3-bts-test/generic/BTS_Tests.cfg @@ -27,3 +27,4 @@ BTS_Tests.control BTS_Tests_SMSCB.control BTS_Tests_LAPDm.control BTS_Tests_VAMOS.control +BTS_Tests_ASCI.control diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 38e3760..35415cd 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -126,7 +126,7 @@ start_testsuite() { } set_pcuif_version() { - if image_suffix_is_2023q1; then + if osmo_repo_is_2023q1; then sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-ggsn-test/ogs/open5gs-smf-master.yaml b/ttcn3-ggsn-test/ogs/open5gs-smf-master.yaml index 4b5891e..76c71b6 100644 --- a/ttcn3-ggsn-test/ogs/open5gs-smf-master.yaml +++ b/ttcn3-ggsn-test/ogs/open5gs-smf-master.yaml @@ -7,28 +7,7 @@ global: max: ue: 1024 -sbi: - server: - no_tls: true - cacert: /etc/open5gs/tls/ca.crt - key: /etc/open5gs/tls/smf.key - cert: /etc/open5gs/tls/smf.crt - client: - no_tls: true - cacert: /etc/open5gs/tls/ca.crt - key: /etc/open5gs/tls/smf.key - cert: /etc/open5gs/tls/smf.crt - smf: - sbi: - server: - - address: 172.18.3.201 - port: 7777 - client: - nrf: - - uri: http://172.18.3.201:7777 - scp: - - uri: http://127.0.1.10:7777 pfcp: server: - address: 172.18.3.201 diff --git a/ttcn3-pcu-test/jenkins-sns.sh b/ttcn3-pcu-test/jenkins-sns.sh index c42ad18..4f55612 100755 --- a/ttcn3-pcu-test/jenkins-sns.sh +++ b/ttcn3-pcu-test/jenkins-sns.sh @@ -10,7 +10,7 @@ set_clean_up_trap set -e set_pcuif_version() { - if image_suffix_is_2023q1; then + if osmo_repo_is_2023q1; then sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh index f92a08e..dcd0ce9 100755 --- a/ttcn3-pcu-test/jenkins.sh +++ b/ttcn3-pcu-test/jenkins.sh @@ -10,7 +10,7 @@ set_clean_up_trap set -e set_pcuif_version() { - if image_suffix_is_2023q1; then + if osmo_repo_is_2023q1; then sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-s1gw-test/Dockerfile b/ttcn3-s1gw-test/Dockerfile new file mode 100644 index 0000000..296cd02 --- /dev/null +++ b/ttcn3-s1gw-test/Dockerfile @@ -0,0 +1,14 @@ +ARG REGISTRY +ARG USER +FROM $REGISTRY/$USER/debian-bookworm-titan + +ARG OSMO_TTCN3_BRANCH="master" + +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ttcn3-hacks/+/$OSMO_TTCN3_BRANCH?format=TEXT /tmp/commit +RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" s1gw + +VOLUME /data + +COPY S1GW_Tests.cfg /data/S1GW_Tests.cfg + +CMD ttcn3-docker-run s1gw S1GW_Tests diff --git a/ttcn3-s1gw-test/Makefile b/ttcn3-s1gw-test/Makefile new file mode 100644 index 0000000..8d0e10b --- /dev/null +++ b/ttcn3-s1gw-test/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/ttcn3-s1gw-test/S1GW_Tests.cfg b/ttcn3-s1gw-test/S1GW_Tests.cfg new file mode 100644 index 0000000..a81c95e --- /dev/null +++ b/ttcn3-s1gw-test/S1GW_Tests.cfg @@ -0,0 +1,17 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/s1gw/S1GW_Tests.default" + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] +S1GW_Tests.mp_s1gw_enb_ip := "172.18.10.200"; +S1GW_Tests.mp_s1gw_mme_ip := "172.18.10.100"; +S1GW_Tests.mp_mme_bind_ip := "172.18.10.101"; + +[MAIN_CONTROLLER] + +[EXECUTE] +S1GW_Tests.control diff --git a/ttcn3-s1gw-test/jenkins.sh b/ttcn3-s1gw-test/jenkins.sh new file mode 100755 index 0000000..78a9624 --- /dev/null +++ b/ttcn3-s1gw-test/jenkins.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +. ../jenkins-common.sh +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "osmo-s1gw-$IMAGE_SUFFIX" \ + "ttcn3-s1gw-test" + +set_clean_up_trap +set -e + +mkdir $VOL_BASE_DIR/s1gw-tester +cp S1GW_Tests.cfg $VOL_BASE_DIR/s1gw-tester/ +write_mp_osmo_repo "$VOL_BASE_DIR/s1gw-tester/S1GW_Tests.cfg" + +mkdir $VOL_BASE_DIR/s1gw +cp s1gw.sh $VOL_BASE_DIR/s1gw/ +cp osmo-s1gw.config $VOL_BASE_DIR/s1gw/ + +network_create +network_replace_subnet_in_configs + +echo "Starting container with osmo-s1gw" +docker run --rm \ + $(docker_network_params $SUBNET 100) \ + --ulimit core=-1 \ + --cap-add=NET_ADMIN \ + -e "ERL_FLAGS=-config /data/osmo-s1gw.config" \ + -v $VOL_BASE_DIR/s1gw:/data \ + --name ${BUILD_TAG}-s1gw -d \ + $DOCKER_ARGS \ + $REPO_USER/osmo-s1gw-$IMAGE_SUFFIX \ + /bin/sh -c "/data/s1gw.sh > /data/osmo-s1gw.log 2>&1" + +# Give some time to osmo-s1gw to be fully started; it's a bit slow... +sleep 2 + +echo "Starting container with the S1GW testsuite" +docker run --rm \ + $(docker_network_params $SUBNET 101) \ + --ulimit core=-1 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/s1gw-tester:/data \ + --name ${BUILD_TAG}-ttcn3-s1gw-test \ + $DOCKER_ARGS \ + $REPO_USER/ttcn3-s1gw-test diff --git a/ttcn3-s1gw-test/osmo-s1gw.config b/ttcn3-s1gw-test/osmo-s1gw.config new file mode 100644 index 0000000..13b5058 --- /dev/null +++ b/ttcn3-s1gw-test/osmo-s1gw.config @@ -0,0 +1,34 @@ +%% -*- erlang -*- + +[%% ================================================================================ + %% application config + %% + %% eNB S1GW + %% +-----+ +----------------+ + %% | ... | --> | s1gw_bind_addr | MME + %% +-----+ +----------------+ +-----------------+ + %% | mme_loc_addr | --> | mme_rem_addr | + %% +----------------+ +-----------------+ + %% ================================================================================ + {osmo_s1gw, + [{s1gw_bind_addr, "172.18.10.200"}, %% S1GW bind address for incoming eNB connections + {mme_loc_addr, "172.18.10.100"}, %% local address for outgoing connections to the MME + {mme_rem_addr, "172.18.10.101"} %% remote address for outgoing connections to the MME + ]}, + %% ================================================================================ + %% kernel config + %% ================================================================================ + {kernel, + [{logger_level, debug}, + {logger, + [{handler, default, logger_std_h, + #{level => debug, + formatter => {logger_formatter, + #{template => [time, " ", + "[", level, "] ", + {pid, ["", pid, " "], ""}, + msg, + {mfa, [" (", mfa, ":", line, ")"], ""}, + "\n"]}}}}]}]}]. + +%% vim:set ts=2 sw=2 et: diff --git a/ttcn3-s1gw-test/s1gw.sh b/ttcn3-s1gw-test/s1gw.sh new file mode 100755 index 0000000..e212aa2 --- /dev/null +++ b/ttcn3-s1gw-test/s1gw.sh @@ -0,0 +1,8 @@ +#!/bin/sh -ex + +# the subnet prefix is to be modified by network_replace_subnet_in_configs() +ip addr add 172.18.10.100/24 dev eth0 || true # primary address already set by docker_network_params() +ip addr add 172.18.10.200/24 dev eth0 # secondary address for eNB -> S1GW connections + +# drop the root privileges and finally start osmo-s1gw +su build -c "/tmp/osmo-s1gw/_build/default/bin/osmo-s1gw" diff --git a/ttcn3-stp-test/jenkins.sh b/ttcn3-stp-test/jenkins.sh index 4f90a4d..b1f02b9 100755 --- a/ttcn3-stp-test/jenkins.sh +++ b/ttcn3-stp-test/jenkins.sh @@ -17,7 +17,7 @@ mkdir $VOL_BASE_DIR/stp cp osmo-stp.cfg $VOL_BASE_DIR/stp/ # XXX: M3UA-over-TCP is not supported by osmo-stp <= 1.8.1 -if image_suffix_is_master; then +if osmo_repo_is_nightly; then osmo-config-merge ./osmo-stp.cfg \ ./osmo-stp-tcp.confmerge \ > "$VOL_BASE_DIR/stp/osmo-stp.cfg" |