void CAPIConnReject::Connect(_cmsg *CMSG) { if(dbg_capiind) cdebug << "Answering RejectCall... delay=" << WaitConnectTime << endl; PLCI=CONNECT_IND_PLCI(CMSG); ALERT_REQ (CMSG, Appl_Id, 0, CONNECT_IND_PLCI(CMSG), NULL, NULL, NULL, NULL,NULL); MsgNr=CMSG->Messagenumber; setWaitforConnect(); }
void CAPIConnFaxpoll::Connect(_cmsg *CMSG) { if(dbg_capiind) cdebug << "Answering FaxpollCall..." << endl; PLCI=CONNECT_IND_PLCI(CMSG); ALERT_REQ (CMSG, Appl_Id, 0, CONNECT_IND_PLCI(CMSG), NULL, NULL, NULL, NULL,NULL); MsgNr=CMSG->Messagenumber; setWaitforConnect(); }
void CAPIConn::Connect(_cmsg *CMSG) { if(dbg_capiind) cdebug << "Connect_Ind" << endl << "Nothing to do -> Ignoring Call..." << endl; PLCI=CONNECT_IND_PLCI(CMSG); MsgNr=CMSG->Messagenumber; Reject=1; ConnectIt(); }
void CAPIConnVoice::Connect(_cmsg *CMSG) { if(dbg_callcontrol || dbg_capiresp) cdebug << "Answering VoiceCall..." << endl; PLCI=CONNECT_IND_PLCI(CMSG); _cmsg CMSG1; ALERT_REQ (&CMSG1, Appl_Id, CMSG->Messagenumber, PLCI, NULL, NULL, NULL, NULL,NULL); MsgNr=CMSG->Messagenumber; setWaitforConnect(); }
void CAPIConnIgnore::Connect(_cmsg *CMSG) { if(dbg_capiind) cdebug << "Ignoring Call..." << endl; PLCI=CONNECT_IND_PLCI(CMSG); Reject=1; MsgNr=CMSG->Messagenumber; CAPIConn::ConnectIt(); }
void CAPIConnDeflect::Connect(_cmsg *CMSG) { if(dbg_capiind) cdebug << "Answering DeflectCall..." << endl; PLCI=CONNECT_IND_PLCI(CMSG); _cmsg CMSG1; ALERT_REQ (&CMSG1, Appl_Id, 0, PLCI, NULL, NULL, NULL, NULL,NULL); MsgNr=CMSG->Messagenumber; setWaitforConnect(); }
void CAPIConnDDI::ConnectIt() { cdebug << " Neues Objekt erzeugen...--------------- " << endl; cdebug << " initConn " << endl; CAPIConn *dummy=cConf->getCAPIConn(ca,nr,0,Appl_Id,Conns); cdebug << " Jetzt muss Objekt ersetzt werden! " << endl; (*Conns)[CONNECT_IND_PLCI(ConnInd)]=dummy; dummy->Connect(ConnInd); cdebug << " Objekt ersetzt! " << endl; delete this; return; }
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; } }