Asterisk - The Open Source Telephony Project  18.5.0
chan_dahdi.h
Go to the documentation of this file.
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2013 Digium, Inc.
5  *
6  * Richard Mudgett <[email protected]>
7  *
8  * See http://www.asterisk.org for more information about
9  * the Asterisk project. Please do not directly contact
10  * any of the maintainers of this project for assistance;
11  * the project provides a web site, mailing lists and IRC
12  * channels for your use.
13  *
14  * This program is free software, distributed under the terms of
15  * the GNU General Public License Version 2. See the LICENSE file
16  * at the top of the source tree.
17  */
18 
19 /*!
20  * \file
21  * \brief DAHDI internal API definitions.
22  *
23  * \author Richard Mudgett <[email protected]>
24  *
25  * See Also:
26  * \arg \ref AstCREDITS
27  */
28 
29 #ifndef _ASTERISK_CHAN_DAHDI_H
30 #define _ASTERISK_CHAN_DAHDI_H
31 
32 #if defined(HAVE_OPENR2)
33 #include <openr2.h>
34 #endif /* defined(HAVE_OPENR2) */
35 
36 #include <dahdi/user.h>
37 #include <dahdi/tonezone.h>
38 
39 #include "asterisk/channel.h"
40 #include "asterisk/dsp.h"
41 #include "asterisk/app.h"
42 #include "asterisk/mwi.h"
43 
44 #if defined(__cplusplus) || defined(c_plusplus)
45 extern "C" {
46 #endif
47 
48 /* ------------------------------------------------------------------- */
49 
50 #if defined(HAVE_PRI)
51 struct sig_pri_span;
52 #endif /* defined(HAVE_PRI) */
53 #if defined(HAVE_SS7)
54 struct sig_ss7_linkset;
55 #endif /* defined(HAVE_SS7) */
56 
57 #define SUB_REAL 0 /*!< Active call */
58 #define SUB_CALLWAIT 1 /*!< Call-Waiting call on hold */
59 #define SUB_THREEWAY 2 /*!< Three-way call */
60 
61 
62 struct distRingData {
63  int ring[3];
64  int range;
65 };
67  char contextData[AST_MAX_CONTEXT];
68 };
70  struct distRingData ringnum[3];
71  struct ringContextData ringContext[3];
72 };
73 
74 
75 extern const char * const subnames[];
76 
78  int dfd;
79  struct ast_channel *owner;
80  int chan;
81  short buffer[AST_FRIENDLY_OFFSET/2 + READ_SIZE];
82  struct ast_frame f; /*!< One frame for each channel. How did this ever work before? */
83  unsigned int needringing:1;
84  unsigned int needbusy:1;
85  unsigned int needcongestion:1;
86  unsigned int needanswer:1;
87  unsigned int needflash:1;
88  unsigned int needhold:1;
89  unsigned int needunhold:1;
90  unsigned int linear:1;
91  unsigned int inthreeway:1;
92  struct dahdi_confinfo curconf;
93 };
94 
95 #define MAX_SLAVES 4
96 
97 /* States for sending MWI message
98  * First three states are required for send Ring Pulse Alert Signal
99  */
100 typedef enum {
109 
110 struct mwisend_info {
111  struct timeval pause;
112  mwisend_states mwisend_current;
113 };
114 
115 /*! Specify the lists dahdi_pvt can be put in. */
117  DAHDI_IFLIST_NONE, /*!< The dahdi_pvt is not in any list. */
118  DAHDI_IFLIST_MAIN, /*!< The dahdi_pvt is in the main interface list */
119 #if defined(HAVE_PRI)
120  DAHDI_IFLIST_NO_B_CHAN, /*!< The dahdi_pvt is in a no B channel interface list */
121 #endif /* defined(HAVE_PRI) */
122 };
123 
124 struct dahdi_pvt {
125  ast_mutex_t lock; /*!< Channel private lock. */
127  struct ast_channel *owner; /*!< Our current active owner (if applicable) */
128  /*!< Up to three channels can be associated with this call */
129 
130  struct dahdi_subchannel sub_unused; /*!< Just a safety precaution */
131  struct dahdi_subchannel subs[3]; /*!< Sub-channels */
132  struct dahdi_confinfo saveconf; /*!< Saved conference info */
133 
134  struct dahdi_pvt *slaves[MAX_SLAVES]; /*!< Slave to us (follows our conferencing) */
135  struct dahdi_pvt *master; /*!< Master to us (we follow their conferencing) */
136  int inconference; /*!< If our real should be in the conference */
137 
138  int bufsize; /*!< Size of the buffers */
139  int buf_no; /*!< Number of buffers */
140  int buf_policy; /*!< Buffer policy */
141  int faxbuf_no; /*!< Number of Fax buffers */
142  int faxbuf_policy; /*!< Fax buffer policy */
143  int sig; /*!< Signalling style */
144  /*!
145  * \brief Nonzero if the signaling type is sent over a radio.
146  * \note Set to a couple of nonzero values but it is only tested like a boolean.
147  */
148  int radio;
149  int outsigmod; /*!< Outbound Signalling style (modifier) */
150  int oprmode; /*!< "Operator Services" mode */
151  struct dahdi_pvt *oprpeer; /*!< "Operator Services" peer tech_pvt ptr */
152  /*! \brief Hardware Rx gain set by chan_dahdi.conf */
153  float hwrxgain;
154  /*! \brief Hardware Tx gain set by chan_dahdi.conf */
155  float hwtxgain;
156  /*! \brief Amount of gain to increase during caller id */
157  float cid_rxgain;
158  /*! \brief Software Rx gain set by chan_dahdi.conf */
159  float rxgain;
160  /*! \brief Software Tx gain set by chan_dahdi.conf */
161  float txgain;
162 
163  float txdrc; /*!< Dynamic Range Compression factor. a number between 1 and 6ish */
164  float rxdrc;
165 
166  int tonezone; /*!< tone zone for this chan, or -1 for default */
167  enum DAHDI_IFLIST which_iflist; /*!< Which interface list is this structure listed? */
168  struct dahdi_pvt *next; /*!< Next channel in list */
169  struct dahdi_pvt *prev; /*!< Prev channel in list */
170 
171  /* flags */
172 
173  /*!
174  * \brief TRUE if ADSI (Analog Display Services Interface) available
175  * \note Set from the "adsi" value read in from chan_dahdi.conf
176  */
177  unsigned int adsi:1;
178  /*!
179  * \brief TRUE if we can use a polarity reversal to mark when an outgoing
180  * call is answered by the remote party.
181  * \note Set from the "answeronpolarityswitch" value read in from chan_dahdi.conf
182  */
183  unsigned int answeronpolarityswitch:1;
184  /*!
185  * \brief TRUE if busy detection is enabled.
186  * (Listens for the beep-beep busy pattern.)
187  * \note Set from the "busydetect" value read in from chan_dahdi.conf
188  */
189  unsigned int busydetect:1;
190  /*!
191  * \brief TRUE if call return is enabled.
192  * (*69, if your dialplan doesn't catch this first)
193  * \note Set from the "callreturn" value read in from chan_dahdi.conf
194  */
195  unsigned int callreturn:1;
196  /*!
197  * \brief TRUE if busy extensions will hear the call-waiting tone
198  * and can use hook-flash to switch between callers.
199  * \note Can be disabled by dialing *70.
200  * \note Initialized with the "callwaiting" value read in from chan_dahdi.conf
201  */
202  unsigned int callwaiting:1;
203  /*!
204  * \brief TRUE if send caller ID for Call Waiting
205  * \note Set from the "callwaitingcallerid" value read in from chan_dahdi.conf
206  */
207  unsigned int callwaitingcallerid:1;
208  /*!
209  * \brief TRUE if support for call forwarding enabled.
210  * Dial *72 to enable call forwarding.
211  * Dial *73 to disable call forwarding.
212  * \note Set from the "cancallforward" value read in from chan_dahdi.conf
213  */
214  unsigned int cancallforward:1;
215  /*!
216  * \brief TRUE if support for call parking is enabled.
217  * \note Set from the "canpark" value read in from chan_dahdi.conf
218  */
219  unsigned int canpark:1;
220  /*! \brief TRUE if to wait for a DTMF digit to confirm answer */
221  unsigned int confirmanswer:1;
222  /*!
223  * \brief TRUE if the channel is to be destroyed on hangup.
224  * (Used by pseudo channels.)
225  */
226  unsigned int destroy:1;
227  unsigned int didtdd:1; /*!< flag to say its done it once */
228  /*! \brief TRUE if analog type line dialed no digits in Dial() */
229  unsigned int dialednone:1;
230  /*!
231  * \brief TRUE if in the process of dialing digits or sending something.
232  * \note This is used as a receive squelch for ISDN until connected.
233  */
234  unsigned int dialing:1;
235  /*! \brief TRUE if the transfer capability of the call is digital. */
236  unsigned int digital:1;
237  /*! \brief TRUE if Do-Not-Disturb is enabled, present only for non sig_analog */
238  unsigned int dnd:1;
239  /*! \brief XXX BOOLEAN Purpose??? */
240  unsigned int echobreak:1;
241  /*!
242  * \brief TRUE if echo cancellation enabled when bridged.
243  * \note Initialized with the "echocancelwhenbridged" value read in from chan_dahdi.conf
244  * \note Disabled if the echo canceller is not setup.
245  */
246  unsigned int echocanbridged:1;
247  /*! \brief TRUE if echo cancellation is turned on. */
248  unsigned int echocanon:1;
249  /*! \brief TRUE if a fax tone has already been handled. */
250  unsigned int faxhandled:1;
251  /*! TRUE if dynamic faxbuffers are configured for use, default is OFF */
252  unsigned int usefaxbuffers:1;
253  /*! TRUE while buffer configuration override is in use */
254  unsigned int bufferoverrideinuse:1;
255  /*! \brief TRUE if over a radio and dahdi_read() has been called. */
256  unsigned int firstradio:1;
257  /*!
258  * \brief TRUE if the call will be considered "hung up" on a polarity reversal.
259  * \note Set from the "hanguponpolarityswitch" value read in from chan_dahdi.conf
260  */
261  unsigned int hanguponpolarityswitch:1;
262  /*! \brief TRUE if DTMF detection needs to be done by hardware. */
263  unsigned int hardwaredtmf:1;
264  /*!
265  * \brief TRUE if the outgoing caller ID is blocked/hidden.
266  * \note Caller ID can be disabled by dialing *67.
267  * \note Caller ID can be enabled by dialing *82.
268  * \note Initialized with the "hidecallerid" value read in from chan_dahdi.conf
269  */
270  unsigned int hidecallerid:1;
271  /*!
272  * \brief TRUE if hide just the name not the number for legacy PBX use.
273  * \note Only applies to PRI channels.
274  * \note Set from the "hidecalleridname" value read in from chan_dahdi.conf
275  */
276  unsigned int hidecalleridname:1;
277  /*! \brief TRUE if DTMF detection is disabled. */
278  unsigned int ignoredtmf:1;
279  /*!
280  * \brief TRUE if the channel should be answered immediately
281  * without attempting to gather any digits.
282  * \note Set from the "immediate" value read in from chan_dahdi.conf
283  */
284  unsigned int immediate:1;
285  /*! \brief TRUE if in an alarm condition. */
286  unsigned int inalarm:1;
287  /*! \brief TRUE if TDD in MATE mode */
288  unsigned int mate:1;
289  /*! \brief TRUE if we originated the call leg. */
290  unsigned int outgoing:1;
291  /*!
292  * \brief TRUE if busy extensions will hear the call-waiting tone
293  * and can use hook-flash to switch between callers.
294  * \note Set from the "callwaiting" value read in from chan_dahdi.conf
295  */
296  unsigned int permcallwaiting:1;
297  /*!
298  * \brief TRUE if the outgoing caller ID is blocked/restricted/hidden.
299  * \note Set from the "hidecallerid" value read in from chan_dahdi.conf
300  */
301  unsigned int permhidecallerid:1;
302  /*!
303  * \brief TRUE if PRI congestion/busy indications are sent out-of-band.
304  * \note Set from the "priindication" value read in from chan_dahdi.conf
305  */
306  unsigned int priindication_oob:1;
307  /*!
308  * \brief TRUE if PRI B channels are always exclusively selected.
309  * \note Set from the "priexclusive" value read in from chan_dahdi.conf
310  */
311  unsigned int priexclusive:1;
312  /*!
313  * \brief TRUE if we will pulse dial.
314  * \note Set from the "pulsedial" value read in from chan_dahdi.conf
315  */
316  unsigned int pulse:1;
317  /*! \brief TRUE if a pulsed digit was detected. (Pulse dial phone detected) */
318  unsigned int pulsedial:1;
319  unsigned int restartpending:1; /*!< flag to ensure counted only once for restart */
320  /*!
321  * \brief TRUE if caller ID is restricted.
322  * \note Set but not used. Should be deleted. Redundant with permhidecallerid.
323  * \note Set from the "restrictcid" value read in from chan_dahdi.conf
324  */
325  unsigned int restrictcid:1;
326  /*!
327  * \brief TRUE if three way calling is enabled
328  * \note Set from the "threewaycalling" value read in from chan_dahdi.conf
329  */
330  unsigned int threewaycalling:1;
331  /*!
332  * \brief TRUE if call transfer is enabled
333  * \note For FXS ports (either direct analog or over T1/E1):
334  * Support flash-hook call transfer
335  * \note For digital ports using ISDN PRI protocols:
336  * Support switch-side transfer (called 2BCT, RLT or other names)
337  * \note Set from the "transfer" value read in from chan_dahdi.conf
338  */
339  unsigned int transfer:1;
340  /*!
341  * \brief TRUE if caller ID is used on this channel.
342  * \note PRI and SS7 spans will save caller ID from the networking peer.
343  * \note FXS ports will generate the caller ID spill.
344  * \note FXO ports will listen for the caller ID spill.
345  * \note Set from the "usecallerid" value read in from chan_dahdi.conf
346  */
347  unsigned int use_callerid:1;
348  /*!
349  * \brief TRUE if we will use the calling presentation setting
350  * from the Asterisk channel for outgoing calls.
351  * \note Only applies to PRI and SS7 channels.
352  * \note Set from the "usecallingpres" value read in from chan_dahdi.conf
353  */
354  unsigned int use_callingpres:1;
355  /*!
356  * \brief TRUE if distinctive rings are to be detected.
357  * \note For FXO lines
358  * \note Set indirectly from the "usedistinctiveringdetection" value read in from chan_dahdi.conf
359  */
361  /*!
362  * \brief TRUE if we should use the callerid from incoming call on dahdi transfer.
363  * \note Set from the "useincomingcalleridondahditransfer" value read in from chan_dahdi.conf
364  */
365  unsigned int dahditrcallerid:1;
366  /*!
367  * \brief TRUE if allowed to flash-transfer to busy channels.
368  * \note Set from the "transfertobusy" value read in from chan_dahdi.conf
369  */
370  unsigned int transfertobusy:1;
371  /*!
372  * \brief TRUE if the FXO port monitors for neon type MWI indications from the other end.
373  * \note Set if the "mwimonitor" value read in contains "neon" from chan_dahdi.conf
374  */
375  unsigned int mwimonitor_neon:1;
376  /*!
377  * \brief TRUE if the FXO port monitors for fsk type MWI indications from the other end.
378  * \note Set if the "mwimonitor" value read in contains "fsk" from chan_dahdi.conf
379  */
380  unsigned int mwimonitor_fsk:1;
381  /*!
382  * \brief TRUE if the FXO port monitors for rpas precursor to fsk MWI indications from the other end.
383  * \note RPAS - Ring Pulse Alert Signal
384  * \note Set if the "mwimonitor" value read in contains "rpas" from chan_dahdi.conf
385  */
386  unsigned int mwimonitor_rpas:1;
387  /*! \brief TRUE if an MWI monitor thread is currently active */
388  unsigned int mwimonitoractive:1;
389  /*! \brief TRUE if a MWI message sending thread is active */
390  unsigned int mwisendactive:1;
391  /*!
392  * \brief TRUE if channel is out of reset and ready
393  * \note Used by SS7. Otherwise set but not used.
394  */
395  unsigned int inservice:1;
396  /*!
397  * \brief Bitmask for the channel being locally blocked.
398  * \note Applies to SS7 and MFCR2 channels.
399  * \note For MFCR2 only the first bit is used - TRUE if blocked
400  * \note For SS7 two bits are used
401  * \note Bit 0 - TRUE if maintenance blocked
402  * \note Bit 1 - TRUE if hardware blocked
403  */
404  unsigned int locallyblocked:2;
405  /*!
406  * \brief Bitmask for the channel being remotely blocked. 1 maintenance, 2 blocked in hardware.
407  * \note Applies to SS7 and MFCR2 channels.
408  * \note For MFCR2 only the first bit is used - TRUE if blocked
409  * \note For SS7 two bits are used
410  * \note Bit 0 - TRUE if maintenance blocked
411  * \note Bit 1 - TRUE if hardware blocked
412  */
413  unsigned int remotelyblocked:2;
414  /*!
415  * \brief TRUE if the channel alarms will be managed also as Span ones
416  * \note Applies to all channels
417  */
418  unsigned int manages_span_alarms:1;
419  /*! \brief TRUE if hardware Rx gain set by Asterisk */
420  unsigned int hwrxgain_enabled;
421  /*! \brief TRUE if hardware Tx gain set by Asterisk */
422  unsigned int hwtxgain_enabled;
423 
424 #if defined(HAVE_PRI)
425  struct sig_pri_span *pri;
426  int logicalspan;
427 #endif /* defined(HAVE_PRI) */
428  /*!
429  * \brief TRUE if SMDI (Simplified Message Desk Interface) is enabled
430  * \note Set from the "usesmdi" value read in from chan_dahdi.conf
431  */
432  unsigned int use_smdi:1;
433  struct mwisend_info mwisend_data;
434  /*! \brief The SMDI interface to get SMDI messages from. */
436 
437  /*! \brief Distinctive Ring data */
438  struct dahdi_distRings drings;
439 
440  /*!
441  * \brief The configured context for incoming calls.
442  * \note The "context" string read in from chan_dahdi.conf
443  */
445  /*!
446  * \brief A description for the channel configuration
447  * \note The "description" string read in from chan_dahdi.conf
448  */
449  char description[32];
450  /*!
451  * \brief Default distinctive ring context.
452  */
453  char defcontext[AST_MAX_CONTEXT];
454  /*! \brief Extension to use in the dialplan. */
456  /*!
457  * \brief Language configured for calls.
458  * \note The "language" string read in from chan_dahdi.conf
459  */
461  /*!
462  * \brief The configured music-on-hold class to use for calls.
463  * \note The "musicclass" or "mohinterpret" or "musiconhold" string read in from chan_dahdi.conf
464  */
466  /*!
467  * \brief Suggested music-on-hold class for peer channel to use for calls.
468  * \note The "mohsuggest" string read in from chan_dahdi.conf
469  */
471  char parkinglot[AST_MAX_EXTENSION]; /*!< Parking lot for this channel */
472 #if defined(HAVE_PRI) || defined(HAVE_SS7)
473  /*! \brief Automatic Number Identification number (Alternate PRI caller ID number) */
474  char cid_ani[AST_MAX_EXTENSION];
475 #endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
476  /*! \brief Automatic Number Identification code from PRI */
477  int cid_ani2;
478  /*! \brief Caller ID number from an incoming call. */
480  /*!
481  * \brief Caller ID tag from incoming call
482  * \note the "cid_tag" string read in from chan_dahdi.conf
483  */
484  char cid_tag[AST_MAX_EXTENSION];
485  /*! \brief Caller ID Q.931 TON/NPI field values. Set by PRI. Zero otherwise. */
486  int cid_ton;
487  /*! \brief Caller ID name from an incoming call. */
489  /*! \brief Caller ID subaddress from an incoming call. */
490  char cid_subaddr[AST_MAX_EXTENSION];
491  char *origcid_num; /*!< malloced original callerid */
492  char *origcid_name; /*!< malloced original callerid */
493  /*! \brief Call waiting number. */
494  char callwait_num[AST_MAX_EXTENSION];
495  /*! \brief Call waiting name. */
496  char callwait_name[AST_MAX_EXTENSION];
497  /*! \brief Redirecting Directory Number Information Service (RDNIS) number */
498  char rdnis[AST_MAX_EXTENSION];
499  /*! \brief Dialed Number Identifier */
500  char dnid[AST_MAX_EXTENSION];
501  /*!
502  * \brief Bitmapped groups this belongs to.
503  * \note The "group" bitmapped group string read in from chan_dahdi.conf
504  */
506  /*! \brief Default call PCM encoding format: DAHDI_LAW_ALAW or DAHDI_LAW_MULAW. */
508  /*! \brief Active PCM encoding format: DAHDI_LAW_ALAW or DAHDI_LAW_MULAW */
509  int law;
510  int confno; /*!< Our conference */
511  int confusers; /*!< Who is using our conference */
512  int propconfno; /*!< Propagated conference number */
513  /*!
514  * \brief Bitmapped call groups this belongs to.
515  * \note The "callgroup" bitmapped group string read in from chan_dahdi.conf
516  */
518  /*!
519  * \brief Bitmapped pickup groups this belongs to.
520  * \note The "pickupgroup" bitmapped group string read in from chan_dahdi.conf
521  */
523  /*!
524  * \brief Named call groups this belongs to.
525  * \note The "namedcallgroup" string read in from chan_dahdi.conf
526  */
527  struct ast_namedgroups *named_callgroups;
528  /*!
529  * \brief Named pickup groups this belongs to.
530  * \note The "namedpickupgroup" string read in from chan_dahdi.conf
531  */
532  struct ast_namedgroups *named_pickupgroups;
533  /*!
534  * \brief Channel variable list with associated values to set when a channel is created.
535  * \note The "setvar" strings read in from chan_dahdi.conf
536  */
538  int channel; /*!< Channel Number */
539  int span; /*!< Span number */
540  time_t guardtime; /*!< Must wait this much time before using for new call */
541  int cid_signalling; /*!< CID signalling type bell202 or v23 */
542  int cid_start; /*!< CID start indicator, polarity or ring or DTMF without warning event */
543  int dtmfcid_holdoff_state; /*!< State indicator that allows for line to settle before checking for dtmf energy */
544  struct timeval dtmfcid_delay; /*!< Time value used for allow line to settle */
545  int callingpres; /*!< The value of calling presentation that we're going to use when placing a PRI call */
546  int callwaitingrepeat; /*!< How many samples to wait before repeating call waiting */
547  int cidcwexpire; /*!< When to stop waiting for CID/CW CAS response (In samples) */
548  int cid_suppress_expire; /*!< How many samples to suppress after a CID spill. */
549  /*! \brief Analog caller ID waveform sample buffer */
550  unsigned char *cidspill;
551  /*! \brief Position in the cidspill buffer to send out next. */
552  int cidpos;
553  /*! \brief Length of the cidspill buffer containing samples. */
554  int cidlen;
555  /*! \brief Ring timeout timer?? */
556  int ringt;
557  /*!
558  * \brief Ring timeout base.
559  * \note Value computed indirectly from "ringtimeout" read in from chan_dahdi.conf
560  */
562  /*!
563  * \brief Number of most significant digits/characters to strip from the dialed number.
564  * \note Feature is deprecated. Use dialplan logic.
565  * \note The characters are stripped before the PRI TON/NPI prefix
566  * characters are processed.
567  */
568  int stripmsd;
569  /*!
570  * \brief TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
571  * \note
572  * After CAS is sent, the call waiting caller id will be sent if the phone
573  * gives a positive reply.
574  */
576  /*! \brief Number of call waiting rings. */
578  /*! \brief Echo cancel parameters. */
579  struct {
580  struct dahdi_echocanparams head;
581  struct dahdi_echocanparam params[DAHDI_MAX_ECHOCANPARAMS];
582  } echocancel;
583  /*!
584  * \brief Echo training time. 0 = disabled
585  * \note Set from the "echotraining" value read in from chan_dahdi.conf
586  */
588  /*! \brief Filled with 'w'. XXX Purpose?? */
589  char echorest[20];
590  /*!
591  * \brief Number of times to see "busy" tone before hanging up.
592  * \note Set from the "busycount" value read in from chan_dahdi.conf
593  */
595  /*!
596  * \brief Busy cadence pattern description.
597  * \note Set from the "busypattern" value read from chan_dahdi.conf
598  */
599  struct ast_dsp_busy_pattern busy_cadence;
600  /*!
601  * \brief Bitmapped call progress detection flags. CALLPROGRESS_xxx values.
602  * \note Bits set from the "callprogress" and "faxdetect" values read in from chan_dahdi.conf
603  */
605  /*!
606  * \brief Number of milliseconds to wait for dialtone.
607  * \note Set from the "waitfordialtone" value read in from chan_dahdi.conf
608  */
610  /*!
611  * \brief Number of frames to watch for dialtone in incoming calls
612  * \note Set from the "dialtone_detect" value read in from chan_dahdi.conf
613  */
615  int dialtone_scanning_time_elapsed; /*!< Amount of audio scanned for dialtone, in frames */
616  /*!
617  * \brief The number of seconds into call to disable fax detection. (0 = disabled)
618  * \note Set from the "faxdetect_timeout" value read in from chan_dahdi.conf
619  */
620  unsigned int faxdetect_timeout;
621  /*!
622  * \brief Time (ms) to detect first digit (in an analog phone)
623  * \note Set from the "firstdigit_timeout" value read in from chan_dahdi.conf
624  */
626  /*!
627  * \brief Time (ms) to detect following digits (in an analog phone)
628  * \note Set from the "interdigit_timeout" value read in from chan_dahdi.conf
629  */
631  /*!
632  * \brief Time (ms) to wait, in case of ambiguous match (in an analog phone)
633  * \note Set from the "matchdigit_timeout" value read in from chan_dahdi.conf
634  */
636  struct timeval waitingfordt; /*!< Time we started waiting for dialtone */
637  struct timeval flashtime; /*!< Last flash-hook time */
638  /*! \brief Opaque DSP configuration structure. */
639  struct ast_dsp *dsp;
640  /*! \brief DAHDI dial operation command struct for ioctl() call. */
641  struct dahdi_dialoperation dop;
642  int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
643  /*! \brief Second part of SIG_FEATDMF_TA wink operation. */
644  char finaldial[64];
645  char accountcode[AST_MAX_ACCOUNT_CODE]; /*!< Account code */
646  int amaflags; /*!< AMA Flags */
647  struct tdd_state *tdd; /*!< TDD flag */
648  /*! \brief Accumulated call forwarding number. */
649  char call_forward[AST_MAX_EXTENSION];
650  /*!
651  * \brief Voice mailbox location.
652  * \note Set from the "mailbox" string read in from chan_dahdi.conf
653  */
655  /*! \brief Opaque event subscription parameters for message waiting indication support. */
657  /*! \brief Delayed dialing for E911. Overlap digits for ISDN. */
658  char dialdest[256];
659 #ifdef HAVE_DAHDI_LINEREVERSE_VMWI
660  struct dahdi_vmwi_info mwisend_setting; /*!< Which VMWI methods to use */
661  unsigned int mwisend_fsk: 1; /*! Variable for enabling FSK MWI handling in chan_dahdi */
662  unsigned int mwisend_rpas:1; /*! Variable for enabling Ring Pulse Alert before MWI FSK Spill */
663 #endif
664  int distinctivering; /*!< Which distinctivering to use */
665  int dtmfrelax; /*!< whether to run in relaxed DTMF mode */
666  /*! \brief Holding place for event injected from outside normal operation. */
668  /*!
669  * \brief Minimal time period (ms) between the answer polarity
670  * switch and hangup polarity switch.
671  */
673  /*! \brief Start delay time if polarityonanswerdelay is nonzero. */
674  struct timeval polaritydelaytv;
675  /*!
676  * \brief Send caller ID on FXS after this many rings. Set to 1 for US.
677  * \note Set from the "sendcalleridafter" value read in from chan_dahdi.conf
678  */
680  /*! \brief Current line interface polarity. POLARITY_IDLE, POLARITY_REV */
681  int polarity;
682  /*! \brief DSP feature flags: DSP_FEATURE_xxx */
684 #if defined(HAVE_SS7)
685  /*! \brief SS7 control parameters */
686  struct sig_ss7_linkset *ss7;
687 #endif /* defined(HAVE_SS7) */
688 #if defined(HAVE_OPENR2)
689  struct dahdi_mfcr2 *mfcr2;
690  openr2_chan_t *r2chan;
691  openr2_calling_party_category_t mfcr2_recvd_category;
692  openr2_calling_party_category_t mfcr2_category;
693  int mfcr2_dnis_index;
694  int mfcr2_ani_index;
695  unsigned int mfcr2call:1;
696  unsigned int mfcr2_answer_pending:1;
697  unsigned int mfcr2_charge_calls:1;
698  unsigned int mfcr2_allow_collect_calls:1;
699  unsigned int mfcr2_forced_release:1;
700  unsigned int mfcr2_dnis_matched:1;
701  unsigned int mfcr2_call_accepted:1;
702  unsigned int mfcr2_accept_on_offer:1;
703  unsigned int mfcr2_progress_sent:1;
704 #endif /* defined(HAVE_OPENR2) */
705  /*! \brief DTMF digit in progress. 0 when no digit in progress. */
707  /*! \brief TRUE if confrence is muted. */
708  int muting;
709  void *sig_pvt;
711  /* DAHDI channel names may differ greatly from the
712  * string that was provided to an app such as Dial. We
713  * need to save the original string passed to dahdi_request
714  * for call completion purposes. This way, we can replicate
715  * the original dialed string later.
716  */
717  char dialstring[AST_CHANNEL_NAME];
718 };
719 
720 
721 /* Analog signaling */
722 #define SIG_EM DAHDI_SIG_EM
723 #define SIG_EMWINK (0x0100000 | DAHDI_SIG_EM)
724 #define SIG_FEATD (0x0200000 | DAHDI_SIG_EM)
725 #define SIG_FEATDMF (0x0400000 | DAHDI_SIG_EM)
726 #define SIG_FEATB (0x0800000 | DAHDI_SIG_EM)
727 #define SIG_E911 (0x1000000 | DAHDI_SIG_EM)
728 #define SIG_FEATDMF_TA (0x2000000 | DAHDI_SIG_EM)
729 #define SIG_FGC_CAMA (0x4000000 | DAHDI_SIG_EM)
730 #define SIG_FGC_CAMAMF (0x8000000 | DAHDI_SIG_EM)
731 #define SIG_FXSLS DAHDI_SIG_FXSLS
732 #define SIG_FXSGS DAHDI_SIG_FXSGS
733 #define SIG_FXSKS DAHDI_SIG_FXSKS
734 #define SIG_FXOLS DAHDI_SIG_FXOLS
735 #define SIG_FXOGS DAHDI_SIG_FXOGS
736 #define SIG_FXOKS DAHDI_SIG_FXOKS
737 #define SIG_SF DAHDI_SIG_SF
738 #define SIG_SFWINK (0x0100000 | DAHDI_SIG_SF)
739 #define SIG_SF_FEATD (0x0200000 | DAHDI_SIG_SF)
740 #define SIG_SF_FEATDMF (0x0400000 | DAHDI_SIG_SF)
741 #define SIG_SF_FEATB (0x0800000 | DAHDI_SIG_SF)
742 #define SIG_EM_E1 DAHDI_SIG_EM_E1
743 
744 /* PRI signaling */
745 #define SIG_PRI DAHDI_SIG_CLEAR
746 #define SIG_BRI (0x2000000 | DAHDI_SIG_CLEAR)
747 #define SIG_BRI_PTMP (0X4000000 | DAHDI_SIG_CLEAR)
748 
749 /* SS7 signaling */
750 #define SIG_SS7 (0x1000000 | DAHDI_SIG_CLEAR)
751 
752 /* MFC/R2 signaling */
753 #define SIG_MFCR2 DAHDI_SIG_CAS
754 
755 
756 #define SIG_PRI_LIB_HANDLE_CASES \
757  SIG_PRI: \
758  case SIG_BRI: \
759  case SIG_BRI_PTMP
760 
761 /*!
762  * \internal
763  * \brief Determine if sig_pri handles the signaling.
764  * \since 1.8
765  *
766  * \param signaling Signaling to determine if is for sig_pri.
767  *
768  * \return TRUE if the signaling is for sig_pri.
769  */
770 static inline int dahdi_sig_pri_lib_handles(int signaling)
771 {
772  int handles;
773 
774  switch (signaling) {
776  handles = 1;
777  break;
778  default:
779  handles = 0;
780  break;
781  }
782 
783  return handles;
784 }
785 
786 static inline int dahdi_analog_lib_handles(int signalling, int radio, int oprmode)
787 {
788  switch (signalling) {
789  case SIG_FXOLS:
790  case SIG_FXOGS:
791  case SIG_FXOKS:
792  case SIG_FXSLS:
793  case SIG_FXSGS:
794  case SIG_FXSKS:
795  case SIG_EMWINK:
796  case SIG_EM:
797  case SIG_EM_E1:
798  case SIG_FEATD:
799  case SIG_FEATDMF:
800  case SIG_E911:
801  case SIG_FGC_CAMA:
802  case SIG_FGC_CAMAMF:
803  case SIG_FEATB:
804  case SIG_SFWINK:
805  case SIG_SF:
806  case SIG_SF_FEATD:
807  case SIG_SF_FEATDMF:
808  case SIG_FEATDMF_TA:
809  case SIG_SF_FEATB:
810  break;
811  default:
812  /* The rest of the function should cover the remainder of signalling types */
813  return 0;
814  }
815 
816  if (radio) {
817  return 0;
818  }
819 
820  if (oprmode) {
821  return 0;
822  }
823 
824  return 1;
825 }
826 
827 #define dahdi_get_index(ast, p, nullok) _dahdi_get_index(ast, p, nullok, __PRETTY_FUNCTION__, __LINE__)
828 int _dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok, const char *fname, unsigned long line);
829 
830 void dahdi_dtmf_detect_disable(struct dahdi_pvt *p);
831 void dahdi_dtmf_detect_enable(struct dahdi_pvt *p);
832 
833 void dahdi_ec_enable(struct dahdi_pvt *p);
834 void dahdi_ec_disable(struct dahdi_pvt *p);
835 
836 void dahdi_conf_update(struct dahdi_pvt *p);
837 void dahdi_master_slave_link(struct dahdi_pvt *slave, struct dahdi_pvt *master);
838 void dahdi_master_slave_unlink(struct dahdi_pvt *slave, struct dahdi_pvt *master, int needlock);
839 
840 /* ------------------------------------------------------------------- */
841 
842 #if defined(__cplusplus) || defined(c_plusplus)
843 }
844 #endif
845 
846 #endif /* _ASTERISK_CHAN_DAHDI_H */
int cidpos
Position in the cidspill buffer to send out next.
Definition: chan_dahdi.h:552
unsigned int outgoing
TRUE if we originated the call leg.
Definition: chan_dahdi.h:290
int outsigmod
Definition: chan_dahdi.h:149
unsigned int digital
TRUE if the transfer capability of the call is digital.
Definition: chan_dahdi.h:236
int dialtone_scanning_time_elapsed
Definition: chan_dahdi.h:615
unsigned long long ast_group_t
Definition: channel.h:214
int matchdigit_timeout
Time (ms) to wait, in case of ambiguous match (in an analog phone)
Definition: chan_dahdi.h:635
#define MAX_SLAVES
Definition: chan_dahdi.h:95
int dtmfrelax
Definition: chan_dahdi.h:665
unsigned int priexclusive
TRUE if PRI B channels are always exclusively selected.
Definition: chan_dahdi.h:311
static char accountcode[AST_MAX_ACCOUNT_CODE]
Definition: chan_iax2.c:428
int faxbuf_no
Definition: chan_dahdi.h:141
static char mohinterpret[MAX_MUSICCLASS]
Definition: chan_alsa.c:119
static char exten[AST_MAX_EXTENSION]
Definition: chan_alsa.c:118
Main Channel structure associated with a channel.
void dahdi_master_slave_unlink(struct dahdi_pvt *slave, struct dahdi_pvt *master, int needlock)
Definition: chan_dahdi.c:6981
unsigned int permhidecallerid
TRUE if the outgoing caller ID is blocked/restricted/hidden.
Definition: chan_dahdi.h:301
unsigned int cancallforward
TRUE if support for call forwarding enabled. Dial *72 to enable call forwarding. Dial *73 to disable ...
Definition: chan_dahdi.h:214
unsigned int needflash
Definition: chan_dahdi.h:87
int cid_ton
Caller ID Q.931 TON/NPI field values. Set by PRI. Zero otherwise.
Definition: chan_dahdi.h:486
struct ast_namedgroups * named_pickupgroups
Named pickup groups this belongs to.
Definition: chan_dahdi.h:532
static int dahdi_sig_pri_lib_handles(int signaling)
Definition: chan_dahdi.h:770
int tonezone
Definition: chan_dahdi.h:166
unsigned int callwaiting
TRUE if busy extensions will hear the call-waiting tone and can use hook-flash to switch between call...
Definition: chan_dahdi.h:202
int callwaitcas
TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
Definition: chan_dahdi.h:575
static char parkinglot[AST_MAX_CONTEXT]
Definition: chan_mgcp.c:163
int firstdigit_timeout
Time (ms) to detect first digit (in an analog phone)
Definition: chan_dahdi.h:625
unsigned int dialing
TRUE if in the process of dialing digits or sending something.
Definition: chan_dahdi.h:234
int callwaitrings
Number of call waiting rings.
Definition: chan_dahdi.h:577
#define SIG_FXOGS
Definition: chan_dahdi.h:735
void dahdi_master_slave_link(struct dahdi_pvt *slave, struct dahdi_pvt *master)
Definition: chan_dahdi.c:7037
#define SIG_SF_FEATDMF
Definition: chan_dahdi.h:740
int cid_signalling
Definition: chan_dahdi.h:541
unsigned int callwaitingcallerid
TRUE if send caller ID for Call Waiting.
Definition: chan_dahdi.h:207
#define MAX_MUSICCLASS
Definition: channel.h:174
struct dahdi_pvt * next
Definition: chan_dahdi.h:168
unsigned int hardwaredtmf
TRUE if DTMF detection needs to be done by hardware.
Definition: chan_dahdi.h:263
int interdigit_timeout
Time (ms) to detect following digits (in an analog phone)
Definition: chan_dahdi.h:630
static int dahdi_analog_lib_handles(int signalling, int radio, int oprmode)
Definition: chan_dahdi.h:786
int cid_start
Definition: chan_dahdi.h:542
unsigned int needanswer
Definition: chan_dahdi.h:86
int ringt
Ring timeout timer??
Definition: chan_dahdi.h:556
Convenient Signal Processing routines.
unsigned int firstradio
TRUE if over a radio and dahdi_read() has been called.
Definition: chan_dahdi.h:256
struct dahdi_pvt * master
Definition: chan_dahdi.h:135
void dahdi_conf_update(struct dahdi_pvt *p)
Definition: chan_dahdi.c:4583
struct ast_mwi_subscriber * mwi_event_sub
Opaque event subscription parameters for message waiting indication support.
Definition: chan_dahdi.h:656
unsigned int locallyblocked
Bitmask for the channel being locally blocked.
Definition: chan_dahdi.h:404
float txdrc
Definition: chan_dahdi.h:163
unsigned int inservice
TRUE if channel is out of reset and ready.
Definition: chan_dahdi.h:395
#define SIG_EM
Definition: chan_dahdi.h:722
struct ast_channel * owner
Definition: chan_dahdi.h:127
Structure for variables, used for configurations and for channel variables.
int dsp_features
DSP feature flags: DSP_FEATURE_xxx.
Definition: chan_dahdi.h:683
int buf_no
Definition: chan_dahdi.h:139
mwisend_states mwisend_current
Definition: chan_dahdi.h:112
unsigned int dahditrcallerid
TRUE if we should use the callerid from incoming call on dahdi transfer.
Definition: chan_dahdi.h:365
unsigned int dnd
TRUE if Do-Not-Disturb is enabled, present only for non sig_analog.
Definition: chan_dahdi.h:238
unsigned int usefaxbuffers
Definition: chan_dahdi.h:252
int law_default
Default call PCM encoding format: DAHDI_LAW_ALAW or DAHDI_LAW_MULAW.
Definition: chan_dahdi.h:507
unsigned int immediate
TRUE if the channel should be answered immediately without attempting to gather any digits...
Definition: chan_dahdi.h:284
#define SIG_FXOKS
Definition: chan_dahdi.h:736
#define SIG_FEATB
Definition: chan_dahdi.h:726
void * sig_pvt
Definition: chan_dahdi.h:709
float cid_rxgain
Amount of gain to increase during caller id.
Definition: chan_dahdi.h:157
int callingpres
Definition: chan_dahdi.h:545
int bufsize
Definition: chan_dahdi.h:138
unsigned int transfertobusy
TRUE if allowed to flash-transfer to busy channels.
Definition: chan_dahdi.h:370
#define SIG_FEATDMF_TA
Definition: chan_dahdi.h:728
int whichwink
Definition: chan_dahdi.h:642
int confusers
Definition: chan_dahdi.h:511
char * origcid_num
Definition: chan_dahdi.h:491
int law
Active PCM encoding format: DAHDI_LAW_ALAW or DAHDI_LAW_MULAW.
Definition: chan_dahdi.h:509
int callwaitingrepeat
Definition: chan_dahdi.h:546
unsigned int adsi
TRUE if ADSI (Analog Display Services Interface) available.
Definition: chan_dahdi.h:177
unsigned int restartpending
Definition: chan_dahdi.h:319
struct dahdi_pvt * oprpeer
Definition: chan_dahdi.h:151
int ringt_base
Ring timeout base.
Definition: chan_dahdi.h:561
float txgain
Software Tx gain set by chan_dahdi.conf.
Definition: chan_dahdi.h:161
static char cid_num[AST_MAX_EXTENSION]
Definition: chan_mgcp.c:164
unsigned int hidecalleridname
TRUE if hide just the name not the number for legacy PBX use.
Definition: chan_dahdi.h:276
int inconference
Definition: chan_dahdi.h:136
unsigned int needhold
Definition: chan_dahdi.h:88
int _dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok, const char *fname, unsigned long line)
Definition: chan_dahdi.c:3431
#define SIG_SF
Definition: chan_dahdi.h:737
#define MAX_LANGUAGE
Definition: channel.h:173
unsigned int pulse
TRUE if we will pulse dial.
Definition: chan_dahdi.h:316
int oprmode
Definition: chan_dahdi.h:150
#define AST_MAX_MAILBOX_UNIQUEID
Definition: mwi.h:574
ast_group_t pickupgroup
Bitmapped pickup groups this belongs to.
Definition: chan_dahdi.h:522
unsigned int hwtxgain_enabled
TRUE if hardware Tx gain set by Asterisk.
Definition: chan_dahdi.h:422
struct ss7 * ss7
Definition: sig_ss7.h:321
#define AST_MAX_ACCOUNT_CODE
Definition: channel.h:171
static int mwisend_rpas
Definition: chan_dahdi.c:602
#define SIG_EMWINK
Definition: chan_dahdi.h:723
unsigned int answeronpolarityswitch
TRUE if we can use a polarity reversal to mark when an outgoing call is answered by the remote party...
Definition: chan_dahdi.h:183
static char mailbox[AST_MAX_MAILBOX_UNIQUEID]
Definition: chan_mgcp.c:204
int dtmfcid_holdoff_state
Definition: chan_dahdi.h:543
#define SIG_FGC_CAMAMF
Definition: chan_dahdi.h:730
unsigned int didtdd
Definition: chan_dahdi.h:227
unsigned int bufferoverrideinuse
Definition: chan_dahdi.h:254
int polarity
Current line interface polarity. POLARITY_IDLE, POLARITY_REV.
Definition: chan_dahdi.h:681
unsigned int hanguponpolarityswitch
TRUE if the call will be considered "hung up" on a polarity reversal.
Definition: chan_dahdi.h:261
unsigned int callreturn
TRUE if call return is enabled. (*69, if your dialplan doesn&#39;t catch this first)
Definition: chan_dahdi.h:195
unsigned int transfer
TRUE if call transfer is enabled.
Definition: chan_dahdi.h:339
unsigned int echobreak
XXX BOOLEAN Purpose???
Definition: chan_dahdi.h:240
struct ast_cc_config_params * cc_params
Definition: chan_dahdi.h:710
int amaflags
Definition: chan_dahdi.h:646
General Asterisk PBX channel definitions.
struct dahdi_pvt * slaves[MAX_SLAVES]
Definition: chan_dahdi.h:134
#define AST_FRIENDLY_OFFSET
Offset into a frame&#39;s data buffer.
unsigned int needunhold
Definition: chan_dahdi.h:89
int cidlen
Length of the cidspill buffer containing samples.
Definition: chan_dahdi.h:554
Definition: dsp.c:405
static int echocancel
Definition: chan_phone.c:102
#define SIG_FEATD
Definition: chan_dahdi.h:724
unsigned int mwimonitoractive
TRUE if an MWI monitor thread is currently active.
Definition: chan_dahdi.h:388
int echotraining
Echo training time. 0 = disabled.
Definition: chan_dahdi.h:587
static char mohsuggest[MAX_MUSICCLASS]
Definition: chan_iax2.c:430
#define AST_MAX_EXTENSION
Definition: channel.h:135
int cid_ani2
Automatic Number Identification code from PRI.
Definition: chan_dahdi.h:477
ast_mutex_t lock
Definition: chan_dahdi.h:125
float rxdrc
Definition: chan_dahdi.h:164
unsigned char * cidspill
Analog caller ID waveform sample buffer.
Definition: chan_dahdi.h:550
unsigned int permcallwaiting
TRUE if busy extensions will hear the call-waiting tone and can use hook-flash to switch between call...
Definition: chan_dahdi.h:296
void dahdi_dtmf_detect_enable(struct dahdi_pvt *p)
Definition: chan_dahdi.c:6487
int ring[3]
Definition: chan_dahdi.h:63
struct ast_channel * owner
Definition: chan_dahdi.h:79
void dahdi_ec_disable(struct dahdi_pvt *p)
Definition: chan_dahdi.c:4710
unsigned int busydetect
TRUE if busy detection is enabled. (Listens for the beep-beep busy pattern.)
Definition: chan_dahdi.h:189
static char language[MAX_LANGUAGE]
Definition: chan_alsa.c:117
unsigned int mwimonitor_fsk
TRUE if the FXO port monitors for fsk type MWI indications from the other end.
Definition: chan_dahdi.h:380
unsigned int linear
Definition: chan_dahdi.h:90
unsigned int use_callingpres
TRUE if we will use the calling presentation setting from the Asterisk channel for outgoing calls...
Definition: chan_dahdi.h:354
unsigned int use_smdi
TRUE if SMDI (Simplified Message Desk Interface) is enabled.
Definition: chan_dahdi.h:432
DAHDI_IFLIST
Definition: chan_dahdi.h:116
#define SIG_E911
Definition: chan_dahdi.h:727
unsigned int inthreeway
Definition: chan_dahdi.h:91
struct dahdi_pvt * prev
Definition: chan_dahdi.h:169
struct ast_dsp * dsp
Opaque DSP configuration structure.
Definition: chan_dahdi.h:639
int busycount
Number of times to see "busy" tone before hanging up.
Definition: chan_dahdi.h:594
unsigned int destroy
TRUE if the channel is to be destroyed on hangup. (Used by pseudo channels.)
Definition: chan_dahdi.h:226
unsigned int faxhandled
TRUE if a fax tone has already been handled.
Definition: chan_dahdi.h:250
enum DAHDI_IFLIST which_iflist
Definition: chan_dahdi.h:167
unsigned int use_callerid
TRUE if caller ID is used on this channel.
Definition: chan_dahdi.h:347
unsigned int needringing
Definition: chan_dahdi.h:83
int confno
Definition: chan_dahdi.h:510
int propconfno
Definition: chan_dahdi.h:512
void dahdi_dtmf_detect_disable(struct dahdi_pvt *p)
Definition: chan_dahdi.c:6473
#define SIG_FXSGS
Definition: chan_dahdi.h:732
#define READ_SIZE
Definition: chan_dahdi.c:673
char * origcid_name
Definition: chan_dahdi.h:492
#define SIG_PRI_LIB_HANDLE_CASES
Definition: chan_dahdi.h:756
int muting
TRUE if confrence is muted.
Definition: chan_dahdi.h:708
int distinctivering
Definition: chan_dahdi.h:664
#define SIG_SF_FEATD
Definition: chan_dahdi.h:739
#define AST_MAX_CONTEXT
Definition: channel.h:136
unsigned int usedistinctiveringdetection
TRUE if distinctive rings are to be detected.
Definition: chan_dahdi.h:360
Definition: tdd.c:47
#define AST_CHANNEL_NAME
Definition: channel.h:172
unsigned int faxdetect_timeout
The number of seconds into call to disable fax detection. (0 = disabled)
Definition: chan_dahdi.h:620
unsigned int restrictcid
TRUE if caller ID is restricted.
Definition: chan_dahdi.h:325
unsigned int remotelyblocked
Bitmask for the channel being remotely blocked. 1 maintenance, 2 blocked in hardware.
Definition: chan_dahdi.h:413
struct callerid_state * cs
Definition: chan_dahdi.h:126
unsigned int threewaycalling
TRUE if three way calling is enabled.
Definition: chan_dahdi.h:330
mwisend_states
Definition: chan_dahdi.h:100
#define SIG_SFWINK
Definition: chan_dahdi.h:738
int stripmsd
Number of most significant digits/characters to strip from the dialed number.
Definition: chan_dahdi.h:568
struct ast_namedgroups * named_callgroups
Named call groups this belongs to.
Definition: chan_dahdi.h:527
struct ast_smdi_interface * smdi_iface
The SMDI interface to get SMDI messages from.
Definition: chan_dahdi.h:435
#define SIG_FGC_CAMA
Definition: chan_dahdi.h:729
#define SIG_SF_FEATB
Definition: chan_dahdi.h:741
static char cid_name[AST_MAX_EXTENSION]
Definition: chan_mgcp.c:165
int buf_policy
Definition: chan_dahdi.h:140
unsigned int ignoredtmf
TRUE if DTMF detection is disabled.
Definition: chan_dahdi.h:278
const char *const subnames[]
Definition: chan_dahdi.c:795
#define SIG_FXSKS
Definition: chan_dahdi.h:733
int fake_event
Holding place for event injected from outside normal operation.
Definition: chan_dahdi.h:667
unsigned int confirmanswer
TRUE if to wait for a DTMF digit to confirm answer.
Definition: chan_dahdi.h:221
unsigned int mwimonitor_neon
TRUE if the FXO port monitors for neon type MWI indications from the other end.
Definition: chan_dahdi.h:375
int waitfordialtone
Number of milliseconds to wait for dialtone.
Definition: chan_dahdi.h:609
struct tdd_state * tdd
Definition: chan_dahdi.h:647
float hwtxgain
Hardware Tx gain set by chan_dahdi.conf.
Definition: chan_dahdi.h:155
unsigned int echocanon
TRUE if echo cancellation is turned on.
Definition: chan_dahdi.h:248
unsigned int needcongestion
Definition: chan_dahdi.h:85
unsigned int needbusy
Definition: chan_dahdi.h:84
int cidcwexpire
Definition: chan_dahdi.h:547
Asterisk MWI API.
int cid_suppress_expire
Definition: chan_dahdi.h:548
#define SIG_FXSLS
Definition: chan_dahdi.h:731
struct ast_variable * vars
Channel variable list with associated values to set when a channel is created.
Definition: chan_dahdi.h:537
unsigned int dialednone
TRUE if analog type line dialed no digits in Dial()
Definition: chan_dahdi.h:229
Data structure associated with a single frame of data.
unsigned int manages_span_alarms
TRUE if the channel alarms will be managed also as Span ones.
Definition: chan_dahdi.h:418
unsigned int priindication_oob
TRUE if PRI congestion/busy indications are sent out-of-band.
Definition: chan_dahdi.h:306
unsigned int hidecallerid
TRUE if the outgoing caller ID is blocked/hidden.
Definition: chan_dahdi.h:270
int faxbuf_policy
Definition: chan_dahdi.h:142
unsigned int echocanbridged
TRUE if echo cancellation enabled when bridged.
Definition: chan_dahdi.h:246
int polarityonanswerdelay
Minimal time period (ms) between the answer polarity switch and hangup polarity switch.
Definition: chan_dahdi.h:672
float rxgain
Software Rx gain set by chan_dahdi.conf.
Definition: chan_dahdi.h:159
static char context[AST_MAX_CONTEXT]
Definition: chan_alsa.c:116
#define SIG_FXOLS
Definition: chan_dahdi.h:734
int radio
Nonzero if the signaling type is sent over a radio.
Definition: chan_dahdi.h:148
#define SIG_FEATDMF
Definition: chan_dahdi.h:725
void dahdi_ec_enable(struct dahdi_pvt *p)
Definition: chan_dahdi.c:4638
int callprogress
Bitmapped call progress detection flags. CALLPROGRESS_xxx values.
Definition: chan_dahdi.h:604
float hwrxgain
Hardware Rx gain set by chan_dahdi.conf.
Definition: chan_dahdi.h:153
unsigned int hwrxgain_enabled
TRUE if hardware Rx gain set by Asterisk.
Definition: chan_dahdi.h:420
ast_group_t group
Bitmapped groups this belongs to.
Definition: chan_dahdi.h:505
int dialtone_detect
Number of frames to watch for dialtone in incoming calls.
Definition: chan_dahdi.h:614
time_t guardtime
Definition: chan_dahdi.h:540
unsigned int inalarm
TRUE if in an alarm condition.
Definition: chan_dahdi.h:286
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
int channel
Definition: chan_dahdi.h:538
int sendcalleridafter
Send caller ID on FXS after this many rings. Set to 1 for US.
Definition: chan_dahdi.h:679
struct pri * pri
Definition: sig_pri.h:604
ast_group_t callgroup
Bitmapped call groups this belongs to.
Definition: chan_dahdi.h:517
unsigned int mate
TRUE if TDD in MATE mode.
Definition: chan_dahdi.h:288
unsigned int canpark
TRUE if support for call parking is enabled.
Definition: chan_dahdi.h:219
#define SIG_EM_E1
Definition: chan_dahdi.h:742
Structure for mutex and tracking information.
Definition: lock.h:135
unsigned int pulsedial
TRUE if a pulsed digit was detected. (Pulse dial phone detected)
Definition: chan_dahdi.h:318
char begindigit
DTMF digit in progress. 0 when no digit in progress.
Definition: chan_dahdi.h:706
unsigned int mwimonitor_rpas
TRUE if the FXO port monitors for rpas precursor to fsk MWI indications from the other end...
Definition: chan_dahdi.h:386
unsigned int mwisendactive
TRUE if a MWI message sending thread is active.
Definition: chan_dahdi.h:390