#ifdef WITH_MISDN
struct mISDNport *mISDNport;
int channel = 0;
- int earlyb;
int mode = B_MODE_TRANSPARENT;
/* hunt for mISDNport and create Port */
port = ss5_hunt_line(mISDNport);
else
#endif
- earlyb = mISDNport->earlyb;
#ifdef ISDN_P_FXS_POTS
if (mISDNport->pots)
port = new Pfxs(PORT_TYPE_POTS_FXS_OUT, mISDNport, portname, &port_settings, mISDNport->ifport->interface, mode);
class Join *join;
class JoinPBX *joinpbx;
struct join_relation *relation;
- int vbox;
/* find an endpoint that is ringing internally or vbox with higher priority */
- vbox = 0;
found = NULL;
eapp = apppbx_first;
while(eapp) {
if (port->p_type == PORT_TYPE_VBOX_OUT) {
if (match_list(extensions, eapp->e_ext.number)) {
found = eapp;
- vbox = 1;
break;
}
}
struct lcr_msg *message;
const char *errstr = "";
class Port *port;
- int type, key_len;
+ int key_len;
unsigned char *key;
char *auth_pointer, *crypt_pointer, *key_pointer;
int ret;
goto reject;
}
if (!strcasecmp(crypt_pointer, "blowfish")) {
- type = CC_ACTBF_REQ;
+// type = CC_ACTBF_REQ;
if (key_len < 4) {
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) Key too short.\n", ea_endpoint->ep_serial);
errstr = "Key Too Short";
{
l3_msg *l3m;
int type, plan, present, screen;
- class Endpoint *epoint;
time_t current_time;
/* NT-MODE in setup state we must send PROCEEDING first */
// enc_facility_centrex(&connect->FACILITY, dmsg, (unsigned char *)p_connectinfo.name, 0);
/* date & time */
if (p_m_d_ntmode || p_m_d_tespecial) {
- epoint = find_epoint_id(epoint_id);
time(¤t_time);
enc_ie_date(l3m, current_time, p_settings.no_seconds);
}
void Pdss1::message_release(unsigned int epoint_id, int message_id, union parameter *param)
{
l3_msg *l3m;
- class Endpoint *epoint;
char *p = NULL;
/*
/* send cause */
enc_ie_cause(l3m, (p_m_mISDNport->locally && param->disconnectinfo.location==LOCATION_PRIVATE_LOCAL)?LOCATION_PRIVATE_LOCAL:param->disconnectinfo.location, param->disconnectinfo.cause);
/* send display */
- epoint = find_epoint_id(epoint_id);
if (param->disconnectinfo.display[0])
p = param->disconnectinfo.display;
if (p) if (*p && (p_m_d_ntmode || p_m_d_tespecial))
FILE *fp;
int i = 0, j, jj, n;
char input[256], file[256];
- int ret;
+ int __attribute__((__unused__)) ret;
printf("\n\nThis program generates a script, which is used to start/stop/restart mISDN\n");
printf("driver. Please select card only once. Mode and options are given by LCR.\n");
int mISDN_initialize(void)
{
char filename[256];
- int ver;
/* try to open raw socket to check kernel */
mISDNsocket = socket(PF_ISDN, SOCK_RAW, ISDN_P_BASE);
// set debug printout function
myfn.prt_debug = my_mISDNlib_debug;
- ver = init_layer3(4, &myfn); // buffer of 4
+ init_layer3(4, &myfn); // buffer of 4
/* open debug, if enabled and not only stack debugging */
if (options.deb) {
class PmISDN *b_port = mISDNport->b_port[i];
int state = mISDNport->b_state[i];
int timer = -1; // no change
+#if 0
int p_m_tx_gain = 0;
int p_m_rx_gain = 0;
char *p_m_pipeline = NULL;
p_m_crypt_key_len = b_port->p_m_crypt_key_len;
p_m_crypt_key_type = /*b_port->p_m_crypt_key_type*/1;
}
+#endif
switch(event) {
case B_EVENT_USE:
struct mbuffer *mb;
struct l3_msg *l3m;
char byte;
- int ret;
+ int __attribute__((__unused__)) ret;
/* unset global semaphore */
upqueue_avail = 0;
// this is no problem.
upqueue_avail = 1;
char byte = 0;
- int ret;
+ int __attribute__((__unused__)) ret;
ret = write(upqueue_pipe[1], &byte, 1);
}
return 0;
return (port);
}
+#ifdef ISDN_P_FXS_POTS
/* handle frames from pots */
static int pots_sock_callback(struct lcr_fd *fd, unsigned int what, void *instance, int i)
{
case PH_CONTROL_IND:
cont = *((unsigned int *)(buffer + MISDN_HEADER_LEN));
/* l1-control is sent to LCR */
-#ifdef ISDN_P_FXS_POTS
if (mISDNport->ntmode)
stack2manager_fxs(mISDNport, cont);
else
PERROR("FXO not supported!\n");
-#endif
break;
case PH_ACTIVATE_REQ:
break;
return 0;
}
+#endif
/*
* global function to add a new card (port)
/* query available isdn ports */
if (!(strcasecmp(argv[1],"query"))) {
- int rc;
+ int __attribute__((__unused__)) rc;
fprintf(stderr, "-> Using 'misdn_info'\n");
rc = system("misdn_info");
ret = 0;
char filename[256];
time_t now;
struct tm *now_tm;
- int ret;
+ int __attribute__((__unused__)) ret;
if (!extension) {
PERROR("Port(%d) not an extension\n", p_serial);
char *p;
struct caller_info callerinfo;
const char *valid_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-!$%&/()=+*;~";
- int ret;
+ int __attribute__((__unused__)) ret;
if (!p_record)
return;
signed short *s;
int free, i, ii;
signed int sample;
- int ret;
+ int __attribute__((__unused__)) ret;
/* no recording */
if (!p_record || !length)
struct timeval current_time;
#ifdef WITH_MISDN
struct mISDNport *mISDNport;
- int avail,
- any;
+ int avail;
int jj;
class Port *port;
class Pfxs *ourfxs, *fxs;
case MATCH_BUSY:
case MATCH_IDLE:
#ifdef WITH_MISDN
- any = 0;
mISDNport = mISDNport_first;
while(mISDNport) {
if (mISDNport->ifport)
class Pdss1 *pdss1;
struct mISDNport *mISDNport;
struct select_channel *selchannel;
- int anybusy;
#endif
struct interface *interface;
struct interface_port *ifport;
}
/* channel state */
i = 0;
- anybusy = 0;
while(i < mISDNport->b_num) {
response->am[num].u.i.busy[i] = mISDNport->b_state[i];
if (mISDNport->b_port[i])
signed long sk, sk1, sk2, low, high;
int k, n, i;
int f1 = 0, f2 = 0;
- double result[NCOEFF], power, noise, snr;
+ double result[NCOEFF], power, noise;
+#ifdef DEBUG_LEVELS
+ double snr;
+#endif
signed long long cos2pik_;
char digit = ' ';
}
}
+#ifdef DEBUG_LEVELS
snr = 0;
+#endif
/* check one frequency */
if (result[f1] > TONE_MIN_DB /* must be at least -17 db */
&& result[f1]*SNR > noise) { /* */
digit = decode_one[f1];
+#ifdef DEBUG_LEVELS
if (digit != ' ')
snr = result[f1] / noise;
+#endif
}
/* check two frequencies */
if (result[f1] > TONE_MIN_DB && result[f2] > TONE_MIN_DB /* must be at lease -17 db */
&& result[f1]*TONE_DIFF_DB <= result[f2] /* f2 must be not less than 5 db below f1 */
&& (result[f1]+result[f2])*SNR > noise) { /* */
digit = decode_two[f1][f2];
+#ifdef DEBUG_LEVELS
if (digit != ' ')
snr = (result[f1]+result[f2]) / noise;
+#endif
}
/* debug powers */
}
if (!ss5_digits[i][0]) {
PERROR("Digit '%c' does not exist.\n", digit);
- memset(buffer, audio_s16_to_law[0], sizeof(buffer));
+ memset(buffer, audio_s16_to_law[0], len);
return buffer;
}
int linksize;
int l;
char *p;
- int ret;
+ int __attribute__((__unused__)) ret;
/* try to open the law file */
FILE *fp;
struct admin_list *admin;
struct admin_queue *response, **responsep; /* response pointer */
- int ret;
+ int __attribute__((__unused__)) ret;
if (!trace.name[0])
PERROR("trace not started in file %s line %d\n", __file, __line);