Lines Matching defs:Id
101 static void SendSSExtInd(APPL *, PLCI * plci, dword Id, byte * * parms);
103 static void VSwitchReqInd(PLCI *plci, dword Id, byte **parms);
166 static byte SendMultiIE(PLCI * plci, dword Id, byte * * parms, byte ie_type, dword info_mask, byte setupParse);
177 static word adjust_b_process (dword Id, PLCI *plci, byte Rc);
178 static void adjust_b1_resource (dword Id, PLCI *plci, API_SAVE *bp_msg, word b1_facilities, word internal_command);
179 static void adjust_b_restore (dword Id, PLCI *plci, byte Rc);
180 static void reset_b3_command (dword Id, PLCI *plci, byte Rc);
181 static void select_b_command (dword Id, PLCI *plci, byte Rc);
182 static void fax_connect_ack_command (dword Id, PLCI *plci, byte Rc);
183 static void fax_edata_ack_command (dword Id, PLCI *plci, byte Rc);
184 static void fax_connect_info_command (dword Id, PLCI *plci, byte Rc);
185 static void fax_adjust_b23_command (dword Id, PLCI *plci, byte Rc);
186 static void fax_disconnect_command (dword Id, PLCI *plci, byte Rc);
187 static void hold_save_command (dword Id, PLCI *plci, byte Rc);
188 static void retrieve_restore_command (dword Id, PLCI *plci, byte Rc);
192 static void dtmf_command (dword Id, PLCI *plci, byte Rc);
193 static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *msg);
194 static void dtmf_confirmation (dword Id, PLCI *plci);
195 static void dtmf_indication (dword Id, PLCI *plci, byte *msg, word length);
203 static void mixer_command (dword Id, PLCI *plci, byte Rc);
204 static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *msg);
205 static void mixer_indication_coefs_set (dword Id, PLCI *plci);
206 static void mixer_indication_xconnect_from (dword Id, PLCI *plci, byte *msg, word length);
207 static void mixer_indication_xconnect_to (dword Id, PLCI *plci, byte *msg, word length);
211 static void ec_command (dword Id, PLCI *plci, byte Rc);
212 static byte ec_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *msg);
213 static void ec_indication (dword Id, PLCI *plci, byte *msg, word length);
216 static void rtp_connect_b3_req_command (dword Id, PLCI *plci, byte Rc);
217 static void rtp_connect_b3_res_command (dword Id, PLCI *plci, byte Rc);
229 #define MapId(Id) (((Id) & 0xffffff00L) | MapController ((byte)(Id)))
230 #define UnMapId(Id) (((Id) & 0xffffff00L) | UnMapController ((byte)(Id)))
421 if (plci->Id
428 || ((ncci < MAX_NCCI+1) && (a->ncci_plci[ncci] == plci->Id))))
691 if(adapter[i].plci[j].Sig.Id) plci_remove(&adapter[i].plci[j]);
701 if(adapter[i].plci[j].Sig.Id) return 1;
728 static void start_internal_command (dword Id, PLCI *plci, t_std_internal_command command_function)
733 UnMapId (Id), (char *)(FILE_), __LINE__));
738 (* command_function)(Id, plci, OK);
750 static void next_internal_command (dword Id, PLCI *plci)
755 UnMapId (Id), (char *)(FILE_), __LINE__));
764 (*(plci->internal_command_queue[0]))(Id, plci, OK);
835 a->ncci_plci[ncci] = plci->Id;
857 dword Id;
860 Id = (((dword) ncci) << 16) | (((word)(plci->Id)) << 8) | a->Id;
863 if (a->ncci_plci[ncci] == plci->Id)
869 ncci_mapping_bug, Id));
874 ncci_code = ncci | (((word) a->Id) << 8);
878 && (((byte)(appl->DataFlags[i] >> 8)) == plci->Id))
890 if (a->ncci_plci[ncci] == plci->Id)
896 ncci_mapping_bug, Id));
901 ncci_code = ncci | (((word) a->Id) << 8);
905 && (((byte)(appl->DataFlags[i] >> 8)) == plci->Id))
921 if (ncci && (plci->adapter->ncci_plci[ncci] == plci->Id))
947 dword Id;
951 Id = (((dword) ncci) << 16) | (((word)(plci->Id)) << 8) | a->Id;
956 if (a->ncci_plci[ncci] != plci->Id)
960 ncci_mapping_bug, Id, preserve_ncci));
966 ncci_mapping_bug, Id, preserve_ncci, a->ncci_ch[ncci], ncci));
992 if (a->ncci_plci[ncci] == plci->Id)
996 ncci_mapping_bug, Id, preserve_ncci, a->ncci_ch[ncci], ncci));
1055 dbug(1,dprintf("plci_remove(%x,tel=%x)",plci->Id,plci->tel));
1060 if (plci->Sig.Id == 0xff)
1062 dbug(1,dprintf("D-channel X.25 plci->NL.Id:%0x", plci->NL.Id));
1063 if (plci->NL.Id && !plci->nl_remove_id)
1072 && (plci->Sig.Id
1195 static byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1224 Id = ((word)1<<8)|a->Id;
1225 sendf(appl,_CONNECT_R|CONFIRM,Id,Number,"w",0);
1226 sendf(appl, _DISCONNECT_I, Id, 0, "w", _L1_ERROR);
1237 if(Id & EXT_CONTROLLER)
1241 plci->Id = 0;
1242 sendf(appl, _CONNECT_R|CONFIRM, Id, Number, "w", _WRONG_IDENTIFIER);
1344 if (a->Info_Mask[appl->Id-1] & 0x200)
1359 plci->Sig.Id = 0xff;
1402 plci->Id = 0;
1407 Id,
1413 static byte connect_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1451 if (a->Info_Mask[appl->Id-1] & 0x200)
1464 clear_c_ind_mask_bit (plci, (word)(appl->Id-1));
1495 sendf(appl, _DISCONNECT_I, Id, 0, "w", _OTHER_APPL_CONNECTED);
1500 if(Id & EXT_CONTROLLER){
1548 if (a->Info_Mask[appl->Id-1] & 0x200)
1562 sendf(&application[i], _DISCONNECT_I, Id, 0, "w", _OTHER_APPL_CONNECTED);
1570 static byte connect_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1577 static byte disconnect_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1591 clear_c_ind_mask_bit (plci, (word)(appl->Id-1));
1596 sendf(&application[i], _DISCONNECT_I, Id, 0, "w", 0);
1600 if(plci->Sig.Id && plci->appl)
1603 if(plci->Sig.Id!=0xff)
1615 if (plci->NL.Id && !plci->nl_remove_id)
1619 sendf(appl,_DISCONNECT_R|CONFIRM,Id,Number,"w",0);
1620 sendf(appl, _DISCONNECT_I, Id, 0, "w", 0);
1629 sendf(appl, _DISCONNECT_R|CONFIRM, Id, Number, "w",Info);
1633 static byte disconnect_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1641 clear_c_ind_mask_bit (plci, (word)(appl->Id-1));
1661 static byte listen_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1667 dbug(1,dprintf("listen_req(Appl=0x%x)",appl->Id));
1672 a->Info_Mask[appl->Id-1] = GET_DWORD(parms[0].info);
1673 a->CIP_Mask[appl->Id-1] = GET_DWORD(parms[1].info);
1675 if (a->Info_Mask[appl->Id-1] & 0x200){ /* early B3 connect provides */
1676 a->Info_Mask[appl->Id-1] |= 0x10; /* call progression infos */
1680 if(Id&EXT_CONTROLLER && GET_DWORD(parms[1].info)){
1683 a->codec_listen[appl->Id-1] = &dummy_plci;
1698 a->codec_listen[appl->Id-1] = (PLCI *)0;
1703 Id,
1711 static byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1814 Id,
1821 static byte info_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1828 static byte alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1853 Id,
1859 static byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1950 a->Notification_Mask[appl->Id-1] = GET_DWORD(ss_parms[2].info);
1951 if(a->Notification_Mask[appl->Id-1] & SMASK_MWI) /* MWI active? */
1989 if(Id & EXT_CONTROLLER)
2051 if(Id & EXT_CONTROLLER)
2055 rplci->Id = 0;
2065 rplci->Id = 0;
2073 if (a->Info_Mask[appl->Id-1] & 0x200)
2201 if(relatedadapter->plci[i].Id == (byte)relatedPLCIvalue)
2228 dbug(1,dprintf("rplci->Id:%x",rplci->Id));
2264 cai[2] = plci->Sig.Id;
2576 return (dtmf_request (Id, Number, a, plci, appl, msg));
2581 return (mixer_request (Id, Number, a, plci, appl, msg));
2587 return (ec_request (Id, Number, a, plci, appl, msg));
2591 return (ec_request (Id, Number, a, plci, appl, msg));
2604 Id,
2610 static byte facility_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
2617 static byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
2647 if (!plci->NL.Id
2653 dbug(1,dprintf("B3 already connected=%d or no NL.Id=0x%x, dir=%d sstate=0x%x",
2654 plci->channels,plci->NL.Id,plci->call_dir,plci->SuppState));
2658 Id,
2688 if (plci->NL.Id && !plci->nl_remove_id)
2736 if ((plci->requested_options_conn | plci->requested_options | a->requested_options_table[appl->Id-1])
2743 if ((plci->requested_options_conn | plci->requested_options | a->requested_options_table[appl->Id-1])
2770 if ((plci->requested_options_conn | plci->requested_options | a->requested_options_table[appl->Id-1])
2809 start_internal_command (Id, plci, fax_connect_info_command);
2814 start_internal_command (Id, plci, fax_adjust_b23_command);
2831 start_internal_command (Id, plci, rtp_connect_b3_req_command);
2846 Id,
2852 static byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
2869 ncci = (word)(Id>>16);
2888 if ((plci->requested_options_conn | plci->requested_options | a->requested_options_table[plci->appl->Id-1])
2921 start_internal_command (Id, plci, fax_connect_ack_command);
2931 sendf(appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
2933 sendf(appl,_CONNECT_B3_ACTIVE_I,Id,0,"S",plci->ncpi_buffer);
2944 start_internal_command (Id, plci, rtp_connect_b3_res_command);
2955 sendf(appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
2959 start_internal_command (Id, plci, adjust_b_restore);
2968 static byte connect_b3_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
2973 ncci = (word)(Id>>16);
2989 static byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
2999 ncci = (word)(Id>>16);
3040 Id,
3046 static byte disconnect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3052 ncci = (word)(Id>>16);
3075 Id & 0xffffL,
3078 sendf(plci->appl, _DISCONNECT_I, Id & 0xffffL, 0, "w", 0);
3095 start_internal_command (Id, plci, fax_disconnect_command);
3103 static byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3115 ncci = (word)(Id>>16);
3174 Id,
3181 static byte data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3190 ncci = (word)(Id>>16);
3194 NCCIcode = ncci | (((word) a->Id) << 8);
3197 (byte)(appl->DataFlags[n]>>8)==plci->Id) {
3215 static byte reset_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3224 ncci = (word)(Id>>16);
3242 start_internal_command (Id, plci, reset_b3_command);
3251 Id,
3257 static byte reset_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3264 ncci = (word)(Id>>16);
3282 static byte connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3291 ncci = (word)(Id>>16);
3317 static byte select_b_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3332 msg->length,plci->Id,plci->tel,plci->NL.Id,plci->appl,plci->SuppState));
3351 if(Id & EXT_CONTROLLER)
3353 sendf(appl, _SELECT_B_REQ|CONFIRM, Id, Number, "w", 0x2002); /* wrong controller */
3358 clear_c_ind_mask_bit (plci, (word)(appl->Id-1));
3363 sendf(&application[i], _DISCONNECT_I, Id, 0, "w", _OTHER_APPL_CONNECTED);
3369 if(Id & EXT_CONTROLLER)
3428 start_internal_command (Id, plci, select_b_command);
3433 sendf(appl, _SELECT_B_REQ|CONFIRM, Id, Number, "w", Info);
3437 static byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3483 Id = ( ((word)plci->Id<<8)|plci->adapter->Id|0x80);
3484 dbug(1,dprintf("ManCMD,plci=0x%x",Id));
3557 Id,
3603 if (plci->NL.Id && !plci->nl_remove_id)
3609 if ((a->ncci_plci[ncci] == plci->Id) && (a->ncci_state[ncci] == CONNECTED))
3746 a->requested_options_table[appl->Id-1] = GET_DWORD (m_parms[0].info);
3759 Id,
3766 static byte manufacturer_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
3831 start_internal_command (Id, plci, fax_edata_ack_command);
3856 (e->user[0]+1)&0x7fff,e->Id,e->Req,e->Rc,e->Ind));
3878 return code with Id set to zero arrives.
3883 if (e->Id)
3902 a->FlowControlIdTable[ch] = e->Id;
3906 a->ch_flow_plci[ch] = plci->Id;
3914 if (no_cancel_rc && (a->FlowControlIdTable[ch] == e->Id) && e->Id) {
3917 dbug(3,dprintf ("XDI CAPI: RC cancelled Id:0x02, Ch:%02x", e->Id, ch));
3948 e->Id = 0;
3978 return code with Id set to zero arrives.
3983 if (e->Id)
3996 e->Id = 0;
4024 (a->ch_flow_plci[Ch] == plci->Id)) {
4032 (a->ch_flow_plci[Ch] == plci->Id) &&
4102 dword Id;
4136 Id = (((dword)(ncci ? ncci : ch)) << 16) | ((word)plci->Id << 8) | a->Id;
4137 if(plci->tel && plci->SuppState!=CALL_HELD) Id|=EXT_CONTROLLER;
4139 dbug(1,dprintf("Contr_RC-Id=%08lx,plci=%x,tel=%x, entity=0x%x, command=0x%x, int_command=0x%x",Id,plci->Id,plci->tel,plci->Sig.Id,plci->command,plci->internal_command));
4161 sendf(appl,_FACILITY_R|CONFIRM,Id,Number,"wws",Info,3,SSparms);
4172 sendf(appl,_FACILITY_R|CONFIRM,Id,Number,"wws",Info,3,SSparms);
4178 sendf(appl,_INFO_R|CONFIRM,Id,Number,"w",Info);
4185 if(plci->Sig.Id!=0xff)
4191 sendf(appl,_CONNECT_R|CONFIRM,Id&0xffL,Number,"w",_OUT_OF_PLCI);
4197 sendf(appl,_CONNECT_R|CONFIRM,Id,Number,"w",0);
4204 sendf(appl,_CONNECT_R|CONFIRM,Id&0xffL,Number,"w",_OUT_OF_PLCI);
4209 sendf(appl,_CONNECT_R|CONFIRM,Id,Number,"w",0);
4210 sendf(plci->appl,_CONNECT_ACTIVE_I,Id,0,"sss","","","");
4223 if(plci->Sig.Id!=0xff)
4226 sendf(appl,_DISCONNECT_R|CONFIRM,Id,Number,"w",0);
4239 sendf(appl,_CONNECT_B3_R|CONFIRM,Id,Number,"w",_WRONG_IDENTIFIER);
4243 Id = (Id & 0xffff) | (((dword) ncci) << 16);
4248 sendf(appl,_CONNECT_B3_R|CONFIRM,Id,Number,"w",0);
4249 sendf(appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
4254 sendf(appl,_CONNECT_B3_R|CONFIRM,Id,Number,"w",0);
4262 /* sendf(appl,_RESET_B3_R|CONFIRM,Id,Number,"w",0);*/
4266 sendf(appl,_DISCONNECT_B3_R|CONFIRM,Id,Number,"w",0);
4276 sendf(plci->appl,_CONNECT_R|CONFIRM,Id,Number,"w",Info);
4280 sendf(plci->appl,_CONNECT_R|CONFIRM,Id,Number,"w",Info);
4310 sendf(appl, _FACILITY_R|CONFIRM, Id, Number, "wws",0,3,SSstruct);
4359 sendf(plci->appl,_FACILITY_R|CONFIRM,Id&0x7,
4369 rId = ((word)rplci->Id<<8)|rplci->adapter->Id;
4390 rId = ((word)rplci->Id<<8)|rplci->adapter->Id;
4410 sendf(appl,_MANUFACTURER_R|CONFIRM,Id,Number,"dww",_DI_MANU_ID,_MANUFACTURER_R,_OUT_OF_PLCI);
4420 sendf(appl,_CONNECT_R|CONFIRM,Id&0xffL,Number,"w",_OUT_OF_PLCI);
4452 sendf(appl,_INFO_R|CONFIRM,Id&0xf,Number,"w",_WRONG_STATE);
4461 sendf(appl,_INFO_R|CONFIRM,Id&0xf,Number,"w",0);
4465 sendf(appl,_INFO_R|CONFIRM,Id&0xf,Number,"w",_WRONG_STATE);
4527 Id&0xf,
4536 Id,
4551 rId = Id;
4560 rId = ((word)rplci->Id<<8)|rplci->adapter->Id;
4619 sendf(plci->appl,_FACILITY_R|CONFIRM,Id,
4627 Id = (Id & 0xffff) | (((dword) ncci) << 16);
4635 (*(plci->internal_command_queue[0]))(Id, plci, rc);
4641 next_internal_command (Id, plci);
4646 Id = ((word)plci->Id<<8)|plci->adapter->Id;
4647 if(plci->tel) Id|=EXT_CONTROLLER;
4680 if(!application[i].Id) application[i].CDEnable = 0;
4683 sendf(&application[i],_FACILITY_R|CONFIRM,Id,
4713 dbug(1,dprintf("ListenCheck, new SIG_ID = 0x%x",plci->Sig.Id));
4768 dword Id;
4779 if (ncci && (a->ncci_plci[ncci] == plci->Id))
4788 Id = (((dword)ncci)<<16)|((word)plci->Id<<8)|a->Id;
4789 if(plci->tel) Id|=EXT_CONTROLLER;
4790 sendf(plci->appl,_DATA_B3_R|CONFIRM,Id,data->Number,
4804 dword Id;
4814 if (a->ncci_state[ncci] && (a->ncci_plci[ncci] == plci->Id))
4816 Id = (((dword)ncci)<<16)|((word)plci->Id<<8)|a->Id;
4817 if(plci->tel) Id|=EXT_CONTROLLER;
4818 sendf(plci->appl,_DATA_B3_R|CONFIRM,Id,ncci_ptr->DataAck[ncci_ptr->data_ack_out].Number,
4831 dword Id;
4893 Id = ((word)plci->Id<<8)|a->Id;
4902 if(plci->tel && plci->SuppState!=CALL_HELD) Id|=EXT_CONTROLLER;
4903 dbug(1,dprintf("SigInd-Id=%08lx,plci=%x,tel=%x,state=0x%x,channels=%d,Discflowcl=%d",
4904 Id,plci->Id,plci->tel,plci->State,plci->channels,plci->hangup_flow_ctrl_timer));
4922 if (a->ncci_plci[ncci] == plci->Id)
4927 sendf(plci->appl,_DISCONNECT_B3_I, (((dword) ncci) << 16) | Id,0,"ws",0,"");
4931 sendf(plci->appl, _DISCONNECT_I, Id, 0, "w", 0);
4970 Id,
5006 UnMapController (a->Id), GET_DWORD (&esc_profile[6]),
5083 UnMapController (a->Id), a->profile.Global_Options,
5090 force_mt_info = SendMultiIE(plci,Id,multi_fac_parms, FTY, 0x20, 0);
5091 force_mt_info |= SendMultiIE(plci,Id,multi_pi_parms, PI, 0x210, 0);
5092 SendSSExtInd(NULL,plci,Id,multi_ssext_parms);
5093 SendInfo(plci,Id, parms, force_mt_info);
5095 VSwitchReqInd(plci,Id,multi_vswitch_parms);
5126 sendf(plci->appl,_FACILITY_R|CONFIRM,Id&0x7,plci->number, "wws",0,3,CF_Ind);
5141 rId = ( (word)tplci->Id<<8)|tplci->adapter->Id;
5182 if(application[i].Id) sendf(&application[i],_FACILITY_I,Id,0,"ws",3, SS_Ind);
5254 sendf(plci->appl,_FACILITY_I,Id&0x7,0,"ws",3, Interr_Err_Ind);
5276 sendf(plci->appl,_FACILITY_I,Id&0xf,0,"ws",3, SS_Ind);
5281 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, SS_Ind);
5335 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, CONF_Ind);
5351 rId = ( (word)tplci->Id<<8)|tplci->adapter->Id;
5399 if(application[i].Id) sendf(&application[i],_FACILITY_I,Id,0,"ws",3, SS_Ind);
5410 sendf(plci->appl,_FACILITY_I,Id&0x7,0,"ws",3, CF_Ind);
5454 sendf(plci->appl,_FACILITY_I,Id&0x7,0,"wS",3, pty_cai);
5467 sendf(plci->appl,_FACILITY_I,Id&0xf,0,"ws",3, SS_Ind);
5472 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, SS_Ind);
5481 if(plci->appl && (a->Notification_Mask[plci->appl->Id-1]&SMASK_MWI))
5485 sendf(plci->appl,_FACILITY_I,Id&0xf,0,"wS",3, &pty_cai[2]);
5489 else sendf(plci->appl,_FACILITY_I,Id,0,"wS",3, &pty_cai[2]);
5498 sendf(&application[i],_FACILITY_I,Id&0x7,0,"wS",3, &pty_cai[2]);
5522 next_internal_command (Id, plci);
5577 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, CONF_Ind);
5603 if(plci->appl && (a->Notification_Mask[plci->appl->Id-1]&SMASK_CCBS))
5605 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, CONF_Ind);
5611 sendf(&application[i],_FACILITY_I,Id&0x7,0,"ws",3, CONF_Ind);
5632 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, SS_Ind);
5641 start_internal_command (Id, plci, hold_save_command);
5662 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, SS_Ind);
5681 start_internal_command (Id, plci, retrieve_restore_command);
5684 sendf(plci->appl,_FACILITY_I,Id,0,"ws",3, SS_Ind);
5687 start_internal_command (Id, plci, retrieve_restore_command);
5706 if(application[i].Id
5727 if(plci->tel) Id|=EXT_CONTROLLER;
5731 sendf(&application[i],_CONNECT_I,Id,0,
5749 Id,
5753 Id,
5755 SendMultiIE(plci,Id,multi_pi_parms, PI, 0x210, true));
5793 x_Id = ((word)tplci->Id<<8)|tplci->adapter->Id | 0x80;
5800 if (tplci->adapter->Info_Mask[tplci->appl->Id-1] & 0x200)
5819 if(!tplci->Sig.Id)
5845 if(!tplci->Sig.Id)
5848 sendf(tplci->appl,_CONNECT_R|CONFIRM,tplci->adapter->Id,0,"w",_OUT_OF_PLCI);
5872 next_internal_command (Id, plci);
5891 sendf(plci->appl,_CONNECT_ACTIVE_I,Id,0,"Sss",parms[21],"","");
5907 next_internal_command (Id, plci);
5939 if (a->Info_Mask[a->AdvSignalAppl->Id-1] & 0x200){
5960 Id = ((word)tplci->Id<<8)|a->Id;
5961 Id|=EXT_CONTROLLER;
5964 Id,
5975 next_internal_command (Id, plci);
5985 Id = ((word)a->AdvSignalPLCI->Id<<8)|a->Id;
5986 if(plci->tel) Id|=EXT_CONTROLLER;
5989 Id,
6003 clear_c_ind_mask_bit (plci, (word)(plci->appl->Id-1));
6005 sendf(plci->appl,_FACILITY_I,Id,0,"ws", (word)3, resume_cau);
6011 if (plci->NL.Id && !plci->nl_remove_id) {
6021 sendf(plci->appl,_FACILITY_I,Id,0,"ws", (word)3, "\x05\x04\x00\x02\x00\x00");
6022 sendf(plci->appl, _DISCONNECT_I, Id, 0, "w", 0);
6049 sendf(&application[i], _DISCONNECT_I, Id, 0, "w", 0);
6067 if (plci->NL.Id && !plci->nl_remove_id)
6090 sendf(plci->appl,_FACILITY_I,Id,0,"ws", (word)3, resume_cau);
6093 sendf(plci->appl,_DISCONNECT_I,Id,0,"w",i);
6099 SendSSExtInd(NULL,plci,Id,multi_ssext_parms);
6103 VSwitchReqInd(plci,Id,multi_vswitch_parms);
6115 else VSwitchReqInd(plci,Id,multi_vswitch_parms);
6122 static void SendSetupInfo(APPL * appl, PLCI * plci, dword Id, byte * * parms, byte Info_Sent_Flag)
6150 case 16: /* Channel Id */
6188 if(plci->adapter->Info_Mask[appl->Id-1] & Info_Mask) {
6189 sendf(appl,_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6196 static void SendInfo(PLCI *plci, dword Id, byte **parms, byte iesent)
6279 case 16: /* Channel Id */
6333 && appl->Id
6334 && plci->adapter->Info_Mask[appl->Id-1] &Info_Mask)
6338 sendf(&application[j],_INFO_I,Id&0x0f,0,"wS",Info_Number,Info_Element);
6356 sendf(&application[j],_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6362 && plci->adapter->Info_Mask[plci->appl->Id-1] &Info_Mask)
6366 sendf(plci->appl,_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6372 static byte SendMultiIE(PLCI *plci, dword Id, byte **parms, byte ie_type,
6414 && appl->Id
6415 && plci->adapter->Info_Mask[appl->Id-1] &Info_Mask)
6419 sendf(&application[j],_INFO_I,Id&0x0f,0,"wS",Info_Number,Info_Element);
6431 sendf(&application[j],_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6436 && plci->adapter->Info_Mask[plci->appl->Id-1] &Info_Mask)
6440 sendf(plci->appl,_INFO_I,Id,0,"wS",Info_Number,Info_Element);
6446 static void SendSSExtInd(APPL * appl, PLCI * plci, dword Id, byte * * parms)
6471 Id,
6482 Id,
6496 dword Id;
6576 Id = (((dword)(ncci ? ncci : ch)) << 16) | (((word) plci->Id) << 8) | a->Id;
6577 if(plci->tel) Id|=EXT_CONTROLLER;
6579 dbug(1,dprintf("NL_IND-Id(NL:0x%x)=0x%08lx,plci=%x,tel=%x,state=0x%x,ch=0x%x,chs=%d,Ind=%x",
6580 plci->NL.Id,Id,plci->Id,plci->tel,plci->State,ch,plci->channels,plci->NL.Ind &0x0f));
6678 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"S",plci->ncpi_buffer);
6683 if (!((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[plci->appl->Id-1])
6704 sendf(plci->appl, _FACILITY_I, Id & 0xffffL, 0,"ws", SELECTOR_DTMF, "\x01X");
6708 sendf(plci->appl, _FACILITY_I, Id & 0xffffL, 0,"ws", SELECTOR_DTMF, "\x01Y");
6711 dtmf_indication (Id, plci, plci->RData[0].P, plci->RData[0].PLength);
6714 dtmf_confirmation (Id, plci);
6724 dtmf_indication (Id, plci, dtmf_code_buffer, (word)(i + 1));
6730 mixer_indication_coefs_set (Id, plci);
6733 mixer_indication_xconnect_from (Id, plci, plci->RData[0].P, plci->RData[0].PLength);
6736 mixer_indication_xconnect_to (Id, plci, plci->RData[0].P, plci->RData[0].PLength);
6741 ec_indication (Id, plci, plci->RData[0].P, plci->RData[0].PLength);
6758 sendf(plci->appl,_DATA_B3_I,Id,0,
6769 sendf(plci->appl,_DATA_B3_I,Id,0,
6844 if ((plci->requested_options_conn | plci->requested_options | a->requested_options_table[plci->appl->Id-1])
6909 sendf(plci->appl,_MANUFACTURER_I,Id,0,"dwbS",_DI_MANU_ID,_DI_NEGOTIATE_B3,
6928 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
6930 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"S",plci->ncpi_buffer);
6941 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
6943 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"S",plci->ncpi_buffer);
6951 sendf(plci->appl,_DISCONNECT_B3_I,Id,0,"wS",GOOD,plci->ncpi_buffer);
6969 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
6971 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"S",plci->ncpi_buffer);
6981 start_internal_command (Id, plci, fax_edata_ack_command);
6993 Id = (Id & 0xffff) | (((dword) ncci) << 16);
6996 ch, a->ncci_state[ncci], a->ncci_plci[ncci], plci->Id, plci->State));
7006 sendf(plci->appl,msg,Id,0,"s","");
7008 sendf(plci->appl,msg,Id,0,"S",plci->ncpi_buffer);
7017 (*(plci->internal_command_queue[0]))(Id, plci, 0);
7019 next_internal_command (Id, plci);
7028 sendf(plci->appl,msg,Id,0,"S",plci->ncpi_buffer);
7038 sendf(plci->appl,msg,Id,0,"s","");
7040 sendf(plci->appl,msg,Id,0,"S",plci->ncpi_buffer);
7047 sendf(plci->appl,msg,Id,0,"S",plci->ncpi_buffer);
7052 start_internal_command (Id, plci, adjust_b_restore);
7062 (*(plci->internal_command_queue[0]))(Id, plci, 0);
7064 next_internal_command (Id, plci);
7091 sendf(plci->appl,_CONNECT_B3_I,Id,0,"s","");
7095 if ((plci->requested_options_conn | plci->requested_options | a->requested_options_table[plci->appl->Id-1])
7104 sendf(plci->appl,_CONNECT_B3_I,Id,0,"S",plci->ncpi_buffer);
7106 sendf(plci->appl,_DISCONNECT_B3_I,Id,0,"wS",info,plci->ncpi_buffer);
7125 Id & 0xffffL,
7128 sendf(plci->appl, _DISCONNECT_I, Id & 0xffffL, 0, "w", 0);
7137 sendf(plci->appl,_DISCONNECT_B3_I,Id,0,"wS",info,plci->ncpi_buffer);
7150 sendf(plci->appl,_RESET_B3_I,Id,0,"S",plci->ncpi_buffer);
7154 sendf(plci->appl,_RESET_B3_I,Id,0,"S",plci->ncpi_buffer);
7185 NCCIcode = ncci | (((word)a->Id) << 8);
7225 APPLptr->DataFlags[Num] = (plci->Id<<8) | (plci->NL.Ind>>4);
7280 for(i=0;i<a->max_plci && a->plci[i].Id;i++);
7286 plci->Id = (byte)(i+1);
7288 plci->Sig.Id = 0;
7289 plci->NL.Id = 0;
7344 dbug(1,dprintf("get_plci(%x)",plci->Id));
7749 if ((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[plci->appl->Id-1])
8370 if ((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[plci->appl->Id-1])
8464 if ((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[plci->appl->Id-1])
8467 if ((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[plci->appl->Id-1])
8490 if ((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[plci->appl->Id-1])
8711 static void sig_req(PLCI *plci, byte req, byte Id)
8717 plci->sig_remove_id = plci->Sig.Id;
8723 plci->RBuffer[plci->req_in++] = Id; /* sig/nl flag */
8737 dbug(1,dprintf("nl_req %02x %02x %02x", plci->Id, req, ncci));
8740 plci->nl_remove_id = plci->NL.Id;
8781 if(!(e->Id & 0x1f))
8783 e->Id = NL_ID;
8786 plci->RBuffer[plci->req_out-2] = (plci->Sig.Id==0xff) ? 0 : plci->Sig.Id;
8791 dbug(1,dprintf("%x:NLREQ(%x:%x:%x)",plci->adapter->Id,e->Id,e->Req,e->ReqCh));
8797 e->Id = plci->RBuffer[plci->req_out];
8801 if(!(e->Id & 0x1f))
8803 dbug(1,dprintf("%x:SIGREQ(%x:%x:%x)",plci->adapter->Id,e->Id,e->Req,e->ReqCh));
8865 dbug(1,dprintf("%x:DREQ(%x:%x)",a->Id,plci->NL.Id,plci->NL.Req));
9253 e->user[0] = a->Id - 1;
9261 dbug(3,dprintf("A(%d) SDRAM BAR = %08x", a->Id, a->sdram_bar));
9279 e->user[0] = a->Id - 1;
9341 word CapiRelease(word Id)
9348 if (!Id)
9350 dbug(0,dprintf("A: CapiRelease(Id==0)"));
9354 this = &application[Id-1]; /* get application pointer */
9358 if(application[i].Id) /* an application has been found */
9369 a->Info_Mask[Id-1] = 0;
9370 a->CIP_Mask[Id-1] = 0;
9371 a->Notification_Mask[Id-1] = 0;
9372 a->codec_listen[Id-1] = NULL;
9373 a->requested_options_table[Id-1] = 0;
9377 if(plci->Id) /* if plci owns no application */
9382 if(test_c_ind_mask_bit (plci, (word)(Id-1)))
9384 clear_c_ind_mask_bit (plci, (word)(Id-1));
9393 if(test_c_ind_mask_bit (plci, (word)(Id-1)))
9395 clear_c_ind_mask_bit (plci, (word)(Id-1));
9453 this->Id = 0;
9461 if(!plci->NL.Id && c_ind_mask_empty (plci))
9463 if(plci->Sig.Id == 0xff)
9464 plci->Sig.Id = 0;
9465 if(!plci->Sig.Id)
9467 dbug(1,dprintf("plci_remove_complete(%x)",plci->Id));
9468 dbug(1,dprintf("tel=0x%x,Sig=0x%x",plci->tel,plci->Sig.Id));
9469 if (plci->Id)
9476 plci->Id = 0;
9599 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
9637 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
9669 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
9685 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
9694 static void dtmf_prepare_switch (dword Id, PLCI *plci)
9698 UnMapId (Id), (char *)(FILE_), __LINE__));
9701 dtmf_confirmation (Id, plci);
9705 static word dtmf_save_config (dword Id, PLCI *plci, byte Rc)
9709 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
9715 static word dtmf_restore_config (dword Id, PLCI *plci, byte Rc)
9720 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
9741 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
9752 static void dtmf_command (dword Id, PLCI *plci, byte Rc)
9759 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command,
9781 adjust_b1_resource (Id, plci, NULL, (word)(plci->B1_facilities |
9784 if (adjust_b_process (Id, plci, Rc) != GOOD)
9787 UnMapId (Id), (char *)(FILE_), __LINE__));
9806 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
9850 UnMapId (Id), (char far *)(FILE_), __LINE__, Rc));
9855 adjust_b1_resource (Id, plci, NULL, (word)(plci->B1_facilities &
9858 if (adjust_b_process (Id, plci, Rc) != GOOD)
9861 UnMapId (Id), (char *)(FILE_), __LINE__));
9881 adjust_b1_resource (Id, plci, NULL, (word)(plci->B1_facilities |
9885 if (adjust_b_process (Id, plci, Rc) != GOOD)
9888 UnMapId (Id), (char *)(FILE_), __LINE__));
9908 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
9918 sendf (plci->appl, _FACILITY_R | CONFIRM, Id & 0xffffL, plci->number,
9923 static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *msg)
9932 UnMapId (Id), (char *)(FILE_), __LINE__));
9940 UnMapId (Id), (char *)(FILE_), __LINE__));
9946 UnMapId (Id), (char *)(FILE_), __LINE__));
9953 if (!((a->requested_options_table[appl->Id-1])
9957 UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (dtmf_parms[0].info)));
9988 UnMapId (Id), (char *)(FILE_), __LINE__));
9994 || !plci->NL.Id || plci->nl_remove_id)
9997 UnMapId (Id), (char *)(FILE_), __LINE__));
10014 if (!((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[appl->Id-1])
10018 UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (dtmf_parms[0].info)));
10029 UnMapId (Id), (char *)(FILE_), __LINE__));
10046 start_internal_command (Id, plci, dtmf_command);
10054 if (!((plci->requested_options_conn | plci->requested_options | plci->adapter->requested_options_table[appl->Id-1])
10058 UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (dtmf_parms[0].info)));
10067 UnMapId (Id), (char *)(FILE_), __LINE__));
10092 UnMapId (Id), (char *)(FILE_), __LINE__, dtmf_parms[3].info[i]));
10099 UnMapId (Id), (char *)(FILE_), __LINE__));
10104 start_internal_command (Id, plci, dtmf_command);
10109 UnMapId (Id), (char *)(FILE_), __LINE__, plci->dtmf_cmd));
10114 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
10120 static void dtmf_confirmation (dword Id, PLCI *plci)
10127 UnMapId (Id), (char *)(FILE_), __LINE__));
10134 sendf (plci->appl, _FACILITY_R | CONFIRM, Id & 0xffffL, plci->dtmf_msg_number_queue[0],
10143 static void dtmf_indication (dword Id, PLCI *plci, byte *msg, word length)
10148 UnMapId (Id), (char *)(FILE_), __LINE__));
10184 sendf (plci->appl, _FACILITY_I, Id & 0xffffL, 0, "wS", SELECTOR_DTMF, msg);
10199 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
10216 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
10223 static void dtmf_parameter_prepare_switch (dword Id, PLCI *plci)
10227 UnMapId (Id), (char *)(FILE_), __LINE__));
10232 static word dtmf_parameter_save_config (dword Id, PLCI *plci, byte Rc)
10236 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
10242 static word dtmf_parameter_restore_config (dword Id, PLCI *plci, byte Rc)
10247 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
10269 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
10434 (dword)((splci->Id << 8) | UnMapController (splci->adapter->Id)),
10448 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
10492 (dword)((splci->Id << 8) | UnMapController (splci->adapter->Id)),
10507 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
10522 (dword)(UnMapController (a->Id)), (char *)(FILE_), __LINE__));
10709 (dword)(UnMapController (a->Id)), (char *) hex_line));
10720 (dword)(UnMapController (a->Id)), (char *) hex_line));
10731 (dword)(UnMapController (a->Id)), (char *) hex_line));
10744 (dword)(UnMapController (a->Id)), i, (char *) hex_line));
10758 (dword)(UnMapController (a->Id)), i, (char *) hex_line));
10882 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
10890 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
10916 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
10924 static byte xconnect_write_coefs_process (dword Id, PLCI *plci, byte Rc)
10934 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->li_write_channel));
10941 UnMapId (Id), (char *)(FILE_), __LINE__));
10952 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
11270 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
11301 && notify_plci->NL.Id && !notify_plci->nl_remove_id)
11305 ((CAPI_MSG *) msg)->header.appl_id = notify_plci->appl->Id;
11308 ((CAPI_MSG *) msg)->header.controller = notify_plci->adapter->Id;
11309 ((CAPI_MSG *) msg)->header.plci = notify_plci->Id;
11321 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
11323 (dword)((notify_plci->Id << 8) | UnMapController (notify_plci->adapter->Id)), w));
11341 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
11399 static void mixer_prepare_switch (dword Id, PLCI *plci)
11403 UnMapId (Id), (char *)(FILE_), __LINE__));
11407 mixer_indication_coefs_set (Id, plci);
11412 static word mixer_save_config (dword Id, PLCI *plci, byte Rc)
11418 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
11437 static word mixer_restore_config (dword Id, PLCI *plci, byte Rc)
11443 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
11474 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
11502 if (!xconnect_write_coefs_process (Id, plci, Rc))
11505 UnMapId (Id), (char *)(FILE_), __LINE__));
11520 static void mixer_command (dword Id, PLCI *plci, byte Rc)
11526 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command,
11543 adjust_b1_resource (Id, plci, NULL, (word)(plci->B1_facilities |
11549 if (adjust_b_process (Id, plci, Rc) != GOOD)
11552 UnMapId (Id), (char *)(FILE_), __LINE__));
11571 mixer_indication_coefs_set (Id, plci);
11580 if (!xconnect_write_coefs_process (Id, plci, Rc))
11583 UnMapId (Id), (char *)(FILE_), __LINE__));
11603 adjust_b1_resource (Id, plci, NULL, (word)(plci->B1_facilities &
11609 if (adjust_b_process (Id, plci, Rc) != GOOD)
11612 UnMapId (Id), (char *)(FILE_), __LINE__));
11627 UnMapId (Id), (char *)(FILE_), __LINE__, (int)(plci->li_bchannel_id)));
11647 static void li_update_connect (dword Id, DIVA_CAPI_ADAPTER *a, PLCI *plci,
11658 && (plci == a->AdvSignalPLCI) && (Id & EXT_CONTROLLER))
11790 static void li2_update_connect (dword Id, DIVA_CAPI_ADAPTER *a, PLCI *plci,
11801 && (plci == a->AdvSignalPLCI) && (Id & EXT_CONTROLLER))
11898 static word li_check_main_plci (dword Id, PLCI *plci)
11903 UnMapId (Id), (char *)(FILE_), __LINE__));
11907 || !plci->NL.Id || plci->nl_remove_id
11911 UnMapId (Id), (char *)(FILE_), __LINE__));
11919 static PLCI *li_check_plci_b (dword Id, PLCI *plci,
11929 UnMapId (Id), (char *)(FILE_), __LINE__));
11945 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id));
11951 || !plci_b->NL.Id || plci_b->nl_remove_id
11955 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id));
11961 ((byte)(UnMapController (plci->adapter->Id) & ~EXT_CONTROLLER))
11966 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id));
11974 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b->B1_resource));
11982 static PLCI *li2_check_plci_b (dword Id, PLCI *plci,
11992 UnMapId (Id), (char *)(FILE_), __LINE__));
12008 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id));
12014 || !plci_b->NL.Id || plci_b->nl_remove_id
12019 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id));
12024 ((byte)(UnMapController (plci->adapter->Id) & ~EXT_CONTROLLER))
12029 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b_id));
12037 UnMapId (Id), (char *)(FILE_), __LINE__, plci_b->B1_resource));
12045 static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *msg)
12062 UnMapId (Id), (char *)(FILE_), __LINE__));
12070 UnMapId (Id), (char *)(FILE_), __LINE__));
12076 UnMapId (Id), (char *)(FILE_), __LINE__));
12165 UnMapId (Id), (char *)(FILE_), __LINE__));
12171 Info = li_check_main_plci (Id, plci);
12182 plci_b = li_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[8]);
12185 li_update_connect (Id, a, plci, plci_b_id, true, li_flags);
12196 UnMapId (Id), (char *)(FILE_), __LINE__));
12201 Info = li_check_main_plci (Id, plci);
12214 li2_update_connect (Id, a, plci, UnMapId (Id), true, li_flags);
12225 UnMapId (Id), (char *)(FILE_), __LINE__));
12233 UnMapId (Id), (char *)(FILE_), __LINE__));
12243 UnMapId (Id), (char *)(FILE_), __LINE__));
12247 plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]);
12250 li2_update_connect (Id, a, plci, plci_b_id, true, li_flags);
12276 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
12280 start_internal_command (Id, plci, mixer_command);
12290 UnMapId (Id), (char *)(FILE_), __LINE__));
12295 Info = li_check_main_plci (Id, plci);
12306 plci_b = li_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[8]);
12309 li_update_connect (Id, a, plci, plci_b_id, false, 0);
12320 UnMapId (Id), (char *)(FILE_), __LINE__));
12324 Info = li_check_main_plci (Id, plci);
12347 UnMapId (Id), (char *)(FILE_), __LINE__));
12355 UnMapId (Id), (char *)(FILE_), __LINE__));
12364 UnMapId (Id), (char *)(FILE_), __LINE__));
12368 plci_b = li2_check_plci_b (Id, plci, plci_b_id, plci_b_write_pos, &result[result_pos - 2]);
12371 li2_update_connect (Id, a, plci, plci_b_id, false, 0);
12395 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
12399 start_internal_command (Id, plci, mixer_command);
12404 || !plci->NL.Id || plci->nl_remove_id
12409 UnMapId (Id), (char *)(FILE_), __LINE__));
12417 UnMapId (Id), (char *)(FILE_), __LINE__));
12433 start_internal_command (Id, plci, mixer_command);
12438 UnMapId (Id), (char *)(FILE_), __LINE__, GET_WORD (li_parms[0].info)));
12442 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
12448 static void mixer_indication_coefs_set (dword Id, PLCI *plci)
12455 UnMapId (Id), (char *)(FILE_), __LINE__));
12500 sendf (plci->appl, _FACILITY_I, Id & 0xffffL, 0,
12510 static void mixer_indication_xconnect_from (dword Id, PLCI *plci, byte *msg, word length)
12517 UnMapId (Id), (char *)(FILE_), __LINE__, (int) length));
12545 (*(plci->internal_command_queue[0]))(Id, plci, 0);
12547 next_internal_command (Id, plci);
12553 static void mixer_indication_xconnect_to (dword Id, PLCI *plci, byte *msg, word length)
12557 UnMapId (Id), (char *)(FILE_), __LINE__, (int) length));
12571 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
12590 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
12594 plci_b_id = (plci->Id << 8) | UnMapController (plci->adapter->Id);
12614 && notify_plci->NL.Id && !notify_plci->nl_remove_id)
12642 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
12661 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
12670 static void ec_prepare_switch (dword Id, PLCI *plci)
12674 UnMapId (Id), (char *)(FILE_), __LINE__));
12679 static word ec_save_config (dword Id, PLCI *plci, byte Rc)
12683 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
12689 static word ec_restore_config (dword Id, PLCI *plci, byte Rc)
12694 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
12715 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
12726 static void ec_command (dword Id, PLCI *plci, byte Rc)
12732 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command,
12759 adjust_b1_resource (Id, plci, NULL, (word)(plci->B1_facilities |
12762 if (adjust_b_process (Id, plci, Rc) != GOOD)
12765 UnMapId (Id), (char *)(FILE_), __LINE__));
12784 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
12813 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
12817 adjust_b1_resource (Id, plci, NULL, (word)(plci->B1_facilities &
12820 if (adjust_b_process (Id, plci, Rc) != GOOD)
12823 UnMapId (Id), (char *)(FILE_), __LINE__));
12833 sendf (plci->appl, _FACILITY_R | CONFIRM, Id & 0xffffL, plci->number,
12839 static byte ec_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *msg)
12847 UnMapId (Id), (char *)(FILE_), __LINE__));
12854 UnMapId (Id), (char *)(FILE_), __LINE__));
12864 UnMapId (Id), (char *)(FILE_), __LINE__));
12872 UnMapId (Id), (char *)(FILE_), __LINE__));
12875 else if (!plci->State || !plci->NL.Id || plci->nl_remove_id)
12878 UnMapId (Id), (char *)(FILE_), __LINE__));
12908 start_internal_command (Id, plci, ec_command);
12915 start_internal_command (Id, plci, ec_command);
12920 start_internal_command (Id, plci, ec_command);
12925 start_internal_command (Id, plci, ec_command);
12930 start_internal_command (Id, plci, ec_command);
12935 UnMapId (Id), (char *)(FILE_), __LINE__, plci->ec_cmd));
12946 UnMapId (Id), (char *)(FILE_), __LINE__));
12964 UnMapId (Id), (char *)(FILE_), __LINE__));
12967 else if (!plci->State || !plci->NL.Id || plci->nl_remove_id)
12970 UnMapId (Id), (char *)(FILE_), __LINE__));
13003 start_internal_command (Id, plci, ec_command);
13010 start_internal_command (Id, plci, ec_command);
13015 UnMapId (Id), (char *)(FILE_), __LINE__, plci->ec_cmd));
13022 sendf (appl, _FACILITY_R | CONFIRM, Id & 0xffffL, Number,
13029 static void ec_indication (dword Id, PLCI *plci, byte *msg, word length)
13034 UnMapId (Id), (char *)(FILE_), __LINE__));
13074 sendf (plci->appl, _FACILITY_I, Id & 0xffffL, 0, "ws", (plci->appl->appl_flags & APPL_FLAG_PRIV_EC_SPEC) ?
13097 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13124 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13132 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13248 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13302 static void adv_voice_prepare_switch (dword Id, PLCI *plci)
13306 UnMapId (Id), (char *)(FILE_), __LINE__));
13311 static word adv_voice_save_config (dword Id, PLCI *plci, byte Rc)
13315 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
13321 static word adv_voice_restore_config (dword Id, PLCI *plci, byte Rc)
13327 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
13350 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
13420 || (plci->appl && (plci->adapter->requested_options_table[plci->appl->Id-1] & (1L << PRIVATE_DTMF_TONE)))))
13436 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13489 || (plci->appl && (plci->adapter->requested_options_table[plci->appl->Id-1] & (1L << PRIVATE_DTMF_TONE)))))
13541 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13553 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13586 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
13593 static word adjust_b_process (dword Id, PLCI *plci, byte Rc)
13601 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->adjust_b_state));
13622 UnMapId (Id), (char *)(FILE_), __LINE__,
13631 mixer_prepare_switch (Id, plci);
13634 dtmf_prepare_switch (Id, plci);
13635 dtmf_parameter_prepare_switch (Id, plci);
13638 ec_prepare_switch (Id, plci);
13640 adv_voice_prepare_switch (Id, plci);
13648 Info = mixer_save_config (Id, plci, Rc);
13659 Info = dtmf_save_config (Id, plci, Rc);
13667 && plci->NL.Id && !plci->nl_remove_id)
13693 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
13711 Info = ec_save_config (Id, plci, Rc);
13722 Info = dtmf_parameter_save_config (Id, plci, Rc);
13732 Info = adv_voice_save_config (Id, plci, Rc);
13755 UnMapId (Id), (char *)(FILE_), __LINE__,
13771 UnMapId (Id), (char *)(FILE_), __LINE__,
13782 Info = adv_voice_restore_config (Id, plci, Rc);
13793 Info = dtmf_parameter_restore_config (Id, plci, Rc);
13805 Info = ec_restore_config (Id, plci, Rc);
13829 UnMapId (Id), (char *)(FILE_), __LINE__, Info));
13844 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
13881 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
13889 get_ncci (plci, (byte)(Id >> 16), plci->adjust_b_ncci);
13890 Id = (Id & 0xffff) | (((dword)(plci->adjust_b_ncci)) << 16);
13915 Info = dtmf_restore_config (Id, plci, Rc);
13932 Info = mixer_restore_config (Id, plci, Rc);
13945 static void adjust_b1_resource (dword Id, PLCI *plci, API_SAVE *bp_msg, word b1_facilities, word internal_command)
13949 UnMapId (Id), (char *)(FILE_), __LINE__,
13955 plci->adjust_b_ncci = (word)(Id >> 16);
13962 UnMapId (Id), (char *)(FILE_), __LINE__,
13967 static void adjust_b_restore (dword Id, PLCI *plci, byte Rc)
13972 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
13990 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
13995 plci->adjust_b_ncci = (word)(Id >> 16);
13999 UnMapId (Id), (char *)(FILE_), __LINE__));
14001 if (adjust_b_process (Id, plci, Rc) != GOOD)
14004 UnMapId (Id), (char *)(FILE_), __LINE__));
14013 static void reset_b3_command (dword Id, PLCI *plci, byte Rc)
14019 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14031 plci->adjust_b_ncci = (word)(Id >> 16);
14035 UnMapId (Id), (char *)(FILE_), __LINE__));
14037 Info = adjust_b_process (Id, plci, Rc);
14041 UnMapId (Id), (char *)(FILE_), __LINE__));
14048 /* sendf (plci->appl, _RESET_B3_R | CONFIRM, Id, plci->number, "w", Info);*/
14049 sendf(plci->appl,_RESET_B3_I,Id,0,"s","");
14053 static void select_b_command (dword Id, PLCI *plci, byte Rc)
14060 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14075 plci->adjust_b_ncci = (word)(Id >> 16);
14088 UnMapId (Id), (char *)(FILE_), __LINE__));
14090 Info = adjust_b_process (Id, plci, Rc);
14094 UnMapId (Id), (char *)(FILE_), __LINE__));
14108 sendf (plci->appl, _SELECT_B_REQ | CONFIRM, Id, plci->number, "w", Info);
14112 static void fax_connect_ack_command (dword Id, PLCI *plci, byte Rc)
14118 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14145 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
14153 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"s","");
14155 sendf(plci->appl,_CONNECT_B3_ACTIVE_I,Id,0,"S",plci->ncpi_buffer);
14161 static void fax_edata_ack_command (dword Id, PLCI *plci, byte Rc)
14167 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14194 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
14201 static void fax_connect_info_command (dword Id, PLCI *plci, byte Rc)
14207 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14234 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
14248 sendf (plci->appl, _CONNECT_B3_R | CONFIRM, Id, plci->number, "w", Info);
14252 static void fax_adjust_b23_command (dword Id, PLCI *plci, byte Rc)
14258 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14270 plci->adjust_b_ncci = (word)(Id >> 16);
14274 UnMapId (Id), (char *)(FILE_), __LINE__));
14276 Info = adjust_b_process (Id, plci, Rc);
14280 UnMapId (Id), (char *)(FILE_), __LINE__));
14296 sendf (plci->appl, _CONNECT_B3_R | CONFIRM, Id, plci->number, "w", Info);
14300 static void fax_disconnect_command (dword Id, PLCI *plci, byte Rc)
14305 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14321 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
14343 static void rtp_connect_b3_req_command (dword Id, PLCI *plci, byte Rc)
14349 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14372 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
14392 sendf (plci->appl, _CONNECT_B3_R | CONFIRM, Id, plci->number, "w", Info);
14396 static void rtp_connect_b3_res_command (dword Id, PLCI *plci, byte Rc)
14402 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14418 nl_req_ncci (plci, N_CONNECT_ACK, (byte)(Id >> 16));
14425 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
14434 sendf (plci->appl, _CONNECT_B3_ACTIVE_I, Id, 0, "s", "");
14450 static void hold_save_command (dword Id, PLCI *plci, byte Rc)
14457 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14465 if (!plci->NL.Id)
14471 plci->adjust_b_ncci = (word)(Id >> 16);
14475 UnMapId (Id), (char *)(FILE_), __LINE__));
14477 Info = adjust_b_process (Id, plci, Rc);
14481 UnMapId (Id), (char *)(FILE_), __LINE__));
14487 sendf (plci->appl, _FACILITY_I, Id & 0xffffL, 0, "ws", 3, SS_Ind);
14491 static void retrieve_restore_command (dword Id, PLCI *plci, byte Rc)
14498 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14510 plci->adjust_b_ncci = (word)(Id >> 16);
14514 UnMapId (Id), (char *)(FILE_), __LINE__));
14516 Info = adjust_b_process (Id, plci, Rc);
14520 UnMapId (Id), (char *)(FILE_), __LINE__));
14526 sendf (plci->appl, _FACILITY_I, Id & 0xffffL, 0, "ws", 3, SS_Ind);
14534 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
14560 (dword)((plci->Id << 8) | UnMapController (plci->adapter->Id)),
14594 if (a->ch_flow_plci[i] == plci->Id) {
14612 a->ch_flow_plci[ch] = plci->Id;
14632 if ((!plci) || (!plci->Id) || ((a = plci->adapter) == NULL)) {
14639 (plci->Id == a->ch_flow_plci[i])) {
14666 (plci->Id == a->ch_flow_plci[i])) {
14674 (plci->Id == a->ch_flow_plci[i])) {
14687 if (plci->nl_req || !plci->NL.Id || plci->nl_remove_id) {
14720 NCCIcode = a->ch_ncci[ch] | (((word) a->Id) << 8);
14784 if(application[i].Id && (application[i].MaxNCCI) > 1 && (a->CIP_Mask[i]) && (a->group_optimization_enabled ==1) )
14792 if(application[i].Id && a->CIP_Mask[i] )
14796 if(a->plci[k].Id)
14880 if( application[i].Id && (application[i].Id!=id) )
14922 static void VSwitchReqInd(PLCI *plci, dword Id, byte **parms)
15026 e.user[0] = plci->adapter->Id - 1;
15034 plci->adapter->Id,
15060 e.user[0] = plci->adapter->Id - 1;