summaryrefslogtreecommitdiff
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorChristian Richter <christian.richter@beronet.com>2006-04-05 14:51:48 +0000
committerChristian Richter <christian.richter@beronet.com>2006-04-05 14:51:48 +0000
commitce8fc47ffcc00b0d542e9442c167666703497322 (patch)
tree4382736e1c240261b6c52c72fce02f055559140c /channels/chan_misdn.c
parent414702f5626b09b7ccb4583b0b78e56469b93c9d (diff)
* advanced the error Handling routine for wrong frames from mISDN
* added more code for connected party number handling * fixed the portinfo program, it can now be used to test mISDN again git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 0ab599de1..9987cbd3d 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -1687,6 +1687,12 @@ static int misdn_answer(struct ast_channel *ast)
}
p->state = MISDN_CONNECTED;
+
+ if ( ast_strlen_zero(p->bc->cad) ) {
+ chan_misdn_log(2,p->bc->port," --> empty cad using dad\n");
+ ast_copy_string(p->bc->cad,p->bc->dad,sizeof(p->bc->cad));
+ }
+
misdn_lib_send_event( p->bc, EVENT_CONNECT);
start_bc_tones(p);
@@ -2131,7 +2137,7 @@ static int misdn_write(struct ast_channel *ast, struct ast_frame *frame)
case BCHAN_BRIDGED:
break;
default:
- chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) droping: %d frames addr:%x\n",frame->samples,ch->bc->addr);
+ chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) droping: %d frames addr:%x exten:%s cid:%s ch->state:%s\n",frame->samples,ch->bc->addr, ast->exten, ast->cid.cid_num,misdn_get_ch_state( ch));
return 0;
}
@@ -3493,7 +3499,21 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
}
break;
case EVENT_CONNECT:
+ {
misdn_lib_send_event(bc,EVENT_CONNECT_ACKNOWLEDGE);
+
+ struct ast_channel *bridged=AST_BRIDGED_P(ch->ast);
+
+ if (bridged && strcasecmp(bridged->tech->type,"mISDN")) {
+ struct chan_list *bridged_ch=MISDN_ASTERISK_TECH_PVT(bridged);
+
+ chan_misdn_log(1,bc->port," --> copying cpndialplan:%d and cad:%s to the A-Channel\n",bc->cpnnumplan,bc->cad);
+
+ bridged_ch->bc->cpnnumplan=bc->cpnnumplan;
+ ast_copy_string(bridged_ch->bc->cad,bc->cad,sizeof(bc->cad));
+ }
+ }
+
case EVENT_CONNECT_ACKNOWLEDGE:
{
ch->l3id=bc->l3_id;