diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-18 02:30:02 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-20 02:51:30 +0800 |
commit | 218f8564e1d68c544ff453a4da67fcb24d302e40 (patch) | |
tree | d742d50fce0b5adbecb11a7c7a70592f329cdf0c /openbsc/src/mgcp/mgcp_vty.c | |
parent | 54aaa0fbedf6a966b3cabd6585c987969c4c13d4 (diff) |
mgcp: Forward data from the BTS-in to the transcoder
Bind a new port for the transcoder, forward data from the BTS
to the transcoder, and from the transcoder to the network. Leave
BTS-IN where it is, BTS-OUT can now be after the transcoding took
place. We send the data from the BTS RTP port.
This whole route will be guarded by the transcoder_ip and if it is
NULL (current default) it will not go through the transcoder.
Diffstat (limited to 'openbsc/src/mgcp/mgcp_vty.c')
-rw-r--r-- | openbsc/src/mgcp/mgcp_vty.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/src/mgcp/mgcp_vty.c b/openbsc/src/mgcp/mgcp_vty.c index b60357096..d84c3c1d0 100644 --- a/openbsc/src/mgcp/mgcp_vty.c +++ b/openbsc/src/mgcp/mgcp_vty.c @@ -505,6 +505,16 @@ int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg) } endp->net_end.local_alloc = PORT_ALLOC_STATIC; } + + if (g_cfg->transcoder_ip && g_cfg->transcoder_ports.mode == PORT_ALLOC_STATIC) { + rtp_port = rtp_calculate_port(ENDPOINT_NUMBER(endp), + g_cfg->transcoder_ports.base_port); + if (mgcp_bind_transcoder_rtp_port(endp, rtp_port) != 0) { + LOGP(DMGCP, LOGL_FATAL, "Failed to bind: %d\n", rtp_port); + return -1; + } + endp->transcoder_end.local_alloc = PORT_ALLOC_STATIC; + } } return 0; |