summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ebdd133)
modified: README
modified: lcradmin.c
modified: lcrsocket.h
modified: mISDN.cpp
modified: mISDN.h
modified: socket_server.c
- chan_lcr: Fixed compile problem with newer versions.
- chan_lcr: Open b-channel if asterisk indicates "PROGRESS".
-> Also if tones are available, asterisk gets "PROGRESS" indication.
- chan_lcr: Fixed compile problem with newer versions.
- chan_lcr: Open b-channel if asterisk indicates "PROGRESS".
-> Also if tones are available, asterisk gets "PROGRESS" indication.
+- lcradmin displays TEI values in NT-mode PTMP
if (m[i].u.i.block >= 2)
{
if (m[i].u.i.portnum < 0)
if (m[i].u.i.block >= 2)
{
if (m[i].u.i.portnum < 0)
- SPRINT(buffer, "%s (port ?: %s)%s", m[i].u.i.interface_name, m[i].u.i.portname, (m[i].u.i.extension)?" extension":"");
+ SPRINT(buffer, "%s (port ?: %s)%s", m[i].u.i.interface_name, m[i].u.i.portname, (m[i].u.i.extension)?" exten":"");
else
SPRINT(buffer, "%s (port %d: %s)%s", m[i].u.i.interface_name, m[i].u.i.portnum, m[i].u.i.portname, (m[i].u.i.extension)?" extension":"");
addstr(buffer);
else
SPRINT(buffer, "%s (port %d: %s)%s", m[i].u.i.interface_name, m[i].u.i.portnum, m[i].u.i.portname, (m[i].u.i.extension)?" extension":"");
addstr(buffer);
SPRINT(buffer, "(port %d: %s)", m[i].u.i.portnum, m[i].u.i.portname);
addstr(buffer);
color(cyan);
SPRINT(buffer, "(port %d: %s)", m[i].u.i.portnum, m[i].u.i.portname);
addstr(buffer);
color(cyan);
- SPRINT(buffer, " %s %s%s%s%s", (m[i].u.i.ntmode)?"NT-mode":"TE-mode", (m[i].u.i.ptp)?"ptp":"ptmp", (m[i].u.i.l1hold)?" l1hold":"", (m[i].u.i.l2hold)?" l2hold":"", (m[i].u.i.extension)?" extension":"");
+ SPRINT(buffer, " %s %s%s%s%s", (m[i].u.i.ntmode)?"NT":"TE", (m[i].u.i.ptp)?"ptp":"ptmp", (m[i].u.i.l1hold)?" l1hold":"", (m[i].u.i.l2hold)?" l2hold":"", (m[i].u.i.extension)?" extension":"");
addstr(buffer);
if (m[i].u.i.use)
color(green);
addstr(buffer);
if (m[i].u.i.use)
color(green);
{
color((m[i].u.i.l2link > 0)?green:red);
if (m[i].u.i.l2link < 0)
{
color((m[i].u.i.l2link > 0)?green:red);
if (m[i].u.i.l2link < 0)
else
addstr((m[i].u.i.l2link)?" L2 UP":" L2 down");
else
addstr((m[i].u.i.l2link)?" L2 UP":" L2 down");
+ } else
+ {
+ k = 0;
+ color(green);
+ j = 0;
+ while(j < 128)
+ {
+ if (m[i].u.i.l2mask[j>>3] & (1 << (j&7)))
+ {
+ SPRINT(buffer, "%s%d", k?",":" TEI(", j);
+ addstr(buffer);
+ k = 1;
+ }
+ j++;
+ }
+ if (k)
+ addstr(")");
}
color((m[i].u.i.l1link > 0)?green:blue);
if (m[i].u.i.l1link < 0)
}
color((m[i].u.i.l1link > 0)?green:blue);
if (m[i].u.i.l1link < 0)
- addstr((m[i].u.i.l1link)?" L1 ACTIVE":" L1 inactive");
+ addstr((m[i].u.i.l1link)?" L1 UP":" L1 down");
if (m[i].u.i.los)
{
color(red);
if (m[i].u.i.los)
{
color(red);
int use; /* number of ports that use this interface */
int l1link; /* down(0) or up(1) */
int l2link; /* down(0) or up(1) */
int use; /* number of ports that use this interface */
int l1link; /* down(0) or up(1) */
int l2link; /* down(0) or up(1) */
+ unsigned char l2mask[16]; /* one bit for each tei */
int los, ais, rdi, slip_tx, slip_rx;
int channels;
char busy[256]; /* if port is idle(0) busy(1) */
int los, ais, rdi, slip_tx, slip_rx;
int channels;
char busy[256]; /* if port is idle(0) busy(1) */
if (options.deb & DEBUG_STACK)
{
SPRINT(filename, "%s/debug_mISDN.log", LOG_DIR);
if (options.deb & DEBUG_STACK)
{
SPRINT(filename, "%s/debug_mISDN.log", LOG_DIR);
- mISDN_debug_init(0xffffffff, filename, filename, filename);
+ mISDN_debug_init(0xfffffeff, filename, filename, filename);
} else
mISDN_debug_init(0, NULL, NULL, NULL);
} else
mISDN_debug_init(0, NULL, NULL, NULL);
add_trace("tei", NULL, "%d", l3m->pid);
end_trace();
mISDNport->l2link = 1;
add_trace("tei", NULL, "%d", l3m->pid);
end_trace();
mISDNport->l2link = 1;
+ if (l3m->pid < 128)
+ mISDNport->l2mask[l3m->pid >> 3] |= (1 << (l3m->pid & 7));
if ((!mISDNport->ntmode || mISDNport->ptp) && l3m->pid < 127)
{
if (mISDNport->l2establish)
if ((!mISDNport->ntmode || mISDNport->ptp) && l3m->pid < 127)
{
if (mISDNport->l2establish)
break;
case MT_L2RELEASE:
break;
case MT_L2RELEASE:
+ if (l3m->pid < 128)
+ mISDNport->l2mask[l3m->pid >> 3] &= ~(1 << (l3m->pid & 7));
if (!mISDNport->l2establish)
{
l1l2l3_trace_header(mISDNport, NULL, L2_RELEASE_IND, DIRECTION_IN);
if (!mISDNport->l2establish)
{
l1l2l3_trace_header(mISDNport, NULL, L2_RELEASE_IND, DIRECTION_IN);
int ptp; /* if ptp is set, we keep track of l2link */
int l1link; /* if l1 is available (only works with nt-mode) */
int l2link; /* if l2 is available (at PTP we take this serious) */
int ptp; /* if ptp is set, we keep track of l2link */
int l1link; /* if l1 is available (only works with nt-mode) */
int l2link; /* if l2 is available (at PTP we take this serious) */
+ unsigned char l2mask[16]; /* 128 bits for each tei */
int l1hold; /* set, if layer 1 should be holt */
int l2hold; /* set, if layer 2 must be hold/checked */
time_t l2establish; /* time until establishing after link failure */
int l1hold; /* set, if layer 1 should be holt */
int l2hold; /* set, if layer 2 must be hold/checked */
time_t l2establish; /* time until establishing after link failure */
response->am[num].u.i.l1link = mISDNport->l1link;
/* l2link */
response->am[num].u.i.l2link = mISDNport->l2link;
response->am[num].u.i.l1link = mISDNport->l1link;
/* l2link */
response->am[num].u.i.l2link = mISDNport->l2link;
+ memcpy(response->am[num].u.i.l2mask, mISDNport->l2mask, 16);
/* los */
response->am[num].u.i.los = mISDNport->los;
/* ais */
/* los */
response->am[num].u.i.los = mISDNport->los;
/* ais */