diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h index 4281f5351..b10301959 100644 --- a/openbsc/include/openbsc/osmo_msc_data.h +++ b/openbsc/include/openbsc/osmo_msc_data.h @@ -43,6 +43,7 @@ struct osmo_msc_data { struct bsc_msc_connection *msc_con; int core_ncc; int rtp_payload; + int rtp_base; /* mgcp agent */ struct write_queue mgcp_agent; diff --git a/openbsc/src/bsc/osmo_bsc_vty.c b/openbsc/src/bsc/osmo_bsc_vty.c index a4ec70d66..2c982197c 100644 --- a/openbsc/src/bsc/osmo_bsc_vty.c +++ b/openbsc/src/bsc/osmo_bsc_vty.c @@ -25,6 +25,9 @@ #include + +#define IPA_STR "IP.ACCESS specific\n" + extern struct gsm_network *bsc_gsmnet; static struct osmo_msc_data *osmo_msc_data(struct vty *vty) @@ -59,6 +62,7 @@ static int config_write_msc(struct vty *vty) data->core_ncc, VTY_NEWLINE); vty_out(vty, " ip.access rtp-payload %d%s", data->rtp_payload, VTY_NEWLINE); + vty_out(vty, " ip.access rtp-base %d%s", data->rtp_base, VTY_NEWLINE); vty_out(vty, " ip %s%s", data->msc_ip, VTY_NEWLINE); vty_out(vty, " port %d%s", data->msc_port, VTY_NEWLINE); vty_out(vty, " ip-dscp %d%s", data->msc_ip_dscp, VTY_NEWLINE); @@ -94,7 +98,7 @@ DEFUN(cfg_net_bsc_ncc, DEFUN(cfg_net_bsc_rtp_payload, cfg_net_bsc_rtp_payload_cmd, "ip.access rtp-payload <0-255>", - "IP.ACCESS specific\n" + IPA_STR "Set the rtp-payload for the RTP stream\n" "RTP payload number\n") { @@ -103,6 +107,18 @@ DEFUN(cfg_net_bsc_rtp_payload, return CMD_SUCCESS; } +DEFUN(cfg_net_bsc_rtp_base, + cfg_net_bsc_rtp_base_cmd, + "ip.access rtp-base <1-65000>", + IPA_STR + "Set the rtp-base port for the RTP stream\n" + "Port number\n") +{ + struct osmo_msc_data *data = osmo_msc_data(vty); + data->rtp_base = atoi(argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_net_msc_ip, cfg_net_msc_ip_cmd, "ip A.B.C.D", "Set the MSC/MUX IP address.") @@ -177,6 +193,7 @@ int bsc_vty_init_extra(void) install_element(MSC_NODE, &cfg_net_bsc_token_cmd); install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd); install_element(MSC_NODE, &cfg_net_bsc_rtp_payload_cmd); + install_element(MSC_NODE, &cfg_net_bsc_rtp_base_cmd); install_element(MSC_NODE, &cfg_net_msc_ip_cmd); install_element(MSC_NODE, &cfg_net_msc_port_cmd); install_element(MSC_NODE, &cfg_net_msc_prio_cmd); diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c index 7ede3182b..dc8024aa9 100644 --- a/openbsc/src/gsm_data.c +++ b/openbsc/src/gsm_data.c @@ -319,6 +319,7 @@ struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_c net->msc_data->pong_timeout = 5; net->msc_data->core_ncc = -1; net->msc_data->rtp_payload = 126; + net->msc_data->rtp_base = 4000; gsm_net_update_ctype(net);