}
i++;
}
+ trace_header("CHANNEL SELECTION (no channel is 'free')", DIRECTION_NONE);
+ add_trace("port", NULL, "%d", ifport->portnum);
+ add_trace("position", NULL, "%d", index);
+ end_trace();
break;
case CHANNEL_ANY: /* don't ask for channel */
if (mISDNport->b_reserved >= mISDNport->b_num)
{
+ trace_header("CHANNEL SELECTION (cannot ask for 'any' channel, all reserved)", DIRECTION_NONE);
+ add_trace("port", NULL, "%d", ifport->portnum);
+ add_trace("position", NULL, "%d", index);
+ add_trace("total", NULL, "%d", mISDNport->b_num);
+ add_trace("reserved", NULL, "%d", mISDNport->b_reserved);
+ end_trace();
break; /* all channel in use or reserverd */
}
- trace_header("CHANNEL SELECTION (using 'any channel')", DIRECTION_NONE);
+ trace_header("CHANNEL SELECTION (using 'any' channel)", DIRECTION_NONE);
add_trace("port", NULL, "%d", ifport->portnum);
add_trace("position", NULL, "%d", index);
end_trace();
break;
case CHANNEL_NO: /* call waiting */
- trace_header("CHANNEL SELECTION (using 'no channel', call-waiting)", DIRECTION_NONE);
+ trace_header("CHANNEL SELECTION (using 'no' channel, call-waiting)", DIRECTION_NONE);
add_trace("port", NULL, "%d", ifport->portnum);
add_trace("position", NULL, "%d", index);
end_trace();
default:
if (selchannel->channel<1 || selchannel->channel==16)
+ {
+ trace_header("CHANNEL SELECTION (channel out of range)", DIRECTION_NONE);
+ add_trace("port", NULL, "%d", ifport->portnum);
+ add_trace("position", NULL, "%d", index);
+ add_trace("channel", NULL, "%d", selchannel->channel);
+ end_trace();
break; /* invalid channels */
+ }
i = selchannel->channel-1-(selchannel->channel>=17);
if (i >= mISDNport->b_num)
+ {
+ trace_header("CHANNEL SELECTION (channel out of range)", DIRECTION_NONE);
+ add_trace("port", NULL, "%d", ifport->portnum);
+ add_trace("position", NULL, "%d", index);
+ add_trace("channel", NULL, "%d", selchannel->channel);
+ add_trace("channels", NULL, "%d", mISDNport->b_num);
+ end_trace();
break; /* channel not in port */
+ }
if (mISDNport->b_port[i] == NULL)
{
*channel = selchannel->channel;
"This parameter must follow a 'port' parameter."},
#if 0
+ {"layer2keep", &inter_layer2keep, "yes | no",
+ "By default, layer 2 is establised and kept up on PTP interfaces.\n"
+ ".\n"
+ "This parameter must follow a 'port' parameter."},
+#endif
+
+#if 0
#warning todo: filter, also in the PmISDN object
{"filter", &inter_filter, "<filter> [parameters]",
"Adds/appends a filter. Filters are ordered in transmit direction.\n"
message_put(message);
break;
+ default:
+ chan_trace_header(p_m_mISDNport, this, "BCHANNEL control", DIRECTION_IN);
+ add_trace("unknown", NULL, "0x%x", cont);
+ end_trace();
+ }
+ return;
+ }
+#ifdef SOCKET_MISDN
+ if (hh->prim == PH_SIGNAL_IND)
+#else
+ if (frm->prim == (PH_SIGNAL | INDICATION))
+#endif
+ {
+ switch(frm->dinfo)
+ {
case CMX_TX_DATA:
if (!p_m_txdata)
{
PDEBUG(DEBUG_BCHANNEL, "PmISDN(%s) ignoring tx data, because 'txdata' is turned off\n", p_name);
return;
}
+ /* see below (same condition) */
+ if (p_state!=PORT_STATE_CONNECT
+ && !p_m_mISDNport->tones)
+ break;
+// printf(".");fflush(stdout);return;
if (p_record)
- record((unsigned char *)(cont+1), len - 4, 1); // from up
+ record(data, len, 1); // from up
break;
default:
- chan_trace_header(p_m_mISDNport, this, "BCHANNEL control", DIRECTION_IN);
- add_trace("unknown", NULL, "0x%x", cont);
+ chan_trace_header(p_m_mISDNport, this, "BCHANNEL signal", DIRECTION_IN);
+ add_trace("unknown", NULL, "0x%x", frm->dinfo);
end_trace();
}
return;
#endif
return;
}
-
/* calls will not process any audio data unless
* the call is connected OR interface features audio during call setup.
*/
//printf("%d -> %d prim=%x joindata=%d tones=%d\n", p_serial, ACTIVE_EPOINT(p_epointlist), frm->prim, p_m_joindata, p_m_mISDNport->earlyb);
#ifndef DEBUG_COREBRIDGE
if (p_state!=PORT_STATE_CONNECT
- && !p_m_mISDNport->earlyb)
+ && !p_m_mISDNport->tones)
return;
#endif
case PH_DATA | INDICATION:
case DL_DATA | INDICATION:
case PH_CONTROL | INDICATION:
+ case PH_SIGNAL | INDICATION:
i = 0;
while(i < mISDNport->b_num)
{