X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=interface.c;h=d66bbe8b6134d11309765624c0b31d4e8df90ef8;hp=b9dd275f890c2143ef1c7b9941078d2033e4296b;hb=a04f6e025ff2b440dcca23d5909ef17d81da6941;hpb=acaf278f7f616d264afe480e4f9c64768540941b diff --git a/interface.c b/interface.c index b9dd275..d66bbe8 100644 --- a/interface.c +++ b/interface.c @@ -751,6 +751,22 @@ static int inter_nodtmf(struct interface *interface, char *filename, int line, c ifport->nodtmf = 1; return(0); } +static int inter_dtmf_threshold(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->dtmf_threshold = atoi(value); + return(0); +} static int inter_filter(struct interface *interface, char *filename, int line, char *parameter, char *value) { char *p, *q; @@ -906,6 +922,17 @@ static int inter_gsm_bs(struct interface *interface, char *filename, int line, c return(0); #endif } +static int inter_gsm_bs_hr(struct interface *interface, char *filename, int line, char *parameter, char *value) +{ +#ifndef WITH_GSM_BS + SPRINT(interface_error, "Error in %s (line %d): GSM BS side not compiled in.\n", filename, line); + return(-1); +#else + interface->gsm_bs_hr = 1; + + return(0); +#endif +} static int inter_gsm_ms(struct interface *interface, char *filename, int line, char *parameter, char *value) { #ifndef WITH_GSM_MS @@ -1294,6 +1321,10 @@ struct interface_param interface_param[] = { "Disables DTMF detection for this interface.\n" "This parameter must follow a 'port' parameter."}, + {"dtmf-threshold", &inter_dtmf_threshold, "", + "Set threshold value for minimum DTMF tone level.\n" + "This parameter must follow a 'port' parameter."}, + {"filter", &inter_filter, " ", "Adds/appends a filter. Filters are ordered in transmit direction.\n" "gain - Changes volume (-8 .. 8)\n" @@ -1311,6 +1342,8 @@ struct interface_param interface_param[] = { ""}, {"gsm-bs", &inter_gsm_bs, "", "Sets up GSM base station interface for using OpenBSC."}, + {"hr", &inter_gsm_bs_hr, "", + "Enable and prefer half rate for mobile terminating calls."}, {"gsm-ms", &inter_gsm_ms, "", "Sets up GSM mobile station interface for using Osmocom-BB.\n" "The name of the MS folows the interface name.\n"