diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-19 04:21:39 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-20 02:51:30 +0800 |
commit | b98ba72e0a413a9d325fa8ed20cb77d28d472e2f (patch) | |
tree | e58442a78127d1c19886cd48c10f727c7718c87c /openbsc/src/mgcp/mgcp_protocol.c | |
parent | 3b5e3c4d6ff7835b8139a0d97a78cabac737a7ff (diff) |
mgcp: Make the base port of the transcoder configurable
The code assumes a static mapping from endpoint to RTP port,
be able to configure the start of such a mapping.
Diffstat (limited to 'openbsc/src/mgcp/mgcp_protocol.c')
-rw-r--r-- | openbsc/src/mgcp/mgcp_protocol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c index 6d9a6b405..f18431aa9 100644 --- a/openbsc/src/mgcp/mgcp_protocol.c +++ b/openbsc/src/mgcp/mgcp_protocol.c @@ -780,6 +780,7 @@ struct mgcp_config *mgcp_config_alloc(void) cfg->source_addr = talloc_strdup(cfg, "0.0.0.0"); cfg->audio_name = talloc_strdup(cfg, "AMR/8000"); cfg->audio_payload = 126; + cfg->transcoder_remote_base = 4000; cfg->bts_ports.base_port = RTP_PORT_DEFAULT; cfg->net_ports.base_port = RTP_PORT_NET_DEFAULT; @@ -934,7 +935,7 @@ static void create_transcoder(struct mgcp_endpoint *endp) send_msg(endp, out_endp, endp->transcoder_end.local_port, "CRCX", "sendrecv"); send_msg(endp, out_endp, endp->transcoder_end.local_port, "MDCX", "sendrecv"); - port = rtp_calculate_port(out_endp, 4000); + port = rtp_calculate_port(out_endp, endp->cfg->transcoder_remote_base); endp->transcoder_end.rtp_port = htons(port); endp->transcoder_end.rtcp_port = htons(port + 1); } |