127
char *redirectingnum;
130
int redirectingreason;
119
135
/* Internal switch types */
120
#define PRI_SWITCH_GR303_EOC_PATH 10
121
#define PRI_SWITCH_GR303_TMC_SWITCHING 11
136
#define PRI_SWITCH_GR303_EOC_PATH 19
137
#define PRI_SWITCH_GR303_TMC_SWITCHING 20
140
int message; /* What message to send the ADPU in */
141
void (*callback)(void *data); /* Callback function for when response is received */
142
void *data; /* Data to callback */
143
unsigned char apdu[255]; /* ADPU to send */
144
int apdu_len; /* Length of ADPU */
145
int sent; /* Have we been sent already? */
146
struct apdu_event *next; /* Linked list pointer */
149
/* q931_call datastructure */
152
struct pri *pri; /* PRI */
153
int cr; /* Call Reference */
154
int forceinvert; /* Force inversion of call number even if 0 */
156
/* Slotmap specified (bitmap of channels 31/24-1) (Channel Identifier IE) (-1 means not specified) */
158
/* An explicit channel (Channel Identifier IE) (-1 means not specified) */
160
/* An explicit DS1 (-1 means not specified) */
162
/* Whether or not the ds1 is explicitly identified or implicit. If implicit
163
the bchan is on the same span as the current active dchan (NFAS) */
165
/* Channel flags (0 means none retrieved) */
168
int alive; /* Whether or not the call is alive */
169
int acked; /* Whether setup has been acked or not */
170
int sendhangupack; /* Whether or not to send a hangup ack */
171
int proc; /* Whether we've sent a call proceeding / alerting */
173
int ri; /* Restart Indicator (Restart Indicator IE) */
175
/* Bearer Capability */
185
int justsignalling; /* for a signalling-only connection */
187
int progcode; /* Progress coding */
188
int progloc; /* Progress Location */
189
int progress; /* Progress indicator */
190
int progressmask; /* Progress Indicator bitmask */
192
int notify; /* Notification */
194
int causecode; /* Cause Coding */
195
int causeloc; /* Cause Location */
196
int cause; /* Cause of clearing */
198
int peercallstate; /* Call state of peer as reported */
199
int ourcallstate; /* Our call state */
200
int sugcallstate; /* Status call state */
204
int callerpres; /* Caller presentation */
205
char callerani[256]; /* Caller */
207
char callername[256];
209
char digitbuf[64]; /* Buffer for digits that come in KEYPAD_FACILITY */
211
int ani2; /* ANI II */
215
char callednum[256]; /* Called Number */
216
int complete; /* no more digits coming */
217
int newcall; /* if the received message has a new call reference value */
219
int retranstimer; /* Timer for retransmitting DISC */
220
int t308_timedout; /* Whether t308 timed out once */
224
int redirectingreason;
225
char redirectingnum[256]; /* Number of redirecting party */
226
char redirectingname[256]; /* Name of redirecting party */
228
/* Filled in cases of multiple diversions */
231
int origredirectingreason; /* Original reason for redirect (in cases of multiple redirects) */
232
char origcalledname[256]; /* Original name of person being called */
233
char origcallednum[256]; /* Orignal number of person being called */
235
int useruserprotocoldisc;
236
char useruserinfo[256];
237
char callingsubaddr[256]; /* Calling parties sub address */
239
long aoc_units; /* Advice of Charge Units */
241
struct apdu_event *apdus; /* APDU queue for call */
123
244
extern int pri_schedule_event(struct pri *pri, int ms, void (*function)(void *data), void *data);
129
250
extern pri_event *pri_mkerror(struct pri *pri, char *errstr);
131
extern void pri_message(char *fmt, ...);
133
extern void pri_error(char *fmt, ...);
252
extern void pri_message(struct pri *pri, char *fmt, ...);
254
extern void pri_error(struct pri *pri, char *fmt, ...);
256
void libpri_copy_string(char *dst, const char *src, size_t size);