Compare commits

...

2 Commits

Author SHA1 Message Date
Pau Espin 2b9c8e3db8 ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker
In docker, the /data dir is mapped to $VOL_BASE_DIR, which is created by
docker-playground.git jenkins-common.sh, hence as the user running
jenkins.sh in the host system.
As a result, when the dir is mapped to /data, inside the container it
will have the UID:GID of the outter user, not the one inside docker.

Before this patch, if a ttcn3 container was started in jenkins.sh with
--cap-add=NET_ADMIN, then osmo-ttcn3-hacks.git/ttcn3-tcpdump-start.sh
would select dumpcap instead of tcpdump, to attempt to record a pcap
file to /data/$testcase.pcap.
Due to some unknown way of dropping privileges done by dumpcap though,
it was unable to open the /data/$testcase.pcap due to /data being owned
to another user (tcpdump doesn't have this problem).

This patch fixes the above scenario by making sure /data is chowned to
the user running stuff inside docker. This is already kinda expected
since there's a fix_perms() script in jenkins-common.sh reverting files
created during the test so that they can be accessible by outter user
once everything is finished.

Change-Id: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
2024-05-15 20:25:01 +02:00
Pau Espin f9c8ed8de7 ttcn3-asterisk: Configure asterisk for initial SIP register on IMS side
This set of pjsip config requires work done by jolly in our fork of
asterisk adding IMS features.

Depends: osmo-ttcn3-hacks.git Change-Id Idb3b19ccd82cad25948106b2c72aa424d7f79cd8
Change-Id: I66d128192146ad600203ea2a41b8bf019311d603
2024-05-15 14:09:59 +02:00
3 changed files with 57 additions and 1 deletions

View File

@ -31,6 +31,9 @@ if [ -n "$WAIT_FOR_NETDEV" ]; then
done
fi
# Make sure /data is owned to the user running inside docker.
# jenkins-commons.sh fix_perms() will fix back the permissions once done.
chown -R "$(id -u):$(id -g)" /data
cd /data
# Use TEST_NAME to only run one test instead of all. Set it like this:

View File

@ -20,6 +20,9 @@ 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.103"
Asterisk_Tests.mp_local_ims_port := 5060
Asterisk_Tests.mp_ims_imsi := "238010000090828"
Asterisk_Tests.mp_ami_remote_host := "172.18.11.10"
[MAIN_CONTROLLER]

View File

@ -1,4 +1,6 @@
;############
; LOCAL SIP
;############
[transport-udp]
type=transport
protocol=udp
@ -68,3 +70,51 @@ password=secret
[0504](aor_phone_template)
;############
; VoLTE
;############
[transport-tcp]
type=transport
protocol=tcp
bind=172.18.11.10:5060
ims_port_c=5555
ims_port_s=5060
[volte_ims]
type=registration
transport=transport-tcp
outbound_auth=volte_ims
server_uri=sip:172.18.11.103
client_uri=sip:238010000090828@172.18.11.103
retry_interval=30
fatal_retry_interval=30
expiration=600000
ims_aka=yes
contact_user=volte_ims
endpoint=volte_ims
line=yes
[volte_ims]
type=endpoint
context=volte_ims
disallow=all
allow=vevs
outbound_auth=volte_ims
aors=volte_ims
rewrite_contact=yes
from_user=238010000090828
from_domain=172.18.11.103
[volte_ims]
type=auth
auth_type=ims_aka
username=238010000090828@172.18.11.103
usim_ami=no
usim_opc=775A1F887D2AD66F9719C2C79F847B50
usim_k=D534E07854B75E475C667A856AA31F9C
usim_sqn=000000011000
[volte_ims]
type=aor
contact=sip:238010000090828@172.18.11.103
max_contacts=1