From 45f9e69ac56ff9f3f53c513864ee4519d9b5048e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 3 Nov 2010 13:21:02 +0100 Subject: [PATCH] bsc: Add the ip.access rtp-payload command known from bsc_msc_ip --- openbsc/include/openbsc/osmo_msc_data.h | 1 + openbsc/src/bsc/osmo_bsc_vty.c | 15 +++++++++++++++ openbsc/src/gsm_data.c | 1 + 3 files changed, 17 insertions(+) diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h index c058a0ab5..4281f5351 100644 --- a/openbsc/include/openbsc/osmo_msc_data.h +++ b/openbsc/include/openbsc/osmo_msc_data.h @@ -42,6 +42,7 @@ struct osmo_msc_data { struct timer_list pong_timer; struct bsc_msc_connection *msc_con; int core_ncc; + int rtp_payload; /* 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 edd17fcee..a4ec70d66 100644 --- a/openbsc/src/bsc/osmo_bsc_vty.c +++ b/openbsc/src/bsc/osmo_bsc_vty.c @@ -57,6 +57,8 @@ static int config_write_msc(struct vty *vty) if (data->core_ncc != -1) vty_out(vty, " core-mobile-network-code %d%s", data->core_ncc, VTY_NEWLINE); + vty_out(vty, " ip.access rtp-payload %d%s", + data->rtp_payload, 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); @@ -89,6 +91,18 @@ DEFUN(cfg_net_bsc_ncc, return CMD_SUCCESS; } +DEFUN(cfg_net_bsc_rtp_payload, + cfg_net_bsc_rtp_payload_cmd, + "ip.access rtp-payload <0-255>", + "IP.ACCESS specific\n" + "Set the rtp-payload for the RTP stream\n" + "RTP payload number\n") +{ + struct osmo_msc_data *data = osmo_msc_data(vty); + data->rtp_payload = 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.") @@ -162,6 +176,7 @@ int bsc_vty_init_extra(void) install_default(MSC_NODE); 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_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 5a51ac679..7ede3182b 100644 --- a/openbsc/src/gsm_data.c +++ b/openbsc/src/gsm_data.c @@ -318,6 +318,7 @@ struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_c net->msc_data->ping_timeout = 20; net->msc_data->pong_timeout = 5; net->msc_data->core_ncc = -1; + net->msc_data->rtp_payload = 126; gsm_net_update_ctype(net);