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