summaryrefslogtreecommitdiffstats
path: root/gsm.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2010-10-31 17:12:26 +0100
committerAndreas Eversberg2010-12-13 09:06:49 +0100
commit8a4387be03a34632a6c0cc1d997c74d98f2fb1ae (patch)
treeb6694f41d04ed08859b2b3295596acf76031bcfa /gsm.cpp
parentAdding forwarding of DTMF and keypad between peers (diff)
downloadlcr-8a4387be03a34632a6c0cc1d997c74d98f2fb1ae.tar.gz
lcr-8a4387be03a34632a6c0cc1d997c74d98f2fb1ae.tar.xz
lcr-8a4387be03a34632a6c0cc1d997c74d98f2fb1ae.zip
Completed GSM mobile station support with OsmocomBB
OsmocomBB stack can now be attached to LCRl
Diffstat (limited to 'gsm.cpp')
-rw-r--r--gsm.cpp35
1 files changed, 33 insertions, 2 deletions
diff --git a/gsm.cpp b/gsm.cpp
index 7507f33..7245632 100644
--- a/gsm.cpp
+++ b/gsm.cpp
@@ -231,9 +231,9 @@ void Pgsm::frame_send(void *_frame)
}
-void Pgsm::frame_receive(void *_frame)
+void Pgsm::frame_receive(void *arg)
{
- struct gsm_data_frame *frame = (struct gsm_data_frame *)_frame;
+ struct gsm_data_frame *frame = (struct gsm_data_frame *)arg;
signed short samples[160];
unsigned char data[160];
int i;
@@ -384,10 +384,34 @@ void Pgsm::call_conf_ind(unsigned int msg_type, unsigned int callref, struct gsm
}
+/* CALL PROCEEDING INDICATION */
+void Pgsm::call_proc_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc)
+{
+ struct lcr_msg *message;
+ struct gsm_mncc *frame;
+
+ gsm_trace_header(p_m_mISDNport, this, msg_type, DIRECTION_IN);
+ end_trace();
+
+ message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_PROCEEDING);
+ message_put(message);
+
+ new_state(PORT_STATE_OUT_PROCEEDING);
+
+ if (p_m_mISDNport->earlyb && !p_m_g_tch_connected) { /* only if ... */
+ gsm_trace_header(p_m_mISDNport, this, MNCC_FRAME_RECV, DIRECTION_OUT);
+ end_trace();
+ frame = create_mncc(MNCC_FRAME_RECV, p_m_g_callref);
+ send_and_free_mncc(p_m_g_instance, frame->msg_type, frame);
+ p_m_g_tch_connected = 1;
+ }
+}
+
/* ALERTING INDICATION */
void Pgsm::alert_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc)
{
struct lcr_msg *message;
+ struct gsm_mncc *frame;
gsm_trace_header(p_m_mISDNport, this, msg_type, DIRECTION_IN);
end_trace();
@@ -397,6 +421,13 @@ void Pgsm::alert_ind(unsigned int msg_type, unsigned int callref, struct gsm_mnc
new_state(PORT_STATE_OUT_ALERTING);
+ if (p_m_mISDNport->earlyb && !p_m_g_tch_connected) { /* only if ... */
+ gsm_trace_header(p_m_mISDNport, this, MNCC_FRAME_RECV, DIRECTION_OUT);
+ end_trace();
+ frame = create_mncc(MNCC_FRAME_RECV, p_m_g_callref);
+ send_and_free_mncc(p_m_g_instance, frame->msg_type, frame);
+ p_m_g_tch_connected = 1;
+ }
}
/* CONNECT INDICATION */