Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-28 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..

mobile: add MNCC handler selection to settings

Since the mobile application is potentially able to maintain
multiple MS instances, it's better to have a possibility to
choose an MNCC (Call Control) handler per each MS separately.

This change removes the command-line option '-m', which was used
for enabling the external MNCC.  Now it's possible configure the
MNCC handler for each MS via the VTY interface and settings.

The following MNCC-handlers are available:

  - internal - built-in MNCC-handler (default);
  - external - external MNCC-handler via UNIX-socket (e.g. LCR);
  - dummy - dummy handler without CC support.

Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Related: OS#3400
---
M doc/examples/mobile/default.cfg
M doc/examples/mobile/multi_ms.cfg
M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
M src/host/layer23/include/osmocom/bb/mobile/settings.h
M src/host/layer23/src/mobile/app_mobile.c
M src/host/layer23/src/mobile/main.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/settings.c
M src/host/layer23/src/mobile/vty_interface.c
9 files changed, 112 insertions(+), 36 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved



diff --git a/doc/examples/mobile/default.cfg b/doc/examples/mobile/default.cfg
index d78bef5..e24e07f 100644
--- a/doc/examples/mobile/default.cfg
+++ b/doc/examples/mobile/default.cfg
@@ -15,6 +15,7 @@
  layer2-socket /tmp/osmocom_l2
  sap-socket /tmp/osmocom_sap
  mncc-socket /tmp/ms_mncc_1
+ mncc-handler internal
  sim reader
  network-selection-mode auto
  imei 000 0
diff --git a/doc/examples/mobile/multi_ms.cfg b/doc/examples/mobile/multi_ms.cfg
index 4ccdb10..86a9840 100644
--- a/doc/examples/mobile/multi_ms.cfg
+++ b/doc/examples/mobile/multi_ms.cfg
@@ -15,6 +15,7 @@
  layer2-socket /tmp/osmocom_l2.one
  sap-socket /tmp/osmocom_sap.one
  mncc-socket /tmp/ms_mncc_one
+ mncc-handler internal
  sim reader
  network-selection-mode auto
  imei 000 0
@@ -68,6 +69,7 @@
  layer2-socket /tmp/osmocom_l2.two
  sap-socket /tmp/osmocom_sap.two
  mncc-socket /tmp/ms_mncc_two
+ mncc-handler internal
  sim reader
  network-selection-mode auto
  imei 000 0
diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h 
b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
index 191f4ba..7a3669d 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
@@ -8,8 +8,7 @@
 struct osmocom_ms;
 struct vty;

-int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *),
-   const char *config_file);
+int l23_app_init(const char *config_file);
 int l23_app_exit(void);
 int l23_app_work(int *quit);
 int mobile_delete(struct osmocom_ms *ms, int force);
diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h 
b/src/host/layer23/include/osmocom/bb/mobile/settings.h
index 6f4f59c..d5620ff 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/settings.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h
@@ -3,6 +3,16 @@

 #define MOB_C7_DEFLT_ANY_TIMEOUT   30

+/* CC (Call Control) message handling entity */
+enum mncc_handler_t {
+   /* Built-in mobile's MNCC */
+   MNCC_HANDLER_INTERNAL,
+   /* External MNCC application via UNIX-socket */
+   MNCC_HANDLER_EXTERNAL,
+   /* No call support */
+   MNCC_HANDLER_DUMMY,
+};
+
 /* TCH frame I/O handler */
 enum audio_io_handler {
/* No handler, drop frames */
@@ -24,6 +34,9 @@
charsap_socket_path[128];
charmncc_socket_path[128];

+   /* MNCC handler */
+   enum mncc_handler_t mncc_handler;
+
/* Audio settings */
struct audio_settings   audio;

diff --git a/src/host/layer23/src/mobile/app_mobile.c 
b/src/host/layer23/src/mobile/app_mobile.c
index 5016582..dd67e70 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -51,9 +51,9 @@
 extern struct llist_head ms_list;
 extern int vty_reading;

-int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg);
+int mncc_recv_internal(struct osmocom_ms *ms, int msg_type, void *arg);
+int mncc_recv_external(struct osmocom_ms *ms, int msg_type, void *arg);
 int mncc_recv_dummy(struct osmocom_ms *ms, int msg_type, void *arg);
-int (*mncc_recv_app)(struct osmocom_ms *ms, int, void *);
 static int quit;

 /* handle ms instance */
@@ -237,6 +237,24 @@
"default IMEI.\n***\n");
}

+   switch (ms->settings.mncc_handler) {
+   case MNCC_HANDLER_INTERNAL:

Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-28 Thread fixeria
Attention is currently required from: msuraev.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: msuraev 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Mon, 28 Nov 2022 20:41:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-28 Thread pespin
Attention is currently required from: fixeria, msuraev.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: msuraev 
Gerrit-Attention: fixeria 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Mon, 28 Nov 2022 20:38:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-28 Thread laforge
Attention is currently required from: fixeria, pespin, msuraev.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: msuraev 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Mon, 28 Nov 2022 19:41:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-28 Thread fixeria
Attention is currently required from: pespin, msuraev.
Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmocom-bb/+/30326

to look at the new patch set (#2).

Change subject: mobile: add MNCC handler selection to settings
..

mobile: add MNCC handler selection to settings

Since the mobile application is potentially able to maintain
multiple MS instances, it's better to have a possibility to
choose an MNCC (Call Control) handler per each MS separately.

This change removes the command-line option '-m', which was used
for enabling the external MNCC.  Now it's possible configure the
MNCC handler for each MS via the VTY interface and settings.

The following MNCC-handlers are available:

  - internal - built-in MNCC-handler (default);
  - external - external MNCC-handler via UNIX-socket (e.g. LCR);
  - dummy - dummy handler without CC support.

Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Related: OS#3400
---
M doc/examples/mobile/default.cfg
M doc/examples/mobile/multi_ms.cfg
M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
M src/host/layer23/include/osmocom/bb/mobile/settings.h
M src/host/layer23/src/mobile/app_mobile.c
M src/host/layer23/src/mobile/main.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/settings.c
M src/host/layer23/src/mobile/vty_interface.c
9 files changed, 112 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/26/30326/2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: msuraev 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: msuraev 
Gerrit-MessageType: newpatchset


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-28 Thread fixeria
Attention is currently required from: pespin, msuraev.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..


Patch Set 1:

(3 comments)

Patchset:

PS1:
> Typo in commit message: extarnal
Done. Also fixed s/potentionally/potentially/.


File src/host/layer23/src/mobile/app_mobile.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/30326/comment/50b67a02_8a8bb98a
PS1, Line 249:  ms->mncc_entity.sock_state = mncc_sock_init(ms, 
ms->settings.mncc_socket_path);
> So sock_state is used only if mncc_handler is "EXTERNAL"? Then better put it 
> under ms->mncc_entity. […]
There is a big room for improvements here, given that this project is not 
actively maintained since... idk how many years ago. I am not going to rework 
the existing mobile's structures unless it's really necessary. Feel free to 
submit a patch.


File src/host/layer23/src/mobile/vty_interface.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/30326/comment/34677460_cbf31875
PS1, Line 1665: DEFUN(cfg_ms_no_mncc_handler, cfg_ms_no_mncc_handler_cmd,
> ACK, specifying the default above in the description (like you did) should be 
> enough for the user to […]
To stay consistent with the existing 'io-handler', which has both variants. I 
can remove the no-command if you guys insist, but honestly I see nothing wrong 
in having two variants.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: msuraev 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Mon, 28 Nov 2022 16:49:00 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: msuraev 
Gerrit-MessageType: comment


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-28 Thread pespin
Attention is currently required from: fixeria, msuraev.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..


Patch Set 1:

(2 comments)

File src/host/layer23/src/mobile/app_mobile.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/30326/comment/829e0ccd_89f74ed7
PS1, Line 249:  ms->mncc_entity.sock_state = mncc_sock_init(ms, 
ms->settings.mncc_socket_path);
So sock_state is used only if mncc_handler is "EXTERNAL"? Then better put it 
under ms->mncc_entity.external.sock_state


File src/host/layer23/src/mobile/vty_interface.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/30326/comment/3b4e276e_d24997cb
PS1, Line 1665: DEFUN(cfg_ms_no_mncc_handler, cfg_ms_no_mncc_handler_cmd,
> What's the point of introducing redundant vty command if dummy handler can be 
> selected with mncc-han […]
ACK, specifying the default above in the description (like you did) should be 
enough for the user to set the mncc-handler to default.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: msuraev 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Mon, 28 Nov 2022 09:33:42 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: msuraev 
Gerrit-MessageType: comment


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-27 Thread msuraev
Attention is currently required from: fixeria.
msuraev has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..


Patch Set 1:

(2 comments)

Patchset:

PS1:
Typo in commit message: extarnal


File src/host/layer23/src/mobile/vty_interface.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/30326/comment/39e1e28b_4a76540d
PS1, Line 1665: DEFUN(cfg_ms_no_mncc_handler, cfg_ms_no_mncc_handler_cmd,
What's the point of introducing redundant vty command if dummy handler can be 
selected with mncc-handler command above?



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: msuraev 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Sun, 27 Nov 2022 13:35:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-27 Thread laforge
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )

Change subject: mobile: add MNCC handler selection to settings
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Gerrit-Change-Number: 30326
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Sun, 27 Nov 2022 11:06:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings

2022-11-26 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 )


Change subject: mobile: add MNCC handler selection to settings
..

mobile: add MNCC handler selection to settings

Since the mobile application is potentionally able to maintain
multiple MS instances, it's better to have a possibility to
choose an MNCC (Call Control) handler per each MS separately.

This change removes the command-line option '-m', which was used
for enabling the extarnal MNCC.  Now it's possible configure the
MNCC handler for each MS via the VTY interface and settings.

The following MNCC-handlers are available:

  - internal - built-in MNCC-handler (default);
  - external - external MNCC-handler via UNIX-socket (e.g. LCR);
  - dummy - dummy handler without CC support.

Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346
Related: OS#3400
---
M doc/examples/mobile/default.cfg
M doc/examples/mobile/multi_ms.cfg
M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
M src/host/layer23/include/osmocom/bb/mobile/settings.h
M src/host/layer23/src/mobile/app_mobile.c
M src/host/layer23/src/mobile/main.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/settings.c
M src/host/layer23/src/mobile/vty_interface.c
9 files changed, 112 insertions(+), 36 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/26/30326/1

diff --git a/doc/examples/mobile/default.cfg b/doc/examples/mobile/default.cfg
index d78bef5..e24e07f 100644
--- a/doc/examples/mobile/default.cfg
+++ b/doc/examples/mobile/default.cfg
@@ -15,6 +15,7 @@
  layer2-socket /tmp/osmocom_l2
  sap-socket /tmp/osmocom_sap
  mncc-socket /tmp/ms_mncc_1
+ mncc-handler internal
  sim reader
  network-selection-mode auto
  imei 000 0
diff --git a/doc/examples/mobile/multi_ms.cfg b/doc/examples/mobile/multi_ms.cfg
index 4ccdb10..86a9840 100644
--- a/doc/examples/mobile/multi_ms.cfg
+++ b/doc/examples/mobile/multi_ms.cfg
@@ -15,6 +15,7 @@
  layer2-socket /tmp/osmocom_l2.one
  sap-socket /tmp/osmocom_sap.one
  mncc-socket /tmp/ms_mncc_one
+ mncc-handler internal
  sim reader
  network-selection-mode auto
  imei 000 0
@@ -68,6 +69,7 @@
  layer2-socket /tmp/osmocom_l2.two
  sap-socket /tmp/osmocom_sap.two
  mncc-socket /tmp/ms_mncc_two
+ mncc-handler internal
  sim reader
  network-selection-mode auto
  imei 000 0
diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h 
b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
index 191f4ba..7a3669d 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h
@@ -8,8 +8,7 @@
 struct osmocom_ms;
 struct vty;

-int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *),
-   const char *config_file);
+int l23_app_init(const char *config_file);
 int l23_app_exit(void);
 int l23_app_work(int *quit);
 int mobile_delete(struct osmocom_ms *ms, int force);
diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h 
b/src/host/layer23/include/osmocom/bb/mobile/settings.h
index 6f4f59c..d5620ff 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/settings.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h
@@ -3,6 +3,16 @@

 #define MOB_C7_DEFLT_ANY_TIMEOUT   30

+/* CC (Call Control) message handling entity */
+enum mncc_handler_t {
+   /* Built-in mobile's MNCC */
+   MNCC_HANDLER_INTERNAL,
+   /* External MNCC application via UNIX-socket */
+   MNCC_HANDLER_EXTERNAL,
+   /* No call support */
+   MNCC_HANDLER_DUMMY,
+};
+
 /* TCH frame I/O handler */
 enum audio_io_handler {
/* No handler, drop frames */
@@ -24,6 +34,9 @@
charsap_socket_path[128];
charmncc_socket_path[128];

+   /* MNCC handler */
+   enum mncc_handler_t mncc_handler;
+
/* Audio settings */
struct audio_settings   audio;

diff --git a/src/host/layer23/src/mobile/app_mobile.c 
b/src/host/layer23/src/mobile/app_mobile.c
index 5016582..dd67e70 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -51,9 +51,9 @@
 extern struct llist_head ms_list;
 extern int vty_reading;

-int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg);
+int mncc_recv_internal(struct osmocom_ms *ms, int msg_type, void *arg);
+int mncc_recv_external(struct osmocom_ms *ms, int msg_type, void *arg);
 int mncc_recv_dummy(struct osmocom_ms *ms, int msg_type, void *arg);
-int (*mncc_recv_app)(struct osmocom_ms *ms, int, void *);
 static int quit;

 /* handle ms instance */
@@ -237,6 +237,24 @@
"default IMEI.\n***\n");
}

+   switch (ms->settings.mncc_handler) {
+   case MNCC_HANDLER_INTERNAL:
+   LOGP(DMOB, LOGL_INFO, "Using the built-in MNCC-handler for MS 
'%s'\n", ms->name);
+