[asterisk-commits] branch crichter/0.3.0 r9213 - in
/team/crichter/0.3.0/channels: ./ misdn/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 8 08:20:02 MST 2006
Author: crichter
Date: Wed Feb 8 09:19:58 2006
New Revision: 9213
URL: http://svn.digium.com/view/asterisk?rev=9213&view=rev
Log:
* dozens of white-space removements
* some // comment removements
* debugging optimization, use port where possible
* fixed pickup problem (pickup didn't work anymore after mqueue)
* removed some mIDSN_JOLLY defines which are not needed anymore in mque
Modified:
team/crichter/0.3.0/channels/chan_misdn.c
team/crichter/0.3.0/channels/misdn/isdn_lib.c
team/crichter/0.3.0/channels/misdn/isdn_lib_intern.h
team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c
Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=9213&r1=9212&r2=9213&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Wed Feb 8 09:19:58 2006
@@ -1422,12 +1422,6 @@
char dest_cp[256];
struct ast_channel *bridged;
- if ( (bridged=ast_bridged_channel(ast)) ) {
- chan_misdn_log(0,0,"Our Bridged Partner is %s\n",bridged->tech->type);
- } else {
- chan_misdn_log(0,0,"No Bridged Partner\n");
- }
-
{
strncpy(dest_cp,dest,sizeof(dest_cp)-1);
dest_cp[sizeof(dest_cp)]=0;
@@ -1482,7 +1476,7 @@
strncpy(ast->exten,ext,sizeof(ast->exten));
- chan_misdn_log(1, 0, "* CALL: %s\n",dest);
+ chan_misdn_log(1, port, "* CALL: %s\n",dest);
chan_misdn_log(1, port, " --> * dad:%s tech:%s ctx:%s\n",ast->exten,ast->name, ast->context);
@@ -1523,7 +1517,7 @@
if (opts)
misdn_set_opt_exec(ast,opts);
else
- chan_misdn_log(1,0,"NO OPTS GIVEN\n");
+ chan_misdn_log(2,port,"NO OPTS GIVEN\n");
ch->state=MISDN_CALLING;
@@ -2341,8 +2335,8 @@
}
if (!newbc) {
- chan_misdn_log(1, 0, " --> ! No free channel chan ext:%s even after Group Call\n",ext);
- chan_misdn_log(1, 0, " --> SEND: State Down\n");
+ chan_misdn_log(-1, 0, " --> ! No free channel chan ext:%s even after Group Call\n",ext);
+ chan_misdn_log(-1, 0, " --> SEND: State Down\n");
return NULL;
}
@@ -2774,7 +2768,6 @@
} else {
chan_misdn_log(2, bc->port, "* --> Hangup\n");
ast_queue_hangup(ast);
- //ast_hangup(ast);
}
break;
@@ -2818,7 +2811,6 @@
holded_chan->state=MISDN_CONNECTED;
holded_chan->holded=0;
misdn_lib_transfer(holded_chan->bc?holded_chan->bc:holded_chan->holded_bc);
-
ast_channel_masquerade(holded_chan->ast, AST_BRIDGED_P(tmp_ch->ast));
}
@@ -2833,7 +2825,6 @@
strncpy(predial, ast->exten, sizeof(predial) -1 );
ch->state=MISDN_DIALING;
-
if (bc->nt) {
int ret;
@@ -2846,7 +2837,6 @@
ret = misdn_lib_send_event(bc, EVENT_PROCEEDING );
}
}
-
tone_indicate(ch,TONE_DIAL);
chan_misdn_log(1, bc->port, "* Starting Ast ctx:%s dad:%s oad:%s with 's' extension\n", ast->context, ast->exten, AST_CID_P(ast));
@@ -3011,6 +3001,21 @@
}
/* chan_misdn_log(5, bc->port, "Can Match Extension: dad:%s oad:%s\n",bc->dad,bc->oad);*/
+ /* Check for Pickup Request first */
+ if (!strcmp(ch->ast->exten, ast_pickup_ext())) {
+ int ret;/** Sending SETUP_ACK**/
+ ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+ if (ast_pickup_call(ch->ast)) {
+ ast_hangup(ch->ast);
+ } else {
+ struct ast_channel *chan=ch->ast;
+ ch->state = MISDN_CALLING_ACKNOWLEDGE;
+ ch->ast=NULL;
+ ast_setstate(chan, AST_STATE_DOWN);
+ ast_hangup(chan);
+ break;
+ }
+ }
if(!ast_canmatch_extension(ch->ast, ch->context, bc->dad, 1, bc->oad)) {
@@ -3131,7 +3136,21 @@
/** queue new chan **/
cl_queue_chan(&cl_te, ch) ;
-
+
+ /* Check for Pickup Request first */
+ if (!strcmp(chan->exten, ast_pickup_ext())) {
+ int ret;/** Sending SETUP_ACK**/
+ ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+ if (ast_pickup_call(chan)) {
+ ast_hangup(chan);
+ } else {
+ ch->state = MISDN_CALLING_ACKNOWLEDGE;
+ ch->ast=NULL;
+ ast_setstate(chan, AST_STATE_DOWN);
+ ast_hangup(chan);
+ break;
+ }
+ }
/*
added support for s extension hope it will help those poor cretains
@@ -3372,7 +3391,7 @@
int res;
int (*generate)(struct ast_channel *chan, void *tmp, int datalen, int samples);
- chan_misdn_log(9,0,"TONE_GEN: len:%d\n");
+ chan_misdn_log(9,bc->port,"TONE_GEN: len:%d\n");
if (!ast->generator) break;
Modified: team/crichter/0.3.0/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_lib.c?rev=9213&r1=9212&r2=9213&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_lib.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_lib.c Wed Feb 8 09:19:58 2006
@@ -335,9 +335,8 @@
frm = (iframe_t *)dmsg->data;
struct misdn_stack *stack=get_stack_by_bc(bc);
-
if (!stack) {
- cb_log(0,0,"send_msg: IEK!! no stack\n ");
+ cb_log(0,bc->port,"send_msg: IEK!! no stack\n ");
return -1;
}
@@ -594,16 +593,11 @@
static int newteid=0;
-#ifdef MISDNUSER_JOLLY
#define MAXPROCS 0x100
-#else
-#define MAXPROCS 0x10
-#endif
-
int misdn_lib_get_l1_up(struct misdn_stack *stack)
{
- /* Pull Up L1 if we have JOLLY */
+ /* Pull Up L1 */
iframe_t act;
act.prim = PH_ACTIVATE | REQUEST;
act.addr = (stack->upper_id | FLG_MSG_DOWN) ;
@@ -693,11 +687,7 @@
}
stack->procids[i]=1;
-#ifdef MISDNUSER_JOLLY
l3_id = 0xff00 | i;
-#else
- l3_id = 0xfff0 | i;
-#endif
ncr.prim = CC_NEW_CR | REQUEST;
@@ -981,8 +971,6 @@
struct misdn_stack *stack = malloc(sizeof(struct misdn_stack));
if (!stack ) return NULL;
-
- //cb_log(2, "Init. Stack on port:%d\n",port);
cb_log(4, port, "Init. Stack.\n");
memset(stack,0,sizeof(struct misdn_stack));
@@ -1015,7 +1003,6 @@
switch(stinf->pid.protocol[0] & ~ISDN_PID_FEATURE_MASK) {
case ISDN_PID_L0_TE_S0:
- //cb_log(2, "TE Stack\n");
stack->nt=0;
break;
case ISDN_PID_L0_NT_S0:
@@ -1056,15 +1043,11 @@
}
}
-
-
{
int ret;
int nt=stack->nt;
cb_log(4, port, "Init. Stack.\n");
-
-
memset(&li, 0, sizeof(li));
{
@@ -1094,7 +1077,6 @@
return(NULL);
}
-
stack->lower_id = mISDN_get_layerid(midev, stack->d_stid, nt?1:3);
if (stack->lower_id < 0) {
cb_log(-1, port, "%s: Cannot get layer(%d) id of this port.\n", __FUNCTION__, nt?1:3);
@@ -1190,8 +1172,6 @@
for (stack=glob_mgr->stack_list;
stack;
stack=stack->next) {
- //cb_log(2,0,"stack->addr:%x addr:%x masked: st->a:%x a:%x\n",stack->upper_id, addr, stack->upper_id&STACK_ID_MASK, addr&STACK_ID_MASK);
-
if ( (stack->upper_id&STACK_ID_MASK) == (addr&STACK_ID_MASK)) return stack;
}
@@ -1294,7 +1274,6 @@
int ret=setup_bc(bc);
if (ret == -EINVAL){
cb_log(-1,bc->port,"send_event: setup_bc failed\n");
-
}
}
@@ -1304,7 +1283,6 @@
if ( *bc->crypt_key ) {
cb_log(4, stack->port, "ENABLING BLOWFISH channel:%d oad%d:%s dad%d:%s\n", bc->channel, bc->onumplan,bc->oad, bc->dnumplan,bc->dad);
-
manager_ph_control_block(bc, BF_ENABLE_KEY, bc->crypt_key, strlen(bc->crypt_key) );
}
case EVENT_SETUP:
@@ -1350,7 +1328,7 @@
if (!bc) {
- cb_log(-1, 0, " --> !! lib: No free channel!\n");
+ cb_log(-1, stack->port, " --> !! lib: No free channel!\n");
return -1;
}
@@ -1364,7 +1342,6 @@
int handle_cr ( struct misdn_stack *stack, iframe_t *frm)
{
-
if (!stack) return -1;
switch (frm->prim) {
@@ -1402,7 +1379,6 @@
dump_chan_list(stack);
bc->pid = 0;
cb_event(EVENT_CLEANUP, bc, glob_mgr->user_data);
-
if (bc->stack_holder) {
cb_log(4,stack->port, "REMOVEING Holder\n");
stack_holder_remove( stack, bc);
@@ -1444,7 +1420,7 @@
int misdn_lib_get_port_up (int port)
-{ /* Pull Up L1 if we have JOLLY */
+{ /* Pull Up L1 */
struct misdn_stack *stack;
for (stack=glob_mgr->stack_list;
@@ -1525,16 +1501,11 @@
return(-EINVAL);
hh=(mISDNuser_head_t*)msg->data;
-
-
port=stack->port;
-
cb_log(4, stack->port, " --> lib: prim %x dinfo %x\n",hh->prim, hh->dinfo);
-
{
switch(hh->prim){
-
case CC_RETRIEVE|INDICATION:
{
iframe_t frm; /* fake te frm to add callref to global callreflist */
@@ -1566,15 +1537,13 @@
break;
-
case CC_SETUP|CONFIRM:
{
struct misdn_bchannel *bc=find_bc_by_l3id(stack, hh->dinfo);
int l3id = *((int *)(((u_char *)msg->data)+ mISDNUSER_HEAD_SIZE));
-
- cb_log(4, bc?stack->port:0, " --> lib: Event_ind:SETUP CONFIRM [NT] : new L3ID is %x\n",l3id );
-
- if (!bc) { cb_log(4, 0, "Bc Not found (after SETUP CONFIRM)\n"); return 0; }
+ cb_log(4, stack->port, " --> lib: Event_ind:SETUP CONFIRM [NT] : new L3ID is %x\n",l3id );
+
+ if (!bc) { cb_log(4, stack->port, "Bc Not found (after SETUP CONFIRM)\n"); return 0; }
cb_log (2,bc->port,"I IND :CC_SETUP|CONFIRM: old l3id:%x new l3id:%x\n", bc->l3_id, l3id);
bc->l3_id=l3id;
cb_event(EVENT_NEW_L3ID, bc, glob_mgr->user_data);
@@ -1664,7 +1633,7 @@
struct misdn_bchannel *bc=find_bc_by_l3id(stack, hh->dinfo);
if (!bc) {
bc=find_bc_by_masked_l3id(stack, hh->dinfo, 0xffff0000);
- if (bc) { //repair reject bug
+ if (bc) {
int myprocid=bc->l3_id&0x0000ffff;
hh->dinfo=(hh->dinfo&0xffff0000)|myprocid;
cb_log(4,bc->port,"Repaired reject Bug, new dinfo: %x\n",hh->dinfo);
@@ -1673,7 +1642,6 @@
}
break;
-
case CC_RELEASE_COMPLETE|INDICATION:
break;
@@ -1713,11 +1681,9 @@
frm.addr=stack->upper_id | FLG_MSG_DOWN;
-
frm.prim = CC_RELEASE_CR|INDICATION;
cb_log(4, stack->port, " --> Faking Realease_cr for %x\n",frm.addr);
/** removing procid **/
-
if (!bc) {
cb_log(4, stack->port, " --> Didn't found BC so temporarly creating dummy BC (l3id:%x) on this port.\n", hh->dinfo);
memset (&dummybc,0,sizeof(dummybc));
@@ -1727,20 +1693,10 @@
}
if (bc) {
-#ifdef MISDNUSER_JOLLY
if ( (bc->l3_id & 0xff00) == 0xff00) {
cb_log(4, stack->port, " --> Removing Process Id:%x on this port.\n", bc->l3_id&0xff);
stack->procids[bc->l3_id&0xff] = 0 ;
}
-#else
- if ( (bc->l3_id & 0xfff0) == 0xfff0) {
- cb_log(4, stack->port, " --> Removing Process Id:%x on this port.\n", bc->l3_id&0xf);
- stack->procids[bc->l3_id&0xf] = 0 ;
-
- }
-
-#endif
-
}
else cb_log(-1, stack->port, "Couldnt find BC so I couldnt remove the Process!!!! this is a bad port.\n");
@@ -1748,7 +1704,6 @@
free_msg(msg);
return 0 ;
}
-
break;
case CC_NEW_CR|INDICATION:
@@ -1757,24 +1712,15 @@
{
struct misdn_bchannel *bc=find_bc_by_l3id(stack, hh->dinfo);
int l3id = *((int *)(((u_char *)msg->data)+ mISDNUSER_HEAD_SIZE));
- if (!bc) { cb_log(-1, 0, " --> In NEW_CR: didn't found bc ??\n"); return -1;};
-#ifdef MISDNUSER_JOLLY
+ if (!bc) { cb_log(-1, stack->port, " --> In NEW_CR: didn't found bc ??\n"); return -1;};
if (((l3id&0xff00)!=0xff00) && ((bc->l3_id&0xff00)==0xff00)) {
cb_log(4, stack->port, " --> Removing Process Id:%x on this port.\n", 0xff&bc->l3_id);
stack->procids[bc->l3_id&0xff] = 0 ;
}
-#else
- if (((l3id&0xfff0)!=0xfff0) && ((bc->l3_id&0xfff0)==0xfff0)) {
- cb_log(4, stack->port, "Removing Process Id:%x on this port.\n", 0xf&bc->l3_id);
- stack->procids[bc->l3_id&0xf] = 0 ;
- }
-
-#endif
cb_log(4, stack->port, "lib: Event_ind:CC_NEW_CR : very new L3ID is %x\n",l3id );
bc->l3_id =l3id;
cb_event(EVENT_NEW_L3ID, bc, glob_mgr->user_data);
-
free_msg(msg);
return 0;
@@ -1804,8 +1750,6 @@
}
}
-
-
{
/* Parse Events and fire_up to App. */
struct misdn_bchannel *bc;
@@ -1954,7 +1898,6 @@
r=mISDN_write( glob_mgr->midev, buf, txfrm->len + mISDN_HEADER_LEN, 8000 );
} else {
- //jb is filling
}
}
@@ -1963,8 +1906,6 @@
iframe_t *frm= (iframe_t*)msg->data;
struct misdn_bchannel *bc;
- //cb_log(0,0,"handle_bchan: a:%x a&M:%x prim:%x dinfo:%x\n",frm->addr,frm->addr&STACK_ID_MASK, frm->prim, frm->dinfo);
-
bc=find_bc_by_addr(frm->addr);
if (!bc) {
@@ -1975,7 +1916,7 @@
struct misdn_stack *stack=get_stack_by_bc(bc);
if (!stack) {
- cb_log(0,0,"handle_bchan: STACK not found for prim:%x with addr:%x dinfo:%x\n", frm->prim, frm->addr, frm->dinfo);
+ cb_log(0, bc->port,"handle_bchan: STACK not found for prim:%x with addr:%x dinfo:%x\n", frm->prim, frm->addr, frm->dinfo);
return 0;
}
@@ -2240,17 +2181,11 @@
#endif
} else {
-
cb_log(-1, stack->port, "NO BC FOR STACK\n");
-
- }
-
+ }
}
cb_log(4, stack->port, "TE_FRM_HANDLER: Returning 0 on prim:%x \n",frm->prim);
-
-
-
return 0;
}
@@ -2258,10 +2193,7 @@
int handle_l1(msg_t *msg)
{
iframe_t *frm = (iframe_t*) msg->data;
-
struct misdn_stack *stack = find_stack_by_addr(frm->addr);
-
-
int i ;
if (!stack) return 0 ;
@@ -2288,19 +2220,16 @@
}
}
-
return 1;
case PH_ACTIVATE | REQUEST:
free_msg(msg);
cb_log(1,stack->port,"L1: PH_ACTIVATE|REQUEST \n");
-
return 1;
case PH_DEACTIVATE | REQUEST:
free_msg(msg);
cb_log(1,stack->port,"L1: PH_DEACTIVATE|REQUEST \n");
-
return 1;
case PH_DEACTIVATE | CONFIRM:
@@ -2311,13 +2240,11 @@
if (global_state == MISDN_INITIALIZED) {
cb_event(EVENT_CLEANUP, &stack->bc[i], glob_mgr->user_data);
}
-
}
if (stack->nt) {
if (stack->nst.l1_l2(&stack->nst, msg))
free_msg(msg);
-
} else {
free_msg(msg);
}
@@ -2336,8 +2263,6 @@
iframe_t *frm = (iframe_t*) msg->data;
struct misdn_stack *stack = find_stack_by_addr(frm->addr);
-
-
if (!stack) {
return 0 ;
@@ -2376,12 +2301,9 @@
return 0;
}
-
int handle_mgmt(msg_t *msg)
{
iframe_t *frm = (iframe_t*) msg->data;
-
-
if ( (frm->addr == 0) && (frm->prim == (MGR_DELLAYER|CONFIRM)) ) {
cb_log(2, 0, "MGMT: DELLAYER|CONFIRM Addr: 0 !\n") ;
@@ -2395,20 +2317,17 @@
return 0;
}
- //cb_log(1, 0, "MGMT: Found Stack: addr:%x dinfo:%x prim:%x\n",frm->addr,frm->dinfo, frm->prim) ;
-
switch(frm->prim) {
case MGR_SHORTSTATUS | INDICATION:
- cb_log(2, 0, "MGMT: Short status dinfo %x\n",frm->dinfo);
-
+ cb_log(2, stack->port, "MGMT: Short status dinfo %x\n",frm->dinfo);
switch (frm->dinfo) {
case SSTATUS_L1_ACTIVATED:
- cb_log(1, 0, "MGMT: SSTATUS: L1_ACTIVATED \n");
+ cb_log(1, stack->port, "MGMT: SSTATUS: L1_ACTIVATED \n");
stack->l1link=1;
break;
+
case SSTATUS_L1_DEACTIVATED:
- cb_log(1, 0, "MGMT: SSTATUS: L1_DEACTIVATED \n");
-
+ cb_log(1, stack->port, "MGMT: SSTATUS: L1_DEACTIVATED \n");
/*reopen L1 if down*/
if (stack->l1link==2)
stack->l1link--;
@@ -2416,31 +2335,28 @@
stack->l1link=0;
break;
+
case SSTATUS_L2_ESTABLISHED:
- cb_log(1, 0, "MGMT: SSTATUS: L2_ESTABLISH \n");
+ cb_log(1, stack->port, "MGMT: SSTATUS: L2_ESTABLISH \n");
stack->l2link=1;
-
break;
case SSTATUS_L2_RELEASED:
- cb_log(1, 0, "MGMT: SSTATUS: L2_RELEASED \n");
+ cb_log(1, stack->port, "MGMT: SSTATUS: L2_RELEASED \n");
stack->l2link=0;
stack->l1link=2;
-
break;
-
- }
-
+ }
free_msg(msg);
return 1;
case MGR_SETSTACK | INDICATION:
- cb_log(2, 0, "MGMT: SETSTACK|IND dinfo %x\n",frm->dinfo);
+ cb_log(2, stack->port, "MGMT: SETSTACK|IND dinfo %x\n",frm->dinfo);
free_msg(msg);
return 1;
case MGR_DELLAYER | CONFIRM:
- cb_log(2, 0, "MGMT: DELLAYER|CNF dinfo %x\n",frm->dinfo) ;
+ cb_log(2, stack->port, "MGMT: DELLAYER|CNF dinfo %x\n",frm->dinfo) ;
free_msg(msg);
return 1;
@@ -2499,8 +2415,6 @@
int zero_frm=0 , fff_frm=0 ;
int midev= mgr->midev;
int port=0;
-
- //cb_log(5, 0, "In event_catcher thread\n");
while (1) {
msg_t *msg = fetch_msg(midev);
@@ -2676,7 +2590,6 @@
struct misdn_stack *stack=get_stack_by_bc(bc);
if (!stack) return;
-
cb_log(2, stack->port, " --> mode:%s cause:%d ocause:%d rad:%s\n", stack->nt?"NT":"TE", bc->cause, bc->out_cause, bc->rad);
@@ -2708,12 +2621,10 @@
int err = -1 ;
if (!bc) goto ERR;
-
struct misdn_stack *stack=get_stack_by_bc(bc);
-
- cb_log(0,0,"SENDEVENT: stack->nt:%d stack->uperid:%x\n",stack->nt, stack->upper_id);
+ cb_log(6,stack->port,"SENDEVENT: stack->nt:%d stack->uperid:%x\n",stack->nt, stack->upper_id);
if ( stack->nt && !stack->l1link) {
/** Queue Event **/
@@ -2735,8 +2646,6 @@
goto ERR;
}
break;
-
-
case EVENT_CONNECT:
case EVENT_PROGRESS:
@@ -2765,14 +2674,12 @@
}
}
-
if ( (event == EVENT_CONNECT ) && misdn_cap_is_speech(bc->capability) ) {
if ( *bc->crypt_key ) {
cb_log(4, stack->port, " --> ENABLING BLOWFISH channel:%d oad%d:%s dad%d:%s \n", bc->channel, bc->onumplan,bc->oad, bc->dnumplan,bc->dad);
manager_ph_control_block(bc, BF_ENABLE_KEY, bc->crypt_key, strlen(bc->crypt_key) );
}
-
if (!bc->nodsp) manager_ph_control(bc, DTMF_TONE_START, 0);
@@ -2855,7 +2762,6 @@
}
-
int manager_isdn_handler(iframe_t *frm ,msg_t *msg)
{
@@ -2864,13 +2770,10 @@
}
if ( ((frm->addr | ISDN_PID_BCHANNEL_BIT )>> 28 ) == 0x5) {
- cb_log(9,0,"BCHANNEL_BIT\n");
if (handle_bchan(msg))
return 0 ;
- } else {
- cb_log(9,0,"NO BCHANNEL_BIT !\n");
- }
-
+ }
+
if (handle_timers(msg))
return 0 ;
@@ -2938,10 +2841,8 @@
cb_log(0, port, "Restarting this port.\n");
if (stack) {
cb_log(0, port, "Stack:%p\n",stack);
-
clear_l3(stack);
-
{
msg_t *msg=alloc_msg(MAX_MSG_SIZE);
iframe_t *frm;
@@ -2954,12 +2855,9 @@
frm=(iframe_t*)msg->data;
/* we must activate if we are deactivated */
/* activate bchannel */
-
frm->prim = DL_RELEASE | REQUEST;
-
frm->addr = stack->upper_id | FLG_MSG_DOWN;
-
frm->dinfo = 0;
frm->len = 0;
msg_queue_tail(&glob_mgr->activatequeue, msg);
@@ -3140,8 +3038,6 @@
}
stack=stack_init(midev, port, ptp);
-
-
if (!stack) {
perror("init_stack");
exit(1);
Modified: team/crichter/0.3.0/channels/misdn/isdn_lib_intern.h
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_lib_intern.h?rev=9213&r1=9212&r2=9213&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_lib_intern.h (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_lib_intern.h Wed Feb 8 09:19:58 2006
@@ -16,11 +16,8 @@
#ifndef mISDNUSER_HEAD_SIZE
-#ifdef MISDNUSER_JOLLY
#define mISDNUSER_HEAD_SIZE (sizeof(mISDNuser_head_t))
-#else
-#define mISDNUSER_HEAD_SIZE (sizeof(mISDN_head_t))
-#endif
+/*#define mISDNUSER_HEAD_SIZE (sizeof(mISDN_head_t))*/
#endif
Modified: team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c?rev=9213&r1=9212&r2=9213&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c Wed Feb 8 09:19:58 2006
@@ -165,23 +165,18 @@
strcpy(bc->oad, id);
switch (present) {
case 0:
-// cb_log(3, bc->stack->port, " --> Pres:0\n");
bc->pres=0; /* screened */
break;
case 1:
-// cb_log(3, bc->stack->port, " --> Pres:1\n");
bc->pres=1; /* not screened */
break;
default:
-// cb_log(3, bc->stack->port, " --> Pres:%d\n",present);
bc->pres=0;
}
switch (screen) {
case 0:
-// cb_log(4, bc->stack->port, " --> Screen:0\n");
break;
default:
-// cb_log(4, bc->stack->port, " --> Screen:%d\n",screen);
;
}
}
@@ -210,7 +205,6 @@
strcpy(bc->rad, id);
bc->rnumplan=type;
-// cb_log(3, bc->stack->port, " --> Redirecting number (REDIR_NR): '%s'\n", id);
}
{
int coding, capability, mode, rate, multi, user, async, urate, stopbits, dbits, parity;
@@ -267,7 +261,6 @@
setup=(SETUP_t*)((msg->data+HEADER_LEN));
-// cb_log(2, bc->stack->port, " --> oad %s dad %s channel %d\n",bc->oad, bc->dad,bc->channel);
if (bc->channel == 0 || bc->channel == ANY_CHANNEL || bc->channel==-1)
enc_ie_channel_id(&setup->CHANNEL_ID, msg, 0, bc->channel, nt,bc);
else
@@ -346,7 +339,7 @@
CONNECT_t *connect;
msg_t *msg =(msg_t*)create_l3msg(CC_CONNECT | REQUEST, MT_CONNECT, bc?bc->l3_id:-1, sizeof(CONNECT_t) ,nt);
- cb_log(0,0,"BUILD_CONNECT: bc:%p bc->l3id:%d, nt:%d\n",bc,bc->l3_id,nt);
+ cb_log(6,bc->port,"BUILD_CONNECT: bc:%p bc->l3id:%d, nt:%d\n",bc,bc->l3_id,nt);
connect=(CONNECT_t*)((msg->data+HEADER_LEN));
@@ -765,7 +758,7 @@
dec_ie_channel_id(restart->CHANNEL_ID, (Q931_info_t *)restart, &exclusive, &channel, nt,bc);
if (channel==0xff) /* any channel */
channel=-1;
- cb_log(0, stack->port, "CC_RESTART Request on channel:%d on this port.\n");
+ cb_log(3, stack->port, "CC_RESTART Request on channel:%d on this port.\n");
}
@@ -822,15 +815,12 @@
iframe_t *frm = (iframe_t*) msg->data;
struct misdn_stack *stack=get_stack_by_bc(bc);
-
-#ifdef MISDNUSER_JOLLY
mISDNuser_head_t *hh;
hh=(mISDNuser_head_t*)msg->data;
-#else
- mISDN_head_t *hh;
- hh=(mISDN_head_t*)msg->data;
-#endif
-
+
+ /*hh=(mISDN_head_t*)msg->data;
+ mISDN_head_t *hh;*/
+
if (nt) {
if (hh->prim == (CC_RELEASE_COMPLETE|CONFIRM)) {
cb_log(0, stack->port, "CC_RELEASE_COMPLETE|CONFIRM [NT] \n");
More information about the asterisk-commits
mailing list