mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-27 22:50:42 +00:00
fixed bug that we've lost the orginator of the call.. now we can hear to disconnect indications again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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));
|
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));
|
memset(cl,0,sizeof(struct chan_list));
|
||||||
|
|
||||||
|
cl->orginator=orig;
|
||||||
|
|
||||||
return cl;
|
return cl;
|
||||||
|
|
||||||
@@ -2342,7 +2344,7 @@ static struct ast_channel *misdn_request(const char *type, int format, void *dat
|
|||||||
int channel=0, port=0;
|
int channel=0, port=0;
|
||||||
struct misdn_bchannel *newbc = NULL;
|
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);
|
sprintf(buf,"%s/%s",misdn_type,(char*)data);
|
||||||
ast_copy_string(buf2,data, 128);
|
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);
|
print_bearer(bc);
|
||||||
|
|
||||||
{
|
{
|
||||||
struct chan_list *ch=init_chan_list();
|
struct chan_list *ch=init_chan_list(ORG_MISDN);
|
||||||
struct ast_channel *chan;
|
struct ast_channel *chan;
|
||||||
|
|
||||||
if (!ch) { chan_misdn_log(-1, bc->port, "cb_events: malloc for chan_list failed!\n"); return 0;}
|
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);
|
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 ( ch->orginator==ORG_AST && !bc->nt && misdn_inband_avail(bc) && ch->state != MISDN_CONNECTED) {
|
||||||
/* If there's inband information available (e.g. a
|
/* If there's inband information available (e.g. a
|
||||||
recorded message saying what was wrong with the
|
recorded message saying what was wrong with the
|
||||||
|
|||||||
Reference in New Issue
Block a user