From 6990687f4ca6afa26208c17a7e3652071db62771 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 28 Feb 2011 14:51:48 +0100 Subject: mgcp: Only allow transcoding on the virtual trunk --- openbsc/src/mgcp/mgcp_protocol.c | 2 +- openbsc/src/mgcp/mgcp_vty.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'openbsc/src') diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c index b95cc81a8..ba290dd90 100644 --- a/openbsc/src/mgcp/mgcp_protocol.c +++ b/openbsc/src/mgcp/mgcp_protocol.c @@ -475,7 +475,7 @@ static int allocate_ports(struct mgcp_endpoint *endp) return -1; } - if (endp->cfg->transcoder_ip) { + if (endp->cfg->transcoder_ip && endp->tcfg->trunk_type == MGCP_TRUNK_VIRTUAL) { if (allocate_port(endp, &endp->trans_net, &endp->cfg->transcoder_ports, mgcp_bind_trans_net_rtp_port) != 0) { diff --git a/openbsc/src/mgcp/mgcp_vty.c b/openbsc/src/mgcp/mgcp_vty.c index f71c17be4..c299a98cc 100644 --- a/openbsc/src/mgcp/mgcp_vty.c +++ b/openbsc/src/mgcp/mgcp_vty.c @@ -672,7 +672,8 @@ static int allocate_trunk(struct mgcp_trunk_config *trunk) endp->net_end.local_alloc = PORT_ALLOC_STATIC; } - if (cfg->transcoder_ip && cfg->transcoder_ports.mode == PORT_ALLOC_STATIC) { + if (trunk->trunk_type == MGCP_TRUNK_VIRTUAL && + cfg->transcoder_ip && cfg->transcoder_ports.mode == PORT_ALLOC_STATIC) { int rtp_port; /* network side */ -- cgit v1.2.3