+ * incoming setup from LCR
+ */
+static void lcr_in_setup(struct chan_call *call, int message_type, union parameter *param)
+{
+ struct ast_channel *ast;
+ union parameter newparam;
+
+ /* create asterisk channel instrance */
+ ast = ast_channel_alloc(1);
+ if (!ast)
+ {
+ /* release */
+ memset(&newparam, 0, sizeof(union parameter));
+ newparam.disconnectinfo.cause = CAUSE_RESSOURCEUNAVAIL;
+ newparam.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;
+ send_message(MESSAGE_RELEASE, call->ref, &newparam);
+ /* remove call */
+ free_call(call);
+ return;
+ }
+ /* set ast pointer */
+ call->ast = ast;
+
+ /* fill setup information */
+#warning todo: setup-info reinschreiben
+
+ /* send setup to asterisk */
+#warning todo: setup bei der asterisk triggern
+
+ /* change state */
+ call->state = CHAN_LCR_STATE_IN_SETUP;
+}
+
+/*
+ * incoming setup acknowledge from LCR
+ */
+static void lcr_in_overlap(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* send pending digits in dialque */
+ if (call->dialque)
+ send_dialing_to_lcr(call);
+ /* change to overlap state */
+ call->state = CHAN_LCR_STATE_OUT_DIALING;
+}
+
+/*
+ * incoming proceeding from LCR
+ */
+static void lcr_in_proceeding(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* change state */
+ call->state = CHAN_LCR_STATE_OUT_PROCEEDING;
+ /* send event to asterisk */
+ ast_queue_... todo
+}
+
+/*
+ * incoming alerting from LCR
+ */
+static void lcr_in_alerting(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* change state */
+ call->state = CHAN_LCR_STATE_OUT_ALERTING;
+ /* send event to asterisk */
+ ast_queue_... todo
+}
+
+/*
+ * incoming connect from LCR
+ */
+static void lcr_in_connect(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* change state */
+ call->state = CHAN_LCR_STATE_CONNECT;
+ /* copy connectinfo */
+ todo
+ /* send event to asterisk */
+ ast_queue_... todo
+}
+
+/*
+ * incoming disconnect from LCR
+ */
+static void lcr_in_disconnect(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* change state */
+ call->state = CHAN_LCR_STATE_IN_DISCONNECT;
+ /* copy disconnect info */
+ todo
+ /* send event to asterisk */
+ ast_queue_... todo
+}
+
+/*
+ * incoming setup acknowledge from LCR
+ */
+static void lcr_in_release(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* release ref */
+ call->ref = NULL;
+ /* change to release state */
+ call->state = CHAN_LCR_STATE_RELEASE;
+ /* copy release info */
+ todo
+ /* if we have an asterisk instance, send hangup, else we are done */
+ if (call->ast)
+ {
+ ast_queue_hangup(call->ast);
+ } else
+ {
+ free_call(call);
+ }
+
+}
+
+/*
+ * incoming information from LCR
+ */
+static void lcr_in_information(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* copy digits */
+ todo and write them, maybe queue them for asterisk
+ /* send event to asterisk */
+ ast_queue_... todo
+}
+
+/*
+ * incoming information from LCR
+ */
+static void lcr_in_facility(struct chan_call *call, int message_type, union parameter *param)
+{
+ /* copy progress info */
+ todo and write them, maybe queue them for asterisk
+ /* send event to asterisk */
+ ast_queue_... todo
+ or maybe use bride info to forward facility.
+}
+
+/*