diff -Naur asterisk-87971.orig/channels/chan_misdn.c asterisk-87971.patched-misdnoneway/channels/chan_misdn.c --- asterisk-87971.orig/channels/chan_misdn.c 2007-11-01 12:52:53.000000000 +0600 +++ asterisk-87971.patched-misdnoneway/channels/chan_misdn.c 2007-11-01 12:20:00.000000000 +0600 @@ -2802,9 +2802,11 @@ static struct ast_frame *misdn_read(struct ast_channel *ast) { struct chan_list *tmp; - fd_set rrfs; - struct timeval tv; - int len, t; + // r81368 + //fd_set rrfs; + //struct timeval tv; + //int len, t; + int len; if (!ast) { chan_misdn_log(1, 0, "misdn_read called without ast\n"); @@ -2819,7 +2821,8 @@ chan_misdn_log(1, 0, "misdn_read called without bc\n"); return NULL; } - + // r81368 + /* tv.tv_sec=0; tv.tv_usec=20000; @@ -2838,7 +2841,7 @@ return NULL; } - if (FD_ISSET(tmp->pipe[0],&rrfs)) { + if (FD_ISSET(tmp->pipe[0],&rrfs)) { */ len=read(tmp->pipe[0],tmp->ast_rd_buf,sizeof(tmp->ast_rd_buf)); if (len<=0) { @@ -2846,11 +2849,11 @@ chan_misdn_log(2,tmp->bc->port,"misdn_read: Pipe closed, hanging up\n"); return NULL; } - - } else { + // r81368 + /*} else { return NULL; - } - + }*/ + tmp->frame.frametype = AST_FRAME_VOICE; // r81368 tmp->frame.subclass = AST_FORMAT_ALAW; tmp->frame.datalen = len; tmp->frame.samples = len; @@ -4584,6 +4587,7 @@ } } } + // !!! unrolled in r81368 ch->l3id=bc->l3_id; ch->addr=bc->addr; @@ -4659,6 +4663,8 @@ hangup_chan(ch); release_chan(bc); + if (bc->need_release_complete) // r81368 + misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE); //r81368 } break; case EVENT_RELEASE_COMPLETE: