diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-03-31 09:27:04 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-03-31 09:27:04 +0200 |
commit | 5aaf7c164ccbbd224c2335773e3e0490a6088461 (patch) | |
tree | 97ab2e058a4542e989514f345bdd76f415f907ba /openbsc/src/bssap.c | |
parent | 790db1e01b495fa1a54d41d68264d4d8d592c33a (diff) |
[mgcp] Add a helper function to convert from GSM0808 ts/mux to MGCP endpoint
Move the conversion of GSM0808 timeslot and multiplex from
the bssap.c into the mgcp.h so it can be reused by multiple
users. The weird math comes from the mapping of the MSC...
Diffstat (limited to 'openbsc/src/bssap.c')
-rw-r--r-- | openbsc/src/bssap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c index fac6c1f57..cdee92bc9 100644 --- a/openbsc/src/bssap.c +++ b/openbsc/src/bssap.c @@ -556,9 +556,7 @@ static int bssmap_handle_assignm_req(struct sccp_connection *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 (timeslot == 0) - timeslot = 1; - port = timeslot + (31 * multiplex); + port = mgcp_timeslot_to_endpoint(multiplex, timeslot); msc_data->rtp_port = rtp_calculate_port(port, network->rtp_base_port); |