Asterisk - The Open Source Telephony Project  GIT-master-a24979a
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 <>
9  *
10  * See 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  */
21 /*! \file
22  *
23  * \brief Interface header for analog signaling module
24  *
25  * \author Matthew Fredrickson <>
26  */
28 #include "asterisk/channel.h"
29 #include "asterisk/frame.h"
30 #include "asterisk/smdi.h"
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
37 /*! \brief Default time (ms) to detect first digit */
39 /*! \brief Default time (ms) to detect following digits */
41 /*! \brief Default time (ms) to wait, in case of ambiguous match */
44 /* Signalling types supported */
68 };
77 };
101  ANALOG_EVENT_ERROR, /* not a DAHDI event */
102  ANALOG_EVENT_DTMFCID, /* not a DAHDI event */
105  ANALOG_EVENT_DTMFUP = (1 << 18),
106 };
109  ANALOG_SUB_REAL = 0, /*!< Active call */
110  ANALOG_SUB_CALLWAIT, /*!< Call-Waiting call on hold */
111  ANALOG_SUB_THREEWAY, /*!< Three-way call */
112 };
117 };
124 };
126 enum dialop {
128 };
132  enum dialop op;
133  char dialstr[256];
134 };
137  /* Unlock the private in the signalling private structure. This is used for three way calling madness. */
138  void (* const unlock_private)(void *pvt);
139  /* Lock the private in the signalling private structure. ... */
140  void (* const lock_private)(void *pvt);
141  /* Do deadlock avoidance for the private signaling structure lock. */
142  void (* const deadlock_avoidance_private)(void *pvt);
144  /* Function which is called back to handle any other DTMF events that are received. Called by analog_handle_event. Why is this
145  * important to use, instead of just directly using events received before they are passed into the library? Because sometimes,
146  * (CWCID) the library absorbs DTMF events received. */
147  void (* const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest);
149  int (* const get_event)(void *pvt);
150  int (* const wait_event)(void *pvt);
151  int (* const is_off_hook)(void *pvt);
152  int (* const is_dialing)(void *pvt, enum analog_sub sub);
153  /* Start a trunk type signalling protocol (everything except phone ports basically */
154  int (* const start)(void *pvt);
155  int (* const ring)(void *pvt);
156  int (* const flash)(void *pvt);
157  /*! \brief Set channel on hook */
158  int (* const on_hook)(void *pvt);
159  /*! \brief Set channel off hook */
160  int (* const off_hook)(void *pvt);
161  void (* const set_needringing)(void *pvt, int value);
162  /*! \brief Set FXS line polarity to 0=IDLE NZ=REVERSED */
163  void (* const set_polarity)(void *pvt, int value);
164  /*! \brief Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch */
165  void (* const start_polarityswitch)(void *pvt);
166  /*! \brief Switch FXS line polarity, based on answeronpolarityswitch=yes */
167  void (* const answer_polarityswitch)(void *pvt);
168  /*! \brief Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch */
169  void (* const hangup_polarityswitch)(void *pvt);
170  /* 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
171  * function */
172  int (* const wink)(void *pvt, enum analog_sub sub);
173  int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
174  int (* const send_fsk)(void *pvt, struct ast_channel *ast, char *fsk);
175  int (* const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone);
177  int (* const set_echocanceller)(void *pvt, int enable);
178  int (* const train_echocanceller)(void *pvt);
179  int (* const dsp_set_digitmode)(void *pvt, enum analog_dsp_digitmode mode);
180  int (* const dsp_reset_and_flush_digits)(void *pvt);
181  int (* const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller);
182  /* Returns 0 if CID received. Returns 1 if event received, and -1 if error. name and num are size ANALOG_MAX_CID */
183  int (* const get_callerid)(void *pvt, char *name, char *num, enum analog_event *ev, size_t timeout);
184  /* Start CID detection */
185  int (* const start_cid_detect)(void *pvt, int cid_signalling);
186  /* Stop CID detection */
187  int (* const stop_cid_detect)(void *pvt);
189  /* Play the CAS callwait tone on the REAL sub, then repeat after 10 seconds, and then stop */
190  int (* const callwait)(void *pvt);
191  /* Stop playing any CAS call waiting announcement tones that might be running on the REAL sub */
192  int (* const stop_callwait)(void *pvt);
194  /* Bearer control related (non signalling) callbacks */
195  int (* const allocate_sub)(void *pvt, enum analog_sub sub);
196  int (* const unallocate_sub)(void *pvt, enum analog_sub sub);
197  /*! This function is for swapping of the owners with the underlying subs. Typically it means you need to change the fds
198  * of the new owner to be the fds of the sub specified, for each of the two subs given */
199  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);
200  struct ast_channel * (* const new_ast_channel)(void *pvt, int state, int startpbx, enum analog_sub sub, const struct ast_channel *requestor);
202  /* Add the given sub to a conference */
203  int (* const conf_add)(void *pvt, enum analog_sub sub);
204  /* Delete the given sub from any conference that might be running on the channels */
205  int (* const conf_del)(void *pvt, enum analog_sub sub);
207  /* If you would like to do any optimizations after the conference members have been added and removed,
208  * you can do so here */
209  int (* const complete_conference_update)(void *pvt, int needconf);
211  /* This is called when there are no more subchannels on the given private that are left up,
212  * for any cleanup or whatever else you would like to do. Called from analog_hangup() */
213  void (* const all_subchannels_hungup)(void *pvt);
215  int (* const has_voicemail)(void *pvt);
216  int (* const check_for_conference)(void *pvt);
217  void (* const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent);
219  /* callbacks for increasing and decreasing ss_thread_count, will handle locking and condition signal */
220  void (* const increase_ss_count)(void);
221  void (* const decrease_ss_count)(void);
223  int (* const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata);
224  /* Sets the specified sub-channel in and out of signed linear mode, returns the value that was overwritten */
225  int (* const set_linear_mode)(void *pvt, enum analog_sub sub, int linear_mode);
226  void (* const set_inthreeway)(void *pvt, enum analog_sub sub, int inthreeway);
227  void (* const get_and_handle_alarms)(void *pvt);
228  void * (* const get_sigpvt_bridged_channel)(struct ast_channel *chan);
229  int (* const get_sub_fd)(void *pvt, enum analog_sub sub);
230  void (* const set_cadence)(void *pvt, int *cidrings, struct ast_channel *chan);
231  void (* const set_alarm)(void *pvt, int in_alarm);
232  void (* const set_dialing)(void *pvt, int is_dialing);
233  void (* const set_outgoing)(void *pvt, int is_outgoing);
234  void (* const set_ringtimeout)(void *pvt, int ringt);
235  void (* const set_waitingfordt)(void *pvt, struct ast_channel *ast);
236  int (* const check_waitingfordt)(void *pvt);
237  void (* const set_confirmanswer)(void *pvt, int flag);
238  int (* const check_confirmanswer)(void *pvt);
239  void (* const set_callwaiting)(void *pvt, int callwaiting_enable);
240  void (* const cancel_cidspill)(void *pvt);
241  int (* const confmute)(void *pvt, int mute);
242  void (* const set_pulsedial)(void *pvt, int flag);
243  void (* const set_new_owner)(void *pvt, struct ast_channel *new_owner);
245  const char *(* const get_orig_dialstring)(void *pvt);
246  int (* const have_progressdetect)(void *pvt);
247  int (* const get_firstdigit_timeout)(void *pvt);
248  int (* const get_interdigit_timeout)(void *pvt);
249  int (* const get_matchdigit_timeout)(void *pvt);
250 };
252 /*! Global analog callbacks to the upper layer. */
253 extern struct analog_callback analog_callbacks;
258  struct ast_frame f; /*!< One frame for each channel. How did this ever work before? */
259  unsigned int inthreeway:1;
260  /* Have we allocated a subchannel yet or not */
261  unsigned int allocd:1;
262 };
264 struct analog_pvt {
265  /* Analog signalling type used in this private */
266  enum analog_sigtype sig;
267  /* To contain the private structure passed into the channel callbacks */
268  void *chan_pvt;
269  /* All members after this are giong to be transient, and most will probably change */
270  struct ast_channel *owner; /*!< Our current active owner (if applicable) */
272  struct analog_subchannel subs[3]; /*!< Sub-channels */
273  struct analog_dialoperation dop;
274  int onhooktime; /*< Time the interface went on-hook. */
275  int fxsoffhookstate; /*< TRUE if the FXS port is off-hook */
276  /*! \brief -1 = unknown, 0 = no messages, 1 = new messages available */
277  int msgstate;
279  /* XXX: Option Variables - Set by allocator of private structure */
280  unsigned int ani_info_digits:8; /* Older switches use 1 INFO digit, newer switches use 2 */
281  unsigned int ani_timeout:16; /* Time in ms before we give up waiting for ANI spill */
282  unsigned int ani_wink_time:16; /* Safe wait time before we wink to start ANI spill */
284  unsigned int answeronpolarityswitch:1;
285  unsigned int callreturn:1;
286  unsigned int cancallforward:1;
287  unsigned int canpark:1;
288  unsigned int dahditrcallerid:1; /*!< should we use the callerid from incoming call on dahdi transfer or not */
289  unsigned int hanguponpolarityswitch:1;
290  unsigned int immediate:1;
291  unsigned int permcallwaiting:1; /*!< TRUE if call waiting is enabled. (Configured option) */
292  unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */
293  unsigned int pulse:1;
294  unsigned int threewaycalling:1;
295  unsigned int transfer:1;
296  unsigned int transfertobusy:1; /*!< allow flash-transfers to busy channels */
297  unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
299  unsigned int callwaitingcallerid:1; /*!< TRUE if send caller ID for Call Waiting */
300  /*!
301  * \brief TRUE if SMDI (Simplified Message Desk Interface) is enabled
302  */
303  unsigned int use_smdi:1;
304  /*! \brief The SMDI interface to get SMDI messages from. */
307  /* Not used for anything but log messages. Could be just the TCID */
308  int channel; /*!< Channel Number */
312  int cid_signalling; /*!< Asterisk callerid type we're using */
314  int stripmsd;
321  /* XXX: All variables after this are internal */
322  unsigned int callwaiting:1; /*!< TRUE if call waiting is enabled. (Active option) */
323  unsigned int dialednone:1;
324  unsigned int dialing:1; /*!< TRUE if in the process of dialing digits or sending something */
325  unsigned int dnd:1; /*!< TRUE if Do-Not-Disturb is enabled. */
326  unsigned int echobreak:1;
327  unsigned int hidecallerid:1;
328  unsigned int outgoing:1;
329  unsigned int inalarm:1;
330  /*!
331  * \brief TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
332  * \note
333  * After CAS is sent, the call waiting caller id will be sent if the phone
334  * gives a positive reply.
335  */
336  unsigned int callwaitcas:1;
342  struct ast_party_caller caller;
343  int cidrings; /*!< Which ring to deliver CID on */
344  char echorest[20];
345  int polarity;
346  struct timeval polaritydelaytv;
347  char dialdest[256];
348  time_t guardtime; /*!< Must wait this much time before using for new call */
349  struct timeval flashtime; /*!< Last flash-hook time */
350  int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
351  char finaldial[64];
352  char *origcid_num; /*!< malloced original callerid */
353  char *origcid_name; /*!< malloced original callerid */
356  /* Ast channel to pass to __ss_analog_thread */
359  /* All variables after this are definitely going to be audited */
360  int ringt;
362 };
364 struct analog_pvt *analog_new(enum analog_sigtype signallingtype, void *private_data);
365 void analog_delete(struct analog_pvt *doomed);
367 void analog_free(struct analog_pvt *p);
369 int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout);
371 int analog_hangup(struct analog_pvt *p, struct ast_channel *ast);
373 int analog_answer(struct analog_pvt *p, struct ast_channel *ast);
375 struct ast_frame *analog_exception(struct analog_pvt *p, struct ast_channel *ast);
377 struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor);
379 int analog_available(struct analog_pvt *p);
381 void *analog_handle_init_event(struct analog_pvt *i, int event);
383 int analog_config_complete(struct analog_pvt *p);
385 void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest);
389 const char *analog_cidstart_to_str(enum analog_cid_start cid_start);
391 enum analog_sigtype analog_str_to_sigtype(const char *name);
395 unsigned int analog_str_to_cidtype(const char *name);
397 const char *analog_cidtype_to_str(unsigned int cid_type);
399 int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast);
401 int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp);
403 int analog_dnd(struct analog_pvt *p, int flag);
405 #endif /* _SIG_ANSLOG_H */
static int mute
Definition: chan_alsa.c:148
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:633
General Asterisk PBX channel definitions.
Definition: channel.h:134
Definition: channel.h:173
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
Definition: sig_analog.h:114
Definition: sig_analog.h:115
Definition: sig_analog.h:116
int analog_hangup(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:1253
const char * analog_cidtype_to_str(unsigned int cid_type)
Definition: sig_analog.c:149
int analog_available(struct analog_pvt *p)
Definition: sig_analog.c:793
void * analog_handle_init_event(struct analog_pvt *i, int event)
Definition: sig_analog.c:3719
struct analog_callback analog_callbacks
Definition: chan_dahdi.c:3392
int analog_dnd(struct analog_pvt *p, int flag)
Definition: sig_analog.c:4061
int analog_config_complete(struct analog_pvt *p)
Definition: sig_analog.c:4005
int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout)
Definition: sig_analog.c:985
void analog_delete(struct analog_pvt *doomed)
Delete the analog private structure.
Definition: sig_analog.c:4000
void analog_free(struct analog_pvt *p)
Definition: sig_analog.c:4017
void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest)
Definition: sig_analog.c:1566
int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp)
Definition: sig_analog.c:4023
const char * analog_cidstart_to_str(enum analog_cid_start cid_start)
Definition: sig_analog.c:249
Definition: sig_analog.h:79
Definition: sig_analog.h:80
Definition: sig_analog.h:89
Definition: sig_analog.h:104
Definition: sig_analog.h:88
Definition: sig_analog.h:90
Definition: sig_analog.h:102
Definition: sig_analog.h:97
Definition: sig_analog.h:95
Definition: sig_analog.h:92
Definition: sig_analog.h:81
Definition: sig_analog.h:93
Definition: sig_analog.h:83
Definition: sig_analog.h:101
Definition: sig_analog.h:103
Definition: sig_analog.h:87
Definition: sig_analog.h:98
Definition: sig_analog.h:84
Definition: sig_analog.h:86
Definition: sig_analog.h:100
Definition: sig_analog.h:91
Definition: sig_analog.h:96
Definition: sig_analog.h:105
Definition: sig_analog.h:99
Definition: sig_analog.h:82
Definition: sig_analog.h:94
Definition: sig_analog.h:85
Definition: sig_analog.h:126
Definition: sig_analog.h:127
int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:2709
const char * analog_sigtype_to_str(enum analog_sigtype sigtype)
Definition: sig_analog.c:123
Definition: sig_analog.h:108
Definition: sig_analog.h:111
Definition: sig_analog.h:109
Definition: sig_analog.h:110
struct ast_frame * analog_exception(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:3599
struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor)
Definition: sig_analog.c:770
struct analog_pvt * analog_new(enum analog_sigtype signallingtype, void *private_data)
Definition: sig_analog.c:3972
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:1463
Definition: sig_analog.h:45
Definition: sig_analog.h:56
Definition: sig_analog.h:66
Definition: sig_analog.h:60
Definition: sig_analog.h:47
Definition: sig_analog.h:57
Definition: sig_analog.h:55
Definition: sig_analog.h:53
Definition: sig_analog.h:48
Definition: sig_analog.h:63
Definition: sig_analog.h:59
Definition: sig_analog.h:50
Definition: sig_analog.h:54
Definition: sig_analog.h:49
Definition: sig_analog.h:67
Definition: sig_analog.h:46
Definition: sig_analog.h:52
Definition: sig_analog.h:65
Definition: sig_analog.h:62
Definition: sig_analog.h:58
Definition: sig_analog.h:61
Definition: sig_analog.h:64
Definition: sig_analog.h:51
Definition: sig_analog.h:70
Definition: sig_analog.h:73
Definition: sig_analog.h:76
Definition: sig_analog.h:74
Definition: sig_analog.h:75
Definition: sig_analog.h:72
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
Definition: sig_analog.h:119
Definition: sig_analog.h:122
Definition: sig_analog.h:123
Definition: sig_analog.h:120
Definition: sig_analog.h:121
SMDI support for Asterisk.
int(*const send_fsk)(void *pvt, struct ast_channel *ast, char *fsk)
Definition: sig_analog.h:174
int(*const complete_conference_update)(void *pvt, int needconf)
Definition: sig_analog.h:209
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:199
int(*const confmute)(void *pvt, int mute)
Definition: sig_analog.h:241
int(*const get_sub_fd)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:229
int(*const off_hook)(void *pvt)
Set channel off hook.
Definition: sig_analog.h:160
void(*const start_polarityswitch)(void *pvt)
Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch.
Definition: sig_analog.h:165
void(*const get_and_handle_alarms)(void *pvt)
Definition: sig_analog.h:227
int(*const get_matchdigit_timeout)(void *pvt)
Definition: sig_analog.h:249
int(*const unallocate_sub)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:196
int(*const have_progressdetect)(void *pvt)
Definition: sig_analog.h:246
int(*const stop_cid_detect)(void *pvt)
Definition: sig_analog.h:187
void(*const answer_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch=yes.
Definition: sig_analog.h:167
int(*const train_echocanceller)(void *pvt)
Definition: sig_analog.h:178
int(*const get_interdigit_timeout)(void *pvt)
Definition: sig_analog.h:248
int(*const ring)(void *pvt)
Definition: sig_analog.h:155
int(*const flash)(void *pvt)
Definition: sig_analog.h:156
int(*const callwait)(void *pvt)
Definition: sig_analog.h:190
int(*const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller)
Definition: sig_analog.h:181
void(*const set_needringing)(void *pvt, int value)
Definition: sig_analog.h:161
void(*const set_confirmanswer)(void *pvt, int flag)
Definition: sig_analog.h:237
void(*const decrease_ss_count)(void)
Definition: sig_analog.h:221
void(*const increase_ss_count)(void)
Definition: sig_analog.h:220
int(*const dsp_set_digitmode)(void *pvt, enum analog_dsp_digitmode mode)
Definition: sig_analog.h:179
int(*const stop_callwait)(void *pvt)
Definition: sig_analog.h:192
void(*const deadlock_avoidance_private)(void *pvt)
Definition: sig_analog.h:142
int(*const allocate_sub)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:195
void(*const set_cadence)(void *pvt, int *cidrings, struct ast_channel *chan)
Definition: sig_analog.h:230
void(*const set_dialing)(void *pvt, int is_dialing)
Definition: sig_analog.h:232
void(*const unlock_private)(void *pvt)
Definition: sig_analog.h:138
int(*const get_event)(void *pvt)
Definition: sig_analog.h:149
int(*const conf_del)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:205
int(*const has_voicemail)(void *pvt)
Definition: sig_analog.h:215
int(*const get_callerid)(void *pvt, char *name, char *num, enum analog_event *ev, size_t timeout)
Definition: sig_analog.h:183
int(*const conf_add)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:203
int(*const set_linear_mode)(void *pvt, enum analog_sub sub, int linear_mode)
Definition: sig_analog.h:225
void(*const set_pulsedial)(void *pvt, int flag)
Definition: sig_analog.h:242
void(*const set_callwaiting)(void *pvt, int callwaiting_enable)
Definition: sig_analog.h:239
void(*const set_inthreeway)(void *pvt, enum analog_sub sub, int inthreeway)
Definition: sig_analog.h:226
int(*const wink)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:172
void(*const set_new_owner)(void *pvt, struct ast_channel *new_owner)
Definition: sig_analog.h:243
void(*const set_polarity)(void *pvt, int value)
Set FXS line polarity to 0=IDLE NZ=REVERSED.
Definition: sig_analog.h:163
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:200
int(*const start_cid_detect)(void *pvt, int cid_signalling)
Definition: sig_analog.h:185
int(*const set_echocanceller)(void *pvt, int enable)
Definition: sig_analog.h:177
int(*const on_hook)(void *pvt)
Set channel on hook.
Definition: sig_analog.h:158
int(*const check_for_conference)(void *pvt)
Definition: sig_analog.h:216
int(*const is_off_hook)(void *pvt)
Definition: sig_analog.h:151
int(*const dsp_reset_and_flush_digits)(void *pvt)
Definition: sig_analog.h:180
void(*const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent)
Definition: sig_analog.h:217
void(*const set_outgoing)(void *pvt, int is_outgoing)
Definition: sig_analog.h:233
int(*const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop)
Definition: sig_analog.h:173
void(*const set_waitingfordt)(void *pvt, struct ast_channel *ast)
Definition: sig_analog.h:235
void(*const all_subchannels_hungup)(void *pvt)
Definition: sig_analog.h:213
int(*const start)(void *pvt)
Definition: sig_analog.h:154
const char *(*const get_orig_dialstring)(void *pvt)
Definition: sig_analog.h:245
void(*const lock_private)(void *pvt)
Definition: sig_analog.h:140
void(*const set_alarm)(void *pvt, int in_alarm)
Definition: sig_analog.h:231
void(*const hangup_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch.
Definition: sig_analog.h:169
int(*const check_waitingfordt)(void *pvt)
Definition: sig_analog.h:236
void(*const cancel_cidspill)(void *pvt)
Definition: sig_analog.h:240
int(*const check_confirmanswer)(void *pvt)
Definition: sig_analog.h:238
int(*const is_dialing)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:152
int(*const get_firstdigit_timeout)(void *pvt)
Definition: sig_analog.h:247
void(*const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest)
Definition: sig_analog.h:147
void(*const set_ringtimeout)(void *pvt, int ringt)
Definition: sig_analog.h:234
void *(*const get_sigpvt_bridged_channel)(struct ast_channel *chan)
Definition: sig_analog.h:228
int(*const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata)
Definition: sig_analog.h:223
int(*const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone)
Definition: sig_analog.h:175
int(*const wait_event)(void *pvt)
Definition: sig_analog.h:150
char dialdest[256]
Definition: sig_analog.h:347
unsigned int immediate
Definition: sig_analog.h:290
unsigned int permcallwaiting
Definition: sig_analog.h:291
unsigned int canpark
Definition: sig_analog.h:287
void * chan_pvt
Definition: sig_analog.h:268
unsigned int dnd
Definition: sig_analog.h:325
unsigned int dahditrcallerid
Definition: sig_analog.h:288
struct analog_dialoperation dop
Definition: sig_analog.h:273
int polarityonanswerdelay
Definition: sig_analog.h:313
char cid_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:317
unsigned int permhidecallerid
Definition: sig_analog.h:292
char * origcid_name
Definition: sig_analog.h:353
struct timeval flashtime
Definition: sig_analog.h:349
unsigned int outgoing
Definition: sig_analog.h:328
int whichwink
Definition: sig_analog.h:350
unsigned int callwaitingcallerid
Definition: sig_analog.h:299
char * origcid_num
Definition: sig_analog.h:352
unsigned int ani_wink_time
Definition: sig_analog.h:282
enum analog_sigtype outsigmod
Definition: sig_analog.h:310
unsigned int usedistinctiveringdetection
Definition: sig_analog.h:298
unsigned int answeronpolarityswitch
Definition: sig_analog.h:284
unsigned int threewaycalling
Definition: sig_analog.h:294
unsigned int pulse
Definition: sig_analog.h:293
int echotraining
Definition: sig_analog.h:311
char callwait_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:338
int msgstate
-1 = unknown, 0 = no messages, 1 = new messages available
Definition: sig_analog.h:277
int onhooktime
Definition: sig_analog.h:274
unsigned int callwaiting
Definition: sig_analog.h:322
time_t guardtime
Definition: sig_analog.h:348
struct timeval polaritydelaytv
Definition: sig_analog.h:346
unsigned int hanguponpolarityswitch
Definition: sig_analog.h:289
int cidrings
Definition: sig_analog.h:343
char call_forward[AST_MAX_EXTENSION]
Definition: sig_analog.h:354
enum analog_cid_start cid_start
Definition: sig_analog.h:315
unsigned int callwaitcas
TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
Definition: sig_analog.h:336
unsigned int hidecallerid
Definition: sig_analog.h:327
unsigned int echobreak
Definition: sig_analog.h:326
unsigned int callreturn
Definition: sig_analog.h:285
struct ast_channel * owner
Definition: sig_analog.h:270
unsigned int use_smdi
TRUE if SMDI (Simplified Message Desk Interface) is enabled.
Definition: sig_analog.h:303
char lastcid_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:341
enum analog_sigtype sig
Definition: sig_analog.h:266
unsigned int dialednone
Definition: sig_analog.h:323
char echorest[20]
Definition: sig_analog.h:344
unsigned int ani_timeout
Definition: sig_analog.h:281
int ringt_base
Definition: sig_analog.h:361
int fxsoffhookstate
Definition: sig_analog.h:275
unsigned int ani_info_digits
Definition: sig_analog.h:280
unsigned int cancallforward
Definition: sig_analog.h:286
char lastcid_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:340
struct analog_subchannel subs[3]
Definition: sig_analog.h:272
int cid_signalling
Definition: sig_analog.h:312
char finaldial[64]
Definition: sig_analog.h:351
unsigned int transfer
Definition: sig_analog.h:295
unsigned int transfertobusy
Definition: sig_analog.h:296
unsigned int inalarm
Definition: sig_analog.h:329
char cid_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:318
int stripmsd
Definition: sig_analog.h:314
char mohsuggest[MAX_MUSICCLASS]
Definition: sig_analog.h:316
unsigned int use_callerid
Definition: sig_analog.h:297
int polarity
Definition: sig_analog.h:345
struct ast_channel * ss_astchan
Definition: sig_analog.h:357
unsigned int dialing
Definition: sig_analog.h:324
char callwait_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:339
struct ast_smdi_interface * smdi_iface
The SMDI interface to get SMDI messages from.
Definition: sig_analog.h:305
struct ast_party_caller caller
Definition: sig_analog.h:342
unsigned int allocd
Definition: sig_analog.h:261
struct ast_frame f
Definition: sig_analog.h:258
unsigned int inthreeway
Definition: sig_analog.h:259
struct ast_channel * owner
Definition: sig_analog.h:257
Main Channel structure associated with a channel.
Data structure associated with a single frame of data.
Caller Party information.
Definition: channel.h:418
Definition: astman.c:222
int value
Definition: syslog.c:37
static struct test_val b
static struct test_val a