diff options
author | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-17 15:29:01 +0000 |
---|---|---|
committer | crichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-17 15:29:01 +0000 |
commit | b67ad9f025492e311aee8ef4ecdfabdab457e96f (patch) | |
tree | b55b718cf52e31ce81eb6168337647c570d57326 /channels | |
parent | be86c57ef7017d5884a24de126afeb1e05029707 (diff) |
fixed bug that we've lost the orginator of the call.. now we can hear to disconnect indications again
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@27770 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_misdn.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index e1d2a0660..cfcdc58e3 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -2316,7 +2316,7 @@ static int stop_bc_tones(struct chan_list *cl) } -static struct chan_list *init_chan_list(void) +static struct chan_list *init_chan_list(int orig) { struct chan_list *cl=malloc(sizeof(struct chan_list)); @@ -2326,6 +2326,8 @@ static struct chan_list *init_chan_list(void) } memset(cl,0,sizeof(struct chan_list)); + + cl->orginator=orig; return cl; @@ -2342,7 +2344,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat int channel=0, port=0; struct misdn_bchannel *newbc = NULL; - struct chan_list *cl=init_chan_list(); + struct chan_list *cl=init_chan_list(ORG_AST); sprintf(buf,"%s/%s",misdn_type,(char*)data); ast_copy_string(buf2,data, 128); @@ -3171,7 +3173,7 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) print_bearer(bc); { - struct chan_list *ch=init_chan_list(); + struct chan_list *ch=init_chan_list(ORG_MISDN); struct ast_channel *chan; if (!ch) { chan_misdn_log(-1, bc->port, "cb_events: malloc for chan_list failed!\n"); return 0;} @@ -3429,6 +3431,8 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) send_cause2ast(ch->ast,bc); + + chan_misdn_log(0,bc->port," org:%d nt:%d, inbandavail:%d state:%d\n", ch->orginator, bc->nt, misdn_inband_avail(bc), ch->state); if ( ch->orginator==ORG_AST && !bc->nt && misdn_inband_avail(bc) && ch->state != MISDN_CONNECTED) { /* If there's inband information available (e.g. a recorded message saying what was wrong with the |