Asterisk - The Open Source Telephony Project GIT-master-f36a736
sig_analog.h
Go to the documentation of this file.
1#ifndef _SIG_ANALOG_H
2#define _SIG_ANALOG_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 analog 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/smdi.h"
31
32#define ANALOG_SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */
33#define ANALOG_MAX_CID 300
34#define READ_SIZE 160
35#define RING_PATTERNS 3
36
37/*! \brief Default time (ms) to detect first digit */
38#define ANALOG_FIRST_DIGIT_TIMEOUT 16000
39/*! \brief Default time (ms) to detect following digits */
40#define ANALOG_INTER_DIGIT_TIMEOUT 8000
41/*! \brief Default time (ms) to wait, in case of ambiguous match */
42#define ANALOG_MATCH_DIGIT_TIMEOUT 3000
43
44/* Signalling types supported */
68};
69
77};
78
101 ANALOG_EVENT_ERROR, /* not a DAHDI event */
102 ANALOG_EVENT_DTMFCID, /* not a DAHDI event */
106};
107
109 ANALOG_SUB_REAL = 0, /*!< Active call */
110 ANALOG_SUB_CALLWAIT, /*!< Call-Waiting call on hold */
111 ANALOG_SUB_THREEWAY, /*!< Three-way call */
112};
113
117};
118
124};
125
131};
132
133enum dialop {
135};
136
137
139 enum dialop op;
140 char dialstr[256];
141};
142
144 /* Unlock the private in the signalling private structure. This is used for three way calling madness. */
145 void (* const unlock_private)(void *pvt);
146 /* Lock the private in the signalling private structure. ... */
147 void (* const lock_private)(void *pvt);
148 /* Do deadlock avoidance for the private signaling structure lock. */
149 void (* const deadlock_avoidance_private)(void *pvt);
150
151 /* Function which is called back to handle any other DTMF events that are received. Called by analog_handle_event. Why is this
152 * important to use, instead of just directly using events received before they are passed into the library? Because sometimes,
153 * (CWCID) the library absorbs DTMF events received. */
154 void (* const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest);
155
156 int (* const get_event)(void *pvt);
157 int (* const wait_event)(void *pvt);
158 int (* const is_off_hook)(void *pvt);
159 int (* const is_dialing)(void *pvt, enum analog_sub sub);
160 /* Start a trunk type signalling protocol (everything except phone ports basically */
161 int (* const start)(void *pvt);
162 int (* const ring)(void *pvt);
163 int (* const flash)(void *pvt);
164 /*! \brief Set channel on hook */
165 int (* const on_hook)(void *pvt);
166 /*! \brief Set channel off hook */
167 int (* const off_hook)(void *pvt);
168 void (* const set_needringing)(void *pvt, int value);
169 /*! \brief Set FXS line polarity to 0=IDLE NZ=REVERSED */
170 void (* const set_polarity)(void *pvt, int value);
171 /*! \brief Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch */
172 void (* const start_polarityswitch)(void *pvt);
173 /*! \brief Switch FXS line polarity, based on answeronpolarityswitch=yes */
174 void (* const answer_polarityswitch)(void *pvt);
175 /*! \brief Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch */
176 void (* const hangup_polarityswitch)(void *pvt);
177 /* We're assuming that we're going to only wink on ANALOG_SUB_REAL - even though in the code there's an argument to the index
178 * function */
179 int (* const wink)(void *pvt, enum analog_sub sub);
180 int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
181 int (* const send_fsk)(void *pvt, struct ast_channel *ast, char *fsk);
182 int (* const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone);
183
184 int (* const set_echocanceller)(void *pvt, int enable);
185 int (* const train_echocanceller)(void *pvt);
186 int (* const dsp_set_digitmode)(void *pvt, enum analog_dsp_digitmode mode);
187 int (* const dsp_reset_and_flush_digits)(void *pvt);
188 int (* const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller);
189 /* Returns 0 if CID received. Returns 1 if event received, and -1 if error. name and num are size ANALOG_MAX_CID */
190 int (* const get_callerid)(void *pvt, char *name, char *num, enum analog_event *ev, size_t timeout);
191 /* Start CID detection */
192 int (* const start_cid_detect)(void *pvt, int cid_signalling);
193 /* Stop CID detection */
194 int (* const stop_cid_detect)(void *pvt);
195
196 /* Play the CAS callwait tone on the REAL sub, then repeat after 10 seconds, and then stop */
197 int (* const callwait)(void *pvt);
198 /* Stop playing any CAS call waiting announcement tones that might be running on the REAL sub */
199 int (* const stop_callwait)(void *pvt);
200
201 /* Bearer control related (non signalling) callbacks */
202 int (* const allocate_sub)(void *pvt, enum analog_sub sub);
203 int (* const unallocate_sub)(void *pvt, enum analog_sub sub);
204 /*! This function is for swapping of the owners with the underlying subs. Typically it means you need to change the fds
205 * of the new owner to be the fds of the sub specified, for each of the two subs given */
206 void (* const swap_subs)(void *pvt, enum analog_sub a, struct ast_channel *new_a_owner, enum analog_sub b, struct ast_channel *new_b_owner);
207 struct ast_channel * (* const new_ast_channel)(void *pvt, int state, int startpbx, enum analog_sub sub, const struct ast_channel *requestor);
208
209 /* Add the given sub to a conference */
210 int (* const conf_add)(void *pvt, enum analog_sub sub);
211 /* Delete the given sub from any conference that might be running on the channels */
212 int (* const conf_del)(void *pvt, enum analog_sub sub);
213
214 /* If you would like to do any optimizations after the conference members have been added and removed,
215 * you can do so here */
216 int (* const complete_conference_update)(void *pvt, int needconf);
217
218 /* This is called when there are no more subchannels on the given private that are left up,
219 * for any cleanup or whatever else you would like to do. Called from analog_hangup() */
220 void (* const all_subchannels_hungup)(void *pvt);
221
222 int (* const has_voicemail)(void *pvt);
223 int (* const check_for_conference)(void *pvt);
224 void (* const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent);
225
226 /* callbacks for increasing and decreasing ss_thread_count, will handle locking and condition signal */
227 void (* const increase_ss_count)(void);
228 void (* const decrease_ss_count)(void);
229
230 int (* const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata);
231 /* Sets the specified sub-channel in and out of signed linear mode, returns the value that was overwritten */
232 int (* const set_linear_mode)(void *pvt, enum analog_sub sub, int linear_mode);
233 void (* const set_inthreeway)(void *pvt, enum analog_sub sub, int inthreeway);
234 void (* const get_and_handle_alarms)(void *pvt);
235 void * (* const get_sigpvt_bridged_channel)(struct ast_channel *chan);
236 int (* const get_sub_fd)(void *pvt, enum analog_sub sub);
237 void (* const set_cadence)(void *pvt, int *cidrings, struct ast_channel *chan);
238 void (* const set_alarm)(void *pvt, int in_alarm);
239 void (* const set_dialing)(void *pvt, int is_dialing);
240 void (* const set_outgoing)(void *pvt, int is_outgoing);
241 void (* const set_ringtimeout)(void *pvt, int ringt);
242 void (* const set_waitingfordt)(void *pvt, struct ast_channel *ast);
243 int (* const check_waitingfordt)(void *pvt);
244 void (* const set_confirmanswer)(void *pvt, int flag);
245 int (* const check_confirmanswer)(void *pvt);
246 void (* const set_callwaiting)(void *pvt, int callwaiting_enable);
247 void (* const cancel_cidspill)(void *pvt);
248 int (* const confmute)(void *pvt, int mute);
249 void (* const set_pulsedial)(void *pvt, int flag);
250 void (* const set_new_owner)(void *pvt, struct ast_channel *new_owner);
251
252 const char *(* const get_orig_dialstring)(void *pvt);
253 int (* const have_progressdetect)(void *pvt);
254 int (* const get_firstdigit_timeout)(void *pvt);
255 int (* const get_interdigit_timeout)(void *pvt);
256 int (* const get_matchdigit_timeout)(void *pvt);
257};
258
259/*! Global analog callbacks to the upper layer. */
261
262
265 struct ast_frame f; /*!< One frame for each channel. How did this ever work before? */
266 unsigned int inthreeway:1;
267 /* Have we allocated a subchannel yet or not */
268 unsigned int allocd:1;
269};
270
272 /* Analog signalling type used in this private */
274 /* To contain the private structure passed into the channel callbacks */
275 void *chan_pvt;
276 /* All members after this are going to be transient, and most will probably change */
277 struct ast_channel *owner; /*!< Our current active owner (if applicable) */
278
279 struct analog_subchannel subs[3]; /*!< Sub-channels */
281 int onhooktime; /*< Time the interface went on-hook. */
282 int fxsoffhookstate; /*< TRUE if the FXS port is off-hook */
283 /*! \brief -1 = unknown, 0 = no messages, 1 = new messages available */
285
286 /* XXX: Option Variables - Set by allocator of private structure */
287 unsigned int ani_info_digits:8; /* Older switches use 1 INFO digit, newer switches use 2 */
288 unsigned int ani_timeout:16; /* Time in ms before we give up waiting for ANI spill */
289 unsigned int ani_wink_time:16; /* Safe wait time before we wink to start ANI spill */
290
292 unsigned int calledsubscriberheld:1; /*!< TRUE if a single incoming call can hold an FXS channel */
293 unsigned int callreturn:1;
294 unsigned int cancallforward:1;
295 unsigned int canpark:1;
296 unsigned int dahditrcallerid:1; /*!< should we use the callerid from incoming call on dahdi transfer or not */
298 unsigned int immediate:1;
299 unsigned int immediatering:1; /*!< TRUE if ringing should be provided for immediate execution */
300 unsigned int permcallwaiting:1; /*!< TRUE if call waiting is enabled. (Configured option) */
301 unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */
302 unsigned int pulse:1;
303 unsigned int threewaycalling:1;
304 unsigned int threewaysilenthold:1; /*!< Whether to time out a three-way dial tone to silence */
305 unsigned int transfer:1;
306 unsigned int transfertobusy:1; /*!< allow flash-transfers to busy channels */
307 unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
309 unsigned int callwaitingcallerid:1; /*!< TRUE if send caller ID for Call Waiting */
310 /*!
311 * \brief TRUE if SMDI (Simplified Message Desk Interface) is enabled
312 */
313 unsigned int use_smdi:1;
314 /*! \brief The SMDI interface to get SMDI messages from. */
316
317 /* Not used for anything but log messages. Could be just the TCID */
318 int channel; /*!< Channel Number */
319
321 enum analog_dialmode dialmode; /*!< Which of pulse and/or tone dialing to support */
323 int cid_signalling; /*!< Asterisk callerid type we're using */
330
331
332 /* XXX: All variables after this are internal */
333 unsigned int callwaiting:1; /*!< TRUE if call waiting is enabled. (Active option) */
334 unsigned int cshactive:1; /*!< TRUE if FXS channel is currently held by an incoming call */
335 unsigned int dialednone:1;
336 unsigned int dialing:1; /*!< TRUE if in the process of dialing digits or sending something */
337 unsigned int dnd:1; /*!< TRUE if Do-Not-Disturb is enabled. */
338 unsigned int echobreak:1;
339 unsigned int hidecallerid:1;
340 unsigned int outgoing:1;
341 unsigned int inalarm:1;
342 /*!
343 * \brief TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
344 * \note
345 * After CAS is sent, the call waiting caller id will be sent if the phone
346 * gives a positive reply.
347 */
348 unsigned int callwaitcas:1;
349 unsigned int call_qualifier:1; /*!< Call qualifier delivery */
350
356 int redirecting_reason; /*!< Redirecting reason */
357
358 int cidrings; /*!< Which ring to deliver CID on */
359 char echorest[20];
361 struct timeval polaritydelaytv;
362 char dialdest[256];
363 time_t guardtime; /*!< Must wait this much time before using for new call */
364 struct timeval flashtime; /*!< Last flash-hook time */
365 int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
366 char finaldial[64];
367 char *origcid_num; /*!< malloced original callerid */
368 char *origcid_name; /*!< malloced original callerid */
370
371 /* Ast channel to pass to __ss_analog_thread */
373
374 /* All variables after this are definitely going to be audited */
375 int ringt;
377};
378
379struct analog_pvt *analog_new(enum analog_sigtype signallingtype, void *private_data);
380void analog_delete(struct analog_pvt *doomed);
381
382void analog_free(struct analog_pvt *p);
383
384int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout);
385
386int analog_hangup(struct analog_pvt *p, struct ast_channel *ast);
387
388int analog_answer(struct analog_pvt *p, struct ast_channel *ast);
389
390struct ast_frame *analog_exception(struct analog_pvt *p, struct ast_channel *ast);
391
392struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor);
393
394int analog_available(struct analog_pvt *p);
395
396void *analog_handle_init_event(struct analog_pvt *i, int event);
397
399
400void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest);
401
403
404const char *analog_cidstart_to_str(enum analog_cid_start cid_start);
405
407
409
410unsigned int analog_str_to_cidtype(const char *name);
411
412const char *analog_cidtype_to_str(unsigned int cid_type);
413
414int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast);
415
416int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp);
417
418int analog_dnd(struct analog_pvt *p, int flag);
419
420#endif /* _SIG_ANSLOG_H */
static int cidrings[NUM_CADENCE_MAX]
cidrings says in which pause to transmit the cid information, where the first pause is 1,...
Definition: chan_dahdi.c:701
General Asterisk PBX channel definitions.
#define AST_MAX_EXTENSION
Definition: channel.h:134
#define MAX_MUSICCLASS
Definition: channel.h:175
long int flag
Definition: f2c.h:83
static const char name[]
Definition: format_mp3.c:68
Asterisk internal frame definitions.
struct stasis_forward * sub
Definition: res_corosync.c:240
enum analog_sigtype sigtype
Definition: sig_analog.c:69
unsigned int cid_type
Definition: sig_analog.c:96
analog_dsp_digitmode
Definition: sig_analog.h:114
@ ANALOG_DIGITMODE_DTMF
Definition: sig_analog.h:115
@ ANALOG_DIGITMODE_MF
Definition: sig_analog.h:116
int analog_hangup(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:1277
int analog_available(struct analog_pvt *p)
Definition: sig_analog.c:793
struct ast_frame * analog_exception(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:3678
struct analog_callback analog_callbacks
Definition: chan_dahdi.c:3616
int analog_dnd(struct analog_pvt *p, int flag)
Definition: sig_analog.c:4170
analog_dialmode
Definition: sig_analog.h:119
@ ANALOG_DIALMODE_DTMF
Definition: sig_analog.h:122
@ ANALOG_DIALMODE_PULSE
Definition: sig_analog.h:121
@ ANALOG_DIALMODE_NONE
Definition: sig_analog.h:123
@ ANALOG_DIALMODE_BOTH
Definition: sig_analog.h:120
int analog_config_complete(struct analog_pvt *p)
Definition: sig_analog.c:4114
int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout)
Definition: sig_analog.c:990
void analog_delete(struct analog_pvt *doomed)
Delete the analog private structure.
Definition: sig_analog.c:4109
struct analog_pvt * analog_new(enum analog_sigtype signallingtype, void *private_data)
Definition: sig_analog.c:4081
const char * analog_cidtype_to_str(unsigned int cid_type)
Definition: sig_analog.c:149
void analog_free(struct analog_pvt *p)
Definition: sig_analog.c:4126
void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest)
Definition: sig_analog.c:1593
int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp)
Definition: sig_analog.c:4132
analog_event
Definition: sig_analog.h:79
@ ANALOG_EVENT_NONE
Definition: sig_analog.h:80
@ ANALOG_EVENT_HOOKCOMPLETE
Definition: sig_analog.h:89
@ ANALOG_EVENT_DTMFDOWN
Definition: sig_analog.h:104
@ ANALOG_EVENT_RINGEROFF
Definition: sig_analog.h:88
@ ANALOG_EVENT_PULSE_START
Definition: sig_analog.h:90
@ ANALOG_EVENT_DTMFCID
Definition: sig_analog.h:102
@ ANALOG_EVENT_TX_CED_DETECTED
Definition: sig_analog.h:97
@ ANALOG_EVENT_NEONMWI_ACTIVE
Definition: sig_analog.h:95
@ ANALOG_EVENT_RINGBEGIN
Definition: sig_analog.h:92
@ ANALOG_EVENT_ONHOOK
Definition: sig_analog.h:81
@ ANALOG_EVENT_EC_DISABLED
Definition: sig_analog.h:93
@ ANALOG_EVENT_WINKFLASH
Definition: sig_analog.h:83
@ ANALOG_EVENT_ERROR
Definition: sig_analog.h:101
@ ANALOG_EVENT_PULSEDIGIT
Definition: sig_analog.h:103
@ ANALOG_EVENT_RINGERON
Definition: sig_analog.h:87
@ ANALOG_EVENT_RX_CED_DETECTED
Definition: sig_analog.h:98
@ ANALOG_EVENT_ALARM
Definition: sig_analog.h:84
@ ANALOG_EVENT_DIALCOMPLETE
Definition: sig_analog.h:86
@ ANALOG_EVENT_EC_NLP_ENABLED
Definition: sig_analog.h:100
@ ANALOG_EVENT_POLARITY
Definition: sig_analog.h:91
@ ANALOG_EVENT_NEONMWI_INACTIVE
Definition: sig_analog.h:96
@ ANALOG_EVENT_DTMFUP
Definition: sig_analog.h:105
@ ANALOG_EVENT_EC_NLP_DISABLED
Definition: sig_analog.h:99
@ ANALOG_EVENT_RINGOFFHOOK
Definition: sig_analog.h:82
@ ANALOG_EVENT_REMOVED
Definition: sig_analog.h:94
@ ANALOG_EVENT_NOALARM
Definition: sig_analog.h:85
dialop
Definition: sig_analog.h:133
@ ANALOG_DIAL_OP_REPLACE
Definition: sig_analog.h:134
int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:2757
analog_sub
Definition: sig_analog.h:108
@ ANALOG_SUB_THREEWAY
Definition: sig_analog.h:111
@ ANALOG_SUB_REAL
Definition: sig_analog.h:109
@ ANALOG_SUB_CALLWAIT
Definition: sig_analog.h:110
const char * analog_cidstart_to_str(enum analog_cid_start cid_start)
Definition: sig_analog.c:249
struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor)
Definition: sig_analog.c:770
void * analog_handle_init_event(struct analog_pvt *i, int event)
Definition: sig_analog.c:3798
unsigned int analog_str_to_cidtype(const char *name)
Definition: sig_analog.c:136
int analog_answer(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:1490
const char * analog_sigtype_to_str(enum analog_sigtype sigtype)
Definition: sig_analog.c:123
analog_sigtype
Definition: sig_analog.h:45
@ ANALOG_SIG_FEATD
Definition: sig_analog.h:56
@ ANALOG_SIG_FEATDMF_TA
Definition: sig_analog.h:66
@ ANALOG_SIG_FGC_CAMAMF
Definition: sig_analog.h:60
@ ANALOG_SIG_FXOLS
Definition: sig_analog.h:47
@ ANALOG_SIG_FEATDMF
Definition: sig_analog.h:57
@ ANALOG_SIG_EM_E1
Definition: sig_analog.h:55
@ ANALOG_SIG_EMWINK
Definition: sig_analog.h:53
@ ANALOG_SIG_FXOKS
Definition: sig_analog.h:48
@ ANALOG_SIG_SF
Definition: sig_analog.h:63
@ ANALOG_SIG_FGC_CAMA
Definition: sig_analog.h:59
@ ANALOG_SIG_FXSLS
Definition: sig_analog.h:50
@ ANALOG_SIG_EM
Definition: sig_analog.h:54
@ ANALOG_SIG_FXOGS
Definition: sig_analog.h:49
@ ANALOG_SIG_SF_FEATB
Definition: sig_analog.h:67
@ ANALOG_SIG_NONE
Definition: sig_analog.h:46
@ ANALOG_SIG_FXSGS
Definition: sig_analog.h:52
@ ANALOG_SIG_SF_FEATDMF
Definition: sig_analog.h:65
@ ANALOG_SIG_SFWINK
Definition: sig_analog.h:62
@ ANALOG_SIG_E911
Definition: sig_analog.h:58
@ ANALOG_SIG_FEATB
Definition: sig_analog.h:61
@ ANALOG_SIG_SF_FEATD
Definition: sig_analog.h:64
@ ANALOG_SIG_FXSKS
Definition: sig_analog.h:51
analog_tone
Definition: sig_analog.h:70
@ ANALOG_TONE_CONGESTION
Definition: sig_analog.h:73
@ ANALOG_TONE_INFO
Definition: sig_analog.h:76
@ ANALOG_TONE_DIALTONE
Definition: sig_analog.h:74
@ ANALOG_TONE_DIALRECALL
Definition: sig_analog.h:75
@ ANALOG_TONE_STUTTER
Definition: sig_analog.h:72
@ ANALOG_TONE_RINGTONE
Definition: sig_analog.h:71
enum analog_sigtype analog_str_to_sigtype(const char *name)
Definition: sig_analog.c:110
enum analog_cid_start analog_str_to_cidstart(const char *value)
Definition: sig_analog.c:234
analog_cid_start
Definition: sig_analog.h:126
@ ANALOG_CID_START_RING
Definition: sig_analog.h:129
@ ANALOG_CID_START_DTMF_NOALERT
Definition: sig_analog.h:130
@ ANALOG_CID_START_POLARITY
Definition: sig_analog.h:127
@ ANALOG_CID_START_POLARITY_IN
Definition: sig_analog.h:128
SMDI support for Asterisk.
int(*const stop_cid_detect)(void *pvt)
Definition: sig_analog.h:194
int(*const set_echocanceller)(void *pvt, int enable)
Definition: sig_analog.h:184
void(*const deadlock_avoidance_private)(void *pvt)
Definition: sig_analog.h:149
int(*const unallocate_sub)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:203
int(*const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata)
Definition: sig_analog.h:230
int(*const stop_callwait)(void *pvt)
Definition: sig_analog.h:199
void(*const set_confirmanswer)(void *pvt, int flag)
Definition: sig_analog.h:244
void(*const set_callwaiting)(void *pvt, int callwaiting_enable)
Definition: sig_analog.h:246
void(*const unlock_private)(void *pvt)
Definition: sig_analog.h:145
int(*const check_confirmanswer)(void *pvt)
Definition: sig_analog.h:245
const char *(*const get_orig_dialstring)(void *pvt)
Definition: sig_analog.h:252
int(*const send_fsk)(void *pvt, struct ast_channel *ast, char *fsk)
Definition: sig_analog.h:181
void(*const set_cadence)(void *pvt, int *cidrings, struct ast_channel *chan)
Definition: sig_analog.h:237
int(*const have_progressdetect)(void *pvt)
Definition: sig_analog.h:253
void(*const hangup_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch.
Definition: sig_analog.h:176
int(*const is_off_hook)(void *pvt)
Definition: sig_analog.h:158
void(*const decrease_ss_count)(void)
Definition: sig_analog.h:228
int(*const is_dialing)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:159
int(*const get_matchdigit_timeout)(void *pvt)
Definition: sig_analog.h:256
int(*const train_echocanceller)(void *pvt)
Definition: sig_analog.h:185
void(*const set_pulsedial)(void *pvt, int flag)
Definition: sig_analog.h:249
int(*const check_waitingfordt)(void *pvt)
Definition: sig_analog.h:243
int(*const get_callerid)(void *pvt, char *name, char *num, enum analog_event *ev, size_t timeout)
Definition: sig_analog.h:190
int(*const conf_add)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:210
int(*const ring)(void *pvt)
Definition: sig_analog.h:162
void(*const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest)
Definition: sig_analog.h:154
int(*const flash)(void *pvt)
Definition: sig_analog.h:163
int(*const start_cid_detect)(void *pvt, int cid_signalling)
Definition: sig_analog.h:192
void(*const swap_subs)(void *pvt, enum analog_sub a, struct ast_channel *new_a_owner, enum analog_sub b, struct ast_channel *new_b_owner)
Definition: sig_analog.h:206
int(*const confmute)(void *pvt, int mute)
Definition: sig_analog.h:248
void(*const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent)
Definition: sig_analog.h:224
int(*const set_linear_mode)(void *pvt, enum analog_sub sub, int linear_mode)
Definition: sig_analog.h:232
int(*const complete_conference_update)(void *pvt, int needconf)
Definition: sig_analog.h:216
void(*const set_outgoing)(void *pvt, int is_outgoing)
Definition: sig_analog.h:240
int(*const on_hook)(void *pvt)
Set channel on hook.
Definition: sig_analog.h:165
int(*const get_firstdigit_timeout)(void *pvt)
Definition: sig_analog.h:254
void(*const set_dialing)(void *pvt, int is_dialing)
Definition: sig_analog.h:239
void(*const answer_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch=yes.
Definition: sig_analog.h:174
int(*const dsp_set_digitmode)(void *pvt, enum analog_dsp_digitmode mode)
Definition: sig_analog.h:186
void(*const set_alarm)(void *pvt, int in_alarm)
Definition: sig_analog.h:238
void(*const set_new_owner)(void *pvt, struct ast_channel *new_owner)
Definition: sig_analog.h:250
int(*const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller)
Definition: sig_analog.h:188
void(*const set_inthreeway)(void *pvt, enum analog_sub sub, int inthreeway)
Definition: sig_analog.h:233
void(*const increase_ss_count)(void)
Definition: sig_analog.h:227
void(*const cancel_cidspill)(void *pvt)
Definition: sig_analog.h:247
int(*const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop)
Definition: sig_analog.h:180
int(*const conf_del)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:212
int(*const has_voicemail)(void *pvt)
Definition: sig_analog.h:222
int(*const check_for_conference)(void *pvt)
Definition: sig_analog.h:223
int(*const allocate_sub)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:202
int(*const wink)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:179
int(*const off_hook)(void *pvt)
Set channel off hook.
Definition: sig_analog.h:167
int(*const dsp_reset_and_flush_digits)(void *pvt)
Definition: sig_analog.h:187
void(*const set_ringtimeout)(void *pvt, int ringt)
Definition: sig_analog.h:241
void(*const lock_private)(void *pvt)
Definition: sig_analog.h:147
void(*const all_subchannels_hungup)(void *pvt)
Definition: sig_analog.h:220
int(*const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone)
Definition: sig_analog.h:182
void(*const get_and_handle_alarms)(void *pvt)
Definition: sig_analog.h:234
int(*const start)(void *pvt)
Definition: sig_analog.h:161
int(*const callwait)(void *pvt)
Definition: sig_analog.h:197
void(*const set_waitingfordt)(void *pvt, struct ast_channel *ast)
Definition: sig_analog.h:242
void(*const start_polarityswitch)(void *pvt)
Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch.
Definition: sig_analog.h:172
struct ast_channel *(*const new_ast_channel)(void *pvt, int state, int startpbx, enum analog_sub sub, const struct ast_channel *requestor)
Definition: sig_analog.h:207
int(*const get_event)(void *pvt)
Definition: sig_analog.h:156
void(*const set_needringing)(void *pvt, int value)
Definition: sig_analog.h:168
void *(*const get_sigpvt_bridged_channel)(struct ast_channel *chan)
Definition: sig_analog.h:235
void(*const set_polarity)(void *pvt, int value)
Set FXS line polarity to 0=IDLE NZ=REVERSED.
Definition: sig_analog.h:170
int(*const get_sub_fd)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:236
int(*const get_interdigit_timeout)(void *pvt)
Definition: sig_analog.h:255
int(*const wait_event)(void *pvt)
Definition: sig_analog.h:157
char dialdest[256]
Definition: sig_analog.h:362
unsigned int immediate
Definition: sig_analog.h:298
unsigned int immediatering
Definition: sig_analog.h:299
unsigned int threewaysilenthold
Definition: sig_analog.h:304
unsigned int permcallwaiting
Definition: sig_analog.h:300
unsigned int canpark
Definition: sig_analog.h:295
void * chan_pvt
Definition: sig_analog.h:275
unsigned int dnd
Definition: sig_analog.h:337
unsigned int dahditrcallerid
Definition: sig_analog.h:296
struct analog_dialoperation dop
Definition: sig_analog.h:280
int polarityonanswerdelay
Definition: sig_analog.h:324
char cid_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:328
int redirecting_reason
Definition: sig_analog.h:356
unsigned int permhidecallerid
Definition: sig_analog.h:301
char * origcid_name
Definition: sig_analog.h:368
struct timeval flashtime
Definition: sig_analog.h:364
unsigned int outgoing
Definition: sig_analog.h:340
int whichwink
Definition: sig_analog.h:365
unsigned int callwaitingcallerid
Definition: sig_analog.h:309
char * origcid_num
Definition: sig_analog.h:367
unsigned int ani_wink_time
Definition: sig_analog.h:289
enum analog_sigtype outsigmod
Definition: sig_analog.h:320
unsigned int usedistinctiveringdetection
Definition: sig_analog.h:308
unsigned int answeronpolarityswitch
Definition: sig_analog.h:291
unsigned int threewaycalling
Definition: sig_analog.h:303
unsigned int pulse
Definition: sig_analog.h:302
int echotraining
Definition: sig_analog.h:322
char callwait_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:351
int msgstate
-1 = unknown, 0 = no messages, 1 = new messages available
Definition: sig_analog.h:284
int onhooktime
Definition: sig_analog.h:281
unsigned int callwaiting
Definition: sig_analog.h:333
time_t guardtime
Definition: sig_analog.h:363
struct timeval polaritydelaytv
Definition: sig_analog.h:361
unsigned int hanguponpolarityswitch
Definition: sig_analog.h:297
int cidrings
Definition: sig_analog.h:358
char call_forward[AST_MAX_EXTENSION]
Definition: sig_analog.h:369
enum analog_cid_start cid_start
Definition: sig_analog.h:326
unsigned int callwaitcas
TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
Definition: sig_analog.h:348
unsigned int hidecallerid
Definition: sig_analog.h:339
unsigned int echobreak
Definition: sig_analog.h:338
unsigned int cshactive
Definition: sig_analog.h:334
unsigned int callreturn
Definition: sig_analog.h:293
struct ast_channel * owner
Definition: sig_analog.h:277
unsigned int use_smdi
TRUE if SMDI (Simplified Message Desk Interface) is enabled.
Definition: sig_analog.h:313
char lastcid_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:354
enum analog_sigtype sig
Definition: sig_analog.h:273
unsigned int dialednone
Definition: sig_analog.h:335
unsigned int call_qualifier
Definition: sig_analog.h:349
char echorest[20]
Definition: sig_analog.h:359
unsigned int ani_timeout
Definition: sig_analog.h:288
int ringt_base
Definition: sig_analog.h:376
int fxsoffhookstate
Definition: sig_analog.h:282
unsigned int ani_info_digits
Definition: sig_analog.h:287
enum analog_dialmode dialmode
Definition: sig_analog.h:321
unsigned int cancallforward
Definition: sig_analog.h:294
char lastcid_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:353
struct analog_subchannel subs[3]
Definition: sig_analog.h:279
int cid_signalling
Definition: sig_analog.h:323
char finaldial[64]
Definition: sig_analog.h:366
unsigned int transfer
Definition: sig_analog.h:305
unsigned int transfertobusy
Definition: sig_analog.h:306
unsigned int inalarm
Definition: sig_analog.h:341
char cid_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:329
int stripmsd
Definition: sig_analog.h:325
unsigned int calledsubscriberheld
Definition: sig_analog.h:292
char mohsuggest[MAX_MUSICCLASS]
Definition: sig_analog.h:327
unsigned int use_callerid
Definition: sig_analog.h:307
int polarity
Definition: sig_analog.h:360
struct ast_channel * ss_astchan
Definition: sig_analog.h:372
unsigned int dialing
Definition: sig_analog.h:336
char callwait_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:352
struct ast_smdi_interface * smdi_iface
The SMDI interface to get SMDI messages from.
Definition: sig_analog.h:315
struct ast_party_caller caller
Definition: sig_analog.h:355
unsigned int allocd
Definition: sig_analog.h:268
struct ast_frame f
Definition: sig_analog.h:265
unsigned int inthreeway
Definition: sig_analog.h:266
struct ast_channel * owner
Definition: sig_analog.h:264
Main Channel structure associated with a channel.
Data structure associated with a single frame of data.
Caller Party information.
Definition: channel.h:420
Definition: astman.c:222
int value
Definition: syslog.c:37
static struct test_val b
static struct test_val a