X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=mISDN.cpp;h=1bb9362f31b67d1ff7e31140cd9c88983cc33c0a;hp=3e1d0e4a4f931f1087e9d5af93ae6c355f7a496d;hb=57549529c86785b7ecf5f56d2a3ff42b5e519755;hpb=26c7e0d22ead805ce333ea4248c7311c1eda5de0 diff --git a/mISDN.cpp b/mISDN.cpp index 3e1d0e4..1bb9362 100644 --- a/mISDN.cpp +++ b/mISDN.cpp @@ -221,7 +221,7 @@ static struct isdn_message { {"PH_DEACTIVATE", L1_DEACTIVATE_REQ}, {"DL_ESTABLISH", L2_ESTABLISH_REQ}, {"DL_RELEASE", L2_RELEASE_REQ}, - {"UNKNOWN", L3_UNKNOWN}, + {"UNKNOWN", L3_UNKNOWN_REQ}, {"MT_TIMEOUT", L3_TIMEOUT_REQ}, {"MT_SETUP", L3_SETUP_REQ}, {"MT_SETUP_ACK", L3_SETUP_ACKNOWLEDGE_REQ}, @@ -270,6 +270,7 @@ void l1l2l3_trace_header(struct mISDNport *mISDNport, class PmISDN *port, unsign i = 0; while(isdn_message[i].name) { +// if (msg == L3_NOTIFY_REQ) printf("val = %x %s\n", isdn_message[i].value, isdn_message[i].name); if (isdn_message[i].value == (msg&0xffffff00)) { SCPY(msgtext, isdn_message[i].name); @@ -1534,7 +1535,7 @@ void PmISDN::set_echotest(int echo) */ void PmISDN::set_tone(const char *dir, const char *tone) { - int id; + int id = TONE_OFF; if (!tone) tone = ""; @@ -1560,11 +1561,9 @@ void PmISDN::set_tone(const char *dir, const char *tone) Port::set_tone(dir, tone); return; } - if (p_tone_dir[0]) - goto nodsp; /* now we USE dsp-tone, convert name */ - else if (!strcmp(tone, "dialtone")) + if (!strcmp(tone, "dialtone")) { switch(options.dsptones) { case DSP_AMERICAN: id = TONE_AMERICAN_DIALTONE; break; @@ -2125,7 +2124,7 @@ int do_layer3(struct mlayer3 *ml3, unsigned int cmd, unsigned int pid, struct l3 /* * global function to add a new card (port) */ -struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt, int te_special, int l2hold, struct interface *interface) +struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt, int te_special, int l1hold, int l2hold, struct interface *interface) { int ret; struct mISDNport *mISDNport, **mISDNportp; @@ -2311,6 +2310,8 @@ struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt prop |= (1 << MISDN_FLG_PTP); if (nt) // supports hold/retrieve on nt-mode prop |= (1 << MISDN_FLG_NET_HOLD); + if (l1hold) // supports layer 1 hold + prop |= (1 << MISDN_FLG_L1_HOLD); if (l2hold) // supports layer 2 hold prop |= (1 << MISDN_FLG_L2_HOLD); /* queue must be initializes, because l3-thread may send messages during open_layer3() */ @@ -2356,6 +2357,7 @@ struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt mISDNport->tespecial = te_special; mISDNport->pri = pri; mISDNport->ptp = ptp; + mISDNport->l1hold = l1hold; mISDNport->l2hold = l2hold; PDEBUG(DEBUG_ISDN, "Port has %d b-channels.\n", mISDNport->b_num); i = 0;