Attention is currently required from: Hoernchen, jolly, laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37128?usp=email )
Change subject: asterisk: extensions.conf: Forward call from VoLTE to all registered local UAs
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Once this gets merged, reminder to update https://projects.sysmocom.de/projects/cobham-ims-ue/wiki/Asterisk_configura… adding this snippet.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37128?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Id3e14ca660f0aa4ed685a90f527feb8732a83806
Gerrit-Change-Number: 37128
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 07 Jun 2024 18:42:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/37128?usp=email )
Change subject: asterisk: extensions.conf: Forward call from VoLTE to all registered local UAs
......................................................................
asterisk: extensions.conf: Forward call from VoLTE to all registered local UAs
Change-Id: Id3e14ca660f0aa4ed685a90f527feb8732a83806
---
M ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/28/37128/1
diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf
index f24d366..0b98707 100644
--- a/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf
+++ b/ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf
@@ -35,3 +35,11 @@
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)
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37128?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Id3e14ca660f0aa4ed685a90f527feb8732a83806
Gerrit-Change-Number: 37128
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/37125?usp=email )
Change subject: ttcn3-asterisk: Add extra IP addr in ttcn3 docker for IMS Core
......................................................................
ttcn3-asterisk: Add extra IP addr in ttcn3 docker for IMS Core
TTCN-3 docker container is emulating both the SIP UAs and the IMS Core.
So far all the components being emulated there were running under the
only local IP address available in the docker container.
This means, both the SIP UAs and the IMS Core were using the same IP
address.
This is actually causing problems for Asterisk, since on the VoLTE side
it needs to be configured to identify the endpoint based on the IMS Core
domain name.
Since the default identify matching ordered in Asterisk is:
"endpoint_identifier_order=ip,username,anonymous"
That means it always first checks the source IP address, which means
messages coming from local SIP UAs are misunderstood to be coming from
the IMS Core (since ims.mnc001.mcc238.3gppnetwork.org resolves to same
IP address).
The issue can be fixed by swapping the order to "username,ip", because
then the well-known 50X extensions are matched before attempting to
match by IP address.
However, this is all deviating config for the expected usual network
configuration, since the local IP network will be different than the IP
address coming from VoLTE.
Hence, let's instead properly separate the local SIP and VoLTE networks
with different IP addresses, which then solves the issue.
Change-Id: I6e5a261748ec61bb1cfa4aafee8c748d0f46aa9e
---
M ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
M ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh
M ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf
M ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf
M ttcn3-asterisk-ims-ue-test/jenkins.sh
A ttcn3-asterisk-ims-ue-test/ttcn3.sh
6 files changed, 71 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/25/37125/1
diff --git a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
index a7576e6..35eb420 100644
--- a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
+++ b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
@@ -9,7 +9,7 @@
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"
@@ -20,7 +20,7 @@
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_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"
diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh
index 0629e20..fb5e82e 100755
--- a/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh
+++ b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh
@@ -2,10 +2,14 @@
set +e
set -x
-ASTERISK_CFG_PATH="/etc/asterisk"
-DNSMASQ_IPADDR="172.18.11.200"
+if [[ -z "${DNS_IPADDR}" ]]; then
+ echo "env var DNS_IPADDR undefined!"
+ exit 1
+fi
-echo "nameserver $DNSMASQ_IPADDR" > /etc/resolv.conf
+ASTERISK_CFG_PATH="/etc/asterisk"
+
+echo "nameserver $DNS_IPADDR" > /etc/resolv.conf
#rm -rf "${ASTERISK_CFG_PATH}"
#mkdir -p "${ASTERISK_CFG_PATH}"
diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf b/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf
index 4f292c2..f3ac374 100644
--- a/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf
+++ b/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf
@@ -128,5 +128,5 @@
[volte_ims]
type=identify
endpoint=volte_ims
-;match=ims.mnc001.mcc238.3gppnetwork.org
-match=172.18.11.10
+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
index b2430ff..8aea943 100644
--- a/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf
+++ b/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf
@@ -9,7 +9,7 @@
server=8.8.8.8
# PCSCF IP!
-host-record=ims.mnc001.mcc238.3gppnetwork.org,172.18.11.103
+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
diff --git a/ttcn3-asterisk-ims-ue-test/jenkins.sh b/ttcn3-asterisk-ims-ue-test/jenkins.sh
index 7e94fa5..a5da1d0 100755
--- a/ttcn3-asterisk-ims-ue-test/jenkins.sh
+++ b/ttcn3-asterisk-ims-ue-test/jenkins.sh
@@ -15,6 +15,7 @@
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"
@@ -23,11 +24,16 @@
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 200) \
+ $(docker_network_params $SUBNET $DNS_IP_SUFFIX) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/dnsmasq:/data \
--name ${BUILD_TAG}-dnsmasq -d \
@@ -38,7 +44,8 @@
docker run --rm \
--cap-add=NET_ADMIN \
--cap-add=SYS_RESOURCE \
- $(docker_network_params $SUBNET 10) \
+ $(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 \
@@ -53,10 +60,12 @@
docker run --rm \
--cap-add=NET_ADMIN \
--cap-add=SYS_RESOURCE \
- $(docker_network_params $SUBNET 103) \
+ $(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
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37125?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I6e5a261748ec61bb1cfa4aafee8c748d0f46aa9e
Gerrit-Change-Number: 37125
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37124?usp=email )
Change subject: asterisk: Fix wrong IP address arg creating IMS_CallPars
......................................................................
asterisk: Fix wrong IP address arg creating IMS_CallPars
This field is not yet really used because we are not doing any RTP so
far, so the previous error was harmless. We are at most sending it in
the SDP.
Change-Id: Iac0c240d785131954c4d8a2df90655e2a5ec3666
---
M asterisk/Asterisk_Tests.ttcn
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/37124/1
diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn
index a96e66a..c4cad38 100644
--- a/asterisk/Asterisk_Tests.ttcn
+++ b/asterisk/Asterisk_Tests.ttcn
@@ -79,7 +79,7 @@
}
function f_init_IMS_ConnHdlrPars(integer idx := 1) runs on test_CT return IMS_ConnHdlrPars {
- var template (value) IMS_CallPars cp := t_IMS_CallPars(mp_local_sip_host, 1234 + 2*idx);
+ var template (value) IMS_CallPars cp := t_IMS_CallPars(mp_local_ims_host, 1234 + 2*idx);
var template (value) IMS_ConnHdlrPars pars := t_IMS_Pars(mp_local_ims_host,
mp_local_ims_port,
mp_ims_domain,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37124?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iac0c240d785131954c4d8a2df90655e2a5ec3666
Gerrit-Change-Number: 37124
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37123?usp=email )
Change subject: asterisk: IMS: Validate P-Access-Network-Info in rx INVITE
......................................................................
asterisk: IMS: Validate P-Access-Network-Info in rx INVITE
Change-Id: Ie4c4c4e11abbaae81f934675c569b09433a5eb15
---
M asterisk/IMS_ConnectionHandler.ttcn
1 file changed, 18 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/23/37123/1
diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn
index 7819e62..1eae16d 100644
--- a/asterisk/IMS_ConnectionHandler.ttcn
+++ b/asterisk/IMS_ConnectionHandler.ttcn
@@ -697,9 +697,15 @@
contact := g_rx_sip_req.msgHeader.contact;
f_ims_validate_register_contact(contact);
- /* Validate P-Access-Network-Info: */
+ /* Validate P-Access-Network-Info: 3GPP TS 24.229 5.1.2A.1.1
+ * "If available to the UE (as defined in the access technology specific annexes for each access technology), the UE shall
+ * insert a P-Access-Network-Info header field into any request for a dialog, any subsequent request (except CANCEL
+ * requests) or response (except CANCEL responses) within a dialog or any request for a standalone method (see
+ * subclause 7.2A.4). Insertion of the P-Access-Network-Info header field into the ACK request is optional."
+ */
f_ims_validate_register_P_Access_Network_info(g_rx_sip_req, exp_present := true);
+
/* Tx 100 Tyring */
tx_resp := ts_SIP_Response_Trying(sip_call_id,
from_addr,
@@ -772,6 +778,8 @@
f_ConnHdlr_parse_initial_SIP_INVITE(g_rx_sip_req);
via := g_rx_sip_req.msgHeader.via;
+ f_ims_validate_register_P_Access_Network_info(g_rx_sip_req, exp_present := true);
+
/* Tx 180 Ringing */
tx_resp := ts_SIP_Response_Ringing(g_pars.subscr.cp.sip_call_id,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37123?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ie4c4c4e11abbaae81f934675c569b09433a5eb15
Gerrit-Change-Number: 37123
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: jolly.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37014?usp=email )
Change subject: asterisk: extensions.conf: Route non-local extensions towards IMS side
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
@andreas@eversberg.eu any comments? do you have a better regexp to use this branch as default?
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37014?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Icce5e55ab75c0c9fdacc4d8504e6714b99d385b4
Gerrit-Change-Number: 37014
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 07 Jun 2024 12:42:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment