diff options
-rw-r--r-- | openbsc/include/openbsc/gsm_data.h | 1 | ||||
-rw-r--r-- | openbsc/src/bsc_msc_ip.c | 6 | ||||
-rw-r--r-- | openbsc/src/vty_interface.c | 11 |
3 files changed, 17 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 8a49a5dc7..32b05d4da 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -464,6 +464,7 @@ struct gsm_network { struct gsm_audio_support **audio_support; int audio_length; + int rtp_payload; /* layer 4 */ int (*mncc_recv) (struct gsm_network *net, int msg_type, void *arg); diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c index 9bce39aad..dc1445b6a 100644 --- a/openbsc/src/bsc_msc_ip.c +++ b/openbsc/src/bsc_msc_ip.c @@ -460,10 +460,14 @@ static int handle_abisip_signal(unsigned int subsys, unsigned int signal, DEBUGP(DMSC, "Connecting BTS to port: %d conn: %d\n", lchan->msc_data->rtp_port, ts->abis_ip.conn_id); + int rtp_payload = ts->trx->bts->network->rtp_payload; + if (rtp_payload == 0) + rtp_payload = ts->abis_ip.rtp_payload2; + rc = rsl_ipacc_mdcx(lchan, ntohl(local_addr.s_addr), lchan->msc_data->rtp_port, ts->abis_ip.conn_id, - ts->abis_ip.rtp_payload2); + rtp_payload); if (rc < 0) { DEBUGP(DMSC, "Failed to send connect: %d\n", rc); return rc; diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 5dd3470fb..7b9066002 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -867,6 +867,16 @@ error: return CMD_ERR_INCOMPLETE; } +DEFUN(cfg_net_ipacc_rtp_payload, + cfg_net_ipacc_rtp_payload_cmd, + "ipacc rtp_payload <0-256>", + "Override the RTP payload to use") +{ + gsmnet->rtp_payload = atoi(argv[0]) & 0xff; + + return CMD_SUCCESS; +} + /* per-BTS configuration */ DEFUN(cfg_bts, cfg_bts_cmd, @@ -1308,6 +1318,7 @@ int bsc_vty_init(struct gsm_network *net) install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_neci_cmd); install_element(GSMNET_NODE, &cfg_net_supported_codecs_cmd); + install_element(GSMNET_NODE, &cfg_net_ipacc_rtp_payload_cmd); install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); |