void CAPIConn::ConnectB3(_cmsg *CMSG) { if(dbg_capiind) cdebug << "ConnectB3..." << endl; NCCI=CONNECT_B3_IND_NCCI(CMSG); CONNECT_B3_RESP(CMSG, Appl_Id, CMSG->Messagenumber, NCCI,0,(_cstruct)NULL); }
void CAPIApp::HandleInd() { pthread_t dummyh; if(dbg_capiind) cdebug << "IND MsgNumber:" << CMSG->Messagenumber << endl; switch(CMSG->Command) { case CAPI_CONNECT: if(dbg_capiind) cdebug << "IND CONNECT PLCI=" << CONNECT_IND_PLCI(CMSG) << endl; if(playaudio) pthread_create(&dummyh,NULL,&PlayNameThread,new string(getCallingNumber(CMSG))); // Konfiguration lesen C[CONNECT_IND_PLCI(CMSG)]=cConf->getCAPIConn(CMSG,Appl_Id,&C); if( ((CAPIConn*)byPLCI(CONNECT_IND_PLCI(CMSG))) !=NULL ) ((CAPIConn*)byPLCI(CONNECT_IND_PLCI(CMSG)))->Connect(CMSG); else cdebug << "Unbekannte PLCI..." << endl; break; case CAPI_CONNECT_ACTIVE: if(dbg_capiind) cdebug << "IND CONNECT_ACTIVE" << endl; ((CAPIConn*)byPLCI(CONNECT_ACTIVE_IND_PLCI(CMSG)))->ConnectActive(CMSG); break; case CAPI_CONNECT_B3: if(dbg_capiind) cdebug << "IND CONNECT_B3 " << endl; ((CAPIConn*)byNCCI(CONNECT_B3_IND_NCCI(CMSG)))->ConnectB3(CMSG); break; case CAPI_CONNECT_B3_ACTIVE: if(dbg_capiind) cdebug << "IND CONNECT_B3_ACTIVE " << endl; ((CAPIConn*)byNCCI(CONNECT_B3_ACTIVE_IND_NCCI(CMSG)))->ConnectB3Active(CMSG); break; case CAPI_DATA_B3: if(dbg_capiind) cdebug << "IND DATA_B3 " << endl; ((CAPIConn*)byNCCI(DATA_B3_IND_NCCI(CMSG)))->B3Data(CMSG); break; case CAPI_FACILITY: if(dbg_capiind) cdebug << "IND FACILITY " << endl; ((CAPIConn*)byPLCI(FACILITY_IND_PLCI(CMSG)))->Facility(CMSG); break; case CAPI_INFO: if(dbg_capiind) cdebug << "IND INFO" << endl; try{ ((CAPIConn*)byPLCI(INFO_IND_PLCI(CMSG)))->InfoInd(CMSG); } catch(int i) { if(i==1) cdebug << "Info_Ind unbekannte PLCI=" << INFO_IND_PLCI(CMSG) << endl; } break; case CAPI_DISCONNECT: if(dbg_capiind) cdebug << "IND DISCONNECT reason=" << DISCONNECT_IND_REASON(CMSG) << endl; byPLCI(DISCONNECT_IND_PLCI(CMSG))->Disconnect(CMSG); delete byPLCI(DISCONNECT_IND_PLCI(CMSG)); break; case CAPI_DISCONNECT_B3: if(dbg_capiind) cdebug << "IND DISCONNECT_B3 reason=" << DISCONNECT_B3_IND_REASON_B3(CMSG) << endl; ((CAPIConn*)byNCCI(DISCONNECT_B3_IND_NCCI(CMSG)))->DisconnectB3(CMSG); break; default: cdebug << "Unhandled Ind. Cmd=" << (unsigned int) CMSG->Command << endl; } }