From 473d6569efcad130f9a5044b182b75a1c07a1eee Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Fri, 15 Jan 2010 21:55:25 +0100 Subject: 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 --- interface.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'interface.c') 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 ...]]", @@ -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; -- cgit v1.2.3-55-g7522