mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merged revisions 43764 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r43764 | crichter | 2006-09-27 14:51:03 +0200 (Mi, 27 Sep 2006) | 1 line fixed a bug which led to chan_list zombies, when the call could not be properly established in misdn_call. also removed the ACK_HDLC stuff which is not really needed. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -110,7 +110,7 @@ int misdn_jb_empty(struct misdn_jb *jb, char *data, int len);
|
||||
|
||||
|
||||
enum misdn_chan_state {
|
||||
MISDN_NOTHING, /*!< at beginning */
|
||||
MISDN_NOTHING=0, /*!< at beginning */
|
||||
MISDN_WAITING4DIGS, /*!< when waiting for infos */
|
||||
MISDN_EXTCANTMATCH, /*!< when asterisk couldnt match our ext */
|
||||
MISDN_DIALING, /*!< when pbx_start */
|
||||
@@ -1917,8 +1917,6 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout)
|
||||
else
|
||||
chan_misdn_log(2,port,"NO OPTS GIVEN\n");
|
||||
|
||||
ch->state=MISDN_CALLING;
|
||||
|
||||
r=misdn_lib_send_event( newbc, EVENT_SETUP );
|
||||
|
||||
/** we should have l3id after sending setup **/
|
||||
@@ -1939,6 +1937,8 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout)
|
||||
ast->hangupcause=16;
|
||||
|
||||
if (newbc->nt) stop_bc_tones(ch);
|
||||
|
||||
ch->state=MISDN_CALLING;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2246,8 +2246,9 @@ static int misdn_hangup(struct ast_channel *ast)
|
||||
|
||||
bc=p->bc;
|
||||
|
||||
if (ast->_state == AST_STATE_RESERVED) {
|
||||
if (ast->_state == AST_STATE_RESERVED || p->state == MISDN_NOTHING) {
|
||||
/* between request and call */
|
||||
ast_log(LOG_DEBUG, "State Reserved (or nothing) => chanIsAvail\n");
|
||||
MISDN_ASTERISK_TECH_PVT(ast)=NULL;
|
||||
|
||||
cl_dequeue_chan(&cl_te, p);
|
||||
@@ -4138,10 +4139,10 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
|
||||
cb_log(1,bc->port," --> found holded ch\n");
|
||||
if (ch->state == MISDN_CONNECTED ) {
|
||||
misdn_transfer_bc(ch, holded_ch) ;
|
||||
hangup_chan(ch);
|
||||
// release_chan(bc);
|
||||
break;
|
||||
}
|
||||
hangup_chan(ch);
|
||||
release_chan(bc);
|
||||
break;
|
||||
}
|
||||
|
||||
stop_bc_tones(ch);
|
||||
|
Reference in New Issue
Block a user