summaryrefslogtreecommitdiffstats
path: root/interface.c
diff options
context:
space:
mode:
authorAndreas Eversberg2010-01-15 21:55:25 +0100
committerAndreas Eversberg2010-01-15 21:55:25 +0100
commit473d6569efcad130f9a5044b182b75a1c07a1eee (patch)
tree6bb2fdb9f19624f56afe87c7f55fa7dc6d06c24a /interface.c
parentNew version 1.7 (diff)
downloadlcr-473d6569efcad130f9a5044b182b75a1c07a1eee.tar.gz
lcr-473d6569efcad130f9a5044b182b75a1c07a1eee.tar.xz
lcr-473d6569efcad130f9a5044b182b75a1c07a1eee.zip
Added new option to interface.conf: "nonotify" to disable notify messages.
modified: README modified: dss1.cpp modified: interface.c modified: interface.h modified: mISDN.cpp modified: mISDN.h
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/interface.c b/interface.c
index 0b72061..a4bac2d 100644
--- a/interface.c
+++ b/interface.c
@@ -916,6 +916,22 @@ static int inter_gsm(struct interface *interface, char *filename, int line, char
return(0);
#endif
}
+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)
{
@@ -1097,7 +1113,12 @@ struct interface_param interface_param[] = {
{"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 ...]]",
@@ -1430,7 +1451,7 @@ void load_port(struct interface_port *ifport)
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;