aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bssap.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-11-19 17:29:52 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-11-20 17:35:47 +0100
commit4b6a6dbe7e8d7d4651ea801b7aeed8cc9e427d6b (patch)
tree540d34bdc451573f56a113213da2d1e751671d98 /openbsc/src/bssap.c
parent763e8c77661cf65221389436f983ef5927ff79ee (diff)
[bssap] Cope with weird channel mapping on the network side
The timeslot of the network maps the following way 0 -> 1 1 -> n/a 2 -> 2 ... -> ... 31 -> 31
Diffstat (limited to 'openbsc/src/bssap.c')
-rw-r--r--openbsc/src/bssap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c
index 7d14175ba..f97a17107 100644
--- a/openbsc/src/bssap.c
+++ b/openbsc/src/bssap.c
@@ -437,8 +437,12 @@ static int bssmap_handle_assignm_req(struct sccp_connection *conn,
msc_data->T10.data = conn;
bsc_schedule_timer(&msc_data->T10, GSM0808_T10_VALUE);
+ /* the mgcp call agent starts counting at one. a bit of a weird mapping */
+ if (multiplex == 0)
+ multiplex = 1;
msc_data->rtp_port = rtp_calculate_port(multiplex, rtp_base_port);
- DEBUGP(DMSC, "Sending ChanModify for speech on: sccp: %p mode: 0x%x\n", conn, chan_mode);
+ DEBUGP(DMSC, "Sending ChanModify for speech on: sccp: %p mode: 0x%x on 0x%x port: %u\n",
+ conn, chan_mode, multiplex, msc_data->rtp_port);
if (chan_mode == GSM48_CMODE_SPEECH_AMR) {
msg->lchan->mr_conf.ver = 1;
msg->lchan->mr_conf.icmi = 1;