Asterisk - The Open Source Telephony Project  21.4.1
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 
57 enum sig_pri_tone {
58  SIG_PRI_TONE_RINGTONE = 0,
59  SIG_PRI_TONE_STUTTER,
60  SIG_PRI_TONE_CONGESTION,
61  SIG_PRI_TONE_DIALTONE,
62  SIG_PRI_TONE_DIALRECALL,
63  SIG_PRI_TONE_INFO,
64  SIG_PRI_TONE_BUSY,
65 };
66 
67 enum sig_pri_law {
68  SIG_PRI_DEFLAW = 0,
69  SIG_PRI_ULAW,
70  SIG_PRI_ALAW
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. */
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. */
94  /*! Trying to go on hold when bridged peer requested to unhold. */
96  /*! Channel is held. */
98  /*! Requesting to take channel out of hold. */
100  /*! Trying to take channel out of hold when bridged peer requested to hold. */
102  /*! Failed to take the channel out of hold. No B channels were available? */
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. */
120  /*! The hold request was rejected. */
122  /*! The unhold request was successfully acknowledged. */
124  /*! The unhold request was rejected. */
126  /*! The remote party took this channel off hold. */
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 */
287  char context[AST_MAX_CONTEXT];
288  char mohinterpret[MAX_MUSICCLASS];
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 */
296  char cid_num[AST_MAX_EXTENSION];
297  char cid_subaddr[AST_MAX_EXTENSION];
298  char cid_name[AST_MAX_EXTENSION];
299  char cid_ani[AST_MAX_EXTENSION];
300  /*! \brief User tag for party id's sent from this device driver. */
302  char exten[AST_MAX_EXTENSION];
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. */
310 #endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
311  /*! 'w' deferred dialing digits. */
313  /*! Music class suggested with AST_CONTROL_HOLD. */
315  enum sig_pri_moh_state moh_state;
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 
353  struct ast_channel *owner;
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. */
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  */
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  */
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. */
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. */
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 */
512  enum sig_pri_moh_signaling moh_signaling;
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 */
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  */
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  */
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  */
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  */
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];
580  char mohinterpret[MAX_MUSICCLASS];
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  */
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 
660 int sig_pri_is_chan_available(struct sig_pri_chan *pvt);
661 int sig_pri_available(struct sig_pri_chan **pvt, int is_specific_channel);
662 
663 void sig_pri_init_pri(struct sig_pri_span *pri);
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 
670 void sig_pri_stop_pri(struct sig_pri_span *pri);
671 int sig_pri_start_pri(struct sig_pri_span *pri);
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 
676 int sig_pri_is_alarm_ignored(struct sig_pri_span *pri);
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 
680 struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law,
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 
687 int pri_is_up(struct sig_pri_span *pri);
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 
692 void sig_pri_cli_show_channels_header(int fd);
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);
714 int sig_pri_cc_agent_status_req(struct ast_cc_agent *agent);
719 void sig_pri_cc_agent_destructor(struct ast_cc_agent *agent);
720 
721 int sig_pri_cc_monitor_req_cc(struct ast_cc_monitor *monitor, int *available_timer_id);
722 int sig_pri_cc_monitor_suspend(struct ast_cc_monitor *monitor);
723 int sig_pri_cc_monitor_unsuspend(struct ast_cc_monitor *monitor);
724 int sig_pri_cc_monitor_status_rsp(struct ast_cc_monitor *monitor, enum ast_device_state devstate);
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 */
int aoc_s_request_invoke_id
Definition: sig_pri.h:319
int max_call_waiting_calls
Number of extra outgoing calls to allow on a span before considering that span congested.
Definition: sig_pri.h:569
int cid_ton
Definition: sig_pri.h:294
void sig_pri_unload(void)
Unload the sig_pri submodule.
Definition: sig_pri.c:10030
int sig_pri_cc_monitor_unsuspend(struct ast_cc_monitor *monitor)
Unsuspend monitoring.
Definition: sig_pri.c:9887
int nodetype
Definition: sig_pri.h:555
void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm)
Notify new alarm status.
Definition: sig_pri.c:9163
int dchan_logical_span[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:456
long resetinterval
Definition: sig_pri.h:515
char user_tag[AST_MAX_EXTENSION *2]
User tag for party id's sent from this device driver.
Definition: sig_pri.h:301
Main Channel structure associated with a channel.
unsigned long display_flags_send
Definition: sig_pri.h:517
int logicalspan
Definition: sig_pri.h:367
int sig_pri_cc_agent_party_b_free(struct ast_cc_agent *agent)
Let the caller know that the callee has become free but that the caller cannot attempt to call back b...
Definition: sig_pri.c:9653
ast_device_state
Device States.
Definition: devicestate.h:52
unsigned int alreadyhungup
Definition: sig_pri.h:325
unsigned int priexclusive
Definition: sig_pri.h:283
void sig_pri_sendtext(struct sig_pri_chan *pchan, const char *text)
Send display text.
Definition: sig_pri.c:9391
char keypad_digits[AST_MAX_EXTENSION]
Keypad digits that came in with the SETUP message.
Definition: sig_pri.h:309
int cc_qsig_signaling_link_req
Definition: sig_pri.h:561
int congestion_devstate
Congestion device state of the span.
Definition: sig_pri.h:627
int reverse_charging_indication
Reverse charging indication.
Definition: sig_pri.h:383
static const char dahdi_db[]
The AstDB family.
Definition: sig_pri.h:275
unsigned int use_callingpres
Definition: sig_pri.h:286
int callingpres
Definition: sig_pri.h:295
const char * vm_box
Mailbox number sent to span.
Definition: sig_pri.h:429
sig_pri_moh_event
Definition: sig_pri.h:110
unsigned int use_callerid
Definition: sig_pri.h:285
#define MAX_MUSICCLASS
Definition: channel.h:173
char idleext[AST_MAX_EXTENSION]
Definition: sig_pri.h:550
unsigned int hold_disconnect_transfer
TRUE if held calls are transferred on disconnect.
Definition: sig_pri.h:472
int sig_pri_cc_agent_stop_offer_timer(struct ast_cc_agent *agent)
Stop the offer timer.
Definition: sig_pri.c:9488
char mwi_vm_boxes[SIG_PRI_MAX_MWI_VM_NUMBER_STR]
Comma separated list of mailbox numbers sent over ISDN span for MWI.
Definition: sig_pri.h:536
unsigned int transfer
TRUE if call transfer is enabled for the span.
Definition: sig_pri.h:478
struct sig_pri_callback sig_pri_callbacks
Definition: chan_dahdi.c:3310
unsigned int allow_call_waiting_calls
TRUE if we will allow incoming ISDN call waiting calls.
Definition: sig_pri.h:481
int facilityenable
Definition: sig_pri.h:451
char nationalprefix[10]
Definition: sig_pri.h:508
int sig_pri_cc_monitor_req_cc(struct ast_cc_monitor *monitor, int *available_timer_id)
Request CCSS.
Definition: sig_pri.c:9818
q931_call * call
Definition: sig_pri.h:356
int sig_pri_cc_monitor_suspend(struct ast_cc_monitor *monitor)
Suspend monitoring.
Definition: sig_pri.c:9861
char idlecontext[AST_MAX_CONTEXT]
Definition: sig_pri.h:551
sig_pri_reset_state
Definition: sig_pri.h:152
const char * vm_number
Voicemail access controlling number sent to span.
Definition: sig_pri.h:431
#define SIG_PRI_MAX_MWI_MAILBOXES
Definition: sig_pri.h:389
unsigned int mcid_send
TRUE if allow sending MCID request on this span.
Definition: sig_pri.h:496
struct ast_cc_config_params * cc_params
Definition: sig_pri.h:446
unsigned int aoc_s_request_invoke_id_valid
Definition: sig_pri.h:320
unsigned int hidecalleridname
Definition: sig_pri.h:573
int minidle
Definition: sig_pri.h:554
Structure to pass both assignedid values to channel drivers.
Definition: channel.h:604
unsigned int enable_service_message_support
Definition: sig_pri.h:465
unsigned int aoce_delayhangup
Definition: sig_pri.h:461
ast_channel_state
ast_channel states
Definition: channelstate.h:35
enum sig_pri_reset_state resetting
Channel reset/restart state.
Definition: sig_pri.h:361
Scheduler ID holder.
Definition: sched.c:70
unsigned int isidlecall
Definition: sig_pri.h:326
unsigned int no_b_channel
TRUE if this interface has no B channel. (call hold and call waiting)
Definition: sig_pri.h:343
The channel is not being RESTARTed.
Definition: sig_pri.h:154
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)
Output AMI show spans response events for the given PRI span.
Definition: sig_pri.c:7540
int dialplan
Definition: sig_pri.h:504
int localdialplan
Definition: sig_pri.h:505
unsigned short transfercapability
char localprefix[20]
Definition: sig_pri.h:509
ast_cc_agent_response_reason
Definition: ccss.h:841
int switchtype
Definition: sig_pri.h:556
int dchanavail[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:590
int qsigchannelmapping
Definition: sig_pri.h:449
Definition: dsp.c:117
unsigned service_status
Active SRVST_DBKEY out-of-service status value.
Definition: sig_pri.h:371
char mwi_vm_numbers[SIG_PRI_MAX_MWI_VM_NUMBER_STR]
Comma separated list of voicemail access controlling numbers for MWI.
Definition: sig_pri.h:542
enum sig_pri_colp_signaling colp_send
Definition: sig_pri.h:514
unsigned int inband_on_setup_ack
Definition: sig_pri.h:491
void * chan_pvt
Definition: sig_pri.h:374
void(* module_ref)(void)
Definition: sig_pri.h:229
void sig_pri_extract_called_num_subaddr(struct sig_pri_chan *p, const char *rdest, char *called, size_t called_buff_size)
Extract the called number and subaddress from the dial string.
Definition: sig_pri.c:7694
int mastertrunkgroup
Definition: sig_pri.h:368
ast_mutex_t lock
Definition: sig_pri.h:616
unsigned int no_d_channels
Definition: sig_pri.h:598
void(* destroy_later)(struct sig_pri_span *pri)
Definition: sig_pri.h:233
int cc_qsig_signaling_link_rsp
Definition: sig_pri.h:562
#define SIG_PRI_MAX_MWI_MAILBOX_STR
Maximum mwi_mailboxs string length.
Definition: sig_pri.h:417
int sig_pri_cc_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, int *sched_id)
Cancel the running available timer.
Definition: sig_pri.c:9962
char unknownprefix[20]
Definition: sig_pri.h:511
struct sig_pri_mbox mbox[SIG_PRI_MAX_MWI_MAILBOXES]
Active MWI mailboxes.
Definition: sig_pri.h:522
struct ast_mwi_subscriber * sub
MWI mailbox event subscription.
Definition: sig_pri.h:425
General Asterisk PBX channel definitions.
unsigned int inband_on_proceeding
Definition: sig_pri.h:493
int sig_pri_cc_agent_stop_ringing(struct ast_cc_agent *agent)
Request for an agent's phone to stop ringing.
Definition: sig_pri.c:9619
enum sig_pri_call_level call_level
Definition: sig_pri.h:359
#define AST_MAX_EXTENSION
Definition: channel.h:134
int cc_ptmp_recall_mode
Definition: sig_pri.h:560
Caller Party information.
Definition: channel.h:418
Asterisk internal frame definitions.
In case you didn't read that giant block of text above the mansession_session struct, the mansession is named this solely to keep the API the same in Asterisk. This structure really represents data that is different from Manager action to Manager action. The mansession_session pointer contained within points to session-specific data.
Definition: manager.c:1785
char internationalprefix[10]
Definition: sig_pri.h:507
The channel is being RESTARTed.
Definition: sig_pri.h:159
char privateprefix[20]
Definition: sig_pri.h:510
const char * uniqueid
Mailbox uniqueid.
Definition: sig_pri.h:427
void * no_b_chan_end
Definition: sig_pri.h:612
void(*const ami_channel_event)(void *pvt, struct ast_channel *chan)
Post an AMI B channel association event.
Definition: sig_pri.h:226
unsigned int holding_aoce
Definition: sig_pri.h:322
int overlapdial
Definition: sig_pri.h:448
#define SIG_PRI_MAX_MWI_VM_NUMBER_STR
Maximum mwi_vm_numbers and mwi_vm_boxes string length.
Definition: sig_pri.h:402
void sig_pri_chan_delete(struct sig_pri_chan *doomed)
Delete the sig_pri private channel structure.
Definition: sig_pri.c:9219
unsigned int use_callingpres
Definition: sig_pri.h:578
struct xfer_rsp_data * xfer_data
Definition: sig_pri.h:364
char moh_suggested[MAX_MUSICCLASS]
Definition: sig_pri.h:314
int sig_pri_cc_agent_init(struct ast_cc_agent *agent, struct sig_pri_chan *pvt_chan)
PRI CC agent initialization.
Definition: sig_pri.c:9423
int sig_pri_cc_monitor_status_rsp(struct ast_cc_monitor *monitor, enum ast_device_state devstate)
Status response to an ast_cc_monitor_status_request().
Definition: sig_pri.c:9917
pthread_t master
Definition: sig_pri.h:615
unsigned int force_restart_unavailable_chans
TRUE if forcing RESTART when receive cause 44 on this span.
Definition: sig_pri.h:499
int minunused
Definition: sig_pri.h:553
time_t lastreset
Definition: sig_pri.h:617
sig_pri_colp_signaling
Definition: sig_pri.h:435
unsigned int inbanddisconnect
Definition: sig_pri.h:468
#define SIG_PRI_NUM_DCHANS
Definition: sig_pri.h:239
int cpndialplan
Definition: sig_pri.h:506
struct sig_pri_chan * pvts[SIG_PRI_MAX_CHANNELS]
Definition: sig_pri.h:614
char idledial[AST_MAX_EXTENSION]
Definition: sig_pri.h:552
unsigned int immediate
Definition: sig_pri.h:282
unsigned long display_flags_receive
Definition: sig_pri.h:518
#define AST_MAX_CONTEXT
Definition: channel.h:135
int resetpos
Definition: sig_pri.h:594
unsigned int hidecalleridname
Definition: sig_pri.h:281
unsigned int append_msn_to_user_tag
Definition: sig_pri.h:489
char initial_user_tag[AST_MAX_EXTENSION]
Initial user tag for party id's sent from this device driver.
Definition: sig_pri.h:548
char mwi_mailboxes[SIG_PRI_MAX_MWI_MAILBOX_STR]
Comma separated list of mailboxes to indicate MWI.
Definition: sig_pri.h:529
Call Completion Supplementary Services API.
sig_pri_moh_state
Definition: sig_pri.h:84
int l2_persistence
Definition: sig_pri.h:454
void sig_pri_cc_monitor_destructor(void *monitor_pvt)
Destroy PRI private data on the monitor.
Definition: sig_pri.c:9985
char msn_list[AST_MAX_EXTENSION]
Definition: sig_pri.h:549
sig_pri_moh_signaling
Definition: sig_pri.h:73
char deferred_digits[AST_MAX_EXTENSION]
Definition: sig_pri.h:312
int sig_pri_cc_agent_start_monitoring(struct ast_cc_agent *agent)
Begin monitoring a busy device.
Definition: sig_pri.c:9682
int numchans
Definition: sig_pri.h:613
int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, const char *rdest, int timeout, int layer1)
Definition: sig_pri.c:7780
int resetting
Definition: sig_pri.h:593
unsigned int is_call_waiting
TRUE if this is a call waiting call.
Definition: sig_pri.h:346
void sig_pri_stop_pri(struct sig_pri_span *pri)
Stop PRI span.
Definition: sig_pri.c:8872
int cid_ani2
Definition: sig_pri.h:293
unsigned int priexclusive
Definition: sig_pri.h:575
#define SIG_PRI_MAX_CHANNELS
Definition: sig_pri.h:240
Peer may not be sending the expected RESTART ACKNOWLEDGE.
Definition: sig_pri.h:170
int num_call_waiting_calls
Number of outstanding call waiting calls.
Definition: sig_pri.h:588
void sig_pri_cc_agent_destructor(struct ast_cc_agent *agent)
Destroy private data on the agent.
Definition: sig_pri.c:9736
int discardremoteholdretrieval
Definition: sig_pri.h:450
void sig_pri_dial_complete(struct sig_pri_chan *pvt, struct ast_channel *ast)
DTMF dial string complete.
Definition: sig_pri.c:8726
unsigned int use_callerid
Definition: sig_pri.h:577
sig_pri_call_level
Definition: sig_pri.h:135
unsigned int layer1_ignored
Definition: sig_pri.h:484
void * no_b_chan_iflist
Definition: sig_pri.h:607
int sig_pri_is_chan_available(struct sig_pri_chan *pvt)
Determine if a private channel structure is available.
Definition: sig_pri.c:1218
int prioffset
Definition: sig_pri.h:366
int sig_pri_cc_agent_start_offer_timer(struct ast_cc_agent *agent)
Start the offer timer.
Definition: sig_pri.c:9467
int sig_pri_load(const char *cc_type_name)
Load the sig_pri submodule.
Definition: sig_pri.c:10007
int new_chan_seq
Definition: sig_pri.h:596
int aoc_passthrough_flag
Definition: sig_pri.h:460
unsigned int allocated
TRUE when this channel is allocated.
Definition: sig_pri.h:339
struct pri * dchans[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:601
unsigned int no_dialed_digits
Definition: sig_pri.h:350
void(* module_unref)(void)
Definition: sig_pri.h:231
void sig_pri_cc_agent_req_rsp(struct ast_cc_agent *agent, enum ast_cc_agent_response_reason reason)
Response to a CC request.
Definition: sig_pri.c:9514
int datetime_send
Configured date/time ie send policy option.
Definition: sig_pri.h:502
unsigned int waiting_for_aoce
Definition: sig_pri.h:321
struct pri * pri
Definition: sig_pri.h:602
int sig_pri_is_alarm_ignored(struct sig_pri_span *pri)
Determine if layer 1 alarms are ignored.
Definition: sig_pri.c:9189
int sig_pri_cc_agent_callee_available(struct ast_cc_agent *agent)
Alert the caller that it is time to try recalling.
Definition: sig_pri.c:9709
unsigned int immediate
Definition: sig_pri.h:574
char exten[AST_MAX_EXTENSION]
Structure for mutex and tracking information.
Definition: lock.h:135
int fds[SIG_PRI_NUM_DCHANS]
Definition: sig_pri.h:457
int channel
Definition: sig_pri.h:290
int trunkgroup
Definition: sig_pri.h:558
int sig_pri_cc_agent_status_req(struct ast_cc_agent *agent)
Request the status of the agent's device.
Definition: sig_pri.c:9584