Wed Jan 8 2020 09:49:51

Asterisk developer's documentation


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 /* Signalling types supported */
61 };
62 
70 };
71 
94  ANALOG_EVENT_ERROR, /* not a DAHDI event */
95  ANALOG_EVENT_DTMFCID, /* not a DAHDI event */
97  ANALOG_EVENT_DTMFDOWN = (1 << 17),
98  ANALOG_EVENT_DTMFUP = (1 << 18),
99 };
100 
102  ANALOG_SUB_REAL = 0, /*!< Active call */
103  ANALOG_SUB_CALLWAIT, /*!< Call-Waiting call on hold */
104  ANALOG_SUB_THREEWAY, /*!< Three-way call */
105 };
106 
110 };
111 
117 };
118 
119 enum dialop {
121 };
122 
123 
125  enum dialop op;
126  char dialstr[256];
127 };
128 
130  /* Unlock the private in the signalling private structure. This is used for three way calling madness. */
131  void (* const unlock_private)(void *pvt);
132  /* Lock the private in the signalling private structure. ... */
133  void (* const lock_private)(void *pvt);
134  /* Do deadlock avoidance for the private signaling structure lock. */
135  void (* const deadlock_avoidance_private)(void *pvt);
136 
137  /* Function which is called back to handle any other DTMF events that are received. Called by analog_handle_event. Why is this
138  * important to use, instead of just directly using events received before they are passed into the library? Because sometimes,
139  * (CWCID) the library absorbs DTMF events received. */
140  void (* const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest);
141 
142  int (* const get_event)(void *pvt);
143  int (* const wait_event)(void *pvt);
144  int (* const is_off_hook)(void *pvt);
145  int (* const is_dialing)(void *pvt, enum analog_sub sub);
146  /* Start a trunk type signalling protocol (everything except phone ports basically */
147  int (* const start)(void *pvt);
148  int (* const ring)(void *pvt);
149  int (* const flash)(void *pvt);
150  /*! \brief Set channel on hook */
151  int (* const on_hook)(void *pvt);
152  /*! \brief Set channel off hook */
153  int (* const off_hook)(void *pvt);
154  void (* const set_needringing)(void *pvt, int value);
155  /*! \brief Set FXS line polarity to 0=IDLE NZ=REVERSED */
156  void (* const set_polarity)(void *pvt, int value);
157  /*! \brief Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch */
158  void (* const start_polarityswitch)(void *pvt);
159  /*! \brief Switch FXS line polarity, based on answeronpolarityswitch=yes */
160  void (* const answer_polarityswitch)(void *pvt);
161  /*! \brief Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch */
162  void (* const hangup_polarityswitch)(void *pvt);
163  /* 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
164  * function */
165  int (* const wink)(void *pvt, enum analog_sub sub);
166  int (* const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop);
167  int (* const send_fsk)(void *pvt, struct ast_channel *ast, char *fsk);
168  int (* const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone);
169 
170  int (* const set_echocanceller)(void *pvt, int enable);
171  int (* const train_echocanceller)(void *pvt);
172  int (* const dsp_set_digitmode)(void *pvt, enum analog_dsp_digitmode mode);
173  int (* const dsp_reset_and_flush_digits)(void *pvt);
174  int (* const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller);
175  /* Returns 0 if CID received. Returns 1 if event received, and -1 if error. name and num are size ANALOG_MAX_CID */
176  int (* const get_callerid)(void *pvt, char *name, char *num, enum analog_event *ev, size_t timeout);
177  /* Start CID detection */
178  int (* const start_cid_detect)(void *pvt, int cid_signalling);
179  /* Stop CID detection */
180  int (* const stop_cid_detect)(void *pvt);
181 
182  /* Play the CAS callwait tone on the REAL sub, then repeat after 10 seconds, and then stop */
183  int (* const callwait)(void *pvt);
184  /* Stop playing any CAS call waiting announcement tones that might be running on the REAL sub */
185  int (* const stop_callwait)(void *pvt);
186 
187  /* Bearer control related (non signalling) callbacks */
188  int (* const allocate_sub)(void *pvt, enum analog_sub sub);
189  int (* const unallocate_sub)(void *pvt, enum analog_sub sub);
190  /*! This function is for swapping of the owners with the underlying subs. Typically it means you need to change the fds
191  * of the new owner to be the fds of the sub specified, for each of the two subs given */
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);
193  struct ast_channel * (* const new_ast_channel)(void *pvt, int state, int startpbx, enum analog_sub sub, const struct ast_channel *requestor);
194 
195  /* Add the given sub to a conference */
196  int (* const conf_add)(void *pvt, enum analog_sub sub);
197  /* Delete the given sub from any conference that might be running on the channels */
198  int (* const conf_del)(void *pvt, enum analog_sub sub);
199 
200  /* If you would like to do any optimizations after the conference members have been added and removed,
201  * you can do so here */
202  int (* const complete_conference_update)(void *pvt, int needconf);
203 
204  /* This is called when there are no more subchannels on the given private that are left up,
205  * for any cleanup or whatever else you would like to do. Called from analog_hangup() */
206  void (* const all_subchannels_hungup)(void *pvt);
207 
208  int (* const has_voicemail)(void *pvt);
209  int (* const check_for_conference)(void *pvt);
210  void (* const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent);
211 
212  /* callbacks for increasing and decreasing ss_thread_count, will handle locking and condition signal */
213  void (* const increase_ss_count)(void);
214  void (* const decrease_ss_count)(void);
215 
216  int (* const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata);
217  /* Sets the specified sub-channel in and out of signed linear mode, returns the value that was overwritten */
218  int (* const set_linear_mode)(void *pvt, enum analog_sub sub, int linear_mode);
219  void (* const set_inthreeway)(void *pvt, enum analog_sub sub, int inthreeway);
220  void (* const get_and_handle_alarms)(void *pvt);
221  void * (* const get_sigpvt_bridged_channel)(struct ast_channel *chan);
222  int (* const get_sub_fd)(void *pvt, enum analog_sub sub);
223  void (* const set_cadence)(void *pvt, int *cidrings, struct ast_channel *chan);
224  void (* const set_alarm)(void *pvt, int in_alarm);
225  void (* const set_dialing)(void *pvt, int is_dialing);
226  void (* const set_outgoing)(void *pvt, int is_outgoing);
227  void (* const set_ringtimeout)(void *pvt, int ringt);
228  void (* const set_waitingfordt)(void *pvt, struct ast_channel *ast);
229  int (* const check_waitingfordt)(void *pvt);
230  void (* const set_confirmanswer)(void *pvt, int flag);
231  int (* const check_confirmanswer)(void *pvt);
232  void (* const set_callwaiting)(void *pvt, int callwaiting_enable);
233  void (* const cancel_cidspill)(void *pvt);
234  int (* const confmute)(void *pvt, int mute);
235  void (* const set_pulsedial)(void *pvt, int flag);
236  void (* const set_new_owner)(void *pvt, struct ast_channel *new_owner);
237 
238  const char *(* const get_orig_dialstring)(void *pvt);
239  int (* const have_progressdetect)(void *pvt);
240 };
241 
242 
243 
246  struct ast_frame f; /*!< One frame for each channel. How did this ever work before? */
247  unsigned int inthreeway:1;
248  /* Have we allocated a subchannel yet or not */
249  unsigned int allocd:1;
250 };
251 
252 struct analog_pvt {
253  /* Analog signalling type used in this private */
255  /* To contain the private structure passed into the channel callbacks */
256  void *chan_pvt;
257  /* Callbacks for various functions needed by the analog API */
259  /* All members after this are giong to be transient, and most will probably change */
260  struct ast_channel *owner; /*!< Our current active owner (if applicable) */
261 
262  struct analog_subchannel subs[3]; /*!< Sub-channels */
264  int onhooktime; /*< Time the interface went on-hook. */
265  int fxsoffhookstate; /*< TRUE if the FXS port is off-hook */
266  /*! \brief -1 = unknown, 0 = no messages, 1 = new messages available */
267  int msgstate;
268 
269  /* XXX: Option Variables - Set by allocator of private structure */
270  unsigned int answeronpolarityswitch:1;
271  unsigned int callreturn:1;
272  unsigned int cancallforward:1;
273  unsigned int canpark:1;
274  unsigned int dahditrcallerid:1; /*!< should we use the callerid from incoming call on dahdi transfer or not */
275  unsigned int hanguponpolarityswitch:1;
276  unsigned int immediate:1;
277  unsigned int permcallwaiting:1; /*!< TRUE if call waiting is enabled. (Configured option) */
278  unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */
279  unsigned int pulse:1;
280  unsigned int threewaycalling:1;
281  unsigned int transfer:1;
282  unsigned int transfertobusy:1; /*!< allow flash-transfers to busy channels */
283  unsigned int use_callerid:1; /*!< Whether or not to use caller id on this channel */
284  unsigned int callwaitingcallerid:1; /*!< TRUE if send caller ID for Call Waiting */
285  /*!
286  * \brief TRUE if SMDI (Simplified Message Desk Interface) is enabled
287  */
288  unsigned int use_smdi:1;
289  /*! \brief The SMDI interface to get SMDI messages from. */
291 
292  /* Not used for anything but log messages. Could be just the TCID */
293  int channel; /*!< Channel Number */
294 
297  int cid_signalling; /*!< Asterisk callerid type we're using */
299  int stripmsd;
304 
305 
306  /* XXX: All variables after this are internal */
307  unsigned int callwaiting:1; /*!< TRUE if call waiting is enabled. (Active option) */
308  unsigned int dialednone:1;
309  unsigned int dialing:1; /*!< TRUE if in the process of dialing digits or sending something */
310  unsigned int dnd:1; /*!< TRUE if Do-Not-Disturb is enabled. */
311  unsigned int echobreak:1;
312  unsigned int hidecallerid:1;
313  unsigned int outgoing:1;
314  unsigned int inalarm:1;
315  /*!
316  * \brief TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
317  * \note
318  * After CAS is sent, the call waiting caller id will be sent if the phone
319  * gives a positive reply.
320  */
321  unsigned int callwaitcas:1;
322 
328  int cidrings; /*!< Which ring to deliver CID on */
329  char echorest[20];
330  int polarity;
331  struct timeval polaritydelaytv;
332  char dialdest[256];
333  time_t guardtime; /*!< Must wait this much time before using for new call */
334  struct timeval flashtime; /*!< Last flash-hook time */
335  int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
336  char finaldial[64];
337  char *origcid_num; /*!< malloced original callerid */
338  char *origcid_name; /*!< malloced original callerid */
340 
341  /* Ast channel to pass to __ss_analog_thread */
343 
344  /* All variables after this are definitely going to be audited */
345  int ringt;
347 };
348 
349 struct analog_pvt *analog_new(enum analog_sigtype signallingtype, struct analog_callback *c, void *private_data);
350 void analog_delete(struct analog_pvt *doomed);
351 
352 void analog_free(struct analog_pvt *p);
353 
354 int analog_call(struct analog_pvt *p, struct ast_channel *ast, char *rdest, int timeout);
355 
356 int analog_hangup(struct analog_pvt *p, struct ast_channel *ast);
357 
358 int analog_answer(struct analog_pvt *p, struct ast_channel *ast);
359 
360 struct ast_frame *analog_exception(struct analog_pvt *p, struct ast_channel *ast);
361 
362 struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor);
363 
364 int analog_available(struct analog_pvt *p);
365 
366 void *analog_handle_init_event(struct analog_pvt *i, int event);
367 
368 int analog_config_complete(struct analog_pvt *p);
369 
370 void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest);
371 
373 
374 const char *analog_cidstart_to_str(enum analog_cid_start cid_start);
375 
376 enum analog_sigtype analog_str_to_sigtype(const char *name);
377 
379 
380 unsigned int analog_str_to_cidtype(const char *name);
381 
382 const char *analog_cidtype_to_str(unsigned int cid_type);
383 
384 int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast);
385 
386 int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp);
387 
388 int analog_dnd(struct analog_pvt *p, int flag);
389 
390 #endif /* _SIG_ANSLOG_H */
analog_sigtype
Definition: sig_analog.h:38
char cid_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:303
unsigned int threewaycalling
Definition: sig_analog.h:280
analog_event
Definition: sig_analog.h:72
unsigned int use_callerid
Definition: sig_analog.h:283
Main Channel structure associated with a channel.
Definition: channel.h:742
int(*const conf_add)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:196
struct ast_smdi_interface * smdi_iface
The SMDI interface to get SMDI messages from.
Definition: sig_analog.h:290
void(*const answer_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch=yes.
Definition: sig_analog.h:160
struct ast_party_caller caller
Definition: sig_analog.h:327
struct timeval polaritydelaytv
Definition: sig_analog.h:331
unsigned int immediate
Definition: sig_analog.h:276
analog_tone
Definition: sig_analog.h:63
void * analog_handle_init_event(struct analog_pvt *i, int event)
Definition: sig_analog.c:3637
int(*const send_fsk)(void *pvt, struct ast_channel *ast, char *fsk)
Definition: sig_analog.h:167
int polarity
Definition: sig_analog.h:330
void(*const set_callwaiting)(void *pvt, int callwaiting_enable)
Definition: sig_analog.h:232
#define MAX_MUSICCLASS
Definition: channel.h:139
int analog_hangup(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:1270
char mohsuggest[MAX_MUSICCLASS]
Definition: sig_analog.h:301
int echotraining
Definition: sig_analog.h:296
int ringt_base
Definition: sig_analog.h:346
void(*const deadlock_avoidance_private)(void *pvt)
Definition: sig_analog.h:135
char dialdest[256]
Definition: sig_analog.h:332
char finaldial[64]
Definition: sig_analog.h:336
char callwait_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:324
int(*const off_hook)(void *pvt)
Set channel off hook.
Definition: sig_analog.h:153
struct analog_pvt * analog_new(enum analog_sigtype signallingtype, struct analog_callback *c, void *private_data)
Definition: sig_analog.c:3883
unsigned int callreturn
Definition: sig_analog.h:271
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:192
struct ast_channel * owner
Definition: sig_analog.h:245
int(*const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop)
Definition: sig_analog.h:166
void(*const set_new_owner)(void *pvt, struct ast_channel *new_owner)
Definition: sig_analog.h:236
void(*const cancel_cidspill)(void *pvt)
Definition: sig_analog.h:233
int cid_signalling
Definition: sig_analog.h:297
time_t guardtime
Definition: sig_analog.h:333
void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub idx, struct ast_frame **dest)
Definition: sig_analog.c:1589
const char * analog_cidstart_to_str(enum analog_cid_start cid_start)
Definition: sig_analog.c:231
unsigned int dialing
Definition: sig_analog.h:309
int(*const conf_del)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:198
struct ast_channel * ss_astchan
Definition: sig_analog.h:342
unsigned int transfertobusy
Definition: sig_analog.h:282
int(*const start)(void *pvt)
Definition: sig_analog.h:147
struct timeval flashtime
Definition: sig_analog.h:334
unsigned int allocd
Definition: sig_analog.h:249
void(*const set_cadence)(void *pvt, int *cidrings, struct ast_channel *chan)
Definition: sig_analog.h:223
int(*const is_dialing)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:145
int value
Definition: syslog.c:39
unsigned int hidecallerid
Definition: sig_analog.h:312
int(*const confmute)(void *pvt, int mute)
Definition: sig_analog.h:234
int polarityonanswerdelay
Definition: sig_analog.h:298
int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp)
Definition: sig_analog.c:3937
char echorest[20]
Definition: sig_analog.h:329
int(*const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata)
Definition: sig_analog.h:216
void(*const unlock_private)(void *pvt)
Definition: sig_analog.h:131
unsigned int use_smdi
TRUE if SMDI (Simplified Message Desk Interface) is enabled.
Definition: sig_analog.h:288
int(*const get_sub_fd)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:222
static int mute
Definition: chan_alsa.c:135
unsigned int cancallforward
Definition: sig_analog.h:272
int(*const on_hook)(void *pvt)
Set channel on hook.
Definition: sig_analog.h:151
void(*const set_pulsedial)(void *pvt, int flag)
Definition: sig_analog.h:235
struct ast_channel * owner
Definition: sig_analog.h:260
int(*const wink)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:165
int(*const check_for_conference)(void *pvt)
Definition: sig_analog.h:209
dialop
Definition: sig_analog.h:119
void(*const increase_ss_count)(void)
Definition: sig_analog.h:213
int(*const have_progressdetect)(void *pvt)
Definition: sig_analog.h:239
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:193
int stripmsd
Definition: sig_analog.h:299
int(*const allocate_sub)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:188
enum analog_sigtype sigtype
Definition: sig_analog.c:66
void(*const set_polarity)(void *pvt, int value)
Set FXS line polarity to 0=IDLE NZ=REVERSED.
Definition: sig_analog.h:156
General Asterisk PBX channel definitions.
int onhooktime
Definition: sig_analog.h:264
int(*const set_echocanceller)(void *pvt, int enable)
Definition: sig_analog.h:170
Asterisk internal frame definitions.
int(*const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller)
Definition: sig_analog.h:174
void(*const set_inthreeway)(void *pvt, enum analog_sub sub, int inthreeway)
Definition: sig_analog.h:219
#define AST_MAX_EXTENSION
Definition: channel.h:135
void(*const set_needringing)(void *pvt, int value)
Definition: sig_analog.h:154
Caller Party information.
Definition: channel.h:368
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:404
int(*const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone)
Definition: sig_analog.h:168
int(*const complete_conference_update)(void *pvt, int needconf)
Definition: sig_analog.h:202
int analog_available(struct analog_pvt *p)
Definition: sig_analog.c:806
char callwait_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:323
int(*const train_echocanceller)(void *pvt)
Definition: sig_analog.h:171
analog_sub
Definition: sig_analog.h:101
struct ast_frame * analog_exception(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:3515
analog_cid_start
Definition: sig_analog.h:112
analog_dsp_digitmode
Definition: sig_analog.h:107
unsigned int dialednone
Definition: sig_analog.h:308
void(*const lock_private)(void *pvt)
Definition: sig_analog.h:133
int analog_call(struct analog_pvt *p, struct ast_channel *ast, char *rdest, int timeout)
Definition: sig_analog.c:1003
int(*const set_linear_mode)(void *pvt, enum analog_sub sub, int linear_mode)
Definition: sig_analog.h:218
const char * analog_sigtype_to_str(enum analog_sigtype sigtype)
Definition: sig_analog.c:120
char cid_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:302
char lastcid_name[AST_MAX_EXTENSION]
Definition: sig_analog.h:326
struct analog_dialoperation dop
Definition: sig_analog.h:263
int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *chan)
Definition: sig_analog.c:2644
void(*const all_subchannels_hungup)(void *pvt)
Definition: sig_analog.h:206
enum analog_cid_start cid_start
Definition: sig_analog.h:300
int(*const start_cid_detect)(void *pvt, int cid_signalling)
Definition: sig_analog.h:178
void(*const hangup_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch.
Definition: sig_analog.h:162
int analog_config_complete(struct analog_pvt *p)
Definition: sig_analog.c:3919
enum analog_sigtype analog_str_to_sigtype(const char *name)
Definition: sig_analog.c:107
int(*const stop_cid_detect)(void *pvt)
Definition: sig_analog.h:180
int analog_answer(struct analog_pvt *p, struct ast_channel *ast)
Definition: sig_analog.c:1486
void *(*const get_sigpvt_bridged_channel)(struct ast_channel *chan)
Definition: sig_analog.h:221
unsigned int callwaiting
Definition: sig_analog.h:307
void analog_free(struct analog_pvt *p)
Definition: sig_analog.c:3931
int(*const has_voicemail)(void *pvt)
Definition: sig_analog.h:208
void analog_delete(struct analog_pvt *doomed)
Delete the analog private structure.
Definition: sig_analog.c:3914
int(*const check_confirmanswer)(void *pvt)
Definition: sig_analog.h:231
void(*const get_and_handle_alarms)(void *pvt)
Definition: sig_analog.h:220
int(*const ring)(void *pvt)
Definition: sig_analog.h:148
unsigned int inthreeway
Definition: sig_analog.h:247
char * origcid_num
Definition: sig_analog.h:337
static const char name[]
void(*const set_ringtimeout)(void *pvt, int ringt)
Definition: sig_analog.h:227
int(*const stop_callwait)(void *pvt)
Definition: sig_analog.h:185
int(*const check_waitingfordt)(void *pvt)
Definition: sig_analog.h:229
int(*const is_off_hook)(void *pvt)
Definition: sig_analog.h:144
int whichwink
Definition: sig_analog.h:335
enum analog_cid_start analog_str_to_cidstart(const char *value)
Definition: sig_analog.c:216
unsigned int dahditrcallerid
Definition: sig_analog.h:274
int(*const unallocate_sub)(void *pvt, enum analog_sub sub)
Definition: sig_analog.h:189
int msgstate
-1 = unknown, 0 = no messages, 1 = new messages available
Definition: sig_analog.h:267
SMDI support for Asterisk.
char * origcid_name
Definition: sig_analog.h:338
unsigned int permhidecallerid
Definition: sig_analog.h:278
void(*const set_waitingfordt)(void *pvt, struct ast_channel *ast)
Definition: sig_analog.h:228
int(*const get_callerid)(void *pvt, char *name, char *num, enum analog_event *ev, size_t timeout)
Definition: sig_analog.h:176
void(*const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent)
Definition: sig_analog.h:210
unsigned int dnd
Definition: sig_analog.h:310
void(*const decrease_ss_count)(void)
Definition: sig_analog.h:214
unsigned int analog_str_to_cidtype(const char *name)
Definition: sig_analog.c:133
int(*const flash)(void *pvt)
Definition: sig_analog.h:149
void(*const set_confirmanswer)(void *pvt, int flag)
Definition: sig_analog.h:230
char call_forward[AST_MAX_EXTENSION]
Definition: sig_analog.h:339
int cidrings
Definition: sig_analog.h:328
int(*const callwait)(void *pvt)
Definition: sig_analog.h:183
unsigned int callwaitingcallerid
Definition: sig_analog.h:284
int(*const dsp_set_digitmode)(void *pvt, enum analog_dsp_digitmode mode)
Definition: sig_analog.h:172
char lastcid_num[AST_MAX_EXTENSION]
Definition: sig_analog.h:325
int(*const wait_event)(void *pvt)
Definition: sig_analog.h:143
struct analog_callback * calls
Definition: sig_analog.h:258
void(*const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest)
Definition: sig_analog.h:140
Data structure associated with a single frame of data.
Definition: frame.h:142
enum analog_sigtype outsigmod
Definition: sig_analog.h:295
const char *(*const get_orig_dialstring)(void *pvt)
Definition: sig_analog.h:238
unsigned int inalarm
Definition: sig_analog.h:314
void(*const set_dialing)(void *pvt, int is_dialing)
Definition: sig_analog.h:225
int fxsoffhookstate
Definition: sig_analog.h:265
unsigned int callwaitcas
TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
Definition: sig_analog.h:321
struct ast_frame f
Definition: sig_analog.h:246
unsigned int pulse
Definition: sig_analog.h:279
int(*const get_event)(void *pvt)
Definition: sig_analog.h:142
const char * analog_cidtype_to_str(unsigned int cid_type)
Definition: sig_analog.c:146
unsigned int transfer
Definition: sig_analog.h:281
struct analog_subchannel subs[3]
Definition: sig_analog.h:262
unsigned int hanguponpolarityswitch
Definition: sig_analog.h:275
void * chan_pvt
Definition: sig_analog.h:256
int(*const dsp_reset_and_flush_digits)(void *pvt)
Definition: sig_analog.h:173
unsigned int canpark
Definition: sig_analog.h:273
void(*const start_polarityswitch)(void *pvt)
Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch.
Definition: sig_analog.h:158
enum analog_sigtype sig
Definition: sig_analog.h:254
unsigned int echobreak
Definition: sig_analog.h:311
int analog_dnd(struct analog_pvt *p, int flag)
Definition: sig_analog.c:3955
void(*const set_outgoing)(void *pvt, int is_outgoing)
Definition: sig_analog.h:226
struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor)
Definition: sig_analog.c:783
unsigned int permcallwaiting
Definition: sig_analog.h:277
unsigned int cid_type
Definition: sig_analog.c:93
unsigned int answeronpolarityswitch
Definition: sig_analog.h:270
void(*const set_alarm)(void *pvt, int in_alarm)
Definition: sig_analog.h:224