Home

SWIPPA SDK User Manual

image

Contents

1. There are five types of events each of which belongs to an event structure Please see the following table Serial Event Event Structure Trigger Time No 1 EventReportlnfo EventReportinfo_Struct System retained System information like warning message 2 EventBeginRecord EventBeginRecord_Struct Start recording or off hook 3 EventEndRecord EventEndRecord_Struct Recording ends or headset hang up 4 EventCaptureDTMF EventCaptureDTMF_Struct Retrieve DTMF 5 EventUpdateStatus EventUpdateStatus_Struct Retrieve incoming number or outgoing number 1 EventReportinfo_ Struct typedef struct EventReportInfo_ Struct Synway Information Engineering Co Ltd Page 13 16 Synway SWIPPA SDK User Manual Public DWORD dwSize DWORD dwinfoType DWORD dwChIiD char szInfo MAX_INFO Structure dimension Information type Logic channel number Information EventReportinfo_Struct A Notice Please remain the above structure in the system 2 EventBeginRecord_Struct typedef struct EventBeginRecord_ Struct DWORD dwsSize Structure dimension DWORD dwChlD Logic channel number DWORD dwCallDirection 1 Calling O Called long dwStoreCodec Compression format char szCallerNo MAX_PHONENO Calling number char szCalledNo MAX_PHONENO Called number char szCallReflD MAX_CALLReflD A CallReflD EventBeginRecord_ Struct 3 EventEndRecord_ Struct typedef struct EventEndRecord_
2. and compatibility in any special situation SWIPPA module is designed around client server architecture in which the client is the application requesting the recording service and the server providing the service is the recording module The client server software architecture is a versatile message based and modular infrastructure that is intended to improve flexibility and interoperability as compared to centralized and time sharing processing A single machine can play both client and server roles depending on the software configuration which means both application and the recording modules can be loaded into one machine Moreover the client can be served by multiple recording servers SWIPPA consists of SWIPPA runtime library and SWIPPA SDK e SWIPPA runtime library is to direct VoIP protocol implementation and provide recording control interface e SWIPPA SDK provides recording application interface and related documents 1 1 SWIPPA SDK Get SWIPPA SDK from SWIPPA release package for details check SWIPPA Quick Start Manual SWIPPA SDK includes following documents Serial No Description 1 SWIPPA Client Lib C language head file 2 SWIPPA Client Lib lib file The manual 1 2 Reference SWIPPA Quick Start Manual 2 Constants Definition 2 1 Record Event Type enum VLM Event d EventReportinfo 200 EventBeginRecord 201 EventEndRecord 202 EventCaptchD TMF 203 EventUpdateStatus 204 Synway Inform
3. Function SWIPGetLastErrMsog Synway Information Engineering Co Ltd Page 6 16 be Synway SWIPPA SDK User Manual Public 4 SWIPGetLastErrMsg Function Prototype void Stdcall SWIPGetLastErrMsg char AErrBuf long ABufLength Parameter Declaration Parameter Description Char AErrBuf Receive an error message buffer pointer long ABufLength Buffer length error message up to 256 characters include C string zero and so the buffer length is recommended to be equal to or more than 256 characters Returned Value Returned Value Description No returned value Function Description Receive the error message caused by call failure Notes The buffer size of AErrBuf is recommended to use 256 characters If the error message is bigger than the buffer size partial error message equal to the buffer size will be received This function can be called only after SWIPinitialize is called to allocate client resource correlation Function SWIPGetLastErrCode 3 2 Recording Control Interface 3 2 1 Description When SWIPPA detects calling start or off hook SWIPPA sends EventBeginRecord event to record application conversation then the application calls SWIPStartRecord function to start recording When SWIPPA detects call ending or hang up SWIPPA sends EventEndRecord event to record application conversation then the application calls SWIPStopRecord function to end recording Synway Information Engine
4. Struct d DWORD dwsize Structure dimension DWORD dwChiD Logic channel number DWORD _dwTalkDurationSeconds Talking time DWORD _dwStatus bit1 pick up bit2 setup bit3 ring bit4 DTMF bit5 talking bit6 receive the other part number bit7 hang up bit8 function key EventEndRecord_Struct s Synway Information Engineering Co Ltd Page 14 16 be Synway SWIPPA SDK User Manual Public A Notice dwTalkDurationSeconds is the conversation time but not the recording time The recording time time difference after calling SWIPStopRecord and SWIPStartRecord function is counted by application itself 4 EventCaptureDTMF_Struct typedef struct EventCaptureDTMF_ Struct DWORD _dwSize Structure dimension DWORD dwChlD Logic channel number char chDTMF 1 2 A 4 EN 6 7 8 Q OI IK H EventCaptureDTMF_Struct 5 EventUpdateStatus_Struct typedef struct EventUpdateStatus_Struct DWORD dwSize Structure dimension DWORD dwChlD Logic channel number DWORD dwCallDirection 1 Calling Station calls to other party 0O Called Other party calls to station char szOtherPartyPhoneNo MAX_PHONENO A Other party s phone number EventUpdateStatus_ Struct 5 Error Table Constant Name Description SWIPSWIPRet_Success Cc Success SWIPRet_Error Unknown error SWIPRet_Params_ Error Parameter error SWIPRet_Func_Except Function execution extension SWIPRet_Func_ TimeOut Functio
5. allback function point of the audio stream if passing NULL to AStreamWrite this parameter it means no audio file will be generated void ACBParam Callback parameter when you call the AStreamWrite callback function the original value of ACBParam will be delivered to AStreamWrite Optional Returned Value Returned Value Description SWIPRet success Success Others Fail Function Description Arrange one channel to start recording The output record can be audio file or stream and can be both of them Notes If you call SWIPStartRecord function AFilePath and AStreamWrite parameter can not be set NULL simultaneously After calling SWIPOpenConn function you can call SWIPStartRecord function anytime like before conversation during conversation or finish conversation lf you call SWIPStartRecord before starting conversation the recorded audio is silence 7 SWIPStopRecord Function Prototype Long stdcall SWIPStopRecord long AConnHandle long AChID Parameter Declaration Parameter Description Synway Information Engineering Co Ltd Page 11 16 be Synway SWIPPA SDK User Manual Public Parameter Description long AConnHandle Handle returned by calling SWIPOpenConn function long AChID Channel Number Returned Value Returned Value Description SWIPRet_success Success Others Failure Function Description Set one channel to stop recording Notes After calling SWIPStartRecord function you ca
6. ated event See 4 2 Record Event Structure Returned Value Returned Value Description SWIPRet_success Some data is returned successfully Others Call function fails see 5 Error Table for error code Call SWIPGetLastErrMsg to return error message Function Description Obtain recording event show channel status and get incoming and outgoing phone number Notes Getting the event of EventBeginRecord means to start phone call or off hook Getting the event of EventEndRecord means to end phone call or hang up Getting the event of EventCaptchDTMF means to have received DTMF in conversation To improve performance VoIP phone shall not use In band DTMF Getting the event of EventUpdateStatus means to update the conversation message such as station number caller number and call direction Synway Information Engineering Co Ltd Page 10 16 be Synway SWIPPA SDK User Manual Public 6 SWIPStartRecord Function Prototype long _stdcall SWIPStartRecord long AConnHandle long AChID long ACodecFormat const char AFilename CBStreamWrite AStreamWrite void ACBParam Parameter Declaration Parameter Description long AConnHandle Handle returned by calling SWIPOpenConn function long AChID Channel number long ACodecFormat Output audio format const char AFilePath Output the server audio file path if passing NULL to this parameter it means no audio file will be generated CBStreamWrite Output the c
7. ation Engineering Co Ltd Page 3 16 be Synway SWIPPA SDK User Manual Public 2 2 Audio File Encoding Format Constants Name Value Description CODEC_ALAUW 0x06 G711 a CODEC_ULAUW 0x07 G711 u CODEC_ADPCM 0x11 ADPCM CODEC_GSM610 0x31 GSM CODEC_MP3 0x55 MP3 2 3 Extension Identification Type Constants Name Value Description EXTID_TYPE_IPV4 IP Address EXTID_TYPE_MAC MAC Address EXTID_TYPE_EXTNO Station Number 2 4 Others Constants Name Value Description MAX_PHONENO Telephone number maximum length NO MAX_MSGPARA 512 Information structure data length MAX_INFO 256 Information maximum length DEFAULT _IPPA_PORT 16000 Default IPPA Server connection port 3 SWIPPA Client Lib API SWIPPA Client Lib includes recording control interface and real time monitoring interface 3 1 Initialization and Unload 3 1 1 Description Before the recording application calls recording interface or real time monitoring interface you must call SWIPinitialize to allocate client resource Before the recording application stops you had better call SWIPUninitialize to release off client resource Synway Information Engineering Co Ltd Page 4 16 be Synway SWIPPA SDK User Manual Public 3 1 2 Function Interface 1 SWIPinitialize Function Prototype void Stdcall SWiIPinitialize Parameter Declaration Parameter Description No Parameter Available Returned Value Returned Value Description No Returned Va
8. be Synway SWIPPA SDK User Manual Public SWIPPA SDK User Manual History 2005 06 14 1 version Jianming Feng Senior R amp D Manager 2010 02 22 2 version Jianming Feng Cindy Shen Synway Information Engineering Co Ltd Page 1 16 be Synway SWIPPA SDK User Manual Public Contents DP a OCLC NOI es ee ea ee eccteucecuue peace ee 3 IS WIPFPASDR tee ees 3 Wg VO OCS EE 3 2 Constants 8 TIMIU EN 3 21 Record hn Ee 3 2 2 PCO Filet ENC OGIO FOM EC 4 2 3 Extension Identification Type EE 4 E a E E teased edit A ARNERE ONE AENRIEETUNERHERE 4 3 OWIPPA Client Lib CM 4 3 1 Initialization and Unload ernn 4 Di le DES CIO OM EE 4 3 1 2 FUNCTION Mera Essien E a ETEEN 5 3 2 Recording Control Interface ccccccccccccccsessseecceeeeceeeeeseeceeeeeeseeeeseeeeeeesssaeasseeeeeessueaaeeeeeeeessaaageeeeeeees 7 32 1 Re e e EE 7 3 22 FORBLOR DIE le 8 3 2 3 Voice Stream Output Callback Interface nennen 12 4 Structure Definition WEE 13 4 1 Channel Information Structure cccccseeccecssseceeeeseceeceeseeeceeceeceeseceeeeseceeeegeceeeeesesetsegeeseeegeeetaegeseeas 13 4 2 Record Event Structure ccccccsscsesecsssessescuseresseuarscuauevencauauecuaueusauausavausauareauaueasauauavenauarsanausaransauareass 13 SENO E TEE 15 Synway Information Engineering Co Ltd Page 2 16 be Synway SWIPPA SDK User Manual Public 1 SWIPPA Introduction SWIPPA is a VoIP recording component with high customizability
9. cess Connection has been on Others Call function fails error code see 5 Error Table Call SWIPGetLastErrMsg to return error message Function Description Check the connection with IPPA Server is disconnected or not If yes you must call SWIPCloseConn first and then call SWIPOpenConn to connect Correlation Function SWIPOpenConn 4 SWIPSetChanlnfo Function Prototype long stdcall SWIPSetChanInfo long AConnHandle Channellnfo_Struct AChaninfo Parameter Declaration Parameter Description long AConnHandle Handle returned by calling SWIPOpenConn function Channellnfo_Struct AChanInfo Pointer to Channel information struct Synway Information Engineering Co Ltd Page 9 16 be Synway SWIPPA SDK User Manual Public Returned Value Returned Value Description SWIPRet_success Successfully set Others Call function fails error code see 5 Error Table Call SWIPGetLastErrMsg to return error message Function Description Set property for recording channel 5 SWIPGetEvent Function Prototype long __stdcall SWIPGetEvent long amp AEventType long amp ADatasize void AData Parameter Declaration Parameter Description long amp AEventType Event type definition of event type please see 2 1 Record Event Type long amp ADatasize Input is the buffer size of AData while output is the length of returned data void AData Input is the data buffer output is the structure of returned rel
10. ering Co Ltd Page 7 16 be Synway SWIPPA SDK User Manual Public 3 2 2 Function Interface 1 SWIPOpenConn Function Prototype Long stdcall SWIPOpenConn const char AHost long APort Parameter Declaration Parameter Description const char AHost IPPA Serve IP Address long APort Connection port default is DEFAULT_IPPA_PORT see 2 Constants Definition Returned Value Returned Value Description gt 0 Return to connect handle lt 0 Call function fails error codes see 5 Error Table Call SWIPGetLastErrMsg to return error message Function Description Open connection between client and SWIPPA server Correlation Function SWIPCloseConn 2 SWIPCloseConn Function Prototype void stdcall SWIPCloseConn long AConnHandle Parameter Declaration Parameter Description long AConnHandle Handle returned by calling SWIPOpenConn function Returned Value Returned Value Description z No returned value Synway Information Engineering Co Ltd Page 8 16 be Synway SWIPPA SDK User Manual Public Function Description Disconnection between client and SWIPPA server Declaration Function SWIPOpenConn 3 SWIPIsConnOpened Function Prototype long __stdcall SWIPIsConnOpened long AConnHandle Parameter Declaration Parameter Description long AConnHandle Handle returned by calling SWIPOpenConn function Returned Value Returned Value Description SWIPRet_suc
11. lue Function Description Dynamic library initialization function allocates client resource Notes Client resource can not be allocated repeatedly so you should call SWIPUninitialize to release off client resource before calling SWIPinitialize again Only after allocating client resources can the recording application call recording interface or real time monitoring interface Correlation Function SWIPUninitialize 2 SWIPUninitialize Function Prototype void Stdcall SWIPUninitialize Parameter Declaration Parameter Description No Parameter Returned Value Returned Value Description Synway Information Engineering Co Ltd Page 5 16 be Synway SWIPPA SDK User Manual Public Returned Value Description No Returned Value Function Description Dynamic library unload to releases off client resource Notes After releasing off client resources any other interface function except SWIPinitialize will fail Correlation Function SWiIPinitialize 3 SWIPGetLastErrCode Function Prototype long Stdcall SWIPGetLastErrCode Parameter Declaration Parameter Description No parameter Returned Value Returned Value Description 0 No error code lt 0 Error code caused by last call Function Description Get the error code caused by last call Notes This function can be called only after SWIPinitialize is called to allocate client resource Correlation
12. n call SWIPStopRecord function anytime like during conversation or finish conversation lf the function has not been called after the end of conversation multiple conversations can be recorded in one audio file 3 2 3 Voice Stream Output Callback Interface Function Prototype typedef void __stdcall CBStreamWrite long ACh D const void AData long ASize void ACBParam Parameter Declaration Parameter Description long AChID Channel ID const void AData Voice stream data long ASize Length of voice stream data void ACBParam GER parameter made when the application calls SWIPStartRecord unction Returned Value Returned Value Description No returned value Synway Information Engineering Co Ltd Page 12 16 be Synway SWIPPA SDK User Manual Public Function Description Callback function of recording voice stream output Correlation Function SWIPStartRecord 4 Structure Definition 4 1 Channel Information Structure typedef struct Channellnfo_ Struct DWORD dwChlD Logic channel number DWORD dwApplication D Application ID retained by system long dwExtlD Type Extension Identification Type char szExtID MAX_PHONENO lt can be IP address MAC address or extension number Channellnfo_Struct A Notice dwChlD is the channel identification number in the entire system and can not used twice in the same system dwChID number is between 0 and 2048 4 2 Record Event Structure
13. n execution timeout SWIPRet_Conn_ Failed Connection failure SWIPRet_Inited Initialized SWIPRet_Buf_Full Buffer full SWIPRet_Login_Failed Login failure SWIPRet_Connect_NotOpened Connection not opened Synway Information Engineering Co Ltd Page 15 16 be Synway SWIPPA SDK User Manual Public Constant Name Error Code Description SWIPRet Unlnited 2011 Uninitialized SWIPRet MallocFailed 2012 Asynchronous return SWIPRet_NOData 2013 No data SWIPRet_CHFull 2014 Authorized channel is full SWIPRet_RecordStarted 2015 Channel has started recording SWIPRet_CHUnExist 2016 Channel does not exist SWIPRet_INVALIDVCOC 2017 Unavailable VCOC or VCOC resource is full Synway Information Engineering Co Ltd Page 16 16

Download Pdf Manuals

image

Related Search

Related Contents

Paxton Automotive Automobile Parts 1200 User's Manual    Mod: NT22/G-230-1    Black & Decker 661817-00 Owner's Manual  Harbor Freight Tools 2 Pc Submersible Trailer Lights Product manual  Mellanox WinOF VPI User Manual  Avis n°06 - cna  MC9S08AW60 Controller Board  Magnese MA-101010  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.