| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
www.spiritDSP.com/CST Literature Number: SPRU632 March 2003
Top Searches for this datasheetCaller (CID) Algorithm User's Guide www.spiritDSP.com/CST Literature Number: SPRU632 March 2003 Mailing Address: Texas Instruments Post Office 655303 Dallas, Texas 75265 Copyright 2003, Texas Instruments Incorporated Preface Read This First About This Manual following abbreviations used this document: CallerID, CLIP CLIR DT-AS DTMF MDMF PLMN PSTN SDMF TE-ACK VMWI XDAIS Alerting Signal Caller Identification Delivery (service) Customer premises equipment Alerting Signal Calling Line Identification Presentation Calling Line Identification Restriction Customer premises equipment. Also known (Terminal Equipment) Dual Tone-Alerting Signal. Dual Tone Multi-Frequency Frequency-Shift Keying Local Exchange Multiple data message format. Also known "Call Setup" Private Branch Exchange Public Land Mobile Network Public Switched Telephone Network Single data message format. used telephone networks Alerting Signal Terminal Equipment Acknowledgement Signal Visual Message Waiting Indication TMS320 Algorithm Standard Read This First Related Documentation From Texas Instruments Related Documentation From Texas Instruments Using TMS320 Algorithm Standard Static System (SPRA577) TMS320 Algorithm Standard Rules Guidelines (SPRU352) TMS320 Algorithm Standard Reference (SPRU360) Technical Overview eXpressDSP-Compliant Algorithms Software Producers (SPRA579) TMS320 Algorithm Standard (SPRA581) Achieving Zero Overhead with TMS320 Algorithm Standard IALG Interface (SPRA716) Related Documentation Public Switched Telephone Network (PSTN); Calling Line Identification Presentation (CLIP) supplementary service; Service description, 648, March 1997, DE/NA-010023 Public Switched Telephone Network (PSTN); Calling Line Identification Restriction (CLIR) supplementary service; Service description, 649, March 1997, DE/NA-010024 Public Switched Telephone Network (PSTN); Subscriber line protocol over local loop display (and related) services; Part hook data transmission, 659-1, DE/SPS-03034-1 Public Switched Telephone Network (PSTN); Subscriber line protocol over local loop display (and related) services; Part Off-hook data transmission, 659-2, September 1997, DE/SPS-03034-2 Public Switched Telephone Network (PSTN); Protocol over local loop display related services Terminal Equipment requirements; Part Off-line data transmission, 778-1, September 1997, DE/ATA-005062-1 Public Switched Telephone Network (PSTN); Protocol over local loop display related services; Terminal Equipment requirements; Part Online data transmission, 778-2, September 1997, DE/ATA-005062-2 CCITT Recommendation V.23 (1988): "600/1 200-baud modem standardized general switched telephone network". Trademarks Calling Line Identification Service, British Telecommunication plc, SIN227, Issue Calling Line Identification Service, Equipment Requirement, British Telecommunication plc, SIN242, Issue Nov., 1996. Trademarks TMS320t trademark Texas Instruments. SPIRIT CORPt tradmark Spirit Corp. other trademarks property their respective owners. Software Copyright Software Copyright 2003, SPIRIT Technologies, Inc. Read This First Need Assistance Need Assistance World-Wide Sites Online Semiconductor Product Information Center (PIC) Solutions Hotline On-linet Microcontroller Home Page Networking Home Page Military Memory Products Home Page http://www.ti.com http://www.ti.com/dsp http://www.ti.com/sc/micro North America, South America, Central America Product Information Center (PIC) (972) 644-5580 Literature Response Center U.S.A. (800) 477-8924 Software Registration/Upgrades (972) 293-5050 Fax: (972) 293-5967 U.S.A. Factory Repair/Hardware Upgrades (281) 274-2285 U.S. Technical Training Organization (972) 644-5580 Microcontroller Hotline (281) 274-2370 Fax: (281) 274-4203 Email: micro@ti.com Microcontroller Modem (281) 274-3700 8-N-1 Hotline Email: dsph@ti.com Internet anonymous ftp://ftp.ti.com/pub/tms320bbs Networking Hotline Fax: (281) 274-4027 Email: TLANHOT@micro.ti.com Europe, Middle East, Africa European Product Information Center (EPIC) Hotlines: Multi-Language Support Email: epic@ti.com Deutsch 8161 English Francais Italiano EPIC Modem European Factory Repair Europe Customer Training Helpline Fax: Fax: Asia-Pacific Literature Response Center Hong Kong Hotline Korea Hotline Korea Modem Singapore Hotline Taiwan Hotline Taiwan Modem Taiwan Internet anonymous +852 7288 +852 7268 2804 2914 Fax: +852 2200 Fax: +852 1002 Fax: 2828 Fax: 7179 +886 1450 Fax: +886 2718 +886 2592 ftp://dsp.ee.tit.edu.tw/pub/TI/ Japan Product Information Center +0120-81-0026 Japan) +03-3457-0972 (INTL) 813-3457-0972 Hotline +03-3769-8735 (INTL) 813-3769-8735 Nifty-Serve Type TIASP" Fax: +0120-81-0036 Japan) Fax: +03-3457-1259 (INTL) 813-3457-1259 Fax: +03-3457-7071 (INTL) 813-3457-7071 Need Assistance Documentation When making suggestions reporting errors documentation, please include following information that title page: full title book, publication date, literature number. Mail: Texas Instruments Incorporated Email: dsph@ti.com Email: micro@ti.com Technical Documentation Services, P.O. 1443 Houston, Texas 77251-1443 Note: When calling Literature Response Center order documentation, please specify literature number book. product price availability questions, please contact your local Product Information Center, www.ti.com/sc/support http://www.ti.com/sc/support details. additional technical support, Home Page Semiconductor KnowledgeBase Home Page (www.ti.com/sc/knowledgebase). have problems with Client Side Telephony software, please, read first list Frequently Asked Questions http://www.spiritDSP.com/CST. also visit this site obtain latest updates software documentation. Read This First Contents Contents Introduction Caller (CID) Algorithms This chapter brief explanation Caller (CID) algorithms their with TMS320C5400 platform. Introduction XDAOS Basics 1.2.1 Application/Framework 1.2.2 Interface 1.2.3 Application Development Limitations Caller Integration This chapter provides descriptions, diagrams, examples explaining integration algorithms describes various states integration. Overview Integration Flow International Support 2.3.1 Side Operation 2.3.2 Local Exchange Side Operation 2-10 2.3.3 DTMF-Based CallerID Reception Transmission 2-12 Specific Issues 2-13 2.4.1 Link-Time Configurable Options 2-13 2.4.2 Detection Delays 2-14 Integration Using CIDWRAPPER Class 2-15 Example Call Sequence 2-16 CallerID (CID) Descriptions This chapter provides user with clear understanding Caller (CID) algorithms their implementation with TMS320 Algorithm Standard interface (XDAIS). Standard Interface Structures 3.1.1 Instance Creation Parameters 3.1.2 Link-Time Configurable Options 3.1.3 Signal Parameters 3.1.4 DT-AS Detector Parameters 3.1.5 TE-ACK Signal Parameters 3.1.6 Carrier Detector Parameters Contents 3.1.7 Synchronizer Parameters 3.1.8 DT-AS Generator Parameters 3.1.9 TE-ACK Detector Parameters 3.1.10 Generator Parameters 3.1.11 DTMF Decoder Parameters 3.1.12 DTMF Encoder Parameters 3.1.13 Russian Caller Parameters 3-10 Standard Interface Functions 3-11 3.2.1 Algorithm Initialization 3-11 3.2.2 Algorithm Deletion 3-11 3.2.3 Instance Creation 3-12 3.2.4 Instance Deletion 3-12 Vendor-Specific Interface Structures 3-13 3.3.1 Caller States 3-14 3.3.2 Data-Link Level Message 3-15 3.3.3 Presentation Level Message 3-16 3.3.4 Caller Error Codes 3-20 Vendor-Specific Interface Functions 3-21 3.4.1 Configure State-of-CID Software 3-21 3.4.2 Current State 3-22 3.4.3 Error Code 3-23 3.4.4 Process Samples Received 3-23 3.4.5 Process Samples Transmitted 3-24 3.4.6 Parse Data-link Presentation Level Messages 3-24 CIDWRAPPER Class Reference 3-26 3.5.1 Caller Wrapper State 3-26 3.5.2 Caller Wrapper Sequence 3-26 3.5.3 Caller Wrapper Functions 3-27 Test Environment Description Directory Tree A.1.1 Test Vectors Format A.1.2 Test Project Figures Figures XDAIS System Layers XDAIS Layers Interaction Diagram Module Instance Lifetime Typical CallerID Flowchart During Hook call waiting) Typical CallerID Flowchart During Hook Contents Tables Tables 2-10 2-12 2-13 2-14 2-15 3-10 3-12 3-13 3-14 3-15 3-16 3-17 3-18 3-19 3-20 3-21 Brief Description Caller States Caller Network-Specific Protocols Summary Caller Associated With Ringing (Type Side Caller Prior Ringing Alerted DT-AS Side Caller Prior Ringing Alerted Ringing Pulse Side Caller Prior Ringing Alerted Line Reversal DT-AS Side Caller Call Waiting. side Caller Associated With Ringing (Type Side 2-10 Caller Prior Ringing Alerted DT-AS Side 2-10 Caller Prior Ringing Alerted Ringing Pulse Side 2-10 Caller Prior Ringing Alerted Line Reversal DT-AS Side 2-11 Caller Call Waiting Side 2-11 DTMF-Based Caller operation Side 2-12 DTMF-Based Caller Operation Side 2-12 Caller Detection Delays 2-14 CallerID Standard Interface Structures Instance Creation Parameters Link-Time Configurable Options Signal Parameters DT-AS Detector Parameters TE-ACK Signal Parameters Carrier Detector Parameters Synchronizer Parameters DT-AS Generator Parameters TE-ACK Detector Parameters Generator Parameters DTMF Decoder Parameters DTMF Encoder Parameters Instance Creation Parameters 3-10 CallerID Standard Interface Functions 3-11 CallerID Vendor-Specific Interface Structures 3-13 Caller States 3-14 Data-Link Layer Structure 3-15 Presentation Layer Structure 3-16 Message Types 3-19 Masks CID_Message.validFields 3-19 Tables 3-22 3-23 3-24 3-25 3-26 3-27 Caller Error Codes 3-20 CallerID-Specific Interface Functions 3-21 CIDWRAPPER Class Reference Table Summary 3-26 Caller Wrapper State 3-26 Caller Wrapper Sequence 3-26 CIDWRAPPER Functions 3-27 Test Files Contents xiii Notes, Cautions, Warnings Notes, Cautions, Warnings Caller support Side Operations object delivery libraries 2-13 Test Environment Location Test Duration Chapter Introduction Caller (CID) Algorithms This chapter briefly describes Caller (CID) algorithms their limitations when used with TMS320C5400 platform. benefit users familiar with TMS320 Algorithm Standard (XDAIS), brief descriptions typical XDAIS terms provided. Topic Page Introduction XDAOS Basics Limitations Introduction Introduction This document describes implementation Caller software developed SPIRITt Corp TMS320C5400 platform intended integration into various embedded devices telephony equipment such Embedded modems Payphones answering machines Data voice relays Systems Both Terminal Equipment Local Exchange sides supported full versions Caller packages. C54CST Note: Caller support Caller packages delivered with different options supported. TMS320C54CST device, only types side supported inside ROM. SPIRIT Caller used signal reception Telcordia (Bellcore) Calling Identity Delivery, Calling Identity Call Waiting (CIDCW) systems, British Telecom Calling Line Identification Service (CLIP), ETSI PSTN display service Local Exchange similar evolving services. SPIRIT Caller software fully TMS320 Algorithm Standard (XDAIS) compatible, reentrant code. Caller interface complies with TMS320 Algorithm Standard used multitasking environments. TMS320 Algorithm Standard (XDAIS) provides user with object interface simulating object-oriented principles asserts programming rules intended facilitate integration objects into framework. following documents provide further information regarding TMS320 Algorithm Standard (XDAIS): Using TMS320 Algorithm Standard Static System (SPRA577) TMS320 Algorithm Standard Rules Guidelines (SPRU352) TMS320 Algorithm Standard Reference (SPRU360) Introduction Technical Overview eXpressDSP-Compliant Algorithms Soft- ware Producers (SPRA579) TMS320 Algorithm Standard (SPRA581) Achieving Zero Overhead with TMS320 Algorithm Standard IALG Interface (SPRA716) Introduction Caller (CID) Algorithms XDAOS Basics XDAOS Basics This section instructs user develop applications/frameworks using algorithms developed vendors. explains call modules through fully eXpress DSP-compliant interface. Figure illustrates three main layers required XDAIS system: Application/Framework layer Interface layer Vendor implementation. Refer appendix detailed illustration interface layer. Figure 1-1. XDAIS System Layers Application/framework Interface Vendor's implementation 1.2.1 Application/Framework Users should develop application accordance with their design specifications. However, instance creation, deletion memory management requires using framework. recommended that customer XDAIS framework provided SPIRIT Corp. ROM. framework most basic form defined combination memory management service, input/output device drivers, scheduler. framework support/handle XDAIS algorithms, must provide framework functions that XDAIS algorithm interfaces expect present. XDAIS framework functions, also known Interface, prefixed with "ALG_". Below list framework functions that required: ALG_create memory allocation/algorithm instance creation ALG_delete memory de-allocation/algorithm instance deletion ALG_activate algorithm instance activation XDAOS Basics ALG_deactivate algorithm instance de-activation ALG_init algorithm instance initialization ALG_exit algorithm instance exit operations ALG_control algorithm instance control operations 1.2.2 Interface Figure block diagram different XDAIS layers they interact with each other. Figure 1-2. XDAIS Layers Interaction Diagram Application/framework Calls Concrete interface Implements Abstract interface Vendor's implementation 1.2.2.1 Concrete Interface concrete interface interface between algorithm module application/framework. This interface provides generic (non-vendor specific) interface application. example, framework call function MODULE_apply() instead MODULE_VENDOR_apply(). following files make this interface: Header file MODULE.h Contains required definitions/global vari- ables interface. Source File MODULE.c Contains source code interface func- tions. Introduction Caller (CID) Algorithms XDAOS Basics 1.2.2.2 Abstract Interface This interface, also known IALG Interface, defines algorithm implementation. This interface defined algorithm vendor must comply with XDAIS rules guidelines. following files make this interface: Header file iMODULE.h Contains table implemented functions, also known IALG function table, definition parameter structures module objects. Source File iMODULE.c Contains default parameter structure algorithm. 1.2.2.3 Vendor Implementation Vendor implementation refers functions implemented algorithm vendor match interface. These include core processing functions required algorithm some control-type functions required. table built with pointers these functions, this table known function table. function table allows framework invoke algorithm functions through single handle. algorithm instance object definition also done here. This instance object structure containing function table (table implemented functions) pointers instance buffers required algorithm. 1.2.3 Application Development Figure illustrates steps used develop application. This flowchart illustrates creation, use, deletion algorithm. handle instance object (and function table) obtained through creation instance algorithm. pointer instance object. XDAIS guidelines, software allows direct access instance data buffers, algorithms provided SPIRIT prohibit access. Detailed flow charts each particular algorithm provided vendor. XDAOS Basics Figure 1-3. Module Instance Lifetime Start Initialize parameters/ handle MODULE_init() MODULE_create() MODULE_apply() Control? MODULE_control() Apply? MODULE_delete() MODULE_exit() steps below describe steps illustrated Figure 1-3. Introduction Caller (CID) Algorithms XDAOS Basics Step Perform non-XDAIS initializations definitions. This include creation input output data buffers framework, well device driver initialization. Step Define initialize required parameters, status structures, handle declarations. Step Invoke MODULE_init() function initialize algorithm module. This function returns nothing. most algorithms, this function does nothing. Step Invoke MODULE_create() function, with vendor's implementation algorithm, create instance algorithm. MODULE_create() function returns handle created instance. create many instances framework support. Step Invoke MODULE_apply() function process some data when framework signals that processing required. Using this function obligatory vendor supply user with functions obtain necessary processing. Step required, MODULE_control() function invoked read modify algorithm status information. This function also optional. Vendor provide other methods status reporting control. Step When processing done, MODULE_delete() function invoked delete instance from framework. instance memory freed framework here. Step Invoke MODULE_exit() function remove module from framework. most algorithms, this function does nothing. integration flow specific algorithms quite different from sequence described above several reasons: Specific algorithms work with data frames various lengths for- mats. Applications require more robust effective methods error handling reporting. Instead using MODULE_apply() function, SPIRIT Corp. algo- rithms extended interface data processing, thereby encapsulating data buffering within XDAIS object. This provides user with more reliable method data exchange. Limitations Limitations This implementation supports mandatory procedures defined 648, 649, 659-1, 659-2, 778-1, 778-2, CCITT Recommendation V.23. However, limitations using optional features listed below. Recommendation 659-1 778-1 CCITT Recommendation V.23 Limitation Annex Qualification parameter encoding supported. Annexes D.5, D.7. Mutual exclusion parameters verified. rate supported. Introduction Caller (CID) Algorithms Chapter Caller Integration This chapter provides descriptions, digarms, examples explanations various states integration. Topic Page Overview Integration Flow International Support Specific Issues 2-13 Integration Using CIDWRAPPER Class 2-15 Example Call Sequence 2-16 Overview Overview basic concept SPIRIT's implementation CallerID that moment, object configured detection transmission particular CallerID signal switched states listed below: DT-AS (CAS) signal detector carrier (mark bit) detector message (including data-link layer) detector TE-ACK signal generator DT-AS signal generator TE-ACK detector signal generator message generator DTMF-based message decoder DTMF-based message generator state object changed moment calling CID_setState(). Selecting state CID_WAIT allows delay insertion between detection stages. object automatically leaves selected state upon following events: timeout expired. Signal generation completed. incoming signal detected (includes incorrect detection). Table briefly describes CallerID signal states. Table 2-1. Brief Description Caller States Enumeration Common states CID_DONOTHING CID_WAIT does nothing waits timeout expiration Action Overview Table 2-1. Brief Description Caller States (Continued) Enumeration (CPE) side CID_DTAS CID_TEACK CID_FSKDET CID_FSK CID_DTMFDET side CID_DTASGEN CID_TEACKDET CID_DTASTEACK CID_SAS CID_FSKGEN CID_DTMFGEN generates DT-AS signal receives TE-ACK signal from generates DT-AS signal receives TE-ACK signal from simultaneously generates signal generates V.23 Bell modulated message generates DTMF-based message receives DTAS signal generates TEACK signal receives carrier (find mark bit) receives message (including data-link layer) receives DTMF-based message converts into generic data-link layer Action Decoded DTMF messages automatically converted into common data-link layer format, allowing them processed without modification host software1. Complete implementation CallerID protocol represented consecutive switching object states. Figure illustrates typical CallerID sequencing during CallerID detection Call Waiting. Figure illustrates typical CallerID sequencing during on-hook state. Some timeouts parameters signals selected local network operators. Network operators some countries different signaling protocols CallerID. most common options listed chapter Chapter Also SPIRIT Corp. supplies algorithms R1.5 (Russian) CallerID detection this manner. Caller Integration Integration Flow Integration Flow order integrate CallerID into framework user should: Step Create CID_Params structure initialize with required parameters. Step Call CID_create() create instance CallerID. Step Select required CID_setState(). mode object using Step Receive transmit samples according selected mode. Step Check current object state using CID_getState(). Repeat Step Step until object cannot switched CID_DONOTING state. Step Perform additional actions associated with error code returned CID_getLastError(). Step Repeat Step through Step Step Call CID_delete delete instance CallerID. Integration Flow Figure 2-1. Typical CallerID Flowchart During Hook call waiting) hook Start conversation CID_create() CID_delete() hook? Wait DT-AS signal: select CID_DTAS state receive samples CID_receive() Mute voice path Generate TE-ACK signal: select CID_TEASK state transmit samples CID_transmit() Wait mark signal select CID_FSKDET state msec receive samples CID_receive() verify error code CID_getError() Timeout? Receive data: select CID_FSK state 2150 msec receive samples CID_receive() verify error code CID_getError() Parse CallerID message (can performed backgroung): CID_parse(): Restore voice path Caller Integration Integration Flow Figure 2-2. Typical CallerID Flowchart During Hook hook state CID_create() Wait ringing pulse (can performed system ring detector well selecting CID_RPAS state) Enable CallerID path Wait mark signal select CID_FSKDET state 2290 msec receive samples CID_receive() verify error code CID_getError() Timeout? Receive data: select CID_FSKDET state 2150 msec receive samples CID_receive() verify error code CID_getError() Parse CallerID message (can performed backgroung): CID_parse(): Disable CallerID path CID_delete() International Support International Support Network operators have option several types Caller They classified following categories: Caller associated with ringing. Caller prior ringing. Caller Call Waiting. categories differ execution sequence timeouts. Typical sequences listed Table 2-2. Strict complicity real parameters with this list mandatory subject changes according specific settings actual operator. Table 2-2. Caller Network-Specific Protocols Summary Type Caller associated with ringing (Type Caller prior ringing Caller prior ringing Caller prior ringing Caller Call Waiting (Type Alert Signal First ring pattern DT-AS Ringing Pulse Line reversal followed DT-AS DT-AS State hook hook hook hook hook Reference Table 2-3, Figure Table Table Table Table 2-7, Figure Operations CallerID side (terminal equipment) side (network end) substantially different. Section 2.3.1 contains typical sequences side section 2.3.2 contains summarized operations. 2.3.1 Side Operation Table 2-3. Caller Associated With Ringing (Type Side Action Wait first ring pattern Turn CallerID path Wait modulation Receive message Parse indicate message Turn CallerID path Associated Object State Method CID_FSKDET CID_FSK CID_Parse() Duration (Timeout), msec 2290 2150 Starts after ring. Caller Integration International Support Table 2-4. Caller Prior Ringing Alerted DT-AS Side Action Turn CallerID path Wait DT-AS signal Wait modulation Receive message Parse indicate message Associated Object State Method CID_DTAS CID_FSKDET CID_FSK CID_Parse() Duration (Timeout), msec infinite 2150 Table 2-5. Caller Prior Ringing Alerted Ringing Pulse Side Action Wait first ringing pulse Turn CallerID path Wait modulation Receive message Parse indicate message Associated Object State Method CID_FSKDET CID_FSK CID_Parse() Duration (Timeout), msec 1090 2150 Starts trailing edge ringing pulse. Table 2-6. Caller Prior Ringing Alerted Line Reversal DT-AS Side Action Wait line reversal Apply AC/DC load wetting pulse (optionally) Turn CallerID path Wait DT-AS signal Wait modulation Receive message Parse indicate message Wait Remove AC/DC load (optionally) turn CallerID path Associated Object State Method CID_DTAS CID_FSKDET CID_FSK CID_Parse() CID_WAIT Duration (Timeout), msec 1090 2150 Starts line reversal detection. International Support Table 2-7. Caller Call Waiting. side Action Wait DT-AS signal Block speech path Send TE-ACK acknowledgement Wait modulation Receive message Parse indicate message Wait Restore speech path Associated Object State Method CID_DTAS CID_TEACK CID_FSKDET CID_FSK CID_Parse() CID_WAIT Duration (Timeout), msec infinite 2150 40.120 Good talk-off performance DT-AS detector offers waiting during whole off-hook state. Notes: Side Operations timeouts include appropriated detection delays. Timeouts modulation include maximum channel seizure dura- tion bits SIN227 standard. some countries, these timeouts reduced. case error, Caller path should turned enabled previously. Although ringing pulse duration should 200.300 msec range, some networks extend msec accompanied polarity reversal. Also, frequency range should accepted. Some exchanges (for example, complying with SIN227 standard) quire load switching addition enabling Caller path on-hook state. detailed operation described appropriate recommendations (see Calling Line Identification Service, British Telecommunication plc, SIN227, Issue Calling Line Identification Service, Equipment Requirement, British Telecommunication plc, SIN242, Issue Nov., 1996). Caller Integration International Support 2.3.2 Local Exchange Side Operation Table through Table 2-12 characterize optimal methods using CallerID software side. Some implementations require more complicated state machines accomplish more robust operations, using object will provide basic processing. Timeouts listed below subject change according specific country standards indicate typical values most European countries. Table 2-8. Caller Associated With Ringing (Type Side Action Encode message Send first ring pattern Wait Send modulation Associated Object State Method CID_Parse() CID_WAIT CID_FSKGEN Duration (Timeout), msec 2290 After ring. Table 2-9. Caller Prior Ringing Alerted DT-AS Side Action Encode message Send DT-AS signal Wait Send modulation Associated Object State Method CID_Parse() CID_DTASGEN CID_WAIT CID_FSKGEN Duration (Timeout), msec 2290 Table 2-10. Caller Prior Ringing Alerted Ringing Pulse Side Action Encode message Send ringing pulse Wait Send modulation Associated Object State Method CID_Parse() CID_WAIT CID_FSKGEN Duration (Timeout), msec 2290 2-10 International Support Table 2-11. Caller Prior Ringing Alerted Line Reversal DT-AS Side Action Encode message Change polarity Wait Send DT-AS signal Wait Send modulation Associated Object State Method CID_Parse() CID_WAIT CID_DTASGEN CID_WAIT CID_FSKGEN Duration (Timeout), msec 2290 Table 2-12. Caller Call Waiting Side Action Encode message Block speech path Wait Send DT-AS signal receive TE-ACK Wait Send modulation Wait Restore speech path Associated Object State Method CID_Parse() CID_WAIT CID_DTASTEACK CID_WAIT CID_FSKGEN CID_WAIT Duration (Timeout), msec 2290 When TE-ACK signal received, restore speech path <150 msec. Caller Integration 2-11 International Support 2.3.3 DTMF-Based CallerID Reception Transmission Various network operators DTMF-based signaling protocol provide subscribers with information about calling party. SPIRIT's implementation CallerID contains complete DTMF message decoders message generators that acquire data common data-link format converts them into DTMF digits internally. Table 2-13. DTMF-Based Caller operation Side Action Wait state: Associated Object State Method Duration (Timeout), msec wait line reversal detect voltage reached least CID_DTMFDET CID_Parse() CID_WAIT 4000 40.120 Turn CallerID path Receive DTMF-message Parse indicate message Wait Turn CallerID path Table 2-14. DTMF-Based Caller Operation Side Action Encode message Reverse polarity Wait Send DTMF-message Wait Associated Object State Method CID_Parse() CID_WAIT CID_DTMFGEN CID_WAIT Duration (Timeout), msec 4000 2-12 Specific Issues Specific Issues 2.4.1 Link-Time Configurable Options SPIRIT Corp.'s implementation CallerID allows user choice software options that operate both run-time link-time using parameters only. Whenever parts functionality utilized, Link-time configurability removes program memory overhead. example, typical cases, generation skipped. user option selecting &CID_STD parameter object creation. CallerID parts relevant processing will linked. Unused library sections will linked. Table lists sets available link-time options. Note: object delivery libraries When object delivered part ROM-based system package contains library itself, only part functionality linked ROM. this case, attempt missing options will cause linker error. need extend given options, request full version object library from SPIRIT Corp. TMS320C54CST device, only CID_STD option (CallerID types C54CST side) supported inside ROM. Caller Integration 2-13 Specific Issues 2.4.2 Detection Delays Each kind detector stage introduces specific delay. These types delays summarized Table 2-15. Additionally, real delay depends size buffer passed detector. delay cannot less than buffer_size/8 [msec]. Table 2-15. Caller Detection Delays State CID_DONOTHING CID_SAS CID_DTAS CID_TEACK CID_FSKDET CID_FSK Delay, msec mDTAS.mDuration+25, Table Table first, detector waits modulation during mBITSYNC.mMarkTimeout*0.833 msec (see Table Table 3-8). Later, detector leaves state when pulse arrived during 1.25 msec (1.5 bits periods) CID_DTASGEN CID_TEACKDET CID_DTASTEACK CID_FSKGEN CID_WAIT 2-14 Integration Using CIDWRAPPER Class Integration Using CIDWRAPPER Class SPIRIT Corp. supplies complete including simple wrapper class CIDWRAPPER. This class contains state machine consecutive executions object states allows easy implementation Caller standard. functions this class described section 3.5. Caller Integration 2-15 Example Call Sequence Example Call Sequence example below demonstrates typical call sequence CallerID Call Waiting (Type II). similar example available XDAS_Int16 len, samples[100]; static const CID_Sequence {CID_DTAS, {CID_TEACK, 100, {CID_FSKDET, 300, {CID_FSK, CIDWRAPPER CIDWRAPPER_State CID_Handle cidWrapper; wrpState; handle; 2150, {CID_DONOTHING, infinite waiting Dual-Tone Alert Signal from generate Acknowlegment Signal wait carrier (300 msec) receive Data-Link Message create object CIDWRAPPER_create (&cidWrapper, handle, seq); while !(wrpState=CIDWRAPPER_getState (&cidWrapper)).mIsCompleted (wrpState.mIsTransmitter) CIDWRAPPER_transmit (&cidWrapper, samples, 100); writeNext (samples, 100); else readNext(samples,100); CIDWRAPPER_receive(&cidWrapper, samples, len); (wrpState.mLastError) switch case CID_FSKDET: printf ("FSK mark signal found\n");break; case CID_FSK: 2-16 printf ("FSK message found\n"); break; Chapter CallerID (CID) Descriptions This chapter provides user with clear understanding CallerID (CID) algorithms their implementation with TMS320 Algorithm Standard interface (XDAIS). Topic Page Standard Interface Structures Standard Interface Functions 3-11 Vendor-Specific Interface Structures 3-13 Vendor-Specific Interface Functions 3-21 CIDWRAPPER Class Reference 3-26 Standard Interface Structures Standard Interface Structures This section describes Standard parameter structures Caller Table lists standard Interface Structures CallerID API. Table 3-1. CallerID Standard Interface Structures Parameters Instance Creation Link-Time Configurable Options Signal DT-AS Detector TE-ACK Signal Carrier Detector Synchronizer DT-AS Generator TE-ACK Detector Generator DTMF Decoder DTMF Encoder Russian Caller Located Table. Table Table Table Table Table Table Table Table Table 3-10 Table 3-11 Table 3-12 Table 3-13 Table 3-14 Standard Interface Structures 3.1.1 Instance Creation Parameters This structure defines creation parameters algorithm. default parameter structure defined "iCID.c". Client specify basic Caller parameters ICID_Params creation detector (see CID_create() function, section 3.2.3). Description Structure Definition Table 3-2. Instance Creation Parameters typedef struct ICID_Params Parameter Name options pMessage Affected States (see Table 3-17) Functions CID_FSKG, CID_FSKGEN, CID_parse() Parameter type const CID_Options* CID_DataLinkMessage* Description Link-time configurable options (see Table 3-3) Pointer parsed message. Make sure that mpMessage scope during lifetime CID_Handle (see Table 3-18) Maximum level input signal. signal parameters (see Table 3-4) DT-AS signal parameters (see Table 3-5) TE-ACK signal parameters (see Table 3-6) carrier detector parameters (see Table 3-7) synchronizer parameters (see Table 3-8) DT-AS signal generator parameters (see Table 3-9) TE-ACK signal detector parameters (see Table 3-10) generator parameters (see Table 3-11) DTMF-message decoder parameters (see Table 3-12) DTMF-message encoder parameters (see Table 3-13) Russian Caller detector parameters (see Table 3-14) XDAS_Int16 CID_SASGenSignal CID_DTASDetSignal CID_TEACKGenSignal CID_FSKDetSignal CID_BitSyncSignal CID_DTASGenSignal maxLevel sasGen dtasDet teackGen fskDet bitSync dtasGen CID_SAS CID_DTAS CID_TEACK CID_FSKDET CID_FSK CID_DTASGEN, CID_DTASTEACK CID_TEACKDET, CID_DTASTEACK CID_FSKGEN CID_DTMFDET CID_TEACKDetSignal teackDet CID_FSKGenSignal CID_DTMFDetSignal fskGen dtmfDet CID_DTMFGenSignal dtmfGen CID_DTMFGEN CID_R15Signal CID_R15 ICID_Params Type ICID_Params defined "iCID.h". following types used: CallerID (CID) Descriptions Standard Interface Structures 3.1.2 Link-Time Configurable Options Table 3-3. Link-Time Configurable Options Option &ICID_STD Supported States (see Table 3-17) CID_DTAS CID_TEASK CID_FSK CID_FSKDET CID_WAITK CID_DTAS CID_TEASK CID_FSK CID_FSDET CID_DTMFDET CID_WAIT CID_DTASGEN CID_TEASKDET CID_DTASTEASK CID_FSKGEN CID_SAS CID_DTMFGEN CID_WAIT listed Functionality Limited. Support both CallerID types side. &ICID_STDDTMF Limited. Support both CallerID types side DTMF-based subscriber decoder. &ICID_LE Limited. Support both CallerID types DTMFbased message generator local exchange side. &ICID_FULL Full 3.1.3 Signal Parameters Table 3-4. Signal Parameters typedef struct Acceptable Limits 0.0x7FFF Parameter Type XDAS_Int16 XDAS_Int16 Parameter Name duration toneLevel Typical Value 0x4000 Description duration msec) tone level (Q15.0 format). 0x7FFF corresponds full-scale sine-wave. CID_SASGenSignal; Standard Interface Structures 3.1.4 DT-AS Detector Parameters Table 3-5. DT-AS Detector Parameters typedef struct Parameter Type XDAS_Int16 Parameter Name duration Typical Value 0x32F5 1036 (-30 Acceptable Limits 50.100 0x2000. 0x7FFF 0.0x7FFF Description minimum acceptable duration msec) tones twist (Q15.0 format) Detector sensitivity. This parameter controls minimum signal level tone accepted detector. (Q15.0 format 0x7FFF corresponds full-scale sinewave) Acceptable relative spurious level. (Q15.0 format). Greater values enhance tone recognition, make worse talk-off performance. XDAS_Int16 twist XDAS_Int16 toneLevel XDAS_Int16 spuriousLevel 0x2000 (-12 0x1000. 0x4000 CID_DTASDetSignal; 3.1.5 TE-ACK Signal Parameters Table 3-6. TE-ACK Signal Parameters typedef struct Parameter Type XDAS_Int16 Parameter Name duration Typical Value Acceptable Limits 65.90 'A','B','C','D' Description Duration TE-ACK signal, msec DTMF symbol generated. Network operator option. Generated signal level tone (Q15.0 format) 0x7FFF corresponds full-scale sine-wave XDAS_Int8 dtmfSymbol XDAS_Int16 toneLevel 00x4000 0.0x4000 CID_TEACKGenSignal; CallerID (CID) Descriptions Standard Interface Structures 3.1.6 Carrier Detector Parameters Table 3-7. Carrier Detector Parameters typedef struct Acceptable Limits 100.0x7FFF Parameter Type XDAS_Int16 Parameter Name toneLevel Typical Value (-35dB) Description Detector sensitivity. This parameter controls minimum signal level tone accepted detector. (Q15.0 format 0x7FFF corresponds full-scale sine-wave) Acceptable relative spurious level. (Q15.0 format). Greater values enhance tone recognition make worse talk-off performance. XDAS_Int16 spuriousLevel 10362 (-10 dBc) 0x2000. 0x4000 CID_FSKDetSignal; 3.1.7 Synchronizer Parameters Table 3-8. Synchronizer Parameters typedef struct Parameter Type XDAS_Int16 Parameter Name clockRate Typical Value 08000 01200 0190 Acceptable Limits 8000 1100.1300 80.300 Description Clock rate (samples second). Must equal 8000. rate (bits second) Maximum mark duration counts) XDAS_Int16 XDAS_Int16 bitRate markTimeout CID_BitSyncSignal; Standard Interface Structures 3.1.8 DT-AS Generator Parameters Table 3-9. DT-AS Generator Parameters typedef struct Acceptable Limits 50.110 0x2000. 0x7FFF .+6dB) 0.0x7FFF Parameter Type XDAS_Int16 Parameter Name duration Typical Value 0x3FFF Description Duration msec) DT-AS signal generated Tone twist (Q14.1 format) XDAS_Int16 twist XDAS_Int16 toneLevel 0x4000 Generated signal level tone (Q15.0 format) 0x7FFF corresponds full-scale sine-wave CID_DTASGenSignal; 3.1.9 TE-ACK Detector Parameters Table 3-10. TE-ACK Detector Parameters typedef struct Acceptable Limits 50.80 'A', 'B', ,'D', Parameter Type XDAS_Int16 XDAS_Int8 Parameter Name duration dtmfSymbol Typical Value Description Minimum acceptable duration msec) DTMF symbol detected. When listed symbols accepted, should passed tone twist (Q15.0 format) XDAS_Int16 twist 0x32F5 0x2000. 0x7FFF CallerID (CID) Descriptions Standard Interface Structures Table 3-10. TE-ACK Detector Parameters (Continued) typedef struct Acceptable Limits 0.0x7FFF Parameter Type XDAS_Int16 Parameter Name toneLevel Typical Value 1036 (-30 Description Detector sensitivity. This parameter controls minimum signal level tone accepted detector. (Q15.0 format 0x7FFF corresponds full-scale sine-wave) Acceptable relative spurious level. (Q15.0 format). Greater values enhance tone recognition make worse talk-off performance. XDAS_Int16 spuriousLevel 10362 (-10 0x1000. 0x4000 CID_TEACKDetSignal; 3.1.10 Generator Parameters Table 3-11. Generator Parameters typedef struct Acceptable Limits Parameter Type XDAS_Int16 Parameter Name modulationType Typical Value Description Used modulation: Bell V.23 Preamble mark duration counts) Channel seizure duration counts) Level signal (Q15.0 format) 0x7FFF corresponds full-scale sinewave XDAS_Int16 preambleMark 0120 6925 (-13.5 55.205 96.315 0.0x7FFF XDAS_Int16 channelSeizure XDAS_Int16 signalLevel CID_FSKGenSignal Standard Interface Structures 3.1.11 DTMF Decoder Parameters Table 3-12. DTMF Decoder Parameters typedef struct Acceptable Limits 25.80 0x2000. 0x7FFF 0.0x7FFF Parameter Type XDAS_Int16 Parameter Name duration Typical Value 0x32F5 1036 (-30 Description Minimum acceptable duration msec) Maximum acceptable tones twist (Q15.0 format) Detector sensitivity. This parameter controls minimum signal level tone accepted detector. (Q15.0 format 0x7FFF corresponds full-scale sine-wave) XDAS_Int16 twist XDAS_Int16 toneLevel CID_DTMFDetSignal; 3.1.12 DTMF Encoder Parameters Table 3-13. DTMF Encoder Parameters typedef struct Acceptable Limits 0.0x7FFF Parameter Type XDAS_Int16 Parameter Name signalLevel Typical Value 0x4000 Description Level signal generated (Q15.0 format 0x7FFF corresponds full-scale sine-wave). CID_DTMFGenSignal; CallerID (CID) Descriptions Standard Interface Structures 3.1.13 Russian Caller Parameters Table 3-14. Instance Creation Parameters typedefstruct Parameter Type XDAS_Int16 XDAS_Int16 Parameter Name genDuration genAmplitude Typical Value 0x7fff Acceptable Limits 0.0x7FFF Description Minimum acceptable duration msec) Level signal generated (Q15.0 format 0x7FFF corresponds full-scale sine-wave). Quantity inquiries. this field equal zero, inquiry dispatched. Delay before sending inquiry after call. Pause between inquiries. Signal analysis duration msec). 0.0x7FFF Detector sensitivity. This parameter controls minimum signal level tone accepted detector. (Q15.0 format 0x7FFF corresponds full-scale sine-wave) Acceptable relative spurious level. (Q15.0 format). Greater values enhance tone recognition make worse talk-off performance. XDAS_Int16 inquiriesCount 250-275 XDAS_Int16 XDAS_Int16 XDAS_Int16 XDAS_Int16 startDelay pauseBetween detectDuration toneLevel 1000 1036 (-30 XDAS_Int16 spuriousLevel 10362 (-10 0x1000. 0x4000 CID_R15Signal; 3-10 CID_exit Standard Interface Functions Table 3-15 summarizes standard Interface functions CallerID API. These functions required when using algorithm CID. CID_apply() CID_control() optional, neither supported Spirit Corp. Table 3-15. CallerID Standard Interface Functions Functions CID_init CID_exit CID_create CID_delete Description Page. Calls framework initialization function (Algorithm initialization) 3-11 Calls framework exit function (Algorithm deletion) Calls framework creation function (Instance creation) Calls framework deletion function (Instance deletion) 3-11 3-12 3-12 3.2.1 Algorithm Initialization Calls ALG_init() initialize algorithm void CID_init() none This function calls framework initialization function, ALG_init(), initialize algorithm. SPIRIT's CallerID, this function does nothing. skipped removed from target code according TMS320 Algorithm Standard (SPRA581). none CID_init Function Prototype Arguments Description Return Value 3.2.2 Algorithm Deletion Calls ALG_exit() remove algorithm void CID_exit() none This function calls framework exit function, ALG_exit(), remove algorithm.For SPIRIT Corp.'s implementation CallerID, this function does nothing. skipped removed from target code according TMS320 Algorithm Standard (SPRA581). none 3-11 CID_exit Function Prototype Arguments Description Return Value CID_create 3.2.3 Instance Creation CID_create Function Prototype Function called create decoder object CID_Handle CID_create ICID_Params *prms); (const ICID_Fxns *fxns, const Description order create decoder object, CID_create function should called. This function calls framework create function, ALG_create(), create instance object perform memory allocation tasks. Global structure CID_SPCORP_ICID contains virtual table supplied SPIRIT Corp. ICID_Fxns Pointer vendor's functions (Implementation ID). reference CID_SPCORP_ICID virtual table supplied SPIRIT Corp. Pointer Parameter Structure (see section 3.1.1). NULL pointer load default parameters. Arguments ICID_Params Return Value CID_Handle defined file "CID.h". This pointer created instance object. Restrictions none 3.2.4 Instance Deletion CID_delete Function Prototype Arguments Description Function called delete instance object void CID_delete (CID_Handle handle) CID_Handle Instance's handle obtained from CID_create() This function calls framework delete function, ALG_delete(), delete instance object perform memory de-allocation tasks. none Return Value 3-12 Vendor-Specific Interface Structures Vendor-Specific Interface Structures following sections, parameter structures functions SPIRIT's algorithm implementation interface (extended IALG methods) described. Table 3-16 summarizes list tables containing SPIRIT's interface structures. Table 3-16. CallerID Vendor-Specific Interface Structures Parameters Bitmasks CID_Message.validFields Caller Error Codes Caller States Data-link Layer Message Types Presentation Layer Located Table. Table 3-21 Table 3-22 Table 3-17 Table 3-18 Table 3-20 Table 3-19 3-13 Vendor-Specific Interface Structures 3.3.1 Caller States object configured either transmitter alert signal receiver. Actual state CallerID object retrieved CID_getState() (page 3-22) established CID_setState() (page 3-21). Table 3-17. Caller States typedef enum Enumeration Common states CID_DONOTHING CID_WAIT (CPE) side CID_DTAS CID_TEACK CID_FSKDET CID_FSK CID_R15 CID_DTMFDET side CID_DTASGEN CID_TEACKDET CID_DTASTEACK transmitter receiver transmitter receiver transmitter transmitter transmitter generates DT-AS signal receives TE-ACK signal from generates DT-AS signal receives TE-ACK signal from simultaneously generates signal generates V.23 Bell modulated message receiver transmitter receiver receiver receiver receiver receives DTAS signal generates TEACK signal receives carrier receives message (including data-link layer) receives Russian CallerID decoder receives DTMF-based message converts into generic data-link layer receiver does nothing does nothing waits timeout expiration Mode State CID_SAS CID_FSKGEN CID_DTMFGEN generates DTMF-based message CID_State0; 3-14 Vendor-Specific Interface Structures 3.3.2 Data-Link Level Message Data-link level message structure CID_DataLinkMessage contains unformatted bytes that were received during CID_FSK, CID_DTMFDET object states, bytes transmitted during CID_FSKGEN, CID_DTMFGEN states (DTMF-based detector/transmitter automatically converts DTMF-digits into appropriate fields data-link level message). Table 3-18. Data-Link Layer Structure typedef struct Parameter Type XDAS_UInt8 Parameter Name type Description Message type 0x04 SDMF, 0x80 MDMF (Call Setup), 0x82 Message Waiting Indicator, 0x86 Advise Charge XDAS_UInt8 XDAS_UInt8 length presentation[253] checksum lastError number valid bytes unformatted message unformatted message checksum last error: 0x00 error, 0x10 checksum error 0x11 frame length error (unrecoverable) 0x12 unrecognized message type (unrecoverable) CID_DataLinkMessage XDAS_UInt8 XDAS_UInt16 Data-link layer converted into presentation layer back using function CID_parse(), section 3.4.6. 3-15 Vendor-Specific Interface Structures 3.3.3 Presentation Level Message Presentation level structure CID_Message holds possible parameters that received during Caller transaction. masks validFields define currently available fields. case, unused fields Fields this structure corresponded clause Public Switched Telephone Network (PSTN); Subscriber line protocol over local loop display (and related) services; Part hook data transmission, 659-1, DE/SPS-03034-1. Function CID_parse() (see 3.4.6) converts both SDMF MDMF message into presentation layer. Also, this function provides reverse conversion using LE-side equipment. Table 3-19. Presentation Layer Structure typedef struct Parameter Type CID_Messagetype XDAS_Int8 XDAS_Int8 [21] XDAS_Int8 [21] XDAS_Int8 [51] Parameter Name type date callingLineIndentity calledLineIndentity callingPartyName Description Message type (see Table 3-20) Date time call Identifies origin call Identifies called party Identifies name party origin call case forwarded call, identifies first called party case forwarded call only XDAS_Int8 [21] firstLineIndentity XDAS_Int8 [21] XDAS_Int8 [21] XDAS_int8 redirectedNumber reasonForAbsence purpose Reason Absence Calling Line Identity parameter describe reason absence Calling Line Identity. assume values: ('O'): Unavailable (probably range) ('P'): Private (CLIR involved) call 3-16 Vendor-Specific Interface Structures Table 3-19. Presentation Layer Structure (Continued) Parameter Type XDAS_int8 Parameter Name reasonForAbsenceOfParty Description Describes reason absence Calling Party Name. assume values: ('O'): Unavailable ('P'): Private (CLIR involved) call Values range 8016-FF16 reserved network operators. XDAS_int08 callType Specifies type call. 0116 Voice Call 0216 Ring Back case free call 0316 7F16 8116 Calling Name Delivery Clock Message Waiting Call Values range 8216-FF16 reserved network operators. XDAS_int8 visualInicator purpose this parameter switch on/off visual indicator (presence waiting messages). Specifies number waiting messages network message system. Zero value means messages, value means unspecified numer messages queue, other values indicate number waiting messages. Identifies type forwarded call: 0116: Call forwarded busy 0216: Call forwarded reply 0316: Unconditional forwarded call 0416: Deflected call (after alerting) 0516: Deflected call (immediate) 0616: Call forwarded inability reach mobile subscriber Values range E016-FF16 reserved network operators. XDAS_int16 networkMessageSystemStatus XDAS_int8 typeOfForwardedCall 3-17 Vendor-Specific Interface Structures Table 3-19. Presentation Layer Structure (Continued) Parameter Type XDAS_int8 Parameter Name typeOfCallingUser Description 0016: Origination unknown unavailable 0316: Virtual Private Network 0416: Mobile phone 0516: Mobile phone Virtual Private Network 0A16: Ordinary calling subscriber 0B16: Calling subscriber with priority 0C16: Data Call 0D16: Test call 0F16: Payphone XDAS_Int8 [10] XDAS_UInt16 extension lastError last error: 0x00 error, 0x10 checksum error 0x11 frame length error (unrecoverable) 0x12 unrecognized message type (unrecoverable) XDAS_Int16 validFields mask available fields (see Table 3-21) CID_Message Enumeration constants CID_MessageType define currently available message format. 3-18 Vendor-Specific Interface Structures Table 3-20. Message Types typedef struct Enumeration Constant CID_NONE CID_SDMF CID_MDMF CID_MESSAGEWAITING CID_ADVISE Value 0x040 0x800 0x82 0x86 Description available messages Message SDMF format Message MDMF format Message VMWI format Message contains information about actual balance payment CID_MessageType Bitmasks CID_Message.validFields allow defining valid fields currently available Caller message. validate variable from presentation level CID_Message, have perform operation CID_Message.validFields with mask CID_xxx. Table 3-21. Masks CID_Message.validFields Enumeration CID_DATE CID_CALLINGLINEINDENTITY Description CID_Message.date field valid field valid CID_Message.calledLineIndentity field valid CID_Message.callingPartyName field valid CID_Message.firstLineIndentity field valid CID_Message.redirectedNumber field valid field valid CID_Message.reasonForAbsence field valid field valid CID_Message.callType field valid CID_Message.visualInicator field valid CID_CALLEDLINEINDENTITY CID_CALLINGPARTYNAME CID_FIRSTLINEINDENTITY CID_REDIRECTEDNUMBER CID_REASONFORABSENCE CID_REASONFORABSENCEOFPARTY CID_CALLTYPE CID_VISUALINICATOR 3-19 Vendor-Specific Interface Structures Table 3-21. Masks CID_Message.validFields (Continued) Enumeration CID_NETWORKMESSAGESYSTEMSTATUS Description field valid CID_Message.extension field valid CID_Message.typeOfForwardedCall field valid CID_Message.typeOfCallingUser field valid CID_EXTENSION CID_TYPEOFFORWARDEDCALL CID_TYPEOFCALLINGUSER 3.3.4 Caller Error Codes Enumeration constants CID_Error define currently available error codes that retrieved CID_getLastError() function. Table 3-22. Caller Error Codes typedef struct Enumeration Constant generic error codes CID_NOERROR CID_TIMEOUT CID_INVALIDSTATE error state broken timeout state supported linked instance creation (see Table Table 3-3) Description specific error codes CID_FSK state CID_CHECKSUMERROR CID_ILLEGALLENGTH CID_UNKNOWNTYPE CID_Error checksum error detected improper message length (less than octets more than octets) unknown message format (see CID_MessageType) 3-20 CID_setState Vendor-Specific Interface Functions Table 3-23 summarizes SPIRIT's functions CallerID. whole interface placed header files iCID.h, CID_spcorp.h. CID.h, Table 3-23. CallerID-Specific Interface Functions Name CID_setState CID_getState CID_getLastError CID_receive CID_transmit CID_parse Functionality Configures state software sets timeout this state Returns current state software Returns error code Process samples received Process samples transmitted Parses currently available data-link message into presentation layer structure vice versa Section 3-21 3-22 3-23 3-23 3-24 3-24 3.4.1 Configure State-of-CID Software CID_setState Function Prototype Configures state software sets timeout XDAS_Bool CID_setState (CID_Handle handle, CID_State state, XDAS_Int16 timeMsec, const ICID_Params* params) handle state timeMsec Pointer object state software (see section 3.3.1) Duration msec hold this state. need disable timeout check. Parameters object (see section 3.1.1). When there need change actual parameters during this call, NULL pointer. 3-21 Arguments params CID_getState Description Configures state-of-CID software sets timeout this state. When timeout expires, software automatically selects CID_DONOTHING state. Also, this function used change actual CallerID parameters "on-the-fly". Parameters copied into internal structures there need store them static memory lock this memory block. Moreover, they allocated stack leave scope upon execution this routine. Return Value Restrictions Always returns TRUE Field mOptions params (link-time configurable options) always ignored selected options chosen object creation only (see function CID_create(), section 3.2.3). 3.4.2 Current State CID_getState Function Prototype Arguments Description Returns current state software CID_State CID_getState(ICID_Handle handle) handle Pointer object Returns current state software. CID_DONOTHING value indicates that previously established state finished. reason switching retrieved calling CID_getLastError() (see section 3.4.3) Return Value Restrictions Current state (see Table 3-17). Maximum timeout value state (parameter timeMsec setState limited 4095 milliseconds. 3-22 CID_receive 3.4.3 Error Code CID_getLastError Function Prototype Arguments Description Determines cause state switching CID_Error CID_getLastError (ICID_Handle handle) handle Pointer object Call this method determine cause state switching. Returns CID_NOERROR state switched normal completion reception/transmission. Returns error code according Table 3-22. none Return Value Restrictions 3.4.4 Process Samples Received CID_receive Function Prototype Process number input samples received XDAS_Bool CID_receive (ICID_Handle handle, const XDAS_Int16 samples[], XDAS_Int16 len) Process number input samples. Signal processing performed according state previously established CID_setState()(see 3.4.1). While object transmitter mode state CID_DONOTHING, does nothing returns immediately. handle const XDAS_Int16 samples[] Pointer object Description Arguments Array input samples sample rate kHz) XDAS_Int16 Number samples processed Return Value Restrictions Returns TRUE when reception finished (see CID_getState()) number input samples receive() (37.5 msec input buffer). must exceed 3-23 CID_transmit 3.4.5 Process Samples Transmitted Performs signal processing transmission mode XDAS_Bool0 CID_transmit (ICID_Handle handle, XDAS_Int16 samples[], XDAS_Int16 len0) handle XDAS_Int16 samples[] Pointer object CID_transmit Function Prototype Arguments Array output samples sample rate kHz) XDAS_Int16 Number samples processed Description Perform signal processing transmission mode according state previously CID_setState(). Buffer filled with zeroes when object receiver mode state CID_DONOTHING. Returns TRUE when transmission finished (see CID_getState()) none Return Value Restrictions 3.4.6 Parse Data-link Presentation Level Messages Parses available data-link message into presentation layer structure XDAS_Void CID_parse (ICID_Handle handle, CID_Message* presentation, XDAS_Bool direction) handle presentation details. direction Pointer object Presentation layer structure. Table 3-19 CID_parse Function Prototype Arguments Conversion direction: convert data-link layer message into presentation level. convert presentation level message into data-link layer. 3-24 CID_parse Description Parses currently available data-link message into presentation layer structure vice versa. performed even when CallerID reception failed. Member validFields CID_Message masks available members (see Table 3-21). Reference data-link message object creation (section 3.4.3) establishing state object (section 3.4.1) field ICID_Params::mpMessage (see Table 3-2). Return Value Restrictions none none 3-25 CIDWRAPPER Class Reference CIDWRAPPER Class Reference CIDWRAPPER class allows consecutive execution CallerID states provide necessary timeouts, switching error handling. This class delivered open sources used modified without submissions SPIRIT Corp. Table 3-24 summarizes Caller Wrapper structure classes. Table 3-24. CIDWRAPPER Class Reference Table Summary CIDWRAPPER Type Caller Wrapper State Caller Wrapper Sequence Located Table. Table 3-25 Table 3-26 3.5.1 Caller Wrapper State Table 3-25. Caller Wrapper State typedef struct Parameter Type XDAS_Bool XDAS_Bool CID_Error XDAS_Int16 CIDWRAPPER_State Parameter Name isCompleted isTransmitter lastError sequenceIndex Description TRUE when sequence completed TRUE when Caller transmitter last error state state being processed currently 3.5.2 Caller Wrapper Sequence Table 3-26. Caller Wrapper Sequence typedef struct Parameter Type CID_State XDAS_Int16 XDAS_Bool CIDWRAPPER_Sequence; 3-26 Parameter Name state timeoutMsec isBreakOnError Description state established timeout value state break sequencing when error occurs CIDWRAPPER Class Reference 3.5.3 Caller Wrapper Functions Table 3-27 lists Caller Wrapper Functions. Complete code contained files "CIDWrapper.c", "CIDWrapper.h". Table 3-27. CIDWRAPPER Functions Return Type void Method Name create Parameters Type Name CIDWRAPPER *pthis pointer CIDWRAPPER object CID_Handle cidHandle existing handle object const CID_Sequence seq[] array CID_Sequence members. CIDWRAPPER_State getState CIDWRAPPER *pthis pointer CIDWRAPPER object CIDWRAPPER *pthis pointer CIDWRAPPER object const XDAS_Int16 samples[] array input samples sample rate kHz). XDAS_Int16 number samples processed void transmit CIDWRAPPER *pthis pointer CIDWRAPPER object XDAS_Int16 buffer[] array output samples sample rate kHz). XDAS_Int16 length number samples processed simple wrapper transmit() method Description Recreates CIDWRAPPER object starts sequential operation. array marked seq[xxx].mState==CID_DONO THING Returns current state CIDWRAPPER object. simple wrapper receive() method void receive 3-27 Appendix Appendix Test Environment C54CST Note: Test Environment Location This chapter describes test environment object. TMS320C54CST device, test environment standalone object located Software Development (SDK) Topic Page Description Directory Tree Description Directory Tree Description Directory Tree package includes test project "CallerID.pjt" corresponding reference test vectors. user free modify this code needed, without submissions SPIRIT Corp. Table A-1. Test Files File main.c FileC5x.c .\ROM\CSTRom.s54 Test.cmd Vectors\output.pcm Description Test file File input/output functions entry address Linker command file Reference output test vectors A.1.1 Test Vectors Format test vectors files with following parameters: Bits sample Mono Word format Intel (LSB goes first) Encoding Uniform Level Description Directory Tree A.1.2 Test Project build project, following steps must performed: Step Open project: Project\Open Step Build necessary files: Project\Rebuild Step Initialize DSP: Debug\Reset Step Load output-file: File\Load program Step executable: Debug\Run Once program finishes testing, file Output.pcm will written current directory. Compare this file with reference vector contained directory Vectors. Note: Test Duration Since standard file very slow, testing take several minutes. Test duration does indicate real algorithm's throughput. Test Environment Index Index ALG, interface ALG_activate ALG_control ALG_create ALG_deactivate ALG_delete ALG_exit ALG_init Algorithm Deletion 3-11 Algorithm Initialization 3-11 Application Development steps creating application Application/Framework states 3-14 Wrapper sequence 3-26 Wrapper state 3-26 Caller Error Codes 3-20 Caller States 3-14 CID. Caller CID_create() 3-12 CID_delete() 3-12 CID_exit() 3-11 CID_getLastError 3-23 CID_getState 3-22 CID_init() 3-11 CID_parse 3-24 CID_receive 3-23 CID_setState 3-21 CID_transmit 3-24 CIDWRAPPER functions 3-27 when used CallerID integration 2-15 CIDWRAPPER class, reference 3-26 Classes, CIDWRAPPER 2-15 Configure State-of-CID Software 3-21 side operations Synchronizer Parameters. Standard Interface Call sequence, example 2-16 Caller Call Sequence example 2-16 DTMF based reception transmission 2-12 error codes 3-20 Integratino using CIDWRAPPER class 2-15 integration, overview International Support introduction 1-2, limitations Specific issues 2-13 detection delays 2-14 Link-time configurable options 2-13 Data-Link Level Message 3-15 Detection Delays 2-14 Detector DT-AS parameters Carrier parameters Detector (parameters) DT-AS Carrier TE-ACK Directory Tree Index-1 Index DT-AS Detector paramters Generator paramters DT-AS Detector Parameters. Standard Interface DT-AS Generator Parameters. Standard Interface DTMF Decoder parameters Encoder parameters DTMF Decoder parameters. Standard Interface DTMF Encoder parameters. Standard Interface DTMF-Based CallerID Reception Transmission 2-12 Header file abstract interfaces concrete interfaces IALG Instance Creation 3-12 Instance Creation Parameters. Standard Interface Instance Deletion 3-12 Integration using CIDWRAPPER class 2-15 operations side Local exchange side 2-10 overview Integration flow, steps completing Interface abstract concrete vendor implementation Vendor-specific 3-13 structures 3-13 International Support, Caller Environment, testing Framework framework, integration flow Carrier Detector parameters Generator parameters limitations, Caller Link-T Configurable Options 2-13, Local Exchange side operations 2-10 Carrier Detector Parameters. Standard Interface Generator parameters. Standard Interface Functions CIDWRAPPER 3-27 Standard 3-11 Vendor-specific 3-21 Message Data-Link Level 3-15 Presentation Level 3-16 Module Instance Lifetime. Application Development Generator (parameters) DT-AS Current State Error Code 3-23 Index-2 3-22 operations side Index Local exhchange side 2-10 Parameters Synchronizer DT-AS Detector DT-AS Generator DTMF Decoder DTMF Encoder Carrier Detctor Generator instance creation Russian Caller 3-10 signal TE-ACK detector TE_ACK Signal Parse Data-link Presentation Level Messages 3-24 Presentation Level Message 3-16 Process Samples Received 3-23 Process Samples Transmitted 3-24 concrete interfaces Standard Interface, structures Structures Caller Error Codes 3-20 Caller States 3-14 Data-link Level Message 3-15 Presentation Level Message 3-16 standard interface vendor-specific 3-13 TE-ACK detector parameters Signal parameters TE-ACK detector Parameters. Standard Interface TE-ACK Signal Parameters. Standard Interface Test files format project Test Environment Transmition, DTMF-based 2-12 Reception, DTMF-based 2-12 Russian Caller parameters. Standard Interface Vendor-Specific Interface 3-13 Signal Parameters Signal (parameters) TE-ACK Source file abstract interfaces XDAIS Application Development Application/Framework Interface related documentaion System Layers, illustration Index-3 Other recent searchesTMS320DM644x - TMS320DM644x TMS320DM644x Datasheet STD12NF06 - STD12NF06 STD12NF06 Datasheet STD12NF06T4 - STD12NF06T4 STD12NF06T4 Datasheet PZT3904 - PZT3904 PZT3904 Datasheet NJU3730 - NJU3730 NJU3730 Datasheet MSC3000 - MSC3000 MSC3000 Datasheet MMA727 - MMA727 MMA727 Datasheet KM48S16030B - KM48S16030B KM48S16030B Datasheet ETC16-1T-2TR - ETC16-1T-2TR ETC16-1T-2TR Datasheet
Privacy Policy | Disclaimer |