diff options
author | Christian Richter <christian.richter@beronet.com> | 2006-09-28 11:32:32 +0000 |
---|---|---|
committer | Christian Richter <christian.richter@beronet.com> | 2006-09-28 11:32:32 +0000 |
commit | 60013546389238b40f125a0a2ea79ecd2dc59932 (patch) | |
tree | 2ea021c0d085c8b9cd7a5f9e626d49e7b917d851 /channels/chan_misdn.c | |
parent | edb0abd57dfe72e8753e3a216c8d03a5d1bbef0e (diff) |
Merged revisions 43852 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r43852 | crichter | 2006-09-28 13:03:05 +0200 (Do, 28 Sep 2006) | 9 lines
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/trunk@43855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r-- | channels/chan_misdn.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 84e4c1c54..e6ac85079 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -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); |