aboutsummaryrefslogtreecommitdiffstats
path: root/src/telnet_interface.c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-01-04 03:50:40 +0000
committerHolger Freyther <zecke@selfish.org>2009-01-04 03:50:40 +0000
commit3ae8fd2acb53dc9ab7e8d7ce6fb8947cf6882c7e (patch)
tree40c6dd134dea24ea4a1a9acbf9de10db6eab36b3 /src/telnet_interface.c
parentf87573dc4e8e22e81ab6f9e4e9a241bba747fe52 (diff)
Implement the call command...
Passing of an origin is missing this will need work in gsm_04_08.
Diffstat (limited to 'src/telnet_interface.c')
-rw-r--r--src/telnet_interface.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/telnet_interface.c b/src/telnet_interface.c
index dc93df192..72a71becd 100644
--- a/src/telnet_interface.c
+++ b/src/telnet_interface.c
@@ -28,6 +28,7 @@
#include <openbsc/telnet_interface.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/chan_alloc.h>
+#include <openbsc/gsm_04_08.h>
extern void telnet_parse(struct telnet_connection *connection, char *line);
@@ -185,7 +186,17 @@ void telnet_get_channel(struct telnet_connection *connection, const char *imsi)
void telnet_call(struct telnet_connection *connection, const char* imsi,
const char *origin) {
- printf("calling: '%s' from: '%s'\n", imsi, origin);
+ static const char* error[] = {
+ "call: IMSI not found\n",
+ "call: No channel allocated for IMSI\n" };
+ struct gsm_bts *bts = &connection->network->bts[connection->bts];
+ struct gsm_lchan *lchan = find_channel(bts, imsi, error, connection->fd.fd);
+
+ if (!lchan)
+ return;
+
+ /* TODO: add the origin */
+ gsm48_cc_tx_setup(lchan);
}
void telnet_send_gsm_48(struct telnet_connection *connection) {