32 #define ANALOG_SMDI_MD_WAIT_TIMEOUT 1500 33 #define ANALOG_MAX_CID 300 35 #define RING_PATTERNS 3 38 #define ANALOG_FIRST_DIGIT_TIMEOUT 16000 40 #define ANALOG_INTER_DIGIT_TIMEOUT 8000 42 #define ANALOG_MATCH_DIGIT_TIMEOUT 3000 138 void (*
const unlock_private)(
void *pvt);
140 void (*
const lock_private)(
void *pvt);
142 void (*
const deadlock_avoidance_private)(
void *pvt);
151 int (*
const is_off_hook)(
void *pvt);
154 int (*
const start)(
void *pvt);
155 int (*
const ring)(
void *pvt);
156 int (*
const flash)(
void *pvt);
158 int (*
const on_hook)(
void *pvt);
160 int (*
const off_hook)(
void *pvt);
161 void (*
const set_needringing)(
void *pvt,
int value);
163 void (*
const set_polarity)(
void *pvt,
int value);
165 void (*
const start_polarityswitch)(
void *pvt);
167 void (*
const answer_polarityswitch)(
void *pvt);
169 void (*
const hangup_polarityswitch)(
void *pvt);
174 int (*
const send_fsk)(
void *pvt,
struct ast_channel *ast,
char *fsk);
177 int (*
const set_echocanceller)(
void *pvt,
int enable);
178 int (*
const train_echocanceller)(
void *pvt);
180 int (*
const dsp_reset_and_flush_digits)(
void *pvt);
185 int (*
const start_cid_detect)(
void *pvt,
int cid_signalling);
187 int (*
const stop_cid_detect)(
void *pvt);
190 int (*
const callwait)(
void *pvt);
192 int (*
const stop_callwait)(
void *pvt);
209 int (*
const complete_conference_update)(
void *pvt,
int needconf);
213 void (*
const all_subchannels_hungup)(
void *pvt);
217 void (*
const handle_notify_message)(
struct ast_channel *chan,
void *pvt,
int cid_flags,
int neon_mwievent);
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);
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);
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);
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);
342 struct timeval polaritydelaytv;
345 struct timeval flashtime;
static void swap_subs(struct dahdi_pvt *p, int a, int b)
static int conf_del(struct dahdi_pvt *p, struct dahdi_subchannel *c, int index)
struct ast_frame * analog_exception(struct analog_pvt *p, struct ast_channel *ast)
unsigned int threewaycalling
unsigned int use_callerid
Main Channel structure associated with a channel.
struct ast_smdi_interface * smdi_iface
The SMDI interface to get SMDI messages from.
int analog_config_complete(struct analog_pvt *p)
void analog_free(struct analog_pvt *p)
static char get_event(const char *c)
static int wait_event(void)
struct ast_channel * owner
const char *(*const get_orig_dialstring)(void *pvt)
struct ast_channel * ss_astchan
unsigned int usedistinctiveringdetection
unsigned int transfertobusy
static int conf_add(struct dahdi_pvt *p, struct dahdi_subchannel *c, int index, int slavechannel)
int analog_answer(struct analog_pvt *p, struct ast_channel *ast)
unsigned int hidecallerid
static char cid_num[AST_MAX_EXTENSION]
int polarityonanswerdelay
unsigned int use_smdi
TRUE if SMDI (Simplified Message Desk Interface) is enabled.
unsigned int cancallforward
struct ast_channel * owner
int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast)
enum analog_sigtype sigtype
void *(*const get_sigpvt_bridged_channel)(struct ast_channel *chan)
General Asterisk PBX channel definitions.
static char mohsuggest[MAX_MUSICCLASS]
#define AST_MAX_EXTENSION
Caller Party information.
Asterisk internal frame definitions.
static int cidrings[NUM_CADENCE_MAX]
cidrings says in which pause to transmit the cid information, where the first pause is 1...
void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub index, struct ast_frame **dest)
int analog_available(struct analog_pvt *p)
const char * analog_sigtype_to_str(enum analog_sigtype sigtype)
void * analog_handle_init_event(struct analog_pvt *i, int event)
unsigned int analog_str_to_cidtype(const char *name)
struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const struct ast_channel *requestor)
int analog_call(struct analog_pvt *p, struct ast_channel *ast, const char *rdest, int timeout)
int analog_hangup(struct analog_pvt *p, struct ast_channel *ast)
unsigned int dahditrcallerid
int msgstate
-1 = unknown, 0 = no messages, 1 = new messages available
SMDI support for Asterisk.
unsigned int permhidecallerid
enum analog_cid_start analog_str_to_cidstart(const char *value)
static int send_callerid(struct dahdi_pvt *p)
const char * analog_cidstart_to_str(enum analog_cid_start cid_start)
static char cid_name[AST_MAX_EXTENSION]
static int has_voicemail(const char *mailbox, const char *folder)
Determines if the given folder has messages.
unsigned int callwaitingcallerid
int analog_dnd(struct analog_pvt *p, int flag)
static int check_for_conference(struct dahdi_pvt *p)
int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp)
struct stasis_forward * sub
Data structure associated with a single frame of data.
struct analog_pvt * analog_new(enum analog_sigtype signallingtype, void *private_data)
unsigned int callwaitcas
TRUE if Call Waiting (CW) CPE Alert Signal (CAS) is being sent.
unsigned int hanguponpolarityswitch
enum analog_sigtype analog_str_to_sigtype(const char *name)
const char * analog_cidtype_to_str(unsigned int cid_type)
unsigned int permcallwaiting
void analog_delete(struct analog_pvt *doomed)
Delete the analog private structure.
struct analog_callback analog_callbacks
unsigned int answeronpolarityswitch