From 3ae8fd2acb53dc9ab7e8d7ce6fb8947cf6882c7e Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sun, 4 Jan 2009 03:50:40 +0000 Subject: Implement the call command... Passing of an origin is missing this will need work in gsm_04_08. --- src/telnet_interface.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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 #include #include +#include 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) { -- cgit v1.2.3