asterisk/channels/sig_analog.h

421 lines
16 KiB
C
Raw Permalink Normal View History

#ifndef _SIG_ANALOG_H
#define _SIG_ANALOG_H
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2009, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief Interface header for analog signaling module
*
* \author Matthew Fredrickson <creslin@digium.com>
*/
#include "asterisk/channel.h"
#include "asterisk/frame.h"
#include "asterisk/smdi.h"
#define ANALOG_SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */
#define ANALOG_MAX_CID 300
#define READ_SIZE 160
#define RING_PATTERNS 3
/*! \brief Default time (ms) to detect first digit */
#define ANALOG_FIRST_DIGIT_TIMEOUT 16000
/*! \brief Default time (ms) to detect following digits */
#define ANALOG_INTER_DIGIT_TIMEOUT 8000
/*! \brief Default time (ms) to wait, in case of ambiguous match */
#define ANALOG_MATCH_DIGIT_TIMEOUT 3000
/* Signalling types supported */
enum analog_sigtype {
ANALOG_SIG_NONE = -1,
ANALOG_SIG_FXOLS = 1,
ANALOG_SIG_FXOKS,
ANALOG_SIG_FXOGS,
ANALOG_SIG_FXSLS,
ANALOG_SIG_FXSKS,
ANALOG_SIG_FXSGS,
ANALOG_SIG_EMWINK,
ANALOG_SIG_EM,
ANALOG_SIG_EM_E1,
ANALOG_SIG_FEATD,
ANALOG_SIG_FEATDMF,
ANALOG_SIG_E911,
ANALOG_SIG_FGC_CAMA,
ANALOG_SIG_FGC_CAMAMF,
ANALOG_SIG_FEATB,
ANALOG_SIG_SFWINK,
ANALOG_SIG_SF,
ANALOG_SIG_SF_FEATD,
ANALOG_SIG_SF_FEATDMF,
ANALOG_SIG_FEATDMF_TA,
ANALOG_SIG_SF_FEATB,
};
enum analog_tone {
ANALOG_TONE_RINGTONE = 0,
ANALOG_TONE_STUTTER,
ANALOG_TONE_CONGESTION,
ANALOG_TONE_DIALTONE,
ANALOG_TONE_DIALRECALL,
ANALOG_TONE_INFO,
};
enum analog_event {
ANALOG_EVENT_NONE = 0,
ANALOG_EVENT_ONHOOK,
ANALOG_EVENT_RINGOFFHOOK,
ANALOG_EVENT_WINKFLASH,
ANALOG_EVENT_ALARM,
ANALOG_EVENT_NOALARM,
ANALOG_EVENT_DIALCOMPLETE,
ANALOG_EVENT_RINGERON,
ANALOG_EVENT_RINGEROFF,
ANALOG_EVENT_HOOKCOMPLETE,
ANALOG_EVENT_PULSE_START,
ANALOG_EVENT_POLARITY,
ANALOG_EVENT_RINGBEGIN,
ANALOG_EVENT_EC_DISABLED,
ANALOG_EVENT_REMOVED,
ANALOG_EVENT_NEONMWI_ACTIVE,
ANALOG_EVENT_NEONMWI_INACTIVE,
ANALOG_EVENT_TX_CED_DETECTED,
ANALOG_EVENT_RX_CED_DETECTED,
ANALOG_EVENT_EC_NLP_DISABLED,
ANALOG_EVENT_EC_NLP_ENABLED,
ANALOG_EVENT_ERROR, /* not a DAHDI event */
ANALOG_EVENT_DTMFCID, /* not a DAHDI event */
ANALOG_EVENT_PULSEDIGIT = (1 << 16),
ANALOG_EVENT_DTMFDOWN = (1 << 17),
ANALOG_EVENT_DTMFUP = (1 << 18),
};
enum analog_sub {
ANALOG_SUB_REAL = 0, /*!< Active call */
ANALOG_SUB_CALLWAIT, /*!< Call-Waiting call on hold */
ANALOG_SUB_THREEWAY, /*!< Three-way call */
};
enum analog_dsp_digitmode {
ANALOG_DIGITMODE_DTMF = 1,
ANALOG_DIGITMODE_MF,
};
enum analog_dialmode {
ANALOG_DIALMODE_BOTH = 0,
ANALOG_DIALMODE_PULSE,
ANALOG_DIALMODE_DTMF,
ANALOG_DIALMODE_NONE,
};
enum analog_cid_start {
ANALOG_CID_START_POLARITY = 1,
ANALOG_CID_START_POLARITY_IN,
ANALOG_CID_START_RING,
ANALOG_CID_START_DTMF_NOALERT,
};
enum dialop {
ANALOG_DIAL_OP_REPLACE = 2,
};
struct analog_dialoperation {
enum dialop op;
char dialstr[256];
};
struct analog_callback {
/* Unlock the private in the signalling private structure. This is used for three way calling madness. */
void (* const unlock_private)(void *pvt);
/* Lock the private in the signalling private structure. ... */
void (* const lock_private)(void *pvt);
2010-10-13 23:52:41 +00:00
/* Do deadlock avoidance for the private signaling structure lock. */
void (* const deadlock_avoidance_private)(void *pvt);
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
/* Function which is called back to handle any other DTMF events that are received. Called by analog_handle_event. Why is this
* important to use, instead of just directly using events received before they are passed into the library? Because sometimes,
* (CWCID) the library absorbs DTMF events received. */
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
void (* const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest);
int (* const get_event)(void *pvt);
int (* const wait_event)(void *pvt);
int (* const is_off_hook)(void *pvt);
int (* const is_dialing)(void *pvt, enum analog_sub sub);
/* Start a trunk type signalling protocol (everything except phone ports basically */
int (* const start)(void *pvt);
int (* const ring)(void *pvt);
int (* const flash)(void *pvt);
/*! \brief Set channel on hook */
int (* const on_hook)(void *pvt);
/*! \brief Set channel off hook */
int (* const off_hook)(void *pvt);
void (* const set_needringing)(void *pvt, int value);
/*! \brief Set FXS line polarity to 0=IDLE NZ=REVERSED */
void (* const set_polarity)(void *pvt, int value);
/*! \brief Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch */
void (* const start_polarityswitch)(void *pvt);
/*! \brief Switch FXS line polarity, based on answeronpolarityswitch=yes */
void (* const answer_polarityswitch)(void *pvt);
/*! \brief Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch */
void (* const hangup_polarityswitch)(void *pvt);
/* We're assuming that we're going to only wink on ANALOG_SUB_REAL - even though in the code there's an argument to the index
* function */
int (* const wink)(void *pvt, enum analog_sub sub);
int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
int (* const send_fsk)(void *pvt, struct ast_channel *ast, char *fsk);
int (* const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone);
int (* const set_echocanceller)(void *pvt, int enable);
int (* const train_echocanceller)(void *pvt);
int (* const dsp_set_digitmode)(void *pvt, enum analog_dsp_digitmode mode);
int (* const dsp_reset_and_flush_digits)(void *pvt);
ast_callerid restructuring The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
int (* const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller);
/* Returns 0 if CID received. Returns 1 if event received, and -1 if error. name and num are size ANALOG_MAX_CID */
int (* const get_callerid)(void *pvt, char *name, char *num, enum analog_event *ev, size_t timeout);
/* Start CID detection */
int (* const start_cid_detect)(void *pvt, int cid_signalling);
/* Stop CID detection */
int (* const stop_cid_detect)(void *pvt);
/* Play the CAS callwait tone on the REAL sub, then repeat after 10 seconds, and then stop */
int (* const callwait)(void *pvt);
/* Stop playing any CAS call waiting announcement tones that might be running on the REAL sub */
int (* const stop_callwait)(void *pvt);
/* Bearer control related (non signalling) callbacks */
int (* const allocate_sub)(void *pvt, enum analog_sub sub);
int (* const unallocate_sub)(void *pvt, enum analog_sub sub);
/*! This function is for swapping of the owners with the underlying subs. Typically it means you need to change the fds
* of the new owner to be the fds of the sub specified, for each of the two subs given */
void (* const swap_subs)(void *pvt, enum analog_sub a, struct ast_channel *new_a_owner, enum analog_sub b, struct ast_channel *new_b_owner);
struct ast_channel * (* const new_ast_channel)(void *pvt, int state, int startpbx, enum analog_sub sub, const struct ast_channel *requestor);
/* Add the given sub to a conference */
int (* const conf_add)(void *pvt, enum analog_sub sub);
/* Delete the given sub from any conference that might be running on the channels */
int (* const conf_del)(void *pvt, enum analog_sub sub);
/* If you would like to do any optimizations after the conference members have been added and removed,
* you can do so here */
int (* const complete_conference_update)(void *pvt, int needconf);
/* This is called when there are no more subchannels on the given private that are left up,
* for any cleanup or whatever else you would like to do. Called from analog_hangup() */
void (* const all_subchannels_hungup)(void *pvt);
int (* const has_voicemail)(void *pvt);
int (* const check_for_conference)(void *pvt);
void (* const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent);
/* callbacks for increasing and decreasing ss_thread_count, will handle locking and condition signal */
void (* const increase_ss_count)(void);
void (* const decrease_ss_count)(void);
int (* const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata);
/* Sets the specified sub-channel in and out of signed linear mode, returns the value that was overwritten */
int (* const set_linear_mode)(void *pvt, enum analog_sub sub, int linear_mode);
void (* const set_inthreeway)(void *pvt, enum analog_sub sub, int inthreeway);
void (* const get_and_handle_alarms)(void *pvt);
void * (* const get_sigpvt_bridged_channel)(struct ast_channel *chan);
int (* const get_sub_fd)(void *pvt, enum analog_sub sub);
void (* const set_cadence)(void *pvt, int *cidrings, struct ast_channel *chan);
void (* const set_alarm)(void *pvt, int in_alarm);
void (* const set_dialing)(void *pvt, int is_dialing);
void (* const set_outgoing)(void *pvt, int is_outgoing);
void (* const set_ringtimeout)(void *pvt, int ringt);
void (* const set_waitingfordt)(void *pvt, struct ast_channel *ast);
int (* const check_waitingfordt)(void *pvt);
void (* const set_confirmanswer)(void *pvt, int flag);
int (* const check_confirmanswer)(void *pvt);
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
void (* const set_callwaiting)(void *pvt, int callwaiting_enable);
void (* const cancel_cidspill)(void *pvt);
int (* const confmute)(void *pvt, int mute);
void (* const set_pulsedial)(void *pvt, int flag);
void (* const set_new_owner)(void *pvt, struct ast_channel *new_owner);
Merge Call completion support into trunk. From Reviewboard: CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date overview of the architecture can be found in the file doc/CCSS_architecture.pdf in the CCSS branch. Off the top of my head, the big differences between what is implemented and what is in the document are as follows: 1. We did not end up modifying the Hangup application at all. 2. The document states that a single call completion monitor may be used across multiple calls to the same device. This proved to not be such a good idea when implementing protocol-specific monitors, and so we ended up using one monitor per-device per-call. 3. There are some configuration options which were conceived after the document was written. These are documented in the ccss.conf.sample that is on this review request. For some basic understanding of terminology used throughout this code, see the ccss.tex document that is on this review. This implements CCBS and CCNR in several flavors. First up is a "generic" implementation, which can work over any channel technology provided that the channel technology can accurately report device state. Call completion is requested using the dialplan application CallCompletionRequest and can be canceled using CallCompletionCancel. Device state subscriptions are used in order to monitor the state of called parties. Next, there is a SIP-specific implementation of call completion. This method uses the methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion using SIP signaling. There are a few things to note here: * The agent/monitor terminology used throughout Asterisk sometimes is the reverse of what is defined in the referenced draft. * Implementation of the draft required support for SIP PUBLISH. I attempted to write this in a generic-enough fashion such that if someone were to want to write PUBLISH support for other event packages, such as dialog-state or presence, most of the effort would be in writing callbacks specific to the event package. * A subportion of supporting PUBLISH reception was that we had to implement a PIDF parser. The PIDF support added is a bit minimal. I first wrote a validation routine to ensure that the PIDF document is formatted properly. The rest of the PIDF reading is done in-line in the call-completion-specific PUBLISH-handling code. In other words, while there is PIDF support here, it is not in any state where it could easily be applied to other event packages as is. Finally, there are a variety of ISDN-related call completion protocols supported. These were written by Richard Mudgett, and as such I can't really say much about their implementation. There are notes in the CHANGES file that indicate the ISDN protocols over which call completion is supported. Review: https://reviewboard.asterisk.org/r/523 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09 15:31:32 +00:00
const char *(* const get_orig_dialstring)(void *pvt);
int (* const have_progressdetect)(void *pvt);
int (* const get_firstdigit_timeout)(void *pvt);
int (* const get_interdigit_timeout)(void *pvt);
int (* const get_matchdigit_timeout)(void *pvt);
};
/*! Global analog callbacks to the upper layer. */
extern struct analog_callback analog_callbacks;
struct analog_subchannel {
struct ast_channel *owner;
struct ast_frame f; /*!< One frame for each channel. How did this ever work before? */
unsigned int inthreeway:1;
/* Have we allocated a subchannel yet or not */
unsigned int allocd:1;
};
struct analog_pvt {
/* Analog signalling type used in this private */
enum analog_sigtype sig;
/* To contain the private structure passed into the channel callbacks */
void *chan_pvt;
/* All members after this are going to be transient, and most will probably change */
struct ast_channel *owner; /*!< Our current active owner (if applicable) */
struct analog_subchannel subs[3]; /*!< Sub-channels */
struct analog_dialoperation dop;
int onhooktime; /*< Time the interface went on-hook. */
int fxsoffhookstate; /*< TRUE if the FXS port is off-hook */
/*! \brief -1 = unknown, 0 = no messages, 1 = new messages available */
int msgstate;
/* XXX: Option Variables - Set by allocator of private structure */
unsigned int ani_info_digits:8; /* Older switches use 1 INFO digit, newer switches use 2 */
unsigned int ani_timeout:16; /* Time in ms before we give up waiting for ANI spill */
unsigned int ani_wink_time:16; /* Safe wait time before we wink to start ANI spill */
unsigned int answeronpolarityswitch:1;
unsigned int calledsubscriberheld:1; /*!< TRUE if a single incoming call can hold an FXS channel */
unsigned int callreturn:1;
unsigned int cancallforward:1;
unsigned int canpark:1;
unsigned int dahditrcallerid:1; /*!< should we use the callerid from incoming call on dahdi transfer or not */
unsigned int hanguponpolarityswitch:1;
unsigned int immediate:1;
unsigned int immediatering:1; /*!< TRUE if ringing should be provided for immediate execution */
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
unsigned int permcallwaiting:1; /*!< TRUE if call waiting is enabled. (Configured option) */
unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */
unsigned int pulse:1;
unsigned int threewaycalling:1;
unsigned int threewaysilenthold:1; /*!< Whether to time out a three-way dial tone to silence */
unsigned int transfer:1;
unsigned int transfertobusy:1; /*!< allow flash-transfers to busy channels */
unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
chan_dahdi/sig_analog: Fix distinctive ring detection to suck less. The distinctive ring feature interferes with detecting Caller ID and appears to have been broken for years. What happens is if you have a ring-ring cadence as used in the UK you get too many DAHDI events for the distinctive ring pattern array and Caller ID detection is aborted. I think when Zapata/DAHDI added the ring begin event it broke distinctive ring. More events happen than before and the code does no filtering of which event times are recorded in the pattern array. * Made distinctive ring only record the ringt count when the ring ends instead of on just any DAHDI event. Distinctive ring can be ring, ring-ring, ring-ring-ring, or different ring durations for the up to three rings. * Fixed the distinctive ring detection enable (chan_dahdi.conf option usedistinctiveringdetection) to be per port instead of somewhat per port and somewhat global. This has been broken since v1.8. * Fixed using the default distinctive ring context when the detected pattern does not match any configured dringX patterns. The default context did not get set when the previous call was a matched distinctive ring pattern and the current call is not matched. This has been broken since v1.8. * Made distinctive ring have no effect on Caller ID detection when it is disabled. Caller ID detection just monitors for 10 seconds before giving up. * Fixed leak of struct callerid_state memory when a polarity reversal during Caller ID detection causes the incoming call to be aborted. DAHDI-1143 AST-1545 ASTERISK-24825 #close Reported by: Richard Mudgett ASTERISK-17588 Reported by: Daniel Flounders Review: https://reviewboard.asterisk.org/r/4444/ ........ Merged revisions 432530 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432534 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-06 20:24:58 +00:00
unsigned int usedistinctiveringdetection:1;
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
unsigned int callwaitingcallerid:1; /*!< TRUE if send caller ID for Call Waiting */
/*!
* \brief TRUE if SMDI (Simplified Message Desk Interface) is enabled
*/
unsigned int use_smdi:1;
/*! \brief The SMDI interface to get SMDI messages from. */
struct ast_smdi_interface *smdi_iface;
/* Not used for anything but log messages. Could be just the TCID */
int channel; /*!< Channel Number */
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
enum analog_sigtype outsigmod;
enum analog_dialmode dialmode; /*!< Which of pulse and/or tone dialing to support */
int echotraining;
int cid_signalling; /*!< Asterisk callerid type we're using */
int polarityonanswerdelay;
int stripmsd;
enum analog_cid_start cid_start;
char mohsuggest[MAX_MUSICCLASS];
char cid_num[AST_MAX_EXTENSION];
char cid_name[AST_MAX_EXTENSION];
/* XXX: All variables after this are internal */
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
unsigned int callwaiting:1; /*!< TRUE if call waiting is enabled. (Active option) */
unsigned int cshactive:1; /*!< TRUE if FXS channel is currently held by an incoming call */
unsigned int dialednone:1;
unsigned int dialing:1; /*!< TRUE if in the process of dialing digits or sending something */
unsigned int dnd:1; /*!< TRUE if Do-Not-Disturb is enabled. */
unsigned int echobreak:1;
unsigned int hidecallerid:1;
unsigned int outgoing:1;
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
unsigned int inalarm:1;
/*!
* \brief TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
* \note
* After CAS is sent, the call waiting caller id will be sent if the phone
* gives a positive reply.
*/
unsigned int callwaitcas:1;
unsigned int call_qualifier:1; /*!< Call qualifier delivery */
char callwait_num[AST_MAX_EXTENSION];
char callwait_name[AST_MAX_EXTENSION];
char lastcid_num[AST_MAX_EXTENSION];
char lastcid_name[AST_MAX_EXTENSION];
ast_callerid restructuring The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
struct ast_party_caller caller;
int redirecting_reason; /*!< Redirecting reason */
int cidrings; /*!< Which ring to deliver CID on */
char echorest[20];
int polarity;
struct timeval polaritydelaytv;
char dialdest[256];
time_t guardtime; /*!< Must wait this much time before using for new call */
struct timeval flashtime; /*!< Last flash-hook time */
int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
char finaldial[64];
char *origcid_num; /*!< malloced original callerid */
char *origcid_name; /*!< malloced original callerid */
char call_forward[AST_MAX_EXTENSION];
/* Ast channel to pass to __ss_analog_thread */
struct ast_channel *ss_astchan;
/* All variables after this are definitely going to be audited */
int ringt;
int ringt_base;
};
struct analog_pvt *analog_new(enum analog_sigtype signallingtype, void *private_data);
void analog_delete(struct analog_pvt *doomed);
void analog_free(struct analog_pvt *p);
int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout);
int analog_hangup(struct analog_pvt *p, struct ast_channel *ast);
int analog_answer(struct analog_pvt *p, struct ast_channel *ast);
struct ast_frame *analog_exception(struct analog_pvt *p, struct ast_channel *ast);
struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor);
int analog_available(struct analog_pvt *p);
void *analog_handle_init_event(struct analog_pvt *i, int event);
int analog_config_complete(struct analog_pvt *p);
Merged revisions 296167 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r296167 | rmudgett | 2010-11-24 16:49:48 -0600 (Wed, 24 Nov 2010) | 57 lines Merged revisions 296166 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r296166 | rmudgett | 2010-11-24 16:42:45 -0600 (Wed, 24 Nov 2010) | 50 lines Merged revisions 296165 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r296165 | rmudgett | 2010-11-24 16:41:07 -0600 (Wed, 24 Nov 2010) | 43 lines Oneway audio to SIP phone from FXS port after FXS port gets a CallWaiting pip. The FXS connected phone has to have CW/CID support to fail, as it will send back a DTMF 'A' or 'D' when it's ready to receive CallerID. A normal phone with no CID never fails. Also the SIP phone does not hear MOH when the CW call is answered. The DTMF end frame is suppressed when the phone acknowledges the CW signal for CID. The problem is the DTMF begin frame needs to be suppressed as well. The DTMF begin frame is causing SIP to start sending the DTMF RTP frames. Since the DTMF end frame is suppressed, SIP will not stop sending those DTMF RTP packets. * Suppress the DTMF begin and end frames when the channel driver is looking for DTMF digits. * Fixed a couple issues caused by not cleaning up the CID spill if you answer the CW call while it is sending the CID spill. * Fixed not sending CW/CID spill to the phone when the call is natively bridged. (Fixed by not using native bridge if CW/CID is possible.) * Suppress received audio when sending CW/CID spills. The other parties involved do not need to hear the CW/CID spills and may be confused if the CW call is for them. (closes issue #18129) Reported by: alecdavis Patches: issue_18129_v1.8_v3.patch uploaded by rmudgett (license 664) Tested by: alecdavis, rmudgett NOTE: * v1.4 does not have the main problem fixed by suppressing the DTMF start frames. The other three items fixed are relevant. * If you really must restore native bridging between analog ports, you need to disable CW/CID either by configuring chan_dahdi.conf callwaitingcallerid=no or dialing *70 before dialing the number to temporarily disable CW. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-24 22:52:07 +00:00
void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest);
enum analog_cid_start analog_str_to_cidstart(const char *value);
const char *analog_cidstart_to_str(enum analog_cid_start cid_start);
enum analog_sigtype analog_str_to_sigtype(const char *name);
const char *analog_sigtype_to_str(enum analog_sigtype sigtype);
unsigned int analog_str_to_cidtype(const char *name);
const char *analog_cidtype_to_str(unsigned int cid_type);
int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast);
int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp);
int analog_dnd(struct analog_pvt *p, int flag);
#endif /* _SIG_ANSLOG_H */