aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz/anetz.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-10-30 08:00:47 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-11-05 16:59:59 +0100
commitaeb31a7a34fc2accd0c840d7d8e91bc4a946c7d9 (patch)
tree0ff5c0e34c1d314647af1011f75aa7b9f9802a03 /src/anetz/anetz.c
parentca6d70566c339eb24aca8af29f8000008e53184a (diff)
A-Netz: Number of operator can be defined now
Since A-Netz does not allow automatic dialing, the call is forwarded to an operator. Use -O <number> to change the default operator's number.
Diffstat (limited to 'src/anetz/anetz.c')
-rw-r--r--src/anetz/anetz.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index e6b9d1e..e5a3774 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -186,7 +186,7 @@ static void anetz_timeout(struct timer *timer);
static void anetz_go_idle(anetz_t *anetz);
/* Create transceiver instance and link to a list. */
-int anetz_create(int kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double page_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db)
+int anetz_create(int kanal, const char *audiodev, int use_sdr, int samplerate, double rx_gain, double page_gain, int page_sequence, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, double squelch_db, const char *operator)
{
anetz_t *anetz;
int rc;
@@ -202,6 +202,8 @@ int anetz_create(int kanal, const char *audiodev, int use_sdr, int samplerate, d
return -EIO;
}
+ anetz->operator = operator;
+
PDEBUG(DANETZ, DEBUG_DEBUG, "Creating 'A-Netz' instance for 'Kanal' = %d (sample rate %d).\n", kanal, samplerate);
/* init general part of transceiver */
@@ -328,7 +330,7 @@ void anetz_receive_tone(anetz_t *anetz, int tone)
int rc;
PDEBUG_CHAN(DANETZ, DEBUG_INFO, "1750 Hz signal from mobile station is gone, setup call.\n");
- rc = call_up_setup(callref, NULL, "010");
+ 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);