modified: README
modified: dss1.cpp
modified: interface.c
modified: interface.h
modified: mISDN.cpp
modified: mISDN.h
New release Version 1.7
Changes after Version 1.7
New release Version 1.7
Changes after Version 1.7
+- Added new option to interface.conf: "nonotify" to disable notify messages.
int notify;
int plan = 0, type = -1, present = 0;
int notify;
int plan = 0, type = -1, present = 0;
+ if (p_m_mISDNport->ifport->nonotify) {
+ l1l2l3_trace_header(p_m_mISDNport, this, L3_NOTIFY_REQ, DIRECTION_OUT);
+ add_trace("info", NULL, "blocked by config");
+ end_trace();
+ return;
+ }
+
// printf("if = %d\n", param->notifyinfo.notify);
if (param->notifyinfo.notify>INFO_NOTIFY_NONE)
notify = param->notifyinfo.notify & 0x7f;
// printf("if = %d\n", param->notifyinfo.notify);
if (param->notifyinfo.notify>INFO_NOTIFY_NONE)
notify = param->notifyinfo.notify & 0x7f;
+static int inter_nonotify(struct interface *interface, char *filename, int line, char *parameter, char *value)
+{
+ struct interface_port *ifport;
+
+ /* port in chain ? */
+ if (!interface->ifport) {
+ SPRINT(interface_error, "Error in %s (line %d): parameter '%s' expects previous 'port' definition.\n", filename, line, parameter);
+ return(-1);
+ }
+ /* goto end of chain */
+ ifport = interface->ifport;
+ while(ifport->next)
+ ifport = ifport->next;
+ ifport->nonotify = 1;
+ return(0);
+}
#ifdef WITH_SS5
static int inter_ss5(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
#ifdef WITH_SS5
static int inter_ss5(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
{"gsm", &inter_gsm, "",
"Sets up GSM interface for using OpenBSC.\n"
"This interface must be a loopback interface. The second loopback interface\n"
{"gsm", &inter_gsm, "",
"Sets up GSM interface for using OpenBSC.\n"
"This interface must be a loopback interface. The second loopback interface\n"
- "must be assigned to OpenBSC"},
+ "must be assigned to OpenBSC."},
+
+ {"nonotify", &inter_nonotify, "",
+ "Prevents sending notify messages to this interface. A call placed on hold will\n"
+ "Not affect the remote end (phone or telcom switch).\n"
+ "This parameter must follow a 'port' parameter."},
#ifdef WITH_SS5
{"ccitt5", &inter_ss5, "[<feature> [feature ...]]",
#ifdef WITH_SS5
{"ccitt5", &inter_ss5, "[<feature> [feature ...]]",
struct mISDNport *mISDNport;
/* open new port */
struct mISDNport *mISDNport;
/* open new port */
- mISDNport = mISDNport_open(ifport->portnum, ifport->portname, ifport->ptp, ifport->nt, ifport->tespecial, ifport->l1hold, ifport->l2hold, ifport->interface, ifport->gsm, ifport->ss5);
+ mISDNport = mISDNport_open(ifport);
if (mISDNport) {
/* link port */
ifport->mISDNport = mISDNport;
if (mISDNport) {
/* link port */
ifport->mISDNport = mISDNport;
// int tout_park;
int dialmax; /* maximum number of digits to dial */
char tones_dir[128];
// int tout_park;
int dialmax; /* maximum number of digits to dial */
char tones_dir[128];
+ int nonotify; /* blocks outgoing notify messages */
};
struct interface_msn {
};
struct interface_msn {
/*
* global function to add a new card (port)
*/
/*
* 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 l1hold, int l2hold, struct interface *interface, int gsm, unsigned int ss5)
+struct mISDNport *mISDNport_open(struct interface_port *ifport)
{
int ret;
struct mISDNport *mISDNport, **mISDNportp;
{
int ret;
struct mISDNport *mISDNport, **mISDNportp;
+ int port = ifport->portnum;
+ int ptp = ifport->ptp;
+ int force_nt = ifport->nt;
+ int l1hold = ifport->l1hold;
+ int l2hold = ifport->l2hold;
+ int gsm = ifport->gsm;
+ int ss5 = ifport->ss5;
int i, cnt;
int pri, bri, pots;
int nt, te;
int i, cnt;
int pri, bri, pots;
int nt, te;
return(NULL);
}
if (port < 0) {
return(NULL);
}
if (port < 0) {
- port = mISDN_getportbyname(mISDNsocket, cnt, portname);
+ port = mISDN_getportbyname(mISDNsocket, cnt, ifport->portname);
- PERROR_RUNTIME("Port name '%s' not found, did you load loopback interface for GSM?.\n", portname);
+ PERROR_RUNTIME("Port name '%s' not found, did you load loopback interface for GSM?.\n", ifport->portname);
- PERROR_RUNTIME("Port name '%s' not found, use 'misdn_info' tool to list all existing ports.\n", portname);
+ PERROR_RUNTIME("Port name '%s' not found, use 'misdn_info' tool to list all existing ports.\n", ifport->portname);
return(NULL);
}
// note: 'port' has still the port number
return(NULL);
}
// note: 'port' has still the port number
mqueue_purge(&mISDNport->upqueue);
PERROR_RUNTIME("open_layer3() failed for port %d\n", port);
start_trace(port,
mqueue_purge(&mISDNport->upqueue);
PERROR_RUNTIME("open_layer3() failed for port %d\n", port);
start_trace(port,
NULL,
NULL,
DIRECTION_NONE,
NULL,
NULL,
DIRECTION_NONE,
mISDNport->b_num = devinfo.nrbchan;
mISDNport->portnum = port;
mISDNport->ntmode = nt;
mISDNport->b_num = devinfo.nrbchan;
mISDNport->portnum = port;
mISDNport->ntmode = nt;
- mISDNport->tespecial = te_special;
+ mISDNport->tespecial = ifport->tespecial;
mISDNport->pri = pri;
mISDNport->ptp = ptp;
mISDNport->l1hold = l1hold;
mISDNport->pri = pri;
mISDNport->ptp = ptp;
mISDNport->l1hold = l1hold;
PDEBUG(DEBUG_BCHANNEL, "using 'mISDN_dsp.o' module\n");
start_trace(mISDNport->portnum,
PDEBUG(DEBUG_BCHANNEL, "using 'mISDN_dsp.o' module\n");
start_trace(mISDNport->portnum,
NULL,
NULL,
DIRECTION_NONE,
NULL,
NULL,
DIRECTION_NONE,
int mISDN_initialize(void);
void mISDN_deinitialize(void);
int mISDN_getportbyname(int sock, int cnt, char *portname);
int mISDN_initialize(void);
void mISDN_deinitialize(void);
int mISDN_getportbyname(int sock, int cnt, char *portname);
-struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt, int te_special, int l1hold, int l2hold, struct interface *interface, int gsm, unsigned int ss5);
+struct mISDNport *mISDNport_open(struct interface_port *ifport);
void mISDNport_static(struct mISDNport *mISDNport);
void mISDNport_close_all(void);
void mISDNport_close(struct mISDNport *mISDNport);
void mISDNport_static(struct mISDNport *mISDNport);
void mISDNport_close_all(void);
void mISDNport_close(struct mISDNport *mISDNport);