- /* set serial on bchannel message
- * also ref is given, so we send message with ref */
- if (message_type == MESSAGE_BCHANNEL) {
- int i = p_m_b_index;
- unsigned int portid = (mISDNloop.port<<8) + i+1+(i>=15);
- switch (param->bchannel.type) {
- case BCHANNEL_REQUEST:
- p_m_r_handle = portid;
- message_bchannel_to_remote(p_m_r_remote_id, p_m_r_ref, BCHANNEL_ASSIGN, portid, 0, 0, 0, 0, 0, 0, 1);
- chan_trace_header(p_m_mISDNport, this, "MESSAGE_BCHANNEL (to remote application)", DIRECTION_NONE);
- add_trace("type", NULL, "assign");
- add_trace("channel", NULL, "%d.%d", portid>>8, portid&0xff);
- end_trace();
- break;
- case BCHANNEL_RELEASE:
- p_m_r_handle = 0;
- message_bchannel_to_remote(p_m_r_remote_id, p_m_r_ref, BCHANNEL_REMOVE, portid, 0, 0, 0, 0, 0, 0, 1);
- chan_trace_header(p_m_mISDNport, this, "MESSAGE_BCHANNEL (to remote application)", DIRECTION_NONE);
- add_trace("type", NULL, "remove");
- add_trace("channel", NULL, "%d.%d", portid>>8, portid&0xff);
- end_trace();
- break;
- }
- return;
+ new_state(PORT_STATE_IN_SETUP);
+ break;
+
+ case MESSAGE_PROCEEDING:
+ new_state(PORT_STATE_OUT_PROCEEDING);
+ break;
+
+ case MESSAGE_ALERTING:
+ new_state(PORT_STATE_OUT_ALERTING);
+ break;
+
+ case MESSAGE_CONNECT:
+ new_state(PORT_STATE_CONNECT);
+ break;
+
+ case MESSAGE_DISCONNECT:
+ new_state(PORT_STATE_IN_DISCONNECT);
+ break;
+
+ case MESSAGE_RELEASE:
+ new_state(PORT_STATE_RELEASE);
+ break;