From 118ddebc368f390fb5f127bdbaeb393eb20b9c59 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 8 Jan 2010 15:24:21 +0100 Subject: [on-waves] Use a default rtp_base_port, write it out in the config Currently "write memory" will not store the rtp_base_port of the network. Fix that by writing it out in write_net. Also set it to 4000 by default in the MGCP and in the BSC. --- openbsc/src/bsc_mgcp.c | 2 +- openbsc/src/gsm_data.c | 1 + openbsc/src/vty_interface.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openbsc/src/bsc_mgcp.c b/openbsc/src/bsc_mgcp.c index bdfe08483..d5e53c565 100644 --- a/openbsc/src/bsc_mgcp.c +++ b/openbsc/src/bsc_mgcp.c @@ -63,7 +63,7 @@ static const char *audio_name = "GSM-EFR/8000"; static int audio_payload = 97; static int audio_loop = 0; static int early_bind = 0; -static int rtp_base_port = 0; +static int rtp_base_port = 4000; static char *forward_ip = NULL; static char *config_file = "mgcp.cfg"; diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c index 18a3ac2c2..8330b5190 100644 --- a/openbsc/src/gsm_data.c +++ b/openbsc/src/gsm_data.c @@ -226,6 +226,7 @@ struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_c net->core_country_code = -1; net->core_network_code = -1; + net->rtp_base_port = 4000; return net; } diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index e53e7c6f9..ef8f6b2d1 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -334,6 +334,7 @@ static int config_write_net(struct vty *vty) vty_out(vty, " timer t3119 %u%s", gsmnet->T3119, VTY_NEWLINE); vty_out(vty, " timer t3141 %u%s", gsmnet->T3141, VTY_NEWLINE); vty_out(vty, " ipacc rtp_payload %u%s", gsmnet->rtp_payload, VTY_NEWLINE); + vty_out(vty, " rtp base %u%s", gsmnet->rtp_base_port, VTY_NEWLINE); if (gsmnet->audio_length != 0) { int i; -- cgit v1.2.3