9
0
Fork 0

mgcp: Mark certain endpoints as blocked.

Right now for the virtual trunk 0x0 and 0x1F is blocked, for the
E1 like interface we have 0x0 and 0x1 blocked. This should start
to be configurable in the future.
This commit is contained in:
Holger Hans Peter Freyther 2011-03-02 21:44:01 +01:00
parent d523131339
commit 0d20e0d12f
2 changed files with 7 additions and 2 deletions

View File

@ -124,6 +124,7 @@ struct mgcp_endpoint {
struct mgcp_rtp_tap taps[MGCP_TAP_COUNT];
/* Special MGW handling */
int blocked;
unsigned int audio_port;
int block_processing;
};

View File

@ -698,8 +698,10 @@ static struct mgcp_ss7 *mgcp_ss7_init(struct mgcp_config *cfg)
for (i = 1; i < cfg->trunk.number_endpoints; ++i) {
int multiplex, timeslot;
mgcp_endpoint_to_timeslot(i, &multiplex, &timeslot);
if (timeslot == 0x0 || timeslot == 0x1F)
if (timeslot == 0x0 || timeslot == 0x1F) {
cfg->trunk.endpoints[i].blocked = 1;
continue;
}
dsp_resource += 1;
@ -724,8 +726,10 @@ static struct mgcp_ss7 *mgcp_ss7_init(struct mgcp_config *cfg)
for (i = 1; i < trunk->number_endpoints; ++i) {
int multiplex, timeslot;
mgcp_endpoint_to_timeslot(i, &multiplex, &timeslot);
if (timeslot == 0x0 || timeslot == 0x1F)
if (timeslot == 0x0 || timeslot == 0x1) {
trunk->endpoints[i].blocked = 1;
continue;
}
dsp_resource += 1;