X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=interface.c;h=4cc978c8ac292c0c0bdf618d72e2f392182f04df;hp=33f0c106eb5a67dae8e43d55e66e4a283642722c;hb=6a007f2fdee35b93048fb38c5d1ed20836901b57;hpb=4b85a2abcd708ad8d0e02dca9913db7bd6ab4fed diff --git a/interface.c b/interface.c index 33f0c10..4cc978c 100644 --- a/interface.c +++ b/interface.c @@ -922,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 @@ -994,6 +1005,12 @@ static int inter_rtp_bridge(struct interface *interface, char *filename, int lin SPRINT(interface_error, "Error in %s (line %d): Interface does not support RTP\n", filename, line); return(-1); } + + if (interface->app != EAPP_TYPE_BRIDGE) { + SPRINT(interface_error, "Error in %s (line %d): '%s' requires previous 'bridge' parameter.\n", filename, line, parameter); + return(-1); + } + interface->rtp_bridge = 1; return(0); @@ -1331,6 +1348,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" @@ -1341,7 +1360,8 @@ struct interface_param interface_param[] = { "Give SIP configuration file."}, {"rtp-bridge", &inter_rtp_bridge, "", "Enables RTP bridging directly from this interface.\n" - "This only works, if both ends support RTP. (like gsm-bs and sip)"}, + "This only works if both bridged interfaces use RTP, e.g. between gsm-bs and sip.\n" + "This parameter must follow a 'bridge' parameter.\n"}, #if 0 not needed, since ms defines what is supports and remote (sip) tells what is selected {"rtp-payload", &inter_rtp_payload, "",