From 4b6a6dbe7e8d7d4651ea801b7aeed8cc9e427d6b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 19 Nov 2009 17:29:52 +0100 Subject: [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 --- openbsc/src/bssap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3