aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz/anetz.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2020-08-09 14:27:56 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2020-12-29 11:11:41 +0100
commit2cb2d5f3acdaf13d979c9bf9efb74b34b7ceea70 (patch)
tree00487e68886b7a6dfd7432ffc1e05e655c958c3a /src/anetz/anetz.c
parentd0d14e2acfce32af69aa7692404e88931ecbf4b0 (diff)
Replaced MNCC by OSMO-CC
Diffstat (limited to 'src/anetz/anetz.c')
-rw-r--r--src/anetz/anetz.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index fc9fc52..c598b1a 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -28,14 +28,11 @@
#include "../libdebug/debug.h"
#include "../libtimer/timer.h"
#include "../libmobile/call.h"
-#include "../libmncc/cause.h"
+#include "../libmobile/cause.h"
+#include "../libosmocc/message.h"
#include "anetz.h"
#include "dsp.h"
-/* Call reference for calls from mobile station to network
- This offset of 0x400000000 is required for MNCC interface. */
-static int new_callref = 0x40000000;
-
/* Timers */
#define PAGING_TO 30 /* Nach dieser Zeit ist der Operator genervt... */
#define RELEASE_TO 3 /* Release time, so station keeps blocked for a while */
@@ -326,17 +323,8 @@ void anetz_receive_tone(anetz_t *anetz, int tone)
/* throughconnect speech when calling/answer tone is gone */
if (tone != 1) {
if (!anetz->callref) {
- int callref = ++new_callref;
- int rc;
-
PDEBUG_CHAN(DANETZ, DEBUG_INFO, "1750 Hz signal from mobile station is gone, setup call.\n");
- rc = call_up_setup(callref, NULL, anetz->operator);
- if (rc < 0) {
- PDEBUG_CHAN(DANETZ, DEBUG_NOTICE, "Call rejected (cause %d), sending release tone.\n", -rc);
- anetz_release(anetz);
- break;
- }
- anetz->callref = callref;
+ anetz->callref = call_up_setup(NULL, anetz->operator, OSMO_CC_NETWORK_ANETZ_NONE, "");
} else {
PDEBUG_CHAN(DANETZ, DEBUG_INFO, "1750 Hz signal from mobile station is gone, answer call.\n");
call_up_answer(anetz->callref, anetz->station_id);