⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adsi.h

📁 传真通信V27 V29 V17 T38解调与解码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * SpanDSP - a series of DSP components for telephony * * adsi.h - Analogue display services interface and other call ID related handling. * * Written by Steve Underwood <steveu@coppice.org> * * Copyright (C) 2003 Steve Underwood * * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: adsi.h,v 1.23 2007/06/08 13:49:38 steveu Exp $ *//*! \file */#if !defined(_SPANDSP_ADSI_H_)#define _SPANDSP_ADSI_H_/*! \page adsi_page ADSI transmission and reception\section adsi_page_sec_1 What does it do?Although ADSI has a specific meaning in some places, the term is used here to indicateany form of Analogue Display Service Interface, which includes caller ID, SMS, and others.The ADSI module provides for the transmission and reception of ADSI messagesin various formats. Currently, the supported formats are:    - CLASS (Custom Local Area Signaling Services) standard, published by Bellcore:    - ACLIP (Analog Calling Line Identity Presentation) standard, published by the      Telecommunications Authority of Singapore:    - CLIP (Calling Line Identity Presentation) standard, published by ETSI.    - JCLIP (Japanese Calling Line Identity Presentation) standard, published by NTT.            - TDD (Telecommunications Device for the Deaf).\section adsi_page_sec_2 How does it work?\section adsi_page_sec_2a The Bellcore CLASS specificationMost FSK based CLI formats are similar to the US CLASS one, which is as follows:The alert tone for CLI during a call is at least 100ms of silence, then2130Hz + 2750Hz for 88ms to 110ms. When CLI is presented at ringing time,this tone is not sent. In the US, CLI is usually sent between the firsttwo rings. This silence period is long in the US, so the message fits easily.In other places, where the standard ring tone has much smaller silences,a line voltage reversal is used to wake up a power saving receiver, then themessage is sent, then the phone begins to ring.    The message is sent using a Bell 202 FSK modem. The data rate is 1200 bitsper second. The message protocol uses 8-bit data words (bytes), each boundedby a start bit and a stop bit.Channel     Carrier     Message     Message     Data        ChecksumSeizure     Signal      Type        Length      Word(s)     WordSignal                  Word        Word    \section adsi_page_sec_2a1 CHANNEL SEIZURE SIGNALThe channel seizure is 30 continuous bytes of 55h (01010101), includingthe start and stop bits (i.e. 300 bits of alternations in total).This provides a detectable alternating function to the CPE (i.e. themodem data pump).    \section adsi_page_sec_2a2 CARRIER SIGNALThe carrier signal consists of 180 bits of 1s. This may be reduced to 80bits of 1s for caller ID on call waiting.    \section adsi_page_sec_2a3 MESSAGE TYPE WORDVarious message types are defined. The common ones for the US CLASS standard are:    - Type 0x04 (SDMF) - single data message. Simple caller ID (CND)    - Type 0x80 (MDMF) - multiple data message. A more flexible caller ID,                         with extra information.    \section adsi_page_sec_2a4 MESSAGE LENGTH WORDThe message length word specifies the total number of data wordsto follow.    \section adsi_page_sec_2a5 DATA WORDSThe data words contain the actual message.    \section adsi_page_sec_2a6 CHECKSUM WORDThe Checksum Word contains the twos complement of the modulo 256sum of the other words in the data message (i.e., message type,message length, and data words).  The receiving equipment maycalculate the modulo 256 sum of the received words and add thissum to the received checksum word.  A result of zero generallyindicates that the message was correctly received.  Messageretransmission is not supported. The sumcheck word should be followedby a minimum of two stop bits.\section adsi_page_sec_2b The ETSI CLIP specificationThe ETSI CLIP specification uses similar messages to the Bellcore specification.They are not, however, identical. First, ETSI use the V.23 modem standard, ratherthan Bell 202. Second, different fields, and different message types are available.\section adsi_page_sec_2e The ETSI caller ID by DTMF specificationCLI by DTMF is usually sent in a very simple way. The exchange does not giveany prior warning (no reversal, or ring) to wake up the receiver. It justsends one of the following DTMF strings:        - A<phone number>#    - D1#     Number not available because the caller has restricted it.    - D2#     Number not available because the call is international.    - D3#     Number not available due to technical reasons.*/enum{    ADSI_STANDARD_NONE = 0,    ADSI_STANDARD_CLASS = 1,    ADSI_STANDARD_CLIP = 2,    ADSI_STANDARD_ACLIP = 3,    ADSI_STANDARD_JCLIP = 4,    ADSI_STANDARD_CLIP_DTMF = 5,    ADSI_STANDARD_TDD = 6};/* In some of the messages code characters are used, as follows:        'C' for public callbox        'L' for long distance        'O' for overseas        'P' for private        'S' for service conflict *//*! Definitions for generic caller ID message type IDs *//*! Complete caller ID message */#define CLIDINFO_CMPLT          0x100/*! Date, time, phone #, name */#define CLIDINFO_GENERAL        0x101/*! Caller ID */#define CLIDINFO_CALLID         0x102/*! See frame type equates */#define CLIDINFO_FRAMETYPE      0x103/*! Definitions for CLASS (Custom Local Area Signaling Services) *//*! Single data message caller ID */#define CLASS_SDMF_CALLERID     0x04/*! Multiple data message caller ID */#define CLASS_MDMF_CALLERID     0x80/*! Single data message message waiting */#define CLASS_SDMF_MSG_WAITING  0x06/*! Multiple data message message waiting */#define CLASS_MDMF_MSG_WAITING  0x82/*! CLASS MDMF message IDs *//*! Date and time (MMDDHHMM) */#define MCLASS_DATETIME         0x01/*! Caller number */#define MCLASS_CALLER_NUMBER    0x02/*! Dialed number */#define MCLASS_DIALED_NUMBER    0x03/*! Caller number absent: 'O' or 'P' */#define MCLASS_ABSENCE1         0x04/*! Call forward: universal ('0'), on busy ('1'), or on unanswered ('2') */#define MCLASS_REDIRECT         0x05/*! Long distance: 'L' */#define MCLASS_QUALIFIER        0x06/*! Caller's name */#define MCLASS_CALLER_NAME      0x07/*! Caller's name absent: 'O' or 'P' */#define MCLASS_ABSENCE2         0x08/*! CLASS MDMF message waiting message IDs *//*! Message waiting/not waiting */#define MCLASS_VISUAL_INDICATOR 0x0B/*! Definitions for CLIP (Calling Line Identity Presentation) *//*! Multiple data message caller ID */#define CLIP_MDMF_CALLERID      0x80/*! Multiple data message message waiting */#define CLIP_MDMF_MSG_WAITING   0x82/*! Multiple data message charge information */#define CLIP_MDMF_CHARGE_INFO   0x86/*! Multiple data message SMS */#define CLIP_MDMF_SMS           0x89/*! CLIP message IDs *//*! Date and time (MMDDHHMM) */#define CLIP_DATETIME           0x01/*! Caller number */#define CLIP_CALLER_NUMBER      0x02/*! Dialed number */#define CLIP_DIALED_NUMBER      0x03/*! Caller number absent: 'O' or 'P' */#define CLIP_ABSENCE1           0x04/*! Caller's name */#define CLIP_CALLER_NAME        0x07/*! Caller's name absent: 'O' or 'P' */#define CLIP_ABSENCE2           0x08/*! Visual indicator */#define CLIP_VISUAL_INDICATOR   0x0B/*! Message ID */#define CLIP_MESSAGE_ID         0x0D/*! Voice call, ring-back-when-free call, or msg waiting call */#define CLIP_CALLTYPE           0x11/*! Number of messages */#define CLIP_NUM_MSG            0x13/*! Redirecting number */#define CLIP_REDIR_NUMBER       0x03/*! Charge */#define CLIP_CHARGE             0x20/*! Duration of the call */#define CLIP_DURATION           0x23/*! Additional charge */#define CLIP_ADD_CHARGE         0x21/*! Display information */#define CLIP_DISPLAY_INFO       0x50/*! Service information */#define CLIP_SERVICE_INFO       0x55/*! Definitions for A-CLIP (Analog Calling Line Identity Presentation) *//*! Single data message caller ID frame   */#define ACLIP_SDMF_CALLERID     0x04/*! Multiple data message caller ID frame */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -