PRI debug message flags when normal PRI debugging is turned on at the command line.
57 {
65};
66
71};
72
74
76
78#if defined(HAVE_PRI_CALL_HOLD)
79
80 SIG_PRI_MOH_SIGNALING_HOLD,
81#endif
82};
83
85
87
89
91#if defined(HAVE_PRI_CALL_HOLD)
92
93 SIG_PRI_MOH_STATE_HOLD_REQ,
94
95 SIG_PRI_MOH_STATE_PEND_UNHOLD,
96
97 SIG_PRI_MOH_STATE_HOLD,
98
99 SIG_PRI_MOH_STATE_RETRIEVE_REQ,
100
101 SIG_PRI_MOH_STATE_PEND_HOLD,
102
103 SIG_PRI_MOH_STATE_RETRIEVE_FAIL,
104#endif
105
106
108};
109
111
113
115
117#if defined(HAVE_PRI_CALL_HOLD)
118
119 SIG_PRI_MOH_EVENT_HOLD_ACK,
120
121 SIG_PRI_MOH_EVENT_HOLD_REJ,
122
123 SIG_PRI_MOH_EVENT_RETRIEVE_ACK,
124
125 SIG_PRI_MOH_EVENT_RETRIEVE_REJ,
126
127 SIG_PRI_MOH_EVENT_REMOTE_RETRIEVE_ACK,
128#endif
129
130
132};
133
134
136
138
140
142
144
146
148
150};
151
153
155
156
157
158
160
161
162
163
164
165
166
167
168
169
171};
172
174struct xfer_rsp_data;
175
177
179
181
183
184
185
186
187
188
190
194
198
199 void (*
const fixup_chans)(
void *old_chan,
void *new_chan);
200
201
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);
208 void (*
const set_dnid)(
void *pvt,
const char *dnid);
209 void (*
const set_rdnis)(
void *pvt,
const char *rdnis);
216 void (*
const dial_digits)(
void *pvt,
const char *dial_string);
217
219
220
221
222
223
224
225
227
228
230
232
234};
235
236
238
239#define SIG_PRI_NUM_DCHANS 4
240#define SIG_PRI_MAX_CHANNELS 672
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
247#define DAHDI_CHAN_MAPPING_PHYSICAL 0
248#define DAHDI_CHAN_MAPPING_LOGICAL 1
249
250
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
258#define SRVST_DBKEY "service-state"
259
260#define SRVST_TYPE_OOS "O"
261
262
263
264
265
266#define SRVST_INITIALIZED 0
267
268#define SRVST_NEAREND (1 << 0)
269
270#define SRVST_FAREND (1 << 1)
271
272#define SRVST_BOTH (SRVST_NEAREND | SRVST_FAREND)
273
274
275static const char dahdi_db[] = "dahdi/registry";
276#endif
277
279
291
292
300
303
304
305
307#if defined(HAVE_PRI_SETUP_KEYPAD)
308
310#endif
311
313
316
317#if defined(HAVE_PRI_AOC_EVENTS)
318 struct pri_subcmd_aoc_e aoc_e;
319 int aoc_s_request_invoke_id;
320 unsigned int aoc_s_request_invoke_id_valid:1;
321 unsigned int waiting_for_aoce:1;
322 unsigned int holding_aoce:1;
323#endif
328
329
330
331
332
333
334
335
336
337
338
342
344#if defined(HAVE_PRI_CALL_WAITING)
345
346 unsigned int is_call_waiting:1;
347#endif
348#if defined(HAVE_PRI_SETUP_ACK_INBAND)
349
350 unsigned int no_dialed_digits:1;
351#endif
352
354
357
358
360
362#if defined(HAVE_PRI_TRANSFER)
363
364 struct xfer_rsp_data *xfer_data;
365#endif
369#if defined(HAVE_PRI_SERVICE_MESSAGES)
370
371 unsigned service_status;
372#endif
373
375#if defined(HAVE_PRI_REVERSE_CHARGE)
376
377
378
379
380
381
382
383 int reverse_charging_indication;
384#endif
385};
386
387#if defined(HAVE_PRI_MWI)
388
389#define SIG_PRI_MAX_MWI_MAILBOXES 8
390
391#define SIG_PRI_MAX_MWI_VM_NUMBER_LEN 10
392
393#define SIG_PRI_MAX_MWI_MBOX_NUMBER_LEN 10
394
395#define SIG_PRI_MAX_MWI_CONTEXT_LEN 10
396
397
398
399
400
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
406
407
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
413
414
415
416
417#define SIG_PRI_MAX_MWI_MAILBOX_STR (SIG_PRI_MAX_MWI_MAILBOXES \
418 * (SIG_PRI_MAX_MWI_VM_MAILBOX + 1))
419
420struct sig_pri_mbox {
421
422
423
424
426
427 const char *uniqueid;
428
430
431 const char *vm_number;
432};
433#endif
434
436
438
440
442};
443
445
452#if defined(HAVE_PRI_L2_PERSISTENCE)
453
454 int l2_persistence;
455#endif
458
459#if defined(HAVE_PRI_AOC_EVENTS)
460 int aoc_passthrough_flag;
461 unsigned int aoce_delayhangup:1;
462#endif
463
464#if defined(HAVE_PRI_SERVICE_MESSAGES)
465 unsigned int enable_service_message_support:1;
466#endif
467#ifdef HAVE_PRI_INBANDDISCONNECT
468 unsigned int inbanddisconnect:1;
469#endif
470#if defined(HAVE_PRI_CALL_HOLD)
471
472 unsigned int hold_disconnect_transfer:1;
473#endif
474
475
476
477
479#if defined(HAVE_PRI_CALL_WAITING)
480
481 unsigned int allow_call_waiting_calls:1;
482#endif
483
485
486
487
488
490
492
494#if defined(HAVE_PRI_MCID)
495
496 unsigned int mcid_send:1;
497#endif
498
500#if defined(HAVE_PRI_DATETIME_SEND)
501
502 int datetime_send;
503#endif
513
516#if defined(HAVE_PRI_DISPLAY_TEXT)
517 unsigned long display_flags_send;
518 unsigned long display_flags_receive;
519#endif
520#if defined(HAVE_PRI_MWI)
521
522 struct sig_pri_mbox
mbox[SIG_PRI_MAX_MWI_MAILBOXES];
523
524
525
526
527
528
529 char mwi_mailboxes[SIG_PRI_MAX_MWI_MAILBOX_STR];
530
531
532
533
534
535
536 char mwi_vm_boxes[SIG_PRI_MAX_MWI_VM_NUMBER_STR];
537
538
539
540
541
542 char mwi_vm_numbers[SIG_PRI_MAX_MWI_VM_NUMBER_STR];
543#endif
544
545
546
547
559#if defined(HAVE_PRI_CCSS)
560 int cc_ptmp_recall_mode;
561 int cc_qsig_signaling_link_req;
562 int cc_qsig_signaling_link_rsp;
563#endif
564#if defined(HAVE_PRI_CALL_WAITING)
565
566
567
568
569 int max_call_waiting_calls;
570 struct {
571 int stripmsd;
572 unsigned int hidecallerid:1;
573 unsigned int hidecalleridname:1;
574 unsigned int immediate:1;
575 unsigned int priexclusive:1;
576 unsigned int priindication_oob:1;
577 unsigned int use_callerid:1;
578 unsigned int use_callingpres:1;
581 } ch_cfg;
582
583
584
585
586
587
588 int num_call_waiting_calls;
589#endif
597
599
600
603
604
605
606
608
609
610
611
618
619
620
621
622
623
624
625
626
628#if defined(THRESHOLD_DEVSTATE_PLACEHOLDER)
629
630
631
632
633
634
635
636
637
638
639
640
641
642 int threshold_devstate;
643
644
645
646
647 int user_busy_threshold;
648#endif
649};
650
653
655
657
659
662
664
665
666
669
672
675
679
683
686
688
691
695
697
700
701#if defined(HAVE_PRI_SERVICE_MESSAGES)
702int pri_maintenance_bservice(
struct pri *pri,
struct sig_pri_chan *p,
int changestatus);
703#endif
704
706#if defined(HAVE_PRI_DISPLAY_TEXT)
707void sig_pri_sendtext(
struct sig_pri_chan *pchan,
const char *text);
708#endif
709
720
727
730
731#endif
static const char * mbox(struct ast_vm_user *vmu, int id)
ast_cc_agent_response_reason
static char mohinterpret[MAX_MUSICCLASS]
#define AST_MAX_EXTENSION
ast_channel_state
ast_channel states
ast_device_state
Device States.
static struct stasis_subscription * sub
Statsd channel stats. Exmaple of how to subscribe to Stasis events.
int sig_pri_is_chan_available(struct sig_pri_chan *pvt)
#define SIG_PRI_MAX_CHANNELS
void sig_pri_unload(void)
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_NOTIFY
struct sig_pri_callback sig_pri_callbacks
@ SIG_PRI_MOH_EVENT_RESET
@ SIG_PRI_MOH_EVENT_UNHOLD
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
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_NO_ACK
Peer may not be sending the expected RESTART ACKNOWLEDGE.
@ SIG_PRI_RESET_ACTIVE
The channel is being RESTARTed.
@ SIG_PRI_RESET_IDLE
The channel is not being RESTARTed.
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_IDLE
@ SIG_PRI_CALL_LEVEL_CONNECT
@ SIG_PRI_CALL_LEVEL_OVERLAP
@ SIG_PRI_CALL_LEVEL_PROCEEDING
@ SIG_PRI_CALL_LEVEL_DEFER_DIAL
@ SIG_PRI_CALL_LEVEL_ALERTING
@ SIG_PRI_CALL_LEVEL_SETUP
@ SIG_PRI_MOH_SIGNALING_MOH
@ SIG_PRI_MOH_SIGNALING_NOTIFY
int sig_pri_cc_agent_callee_available(struct ast_cc_agent *agent)
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)
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)
struct sig_pri_chan * sig_pri_chan_new(void *pvt_data, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup)
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)
int sig_pri_answer(struct sig_pri_chan *p, struct ast_channel *ast)
@ SIG_PRI_TONE_CONGESTION
@ SIG_PRI_TONE_DIALRECALL
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.
Main Channel structure associated with a channel.
unsigned short transfercapability
Structure for mutex and tracking information.
Caller Party information.
In case you didn't read that giant block of text above the mansession_session struct,...
int(*const set_echocanceller)(void *pvt, int enable)
void(*const set_rdnis)(void *pvt, const char *rdnis)
void(*const deadlock_avoidance_private)(void *pvt)
void(*const set_digital)(void *pvt, int is_digital)
void(*const dial_digits)(void *pvt, const char *dial_string)
void(*const unlock_private)(void *pvt)
void(*const init_config)(void *pvt, struct sig_pri_span *pri)
int(*const play_tone)(void *pvt, enum sig_pri_tone tone)
const char *(*const get_orig_dialstring)(void *pvt)
void(*const make_cc_dialstring)(void *pvt, char *buf, size_t buf_size)
void(* destroy_later)(struct sig_pri_span *pri)
int(*const new_nobch_intf)(struct sig_pri_span *pri)
int(*const train_echocanceller)(void *pvt)
void(*const set_callerid)(void *pvt, const struct ast_party_caller *caller)
void(*const set_dnid)(void *pvt, const char *dnid)
void(*const set_outgoing)(void *pvt, int is_outgoing)
void(*const set_dialing)(void *pvt, int is_dialing)
void(*const set_alarm)(void *pvt, int in_alarm)
void(*const ami_channel_event)(void *pvt, struct ast_channel *chan)
Post an AMI B channel association event.
void(*const handle_dchan_exception)(struct sig_pri_span *pri, int index)
void(*const queue_control)(void *pvt, int subclass)
void(*const update_span_devstate)(struct sig_pri_span *pri)
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)
int(*const dsp_reset_and_flush_digits)(void *pvt)
void(*const lock_private)(void *pvt)
void(* module_unref)(void)
void(*const open_media)(void *pvt)
void(*const fixup_chans)(void *old_chan, void *new_chan)
char user_tag[AST_MAX_EXTENSION *2]
User tag for party id's sent from this device driver.
char cid_subaddr[AST_MAX_EXTENSION]
struct sig_pri_span * pri
char cid_num[AST_MAX_EXTENSION]
enum sig_pri_reset_state resetting
Channel reset/restart state.
unsigned int allocated
TRUE when this channel is allocated.
char moh_suggested[MAX_MUSICCLASS]
unsigned int use_callingpres
unsigned int priexclusive
char exten[AST_MAX_EXTENSION]
unsigned int hidecallerid
struct ast_channel * owner
enum sig_pri_call_level call_level
char deferred_digits[AST_MAX_EXTENSION]
unsigned int priindication_oob
unsigned int hidecalleridname
char context[AST_MAX_CONTEXT]
enum sig_pri_moh_state moh_state
char cid_name[AST_MAX_EXTENSION]
unsigned int no_b_channel
TRUE if this interface has no B channel. (call hold and call waiting)
unsigned int use_callerid
char cid_ani[AST_MAX_EXTENSION]
unsigned int alreadyhungup
char mohinterpret[MAX_MUSICCLASS]
struct sig_pri_chan * pvts[SIG_PRI_MAX_CHANNELS]
char idleext[AST_MAX_EXTENSION]
enum sig_pri_moh_signaling moh_signaling
unsigned int inband_on_setup_ack
char msn_list[AST_MAX_EXTENSION]
int discardremoteholdretrieval
unsigned int inband_on_proceeding
int fds[SIG_PRI_NUM_DCHANS]
unsigned int append_msn_to_user_tag
int pritimers[PRI_MAX_TIMERS]
unsigned int layer1_ignored
struct pri * dchans[SIG_PRI_NUM_DCHANS]
unsigned int no_d_channels
char idlecontext[AST_MAX_CONTEXT]
enum sig_pri_colp_signaling colp_send
int dchanavail[SIG_PRI_NUM_DCHANS]
int congestion_devstate
Congestion device state of the span.
struct ast_cc_config_params * cc_params
unsigned int force_restart_unavailable_chans
TRUE if forcing RESTART when receive cause 44 on this span.
unsigned int transfer
TRUE if call transfer is enabled for the span.
char internationalprefix[10]
int dchan_logical_span[SIG_PRI_NUM_DCHANS]
char idledial[AST_MAX_EXTENSION]
char initial_user_tag[AST_MAX_EXTENSION]
Initial user tag for party id's sent from this device driver.