aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_mgcp_utils.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 03:08:35 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 06:10:57 +0800
commit58ff219c856a4ad4648e4de06f90907d6964a251 (patch)
tree5914d714e5769268d4fc4087d5b158a1c39786f7 /openbsc/src/nat/bsc_mgcp_utils.c
parenta17d701a708c157f26b91c6ab8960fa7db33e7cd (diff)
mgcp: Attempt to separate the RTP/RTCP port for the Network and for the BTS
We plan to have two different ports for the network and for the BTS to avoid detecting the BTS and to dynamically allocate the port to have old data not go to a new socket.
Diffstat (limited to 'openbsc/src/nat/bsc_mgcp_utils.c')
-rw-r--r--openbsc/src/nat/bsc_mgcp_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c
index d309ba213..e8f7e2461 100644
--- a/openbsc/src/nat/bsc_mgcp_utils.c
+++ b/openbsc/src/nat/bsc_mgcp_utils.c
@@ -121,7 +121,7 @@ static void bsc_mgcp_send_mdcx(struct bsc_connection *bsc, struct mgcp_endpoint
"m=audio %d RTP/AVP 255\r\n",
ENDPOINT_NUMBER(endp),
bsc->nat->mgcp_cfg->source_addr,
- endp->rtp_port);
+ endp->bts_end.local_port);
if (len < 0) {
LOGP(DMGCP, LOGL_ERROR, "snprintf for DLCX failed.\n");
return;
@@ -229,7 +229,7 @@ int bsc_mgcp_policy_cb(struct mgcp_config *cfg, int endpoint, int state, const c
/* we need to generate a new and patched message */
bsc_msg = bsc_mgcp_rewrite((char *) nat->mgcp_msg, nat->mgcp_length,
- nat->mgcp_cfg->source_addr, mgcp_endp->rtp_port);
+ nat->mgcp_cfg->source_addr, mgcp_endp->bts_end.local_port);
if (!bsc_msg) {
LOGP(DMGCP, LOGL_ERROR, "Failed to patch the msg.\n");
return MGCP_POLICY_CONT;
@@ -325,7 +325,7 @@ void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg)
* with the value of 0 should be no problem.
*/
output = bsc_mgcp_rewrite((char * ) msg->l2h, msgb_l2len(msg),
- bsc->nat->mgcp_cfg->source_addr, endp->rtp_port);
+ bsc->nat->mgcp_cfg->source_addr, endp->net_end.local_port);
if (!output) {
LOGP(DMGCP, LOGL_ERROR, "Failed to rewrite MGCP msg.\n");