aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mgcp_hw.c4
-rw-r--r--src/mgcp_ss7.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mgcp_hw.c b/src/mgcp_hw.c
index bcda02e..1fd4d92 100644
--- a/src/mgcp_hw.c
+++ b/src/mgcp_hw.c
@@ -75,11 +75,11 @@ int mgcp_hw_connect(int port, int trunk, int timeslot)
_tx_port = tx_port_get(port);
status = PTI_ConnectHSCM(PTI_HSCM_TRUNK + trunk, timeslot - 1,
- PTI_HSCM_PTMC, _rx_port, 1, 0);
+ PTI_HSCM_PTMC, _rx_port - 1, 1, 0);
if (status != 0)
return -1;
- status = PTI_ConnectHSCM(PTI_HSCM_PTMC, _tx_port,
+ status = PTI_ConnectHSCM(PTI_HSCM_PTMC, _tx_port - 1,
PTI_HSCM_TRUNK + trunk, timeslot - 1, 1, 0);
if (status != 0)
return -1;
diff --git a/src/mgcp_ss7.c b/src/mgcp_ss7.c
index 345ea68..1b88e57 100644
--- a/src/mgcp_ss7.c
+++ b/src/mgcp_ss7.c
@@ -704,8 +704,8 @@ static int configure_trunk(struct mgcp_trunk_config *tcfg, int *dsp_resource)
if (tcfg->endpoints[i].blocked)
continue;
- *dsp_resource += 1;
tcfg->endpoints[i].hw_dsp_port = *dsp_resource;
+ *dsp_resource += 1;
if (tcfg->cfg->configure_trunks) {
int multiplex, timeslot, res;
@@ -764,7 +764,7 @@ static struct mgcp_ss7 *mgcp_ss7_init(struct mgcp_config *cfg)
}
/* Now do the init of the trunks */
- dsp_resource = 0;
+ dsp_resource = 1;
llist_for_each_entry(trunk, &cfg->vtrunks, entry) {
if (configure_trunk(trunk, &dsp_resource) != 0) {
talloc_free(conf);