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