Replaced MNCC by OSMO-CC

pull/1/head
Andreas Eversberg 3 years ago
parent d0d14e2acf
commit 2cb2d5f3ac
  1. 1
      .gitignore
  2. 1
      configure.ac
  3. 1
      src/Makefile.am
  4. 2
      src/amps/Makefile.am
  5. 29
      src/amps/amps.c
  6. 4
      src/amps/amps_tacs_main.c
  7. 2
      src/amps/main.c
  8. 2
      src/amps/main.h
  9. 5
      src/amps/transaction.c
  10. 3
      src/amps/transaction.h
  11. 2
      src/anetz/Makefile.am
  12. 18
      src/anetz/anetz.c
  13. 2
      src/anetz/main.c
  14. 3
      src/bnetz/Makefile.am
  15. 17
      src/bnetz/bnetz.c
  16. 2
      src/bnetz/main.c
  17. 2
      src/cnetz/Makefile.am
  18. 18
      src/cnetz/cnetz.c
  19. 2
      src/cnetz/main.c
  20. 2
      src/cnetz/transaction.c
  21. 2
      src/eurosignal/Makefile.am
  22. 17
      src/eurosignal/eurosignal.c
  23. 2
      src/eurosignal/main.c
  24. 4
      src/fuvst/Makefile.am
  25. 20
      src/fuvst/fuvst.c
  26. 2
      src/fuvst/main.c
  27. 2
      src/fuvst/sniffer.c
  28. 2
      src/imts/Makefile.am
  29. 29
      src/imts/imts.c
  30. 2
      src/imts/main.c
  31. 2
      src/jolly/Makefile.am
  32. 18
      src/jolly/jolly.c
  33. 3
      src/jolly/main.c
  34. 2
      src/jtacs/Makefile.am
  35. 2
      src/jtacs/main.c
  36. 1
      src/libdebug/debug.h
  37. 15
      src/libmncc/Makefile.am
  38. 347
      src/libmncc/mncc.h
  39. 240
      src/libmncc/mncc_cross.c
  40. 5
      src/libmncc/mncc_cross.h
  41. 239
      src/libmncc/mncc_sock.c
  42. 7
      src/libmncc/mncc_sock.h
  43. 3
      src/libmobile/Makefile.am
  44. 624
      src/libmobile/call.c
  45. 7
      src/libmobile/call.h
  46. 2
      src/libmobile/cause.c
  47. 1
      src/libmobile/cause.h
  48. 358
      src/libmobile/console.c
  49. 1
      src/libmobile/console.h
  50. 136
      src/libmobile/main_mobile.c
  51. 2
      src/libmobile/main_mobile.h
  52. 0
      src/libmobile/testton.c
  53. 0
      src/libmobile/testton.h
  54. 2
      src/nmt/Makefile.am
  55. 2
      src/nmt/main.c
  56. 17
      src/nmt/nmt.c
  57. 2
      src/r2000/Makefile.am
  58. 2
      src/r2000/main.c
  59. 20
      src/r2000/r2000.c
  60. 2
      src/tacs/Makefile.am
  61. 2
      src/tacs/main.c
  62. 4
      src/test/Makefile.am
  63. 2
      src/zeitansage/Makefile.am
  64. 2
      src/zeitansage/main.c
  65. 2
      src/zeitansage/zeitansage.c

1
.gitignore vendored

@ -41,7 +41,6 @@ src/libfm/libfm.a
src/libfilter/libfilter.a
src/libwave/libwave.a
src/libfft/libfft.a
src/libmncc/libmncc.a
src/libsound/libsound.a
src/libsdr/libsdr.a
src/libsample/libsample.a

@ -79,7 +79,6 @@ AC_OUTPUT(
src/libfilter/Makefile
src/libwave/Makefile
src/libfft/Makefile
src/libmncc/Makefile
src/libsound/Makefile
src/libsdr/Makefile
src/libsample/Makefile

@ -24,7 +24,6 @@ SUBDIRS = \
libfilter \
libwave \
libfft \
libmncc \
libclipper \
libserial \
libv27 \

@ -32,6 +32,7 @@ amps_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
@ -42,7 +43,6 @@ amps_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
-lm

@ -45,7 +45,8 @@
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "../libmobile/cause.h"
#include "../libosmocc/message.h"
#include "amps.h"
#include "dsp.h"
#include "frame.h"
@ -63,10 +64,6 @@
#define ALERT_TO 60.0 /* max time to wait for answer */
#define RELEASE_TIMER 5.0 /* max time to send release messages */
/* Call reference for calls from mobile station to network
This offset of 0x400000000 is required for MNCC interface. */
static int new_callref = 0x40000000;
/* Convert channel number to frequency number of base station.
Set 'uplink' to 1 to get frequency of mobile station. */
double amps_channel2freq(int channel, int uplink)
@ -599,7 +596,7 @@ int amps_create(const char *kanal, enum amps_chan_type chan_type, const char *au
uint32_t min1;
uint16_t min2;
amps_number2min("1234567890", &min1, &min2);
transaction_t __attribute__((__unused__)) *trans = create_transaction(amps, TRANS_CALL_MO_ASSIGN, min1, min2, 0, 0, 0, amps->sender.kanal);
transaction_t __attribute__((__unused__)) *trans = create_transaction(amps, TRANS_CALL_MO_ASSIGN, min1, min2, 0, 0, 0, 0, amps->sender.kanal);
// amps_new_state(amps, STATE_BUSY);
#endif
@ -820,7 +817,7 @@ _register:
PDEBUG_CHAN(DAMPS, DEBUG_INFO, " -> Home country: %s\n", country);
if (national_number)
PDEBUG_CHAN(DAMPS, DEBUG_INFO, " -> Home number: %s\n", national_number);
trans = create_transaction(amps, TRANS_REGISTER_ACK, min1, min2, msg_type, ordq, order, 0);
trans = create_transaction(amps, TRANS_REGISTER_ACK, min1, min2, esn, msg_type, ordq, order, 0);
if (!trans) {
PDEBUG(DAMPS, DEBUG_ERROR, "Failed to create transaction\n");
return;
@ -847,7 +844,7 @@ _register:
PDEBUG(DAMPS, DEBUG_NOTICE, "No free channel, rejecting call\n");
reject:
if (!trans) {
trans = create_transaction(amps, TRANS_CALL_REJECT, min1, min2, 0, 0, 3, 0);
trans = create_transaction(amps, TRANS_CALL_REJECT, min1, min2, esn, 0, 0, 3, 0);
if (!trans) {
PDEBUG(DAMPS, DEBUG_ERROR, "Failed to create transaction\n");
return;
@ -862,7 +859,7 @@ reject:
return;
}
if (!trans) {
trans = create_transaction(amps, TRANS_CALL_MO_ASSIGN, min1, min2, 0, 0, 0, atoi(vc->sender.kanal));
trans = create_transaction(amps, TRANS_CALL_MO_ASSIGN, min1, min2, esn, 0, 0, 0, atoi(vc->sender.kanal));
strncpy(trans->dialing, dialing, sizeof(trans->dialing) - 1);
if (!trans) {
PDEBUG(DAMPS, DEBUG_ERROR, "Failed to create transaction\n");
@ -957,7 +954,7 @@ inval:
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Call to mobile station, paging station id '%s'\n", dialing);
/* 6. trying to page mobile station */
trans = create_transaction(amps, TRANS_PAGE, min1, min2, 0, 0, 0, 0);
trans = create_transaction(amps, TRANS_PAGE, min1, min2, 0, 0, 0, 0, 0);
if (!trans) {
PDEBUG(DAMPS, DEBUG_ERROR, "Failed to create transaction\n");
return -CAUSE_TEMPFAIL;
@ -1120,8 +1117,6 @@ static amps_t *assign_voice_channel(transaction_t *trans)
{
amps_t *amps = trans->amps, *vc;
const char *callerid = amps_min2number(trans->min1, trans->min2);
int callref = ++new_callref;
int rc;
vc = search_channel(trans->chan);
if (!vc) {
@ -1146,15 +1141,11 @@ static amps_t *assign_voice_channel(transaction_t *trans)
amps_flush_other_transactions(vc, trans);
if (!trans->callref) {
char esn_text[16];
sprintf(esn_text, "%u", trans->esn);
/* setup call */
PDEBUG(DAMPS, DEBUG_INFO, "Setup call to network.\n");
rc = call_up_setup(callref, callerid, trans->dialing);
if (rc < 0) {
PDEBUG(DAMPS, DEBUG_NOTICE, "Call rejected (cause %d), releasing.\n", rc);
amps_release(trans, 0);
return NULL;
}
trans->callref = callref;
trans->callref = call_up_setup(callerid, trans->dialing, OSMO_CC_NETWORK_AMPS_ESN, esn_text);
}
return vc;

@ -227,7 +227,7 @@ static int handle_options(int short_option, int argi, char **argv)
return 1;
}
int main_amps_tacs(int argc, char *argv[])
int main_amps_tacs(const char *name, int argc, char *argv[])
{
int rc, argi;
const char *station_id = "";
@ -392,7 +392,7 @@ int main_amps_tacs(int argc, char *argv[])
printf("Base station on channel %s ready (%s), please tune transmitter to %.4f MHz and receiver to %.4f MHz. (%.3f MHz offset)\n", kanal[i], chan_type_long_name(chan_type[i]), amps_channel2freq(atoi(kanal[i]), 0) / 1e6, amps_channel2freq(atoi(kanal[i]), 1) / 1e6, amps_channel2freq(atoi(kanal[i]), 2) / 1e6);
}
main_mobile(&quit, latency, interval, NULL, station_id, 10);
main_mobile(name, &quit, latency, interval, NULL, station_id, 10);
fail:
/* destroy transceiver instance */

@ -17,5 +17,5 @@ int main(int argc, char *argv[])
init_invalidnumber();
init_congestion();
return main_amps_tacs(argc, argv);
return main_amps_tacs("amps", argc, argv);
}

@ -2,5 +2,5 @@
extern const int tacs;
extern const int jtacs;
int main_amps_tacs(int argc, char *argv[]);
int main_amps_tacs(const char *name, int argc, char *argv[]);

@ -23,7 +23,7 @@
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "../libmobile/cause.h"
#include "amps.h"
//#include "database.h"
@ -103,7 +103,7 @@ const char *trans_short_state_name(int state)
}
/* create transaction */
transaction_t *create_transaction(amps_t *amps, enum amps_trans_state state, uint32_t min1, uint16_t min2, uint8_t msg_type, uint8_t ordq, uint8_t order, uint16_t chan)
transaction_t *create_transaction(amps_t *amps, enum amps_trans_state state, uint32_t min1, uint16_t min2, uint32_t esn, uint8_t msg_type, uint8_t ordq, uint8_t order, uint16_t chan)
{
sender_t *sender;
transaction_t *trans = NULL;
@ -140,6 +140,7 @@ transaction_t *create_transaction(amps_t *amps, enum amps_trans_state state, uin
trans_new_state(trans, state);
trans->min1 = min1;
trans->min2 = min2;
trans->esn = esn;
trans->msg_type = msg_type;
trans->ordq = ordq;
trans->order = order;

@ -26,6 +26,7 @@ typedef struct transaction {
int page_retry; /* current number of paging (re)try */
uint32_t min1; /* current station ID (2 values) */
uint16_t min2;
uint32_t esn; /* ESN */
uint8_t msg_type; /* message type (3 values) */
uint8_t ordq;
uint8_t order;
@ -37,7 +38,7 @@ typedef struct transaction {
int dtx; /* if set, DTX is used with this call */
} transaction_t;
transaction_t *create_transaction(amps_t *amps, enum amps_trans_state trans_state, uint32_t min1, uint16_t min2, uint8_t msg_type, uint8_t ordq, uint8_t order, uint16_t chan);
transaction_t *create_transaction(amps_t *amps, enum amps_trans_state trans_state, uint32_t min1, uint16_t min2, uint32_t esn, uint8_t msg_type, uint8_t ordq, uint8_t order, uint16_t chan);
void destroy_transaction(transaction_t *trans);
void link_transaction(transaction_t *trans, amps_t *amps);
void unlink_transaction(transaction_t *trans);

@ -21,6 +21,7 @@ anetz_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
@ -31,7 +32,6 @@ anetz_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
-lm

@ -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);

@ -188,7 +188,7 @@ int main(int argc, char *argv[])
printf("Base station on channel %s ready, please tune transmitter to %.3f MHz and receiver to %.3f MHz. (%.3f MHz offset)\n", kanal[i], anetz_kanal2freq(atoi(kanal[i]), 0) / 1e6, anetz_kanal2freq(atoi(kanal[i]), 1) / 1e6, anetz_kanal2freq(atoi(kanal[i]), 2) / 1e6);
}
main_mobile(&quit, latency, interval, NULL, station_id, 5);
main_mobile("anetz", &quit, latency, interval, NULL, station_id, 5);
fail:
/* destroy transceiver instance */

@ -18,6 +18,7 @@ bnetz_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libsquelch/libsquelch.a \
@ -28,7 +29,6 @@ bnetz_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
-lm
@ -44,7 +44,6 @@ bnetz_dialer_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(ALSA_LIBS)
-lm

@ -27,15 +27,12 @@
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "../libmobile/cause.h"
#include "../libosmocc/message.h"
#include "bnetz.h"
#include "telegramm.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;
/* mobile originating call */
#define CARRIER_TO 0.08 /* 80 ms search for carrier */
#define DIALING_TO 3.8 /* timeout after channel allocation "Kanalbelegung" (according to FTZ 1727 Pfl 32 Clause 3.2.2.2.8) */
@ -565,8 +562,6 @@ void bnetz_receive_telegramm(bnetz_t *bnetz, uint16_t telegramm)
break;
case DIAL_MODE_NUMBER2:
if (digit == 'e') {
int callref = ++new_callref;
int rc;
/* add 0 in front of number */
char dialing[sizeof(bnetz->dial_number) + 1] = "0";
strcpy(dialing + 1, bnetz->dial_number);
@ -594,13 +589,7 @@ void bnetz_receive_telegramm(bnetz_t *bnetz, uint16_t telegramm)
/* setup call */
PDEBUG(DBNETZ, DEBUG_INFO, "Setup call to network.\n");
rc = call_up_setup(callref, bnetz->station_id, dialing);
if (rc < 0) {
PDEBUG(DBNETZ, DEBUG_NOTICE, "Call rejected (cause %d), releasing.\n", -rc);
bnetz_release(bnetz, TRENN_COUNT);
return;
}
bnetz->callref = callref;
bnetz->callref = call_up_setup(bnetz->station_id, dialing, OSMO_CC_NETWORK_BNETZ_MUENZ, (bnetz->dial_type == DIAL_TYPE_METER_MUENZ) ? "MUENZ" : "");
break;
}
if (digit < '0' || digit > '9') {

@ -194,7 +194,7 @@ int main(int argc, char *argv[])
printf("To call phone, switch transmitter (using paging signal) to %.3f MHz.\n", bnetz_kanal2freq(19, 0) / 1e6);
}
main_mobile(&quit, latency, interval, NULL, station_id, 5);
main_mobile("bnetz", &quit, latency, interval, NULL, station_id, 5);
fail:
/* destroy transceiver instance */

@ -26,6 +26,7 @@ cnetz_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libjitter/libjitter.a \
@ -36,7 +37,6 @@ cnetz_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
-lm

@ -145,7 +145,8 @@
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "../libmobile/cause.h"
#include "../libosmocc/message.h"
#include "cnetz.h"
#include "database.h"
#include "sysinfo.h"
@ -158,10 +159,6 @@
#define CUT_OFF_EMPHASIS_CNETZ 796.0 /* 200 uS time constant */
/* Call reference for calls from mobile station to network
This offset of 0x400000000 is required for MNCC interface. */
static int new_callref = 0x40000000;
/* Convert channel number to frequency number of base station.
Set 'unterband' to 1 to get frequency of mobile station. */
double cnetz_kanal2freq(int kanal, int unterband)
@ -1359,15 +1356,7 @@ no_auth:
if (!cnetz->sender.loopback && (cnetz->sched_ts & 7) == 7 && cnetz->sched_r_m && !timer_running(&trans->timer)) {
/* next sub frame */
if (trans->mo_call) {
int rc;
trans->callref = ++new_callref;
rc = call_up_setup(trans->callref, transaction2rufnummer(trans), trans->dialing);
if (rc < 0) {
PDEBUG(DCNETZ, DEBUG_NOTICE, "Call rejected (cause %d), releasing.\n", -rc);
trans->callref = 0;
cnetz_release(trans, cnetz_cause_isdn2cnetz(-rc));
goto call_failed;
}
trans->callref = call_up_setup(transaction2rufnummer(trans), trans->dialing, OSMO_CC_NETWORK_CNETZ_NONE, "");
trans_new_state(trans, TRANS_DS);
trans->repeat = 0;
timer_start(&trans->timer, 0.0375 * F_DS); /* F_DS frames */
@ -1410,7 +1399,6 @@ no_auth:
}
break;
case TRANS_AF:
call_failed:
PDEBUG_CHAN(DCNETZ, DEBUG_INFO, "Sending 'Ausloesen durch FuFSt' on traffic channel\n");
telegramm.opcode = OPCODE_AF_K;
if (++trans->repeat < N_AFKT)

@ -647,7 +647,7 @@ int main(int argc, char *argv[])
}
}
main_mobile(&quit, latency, interval, NULL, station_id, 7);
main_mobile("cnetz", &quit, latency, interval, NULL, station_id, 7);
fail:
flush_db();

@ -23,7 +23,7 @@
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "../libmobile/cause.h"
#include "cnetz.h"
#include "telegramm.h"
#include "database.h"

@ -18,6 +18,7 @@ eurosignal_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libtimer/libtimer.a \
@ -27,7 +28,6 @@ eurosignal_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
-lm

@ -28,7 +28,8 @@
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "../libmobile/cause.h"
#include "../libosmocc/message.h"
#include "eurosignal.h"
#include "dsp.h"
@ -42,10 +43,6 @@
#define ACKNOWLEDGE_TIME2 4.6 /* announcement 1.7 s, pause 2.9 s */
#define BEEP_TIME 4.0 /* beep after answer */
/* Call reference for calls from mobile station to network
This offset of 0x400000000 is required for MNCC interface. */
static int new_callref = 0x40000000;
/* these calls are not associated with a transmitter */
euro_call_t *ooo_call_list = NULL;
@ -469,10 +466,9 @@ void euro_receive_id(euro_t *euro, char *id)
/* we want to send beep via MNCC */
if (id_list) {
uint32_t callref;
euro_call_t *call;
char dialing[32];
int callref;
int rc;
/* check if we already have a call that beeps */
for (call = ooo_call_list; call; call = call->next) {
@ -485,13 +481,10 @@ void euro_receive_id(euro_t *euro, char *id)
/* create call and send setup */
PDEBUG_CHAN(DEURO, DEBUG_INFO, "Sending setup towards network.'\n");
callref = ++new_callref;
sprintf(dialing, "%d", count);
callref = call_up_setup(call->station_id, dialing, OSMO_CC_NETWORK_EUROSIGNAL_NONE, "");
call = euro_call_create(NULL, callref, id);
call_new_state(call, EURO_CALL_BEEPING);
sprintf(dialing, "%d", count);
rc = call_up_setup(callref, call->station_id, dialing);
if (rc < 0)
euro_call_destroy(call);
}
}

@ -239,7 +239,7 @@ int main(int argc, char *argv[])
printf("Base station for channel %s ready, please tune transmitter and/or receiver to %.4f MHz\n", kanal[i], euro_kanal2freq(kanal[i], fm) / 1e6);
}
main_mobile(&quit, latency, interval, NULL, station_id, 6);
main_mobile("eurosignal", &quit, latency, interval, NULL, station_id, 6);
fail:
/* destroy transceiver instance */

@ -17,6 +17,7 @@ fuvst_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libjitter/libjitter.a \
@ -29,7 +30,6 @@ fuvst_LDADD = \
$(top_builddir)/src/libmtp/libmtp.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libsound/libsound.a \
$(top_builddir)/src/libg711/libg711.a \
@ -43,6 +43,7 @@ fuvst_sniffer_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libjitter/libjitter.a \
@ -55,7 +56,6 @@ fuvst_sniffer_LDADD = \
$(top_builddir)/src/libmtp/libmtp.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libsound/libsound.a \
$(top_builddir)/src/libg711/libg711.a \

@ -37,8 +37,9 @@
#include "../libsample/sample.h"
#include "../libdebug/debug.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "../libmobile/cause.h"
#include "../libtimer/timer.h"
#include "../libosmocc/message.h"
#include "fuvst.h"
/* digital loopback test */
@ -367,10 +368,6 @@ static void add_db(uint8_t futln_nat, uint8_t futln_fuvst, uint16_t futln_rest,
* transactions
*/
/* Call reference for calls from mobile station to network
This offset of 0x400000000 is required for MNCC interface. */
static int new_callref = 0x40000000;
/* Release timeout */
#define RELEASE_TO 3.0
@ -982,19 +979,8 @@ outgoing:
message_send(ident, opcode, data, len);
/* no callref == outgoing call */
if (!trans->callref) {
int rc;
PDEBUG(DCNETZ, DEBUG_INFO, "Setup call to network. (Ident = %d, FuTln=%s, number=%s)\n", ident, transaction2rufnummer(trans), trans->number);
trans->callref = trans->old_callref = ++new_callref;
rc = call_up_setup(trans->callref, transaction2rufnummer(trans), trans->number);
/* rejected by network, release towards BS */
if (rc < 0) {
len = encode_aau(&opcode, &data, Q, 0, cnetz_cause2futln(-rc));
message_send(ident, opcode, data, len);
trans->callref = 0;
PDEBUG(DCNETZ, DEBUG_NOTICE, "Call rejected (cause %d), releasing.\n", -rc);
destroy_transaction(trans);
break;
}
trans->callref = trans->old_callref = call_up_setup(transaction2rufnummer(trans), trans->number, OSMO_CC_NETWORK_CNETZ_NONE, "");
} else {
PDEBUG(DCNETZ, DEBUG_NOTICE, "Call to mobile is alerting.\n");
new_call_state(trans, STATE_MT_ALERTING);

@ -265,7 +265,7 @@ int main(int argc, char *argv[])
printf("Using Speech Channel: SPK-%s\n", kanal[i]);
}
main_mobile(&quit, latency, interval, NULL, station_id, 7);
main_mobile("fuvst", &quit, latency, interval, NULL, station_id, 7);
fail:
/* destroy transceiver instance */

@ -225,7 +225,7 @@ int main(int argc, char *argv[])
goto fail;
}
main_mobile(&quit, latency, interval, NULL, NULL, 0);
main_mobile(NULL, &quit, latency, interval, NULL, NULL, 0);
fail:
/* destroy transceiver instance */

@ -15,6 +15,7 @@ imts_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libsquelch/libsquelch.a \
@ -24,7 +25,6 @@ imts_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
-lm

@ -42,16 +42,13 @@
#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 "imts.h"
#include "dsp.h"
#define CUT_OFF_EMPHASIS_IMTS 796.0 /* FIXME: really 200 uS time constant? */
/* Call reference for calls from mobile station to network
This offset of 0x400000000 is required for MNCC interface. */
static int new_callref = 0x40000000;
/* band info */
#define VHF_LOW 0
#define VHF_HIGH 1
@ -535,17 +532,8 @@ void imts_signal_indication(imts_t *imts)
{
/* setup a call from mobile to base station */
if (imts->mode == MODE_MTS && imts->state == IMTS_IDLE) {
int callref = ++new_callref;
int rc;
PDEBUG_CHAN(DIMTS, DEBUG_INFO, "Detectes RF signal in IDLE mode, calling the opterator at '%s'.\n", imts->operator);
rc = call_up_setup(callref, NULL, imts->operator);
if (rc < 0) {
PDEBUG_CHAN(DANETZ, DEBUG_NOTICE, "Call rejected (cause %d), releasing!\n", -rc);
imts_release(imts);
return;
}
imts->callref = callref;
imts->callref = call_up_setup(NULL, imts->operator, OSMO_CC_NETWORK_MTS_NONE, "");
imts_new_state(imts, IMTS_CONVERSATION);
imts_set_dsp_mode(imts, DSP_MODE_AUDIO, 0, 0.0, 0);
}
@ -864,17 +852,8 @@ static void dial_after_digit(imts_t *imts)
imts->dial_number[++imts->rx_dial_index] = '\0';
timer_start(&imts->timer, DIALING_TO);
} else {
int callref = ++new_callref;
int rc;
PDEBUG_CHAN(DIMTS, DEBUG_INFO, "Timeout receiving dialing from mobile phone, number complete.\n");
rc = call_up_setup(callref, imts->station_id, imts->dial_number);
if (rc < 0) {
PDEBUG_CHAN(DANETZ, DEBUG_NOTICE, "Call rejected (cause %d), releasing!\n", -rc);
imts_release(imts);
return;
}
imts->callref = callref;
imts->callref = call_up_setup(imts->station_id, imts->dial_number, OSMO_CC_NETWORK_IMTS_NONE, "");
imts_new_state(imts, IMTS_CONVERSATION);
imts_set_dsp_mode(imts, DSP_MODE_AUDIO, 0, 0.0, 0);
imts->rx_disc_pulse = 0;

@ -274,7 +274,7 @@ int main(int argc, char *argv[])
printf("Base station on channel %s ready, please tune transmitter to %.3f MHz and receiver to %.3f MHz. (%.3f MHz offset)\n", kanal[i], imts_channel2freq(kanal[i], 0) / 1e6, imts_channel2freq(kanal[i], 1) / 1e6, imts_channel2freq(kanal[i], 2) / 1e6);
}
main_mobile(&quit, latency, interval, NULL, station_id, station_length);
main_mobile((mode == MODE_IMTS) ? "imts" : "mts", &quit, latency, interval, NULL, station_id, station_length);
fail:
/* destroy transceiver instance */

@ -14,6 +14,7 @@ jollycom_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
@ -24,7 +25,6 @@ jollycom_LDADD = \
$(top_builddir)/src/libemphasis/libemphasis.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libg711/libg711.a \

@ -137,15 +137,12 @@
#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 "jolly.h"
#include "dsp.h"
#include "voice.h"
/* Call reference for calls from mobile station to network
This offset of 0x400000000 is required for MNCC interface. */
static int new_callref = 0x40000000;
#define db2level(db) pow(10, (double)db / 20.0)
/* Timers */
@ -390,18 +387,9 @@ void jolly_receive_dtmf(void *priv, char digit, dtmf_meas_t *meas)
break;
}
if (digit == '#') {
int callref = ++new_callref;
int rc;
PDEBUG_CHAN(DJOLLY, DEBUG_INFO, "Received ack digit, entering call state.\n");
timer_stop(&jolly->timer);
rc = call_up_setup(callref, NULL, jolly->dialing);
if (rc < 0) {
PDEBUG_CHAN(DJOLLY, DEBUG_NOTICE, "Call rejected (cause %d), going idle.\n", -rc);
jolly_release(jolly);
break;
}
jolly->callref = callref;
jolly->callref = call_up_setup(NULL, jolly->dialing, OSMO_CC_NETWORK_JOLLYCOM_NONE, "");
jolly_new_state(jolly, STATE_CALL);
}
break;

@ -31,7 +31,6 @@
#include "../libmobile/main_mobile.h"
#include "../libdebug/debug.h"
#include "../libtimer/timer.h"
#include "../libmncc/mncc_sock.h"
#include "../anetz/freiton.h"
#include "../anetz/besetztton.h"
#include "../liboptions/options.h"
@ -199,7 +198,7 @@ int main(int argc, char *argv[])
printf("base station on channel %s ready, please tune transmitter to %.4f MHz and receiver to %.4f MHz. (%.4f MHz offset)\n", kanal[i], dl_freq + step / 1e3 * (double)atoi(kanal[i]), ul_freq + step / 1e3 * (double)atoi(kanal[i]), ul_freq - dl_freq);
}
main_mobile(&quit, latency, interval, NULL, station_id, 4);
main_mobile("jollycom", &quit, latency, interval, NULL, station_id, 4);
fail:
/* destroy transceiver instance */

@ -15,6 +15,7 @@ jtacs_LDADD = \
$(top_builddir)/src/liboptions/liboptions.a \
$(top_builddir)/src/libdebug/libdebug.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libosmocc/libosmocc.a \
$(top_builddir)/src/libdisplay/libdisplay.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
@ -25,7 +26,6 @@ jtacs_LDADD = \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
$(top_builddir)/src/libwave/libwave.a \
$(top_builddir)/src/libmncc/libmncc.a \
$(top_builddir)/src/libsample/libsample.a \
$(top_builddir)/src/libg711/libg711.a \
-lm

@ -10,5 +10,5 @@ int main(int argc, char *argv[])
/* init common tones */
init_tones();
return main_amps_tacs(argc, argv);
return main_amps_tacs("jtacs", argc, argv);
}

@ -19,7 +19,6 @@
#define DEURO 12
#define DFRAME 13
#define DCALL 14
#define DMNCC 15
#define DCC 15
#define DDB 16
#define DTRANS 17

@ -1,15 +0,0 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
noinst_LIBRARIES = libmncc.a
libmncc_a_SOURCES = \
mncc_console.c \
mncc_cross.c \
mncc_sock.c \
testton.c \
cause.c
if HAVE_ALSA
AM_CPPFLAGS += -DHAVE_ALSA
endif

@ -1,347 +0,0 @@
#define MNCC_SETUP_REQ 0x0101
#define MNCC_SETUP_IND 0x0102
#define MNCC_SETUP_RSP 0x0103
#define MNCC_SETUP_CNF 0x0104
#define MNCC_SETUP_COMPL_REQ 0x0105
#define MNCC_SETUP_COMPL_IND 0x0106
/* MNCC_REJ_* is perfomed via MNCC_REL_* */
#define MNCC_CALL_CONF_IND 0x0107
#define MNCC_CALL_PROC_REQ 0x0108
#define MNCC_PROGRESS_REQ 0x0109
#define MNCC_ALERT_REQ 0x010a
#define MNCC_ALERT_IND 0x010b
#define MNCC_NOTIFY_REQ 0x010c
#define MNCC_NOTIFY_IND 0x010d
#define MNCC_DISC_REQ 0x010e
#define MNCC_DISC_IND 0x010f
#define MNCC_REL_REQ 0x0110
#define MNCC_REL_IND 0x0111
#define MNCC_REL_CNF 0x0112
#define MNCC_FACILITY_REQ 0x0113
#define MNCC_FACILITY_IND 0x0114
#define MNCC_START_DTMF_IND 0x0115
#define MNCC_START_DTMF_RSP 0x0116
#define MNCC_START_DTMF_REJ 0x0117
#define MNCC_STOP_DTMF_IND 0x0118
#define MNCC_STOP_DTMF_RSP 0x0119
#define MNCC_MODIFY_REQ 0x011a
#define MNCC_MODIFY_IND 0x011b
#define MNCC_MODIFY_RSP 0x011c
#define MNCC_MODIFY_CNF 0x011d
#define MNCC_MODIFY_REJ 0x011e
#define MNCC_HOLD_IND 0x011f
#define MNCC_HOLD_CNF 0x0120
#define MNCC_HOLD_REJ 0x0121
#define MNCC_RETRIEVE_IND 0x0122
#define MNCC_RETRIEVE_CNF 0x0123
#define MNCC_RETRIEVE_REJ 0x0124
#define MNCC_USERINFO_REQ 0x0125
#define MNCC_USERINFO_IND 0x0126
#define MNCC_REJ_REQ 0x0127
#define MNCC_REJ_IND 0x0128
#define MNCC_PROGRESS_IND 0x0129
#define MNCC_CALL_PROC_IND 0x012a
#define MNCC_CALL_CONF_REQ 0x012b
#define MNCC_START_DTMF_REQ 0x012c
#define MNCC_STOP_DTMF_REQ 0x012d
#define MNCC_HOLD_REQ 0x012e
#define MNCC_RETRIEVE_REQ 0x012f
#define MNCC_BRIDGE 0x0200
#define MNCC_FRAME_RECV 0x0201
#define MNCC_FRAME_DROP 0x0202
#define MNCC_LCHAN_MODIFY 0x0203
#define MNCC_RTP_CREATE 0x0204
#define MNCC_RTP_CONNECT 0x0205
#define MNCC_RTP_FREE 0x0206
#define GSM_TCHF_FRAME 0x0300
#define GSM_TCHF_FRAME_EFR 0x0301
#define GSM_TCHH_FRAME 0x0302
#define GSM_TCH_FRAME_AMR 0x0303
#define ANALOG_8000HZ 0x0380
#define GSM_BAD_FRAME 0x03ff
#define MNCC_SOCKET_HELLO 0x0400
#define GSM_MAX_FACILITY 128
#define GSM_MAX_SSVERSION 128
#define GSM_MAX_USERUSER 128
#define MNCC_F_BEARER_CAP 0x0001
#define MNCC_F_CALLED 0x0002
#define MNCC_F_CALLING 0x0004
#define MNCC_F_REDIRECTING 0x0008
#define MNCC_F_CONNECTED 0x0010
#define MNCC_F_CAUSE 0x0020
#define MNCC_F_USERUSER 0x0040
#define MNCC_F_PROGRESS 0x0080
#define MNCC_F_EMERGENCY 0x0100
#define MNCC_F_FACILITY 0x0200
#define MNCC_F_SSVERSION 0x0400
#define MNCC_F_CCCAP 0x0800
#define MNCC_F_KEYPAD 0x1000
#define MNCC_F_SIGNAL 0x2000
#define GSM_MAX_FACILITY 128
#define GSM_MAX_SSVERSION 128
#define GSM_MAX_USERUSER 128
/* GSM 04.08 Bearer Capability: Information Transfer Capability */
enum gsm48_bcap_itcap {
GSM48_BCAP_ITCAP_SPEECH = 0,
GSM48_BCAP_ITCAP_UNR_DIG_INF = 1,
GSM48_BCAP_ITCAP_3k1_AUDIO = 2,
GSM48_BCAP_ITCAP_FAX_G3 = 3,
GSM48_BCAP_ITCAP_OTHER = 5,
GSM48_BCAP_ITCAP_RESERVED = 7,
};
/* GSM 04.08 Bearer Capability: Transfer Mode */
enum gsm48_bcap_tmod {
GSM48_BCAP_TMOD_CIRCUIT = 0,
GSM48_BCAP_TMOD_PACKET = 1,
};
/* GSM 04.08 Bearer Capability: Coding Standard */
enum gsm48_bcap_coding {
GSM48_BCAP_CODING_GSM_STD = 0,
};
/* GSM 04.08 Bearer Capability: Radio Channel Requirements */
enum gsm48_bcap_rrq {
GSM48_BCAP_RRQ_FR_ONLY = 1,
GSM48_BCAP_RRQ_DUAL_HR = 2,
GSM48_BCAP_RRQ_DUAL_FR = 3,
};
/* GSM 04.08 Bearer Capability: Rate Adaption */
enum gsm48_bcap_ra {
GSM48_BCAP_RA_NONE = 0,
GSM48_BCAP_RA_V110_X30 = 1,
GSM48_BCAP_RA_X31 = 2,
GSM48_BCAP_RA_OTHER = 3,
};
/* GSM 04.08 Bearer Capability: Signaling access protocol */
enum gsm48_bcap_sig_access {
GSM48_BCAP_SA_I440_I450 = 1,
GSM48_BCAP_SA_X21 = 2,
GSM48_BCAP_SA_X28_DP_IN = 3,
GSM48_BCAP_SA_X28_DP_UN = 4,
GSM48_BCAP_SA_X28_NDP = 5,
GSM48_BCAP_SA_X32 = 6,
};
/* GSM 04.08 Bearer Capability: User Rate */
enum gsm48_bcap_user_rate {
GSM48_BCAP_UR_300 = 1,
GSM48_BCAP_UR_1200 = 2,
GSM48_BCAP_UR_2400 = 3,
GSM48_BCAP_UR_4800 = 4,
GSM48_BCAP_UR_9600 = 5,
GSM48_BCAP_UR_12000 = 6,
GSM48_BCAP_UR_1200_75 = 7,
};
/* GSM 04.08 Bearer Capability: Parity */
enum gsm48_bcap_parity {
GSM48_BCAP_PAR_ODD = 0,
GSM48_BCAP_PAR_EVEN = 2,
GSM48_BCAP_PAR_NONE = 3,
GSM48_BCAP_PAR_ZERO = 4,
GSM48_BCAP_PAR_ONE = 5,
};
/* GSM 04.08 Bearer Capability: Intermediate Rate */
enum gsm48_bcap_interm_rate {
GSM48_BCAP_IR_8k = 2,
GSM48_BCAP_IR_16k = 3,
};
/* GSM 04.08 Bearer Capability: Transparency */
enum gsm48_bcap_transp {
GSM48_BCAP_TR_TRANSP = 0,
GSM48_BCAP_TR_RLP = 1,
GSM48_BCAP_TR_TR_PREF = 2,
GSM48_BCAP_TR_RLP_PREF = 3,
};
/* GSM 04.08 Bearer Capability: Modem Type */
enum gsm48_bcap_modem_type {
GSM48_BCAP_MT_NONE = 0,
GSM48_BCAP_MT_V21 = 1,
GSM48_BCAP_MT_V22 = 2,
GSM48_BCAP_MT_V22bis = 3,
GSM48_BCAP_MT_V23 = 4,
GSM48_BCAP_MT_V26ter = 5,
GSM48_BCAP_MT_V32 = 6,
GSM48_BCAP_MT_UNDEF = 7,
GSM48_BCAP_MT_AUTO_1 = 8,
};
/* GSM 04.08 Bearer Capability: Speech Version Indication */
enum gsm48_bcap_speech_ver {
GSM48_BCAP_SV_FR = 0,
GSM48_BCAP_SV_HR = 1,
GSM48_BCAP_SV_EFR = 2,
GSM48_BCAP_SV_AMR_F = 4,
GSM48_BCAP_SV_AMR_H = 5,
BCAP_ANALOG_8000HZ = 0x80,
};
/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
struct gsm_mncc_bearer_cap {
int transfer; /* Information Transfer Capability */
int mode; /* Transfer Mode */
int coding; /* Coding Standard */
int radio; /* Radio Channel Requirement */
int speech_ctm; /* CTM text telephony indication */
int speech_ver[8]; /* Speech version indication */
struct {
enum gsm48_bcap_ra rate_adaption;
enum gsm48_bcap_sig_access sig_access;
int async;
int nr_stop_bits;
int nr_data_bits;
enum gsm48_bcap_user_rate user_rate;
enum gsm48_bcap_parity parity;
enum gsm48_bcap_interm_rate interm_rate;
enum gsm48_bcap_transp transp;
enum gsm48_bcap_modem_type modem_type;
} data;
};
struct gsm_mncc_number {
int type;
int plan;
int present;
int screen;
char number[33];
};
struct gsm_mncc_cause {
int location;
int coding;
int rec;
int rec_val;
int value;
int diag_len;
char diag[32];
};
struct gsm_mncc_useruser {
int proto;
char info[GSM_MAX_USERUSER + 1]; /* + termination char */
};
struct gsm_mncc_progress {
int coding;
int location;
int descr;
};
struct gsm_mncc_facility {
int len;
char info[GSM_MAX_FACILITY];
};
struct gsm_mncc_ssversion {
int len;
char info[GSM_MAX_SSVERSION];
};
struct gsm_mncc_cccap {
int dtmf;
int pcp;
};
enum {
GSM_MNCC_BCAP_SPEECH = 0,
GSM_MNCC_BCAP_UNR_DIG = 1,
GSM_MNCC_BCAP_AUDIO = 2,
GSM_MNCC_BCAP_FAX_G3 = 3,
GSM_MNCC_BCAP_OTHER_ITC = 5,
GSM_MNCC_BCAP_RESERVED = 7,
};
enum {
GSM_LCHAN_NONE,
GSM_LCHAN_SDCCH,
GSM_LCHAN_TCH_F,
GSM_LCHAN_TCH_H,
GSM_LCHAN_UNKNOWN,
GSM_LCHAN_CCCH,
GSM_LCHAN_PDTCH,
_GSM_LCHAN_MAX
};
struct gsm_mncc {
/* context based information */
uint32_t msg_type;
uint32_t callref;
/* which fields are present */
uint32_t fields;
/* data derived informations (MNCC_F_ based) */
struct gsm_mncc_bearer_cap bearer_cap;
struct gsm_mncc_number called;
struct gsm_mncc_number calling;
struct gsm_mncc_number redirecting