X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=interface.c;h=a4bac2d8066356868a4f4cdebb9a482a0ff80736;hp=8e21c75aa14e09fc1da9398a63fe9ed4b0846ff7;hb=473d6569efcad130f9a5044b182b75a1c07a1eee;hpb=03cb33b51da2596a2ef4373debe52ccde8e5cc7b diff --git a/interface.c b/interface.c index 8e21c75..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 ...]]", @@ -1381,7 +1402,7 @@ void relink_interfaces(void) if (!strcmp(mISDNport->name, ifport->portname)) ifport->portnum = mISDNport->portnum; /* same name, so we use same number */ if (mISDNport->portnum == ifport->portnum) { - PDEBUG(DEBUG_ISDN, "Port %d:%s relinking!\n", mISDNport->portnum); + PDEBUG(DEBUG_ISDN, "Port %d:%s relinking!\n", ifport->portnum, ifport->portname); ifport->mISDNport = mISDNport; mISDNport->ifport = ifport; set_defaults(ifport); @@ -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;