4 * Asterisk -- An open source telephony toolkit.
6 * Copyright (C) 1999 - 2009, Digium, Inc.
8 * Mark Spencer <markster@digium.com>
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.
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.
23 * \brief Interface header for PRI signaling module
25 * \author Matthew Fredrickson <creslin@digium.com>
28 #include "asterisk/channel.h"
29 #include "asterisk/frame.h"
30 #include "asterisk/event.h"
31 #include "asterisk/ccss.h"
33 #include <dahdi/user.h>
35 #if defined(HAVE_PRI_CCSS)
36 /*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
37 #define SIG_PRI_DEBUG_NORMAL \
38 (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE \
41 /*! PRI debug message flags when intense PRI debugging is turned on at the command line. */
42 #define SIG_PRI_DEBUG_INTENSE \
43 (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE \
44 | PRI_DEBUG_CC | PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_DUMP)
48 /*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
49 #define SIG_PRI_DEBUG_NORMAL \
50 (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE)
52 /*! PRI debug message flags when intense PRI debugging is turned on at the command line. */
53 #define SIG_PRI_DEBUG_INTENSE \
54 (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE \
55 | PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_DUMP)
56 #endif /* !defined(HAVE_PRI_CCSS) */
59 /*! PRI debug message flags set on initial startup. */
60 #define SIG_PRI_DEBUG_DEFAULT SIG_PRI_DEBUG_NORMAL
62 /*! PRI debug message flags set on initial startup. */
63 #define SIG_PRI_DEBUG_DEFAULT 0
66 #define SIG_PRI_AOC_GRANT_S (1 << 0)
67 #define SIG_PRI_AOC_GRANT_D (1 << 1)
68 #define SIG_PRI_AOC_GRANT_E (1 << 2)
71 SIG_PRI_TONE_RINGTONE = 0,
73 SIG_PRI_TONE_CONGESTION,
74 SIG_PRI_TONE_DIALTONE,
75 SIG_PRI_TONE_DIALRECALL,
88 struct sig_pri_callback {
89 /* Unlock the private in the signalling private structure. This is used for three way calling madness. */
90 void (* const unlock_private)(void *pvt);
91 /* Lock the private in the signalling private structure. ... */
92 void (* const lock_private)(void *pvt);
93 /* Function which is called back to handle any other DTMF up events that are received. Called by analog_handle_event. Why is this
94 * important to use, instead of just directly using events received before they are passed into the library? Because sometimes,
95 * (CWCID) the library absorbs DTMF events received. */
96 //void (* const handle_dtmfup)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest);
98 //int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
99 int (* const play_tone)(void *pvt, enum sig_pri_tone tone);
101 int (* const set_echocanceller)(void *pvt, int enable);
102 int (* const train_echocanceller)(void *pvt);
103 int (* const dsp_reset_and_flush_digits)(void *pvt);
105 struct ast_channel * (* const new_ast_channel)(void *pvt, int state, int startpbx, enum sig_pri_law law, int transfercapability, char *exten, const struct ast_channel *chan);
107 void (* const fixup_chans)(void *old_chan, void *new_chan);
109 /* Note: Called with PRI lock held */
110 void (* const handle_dchan_exception)(struct sig_pri_pri *pri, int index);
111 void (* const set_alarm)(void *pvt, int in_alarm);
112 void (* const set_dialing)(void *pvt, int is_dialing);
113 void (* const set_digital)(void *pvt, int is_digital);
114 void (* const set_callerid)(void *pvt, const struct ast_party_caller *caller);
115 void (* const set_dnid)(void *pvt, const char *dnid);
116 void (* const set_rdnis)(void *pvt, const char *rdnis);
117 void (* const queue_control)(void *pvt, int subclass);
118 int (* const new_nobch_intf)(struct sig_pri_pri *pri);
119 void (* const init_config)(void *pvt, struct sig_pri_pri *pri);
120 const char *(* const get_orig_dialstring)(void *pvt);
121 void (* const make_cc_dialstring)(void *pvt, char *buf, size_t buf_size);
122 void (* const update_span_devstate)(struct sig_pri_pri *pri);
124 void (* const open_media)(void *pvt);
126 /*! Reference the parent module. */
127 void (*module_ref)(void);
128 /*! Unreference the parent module. */
129 void (*module_unref)(void);
132 #define SIG_PRI_NUM_DCHANS 4 /*!< No more than 4 d-channels */
133 #define SIG_PRI_MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
135 #define SIG_PRI DAHDI_SIG_CLEAR
136 #define SIG_BRI (0x2000000 | DAHDI_SIG_CLEAR)
137 #define SIG_BRI_PTMP (0X4000000 | DAHDI_SIG_CLEAR)
139 /* QSIG channel mapping option types */
140 #define DAHDI_CHAN_MAPPING_PHYSICAL 0
141 #define DAHDI_CHAN_MAPPING_LOGICAL 1
143 /* Overlap dialing option types */
144 #define DAHDI_OVERLAPDIAL_NONE 0
145 #define DAHDI_OVERLAPDIAL_OUTGOING 1
146 #define DAHDI_OVERLAPDIAL_INCOMING 2
147 #define DAHDI_OVERLAPDIAL_BOTH (DAHDI_OVERLAPDIAL_INCOMING|DAHDI_OVERLAPDIAL_OUTGOING)
149 #if defined(HAVE_PRI_SERVICE_MESSAGES)
150 /*! \brief Persistent Service State */
151 #define SRVST_DBKEY "service-state"
152 /*! \brief The out-of-service SERVICE state */
153 #define SRVST_TYPE_OOS "O"
154 /*! \brief SRVST_INITIALIZED is used to indicate a channel being out-of-service
155 * The SRVST_INITIALIZED is mostly used maintain backwards compatibility but also may
156 * mean that the channel has not yet received a RESTART message. If a channel is
157 * out-of-service with this reason a RESTART message will result in the channel
158 * being put into service. */
159 #define SRVST_INITIALIZED 0
160 /*! \brief SRVST_NEAREND is used to indicate that the near end was put out-of-service */
161 #define SRVST_NEAREND (1 << 0)
162 /*! \brief SRVST_FAREND is used to indicate that the far end was taken out-of-service */
163 #define SRVST_FAREND (1 << 1)
164 /*! \brief SRVST_BOTH is used to indicate that both sides of the channel are out-of-service */
165 #define SRVST_BOTH (SRVST_NEAREND | SRVST_FAREND)
167 /*! \brief The AstDB family */
168 static const char dahdi_db[] = "dahdi/registry";
169 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
171 struct sig_pri_chan {
172 /* Options to be set by user */
173 unsigned int hidecallerid:1;
174 unsigned int hidecalleridname:1; /*!< Hide just the name not the number for legacy PBX use */
175 unsigned int immediate:1; /*!< Answer before getting digits? */
176 unsigned int priexclusive:1; /*!< Whether or not to override and use exculsive mode for channel selection */
177 unsigned int priindication_oob:1;
178 unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
179 unsigned int use_callingpres:1; /*!< Whether to use the callingpres the calling switch sends */
180 char context[AST_MAX_CONTEXT];
181 char mohinterpret[MAX_MUSICCLASS];
183 int channel; /*!< Channel Number or CRV */
185 /* Options to be checked by user */
186 int cid_ani2; /*!< Automatic Number Identification number (Alternate PRI caller ID number) */
187 int cid_ton; /*!< Type Of Number (TON) */
188 int callingpres; /*!< The value of calling presentation that we're going to use when placing a PRI call */
189 char cid_num[AST_MAX_EXTENSION];
190 char cid_subaddr[AST_MAX_EXTENSION];
191 char cid_name[AST_MAX_EXTENSION];
192 char cid_ani[AST_MAX_EXTENSION];
193 char exten[AST_MAX_EXTENSION];
195 /* Internal variables -- Don't touch */
196 /* Probably will need DS0 number, DS1 number, and a few other things */
197 char dialdest[256]; /* Queued up digits for overlap dialing. They will be sent out as information messages when setup ACK is received */
198 #if defined(HAVE_PRI_SETUP_KEYPAD)
199 /*! \brief Keypad digits that came in with the SETUP message. */
200 char keypad_digits[AST_MAX_EXTENSION];
201 #endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
203 #if defined(HAVE_PRI_AOC_EVENTS)
204 struct pri_subcmd_aoc_e aoc_e;
205 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 */
206 unsigned int aoc_s_request_invoke_id_valid:1; /*!< This is set when the AOC-S invoke id is present */
207 unsigned int waiting_for_aoce:1; /*!< Delaying hangup for AOC-E msg. If this is set and AOC-E is recieved, continue with hangup before timeout period. */
208 unsigned int holding_aoce:1; /*!< received AOC-E msg from asterisk. holding for disconnect/release */
209 #endif /* defined(HAVE_PRI_AOC_EVENTS) */
210 unsigned int inalarm:1;
211 unsigned int alerting:1; /*!< TRUE if channel is alerting/ringing */
212 unsigned int alreadyhungup:1; /*!< TRUE if the call has already gone/hungup */
213 unsigned int isidlecall:1; /*!< TRUE if this is an idle call */
214 unsigned int proceeding:1; /*!< TRUE if call is in a proceeding state */
215 unsigned int progress:1; /*!< TRUE if the call has seen progress through the network */
216 unsigned int resetting:1; /*!< TRUE if this channel is being reset/restarted */
217 unsigned int setup_ack:1; /*!< TRUE if this channel has received a SETUP_ACKNOWLEDGE */
219 unsigned int outgoing:1;
220 unsigned int digital:1;
221 /*! \brief TRUE if this interface has no B channel. (call hold and call waiting) */
222 unsigned int no_b_channel:1;
223 #if defined(HAVE_PRI_CALL_WAITING)
224 /*! \brief TRUE if this is a call waiting call */
225 unsigned int is_call_waiting:1;
226 #endif /* defined(HAVE_PRI_CALL_WAITING) */
228 struct ast_channel *owner;
230 struct sig_pri_pri *pri;
231 q931_call *call; /*!< opaque libpri call control structure */
233 int prioffset; /*!< channel number in span */
234 int logicalspan; /*!< logical span number within trunk group */
235 int mastertrunkgroup; /*!< what trunk group is our master */
236 #if defined(HAVE_PRI_SERVICE_MESSAGES)
237 /*! \brief Active SRVST_DBKEY out-of-service status value. */
238 unsigned service_status;
239 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
241 struct sig_pri_callback *calls;
242 void *chan_pvt; /*!< Private structure of the user of this module. */
243 #if defined(HAVE_PRI_REVERSE_CHARGE)
245 * \brief Reverse charging indication
247 * -1 - No reverse charging,
248 * 1 - Reverse charging,
249 * 0,2-7 - Reserved for future use
251 int reverse_charging_indication;
255 #if defined(HAVE_PRI_MWI)
256 /*! Maximum number of mailboxes per span. */
257 #define SIG_PRI_MAX_MWI_MAILBOXES 8
258 /*! Typical maximum length of mwi mailbox number */
259 #define SIG_PRI_MAX_MWI_MBOX_NUMBER_LEN 10 /* digits in number */
260 /*! Typical maximum length of mwi mailbox context */
261 #define SIG_PRI_MAX_MWI_CONTEXT_LEN 10
263 * \brief Maximum mwi_mailbox string length.
265 * max_length = #mailboxes * (mbox_number + '@' + context + ',')
266 * The last ',' is a null terminator instead.
268 #define SIG_PRI_MAX_MWI_MAILBOX_STR (SIG_PRI_MAX_MWI_MAILBOXES \
269 * (SIG_PRI_MAX_MWI_MBOX_NUMBER_LEN + 1 + SIG_PRI_MAX_MWI_CONTEXT_LEN + 1))
271 struct sig_pri_mbox {
273 * \brief MWI mailbox event subscription.
274 * \note NULL if mailbox not configured.
276 struct ast_event_sub *sub;
277 /*! \brief Mailbox number */
279 /*! \brief Mailbox context. */
282 #endif /* defined(HAVE_PRI_MWI) */
285 /* Should be set by user */
286 struct ast_cc_config_params *cc_params; /*!< CC config parameters for each new call. */
287 int pritimers[PRI_MAX_TIMERS];
288 int overlapdial; /*!< In overlap dialing mode */
289 int qsigchannelmapping; /*!< QSIG channel mapping type */
290 int discardremoteholdretrieval; /*!< shall remote hold or remote retrieval notifications be discarded? */
291 int facilityenable; /*!< Enable facility IEs */
292 int dchan_logical_span[SIG_PRI_NUM_DCHANS]; /*!< Logical offset the DCHAN sits in */
293 int fds[SIG_PRI_NUM_DCHANS]; /*!< FD's for d-channels */
295 #if defined(HAVE_PRI_AOC_EVENTS)
296 int aoc_passthrough_flag; /*!< Represents what AOC messages (S,D,E) are allowed to pass-through */
297 int aoce_delayhangup:1; /*!< defines whether the aoce_delayhangup option is enabled or not */
298 #endif /* defined(HAVE_PRI_AOC_EVENTS) */
300 #if defined(HAVE_PRI_SERVICE_MESSAGES)
301 unsigned int enable_service_message_support:1; /*!< enable SERVICE message support */
302 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
303 #ifdef HAVE_PRI_INBANDDISCONNECT
304 unsigned int inbanddisconnect:1; /*!< Should we support inband audio after receiving DISCONNECT? */
306 #if defined(HAVE_PRI_CALL_HOLD)
307 /*! \brief TRUE if held calls are transferred on disconnect. */
308 unsigned int hold_disconnect_transfer:1;
309 #endif /* defined(HAVE_PRI_CALL_HOLD) */
311 * \brief TRUE if call transfer is enabled for the span.
312 * \note Support switch-side transfer (called 2BCT, RLT or other names)
314 unsigned int transfer:1;
315 #if defined(HAVE_PRI_CALL_WAITING)
316 /*! \brief TRUE if we will allow incoming ISDN call waiting calls. */
317 unsigned int allow_call_waiting_calls:1;
318 #endif /* defined(HAVE_PRI_CALL_WAITING) */
319 int dialplan; /*!< Dialing plan */
320 int localdialplan; /*!< Local dialing plan */
321 char internationalprefix[10]; /*!< country access code ('00' for european dialplans) */
322 char nationalprefix[10]; /*!< area access code ('0' for european dialplans) */
323 char localprefix[20]; /*!< area access code + area code ('0'+area code for european dialplans) */
324 char privateprefix[20]; /*!< for private dialplans */
325 char unknownprefix[20]; /*!< for unknown dialplans */
326 long resetinterval; /*!< Interval (in seconds) for resetting unused channels */
327 #if defined(HAVE_PRI_MWI)
328 /*! \brief Active MWI mailboxes */
329 struct sig_pri_mbox mbox[SIG_PRI_MAX_MWI_MAILBOXES];
331 * \brief Comma separated list of mailboxes to indicate MWI.
332 * \note Empty if disabled.
333 * \note Format: mailbox_number[@context]{,mailbox_number[@context]}
334 * \note String is split apart when span is started.
336 char mwi_mailboxes[SIG_PRI_MAX_MWI_MAILBOX_STR];
337 #endif /* defined(HAVE_PRI_MWI) */
338 char msn_list[AST_MAX_EXTENSION]; /*!< Comma separated list of MSNs to handle. Empty if disabled. */
339 char idleext[AST_MAX_EXTENSION]; /*!< Where to idle extra calls */
340 char idlecontext[AST_MAX_CONTEXT]; /*!< What context to use for idle */
341 char idledial[AST_MAX_EXTENSION]; /*!< What to dial before dumping */
342 int minunused; /*!< Min # of channels to keep empty */
343 int minidle; /*!< Min # of "idling" calls to keep active */
344 int nodetype; /*!< Node type */
345 int switchtype; /*!< Type of switch to emulate */
346 int nsf; /*!< Network-Specific Facilities */
347 int trunkgroup; /*!< What our trunkgroup is */
348 #if defined(HAVE_PRI_CCSS)
349 int cc_ptmp_recall_mode; /*!< CC PTMP recall mode. globalRecall(0), specificRecall(1) */
350 int cc_qsig_signaling_link_req; /*!< CC Q.SIG signaling link retention (Party A) release(0), retain(1), do-not-care(2) */
351 int cc_qsig_signaling_link_rsp; /*!< CC Q.SIG signaling link retention (Party B) release(0), retain(1) */
352 #endif /* defined(HAVE_PRI_CCSS) */
353 #if defined(HAVE_PRI_CALL_WAITING)
355 * \brief Number of extra outgoing calls to allow on a span before
356 * considering that span congested.
358 int max_call_waiting_calls;
361 unsigned int hidecallerid:1;
362 unsigned int hidecalleridname:1; /*!< Hide just the name not the number for legacy PBX use */
363 unsigned int immediate:1; /*!< Answer before getting digits? */
364 unsigned int priexclusive:1; /*!< Whether or not to override and use exculsive mode for channel selection */
365 unsigned int priindication_oob:1;
366 unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
367 unsigned int use_callingpres:1; /*!< Whether to use the callingpres the calling switch sends */
368 char context[AST_MAX_CONTEXT];
369 char mohinterpret[MAX_MUSICCLASS];
373 * \brief Number of outstanding call waiting calls.
374 * \note Must be zero to allow new calls from asterisk to
375 * immediately allocate a B channel.
377 int num_call_waiting_calls;
378 #endif /* defined(HAVE_PRI_CALL_WAITING) */
379 int dchanavail[SIG_PRI_NUM_DCHANS]; /*!< Whether each channel is available */
380 int debug; /*!< set to true if to dump PRI event info (tested but never set) */
381 int span; /*!< span number put into user output messages */
382 int resetting; /*!< true if span is being reset/restarted */
383 int resetpos; /*!< current position during a reset (-1 if not started) */
384 int sig; /*!< ISDN signalling type (SIG_PRI, SIG_BRI, SIG_BRI_PTMP, etc...) */
385 int new_chan_seq; /*!< New struct ast_channel sequence number */
387 /* Everything after here is internally set */
388 struct pri *dchans[SIG_PRI_NUM_DCHANS]; /*!< Actual d-channels */
389 struct pri *pri; /*!< Currently active D-channel */
391 * List of private structures of the user of this module for no B channel
392 * interfaces. (hold and call waiting interfaces)
394 void *no_b_chan_iflist;
396 * List of private structures of the user of this module for no B channel
397 * interfaces. (hold and call waiting interfaces)
400 int numchans; /*!< Num of channels we represent */
401 struct sig_pri_chan *pvts[SIG_PRI_MAX_CHANNELS];/*!< Member channel pvt structs */
402 pthread_t master; /*!< Thread of master */
403 ast_mutex_t lock; /*!< libpri access Mutex */
404 time_t lastreset; /*!< time when unused channels were last reset */
405 struct sig_pri_callback *calls;
407 * \brief Congestion device state of the span.
409 * AST_DEVICE_NOT_INUSE - Span does not have all B channels in use.
410 * AST_DEVICE_BUSY - All B channels are in use.
411 * AST_DEVICE_UNAVAILABLE - Span is in alarm.
413 * Device name: DAHDI/I<span>/congestion
415 int congestion_devstate;
416 #if defined(THRESHOLD_DEVSTATE_PLACEHOLDER)
417 /*! \todo An ISDN span threshold device state could be useful in determining how often a span utilization goes over a configurable threshold. */
419 * \brief User threshold device state of the span.
421 * AST_DEVICE_NOT_INUSE - There are no B channels in use.
422 * AST_DEVICE_INUSE - The number of B channels in use is less than
423 * the configured threshold but not zero.
424 * AST_DEVICE_BUSY - The number of B channels in use meets or exceeds
425 * the configured threshold.
426 * AST_DEVICE_UNAVAILABLE - Span is in alarm.
428 * Device name: DAHDI/I<span>/threshold
430 int threshold_devstate;
432 * \brief Number of B channels in use to consider the span in a busy state.
433 * \note Setting the threshold to zero is interpreted as all B channels.
435 int user_busy_threshold;
436 #endif /* defined(THRESHOLD_DEVSTATE_PLACEHOLDER) */
439 void sig_pri_extract_called_num_subaddr(struct sig_pri_chan *p, const char *rdest, char *called, size_t called_buff_size);
440 int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, int timeout, int layer1);
442 int sig_pri_hangup(struct sig_pri_chan *p, struct ast_channel *ast);
444 int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen);
446 int sig_pri_answer(struct sig_pri_chan *p, struct ast_channel *ast);
448 int sig_pri_available(struct sig_pri_chan **pvt, int is_specific_channel);
450 void sig_pri_init_pri(struct sig_pri_pri *pri);
452 /* If return 0, it means this function was able to handle it (pre setup digits). If non zero, the user of this
453 * functions should handle it normally (generate inband DTMF) */
454 int sig_pri_digit_begin(struct sig_pri_chan *pvt, struct ast_channel *ast, char digit);
456 void sig_pri_stop_pri(struct sig_pri_pri *pri);
457 int sig_pri_start_pri(struct sig_pri_pri *pri);
459 void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm);
461 void pri_event_alarm(struct sig_pri_pri *pri, int index, int before_start_pri);
463 void pri_event_noalarm(struct sig_pri_pri *pri, int index, int before_start_pri);
465 struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor, int transfercapability);
467 struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo, int trunkgroup);
468 void sig_pri_chan_delete(struct sig_pri_chan *doomed);
470 int pri_is_up(struct sig_pri_pri *pri);
472 void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_pri *pri);
474 void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_pri *pri);
476 int pri_send_keypad_facility_exec(struct sig_pri_chan *p, const char *digits);
477 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);
479 #if defined(HAVE_PRI_SERVICE_MESSAGES)
480 int pri_maintenance_bservice(struct pri *pri, struct sig_pri_chan *p, int changestatus);
481 #endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
483 void sig_pri_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_pri_chan *pchan);
485 int sig_pri_cc_agent_init(struct ast_cc_agent *agent, struct sig_pri_chan *pvt_chan);
486 int sig_pri_cc_agent_start_offer_timer(struct ast_cc_agent *agent);
487 int sig_pri_cc_agent_stop_offer_timer(struct ast_cc_agent *agent);
488 void sig_pri_cc_agent_req_ack(struct ast_cc_agent *agent);
489 int sig_pri_cc_agent_status_req(struct ast_cc_agent *agent);
490 int sig_pri_cc_agent_stop_ringing(struct ast_cc_agent *agent);
491 int sig_pri_cc_agent_party_b_free(struct ast_cc_agent *agent);
492 int sig_pri_cc_agent_start_monitoring(struct ast_cc_agent *agent);
493 int sig_pri_cc_agent_callee_available(struct ast_cc_agent *agent);
494 void sig_pri_cc_agent_destructor(struct ast_cc_agent *agent);
496 int sig_pri_cc_monitor_req_cc(struct ast_cc_monitor *monitor, int *available_timer_id);
497 int sig_pri_cc_monitor_suspend(struct ast_cc_monitor *monitor);
498 int sig_pri_cc_monitor_unsuspend(struct ast_cc_monitor *monitor);
499 int sig_pri_cc_monitor_status_rsp(struct ast_cc_monitor *monitor, enum ast_device_state devstate);
500 int sig_pri_cc_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, int *sched_id);
501 void sig_pri_cc_monitor_destructor(void *monitor_pvt);
503 int sig_pri_load(const char *cc_type_name);
504 void sig_pri_unload(void);
506 #endif /* _SIG_PRI_H */