Hi Daniele,
This is what I did to fix the PRI-ISDN/hfc-e1 audio problem in
isdn--devel--0.1--patch-662:-
--- chan_visdn.c.orig 2006-05-30 10:05:55.000000000 +1000
+++ chan_visdn.c 2006-05-31 13:46:37.000000000 +1000
@@ -4008,7 +4008,7 @@
static void visdn_q931_connect_channel(
struct q931_channel *channel)
{
- FUNC_DEBUG();
+ FUNC_DEBUG("channel_id = %d\n", channel->id); // timeslot??
assert(channel->call);
struct ast_channel *ast_chan = callpvt_to_astchan(channel->call);
@@ -4021,6 +4021,12 @@
struct visdn_chan *visdn_chan = to_visdn_chan(ast_chan);
struct visdn_ic *ic = visdn_chan->ic;
+ if ((ic->intf->q931_intf->type == LAPD_INTF_TYPE_PRA) &&
+ (channel->id == 16)) { // timeslot 16 is the D-channel
+ ast_log(LOG_ERROR,"Invalid chanid %d\n", channel->id);
+ goto err_invalid_chanid;
+ }
+
visdn_chan->channel_has_been_connected = TRUE;
char pipeline[100], dest[100];
@@ -4028,13 +4034,15 @@
"%s/%s%d",
ic->intf->remote_port,
ic->intf->q931_intf->type == LAPD_INTF_TYPE_BRA ? "B" : "",
- channel->id+1);
+ (ic->intf->q931_intf->type == LAPD_INTF_TYPE_BRA) ?
+ channel->id+1 : channel->id);
memset(dest, 0, sizeof(dest));
if (readlink(pipeline, dest, sizeof(dest) - 1) < 0) {
ast_log(LOG_ERROR, "readlink(%s): %s\n", pipeline,
strerror(errno));
goto err_readlink;
}
+ ast_log(LOG_DEBUG, "readlink(%s), dest='%s'\n", pipeline, dest);
char *chanid = strrchr(dest, '/');
if (!chanid || !strlen(chanid + 1)) {
@@ -4079,7 +4087,7 @@
err_open:
err_invalid_chanid:
err_readlink:
-
+ visdn_chan->channel_has_been_connected = FALSE;
ast_mutex_unlock(&ast_chan->lock);
}
Regards,
Stephen Yong
_______________________________________________
Visdn-hackers mailing list
[email protected]
https://mailman.uli.it/mailman/listinfo/visdn-hackers