Compare commits

...

136 Commits

Author SHA1 Message Date
Sukchan Lee
8c7371db7f Release v0.5.2 2019-08-11 11:19:05 +00:00
Sukchan Lee
a6f9ad52cb [#245] Add Configurable Memory Pool Size 2019-08-09 23:28:58 +09:00
Sukchan Lee
e2f94753b7 Merge pull request #244 from herlesupreeth/master
Edit IMS setup guide to install from deb packages
2019-08-07 00:09:01 +09:00
Supreeth Herle
9d8203eb68 Edit IMS setup guide to install from deb packages 2019-08-06 15:10:42 +02:00
Sukchan Lee
9079ab216d [#237] Add the IMS Guide 2019-08-05 23:04:02 +09:00
Sukchan Lee
4eb26c4012 Merge branch 'master' of https://github.com/open5gs/nextepc 2019-08-04 14:12:40 +09:00
Sukchan Lee
4b7721ba48 Relink ogslib 2019-08-04 14:12:25 +09:00
Sukchan Lee
197a16bca8 [#243] freeDiameter build fail for bison+flex 2019-08-03 23:14:17 +09:00
Sukchan Lee
fe5f2320b3 Fix the invalid IMSI format in volte test code 2019-08-03 22:12:24 +09:00
Sukchan Lee
715d2b7922 fix indentation 2019-08-03 22:08:20 +09:00
Sukchan Lee
56ff495e7b [#236] Fix the number of PCO 2019-08-02 20:41:33 +09:00
Sukchan Lee
d8d2f9836d Fix the SGsAP IPv6 configuration manual 2019-07-30 23:00:15 +09:00
Sukchan Lee
58af53a6cd Merge branch 'master' of https://github.com/open5gs/nextepc 2019-07-30 22:58:39 +09:00
Sukchan Lee
2db2558624 Document Update for v0.5.1 2019-07-30 22:58:17 +09:00
Sukchan Lee
967f40f216 Release v0.5.1 for Ubuntu(xenial) 2019-07-30 22:42:39 +09:00
Sukchan Lee
58105c9b1e Release v0.5.1 for Ubuntu(bionic) 2019-07-30 22:41:29 +09:00
Sukchan Lee
fdb7fbe368 Release v0.5.1 2019-07-30 21:35:04 +09:00
Sukchan Lee
d08a37f9bb WebUI version changes to v0.5.1 2019-07-30 21:05:23 +09:00
Sukchan Lee
8813e0a175 [#236] MME does mandate Subscribed-RAU-TAU-Timer 2019-07-30 20:58:45 +09:00
Sukchan Lee
dac2bd2e4f [#240] WebUI changes to apply default value 2019-07-30 20:51:50 +09:00
Sukchan Lee
4f9a2e94fc Merge pull request #240 from laf0rge/master
diameter spec compliance related fixes
2019-07-30 20:45:24 +09:00
Harald Welte
a7e2865ef0 hss: Subscribed-Periodic-RAU-TAU-Timer is in Subscriptio-Data
At least in version 11.8.0 Release 11 of 3GPP TS 29.272,
Subscribed-Periodic-RAU-TAU-Timer is only permitted inside
Subscription-Data.  Before this patch, the HSS encodes it outside, i.e.
on the "main" level of the DIAMETER AVP tree.

Related: #238
2019-07-30 00:34:55 +02:00
Harald Welte
7915773900 mme: Subscribed-Periodic-RAU-TAU-Timer is in Subscriptio-Data
At least in version 11.8.0 Release 11 of 3GPP TS 29.272,
Subscribed-Periodic-RAU-TAU-Timer is only permitted inside
Subscription-Data.  Before this patch, the MME expects it outside, i.e.
on the "main" level of the DIAMETER AVP tree.

Closes: #238
2019-07-30 00:31:33 +02:00
Harald Welte
8dca1eacd8 mme: Apply default values for Pre-Emption Capability + Vulnerability
Section 7.3.40 of 3GPP TS 29.272 states default values to be used if
those AVPs are not present in the DIAMETER message.

Closes: #239
2019-07-30 00:23:55 +02:00
Sukchan Lee
a3c5dcd190 [#231] Fix the NextEPC die in MT-Fallback 2019-07-28 15:09:23 +00:00
Sukchan Lee
50e2872ff4 [#234] Set SCTP PPID to 46
At this point, SCTP encryption is not supported.
So, PPID 46 is hard-corded.
2019-07-28 22:43:54 +09:00
Sukchan Lee
2109d7f9de [#235] Oops! Diameter SCTP is now enabled in Test 2019-07-28 22:32:44 +09:00
Sukchan Lee
470e66d37d [#235] TCP enabled for MacOSX 2019-07-28 20:18:51 +09:00
Sukchan Lee
f4647ca346 Merge pull request #235 from laf0rge/master
freeDiameter: Use SCTP-only by default, not TCP-only
2019-07-28 20:14:05 +09:00
Sukchan Lee
f5c5701b17 [#180] Fix EBI in the modify bearer request 2019-07-28 19:44:15 +09:00
Harald Welte
a8c14916a7 freeDiameter: Use SCTP-only by default, not TCP-only
The existing freeDiameter default config files for HSS, MME, PCRF and PGW
disabled SCTP and enabled TCP.  This is not in compliance with
3GPP TS 29.272 secition 7.1.5 which clearly states:
	"Diameter messages over the S6a, S6d, S13 and S13' interfaces shall
	 make use of SCTP IETF RFC 4960 [14]"
2019-07-28 12:41:52 +02:00
Sukchan Lee
709cce5c48 [#231] Add crash-test code 2019-07-25 22:20:18 +09:00
Sukchan Lee
dba1fcac5c Use asn1c library interface(CALLOC) for s1ap memory 2019-07-24 21:03:36 +09:00
Sukchan Lee
d791f0034d [SGsAP] add MM-INFORMATION-REQUEST(Discard by Option2) 2019-07-21 22:52:28 +09:00
Sukchan Lee
f19009c736 [#231] Hotfix for asn1c library
Workaround for asn1c library
- More than 9 ProtocolIE cannot be built from InitialContextSetupRequest
2019-07-21 22:39:23 +09:00
Sukchan Lee
82c4c0e1ec [#231] Wow! Succeed to replay crash in SIM 2019-07-21 21:57:36 +09:00
Sukchan Lee
adb48fbad6 For moving a work place 2019-07-21 21:04:10 +09:00
Sukchan Lee
78eeb1ad45 [#231] TAI-LAI configuration changed 2019-07-21 20:25:29 +09:00
Sukchan Lee
a40d1dd2af [#231] sgsap configuration is changed
sgsap:
      addr: 127.0.0.2
      map:
        tai:
          plmn_id:
            mcc: 001
            mnc: 01
          tac: 4131
        lai:
          plmn_id:
            mcc: 001
            mnc: 01
          lac: 43691
2019-07-21 20:06:08 +09:00
Sukchan Lee
46693cd351 [#231] update testsuite 2019-07-21 15:26:42 +09:00
Sukchan Lee
235121c82d [#231] Create simulator 2019-07-21 15:14:31 +09:00
Sukchan Lee
5e78b78166 [CSFB] Implement SGsAP UE-UNREACHABLE message 2019-07-21 13:08:21 +09:00
Sukchan Lee
9f4204ef8e [#227] Fix the crash when both EBT/PTI are 0 2019-07-21 12:20:26 +09:00
Sukchan Lee
60c0eff085 [#226] Protect Integrity in Security-mode Complete 2019-07-21 11:42:12 +09:00
Sukchan Lee
d9238e3036 [#220] fix RACE-CONDITION for MESSAGE and TIMER 2019-07-21 07:01:45 +09:00
Sukchan Lee
649b6ec5e9 Add comment 2019-07-21 01:09:03 +09:00
Sukchan Lee
ae3e59053d [#220] Timer for UE Context Release 2019-07-21 01:03:19 +09:00
Sukchan Lee
5ce04bcc6f [#220] T3489 done 2019-07-20 23:06:54 +09:00
Sukchan Lee
6a1f628e44 [#220] T3450 done 2019-07-20 22:30:53 +09:00
Sukchan Lee
b34dafcb09 [#220] T3470 done 2019-07-20 21:49:47 +09:00
Sukchan Lee
90290d236e [#220] T3460 done 2019-07-20 21:28:36 +09:00
Sukchan Lee
805869da4f [#220] Guard timer instance is created 2019-07-20 20:38:03 +09:00
Sukchan Lee
42f593d360 [TIMER] continue to refine code 2019-07-20 16:39:01 +09:00
Sukchan Lee
6dc66bce85 [TIMER] timer configuration is added 2019-07-20 16:25:09 +09:00
Sukchan Lee
f1c913129d [TIMER] Move SGSAP timer to the FSM 2019-07-20 15:34:41 +09:00
Sukchan Lee
8cf28d6e16 fix indentation 2019-07-20 15:20:52 +09:00
Sukchan Lee
c1c0b640f3 [TIMER] Move S1-Delayed-Send to the FSM 2019-07-20 15:16:46 +09:00
Sukchan Lee
9565967517 [TIMER] Move timer expiration work to the FSM 2019-07-20 13:07:40 +09:00
Sukchan Lee
a96398357f Update New OGSLib commit 2019-07-20 11:20:09 +09:00
Sukchan Lee
d6d824acb9 Merge pull request #230 from laf0rge/master
mme-kdf: Ensure input arguments (kasme, ..) are read-only and 'const'
2019-07-19 20:59:33 +09:00
Harald Welte
83e449ca63 mme-kdf: Ensure input arguments (kasme, ..) are read-only and 'const' 2019-07-18 11:20:14 +02:00
Sukchan Lee
a6e3affbec rename utils to mongodb 2019-07-16 09:14:53 +09:00
Nick
964e7ecebd Add files via upload
Basic Python Library / Class for adding / removing / reading data from NextEPC HSS (MongoDB)
2019-07-15 18:29:22 +10:00
Nick
cfd8df28c6 Create README.md
Added basic usage
2019-07-15 18:28:45 +10:00
Sukchan Lee
b642ca1491 Oops! Fix one more 2019-07-14 13:59:33 +09:00
Sukchan Lee
b9f7e9c409 fix new configuration (#225) 2019-07-14 13:48:14 +09:00
Sukchan Lee
3a5930650e Merge pull request #224 from medeiros405/master
Change in the config to allow different MCC/MNC in the LAI for CSFB
2019-07-14 13:26:22 +09:00
Romeu Medeiros
18ef1f65c3 Change in the config to allow different MCC/MNC in the LAI for CSFB 2019-07-14 01:18:29 -03:00
Sukchan Lee
99d91da6eb Clarify code for pull request (#223) 2019-07-14 11:00:11 +09:00
Sukchan Lee
79a952d910 Merge pull request #223 from medeiros405/master
Modification to correct UEContextModification for CSFB
2019-07-14 08:42:43 +09:00
Romeu Medeiros
a6fe0cb44f Changes to obey the 3GPP specification for CSFallback 2019-07-13 20:26:39 -03:00
medeiros405
3c4601a5e0 Merge branch 'master' of https://github.com/open5gs/nextepc
Update to original repository
2019-07-13 20:11:05 -03:00
Romeu Medeiros
7d79602eb1 Merge branch 'master' of https://github.com/medeiros405/nextepc 2019-07-13 20:08:25 -03:00
Sukchan Lee
942b9466ef Attach Reject if UE indicates only EIA0 (#222) 2019-07-13 23:47:24 +09:00
Sukchan Lee
f043ccd884 Update Document 2019-07-13 22:58:36 +09:00
Sukchan Lee
7d42465f4e [Done] SMS over SGs 2019-07-13 22:52:50 +09:00
Sukchan Lee
8e37f64c33 [SMS] MO-SMS Done 2019-07-13 14:51:35 +09:00
Sukchan Lee
663861d17b [SMS] Add MO-SMS 2019-07-13 11:51:28 +09:00
Sukchan Lee
bedd68573e [CSFB] Add Paging Reject 2019-07-12 23:18:17 +09:00
Sukchan Lee
9408bb6b4a Add Paging Reject 2019-07-12 18:33:42 +09:00
Sukchan Lee
f20a1a6e2b Add ErrorIndication for S1AP decode error (#218) 2019-07-12 16:22:40 +09:00
Sukchan Lee
74c1e1d481 Hotfix for ubuntu release 2019-07-11 15:34:19 +00:00
Sukchan Lee
fa07895b1e Change debian package 2019-07-11 15:30:40 +00:00
Sukchan Lee
610caf3af3 Ubuntu release patch 2019-07-11 15:26:36 +00:00
Sukchan Lee
3e51450b3c Date change 2019-07-12 00:17:29 +09:00
Sukchan Lee
80199a3c87 Update Document 2019-07-12 00:13:07 +09:00
Sukchan Lee
447fd902d2 Release v0.5.0 in Ubuntu(bionic) 2019-07-11 15:10:53 +00:00
Sukchan Lee
bfcaf15d5d Release v0.5.0 in Ubuntu(xenial) 2019-07-11 15:09:24 +00:00
Sukchan Lee
10d9159dc5 rename pkgconfig 2019-07-11 22:45:43 +09:00
Sukchan Lee
e03c1436fb Release v0.5.0 2019-07-11 22:26:56 +09:00
Sukchan Lee
aa4ea44c2c [OGSLIB] Use NEW Version v1.1.0 2019-07-11 22:25:20 +09:00
Sukchan Lee
e023be67e7 [OGSLIB] Use NEW version v1.1.0 2019-07-11 22:24:20 +09:00
Sukchan Lee
0a96d446b8 [Indentation] All source code changed 2019-07-11 22:22:22 +09:00
Sukchan Lee
97afc2db60 fix identation in HSS 2019-07-11 22:16:32 +09:00
Sukchan Lee
27d5208ea3 fix indentation in PGW 2019-07-11 22:09:30 +09:00
Sukchan Lee
7e08f7fc45 fix indentation in SGW 2019-07-11 22:01:52 +09:00
Sukchan Lee
19a01bdda4 Add CSFB TestSuite 2019-07-11 21:56:34 +09:00
Sukchan Lee
cb369daaea fix indentation in MME 2019-07-11 21:53:54 +09:00
Sukchan Lee
cd814afcff [CSFB] MT-Active-Test done 2019-07-11 21:39:44 +09:00
Sukchan Lee
de59488e2e [CSFB] MT-Active-Mode (Not Done) 2019-07-11 18:14:32 +09:00
Sukchan Lee
d9b7e966e1 [CSFB] Add MO in Active-mode 2019-07-10 22:04:52 +09:00
Sukchan Lee
9dbca85c1f [CSFB] Idle-mode done 2019-07-09 09:27:45 +09:00
Sukchan Lee
87cdd71582 Add Cause in Bearer IE (#215) 2019-07-08 23:08:15 +09:00
Sukchan Lee
0e1bd64646 fix indentation 2019-07-08 22:58:41 +09:00
Sukchan Lee
346e67b7de more sleep is needed in the test code 2019-07-08 22:42:10 +09:00
Sukchan Lee
ecfac8fe3b Add Delay for testcode 2019-07-08 22:20:25 +09:00
Sukchan Lee
40ae23aca4 Paging rollback 2019-07-08 21:44:03 +09:00
Sukchan Lee
979fd96a84 [CSFB] Fix the MacOSX 2019-07-08 21:03:39 +09:00
Sukchan Lee
16a8bea96b [CSFB] MT in idle-mode 2019-07-08 18:15:19 +09:00
Sukchan Lee
5e0c10bcb4 [CSFB] Rename test-name 2019-07-08 09:18:17 +09:00
Sukchan Lee
9863635342 [SGsAP] Add SGsAP-RESET-INDCIATON/ACK 2019-07-07 10:16:21 +09:00
Sukchan Lee
bc9cf078a5 [CSFB] Add MO-CSFB-Indication 2019-07-07 09:47:32 +09:00
Sukchan Lee
65cb21ce05 [SGsAP] clarify P_TMSI availablity 2019-07-06 23:30:05 +09:00
Sukchan Lee
0bbc5124e7 rename filename 2019-07-06 22:52:09 +09:00
Sukchan Lee
89ed2dda88 [SGsAP] TestCode for CS fallback in idle-mode 2019-07-06 22:45:15 +09:00
Sukchan Lee
a6eb646b76 [SGsAP] MO CS fallback in idle-mode 2019-07-06 22:16:13 +09:00
Sukchan Lee
5164b51607 [SGsAP] waiting for running the SCTP test server 2019-07-05 18:16:58 +09:00
Sukchan Lee
cc83c6a586 [SGsAP] DETACH-INDICATOIN/ACK is done 2019-07-05 18:13:32 +09:00
Sukchan Lee
a372bd2949 [SGsAP] Start to implement XXX-DETACH-INDICATION 2019-07-05 17:25:12 +09:00
Sukchan Lee
4f7aa2d5b7 [SGsAP] Location Update Reject 2019-07-05 15:55:07 +09:00
Sukchan Lee
334c678995 Fix the Security Command Reject (#214) 2019-07-04 22:48:26 +09:00
Sukchan Lee
0717b57465 Debian package name changed 2019-07-04 13:12:09 +00:00
Sukchan Lee
b440d59ce7 Update documentation 2019-07-04 20:30:58 +09:00
Nick
770d1cdba6 Reordered and updated MME details 2019-07-04 21:10:25 +10:00
Nick
cd2b420470 Created doc "NextEPC Splitting Network Elements"
Outlining basic requirements of each network element and interfaces and how to break up the network.
2019-07-04 21:09:05 +10:00
Sukchan Lee
f9f1ac7aac fix the docker-compose build error (#211) 2019-07-02 22:02:43 +09:00
Sukchan Lee
fd66c4023e Merge pull request #209 from laf0rge/master
freeDiameter: Fix compilation on Linux without SCTP_SEND_FAILED_EVENT
2019-07-02 15:15:52 +09:00
Harald Welte
6fc412dba7 fix 'no rule to make target "-L/usr/local/lib" compilation errors
When building (at least) on Debian unstable, I get the following type of errors:

make[4]: Entering directory '/space/home/laforge/projects/git/nextepc/lib/base'
make[4]: *** No rule to make target '-L/usr/local/lib', needed by 'libbase.la'.  Stop.

The cause seems to be that some target_DEPENDENCIES includes
@OGSCORE_LIBS@ or @OGSCRYPT_LIBS@, whcih both expand to "-L${libdir}
-lpthread -logscore-1.0" as per the pkg-config files.

I believe DEPENDENCIES should not list external library dependencies,
but only dependencies inside the repository.

Closes: #210
2019-07-02 13:58:40 +08:00
Harald Welte
95091210ff freeDiameter: Fix compilation on Linux without SCTP_SEND_FAILED_EVENT
The fallback to the old SCTP API must be made if either SCTP_SEND_FAILED_EVENT
or SCTP_NOTIFICATIONS_STOPPED_EVENT are undeclared.

This fixes building nextepc on e.g. Debian unstable.

Closes: #208
2019-07-02 13:42:33 +08:00
Sukchan Lee
9abc8575f6 fix the testcase error 2019-07-01 10:00:50 +09:00
Sukchan Lee
3ebe749bb2 Merge branch 'master' of https://github.com/open5gs/nextepc 2019-06-30 22:58:48 +09:00
Sukchan Lee
baa35843fc Update document for v0.4.4 2019-06-30 22:58:30 +09:00
Sukchan Lee
d9e0b0eeaf Release v0.4.4 in Ubuntu(bionic) 2019-06-30 13:24:00 +00:00
Sukchan Lee
6e5ab199af Release v0.4.4 in Ubuntu(xenial) 2019-06-30 13:22:19 +00:00
Romeu Medeiros
825978d2af Revert "Small fix to set correct timezone in UE."
This reverts commit 16aa960b1e.
2019-05-02 11:42:00 -03:00
Medeiros405
16aa960b1e Small fix to set correct timezone in UE. 2018-05-13 00:27:39 -03:00
260 changed files with 10587 additions and 2905 deletions

View File

@@ -119,8 +119,8 @@ if test x$have_srclib == xyes; then
AC_SUBST(OGSCRYPT_CFLAGS, '-I$(top_srcdir)/lib/ogslib/src')
AC_SUBST(OGSCRYPT_LIBS, '$(top_srcdir)/lib/ogslib/src/crypt/libogscrypt-1.0.la')
else
PKG_CHECK_MODULES(OGSCORE, ogscore-1.0 >= 1.0.2)
PKG_CHECK_MODULES(OGSCRYPT, ogscrypt-1.0 >= 1.0.2)
PKG_CHECK_MODULES(OGSCORE, ogscore-1.0 >= 1.1.0)
PKG_CHECK_MODULES(OGSCRYPT, ogscrypt-1.0 >= 1.1.0)
fi
AM_CONDITIONAL([WITH_SRCLIB], [test x$have_srclib = xyes])

60
debian/changelog vendored
View File

@@ -1,3 +1,63 @@
nextepc (0.5.2) unstable; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sun, 11 Aug 2019 11:17:35 +0000
nextepc (0.5.1~xenial) xenial; urgency=medium
* SMSoSG Supported
* Many BUGS Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 30 Jul 2019 22:42:27 +0900
nextepc (0.5.1~bionic) bionic; urgency=medium
* SMSoSG Supported
* Many BUGS Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 30 Jul 2019 22:41:14 +0900
nextepc (0.5.1) unstable; urgency=medium
* SMSoSG Supported
* Many BUGS Fixed
-- Sukchan Lee <acetcom@gmail.com> Tue, 30 Jul 2019 21:34:15 +0900
nextepc (0.5.0-1~bionic) bionic; urgency=medium
* CSFB Supported
* OGSLib package name changed
-- Sukchan Lee <acetcom@gmail.com> Thu, 11 Jul 2019 15:34:08 +0000
nextepc (0.5.0-1~xenial) xenial; urgency=medium
* CSFB Supported
* OGSLib package name changed
-- Sukchan Lee <acetcom@gmail.com> Thu, 11 Jul 2019 15:09:05 +0000
nextepc (0.5.0) unstable; urgency=medium
* CSFB Supported
* OGSLib package name changed
-- Sukchan Lee <acetcom@gmail.com> Thu, 11 Jul 2019 22:26:35 +0900
nextepc (0.4.4~bionic) bionic; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sun, 30 Jun 2019 13:23:15 +0000
nextepc (0.4.4~xenial) xenial; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sun, 30 Jun 2019 13:21:59 +0000
nextepc (0.4.4) unstable; urgency=medium
* Bug Fixed

2
debian/control vendored
View File

@@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 9),
libtool,
flex,
bison,
ogslib-dev (>= 1.0.0),
libogslib-dev (>= 1.2.1),
libgnutls28-dev,
libgcrypt-dev,
libssl-dev,

View File

@@ -8,10 +8,10 @@ MAINTAINER Sukchan Lee <acetcom@gmail.com>
WORKDIR /root
COPY setup.sh /root
ARG USER=acetcom
ARG USER=open5gs
ARG REPO=nextepc
ARG BRANCH=master
RUN git clone https://github.com/$USER/$REPO
RUN git clone --recursive https://github.com/$USER/$REPO
ADD https://api.github.com/repos/$USER/$REPO/git/refs/heads/$BRANCH /root/nextepc-ver.json
RUN cd nextepc && \

View File

@@ -0,0 +1,189 @@
---
title: NextEPC Splitting Network Elements
head_inline: "<style> .blue { color: blue; } </style>"
---
In a production network network elements would typically not all be on the same machine, as is the default example that ships with NextEPC.
NextEPC is designed to be standards compliant, so in theory you can connect any core network element (MME, PGW, SGW, PCRF, HSS) from NextEPC or any other vendor to form a functioning network, so long as they are 3GPP compliant.
To demonstrate this we will cover isolating each network element onto it's on machine and connect each network element to the other. For some interfaces specifying multiple interfaces is supported to allow connection to multiple
In these examples we'll be connecting NextEPC elements together, but it could just as easily be EPC elements from a different vendor in the place of any NextEPC network element.
| Service | IP | Identity |
| ------------- |:-------------:|:-------------:|
| P-GW | 10.0.1.121 | pgw.localdomain |
| S-GW | 10.0.1.122 | |
| PCRF | 10.0.1.123 | pcrf.localdomain |
| MME | 10.0.1.124 | mme.localdomain |
| HSS | 10.0.1.118 | hss.localdomain |
# External P-GW
In it's simplest from the P-GW has 3 interfaces:
* S5 - Connection to home network S-GW (GTP-C)
* Gx - Connection to PCRF (Diameter)
* Sgi - Connection to external network (Generally the Internet via standard TCP/IP)
### S5 Interface Configuration
Edit ```/etc/nextepc/pgw.conf```and change the address to IP of the server running the P-GW for the listener on GTP-C and GTP-U interfaces.
```
pgw:
freeDiameter: pgw.conf
gtpc:
addr:
- 10.0.1.121
gtpu:
addr:
- 10.0.1.121
```
### Gx Interface Configuration
Edit ```/etc/nextepc/freeDiameter/pgwd.conf```
Update ```ListenOn``` address to IP of the server running the P-GW:
``` ListenOn = "10.0.1.121"; ```
Update ConnectPeer to connect to the PCRF on it's IP.
```ConnectPeer = "pcrf.localdomain" { ConnectTo = "10.0.1.123"; No_TLS; };```
### Restart Services
Restart NextEPC PGW Daemon:
``` $ sudo systemctl restart nextepc-pgwd ```
# External S-GW
In it's simplest form the S-GW has 2 interfaces:
* S11 - Connection to MME (GTP-C)
* S5 - Connection to the home network P-GW (GTP-C)
### S5 Interface Configuration
Edit ```/etc/nextepc/sgw.conf```and change the address to IP of the server running the S-GW for the listener on GTP-C interface.
```
sgw:
freeDiameter: pgw.conf
gtpc:
addr:
- 10.0.1.122
```
Restart NextEPC SGW Daemon:
``` $ sudo systemctl restart nextepc-sgwd ```
# External PCRF
In it's simplest from the PCRF has 1 network interface:
* Gx - Connection to P-GW (Diameter)
### Gx Interface Configuration
Edit ```/etc/nextepc/freeDiameter/hss.conf```
Update ```ListenOn``` address to IP of the server running the HSS on it's IP:
``` ListenOn = "10.0.1.123"; ```
Update ConnectPeer to connect to the MME.
```ConnectPeer = "pgw.localdomain" { ConnectTo = "10.0.1.121"; No_TLS; };```
### MongoDB Interface Configuration (NextEPC HSS only)
Edit ```/etc/nextepc/freeDiameter/hss.conf``` and change the ```db_uri:``` to point at the HSS: ```db_uri: mongodb://10.0.1.118/nextepc```
Restart NextEPC PCRF Daemon:
``` $ sudo systemctl restart nextepc-pcrfd ```
# External HSS
In it's simplest form the HSS has 1 network interface:
* S6a - Connection to MME (Diameter)
### S6a Interface Configuration
Edit ```/etc/nextepc/freeDiameter/hss.conf```
Update ```ListenOn``` address to IP of the server running the HSS on it's IP:
``` ListenOn = "10.0.1.118"; ```
Update ConnectPeer to connect to the MME.
```ConnectPeer = "mme.localdomain" { ConnectTo = "10.0.1.124"; No_TLS; };```
Restart NextEPC HSS Daemon:
``` $ sudo systemctl restart nextepc-hssd ```
### MongoDB Interface Configuration (NextEPC specific)
If you are using NextEPC's HSS you may need to enable MongoDB access from the PCRF. This is done by editing ''/etc/mongodb.conf'' and changing the bind IP to:
``` bind_ip = 0.0.0.0 ```
Restart MongoDB for changes to take effect.
``` $ /etc/init.d/mongodb restart ```
# External MME
In it's simplest form the MME has 3 interfaces:
* S1AP - Connections from eNodeBs
* S6a - Connection to HSS (Diameter)
* S11 - Connection to S-GW (GTP-C)
### S11 Interface Configuration
Edit ```/etc/nextepc/mme.conf```, filling the IP address of the S-GW and P-GW servers.
```
sgw:
gtpc:
addr: 10.0.1.122
pgw:
gtpc:
addr:
- 10.0.1.121
```
### S6a Interface Configuration
Edit ```/etc/nextepc/freeDiameter/mme.conf```
Update ```ListenOn``` address to IP of the server running the MME:
``` ListenOn = "10.0.1.124"; ```
Update ConnectPeer to connect to the PCRF on it's IP.
```ConnectPeer = "hss.localdomain" { ConnectTo = "10.0.1.118"; No_TLS; };```
### Restart Services
Restart NextEPC MME Daemon:
``` $ sudo systemctl restart nextepc-mmed ```

View File

@@ -0,0 +1,767 @@
---
title: Setting up Kamailio IMS
head_inline: "<style> .blue { color: blue; } </style>"
---
Setting up Kamailio IMS in OpenStack VM and connecting P-CSCF of Kamailio IMS with PCRF of NextEPC (Running on another OpenStak VM) - Install from deb packages
{: .blue}
#### 1. Start from Bionic Ubuntu cloud image
#### 2. Use the following Cloud init config while spawning an instance
```
#cloud-config
disable_root: 0
ssh_pwauth: True
users:
- name: root
chpasswd:
list: |
root:admin
expire: False
runcmd:
- sed -i -e '/^#PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- systemctl restart sshd
```
This removes all existing cloud users and allows only root user and sets a password
{: .notice--warning}
#### 3. Install following packages
```
$ apt update && apt upgrade -y && apt install -y mysql-server tcpdump screen ntp ntpdate git-core dkms gcc flex bison libmysqlclient-dev make \
libssl-dev libcurl4-openssl-dev libxml2-dev libpcre3-dev bash-completion g++ autoconf rtpproxy libmnl-dev \
libsctp-dev ipsec-tools
```
#### 4. Install all required Kamailio packages (v5.2)
```
$ wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | sudo apt-key add -
$ add-apt-repository 'deb http://deb.kamailio.org/kamailio52 bionic main'
$ apt install -y kamailio kamailio-mysql-modules kamailio-ims-modules kamailio-presence-modules kamailio-tls-modules kamailio-xml-modules kamailio-xmlrpc-modules
```
#### 5. Create necessary folders for kamailio pid files and set ownership
Create the directory for pid file:
```
$ mkdir -p /var/run/kamailio
$ mkdir -p /var/run/kamailio_icscf
$ mkdir -p /var/run/kamailio_pcscf
$ mkdir -p /var/run/kamailio_scscf
```
Default setting is to run Kamailio as user kamailio and group kamailio. For that you need to create the user:
```
$ adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio" \
--home /var/run/kamailio kamailio
$ adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio" \
--home /var/run/kamailio_icscf kamailio
$ adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio" \
--home /var/run/kamailio_pcscf kamailio
$ adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio" \
--home /var/run/kamailio_scscf kamailio
```
Set ownership:
```
$ chown kamailio:kamailio /var/run/kamailio
$ chown kamailio:kamailio /var/run/kamailio_icscf
$ chown kamailio:kamailio /var/run/kamailio_pcscf
$ chown kamailio:kamailio /var/run/kamailio_scscf
```
#### 6. Clone Kamailio repository and checkout 5.2 version of repository
```
$ mkdir -p /usr/local/src/kamailio-5.2
$ cd /usr/local/src/kamailio-5.2/
$ git clone git://git.kamailio.org/kamailio kamailio
$ cd kamailio
$ git checkout -b 5.2 origin/5.2
```
#### 7. Edit /etc/hosts file for hostname resolution
Edit the /etc/hosts file as follows:
In the below example ims-deb is the hostname of the machine, PCRF is running in 10.4.128.11/172.24.15.3 (Floating IP) machine and IMS running at 10.4.128.7/172.24.15.21 (Floating IP)
Notice the change in PCRF address resolution (It should be the machine IP where PCRF is running)
{: .notice--warning}
```
root@ims-deb:~# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 ims-deb
10.4.128.7 hss.mnc096.mcc262.3gppnetwork.org mnc096.mcc262.3gppnetwork.org
10.4.128.7 icscf.mnc096.mcc262.3gppnetwork.org mnc096.mcc262.3gppnetwork.org
10.4.128.7 pcscf.mnc096.mcc262.3gppnetwork.org mnc096.mcc262.3gppnetwork.org
10.4.128.7 scscf.mnc096.mcc262.3gppnetwork.org mnc096.mcc262.3gppnetwork.org
172.24.15.3 pcrf.mnc096.mcc262.3gppnetwork.org mnc096.mcc262.3gppnetwork.org
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
```
After editing the file, save it and reboot the machine
{: .notice--info}
#### 8. Populate MySQL database using kamctlrc command
Edit SIP_DOMAIN and DBENGINE in the /etc/kamailio/kamctlrc configuration file (Used by kamctl and kamdbctl tools).
Set the SIP_DOMAIN to your SIP service domain (or IP address if you don't have a DNS hostname associated with your SIP service).
Set the DBENGINE to be MYSQL and adjust other setting as you want. Finally, uncomment both SIP_DOMAIN and DBENGINE.
In example above, the following values are set for SIP_DOMAIN and DBENGINE
```
SIP_DOMAIN=mnc096.mcc262.3gppnetwork.org
DBENGINE=MYSQL
```
You can change other values in kamctlrc file. Once you are done updating kamctlrc file, run the script to create the database used by Kamailio:
```
$ kamdbctl create
```
When prompted for mysql root user password enter the root password if its is set or else leave it blank i.e. Press Enter
{: .notice--info}
check database manually;
```
$ mysql
<mysql> show databases;
<mysql> use kamailio;
<mysql> show tables;
<mysql> select * from subscriber;
```
No Subscribers are added yet
The kamdbctl will add two users in MySQL user tables:
```
- kamailio - (with default password 'kamailiorw') - user which has full access rights to 'kamailio' database
- kamailioro - (with default password 'kamailioro') - user which has read-only access rights to 'kamailio' database
```
#### 9. Edit /etc/default/rtpproxy file as follows:
```
# Defaults for rtpproxy
# The control socket.
#CONTROL_SOCK="unix:/var/run/rtpproxy/rtpproxy.sock"
# To listen on an UDP socket, uncomment this line:
CONTROL_SOCK=udp:127.0.0.1:22222
# Additional options that are passed to the daemon.
EXTRA_OPTS="-l 172.24.15.21 -d DBUG:LOG_LOCAL0"
```
here, `-l <PUBLIC_IP>`
Then run,
```
$ systemctl restart rtpproxy
```
#### 10. Edit configuration file to fit your requirements for the VoIP platform, you have to edit the /etc/kamailio/kamailio.cfg configuration file
Follow the instruction in the comments to enable usage of MySQL. Basically you have to add several lines at the top of config file, like:
```
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_NAT (Include this if client and/or SIP server is behind a NAT)
(uncomment this line and enter the DNS domain created above)
alias="mnc096.mcc262.3gppnetwork.org"
(uncomment this line, 10.4.128.7 is the internal IP and 172.24.15.21 is the Public/Floating IP)
listen=udp:10.4.128.7:5060 advertise 172.24.15.21:5060
```
Further down, we will need to modify the rtpproxy_sock value to match the CONTROL_SOCK option we set for RTPProxy in /etc/default/rtpproxy
```
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:22222")
```
If you changed the password for the 'kamailio' user of MySQL, you have to update the value for 'DBURL' parameters.
#### 11. Run Kamailio SIP server
```
$ systemctl start kamailio
```
#### 12. A quick check for the basic working of SIP server can be done as follows:
Create new subscriber accounts. A new account can be added using `kamctl` tool via `kamctl add <username> <password>`
(When asked for entering MySQL password for user 'kamailio@localhost': type 'kamailiorw', as provided in kamailio.cfg)
```
$ kamctl add test testpasswd
$ kamctl add test2 testpasswd
```
Setting on OnePlus phones
- Connect to a network through which SIP server is reachable (either Wi-Fi or LTE)
- Goto phone dialer and select the "Settings" in the menu on top right corner
- Then select "Call settings"
- Configure SIP accounts in phones as added above using kamctl:
In Phone 1:
```
Username: test
Password: testpasswd
Server: mnc096.mcc262.3gppnetwork.org (Created DNS Domain Name or IP to which IMS components are bound to, visible interface IP address)
Optional Settings:
Authentication username: test
Outbound proxy address: 172.24.15.21 (Floating IP of VM in case of OpenStack or else no need to fill in case of physical machine)
Transport type: UDP
```
In Phone 2:
```
Username: test2
Password: testpasswd
Server: mnc096.mcc262.3gppnetwork.org (Created DNS Domain Name or IP to which IMS components are bound to, visible interface IP address)
Optional Settings:
Authentication username: test2
Outbound proxy address: 172.24.15.21 (Floating IP of VM in case of OpenStack or else no need to fill in case of physical machine)
Transport type: UDP
```
- Set "Receive incoming calls" option to enabled state in both phones
- Set "Use SIP calling" to "For all calls"
- Add a new contact as follows:
In Phone 1:
Select "more" option
```
Name: SIP Contact test2 (Any arbitary name)
SIP: test2@mnc096.mcc262.3gppnetwork.org (Created DNS Domain Name or IP to which IMS components are bound to, visible interface IP address)
```
Save and exit
In Phone 2:
Select "more" option
```
Name: SIP Contact test (Any arbitary name)
SIP: test@mnc096.mcc262.3gppnetwork.org (Created DNS Domain Name or IP to which IMS components are bound to, visible interface IP address)
```
Save and exit
- Now try calling from either phone
#### 13. Create new mysql database for pcscf, scscf and icscf, populate databases and grant permissions to respective users identified by a password
```
$ mysql
<mysql> CREATE DATABASE `pcscf`;
<mysl> CREATE DATABASE `scscf`;
<mysl> CREATE DATABASE `icscf`;
```
In all of the below steps, when prompted for mysql root user password, leave it blank i.e. Press Enter
```
$ cd /usr/local/src/kamailio-5.2/kamailio/utils/kamctl/mysql
$ mysql -u root -p pcscf < standard-create.sql
$ mysql -u root -p pcscf < presence-create.sql
$ mysql -u root -p pcscf < ims_usrloc_pcscf-create.sql
$ mysql -u root -p pcscf < ims_dialog-create.sql
$ mysql -u root -p scscf < standard-create.sql
$ mysql -u root -p scscf < presence-create.sql
$ mysql -u root -p scscf < ims_usrloc_scscf-create.sql
$ mysql -u root -p scscf < ims_dialog-create.sql
$ mysql -u root -p scscf < ims_charging_create.sql
$ cd /usr/local/src/kamailio-5.2/kamailio/misc/examples/ims/icscf
$ mysql -u root -p icscf < icscf.sql
```
Verify that following tables are present in respective databases by logging into mysql
```
+-----------------+
| Tables_in_pcscf |
+-----------------+
| active_watchers |
| dialog_in |
| dialog_out |
| dialog_vars |
| location |
| presentity |
| pua |
| version |
| watchers |
| xcap |
+-----------------+
+-----------------+
| Tables_in_scscf |
+-----------------+
| active_watchers |
| contact |
| dialog_in |
| dialog_out |
| dialog_vars |
| impu |
| impu_contact |
| impu_subscriber |
| presentity |
| pua |
| ro_session |
| subscriber |
| version |
| watchers |
| xcap |
+-----------------+
+---------------------+
| Tables_in_icscf |
+---------------------+
| nds_trusted_domains |
| s_cscf |
| s_cscf_capabilities |
+---------------------+
```
```
<mysql> grant delete,insert,select,update on pcscf.* to pcscf@localhost identified by 'heslo';
<mysql> grant delete,insert,select,update on scscf.* to scscf@localhost identified by 'heslo';
<mysl> grant delete,insert,select,update on icscf.* to icscf@localhost identified by 'heslo';
<mysl> grant delete,insert,select,update on icscf.* to provisioning@localhost identified by 'provi';
```
#### 14. Copy pcscf, icscf and scscf configuration files to /etc/ folder and edit accordingly
```
$ cd /usr/local/src/kamailio-5.2/kamailio/misc/examples/ims/
$ cp -r icscf/ /etc/kamailio_icscf
$ cp -r pcscf/ /etc/kamailio_pcscf
$ cp -r scscf/ /etc/kamailio_scscf
```
Rename files in these folder kamailio_pcscf, kamailio_icscf and kamailio_scscf by removing .sample part from the configuration files.
And, rename kamailio.cfg in respective folder as follows: kamailio_pcscf.cfg, kamailio_icscf.cfg and kamailio_scscf.cfg
Edit the configuration files as per your deployment needs
### I-CSCF
Changes required in icscf.cfg:
```
# SIP / UDP
listen=udp:10.4.128.7:4060
alias=icscf.mnc096.mcc262.3gppnetwork.org
#!define NETWORKNAME "mnc096.mcc262.3gppnetwork.org"
#!define HOSTNAME "icscf.mnc096.mcc262.3gppnetwork.org"
#!define DB_URL "mysql://icscf:heslo@localhost/icscf"
```
Changes required in icscf.xml:
```
FQDN="icscf.mnc096.mcc262.3gppnetwork.org"
Realm="mnc096.mcc262.3gppnetwork.org"
<Peer FQDN="hss.mnc096.mcc262.3gppnetwork.org" Realm="mnc096.mcc262.3gppnetwork.org" port="3868"/>
<Acceptor port="3869" bind="10.4.128.7"/>
<DefaultRoute FQDN="hss.mnc096.mcc262.3gppnetwork.org" metric="10"/>
```
Changes required in kamailio_icscf.cfg:
```
# ------------------ module loading ----------------------------------
mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/:/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/:/usr/lib/x86_64-linux-gnu/kamailio/modules/"
```
To perform a quick test edit the /etc/default/kamailio file, by changing the configuration file parameter as follows:
```
# Config file
CFGFILE=/etc/kamailio_icscf/kamailio_icscf.cfg
```
After altering the above file, execute below command
```
$ systemctl restart kamailio.service
```
And, check that there are no error by viewing logs using the below command
```
$ journalctl -f --unit kamailio
```
### P-CSCF
Edit the DNS domain names, DB URL and IP addresses at all places in the pcscf.cfg, pcscf.xml files accordingly
Changes required in pcscf.cfg:
```
# SIP / UDP
listen=udp:10.4.128.7:5060
#!define IPSEC_LISTEN_ADDR "10.4.128.7"
alias=pcscf.mnc096.mcc262.3gppnetwork.org
#!define PCSCF_URL "sip:pcscf.mnc096.mcc262.3gppnetwork.org"
#!subst "/NETWORKNAME/mnc096.mcc262.3gppnetwork.org/"
#!subst "/HOSTNAME/pcscf.mnc096.mcc262.3gppnetwork.org/"
#!define DB_URL "mysql://pcscf:heslo@localhost/pcscf"
#!define SQLOPS_DBURL "pcscf=>mysql://pcscf:heslo@localhost/pcscf"
##!define TRF_FUNCTION "trf.mnc096.mcc262.3gppnetwork.org"
#!define WITH_RX
#!define WITH_RX_REG
#!define WITH_RX_CALL
#!define WITH_IPSEC
```
Changes required in pcscf.xml:
```
FQDN="pcscf.mnc096.mcc262.3gppnetwork.org"
Realm="mnc096.mcc262.3gppnetwork.org"
<Peer FQDN="pcrf.mnc096.mcc262.3gppnetwork.org" Realm="mnc096.mcc262.3gppnetwork.org" port="3868"/>
<Acceptor port="3871" bind="10.4.128.7"/>
<DefaultRoute FQDN="pcrf.mnc096.mcc262.3gppnetwork.org" metric="10"/>
```
Changes required in kamailio_pcscf.cfg:
```
# ------------------ module loading ----------------------------------
mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/:/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/:/usr/lib/x86_64-linux-gnu/kamailio/modules/"
# AVP's required for Fail-Over-Support:
#modparam("dispatcher", "dst_avp", "$avp(DISPATCHER_DST_AVP)")
#modparam("dispatcher", "grp_avp", "$avp(DISPATCHER_GRP_AVP)")
#modparam("dispatcher", "cnt_avp", "$avp(DISPATCHER_CNT_AVP)")
#modparam("dispatcher", "sock_avp", "$avp(DISPATCHER_SOCK_AVP)")
#modparam("ims_usrloc_pcscf", "hashing_type", 2)
```
Changes required in dispatcher.list:
```
# SBC's
2 sip:10.4.128.7:5070
```
To perform a quick test edit the /etc/default/kamailio file, by changing the configuration file parameter as follows:
```
# Config file
CFGFILE=/etc/kamailio_pcscf/kamailio_pcscf.cfg
```
After altering the above file, execute below command
```
$ systemctl restart kamailio.service
```
And, check that there are no error by viewing logs using the below command (Ignore the rtpengine related for now, as we will install in next step)
```
$ journalctl -f --unit kamailio
```
### S-CSCF
Edit the DNS domain names, DB URL and IP addresses at all places in the scscf.cfg, scscf.xml files accordingly
Changes required in scscf.cfg:
```
# SIP / UDP
listen=udp:10.4.128.7:6060
#!define NETWORKNAME "mnc096.mcc262.3gppnetwork.org"
#!define HOSTNAME "scscf.mnc096.mcc262.3gppnetwork.org"
#!define URI "sip:scscf.mnc096.mcc262.3gppnetwork.org:6060"
alias=scscf.mnc096.mcc262.3gppnetwork.org
# ENUM-Server to query:
#!define ENUM_SUFFIX "mnc096.mcc262.3gppnetwork.org."
#!define DB_URL "mysql://scscf:heslo@localhost/scscf"
#!define RO_MNC "96"
```
Changes required in scscf.xml:
```
FQDN="scscf.mnc096.mcc262.3gppnetwork.org"
Realm="mnc096.mcc262.3gppnetwork.org"
<Peer FQDN="hss.mnc096.mcc262.3gppnetwork.org" Realm="mnc096.mcc262.3gppnetwork.org" port="3868"/>
<Acceptor port="3870" bind="10.4.128.7"/>
<DefaultRoute FQDN="hss.mnc096.mcc262.3gppnetwork.org" metric="10"/>
```
Changes required in kamailio_scscf.cfg:
```
# ------------------ module loading ----------------------------------
mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/:/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/:/usr/lib/x86_64-linux-gnu/kamailio/modules/"
# AVP's required for Fail-Over-Support:
#modparam("dispatcher", "dst_avp", "$avp(DISPATCHER_DST_AVP)")
#modparam("dispatcher", "grp_avp", "$avp(DISPATCHER_GRP_AVP)")
#modparam("dispatcher", "cnt_avp", "$avp(DISPATCHER_CNT_AVP)")
#modparam("dispatcher", "sock_avp", "$avp(DISPATCHER_SOCK_AVP)")
```
Changes required in dispatcher.list: Not sure what to do hence comment out as follows
```
# ng-voice Interconnect
#1 sip:sbc-1.ng-voice.com
#1 sip:sbc-2.ng-voice.com
```
To perform a quick test edit the /etc/default/kamailio file, by changing the configuration file parameter as follows:
```
# Config file
CFGFILE=/etc/kamailio_scscf/kamailio_scscf.cfg
```
After altering the above file, execute below command
```
$ systemctl restart kamailio.service
```
And, check that there are no error by viewing logs using the below command
```
$ journalctl -f --unit kamailio
```
Can run S-CSCF as follows: `kamailio -f kamailio_scscf.cfg`
#### 15. Install RTPEngine
Check for dependencies, install dependencies and build .deb packages
```
$ export DEB_BUILD_PROFILES="pkg.ngcp-rtpengine.nobcg729"
$ apt install dpkg-dev
$ git clone https://github.com/sipwise/rtpengine
$ cd rtpengine && git checkout mr7.4.1
$ dpkg-checkbuilddeps
```
The above command checks for dependencies and give you a list of dependencies which are missing in the system. The below list is the result of this command
```
$ apt install debhelper default-libmysqlclient-dev gperf iptables-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbencode-perl libcrypt-openssl-rsa-perl libcrypt-rijndael-perl libdigest-crc-perl libdigest-hmac-perl libevent-dev libhiredis-dev libio-multiplex-perl libio-socket-inet6-perl libiptc-dev libjson-glib-dev libnet-interface-perl libpcap0.8-dev libsocket6-perl libspandsp-dev libswresample-dev libsystemd-dev libxmlrpc-core-c3-dev markdown dkms module-assistant keyutils libnfsidmap2 libtirpc1 nfs-common rpcbind
```
After installing dependencies run the below command again and verify that no dependencies are left out
```
$ dpkg-checkbuilddeps
```
This should just return back to shell with no output if all depedencies are met
```
$ dpkg-buildpackage -uc -us
$ cd ..
$ dpkg -i *.deb
$ cp /etc/rtpengine/rtpengine.sample.conf /etc/rtpengine/rtpengine.conf
```
Edit this file as follows under "[rtpengine]":
```
interface = 10.4.128.7!172.24.15.21
```
Port on which rtpengine binds i.e. listen_ng parameter is udp port 2223. This should be updated in kamailio_pcscf.cfg file at modparam(rtpengine ...
```
# ----- rtpproxy params -----
modparam("rtpengine", "rtpengine_sock", "1 == udp:localhost:2223")
```
```
$ cp /etc/rtpengine/rtpengine-recording.sample.conf /etc/rtpengine/rtpengine-recording.conf
$ mkdir /var/spool/rtpengine
$ systemctl restart ngcp-rtpengine-daemon.service ngcp-rtpengine-recording-daemon.service ngcp-rtpengine-recording-nfs-mount.service
$ systemctl enable ngcp-rtpengine-daemon.service ngcp-rtpengine-recording-daemon.service ngcp-rtpengine-recording-nfs-mount.service
$ systemctl stop rtpproxy
$ systemctl disable rtpproxy
$ systemctl mask rtpproxy
```
#### 16. Running I-CSCF, P-CSCF and S-CSCF as separate systemctl process
First, stop the default kamailio SIP server
```
$ systemctl stop kamailio
$ systemctl disable kamailio
$ systemctl mask kamailio
```
Copy the init file each of the process you need
```
$ cp /etc/init.d/kamailio /etc/init.d/kamailio_icscf
$ cp /etc/init.d/kamailio /etc/init.d/kamailio_pcscf
$ cp /etc/init.d/kamailio /etc/init.d/kamailio_scscf
```
Changes required in /etc/init.d/kamailio_icscf
```
NAME="kamailio_icscf"
CFGFILE=/etc/$NAME/kamailio_icscf.cfg
```
Changes required in /etc/init.d/kamailio_pcscf
```
NAME="kamailio_pcscf"
CFGFILE=/etc/$NAME/kamailio_pcscf.cfg
```
Changes required in /etc/init.d/kamailio_scscf
```
NAME="kamailio_scscf"
CFGFILE=/etc/$NAME/kamailio_scscf.cfg
```
```
$ cd /etc/default/
$ cp kamailio kamailio_icscf
$ cp kamailio kamailio_pcscf
$ cp kamailio kamailio_scscf
```
Changes required in /etc/default/kamailio_icscf
```
CFGFILE=/etc/kamailio_icscf/kamailio_icscf.cfg
RUN_KAMAILIO=yes
```
Changes required in /etc/default/kamailio_pcscf
```
CFGFILE=/etc/kamailio_pcscf/kamailio_pcscf.cfg
RUN_KAMAILIO=yes
```
Changes required in /etc/default/kamailio_scscf
```
CFGFILE=/etc/kamailio_scscf/kamailio_scscf.cfg
RUN_KAMAILIO=yes
```
Finally,
```
$ systemctl start kamailio_icscf kamailio_pcscf kamailio_scscf
```
#### 17. Ensure NextEPC PCRF of the Core Network is configured to use IMS
In nextepc.conf, add the floating IP of the VM running P-CSCF as shown below
```
pcscf:
- 172.24.15.21
```
And, make sure to run NextEPC with Realm as created above "mnc096.mcc262.3gppnetwork.org" so that when a connection request from P-SCSF to PCRF with a FQDN pcrf.mnc096.mcc262.3gppnetwork.org it should be resolved as localhost of the NextEPC machine
{: .notice--warning}
- To change Realm in All-in-One NextEPC configuration
```
$ cd ~/nextepc/install/etc/nextepc/freediameter
```
- And, change all the configuration files in freediameter folder (hss.conf, mme.conf, pcrf.conf, pgw.conf) to have desired Domain Name
- Copy make_certs.sh from ~/nextepc/support/freeDiameter/ to ~/nextepc/install/etc/nextepc/freediameter
- Modify Domain Names in make_certs.sh and Generate the certificates using make_certs.sh
- Insert additional "ConnectPeer" entry in ~/nextepc/install/etc/nextepc/freediameter/pcrf.conf to connect to P-CSCF as show below
```
ConnectPeer = "pcscf.mnc096.mcc262.3gppnetwork.org" { ConnectTo = "172.24.15.21"; Port=3871; No_TLS; NO_SCTP; };
```

View File

@@ -15,7 +15,8 @@ NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Co
- Multiple PDN support
- S1/X2 Handover
- IPv6 support
- Supports several IMS servers with Rx interface.
- CSFB(Circuit Switched Fall Back) and SMSoS(SMS Over SGs)
- VoLTE(Voice over LTE)
#### Known Limitations
---
@@ -23,7 +24,7 @@ NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Co
- No OCS/OFCS
- No NB-IoT
- No eMBMS
- No CS Fallback and SRVCC
- No SRVCC
- No Roaming
- No Emergency Call
- No ePDG Gateway

View File

@@ -8,6 +8,8 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
- User's Guide
- [Quickstart](guide/01-quickstart)
- [Building nextepc from Sources](guide/02-building-nextepc-from-sources)
- [Splitting Network Elements](guide/03-splitting-network-elements)
- [Setting up Kamailio IMS](guide/04-setting-up-kamailio-IMS)
- Tutorials
- [Your First LTE](tutorial/01-your-first-lte)

View File

@@ -1,5 +1,5 @@
---
title: "v0.4.3 - Stable version of v0.4.x"
title: "v0.4.3 - Enable SCTP_NODELAY"
date: 2019-06-22 16:42:00 +0900
categories:
- Release

View File

@@ -0,0 +1,22 @@
---
title: "v0.4.4 - The Multiple Attachment for same IMSI"
date: 2019-06-30 22:48:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### Bug fixes
- Move enb_ostream_id from mme_ue to enb_ue context ([#206](https://github.com/open5gs/nextepc/issues/206)) -- [lezixiao](https://github.com/lezixiao)
- Fix the MME crash EMM status following Initial Context Setup Response ([#205](https://github.com/open5gs/nextepc/issues/205)) -- [lezixiao](https://github.com/lezixiao)
- Fix the SGW crash for "Context Not Found" ([#204](https://github.com/open5gs/nextepc/issues/204)) -- [lezixiao](https://github.com/lezixiao)
- Fix the Multiple Attachment for same IMSI ([#203](https://github.com/open5gs/nextepc/issues/203)) -- [lezixiao](https://github.com/lezixiao)
- Add Handler of the Service Request and TAU Request in Security-mode state ([#202](https://github.com/open5gs/nextepc/issues/202)) -- [lezixiao](https://github.com/lezixiao)
- Fix Service reject handler ([#201](https://github.com/open5gs/nextepc/issues/201)) -- [lezixiao](https://github.com/lezixiao)
- Clear resources when SCTP-send failed ([#200](https://github.com/open5gs/nextepc/issues/200)) -- [lezixiao](https://github.com/lezixiao)
Download -- [v0.4.4.tar.gz](https://github.com/open5gs/nextepc/archive/v0.4.4.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,27 @@
---
title: "v0.5.0 - CS Fallback Supported"
date: 2019-07-12 00:17:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### New Features
- CS Fallback Supported
#### Enhancements
- package naming doesn't follow usual package naming conventions ([OGSLIB-#1](https://github.com/open5gs/ogslib/issues/1)) -- [laf0rge](https://github.com/laf0rge)
#### Standard Compliant
- Missing mandatory IE in GTPv2 ([#215](https://github.com/open5gs/nextepc/issues/215)) -- [tasai511](https://github.com/tasai511)
#### Bug fixes
- Fix Security Command Reject ([#214](https://github.com/open5gs/nextepc/issues/214)) -- [lezixiao](https://github.com/lezixiao)
- docker-compose build fails, missing ogslib-dev ([#211](https://github.com/open5gs/nextepc/issues/211)) -- [mrlnc](https://github.com/mrlnc)
- freeDiameter: Fix compilation of SCTP_SEND_FAILED_EVENT ([#211](https://github.com/open5gs/nextepc/pull/211)) -- [laf0rge](https://github.com/laf0rge)
Download -- [v0.5.0.tar.gz](https://github.com/open5gs/nextepc/archive/v0.5.0.tar.gz)
{: .notice--info}

View File

@@ -0,0 +1,122 @@
---
title: "v0.5.1 - SMS over SG Supported"
date: 2019-07-30 22:20:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### New Features
- SMS over SG Support
#### Solving the CS Fallback Issue
- CS Fallback Configuration Changes ([#224](https://github.com/open5gs/nextepc/issues/224), [#225](https://github.com/open5gs/nextepc/issues/225), [#231](https://github.com/open5gs/nextepc/issues/231)) -- [medeiros405](https://github.com/medeiros405)
1. Single MSC/VLR(127.0.0.2)
```
sgsap:
addr: 127.0.0.2
map:
tai:
plmn_id:
mcc: 001
mnc: 01
tac: 4130
lai:
plmn_id:
mcc: 001
mnc: 01
lac: 43690
map:
tai:
plmn_id:
mcc: 002
mnc: 02
tac: 4132
lai:
plmn_id:
mcc: 002
mnc: 02
lac: 43692
```
2. Multiple MSC/VLR
```
sgsap:
- addr: 127.0.0.2
port: 29119
map:
tai:
plmn_id:
mcc: 001
mnc: 01
tac: 4131
lai:
plmn_id:
mcc: 001
mnc: 01
lac: 43691
map:
tai:
plmn_id:
mcc: 002
mnc: 02
tac: 4132
lai:
plmn_id:
mcc: 002
mnc: 02
lac: 43692
- addr
- 127.0.0.3
- fe80::2%lo
map:
tai:
plmn_id:
mcc: 001
mnc: 01
tac: 4132
lai:
plmn_id:
mcc: 002
mnc: 02
lac: 43692
- name: msc.open5gs.org
map:
tai:
plmn_id:
mcc: 001
mnc: 01
tac: 4133
lai:
plmn_id:
mcc: 002
mnc: 02
lac: 43693
```
- UEContextModifcationRequest does not have both CSFallbackIndicator and SecurityCapabilities ([#223](https://github.com/open5gs/nextepc/pull/223)) -- [medeiros405](https://github.com/medeiros405)
- NextEPC crash in MT-Fallback with fixing the BUG of ogs_realloc() ([ogslib:#4](https://github.com/open5gs/ogslib/issues/4))
- Add Paging Reject
#### Enhancements
- Fix Diameter spec-compliant related issue ([#240](https://github.com/open5gs/nextepc/pull/240)) -- [laf0rge](https://github.com/laf0rge)
- Prefer to use SCTP in Diameter ([#235](https://github.com/open5gs/nextepc/pull/235)) -- [laf0rge](https://github.com/laf0rge)
- Set Diameter SCTP PPID to 46 ([#234](https://github.com/open5gs/nextepc/issues/234)) -- [laf0rge](https://github.com/laf0rge)
- MME protects SecurityModeComplete that is not integrity ([#226](https://github.com/open5gs/nextepc/issues/226)) -- [laf0rge](https://github.com/laf0rge)
- Add Guard timer in EMM state machine ([#220](https://github.com/open5gs/nextepc/pull/220)) -- [laf0rge](https://github.com/laf0rge)
- mme-kdf: Ensure input arguments(kasme, ..) are read-only and 'const' ([#230](https://github.com/open5gs/nextepc/pull/230)) -- [laf0rge](https://github.com/laf0rge)
#### Bug fixes
- Fix the problem of releasing Dedicated Bearer ([#180](https://github.com/open5gs/nextepc/issues/180)) -- [lezixiao](https://github.com/lezixiao)
- Fix the MME crash if UE indicates only EIA0 ([#222](https://github.com/open5gs/nextepc/pull/222)) -- [laf0rge](https://github.com/laf0rge)
- Sending ErrorIndication if S1AP decoding is failed ([#218](https://github.com/open5gs/nextepc/pull/218), [#219](https://github.com/open5gs/nextepc/pull/219)) -- [laf0rge](https://github.com/laf0rge)
Download -- [v0.5.1.tar.gz](https://github.com/open5gs/nextepc/archive/v0.5.1.tar.gz)
{: .notice--info}

View File

@@ -10,7 +10,7 @@
#
PACKAGE="nextepc"
VERSION="0.4.3"
VERSION="0.5.1"
print_status() {
echo

View File

@@ -1132,7 +1132,6 @@ libasn1c_la_SOURCES= \
$(NULL)
libasn1c_la_DEPENDENCIES = \
@OGSCORE_LIBS@ \
$(top_srcdir)/lib/base/libbase.la \
$(NULL)

View File

@@ -35,9 +35,9 @@ int s1ap_decode_pdu(s1ap_message_t *message, ogs_pkbuf_t *pkbuf)
dec_ret = aper_decode(NULL, &asn_DEF_S1AP_S1AP_PDU, (void **)&message,
pkbuf->data, pkbuf->len, 0, 0);
if (dec_ret.code != RC_OK)
{
ogs_error("Failed to decode S1AP-PDU[%d]", dec_ret.code);
if (dec_ret.code != RC_OK) {
ogs_warn("Failed to decode S1AP-PDU[code:%d,consumed:%d]",
dec_ret.code, dec_ret.consumed);
return OGS_ERROR;
}

View File

@@ -35,7 +35,7 @@ extern "C" {
ogs_assert((__dATA)); \
if ((__dATA)->buf) \
{ \
ogs_free((__dATA)->buf); \
FREEMEM((__dATA)->buf); \
(__dATA)->buf = NULL; \
(__dATA)->size = 0; \
} \
@@ -47,7 +47,7 @@ extern "C" {
ogs_assert((__dST)); \
S1AP_CLEAR_DATA(__dST); \
(__dST)->size = (__sRC)->size; \
(__dST)->buf = ogs_calloc((__dST)->size, sizeof(uint8_t)); \
(__dST)->buf = CALLOC((__dST)->size, sizeof(uint8_t)); \
memcpy((__dST)->buf, (__sRC)->buf, (__dST)->size); \
} while(0)

View File

@@ -9,7 +9,6 @@ libbase_la_SOURCES = \
$(NULL)
libbase_la_DEPENDENCIES = \
@OGSCORE_LIBS@ \
$(NULL)
libbase_la_LIBADD = \

View File

@@ -97,7 +97,7 @@ int fqdn_parse(char *dst, char *src, int length)
dst[j++] = '.';
else
dst[j] = 0;
} while(i < length);
} while (i < length);
return j;
}

View File

@@ -60,6 +60,7 @@ extern "C" {
#define MAX_APN_LEN 100
#define MAX_PCO_LEN 251
#define MAX_FILEPATH_LEN 256
#define MAX_FQDN_LEN 256
#define NEXT_ID(__id, __min, __max) \
((__id) = ((__id) == (__max) ? (__min) : ((__id) + 1)))
@@ -324,7 +325,7 @@ typedef struct pco_id_s {
void *data;
} pco_id_t;
#define MAX_NUM_OF_PROTOCOL_OR_CONTAINER_ID 8
#define MAX_NUM_OF_PROTOCOL_OR_CONTAINER_ID 16
typedef struct pco_s {
ED3(uint8_t ext:1;,
uint8_t spare:4;,

View File

@@ -32,7 +32,6 @@ libfd_la_SOURCES = \
$(NULL)
libfd_la_DEPENDENCIES = \
@OGSCORE_LIBS@ \
$(top_srcdir)/lib/@FREEDIAMETER_DIR@/libfdcore/libfdcore.la \
$(top_srcdir)/lib/@FREEDIAMETER_DIR@/libfdproto/libfdproto.la \
$(top_srcdir)/lib/base/libbase.la \

View File

@@ -77,8 +77,8 @@ static int fd_config_apply(fd_config_t *fd_config)
memset(&fddpi, 0, sizeof(fddpi));
fddpi.config.pic_flags.persist = PI_PRST_ALWAYS;
fddpi.config.pic_flags.pro3 = PI_P3_IP;
fddpi.config.pic_flags.pro4 = PI_P4_TCP;
fddpi.config.pic_flags.alg = PI_ALGPREF_TCP;
fddpi.config.pic_flags.pro4 = PI_P4_DEFAULT;
fddpi.config.pic_flags.alg = PI_ALGPREF_SCTP;
fddpi.config.pic_flags.sec |= PI_SEC_NONE;
fddpi.config.pic_port = fd_config->conn[i].port;

View File

@@ -58,7 +58,9 @@ typedef struct _s6a_subscription_data_t {
uint32_t network_access_mode;
bitrate_t ambr; /* UE-AMBR */
uint32_t subscribed_rau_tau_timer; /* unit : minutes */
#define HSS_RAU_TAU_DEFAULT_TIME (12*60) /* 12 min */
uint32_t subscribed_rau_tau_timer; /* unit : seconds */
uint32_t context_identifier; /* default APN */
pdn_t pdn[MAX_NUM_OF_SESS];

View File

@@ -70,6 +70,18 @@ LT_INIT([dlopen pic-only disable-static])
dnl Checks for compile flag
dnl AX_CHECK_COMPILE_FLAG([-Wno-format-truncation],[CFLAGS="$CFLAGS -Wno-format-truncation"])
if test "x$LEX" != "xflex"; then
AC_MSG_ERROR([flex program is needed to build freeDiameter, please install flex.])
fi
if test "x$YACC" = "xyacc"; then
# AC_PROG_YACC only checks for yacc replacements, not for yacc itself
AC_CHECK_PROG([YACC_FOUND], [yacc], [yes], [no])
if test "x$YACC_FOUND" = "xno"; then
AC_MSG_ERROR([A yacc program is needed to build freeDiameter, please install bison.])
fi
fi
dnl Check Endian
AC_C_BIGENDIAN

View File

@@ -48,7 +48,8 @@
/* #define OLD_SCTP_SOCKET_API */
/* Automatically fallback to old API if some of the new symbols are not defined */
#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO)))
#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO)) || \
(!defined(SCTP_SEND_FAILED_EVENT)) || (!defined(SCTP_NOTIFICATIONS_STOPPED_EVENT)) )
# define OLD_SCTP_SOCKET_API
#endif
@@ -1100,10 +1101,12 @@ ssize_t fd_sctp_sendstrv(struct cnxctx * conn, uint16_t strid, const struct iove
hdr->cmsg_type = SCTP_SNDRCV;
sndrcv = (struct sctp_sndrcvinfo *)CMSG_DATA(hdr);
sndrcv->sinfo_stream = strid;
sndrcv->sinfo_ppid = htonl(46);
#else /* OLD_SCTP_SOCKET_API */
hdr->cmsg_type = SCTP_SNDINFO;
sndinf = (struct sctp_sndinfo *)CMSG_DATA(hdr);
sndinf->snd_sid = strid;
sndinf->snd_ppid = htonl(46);
#endif /* OLD_SCTP_SOCKET_API */
/* note : we could store other data also, for example in .sinfo_ppid for remote peer or in .sinfo_context for errors. */

View File

@@ -25,7 +25,6 @@ libgtp_la_SOURCES = \
$(NULL)
libgtp_la_DEPENDENCIES = \
@OGSCORE_LIBS@ \
$(top_srcdir)/lib/base/libbase.la \
$(NULL)

View File

@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by gtp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-06-11 17:35:40.953361 by acetcom
* Created on: 2019-07-06 22:50:27.017552 by acetcom
* from 29274-d80.docx
******************************************************************************/

View File

@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by gtp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-06-11 17:35:40.936758 by acetcom
* Created on: 2019-07-06 22:50:27.011335 by acetcom
* from 29274-d80.docx
******************************************************************************/

View File

@@ -183,42 +183,36 @@ int gtp_xact_update_tx(gtp_xact_t *xact,
OGS_PORT(&xact->gnode->conn));
stage = gtp_xact_get_stage(hdesc->type, xact->xid);
if (xact->org == GTP_LOCAL_ORIGINATOR)
{
switch(stage)
{
case GTP_XACT_INITIAL_STAGE:
ogs_assert(xact->step == 0);
break;
if (xact->org == GTP_LOCAL_ORIGINATOR) {
switch (stage) {
case GTP_XACT_INITIAL_STAGE:
ogs_assert(xact->step == 0);
break;
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert_if_reached();
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert_if_reached();
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2);
break;
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2);
break;
default:
ogs_assert_if_reached();
default:
ogs_assert_if_reached();
}
}
else if (xact->org == GTP_REMOTE_ORIGINATOR)
{
switch(stage)
{
case GTP_XACT_INITIAL_STAGE:
ogs_assert_if_reached();
} else if (xact->org == GTP_REMOTE_ORIGINATOR) {
switch (stage) {
case GTP_XACT_INITIAL_STAGE:
ogs_assert_if_reached();
case GTP_XACT_INTERMEDIATE_STAGE:
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 1);
break;
case GTP_XACT_INTERMEDIATE_STAGE:
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 1);
break;
default:
ogs_assert_if_reached();
default:
ogs_assert_if_reached();
}
}
else
} else
ogs_assert_if_reached();
@@ -258,138 +252,124 @@ int gtp_xact_update_rx(gtp_xact_t *xact, uint8_t type)
OGS_PORT(&xact->gnode->conn));
stage = gtp_xact_get_stage(type, xact->xid);
if (xact->org == GTP_LOCAL_ORIGINATOR)
{
switch(stage)
{
case GTP_XACT_INITIAL_STAGE:
ogs_assert_if_reached();
if (xact->org == GTP_LOCAL_ORIGINATOR) {
switch (stage) {
case GTP_XACT_INITIAL_STAGE:
ogs_assert_if_reached();
case GTP_XACT_INTERMEDIATE_STAGE:
if (xact->seq[1].type == type)
{
ogs_pkbuf_t *pkbuf = NULL;
case GTP_XACT_INTERMEDIATE_STAGE:
if (xact->seq[1].type == type) {
ogs_pkbuf_t *pkbuf = NULL;
ogs_assert(xact->step == 2 || xact->step == 3);
ogs_assert(xact->step == 2 || xact->step == 3);
pkbuf = xact->seq[2].pkbuf;
if (pkbuf)
{
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
pkbuf = xact->seq[2].pkbuf;
if (pkbuf) {
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
ogs_warn("[%d] %s Request Duplicated. Retransmit!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
rv = gtp_sendto(xact->gnode, pkbuf);
ogs_assert(rv == OGS_OK);
}
else
{
ogs_warn("[%d] %s Request Duplicated. Discard!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
}
return OGS_RETRY;
ogs_warn("[%d] %s Request Duplicated. Retransmit!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
rv = gtp_sendto(xact->gnode, pkbuf);
ogs_assert(rv == OGS_OK);
} else {
ogs_warn("[%d] %s Request Duplicated. Discard!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
}
ogs_assert(xact->step == 1);
return OGS_RETRY;
}
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
ogs_assert(xact->step == 1);
break;
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 1);
break;
break;
default:
ogs_assert_if_reached();
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 1);
break;
default:
ogs_assert_if_reached();
}
}
else if (xact->org == GTP_REMOTE_ORIGINATOR)
{
switch(stage)
{
case GTP_XACT_INITIAL_STAGE:
if (xact->seq[0].type == type)
{
ogs_pkbuf_t *pkbuf = NULL;
} else if (xact->org == GTP_REMOTE_ORIGINATOR) {
switch (stage) {
case GTP_XACT_INITIAL_STAGE:
if (xact->seq[0].type == type) {
ogs_pkbuf_t *pkbuf = NULL;
ogs_assert(xact->step == 1 || xact->step == 2);
ogs_assert(xact->step == 1 || xact->step == 2);
pkbuf = xact->seq[1].pkbuf;
if (pkbuf)
{
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
pkbuf = xact->seq[1].pkbuf;
if (pkbuf) {
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
ogs_warn("[%d] %s Request Duplicated. Retransmit!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
rv = gtp_sendto(xact->gnode, pkbuf);
ogs_assert(rv == OGS_OK);
}
else
{
ogs_warn("[%d] %s Request Duplicated. Discard!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
}
return OGS_RETRY;
ogs_warn("[%d] %s Request Duplicated. Retransmit!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
rv = gtp_sendto(xact->gnode, pkbuf);
ogs_assert(rv == OGS_OK);
} else {
ogs_warn("[%d] %s Request Duplicated. Discard!"
" for step %d type %d peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
OGS_ADDR(&xact->gnode->conn,
buf),
OGS_PORT(&xact->gnode->conn));
}
ogs_assert(xact->step == 0);
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
return OGS_RETRY;
}
break;
ogs_assert(xact->step == 0);
if (xact->tm_holding)
ogs_timer_start(
xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert_if_reached();
break;
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2);
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert_if_reached();
/* continue */
break;
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2);
default:
ogs_assert_if_reached();
/* continue */
break;
default:
ogs_assert_if_reached();
}
}
else
} else
ogs_assert_if_reached();
if (xact->tm_response)
@@ -426,68 +406,58 @@ int gtp_xact_commit(gtp_xact_t *xact)
type = xact->seq[xact->step-1].type;
stage = gtp_xact_get_stage(type, xact->xid);
if (xact->org == GTP_LOCAL_ORIGINATOR)
{
switch(stage)
{
case GTP_XACT_INITIAL_STAGE:
{
ogs_assert(xact->step == 1);
if (xact->org == GTP_LOCAL_ORIGINATOR) {
switch (stage) {
case GTP_XACT_INITIAL_STAGE:
ogs_assert(xact->step == 1);
if (xact->tm_response)
ogs_timer_start(
xact->tm_response, GTP_T3_RESPONSE_DURATION);
if (xact->tm_response)
ogs_timer_start(
xact->tm_response, GTP_T3_RESPONSE_DURATION);
break;
break;
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert_if_reached();
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2 || xact->step == 3);
if (xact->step == 2) {
gtp_xact_delete(xact);
return OGS_OK;
}
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert_if_reached();
break;
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2 || xact->step == 3);
if (xact->step == 2)
{
gtp_xact_delete(xact);
return OGS_OK;
}
break;
default:
ogs_assert_if_reached();
default:
ogs_assert_if_reached();
}
}
else if (xact->org == GTP_REMOTE_ORIGINATOR)
{
switch(stage)
{
case GTP_XACT_INITIAL_STAGE:
ogs_assert_if_reached();
} else if (xact->org == GTP_REMOTE_ORIGINATOR) {
switch (stage) {
case GTP_XACT_INITIAL_STAGE:
ogs_assert_if_reached();
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert(xact->step == 2);
if (xact->tm_response)
ogs_timer_start(
xact->tm_response, GTP_T3_RESPONSE_DURATION);
case GTP_XACT_INTERMEDIATE_STAGE:
ogs_assert(xact->step == 2);
if (xact->tm_response)
ogs_timer_start(
xact->tm_response, GTP_T3_RESPONSE_DURATION);
break;
break;
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2 || xact->step == 3);
if (xact->step == 3)
{
gtp_xact_delete(xact);
return OGS_OK;
}
case GTP_XACT_FINAL_STAGE:
ogs_assert(xact->step == 2 || xact->step == 3);
if (xact->step == 3) {
gtp_xact_delete(xact);
return OGS_OK;
}
break;
break;
default:
ogs_assert_if_reached();
default:
ogs_assert_if_reached();
}
}
else
} else
ogs_assert_if_reached();
pkbuf = xact->seq[xact->step-1].pkbuf;
@@ -515,8 +485,7 @@ static void response_timeout(void *data)
OGS_ADDR(&xact->gnode->conn, buf),
OGS_PORT(&xact->gnode->conn));
if (--xact->response_rcount > 0)
{
if (--xact->response_rcount > 0) {
ogs_pkbuf_t *pkbuf = NULL;
if (xact->tm_response)
@@ -525,14 +494,11 @@ static void response_timeout(void *data)
pkbuf = xact->seq[xact->step-1].pkbuf;
ogs_assert(pkbuf);
if (gtp_sendto(xact->gnode, pkbuf) != OGS_OK)
{
if (gtp_sendto(xact->gnode, pkbuf) != OGS_OK) {
ogs_error("gtp_sendto() failed");
goto out;
}
}
else
{
} else {
ogs_warn("[%d] %s No Reponse. Give up! "
"for step %d type %d peer [%s]:%d",
xact->xid,
@@ -565,13 +531,10 @@ static void holding_timeout(void *data)
OGS_ADDR(&xact->gnode->conn, buf),
OGS_PORT(&xact->gnode->conn));
if (--xact->holding_rcount > 0)
{
if (--xact->holding_rcount > 0) {
if (xact->tm_holding)
ogs_timer_start(xact->tm_holding, GTP_T3_DUPLICATED_DURATION);
}
else
{
} else {
ogs_debug("[%d] %s Delete Transaction "
"for step %d type %d peer [%s]:%d",
xact->xid,
@@ -606,8 +569,7 @@ int gtp_xact_receive(
OGS_PORT(&gnode->conn));
rv = gtp_xact_update_rx(new, h->type);
if (rv != OGS_OK)
{
if (rv != OGS_OK) {
return rv;
}
@@ -625,47 +587,46 @@ static gtp_xact_stage_t gtp_xact_get_stage(uint8_t type, uint32_t xid)
{
gtp_xact_stage_t stage = GTP_XACT_UNKNOWN_STAGE;
switch(type)
{
case GTP_CREATE_SESSION_REQUEST_TYPE:
case GTP_MODIFY_BEARER_REQUEST_TYPE:
case GTP_DELETE_SESSION_REQUEST_TYPE:
case GTP_MODIFY_BEARER_COMMAND_TYPE:
case GTP_DELETE_BEARER_COMMAND_TYPE:
case GTP_BEARER_RESOURCE_COMMAND_TYPE:
case GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE:
case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE:
case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE:
case GTP_DOWNLINK_DATA_NOTIFICATION_TYPE:
switch (type) {
case GTP_CREATE_SESSION_REQUEST_TYPE:
case GTP_MODIFY_BEARER_REQUEST_TYPE:
case GTP_DELETE_SESSION_REQUEST_TYPE:
case GTP_MODIFY_BEARER_COMMAND_TYPE:
case GTP_DELETE_BEARER_COMMAND_TYPE:
case GTP_BEARER_RESOURCE_COMMAND_TYPE:
case GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE:
case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE:
case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE:
case GTP_DOWNLINK_DATA_NOTIFICATION_TYPE:
stage = GTP_XACT_INITIAL_STAGE;
break;
case GTP_CREATE_BEARER_REQUEST_TYPE:
case GTP_UPDATE_BEARER_REQUEST_TYPE:
case GTP_DELETE_BEARER_REQUEST_TYPE:
if (xid & GTP_MAX_XACT_ID)
stage = GTP_XACT_INTERMEDIATE_STAGE;
else
stage = GTP_XACT_INITIAL_STAGE;
break;
case GTP_CREATE_BEARER_REQUEST_TYPE:
case GTP_UPDATE_BEARER_REQUEST_TYPE:
case GTP_DELETE_BEARER_REQUEST_TYPE:
if (xid & GTP_MAX_XACT_ID)
stage = GTP_XACT_INTERMEDIATE_STAGE;
else
stage = GTP_XACT_INITIAL_STAGE;
break;
case GTP_CREATE_SESSION_RESPONSE_TYPE:
case GTP_MODIFY_BEARER_RESPONSE_TYPE:
case GTP_DELETE_SESSION_RESPONSE_TYPE:
case GTP_MODIFY_BEARER_FAILURE_INDICATION_TYPE:
case GTP_DELETE_BEARER_FAILURE_INDICATION_TYPE:
case GTP_BEARER_RESOURCE_FAILURE_INDICATION_TYPE:
case GTP_CREATE_BEARER_RESPONSE_TYPE:
case GTP_UPDATE_BEARER_RESPONSE_TYPE:
case GTP_DELETE_BEARER_RESPONSE_TYPE:
case GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE:
case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE:
case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE:
case GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE:
stage = GTP_XACT_FINAL_STAGE;
break;
break;
case GTP_CREATE_SESSION_RESPONSE_TYPE:
case GTP_MODIFY_BEARER_RESPONSE_TYPE:
case GTP_DELETE_SESSION_RESPONSE_TYPE:
case GTP_MODIFY_BEARER_FAILURE_INDICATION_TYPE:
case GTP_DELETE_BEARER_FAILURE_INDICATION_TYPE:
case GTP_BEARER_RESOURCE_FAILURE_INDICATION_TYPE:
case GTP_CREATE_BEARER_RESPONSE_TYPE:
case GTP_UPDATE_BEARER_RESPONSE_TYPE:
case GTP_DELETE_BEARER_RESPONSE_TYPE:
case GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE:
case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE:
case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE:
case GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE:
stage = GTP_XACT_FINAL_STAGE;
break;
default:
ogs_error("Not implemented GTPv2 Message Type(%d)", type);
break;
default:
ogs_error("Not implemented GTPv2 Message Type(%d)", type);
break;
}
return stage;
@@ -681,35 +642,26 @@ gtp_xact_t *gtp_xact_find_by_xid(
ogs_assert(gnode);
switch(gtp_xact_get_stage(type, xid))
{
case GTP_XACT_INITIAL_STAGE:
{
switch (gtp_xact_get_stage(type, xid)) {
case GTP_XACT_INITIAL_STAGE:
list = &gnode->remote_list;
break;
case GTP_XACT_INTERMEDIATE_STAGE:
list = &gnode->local_list;
break;
case GTP_XACT_FINAL_STAGE:
if (xid & GTP_MAX_XACT_ID)
list = &gnode->remote_list;
break;
}
case GTP_XACT_INTERMEDIATE_STAGE:
{
else
list = &gnode->local_list;
break;
}
case GTP_XACT_FINAL_STAGE:
{
if (xid & GTP_MAX_XACT_ID)
list = &gnode->remote_list;
else
list = &gnode->local_list;
break;
}
default:
ogs_assert_if_reached();
break;
default:
ogs_assert_if_reached();
}
ogs_assert(list);
ogs_list_for_each(list, xact)
{
if (xact->xid == xid)
{
ogs_list_for_each(list, xact) {
if (xact->xid == xid) {
ogs_debug("[%d] %s Find peer [%s]:%d",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",

View File

@@ -161,7 +161,7 @@ else:
d_error("Cannot find file : " + filename)
d_info("[Message List]")
cachefile = cachedir + 'tlv_msg_list.py'
cachefile = cachedir + 'tlv-msg-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
execfile(cachefile)
print "Read from " + cachefile
@@ -238,7 +238,7 @@ else:
type_list['MM Context'] = { "type": "107", "max_instance" : "0" }
d_info("[Group IE List]")
cachefile = cachedir + 'tlv_group_list.py'
cachefile = cachedir + 'tlv-group-list.py'
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
execfile(cachefile)
print "Read from " + cachefile
@@ -334,7 +334,7 @@ msg_list["Modify Access Bearers Response"]["table"] = 87
for key in msg_list.keys():
if "table" in msg_list[key].keys():
d_info("[" + key + "]")
cachefile = cachedir + "tlv_msg_" + msg_list[key]["type"] + ".py"
cachefile = cachedir + "tlv-msg-" + msg_list[key]["type"] + ".py"
if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK):
execfile(cachefile)
print "Read from " + cachefile

View File

@@ -23,7 +23,6 @@ libnas_la_SOURCES = \
$(NULL)
libnas_la_DEPENDENCIES = \
@OGSCORE_LIBS@ \
$(top_srcdir)/lib/base/libbase.la \
$(NULL)

View File

@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-06-21 14:10:51.931135 by acetcom
* Created on: 2019-07-06 22:48:01.560467 by acetcom
* from 24301-d80.docx
******************************************************************************/

View File

@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-06-21 14:10:51.957409 by acetcom
* Created on: 2019-07-06 22:48:01.570057 by acetcom
* from 24301-d80.docx
******************************************************************************/

View File

@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-06-21 14:10:51.889878 by acetcom
* Created on: 2019-07-06 22:48:01.547045 by acetcom
* from 24301-d80.docx
******************************************************************************/
@@ -214,8 +214,6 @@ int nas_decode_mobile_identity(nas_mobile_identity_t *mobile_identity, ogs_pkbuf
if (mobile_identity->tmsi.type == NAS_MOBILE_IDENTITY_TMSI)
{
if (mobile_identity->tmsi.spare != 0xf)
ogs_warn("Spec warning : mobile_identity->tmsi.spare = 0x%x", mobile_identity->tmsi.spare);
mobile_identity->tmsi.tmsi = ntohl(mobile_identity->tmsi.tmsi);
}
@@ -507,8 +505,6 @@ int nas_decode_eps_mobile_identity(nas_eps_mobile_identity_t *eps_mobile_identit
if (eps_mobile_identity->guti.type == NAS_EPS_MOBILE_IDENTITY_GUTI)
{
if (eps_mobile_identity->guti.spare != 0xf)
ogs_warn("Spec warning : eps_mobile_identy->spare = 0x%x", eps_mobile_identity->guti.spare);
eps_mobile_identity->guti.mme_gid = ntohs(eps_mobile_identity->guti.mme_gid);
eps_mobile_identity->guti.m_tmsi = ntohl(eps_mobile_identity->guti.m_tmsi);
}

View File

@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-06-21 14:10:51.884139 by acetcom
* Created on: 2019-07-06 22:48:01.544954 by acetcom
* from 24301-d80.docx
******************************************************************************/

View File

@@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-06-21 14:10:51.908774 by acetcom
* Created on: 2019-07-06 22:48:01.552798 by acetcom
* from 24301-d80.docx
******************************************************************************/

View File

@@ -377,6 +377,7 @@ ED3(uint8_t cn_specific_drx_cycle_length_coefficient_and_drx_value_for_s1_mode:4
* A.1 Causes related to UE identification */
#define EMM_CAUSE_IMSI_UNKNOWN_IN_HSS 2
#define EMM_CAUSE_ILLEGAL_UE 3
#define EMM_CAUSE_IMSI_UNKNOWN_IN_VLR 4
#define EMM_CAUSE_ILLEGAL_ME 6
#define EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK 9
#define EMM_CAUSE_IMPLICITLY_DETACHED 10
@@ -728,9 +729,9 @@ ED4(uint8_t type:4;,
* M V 1/2
* 9.9.3.21 NAS key set identifier
* M V 1/2 */
#define NAS_SERVICE_TYPE_CS_FALLBACK_OR_1XCS_FALLBACK_FROM_UE 0
#define NAS_SERVICE_TYPE_CS_FALLBACK_OR_1XCS_FALLBACK_TO_UE 1
#define NAS_SERVICE_TYPE_CS_FALLBACK_EMERGENCY_CALL_OR_1XCS_FALLBACK_EMERGENCY_CALL_FROM_UE 2
#define NAS_SERVICE_TYPE_CS_FALLBACK_FROM_UE 0
#define NAS_SERVICE_TYPE_CS_FALLBACK_TO_UE 1
#define NAS_SERVICE_TYPE_CS_FALLBACK_EMERGENCY_CALL_FROM_UE 2
typedef struct nas_service_type_s {
ED3(uint8_t tsc:1;,
uint8_t nas_key_set_identifier:3;,

Some files were not shown because too many files have changed in this diff Show More