Asterisk - The Open Source Telephony Project  GIT-master-a24979a
sig_pri.h
Go to the documentation of this file.
1 #ifndef _SIG_PRI_H
2 #define _SIG_PRI_H
3 /*
4  * Asterisk -- An open source telephony toolkit.
5  *
6  * Copyright (C) 1999 - 2009, Digium, Inc.
7  *
8  * Mark Spencer <markster@digium.com>
9  *
10  * See http://www.asterisk.org for more information about
11  * the Asterisk project. Please do not directly contact
12  * any of the maintainers of this project for assistance;
13  * the project provides a web site, mailing lists and IRC
14  * channels for your use.
15  *
16  * This program is free software, distributed under the terms of
17  * the GNU General Public License Version 2. See the LICENSE file
18  * at the top of the source tree.
19  */
20 
21 /*! \file
22  *
23  * \brief Interface header for PRI signaling module
24  *
25  * \author Matthew Fredrickson <creslin@digium.com>
26  */
27 
28 #include "asterisk/channel.h"
29 #include "asterisk/frame.h"
30 #include "asterisk/ccss.h"
31 #include <libpri.h>
32 #include <dahdi/user.h>
33 
34 #if defined(HAVE_PRI_CCSS)
35 /*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
36 #define SIG_PRI_DEBUG_NORMAL \
37  (PRI_DEBUG_APDU | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE | PRI_DEBUG_CC)
38 #else
39 
40 /*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
41 #define SIG_PRI_DEBUG_NORMAL \
42  (PRI_DEBUG_APDU | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE)
43 #endif /* !defined(HAVE_PRI_CCSS) */
44 
45 #if 0
46 /*! PRI debug message flags set on initial startup. */
47 #define SIG_PRI_DEBUG_DEFAULT (SIG_PRI_DEBUG_NORMAL | PRI_DEBUG_Q931_DUMP)
48 #else
49 /*! PRI debug message flags set on initial startup. */
50 #define SIG_PRI_DEBUG_DEFAULT 0
51 #endif
52 
53 #define SIG_PRI_AOC_GRANT_S (1 << 0)
54 #define SIG_PRI_AOC_GRANT_D (1 << 1)
55 #define SIG_PRI_AOC_GRANT_E (1 << 2)
56 
65 };
66 
71 };
72 
74  /*! Generate MOH to the remote party. */
76  /*! Send hold notification signaling to the remote party. */
78 #if defined(HAVE_PRI_CALL_HOLD)
79  /*! Use HOLD/RETRIEVE signaling to release the B channel while on hold. */
80  SIG_PRI_MOH_SIGNALING_HOLD,
81 #endif /* defined(HAVE_PRI_CALL_HOLD) */
82 };
83 
85  /*! Bridged peer has not put us on hold. */
87  /*! Bridged peer has put us on hold and we were to notify the remote party. */
89  /*! Bridged peer has put us on hold and we were to play MOH or HOLD/RETRIEVE fallback. */
91 #if defined(HAVE_PRI_CALL_HOLD)
92  /*! Requesting to put channel on hold. */
93  SIG_PRI_MOH_STATE_HOLD_REQ,
94  /*! Trying to go on hold when bridged peer requested to unhold. */
95  SIG_PRI_MOH_STATE_PEND_UNHOLD,
96  /*! Channel is held. */
97  SIG_PRI_MOH_STATE_HOLD,
98  /*! Requesting to take channel out of hold. */
99  SIG_PRI_MOH_STATE_RETRIEVE_REQ,
100  /*! Trying to take channel out of hold when bridged peer requested to hold. */
101  SIG_PRI_MOH_STATE_PEND_HOLD,
102  /*! Failed to take the channel out of hold. No B channels were available? */
103  SIG_PRI_MOH_STATE_RETRIEVE_FAIL,
104 #endif /* defined(HAVE_PRI_CALL_HOLD) */
105 
106  /*! Number of MOH states. Must be last in enum. */
108 };
109 
111  /*! Reset the MOH state machine. (Because of hangup.) */
113  /*! Bridged peer placed this channel on hold. */
115  /*! Bridged peer took this channel off hold. */
117 #if defined(HAVE_PRI_CALL_HOLD)
118  /*! The hold request was successfully acknowledged. */
119  SIG_PRI_MOH_EVENT_HOLD_ACK,
120  /*! The hold request was rejected. */
121  SIG_PRI_MOH_EVENT_HOLD_REJ,
122  /*! The unhold request was successfully acknowledged. */
123  SIG_PRI_MOH_EVENT_RETRIEVE_ACK,
124  /*! The unhold request was rejected. */
125  SIG_PRI_MOH_EVENT_RETRIEVE_REJ,
126  /*! The remote party took this channel off hold. */
127  SIG_PRI_MOH_EVENT_REMOTE_RETRIEVE_ACK,
128 #endif /* defined(HAVE_PRI_CALL_HOLD) */
129 
130  /*! Number of MOH events. Must be last in enum. */
132 };
133 
134 /*! Call establishment life cycle level for simple comparisons. */
136  /*! Call does not exist. */
138  /*! Call is present but has no response yet. (SETUP) */
140  /*! Call is collecting digits for overlap dialing. (SETUP ACKNOWLEDGE) */
142  /*! Call routing is happening. (PROCEEDING) */
144  /*! Called party is being alerted of the call. (ALERTING) */
146  /*! Call is dialing 'w' deferred digits. (CONNECT) */
148  /*! Call is connected/answered. (CONNECT) */
150 };
151 
153  /*! \brief The channel is not being RESTARTed. */
155  /*!
156  * \brief The channel is being RESTARTed.
157  * \note Waiting for a RESTART ACKNOWLEDGE from the peer.
158  */
160  /*!
161  * \brief Peer may not be sending the expected RESTART ACKNOWLEDGE.
162  *
163  * \details We have already received a SETUP on this channel.
164  * If another SETUP comes in on this channel then the peer
165  * considers this channel useable. Assume that the peer is
166  * never going to give us a RESTART ACKNOWLEDGE and assume that
167  * we have received one. This is not according to Q.931, but
168  * some peers occasionally fail to send a RESTART ACKNOWLEDGE.
169  */
171 };
172 
173 struct sig_pri_span;
174 struct xfer_rsp_data;
175 
177  /* Unlock the private in the signalling private structure. This is used for three way calling madness. */
178  void (* const unlock_private)(void *pvt);
179  /* Lock the private in the signalling private structure. ... */
180  void (* const lock_private)(void *pvt);
181  /* Do deadlock avoidance for the private signaling structure lock. */
182  void (* const deadlock_avoidance_private)(void *pvt);
183  /* Function which is called back to handle any other DTMF events that are received. Called by analog_handle_event. Why is this
184  * important to use, instead of just directly using events received before they are passed into the library? Because sometimes,
185  * (CWCID) the library absorbs DTMF events received. */
186  //void (* const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest);
187 
188  //int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
189  int (* const play_tone)(void *pvt, enum sig_pri_tone tone);
190 
191  int (* const set_echocanceller)(void *pvt, int enable);
192  int (* const train_echocanceller)(void *pvt);
193  int (* const dsp_reset_and_flush_digits)(void *pvt);
194 
195  struct ast_channel * (* const new_ast_channel)(void *pvt, int state,
196  enum sig_pri_law law, char *exten, const struct ast_assigned_ids *assignedids,
197  const struct ast_channel *requestor);
198 
199  void (* const fixup_chans)(void *old_chan, void *new_chan);
200 
201  /* Note: Called with PRI lock held */
202  void (* const handle_dchan_exception)(struct sig_pri_span *pri, int index);
203  void (* const set_alarm)(void *pvt, int in_alarm);
204  void (* const set_dialing)(void *pvt, int is_dialing);
205  void (* const set_digital)(void *pvt, int is_digital);
206  void (* const set_outgoing)(void *pvt, int is_outgoing);
207  void (* const set_callerid)(void *pvt, const struct ast_party_caller *caller);
208  void (* const set_dnid)(void *pvt, const char *dnid);
209  void (* const set_rdnis)(void *pvt, const char *rdnis);
210  void (* const queue_control)(void *pvt, int subclass);
211  int (* const new_nobch_intf)(struct sig_pri_span *pri);
212  void (* const init_config)(void *pvt, struct sig_pri_span *pri);
213  const char *(* const get_orig_dialstring)(void *pvt);
214  void (* const make_cc_dialstring)(void *pvt, char *buf, size_t buf_size);
215  void (* const update_span_devstate)(struct sig_pri_span *pri);
216  void (* const dial_digits)(void *pvt, const char *dial_string);
217 
218  void (* const open_media)(void *pvt);
219 
220  /*!
221  * \brief Post an AMI B channel association event.
222  *
223  * \param pvt Private structure of the user of this module.
224  * \param chan Channel associated with the private pointer
225  */
226  void (* const ami_channel_event)(void *pvt, struct ast_channel *chan);
227 
228  /*! Reference the parent module. */
229  void (*module_ref)(void);
230  /*! Unreference the parent module. */
231  void (*module_unref)(void);
232  /*! Mark the span for destruction. */
233  void (*destroy_later)(struct sig_pri_span *pri);
234 };
235 
236 /*! Global sig_pri callbacks to the upper layer. */
237 extern struct sig_pri_callback sig_pri_callbacks;
238 
239 #define SIG_PRI_NUM_DCHANS 4 /*!< No more than 4 d-channels */
240 #define SIG_PRI_MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
241 
242 #define SIG_PRI DAHDI_SIG_CLEAR
243 #define SIG_BRI (0x2000000 | DAHDI_SIG_CLEAR)
244 #define SIG_BRI_PTMP (0X4000000 | DAHDI_SIG_CLEAR)
245 
246 /* QSIG channel mapping option types */
247 #define DAHDI_CHAN_MAPPING_PHYSICAL 0
248 #define DAHDI_CHAN_MAPPING_LOGICAL 1
249 
250 /* Overlap dialing option types */
251 #define DAHDI_OVERLAPDIAL_NONE 0
252 #define DAHDI_OVERLAPDIAL_OUTGOING 1
253 #define DAHDI_OVERLAPDIAL_INCOMING 2
254 #define DAHDI_OVERLAPDIAL_BOTH (DAHDI_OVERLAPDIAL_INCOMING|DAHDI_OVERLAPDIAL_OUTGOING)
255 
256 #if defined(HAVE_PRI_SERVICE_MESSAGES)
257 /*! \brief Persistent Service State */
258 #define SRVST_DBKEY "service-state"
259 /*! \brief The out-of-service SERVICE state */
260 #define SRVST_TYPE_OOS "O"
261 /*! \brief SRVST_INITIALIZED is used to indicate a channel being out-of-service
262  * The SRVST_INITIALIZED is mostly used maintain backwards compatibility but also may
263  * mean that the channel has not yet received a RESTART message. If a channel is
264  * out-of-service with this reason a RESTART message will result in the channel
265  * being put into service. */
266 #define SRVST_INITIALIZED 0
267 /*! \brief SRVST_NEAREND is used to indicate that the near end was put out-of-service */
268 #define SRVST_NEAREND (1 << 0)
269 /*! \brief SRVST_FAREND is used to indicate that the far end was taken out-of-service */
270 #define SRVST_FAREND (1 << 1)
271 /*! \brief SRVST_BOTH is used to indicate that both sides of the channel are out-of-service */
272 #define SRVST_BOTH (SRVST_NEAREND | SRVST_FAREND)
273 
274 /*! \brief The AstDB family */
275 static const char dahdi_db[] = "dahdi/registry";
276 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
277 
278 struct sig_pri_chan {
279  /* Options to be set by user */
280  unsigned int hidecallerid:1;
281  unsigned int hidecalleridname:1; /*!< Hide just the name not the number for legacy PBX use */
282  unsigned int immediate:1; /*!< Answer before getting digits? */
283  unsigned int priexclusive:1; /*!< Whether or not to override and use exclusive mode for channel selection */
284  unsigned int priindication_oob:1;
285  unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
286  unsigned int use_callingpres:1; /*!< Whether to use the callingpres the calling switch sends */
289  int stripmsd;
290  int channel; /*!< Channel Number or CRV */
291 
292  /* Options to be checked by user */
293  int cid_ani2; /*!< Automatic Number Identification number (Alternate PRI caller ID number) */
294  int cid_ton; /*!< Type Of Number (TON) */
295  int callingpres; /*!< The value of calling presentation that we're going to use when placing a PRI call */
300  /*! \brief User tag for party id's sent from this device driver. */
303 
304  /* Internal variables -- Don't touch */
305  /* Probably will need DS0 number, DS1 number, and a few other things */
306  char dialdest[256]; /* Queued up digits for overlap dialing. They will be sent out as information messages when setup ACK is received */
307 #if defined(HAVE_PRI_SETUP_KEYPAD)
308  /*! \brief Keypad digits that came in with the SETUP message. */
309  char keypad_digits[AST_MAX_EXTENSION];
310 #endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
311  /*! 'w' deferred dialing digits. */
313  /*! Music class suggested with AST_CONTROL_HOLD. */
316 
317 #if defined(HAVE_PRI_AOC_EVENTS)
318  struct pri_subcmd_aoc_e aoc_e;
319  int aoc_s_request_invoke_id; /*!< If an AOC-S request was present for the call, this is the invoke_id to use for the response */
320  unsigned int aoc_s_request_invoke_id_valid:1; /*!< This is set when the AOC-S invoke id is present */
321  unsigned int waiting_for_aoce:1; /*!< Delaying hangup for AOC-E msg. If this is set and AOC-E is received, continue with hangup before timeout period. */
322  unsigned int holding_aoce:1; /*!< received AOC-E msg from asterisk. holding for disconnect/release */
323 #endif /* defined(HAVE_PRI_AOC_EVENTS) */
324  unsigned int inalarm:1;
325  unsigned int alreadyhungup:1; /*!< TRUE if the call has already gone/hungup */
326  unsigned int isidlecall:1; /*!< TRUE if this is an idle call */
327  unsigned int progress:1; /*!< TRUE if the call has seen inband-information progress through the network */
328 
329  /*!
330  * \brief TRUE when this channel is allocated.
331  *
332  * \details
333  * Needed to hold an outgoing channel allocation before the
334  * owner pointer is created.
335  *
336  * \note This is one of several items to check to see if a
337  * channel is available for use.
338  */
339  unsigned int allocated:1;
340  unsigned int outgoing:1;
341  unsigned int digital:1;
342  /*! \brief TRUE if this interface has no B channel. (call hold and call waiting) */
343  unsigned int no_b_channel:1;
344 #if defined(HAVE_PRI_CALL_WAITING)
345  /*! \brief TRUE if this is a call waiting call */
346  unsigned int is_call_waiting:1;
347 #endif /* defined(HAVE_PRI_CALL_WAITING) */
348 #if defined(HAVE_PRI_SETUP_ACK_INBAND)
349  /*! TRUE if outgoing SETUP had no called digits */
350  unsigned int no_dialed_digits:1;
351 #endif /* defined(HAVE_PRI_SETUP_ACK_INBAND) */
352 
354 
355  struct sig_pri_span *pri;
356  q931_call *call; /*!< opaque libpri call control structure */
357 
358  /*! Call establishment life cycle level for simple comparisons. */
360  /*! \brief Channel reset/restart state. */
362 #if defined(HAVE_PRI_TRANSFER)
363  /*! If non-NULL, send transfer disconnect successfull response to first call disconnecting. */
364  struct xfer_rsp_data *xfer_data;
365 #endif /* defined(HAVE_PRI_TRANSFER) */
366  int prioffset; /*!< channel number in span */
367  int logicalspan; /*!< logical span number within trunk group */
368  int mastertrunkgroup; /*!< what trunk group is our master */
369 #if defined(HAVE_PRI_SERVICE_MESSAGES)
370  /*! \brief Active SRVST_DBKEY out-of-service status value. */
371  unsigned service_status;
372 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
373 
374  void *chan_pvt; /*!< Private structure of the user of this module. */
375 #if defined(HAVE_PRI_REVERSE_CHARGE)
376  /*!
377  * \brief Reverse charging indication
378  * \details
379  * -1 - No reverse charging,
380  * 1 - Reverse charging,
381  * 0,2-7 - Reserved for future use
382  */
383  int reverse_charging_indication;
384 #endif
385 };
386 
387 #if defined(HAVE_PRI_MWI)
388 /*! Maximum number of mailboxes per span. */
389 #define SIG_PRI_MAX_MWI_MAILBOXES 8
390 /*! Typical maximum length of mwi voicemail controlling number */
391 #define SIG_PRI_MAX_MWI_VM_NUMBER_LEN 10 /* digits in number */
392 /*! Typical maximum length of mwi mailbox number */
393 #define SIG_PRI_MAX_MWI_MBOX_NUMBER_LEN 10 /* digits in number */
394 /*! Typical maximum length of mwi mailbox context */
395 #define SIG_PRI_MAX_MWI_CONTEXT_LEN 10
396 /*!
397  * \brief Maximum mwi_vm_numbers and mwi_vm_boxes string length.
398  * \details
399  * max_length = #mailboxes * (vm_number + ',')
400  * The last ',' is a null terminator instead.
401  */
402 #define SIG_PRI_MAX_MWI_VM_NUMBER_STR (SIG_PRI_MAX_MWI_MAILBOXES \
403  * (SIG_PRI_MAX_MWI_VM_NUMBER_LEN + 1))
404 /*!
405  * \brief Maximum length of vm_mailbox string.
406  * \details
407  * max_length = vm_box + '@' + context.
408  */
409 #define SIG_PRI_MAX_MWI_VM_MAILBOX (SIG_PRI_MAX_MWI_MBOX_NUMBER_LEN \
410  + 1 + SIG_PRI_MAX_MWI_CONTEXT_LEN)
411 /*!
412  * \brief Maximum mwi_mailboxs string length.
413  * \details
414  * max_length = #mailboxes * (vm_mailbox + ',')
415  * The last ',' is a null terminator instead.
416  */
417 #define SIG_PRI_MAX_MWI_MAILBOX_STR (SIG_PRI_MAX_MWI_MAILBOXES \
418  * (SIG_PRI_MAX_MWI_VM_MAILBOX + 1))
419 
420 struct sig_pri_mbox {
421  /*!
422  * \brief MWI mailbox event subscription.
423  * \note NULL if mailbox not configured.
424  */
425  struct ast_mwi_subscriber *sub;
426  /*! \brief Mailbox uniqueid. */
427  const char *uniqueid;
428  /*! \brief Mailbox number sent to span. */
429  const char *vm_box;
430  /*! \brief Voicemail access controlling number sent to span. */
431  const char *vm_number;
432 };
433 #endif /* defined(HAVE_PRI_MWI) */
434 
436  /*! Block all connected line updates. */
438  /*! Only send connected line information with the CONNECT message. */
440  /*! Allow all connected line updates. */
442 };
443 
444 struct sig_pri_span {
445  /* Should be set by user */
446  struct ast_cc_config_params *cc_params; /*!< CC config parameters for each new call. */
447  int pritimers[PRI_MAX_TIMERS];
448  int overlapdial; /*!< In overlap dialing mode */
449  int qsigchannelmapping; /*!< QSIG channel mapping type */
450  int discardremoteholdretrieval; /*!< shall remote hold or remote retrieval notifications be discarded? */
451  int facilityenable; /*!< Enable facility IEs */
452 #if defined(HAVE_PRI_L2_PERSISTENCE)
453  /*! Layer 2 persistence option. */
454  int l2_persistence;
455 #endif /* defined(HAVE_PRI_L2_PERSISTENCE) */
456  int dchan_logical_span[SIG_PRI_NUM_DCHANS]; /*!< Logical offset the DCHAN sits in */
457  int fds[SIG_PRI_NUM_DCHANS]; /*!< FD's for d-channels */
458 
459 #if defined(HAVE_PRI_AOC_EVENTS)
460  int aoc_passthrough_flag; /*!< Represents what AOC messages (S,D,E) are allowed to pass-through */
461  unsigned int aoce_delayhangup:1; /*!< defines whether the aoce_delayhangup option is enabled or not */
462 #endif /* defined(HAVE_PRI_AOC_EVENTS) */
463 
464 #if defined(HAVE_PRI_SERVICE_MESSAGES)
465  unsigned int enable_service_message_support:1; /*!< enable SERVICE message support */
466 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
467 #ifdef HAVE_PRI_INBANDDISCONNECT
468  unsigned int inbanddisconnect:1; /*!< Should we support inband audio after receiving DISCONNECT? */
469 #endif
470 #if defined(HAVE_PRI_CALL_HOLD)
471  /*! \brief TRUE if held calls are transferred on disconnect. */
472  unsigned int hold_disconnect_transfer:1;
473 #endif /* defined(HAVE_PRI_CALL_HOLD) */
474  /*!
475  * \brief TRUE if call transfer is enabled for the span.
476  * \note Support switch-side transfer (called 2BCT, RLT or other names)
477  */
478  unsigned int transfer:1;
479 #if defined(HAVE_PRI_CALL_WAITING)
480  /*! \brief TRUE if we will allow incoming ISDN call waiting calls. */
481  unsigned int allow_call_waiting_calls:1;
482 #endif /* defined(HAVE_PRI_CALL_WAITING) */
483  /*! TRUE if layer 1 alarm status is ignored */
484  unsigned int layer1_ignored:1;
485  /*!
486  * TRUE if a new call's sig_pri_chan.user_tag[] has the MSN
487  * appended to the initial_user_tag[].
488  */
489  unsigned int append_msn_to_user_tag:1;
490  /*! TRUE if a SETUP ACK message needs to open the audio path. */
491  unsigned int inband_on_setup_ack:1;
492  /*! TRUE if a PROCEEDING message needs to unsquelch the received audio. */
493  unsigned int inband_on_proceeding:1;
494 #if defined(HAVE_PRI_MCID)
495  /*! \brief TRUE if allow sending MCID request on this span. */
496  unsigned int mcid_send:1;
497 #endif /* defined(HAVE_PRI_MCID) */
498  /*! \brief TRUE if forcing RESTART when receive cause 44 on this span. */
500 #if defined(HAVE_PRI_DATETIME_SEND)
501  /*! \brief Configured date/time ie send policy option. */
502  int datetime_send;
503 #endif /* defined(HAVE_PRI_DATETIME_SEND) */
504  int dialplan; /*!< Dialing plan */
505  int localdialplan; /*!< Local dialing plan */
506  int cpndialplan; /*!< Connected party dialing plan */
507  char internationalprefix[10]; /*!< country access code ('00' for european dialplans) */
508  char nationalprefix[10]; /*!< area access code ('0' for european dialplans) */
509  char localprefix[20]; /*!< area access code + area code ('0'+area code for european dialplans) */
510  char privateprefix[20]; /*!< for private dialplans */
511  char unknownprefix[20]; /*!< for unknown dialplans */
513  /*! Send connected line signaling to peer option. */
515  long resetinterval; /*!< Interval (in seconds) for resetting unused channels */
516 #if defined(HAVE_PRI_DISPLAY_TEXT)
517  unsigned long display_flags_send; /*!< PRI_DISPLAY_OPTION_xxx flags for display text sending */
518  unsigned long display_flags_receive; /*!< PRI_DISPLAY_OPTION_xxx flags for display text receiving */
519 #endif /* defined(HAVE_PRI_DISPLAY_TEXT) */
520 #if defined(HAVE_PRI_MWI)
521  /*! \brief Active MWI mailboxes */
522  struct sig_pri_mbox mbox[SIG_PRI_MAX_MWI_MAILBOXES];
523  /*!
524  * \brief Comma separated list of mailboxes to indicate MWI.
525  * \note Empty if disabled.
526  * \note Format: vm_mailbox{,vm_mailbox}
527  * \note String is split apart when span is started.
528  */
529  char mwi_mailboxes[SIG_PRI_MAX_MWI_MAILBOX_STR];
530  /*!
531  * \brief Comma separated list of mailbox numbers sent over ISDN span for MWI.
532  * \note Empty if disabled.
533  * \note Format: vm_box{,vm_box}
534  * \note String is split apart when span is started.
535  */
536  char mwi_vm_boxes[SIG_PRI_MAX_MWI_VM_NUMBER_STR];
537  /*!
538  * \brief Comma separated list of voicemail access controlling numbers for MWI.
539  * \note Format: vm_number{,vm_number}
540  * \note String is split apart when span is started.
541  */
542  char mwi_vm_numbers[SIG_PRI_MAX_MWI_VM_NUMBER_STR];
543 #endif /* defined(HAVE_PRI_MWI) */
544  /*!
545  * \brief Initial user tag for party id's sent from this device driver.
546  * \note String set by config file.
547  */
549  char msn_list[AST_MAX_EXTENSION]; /*!< Comma separated list of MSNs to handle. Empty if disabled. */
550  char idleext[AST_MAX_EXTENSION]; /*!< Where to idle extra calls */
551  char idlecontext[AST_MAX_CONTEXT]; /*!< What context to use for idle */
552  char idledial[AST_MAX_EXTENSION]; /*!< What to dial before dumping */
553  int minunused; /*!< Min # of channels to keep empty */
554  int minidle; /*!< Min # of "idling" calls to keep active */
555  int nodetype; /*!< Node type */
556  int switchtype; /*!< Type of switch to emulate */
557  int nsf; /*!< Network-Specific Facilities */
558  int trunkgroup; /*!< What our trunkgroup is */
559 #if defined(HAVE_PRI_CCSS)
560  int cc_ptmp_recall_mode; /*!< CC PTMP recall mode. globalRecall(0), specificRecall(1) */
561  int cc_qsig_signaling_link_req; /*!< CC Q.SIG signaling link retention (Party A) release(0), retain(1), do-not-care(2) */
562  int cc_qsig_signaling_link_rsp; /*!< CC Q.SIG signaling link retention (Party B) release(0), retain(1) */
563 #endif /* defined(HAVE_PRI_CCSS) */
564 #if defined(HAVE_PRI_CALL_WAITING)
565  /*!
566  * \brief Number of extra outgoing calls to allow on a span before
567  * considering that span congested.
568  */
569  int max_call_waiting_calls;
570  struct {
571  int stripmsd;
572  unsigned int hidecallerid:1;
573  unsigned int hidecalleridname:1; /*!< Hide just the name not the number for legacy PBX use */
574  unsigned int immediate:1; /*!< Answer before getting digits? */
575  unsigned int priexclusive:1; /*!< Whether or not to override and use exclusive mode for channel selection */
576  unsigned int priindication_oob:1;
577  unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
578  unsigned int use_callingpres:1; /*!< Whether to use the callingpres the calling switch sends */
579  char context[AST_MAX_CONTEXT];
581  } ch_cfg;
582 
583  /*!
584  * \brief Number of outstanding call waiting calls.
585  * \note Must be zero to allow new calls from asterisk to
586  * immediately allocate a B channel.
587  */
588  int num_call_waiting_calls;
589 #endif /* defined(HAVE_PRI_CALL_WAITING) */
590  int dchanavail[SIG_PRI_NUM_DCHANS]; /*!< Whether each channel is available */
591  int debug; /*!< set to true if to dump PRI event info */
592  int span; /*!< span number put into user output messages */
593  int resetting; /*!< true if span is being reset/restarted */
594  int resetpos; /*!< current position during a reset (-1 if not started) */
595  int sig; /*!< ISDN signalling type (SIG_PRI, SIG_BRI, SIG_BRI_PTMP, etc...) */
596  int new_chan_seq; /*!< New struct ast_channel sequence number */
597  /*! TRUE if we have already whined about no D channels available. */
598  unsigned int no_d_channels:1;
599 
600  /* Everything after here is internally set */
601  struct pri *dchans[SIG_PRI_NUM_DCHANS]; /*!< Actual d-channels */
602  struct pri *pri; /*!< Currently active D-channel */
603  /*!
604  * List of private structures of the user of this module for no B channel
605  * interfaces. (hold and call waiting interfaces)
606  */
608  /*!
609  * List of private structures of the user of this module for no B channel
610  * interfaces. (hold and call waiting interfaces)
611  */
613  int numchans; /*!< Num of channels we represent */
614  struct sig_pri_chan *pvts[SIG_PRI_MAX_CHANNELS];/*!< Member channel pvt structs */
615  pthread_t master; /*!< Thread of master */
616  ast_mutex_t lock; /*!< libpri access Mutex */
617  time_t lastreset; /*!< time when unused channels were last reset */
618  /*!
619  * \brief Congestion device state of the span.
620  * \details
621  * AST_DEVICE_NOT_INUSE - Span does not have all B channels in use.
622  * AST_DEVICE_BUSY - All B channels are in use.
623  * AST_DEVICE_UNAVAILABLE - Span is in alarm.
624  * \note
625  * Device name: \verbatim DAHDI/I<span>/congestion. \endverbatim
626  */
628 #if defined(THRESHOLD_DEVSTATE_PLACEHOLDER)
629  /*! \todo An ISDN span threshold device state could be useful in determining how often a span utilization goes over a configurable threshold. */
630  /*!
631  * \brief User threshold device state of the span.
632  * \details
633  * AST_DEVICE_NOT_INUSE - There are no B channels in use.
634  * AST_DEVICE_INUSE - The number of B channels in use is less than
635  * the configured threshold but not zero.
636  * AST_DEVICE_BUSY - The number of B channels in use meets or exceeds
637  * the configured threshold.
638  * AST_DEVICE_UNAVAILABLE - Span is in alarm.
639  * \note
640  * Device name: \verbatim DAHDI/I<span>/threshold \endverbatim
641  */
642  int threshold_devstate;
643  /*!
644  * \brief Number of B channels in use to consider the span in a busy state.
645  * \note Setting the threshold to zero is interpreted as all B channels.
646  */
647  int user_busy_threshold;
648 #endif /* defined(THRESHOLD_DEVSTATE_PLACEHOLDER) */
649 };
650 
651 void sig_pri_extract_called_num_subaddr(struct sig_pri_chan *p, const char *rdest, char *called, size_t called_buff_size);
652 int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, const char *rdest, int timeout, int layer1);
653 
654 int sig_pri_hangup(struct sig_pri_chan *p, struct ast_channel *ast);
655 
656 int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen);
657 
658 int sig_pri_answer(struct sig_pri_chan *p, struct ast_channel *ast);
659 
661 int sig_pri_available(struct sig_pri_chan **pvt, int is_specific_channel);
662 
664 
665 /* If return 0, it means this function was able to handle it (pre setup digits). If non zero, the user of this
666  * functions should handle it normally (generate inband DTMF) */
667 int sig_pri_digit_begin(struct sig_pri_chan *pvt, struct ast_channel *ast, char digit);
668 void sig_pri_dial_complete(struct sig_pri_chan *pvt, struct ast_channel *ast);
669 
672 
673 void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm);
674 void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm);
675 
677 void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri);
678 void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri);
679 
681  const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
682  int transfercapability);
683 
684 struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup);
685 void sig_pri_chan_delete(struct sig_pri_chan *doomed);
686 
688 
689 struct mansession;
690 int sig_pri_ami_show_spans(struct mansession *s, const char *show_cmd, struct sig_pri_span *pri, const int *dchannels, const char *action_id);
691 
693 void sig_pri_cli_show_channels(int fd, struct sig_pri_span *pri);
694 void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_span *pri);
695 
696 void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_span *pri);
697 
698 int pri_send_keypad_facility_exec(struct sig_pri_chan *p, const char *digits);
699 int pri_send_callrerouting_facility_exec(struct sig_pri_chan *p, enum ast_channel_state chanstate, const char *destination, const char *original, const char *reason);
700 
701 #if defined(HAVE_PRI_SERVICE_MESSAGES)
702 int pri_maintenance_bservice(struct pri *pri, struct sig_pri_chan *p, int changestatus);
703 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
704 
705 void sig_pri_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_pri_chan *pchan);
706 #if defined(HAVE_PRI_DISPLAY_TEXT)
707 void sig_pri_sendtext(struct sig_pri_chan *pchan, const char *text);
708 #endif /* defined(HAVE_PRI_DISPLAY_TEXT) */
709 
710 int sig_pri_cc_agent_init(struct ast_cc_agent *agent, struct sig_pri_chan *pvt_chan);
720 
721 int sig_pri_cc_monitor_req_cc(struct ast_cc_monitor *monitor, int *available_timer_id);
726 void sig_pri_cc_monitor_destructor(void *monitor_pvt);
727 
728 int sig_pri_load(const char *cc_type_name);
729 void sig_pri_unload(void);
730 
731 #endif /* _SIG_PRI_H */
char digit
char * text
Definition: app_queue.c:1641
vm_box
static const char * mbox(struct ast_vm_user *vmu, int id)
Call Completion Supplementary Services API.
ast_cc_agent_response_reason
Definition: ccss.h:857
static char exten[AST_MAX_EXTENSION]
Definition: chan_alsa.c:122
static char context[AST_MAX_CONTEXT]
Definition: chan_alsa.c:120
static char mohinterpret[MAX_MUSICCLASS]
Definition: chan_alsa.c:123
static int immediate
Definition: chan_mgcp.c:186
General Asterisk PBX channel definitions.
#define AST_MAX_CONTEXT
Definition: channel.h:135
#define AST_MAX_EXTENSION
Definition: channel.h:134
#define MAX_MUSICCLASS
Definition: channel.h:173
ast_channel_state
ast_channel states
Definition: channelstate.h:35
ast_device_state
Device States.
Definition: devicestate.h:52
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
Asterisk internal frame definitions.
struct stasis_forward * sub
Definition: res_corosync.c:240
int sig_pri_is_chan_available(struct sig_pri_chan *pvt)
#define SIG_PRI_MAX_CHANNELS
Definition: sig_pri.h:240
void sig_pri_unload(void)
sig_pri_law
Definition: sig_pri.h:67
@ SIG_PRI_DEFLAW
Definition: sig_pri.h:68
@ SIG_PRI_ULAW
Definition: sig_pri.h:69
@ SIG_PRI_ALAW
Definition: sig_pri.h:70
sig_pri_colp_signaling
Definition: sig_pri.h:435
@ SIG_PRI_COLP_UPDATE
Definition: sig_pri.h:441
@ SIG_PRI_COLP_CONNECT
Definition: sig_pri.h:439
@ SIG_PRI_COLP_BLOCK
Definition: sig_pri.h:437
int pri_send_callrerouting_facility_exec(struct sig_pri_chan *p, enum ast_channel_state chanstate, const char *destination, const char *original, const char *reason)
int sig_pri_ami_show_spans(struct mansession *s, const char *show_cmd, struct sig_pri_span *pri, const int *dchannels, const char *action_id)
int pri_is_up(struct sig_pri_span *pri)
int sig_pri_cc_agent_status_req(struct ast_cc_agent *agent)
sig_pri_moh_state
Definition: sig_pri.h:84
@ SIG_PRI_MOH_STATE_NOTIFY
Definition: sig_pri.h:88
@ SIG_PRI_MOH_STATE_NUM
Definition: sig_pri.h:107
@ SIG_PRI_MOH_STATE_MOH
Definition: sig_pri.h:90
@ SIG_PRI_MOH_STATE_IDLE
Definition: sig_pri.h:86
struct ast_channel * sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, int transfercapability)
struct sig_pri_callback sig_pri_callbacks
sig_pri_moh_event
Definition: sig_pri.h:110
@ SIG_PRI_MOH_EVENT_NUM
Definition: sig_pri.h:131
@ SIG_PRI_MOH_EVENT_RESET
Definition: sig_pri.h:112
@ SIG_PRI_MOH_EVENT_HOLD
Definition: sig_pri.h:114
@ SIG_PRI_MOH_EVENT_UNHOLD
Definition: sig_pri.h:116
int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen)
void sig_pri_extract_called_num_subaddr(struct sig_pri_chan *p, const char *rdest, char *called, size_t called_buff_size)
#define SIG_PRI_NUM_DCHANS
Definition: sig_pri.h:239
int sig_pri_cc_agent_start_offer_timer(struct ast_cc_agent *agent)
int sig_pri_hangup(struct sig_pri_chan *p, struct ast_channel *ast)
int sig_pri_cc_monitor_unsuspend(struct ast_cc_monitor *monitor)
int sig_pri_available(struct sig_pri_chan **pvt, int is_specific_channel)
int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, const char *rdest, int timeout, int layer1)
int sig_pri_is_alarm_ignored(struct sig_pri_span *pri)
int sig_pri_cc_monitor_req_cc(struct ast_cc_monitor *monitor, int *available_timer_id)
int sig_pri_start_pri(struct sig_pri_span *pri)
int sig_pri_cc_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, int *sched_id)
void sig_pri_cli_show_channels(int fd, struct sig_pri_span *pri)
void sig_pri_cc_agent_req_rsp(struct ast_cc_agent *agent, enum ast_cc_agent_response_reason reason)
int sig_pri_cc_monitor_suspend(struct ast_cc_monitor *monitor)
sig_pri_reset_state
Definition: sig_pri.h:152
@ SIG_PRI_RESET_NO_ACK
Peer may not be sending the expected RESTART ACKNOWLEDGE.
Definition: sig_pri.h:170
@ SIG_PRI_RESET_ACTIVE
The channel is being RESTARTed.
Definition: sig_pri.h:159
@ SIG_PRI_RESET_IDLE
The channel is not being RESTARTed.
Definition: sig_pri.h:154
void sig_pri_stop_pri(struct sig_pri_span *pri)
void sig_pri_cc_agent_destructor(struct ast_cc_agent *agent)
void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_span *pri)
void sig_pri_init_pri(struct sig_pri_span *pri)
int sig_pri_cc_agent_start_monitoring(struct ast_cc_agent *agent)
int sig_pri_cc_agent_init(struct ast_cc_agent *agent, struct sig_pri_chan *pvt_chan)
void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm)
int sig_pri_load(const char *cc_type_name)
sig_pri_call_level
Definition: sig_pri.h:135
@ SIG_PRI_CALL_LEVEL_IDLE
Definition: sig_pri.h:137
@ SIG_PRI_CALL_LEVEL_CONNECT
Definition: sig_pri.h:149
@ SIG_PRI_CALL_LEVEL_OVERLAP
Definition: sig_pri.h:141
@ SIG_PRI_CALL_LEVEL_PROCEEDING
Definition: sig_pri.h:143
@ SIG_PRI_CALL_LEVEL_DEFER_DIAL
Definition: sig_pri.h:147
@ SIG_PRI_CALL_LEVEL_ALERTING
Definition: sig_pri.h:145
@ SIG_PRI_CALL_LEVEL_SETUP
Definition: sig_pri.h:139
sig_pri_moh_signaling
Definition: sig_pri.h:73
@ SIG_PRI_MOH_SIGNALING_MOH
Definition: sig_pri.h:75
@ SIG_PRI_MOH_SIGNALING_NOTIFY
Definition: sig_pri.h:77
int sig_pri_cc_agent_callee_available(struct ast_cc_agent *agent)
void sig_pri_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_pri_chan *pchan)
void sig_pri_cc_monitor_destructor(void *monitor_pvt)
void sig_pri_dial_complete(struct sig_pri_chan *pvt, struct ast_channel *ast)
void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri)
void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_span *pri)
void sig_pri_chan_delete(struct sig_pri_chan *doomed)
struct sig_pri_chan * sig_pri_chan_new(void *pvt_data, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup)
int sig_pri_answer(struct sig_pri_chan *p, struct ast_channel *ast)
sig_pri_tone
Definition: sig_pri.h:57
@ SIG_PRI_TONE_RINGTONE
Definition: sig_pri.h:58
@ SIG_PRI_TONE_INFO
Definition: sig_pri.h:63
@ SIG_PRI_TONE_DIALTONE
Definition: sig_pri.h:61
@ SIG_PRI_TONE_BUSY
Definition: sig_pri.h:64
@ SIG_PRI_TONE_STUTTER
Definition: sig_pri.h:59
@ SIG_PRI_TONE_CONGESTION
Definition: sig_pri.h:60
@ SIG_PRI_TONE_DIALRECALL
Definition: sig_pri.h:62
void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri)
int sig_pri_cc_agent_stop_offer_timer(struct ast_cc_agent *agent)
void sig_pri_cli_show_channels_header(int fd)
void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm)
int sig_pri_cc_agent_party_b_free(struct ast_cc_agent *agent)
int sig_pri_cc_monitor_status_rsp(struct ast_cc_monitor *monitor, enum ast_device_state devstate)
int sig_pri_cc_agent_stop_ringing(struct ast_cc_agent *agent)
int sig_pri_digit_begin(struct sig_pri_chan *pvt, struct ast_channel *ast, char digit)
int pri_send_keypad_facility_exec(struct sig_pri_chan *p, const char *digits)
Structure to pass both assignedid values to channel drivers.
Definition: channel.h:604
Main Channel structure associated with a channel.
unsigned short transfercapability
Structure for mutex and tracking information.
Definition: lock.h:135
Caller Party information.
Definition: channel.h:418
In case you didn't read that giant block of text above the mansession_session struct,...
Definition: manager.c:1632
Scheduler ID holder.
Definition: sched.c:70
void(*const set_digital)(void *pvt, int is_digital)
Definition: sig_pri.h:205
int(*const play_tone)(void *pvt, enum sig_pri_tone tone)
Definition: sig_pri.h:189
void(* destroy_later)(struct sig_pri_span *pri)
Definition: sig_pri.h:233
int(*const train_echocanceller)(void *pvt)
Definition: sig_pri.h:192
void(*const queue_control)(void *pvt, int subclass)
Definition: sig_pri.h:210
void(*const init_config)(void *pvt, struct sig_pri_span *pri)
Definition: sig_pri.h:212
struct ast_channel *(*const new_ast_channel)(void *pvt, int state, enum sig_pri_law law, char *exten, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
Definition: sig_pri.h:195
void(*const dial_digits)(void *pvt, const char *dial_string)
Definition: sig_pri.h:216
void(* module_ref)(void)
Definition: sig_pri.h:229
void(*const deadlock_avoidance_private)(void *pvt)
Definition: sig_pri.h:182
void(*const set_dialing)(void *pvt, int is_dialing)
Definition: sig_pri.h:204
void(*const unlock_private)(void *pvt)
Definition: sig_pri.h:178
void(*const set_callerid)(void *pvt, const struct ast_party_caller *caller)
Definition: sig_pri.h:207
void(*const set_rdnis)(void *pvt, const char *rdnis)
Definition: sig_pri.h:209
void(*const set_dnid)(void *pvt, const char *dnid)
Definition: sig_pri.h:208
int(*const set_echocanceller)(void *pvt, int enable)
Definition: sig_pri.h:191
void(*const open_media)(void *pvt)
Definition: sig_pri.h:218
int(*const dsp_reset_and_flush_digits)(void *pvt)
Definition: sig_pri.h:193
void(*const set_outgoing)(void *pvt, int is_outgoing)
Definition: sig_pri.h:206
void(*const fixup_chans)(void *old_chan, void *new_chan)
Definition: sig_pri.h:199
const char *(*const get_orig_dialstring)(void *pvt)
Definition: sig_pri.h:213
void(*const lock_private)(void *pvt)
Definition: sig_pri.h:180
void(*const set_alarm)(void *pvt, int in_alarm)
Definition: sig_pri.h:203
void(*const update_span_devstate)(struct sig_pri_span *pri)
Definition: sig_pri.h:215
void(*const ami_channel_event)(void *pvt, struct ast_channel *chan)
Post an AMI B channel association event.
Definition: sig_pri.h:226
void(* module_unref)(void)
Definition: sig_pri.h:231
void(*const handle_dchan_exception)(struct sig_pri_span *pri, int index)
Definition: sig_pri.h:202
int(*const new_nobch_intf)(struct sig_pri_span *pri)
Definition: sig_pri.h:211
void(*const make_cc_dialstring)(void *pvt, char *buf, size_t buf_size)
Definition: sig_pri.h:214
char dialdest[256]
Definition: sig_pri.h:306
unsigned int immediate
Definition: sig_pri.h:282
char user_tag[AST_MAX_EXTENSION *2]
User tag for party id's sent from this device driver.
Definition: sig_pri.h:301
char cid_subaddr[AST_MAX_EXTENSION]
Definition: sig_pri.h:297
struct sig_pri_span * pri
Definition: sig_pri.h:355
void * chan_pvt
Definition: sig_pri.h:374
char cid_num[AST_MAX_EXTENSION]
Definition: sig_pri.h:296
enum sig_pri_reset_state resetting
Channel reset/restart state.
Definition: sig_pri.h:361
unsigned int outgoing
Definition: sig_pri.h:340
unsigned int allocated
TRUE when this channel is allocated.
Definition: sig_pri.h:339
char moh_suggested[MAX_MUSICCLASS]
Definition: sig_pri.h:314
int prioffset
Definition: sig_pri.h:366
unsigned int use_callingpres
Definition: sig_pri.h:286
unsigned int priexclusive
Definition: sig_pri.h:283
char exten[AST_MAX_EXTENSION]
Definition: sig_pri.h:302
unsigned int hidecallerid
Definition: sig_pri.h:280
unsigned int progress
Definition: sig_pri.h:327
struct ast_channel * owner
Definition: sig_pri.h:353
int cid_ani2
Definition: sig_pri.h:293
enum sig_pri_call_level call_level
Definition: sig_pri.h:359
char deferred_digits[AST_MAX_EXTENSION]
Definition: sig_pri.h:312
unsigned int priindication_oob
Definition: sig_pri.h:284
unsigned int hidecalleridname
Definition: sig_pri.h:281
int callingpres
Definition: sig_pri.h:295
char context[AST_MAX_CONTEXT]
Definition: sig_pri.h:287
int mastertrunkgroup
Definition: sig_pri.h:368
int logicalspan
Definition: sig_pri.h:367
enum sig_pri_moh_state moh_state
Definition: sig_pri.h:315
unsigned int inalarm
Definition: sig_pri.h:324
char cid_name[AST_MAX_EXTENSION]
Definition: sig_pri.h:298
unsigned int digital
Definition: sig_pri.h:341
int channel
Definition: sig_pri.h:290
unsigned int no_b_channel
TRUE if this interface has no B channel. (call hold and call waiting)
Definition: sig_pri.h:343
int stripmsd
Definition: sig_pri.h:289
unsigned int isidlecall
Definition: sig_pri.h:326
unsigned int use_callerid
Definition: sig_pri.h:285
char cid_ani[AST_MAX_EXTENSION]
Definition: sig_pri.h:299
unsigned int alreadyhungup
Definition: sig_pri.h:325
char mohinterpret[MAX_MUSICCLASS]
Definition: sig_pri.h:288
q931_call * call
Definition: sig_pri.h:356
int cid_ton
Definition: sig_pri.h:294
struct sig_pri_chan * pvts[SIG_PRI_MAX_CHANNELS]
Definition: sig_pri.h:614
struct pri * pri
Definition: sig_pri.h:602
long resetinterval
Definition: sig_pri.h:515
int nodetype
Definition: sig_pri.h:555
int resetting
Definition: sig_pri.h:593
int numchans
Definition: sig_pri.h:613
int cpndialplan
Definition: sig_pri.h:506
int facilityenable
Definition: sig_pri.h:451
char idleext[AST_MAX_EXTENSION]
Definition: sig_pri.h:550
enum sig_pri_moh_signaling moh_signaling
Definition: sig_pri.h:512
int switchtype
Definition: sig_pri.h:556
int overlapdial
Definition: sig_pri.h:448
unsigned int inband_on_setup_ack
Definition: sig_pri.h:491
int minunused
Definition: sig_pri.h:553
char unknownprefix[20]
Definition: sig_pri.h:511
char msn_list[AST_MAX_EXTENSION]
Definition: sig_pri.h:549
int discardremoteholdretrieval
Definition: sig_pri.h:450
char privateprefix[20]
Definition: sig_pri.h:510
unsigned int inband_on_proceeding
Definition: sig_pri.h:493
int new_chan_seq
Definition: sig_pri.h:596
int localdialplan
Definition: sig_pri.h:505
int fds[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:457
int minidle
Definition: sig_pri.h:554
char nationalprefix[10]
Definition: sig_pri.h:508
unsigned int append_msn_to_user_tag
Definition: sig_pri.h:489
char localprefix[20]
Definition: sig_pri.h:509
int pritimers[PRI_MAX_TIMERS]
Definition: sig_pri.h:447
unsigned int layer1_ignored
Definition: sig_pri.h:484
int trunkgroup
Definition: sig_pri.h:558
pthread_t master
Definition: sig_pri.h:615
struct pri * dchans[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:601
unsigned int no_d_channels
Definition: sig_pri.h:598
char idlecontext[AST_MAX_CONTEXT]
Definition: sig_pri.h:551
enum sig_pri_colp_signaling colp_send
Definition: sig_pri.h:514
int dialplan
Definition: sig_pri.h:504
int dchanavail[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:590
int congestion_devstate
Congestion device state of the span.
Definition: sig_pri.h:627
struct ast_cc_config_params * cc_params
Definition: sig_pri.h:446
unsigned int force_restart_unavailable_chans
TRUE if forcing RESTART when receive cause 44 on this span.
Definition: sig_pri.h:499
int resetpos
Definition: sig_pri.h:594
void * no_b_chan_end
Definition: sig_pri.h:612
unsigned int transfer
TRUE if call transfer is enabled for the span.
Definition: sig_pri.h:478
void * no_b_chan_iflist
Definition: sig_pri.h:607
ast_mutex_t lock
Definition: sig_pri.h:616
int qsigchannelmapping
Definition: sig_pri.h:449
char internationalprefix[10]
Definition: sig_pri.h:507
time_t lastreset
Definition: sig_pri.h:617
int dchan_logical_span[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:456
char idledial[AST_MAX_EXTENSION]
Definition: sig_pri.h:552
char initial_user_tag[AST_MAX_EXTENSION]
Initial user tag for party id's sent from this device driver.
Definition: sig_pri.h:548