User Application AoH API GP API RequestsData & Events Low Level API Calls IP NIC Digital T1/E1 PCI and PCIe Analog Station FXS PCIe Analog Trunk FXO PCIe

  • View
    217

  • Download
    3

Embed Size (px)

Text of User Application AoH API GP API RequestsData & Events Low Level API Calls IP NIC Digital T1/E1 PCI...

  • RequestsData & EventsLow Level API CallsDigital T1/E1 PCI and PCIe Analog Station FXS PCIe Analog Trunk FXO PCIe

  • ChannelRecordRecordPlayPlayVirtualChannelPlayRecord

  • Which tone?Store the detected SIT.Detected SITs?Detected SITsCompare sequence of detected SITs with defined SIT messages.SIT messagedetected?Report detectedSIT message.PKX_EVENT_CHANNEL_TONE_ONNot SITSIT (one of SIT0 to SIT4)< 3= 3NoYesPKX_EVENT_CALL_ANALYSIS_DETECTED_SIT_MESSAGE(p0=channel assigned to the call; p1=SIT message; p2=user-defined message)

  • lengthON = measured speechONsegment lengthlengthOFF=measured speechOFFsegment lengthincrement numberOfWordsLive PersonAnsweringMachineAnsweringMachinelengthON >livePersonMaxTimelengthOFF >speechEndTimenumberOfWords >livePersonWordsYesYesNoNoNoYesAnsweringMachinelengthON + previously accumulated on time >livePersonMaxTotalTimeNoYes

  • SystemMedia ProcessingGroupChannelSignalingConferenceCallCall Progress and Analysis

  • SystemGroupMedia ProcessingConfiguration FilesPKX_SYSTEM_OpenGroupGroupGroupGroupDefinitionsPKX_ SYSTEM_GetConfigPKX_ GROUP_GetHandleConferenceChannelChannelChannelChannelChannelChannelChannelChannelChannelChannelChannelChannelChannelChannelChannelChannelPKX_ CHANNEL_GetHandleCallCallCallConnection

    PKX_ CHANNEL_FullDuplexConnect PKX_ CALL_GetChannel PKX_ CONF_AddMember

  • SystemCallGroupConferenceChannelConnectionN1N120/10/10/1NMedia ProcessingNN0/1

  • DisabledOpenCloseStopStartEnabledRunningCall eventscan occur at any timeGroup and channel handles can be retrieved

  • pikagp.cfgAoB=filenameAoH=filenameAoB Configuration filetype0=AoB group name1[group type]type1=AoB group name2[AoB group name1]interface0=board0,port rangeinterface1=board1,port range[AoB group name2]interface0=board1,port rangeinterface1=board2,port rangeboard0=board name1[board]board1=board name2board2=board name3[board name3]id=board idserial=board serial number[board name2]id=board idserial=board serial number[board name1]id=board idserial=board serial numberAoH Configuration fileproduct

  • pikagp.cfg[group name1]type=group typeproduct=aobchannels=type0callpa=call progress analysis name[pattern name1]type=pattern type cadences=n states=m state0=2000statem-1=4000 [tone_generation] tone0=tone name 1tone1=tone name 2tone2=tone name 3[tone name 1]off=80 frequency1=941 amplitude1=-17.0 frequency2=1633 amplitude2=-15.0on=80 [tonepatterns] tone_pattern0=tone pattern 1tone_pattern1=tone pattern 2tone_pattern2=tone pattern 3[tone pattern 1] repeat=r cadences=n cadence0=0 cadence1=1 cadence2=0 cadencen-1=2

  • AoH Product Configuration FileRoot Configuration FileAoB Product Configuration File[isdn]isdn0=isdn_interface_5isdn1=isdn_interface_6isdn2=isdn_interface_8isdn3=isdn_interface_9isdn4=isdn_interface_0

    [sip]sip0=aob_sip_group

  • Open the system objectPKX_SYSTEM_OpenStartRetrieve group namesPKX_SYSTEM_GetConfigRetrieve group handleMoregroups?PKX_GROUP_GetHandleRetrieve group type and number of channelsYesPKX_GROUP_GetConfigNoInitializeuserapplicationinternalstructuresStart media and callprocessingPKX_SYSTEM_StartWait foreventSystem shutdownevent?Timeoutevent?ProcesseventPKX_SYSTEM_WaitOnEventYesNoEndYesNo

  • Initiatea callWait foreventSwitch oncall eventtypePKX_CALL_Make()Processcall answeredProcessdiallingCALL_DIALINGProcessalertingCALL_ALERTINGProcesscall proceedingCALL_PROCEEDINGCALL_CONNECTED

  • Wait foreventSwitch onEvent typeAccept the callGROUP_INCOMING_CALLDestinationringing,answer the original callCALL_ALERTINGCall destinationPKX_CALL_Make()PKX_CALL_Answer()PKX_CALL_Accept()PKX_CHANNEL_FullDuplexConnect()Originalcall answered,connectdestinationringing to original callerCALL_ANSWEREDConnectthe callsPKX_CHANNEL_HalfDuplexConnect()CALL_CONNECTED

  • Wait foreventSwitch onEvent typeGROUP_INCOMING_CALLAnswer the callPKX_CALL_AnswerPKX_CHANNEL_PlayAddData PKX_CHANNEL_PlayPKX_CHANNEL_CollectDigits ProcessincomingcallCALL_ANSWERED

  • Wait foreventSwitch onevent typeReject the callGROUP_INCOMING_CALLRelease thecallCALL_DISCONNECTEDPKX_CALL_ReleasePKX_CALL_RejectRelease thecallDisconnectthe callPKX_CALL_DropCALL_DROPPEDPKX_CALL_ReleaseAdd channelto list ofavailablechannelsCHANNEL_READY

  • EnablebypassDisablebypassGet bypassresourceinformationPKX_[CHANNEL | CONF]_GetBypassInfo()PKX_[CHANNEL | CONF]_EnableBypass ()PerformAoHbypassfunctionsPKX_[CHANNEL | CONF]_DisableBypass ()PKX_PRODUCT_LIBRARY_AOHPKH_xxx ()

  • GP API function callPerformAoHfunctionAoH Thread QueueMain Thread QueueRetrieveevent fromqueueProcesseventInject resultevent inmain queueRetrieveevent fromqueueProcessevent

  • Retrieveevent fromqueueProcesseventUserApplicationPKX_SYSTEM_InjectEvent() PKX_SYSTEM_WaitOnEvent()

  • DisconnectedIdleConnectedPKX_EVENT_CALL_ANSWEREDPKX_EVENT_CHANNEL_READYPKX_EVENT_CALL_DROPPEDPKX_CALL_Drop()Remote disconnect indicationLow level or protocolresources releasedNULLAlertingPKX_EVENT_CHANNEL_READYPKX_CALL_Drop()Remote disconnectindicationDetectedOfferedDialinginformationreceivedPKX_EVENT_CALL_DISCONNECTEDPKX_CALL_Release()PKX_EVENT_CHANNEL_IN_USECall detected(CAS, Trunk)Call detected(SIP, ISDN)PKX_CALL_Reject()PKX_CALL_AcceptPKX_CALL_Answer()PKX_CALL_Answer()PKX_EVENT_CALL_ACCEPTEDPKX_EVENT_GROUP_INCOMING_CALLPKX_EVENT_CHANNEL_IN_USE

  • DisconnectedIdleConnectedDialingNULLAlertingPKX_EVENT_CHANNEL_IN_USEPKX_EVENT_CALL_CONNECTEDPKX_EVENT_CHANNEL_READYPKX_EVENT_CALL_DROPPEDPKX_EVENT_CALL_DISCONNECTEDPKX_EVENT_CALL_ALERTINGPKX_CALL_Make()PKX_CALL_Make()on a channel in usePKX_CALL_Release()PKX_CALL_Drop()Remote disconnectindicationPKX_CALL_Drop()Remote disconnect indicationPKX_CALL_Drop()Remote disconnectindicationRemote rejectLow level or protocolresources releasedRemote answeredindicationInitiatingAddressing informationbeing sent

  • DownReadyIn usePKX_CALL_Reject()PKX_CALL_Drop()Remote disconnect indicationPKX_EVENT_CHANNEL_DOWNPKX_EVENT_CHANNEL_READYLow level detectionof a channel going out of serviceLow level detectionof a channel returning to servicePKX_CALL_Make()PKX_EVENT_GROUP_INCOMING_CALLPKX_EVENT_CHANNEL_IN_USE

  • GP Timer ThreadProductInterfaceAoHProductThread

  • GrandPrixSIP Local User Agentpika.com Proxy Serverpika.com Registrar Server1234567PKX_EVENT_GROUP_INCOMING_CALL 8

  • PlayPKX_ERROR_CHANNEL_AUDIO_DATA_NOT_AVAILABLEPlayPKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DONE_PLAYScenario 1AddBuffer(Last buffer flag set)Scenario 2AddBufferAddBufferAddBufferAddBuffer(Last buffer flag set)

    PlayPKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DATAREADY_PLAYScenario 4AddBuffer(Last buffer flag set)

    PKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_STOPPED_PLAYStopPlayFilePKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DONE_PLAYScenario 3Scenario 5PKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DONE_PLAYAddBufferAddBufferAddBufferAddBuffer(Last buffer flag set)

    Play

  • AddBuffer(Last buffer flag set)

    PKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_TERM_xxxTerminationconditionmetScenario 6AddBufferAddBufferAddBufferAddBuffer(Last buffer flag set)

    PlayAddBufferAddBufferAddBufferAddBuffer(Last buffer flag set)

    PlayPKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DATAREADY_PLAYScenario 7PKX_EVENT_CHANNEL_DATAREADY_PLAYPKX_EVENT_CHANNEL_DONE_PLAY

  • Scenario 8

  • RecordPKX_EVENT_CHANNEL_DATAREADY_ RECORDPKX_EVENT_CHANNEL_DATAREADY_RECORDPKX_EVENT_CHANNEL_DATAREADY _RECORDScenario 2RecordFileScenario 1PKX_EVENT_CHANNEL_DATAREADY _RECORDPKX_EVENT_CHANNEL_STOPPED_RECORDPKX_EVENT_CHANNEL_TERM_xxxTerminationconditionmetRecordGetDataRecordGetDataRecordGetDataRecordGetDataStopRecordPKX_EVENT_CHANNEL_DATAREADY_ RECORDPKX_EVENT_CHANNEL_DATAREADY_RECORDPKX_EVENT_CHANNEL_DATAREADY _RECORDScenario 3PKX_EVENT_CHANNEL_DATAREADY _RECORDPKX_EVENT_CHANNEL_STOPPED_RECORDPKX_EVENT_CHANNEL_RECORD_OVERFLOWRecordGetDataPKX_EVENT_CHANNEL_DATAREADY_ RECORDPKX_EVENT_CHANNEL_DATAREADY_RECORD

  • InternalDigitBuffer7CollectDigitsmaxDigits = 3GetDigits(numDigits = 4)StopPKX_EVENT_CHANNEL_STOPPED_COLLECT_DIGITSPKX_EVENT_CHANNEL_TERM_MAX_DIGITS CollectDigitsmaxDigits = 5CollectDigitsmaxDigits = 3PKX_EVENT_CHANNEL_TERM_MAX_DIGITS

  • SpeechSpeechSpeechSpeechPKX_EVENT_CHANNEL_SPEECH_ON PKX_EVENT_CHANNEL_SPEECH_OFF PKX_EVENT_CHANNEL_SPEECH_ON PKX_CHANNEL_EnableSpeechDetection PKX_CHANNEL_DisableSpeechDetection

  • UserApplicationGrandPrixPSTNRing NotificationPKX_CALL_Accept()OptionalPKX_CALL_Answer()Initial Call(Incoming)OffhookPKX_CALL_Transfer()HookflashFirst callnow on holdStutter DialtoneRing notificationFSK InformationDigitsConnectedOptional Call Analysis (fax, modem, SIT message, answering machine or human)PKX_CALL_Drop(TRANSFER)OnhookFirst and second call now joined on the switchPKX_EVENT_CHANNEL_READYPKX_CALL_Release()PKX_CALL_Release()TransferCompletionSupervisedCallTransfer

  • UserApplicationGrandPrixPSTNInitial Call(Outgoing)PKX_CALL_Transfer()HookflashFirst callnow on holdStutter DialtoneRing notificationDialtonePKX_CALL_Drop(TRANSFER)OnhookFirst and second call now joined on the switchPKX_EVENT_CHANNEL_READYPKX_CALL_Release()PKX_CALL_Release()TransferCompletionBlindCallTransfer

  • GrandPrixPSTNPKX_EVENT_CHANNEL_IN_USEPKX_EVENT_CALL_ALERTINGPKX_CALL_Make(call analysis enabled)PKX_EVENT_CALL_CONNECTEDInitial Call(Outgoing)UserApplicationPKX_EVENT_CALL_ANALYSIS_DETECTED_MODEM_FAXSend FaxPKX_CHANNEL_FaxAddDocumentPKX_CHANNEL_FaxGetDefaultConfigPKX_CHANNEL_FaxSend

  • UserApplicationGrandPrixPSTNPKX_CALL_Transfer()HookflashFirst callnow on hold