62 #define POLARITY_IDLE 0 63 #define POLARITY_REV 1 64 #define MIN_MS_SINCE_FLASH ( (2000) ) 107 #define ISTRUNK(p) ((p->sig == ANALOG_SIG_FXSLS) || (p->sig == ANALOG_SIG_FXSKS) || \ 108 (p->sig == ANALOG_SIG_FXSGS)) 115 if (!strcasecmp(
sigtypes[i].name, name)) {
128 if (sigtype ==
sigtypes[i].sigtype) {
141 if (!strcasecmp(
cidtypes[i].name, name)) {
154 if (cid_type ==
cidtypes[i].cid_type) {
219 #define gen_analog_field_callback(type, callback_name, def_value) \ 220 static type analog_get_##callback_name(struct analog_pvt *p) \ 222 if (!analog_callbacks.get_##callback_name) { \ 225 return analog_callbacks.get_##callback_name(p->chan_pvt); \ 232 #undef gen_analog_field_callback 236 if (!strcasecmp(value,
"ring")) {
238 }
else if (!strcasecmp(value,
"polarity")) {
240 }
else if (!strcasecmp(value,
"polarity_in")) {
242 }
else if (!strcasecmp(value,
"dtmf")) {
257 return "Polarity_In";
270 res =
"ANALOG_EVENT_ONHOOK";
273 res =
"ANALOG_EVENT_RINGOFFHOOK";
276 res =
"ANALOG_EVENT_WINKFLASH";
279 res =
"ANALOG_EVENT_ALARM";
282 res =
"ANALOG_EVENT_NOALARM";
285 res =
"ANALOG_EVENT_DIALCOMPLETE";
288 res =
"ANALOG_EVENT_HOOKCOMPLETE";
291 res =
"ANALOG_EVENT_PULSE_START";
294 res =
"ANALOG_EVENT_POLARITY";
297 res =
"ANALOG_EVENT_RINGBEGIN";
300 res =
"ANALOG_EVENT_EC_DISABLED";
303 res =
"ANALOG_EVENT_RINGERON";
306 res =
"ANALOG_EVENT_RINGEROFF";
309 res =
"ANALOG_EVENT_REMOVED";
312 res =
"ANALOG_EVENT_NEONMWI_ACTIVE";
315 res =
"ANALOG_EVENT_NEONMWI_INACTIVE";
317 #ifdef HAVE_DAHDI_ECHOCANCEL_FAX_MODE 319 res =
"ANALOG_EVENT_TX_CED_DETECTED";
322 res =
"ANALOG_EVENT_RX_CED_DETECTED";
325 res =
"ANALOG_EVENT_EC_NLP_DISABLED";
328 res =
"ANALOG_EVENT_EC_NLP_ENABLED";
332 res =
"ANALOG_EVENT_PULSEDIGIT";
335 res =
"ANALOG_EVENT_DTMFDOWN";
338 res =
"ANALOG_EVENT_DTMFUP";
341 res =
"UNKNOWN/OTHER";
353 ast_debug(1,
"Swapping %u and %u\n", a, b);
393 ast_debug(1,
"Sending callerid. CID_NAME: '%s' CID_NUM: '%s'\n",
407 #define analog_get_index(ast, p, nullok) _analog_get_index(ast, p, nullok, __PRETTY_FUNCTION__, __LINE__) 421 "Unable to get index for '%s' on channel %d (%s(), line %lu)\n",
448 p->
owner = new_owner;
722 ast_verb(3,
"TRANSFERRING %s to %s\n",
751 for (x = 0; x < 3; x++) {
764 ast_debug(1,
"Updated conferencing on %d, with %d conference users\n", p->
channel, needconf);
816 #ifdef DAHDI_CHECK_HOOKSTATE 823 }
else if (offhook) {
993 ast_debug(1,
"CALLING CID_NAME: %s CID_NUM:: %s\n",
1022 if (p->
owner == ast) {
1030 c = strchr(dest,
'/');
1034 if (c && (strlen(c) < p->
stripmsd)) {
1041 ast_debug(1,
"FXO: setup deferred dialstring: %s\n", c);
1120 ast_debug(1,
"Ignore possible polarity reversal on line seizure\n");
1139 c = strchr(dest,
'/');
1151 if (
errno != EINPROGRESS) {
1179 const char *cic =
"", *ozz =
"";
1193 ast_log(
LOG_WARNING,
"Unable to dial channel of type feature group D MF tandem access without CIC or OZZ set\n");
1278 ast_debug(1,
"Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
1288 ast_debug(1,
"Normal call hung up with both three way call and a call waiting call in place?\n");
1291 ast_debug(1,
"We were flipped over to the callwait, moving back and unowning.\n");
1298 ast_debug(1,
"We were in the threeway and have a callwait still. Ditching the threeway.\n");
1304 ast_debug(1,
"Call was complete, setting owner to former third call\n");
1309 ast_debug(1,
"Call was incomplete, setting owner to NULL\n");
1338 ast_debug(1,
"Call was complete, setting owner to former third call\n");
1343 ast_debug(1,
"Call was incomplete, setting owner to NULL\n");
1507 ast_debug(1,
"Finally swapping real and threeway\n");
1568 ast_debug(1,
"%s DTMF digit: 0x%02X '%c' on %s\n",
1585 *dest = &p->
subs[idx].
f;
1589 ast_debug(1,
"Got some DTMF, but it's for the CAS\n");
1600 *dest = &p->
subs[idx].
f;
1620 if (strchr(term, c)) {
1684 #define ANALOG_NEED_MFDETECT(p) (((p)->sig == ANALOG_SIG_FEATDMF) || ((p)->sig == ANALOG_SIG_FEATDMF_TA) || ((p)->sig == ANALOG_SIG_E911) || ((p)->sig == ANALOG_SIG_FGC_CAMA) || ((p)->sig == ANALOG_SIG_FGC_CAMAMF) || ((p)->sig == ANALOG_SIG_FEATB)) 1688 int extlen = strlen(exten);
1692 if (extlen < strlen(pickupexten) && !strncmp(pickupexten, exten, extlen)) {
1696 if (exten[0] ==
'*' && extlen < 3) {
1732 const char *pickupexten;
1766 ast_log(
LOG_ERROR,
"Unable to retrieve pickup configuration options. Unable to detect call pickup extension\n");
1769 pickupexten =
ast_strdupa(pickup_cfg->pickupexten);
1804 memset(dtmfbuf, 0,
sizeof(dtmfbuf));
1849 && (strlen(dtmfbuf) != 14)) {
1898 dtmfbuf[
len] =
'\0';
1901 timeout = analog_get_matchdigit_timeout(p);
1903 timeout = analog_get_interdigit_timeout(p);
1907 ast_debug(1,
"waitfordigit returned < 0...\n");
1911 dtmfbuf[len++] = res;
1912 dtmfbuf[
len] =
'\0';
1924 }
else if (res < 0) {
1925 ast_debug(1,
"Got hung up before digits finished\n");
1940 if ((res > 0) && (strlen(anibuf) > 2)) {
1941 if (anibuf[strlen(anibuf) - 1] ==
'#') {
1942 anibuf[strlen(anibuf) - 1] = 0;
1955 if (exten[0] ==
'*') {
1960 s1 =
strsep(&stringp,
"*");
1961 s2 =
strsep(&stringp,
"*");
1977 if (exten[0] ==
'*') {
1984 s1 =
strsep(&stringp,
"#");
1985 s2 =
strsep(&stringp,
"#");
2002 caller->
ani2 = atoi(s1);
2008 if (exten[0] ==
'*') {
2013 s1 =
strsep(&stringp,
"#");
2014 s2 =
strsep(&stringp,
"#");
2015 if (s2 && (*(s2 + 1) ==
'0')) {
2030 if (exten[0] ==
'*') {
2035 s1 =
strsep(&stringp,
"#");
2089 timeout = analog_get_firstdigit_timeout(p);
2096 int is_exten_parking = 0;
2107 ast_debug(1,
"waitfordigit returned < 0...\n");
2112 ast_debug(1,
"waitfordigit returned '%c' (%d), timeout = %d\n", res, res, timeout);
2137 memset(exten, 0,
sizeof(exten));
2170 timeout = analog_get_matchdigit_timeout(p);
2172 }
else if (res == 0) {
2173 ast_debug(1,
"not enough digits (and no ambiguous match)...\n");
2178 }
else if (p->
callwaiting && !strcmp(exten,
"*70")) {
2188 memset(exten, 0,
sizeof(exten));
2189 timeout = analog_get_firstdigit_timeout(p);
2191 }
else if (!strcmp(exten, pickupexten)) {
2207 ast_debug(1,
"No call pickup possible...\n");
2219 }
else if (!p->
hidecallerid && !strcmp(exten,
"*67")) {
2233 memset(exten, 0,
sizeof(exten));
2234 timeout = analog_get_firstdigit_timeout(p);
2235 }
else if (p->
callreturn && !strcmp(exten,
"*69")) {
2244 }
else if (!strcmp(exten,
"*78")) {
2249 memset(exten, 0,
sizeof(exten));
2251 }
else if (!strcmp(exten,
"*79")) {
2256 memset(exten, 0,
sizeof(exten));
2261 memset(exten, 0,
sizeof(exten));
2264 ast_verb(3,
"Cancelling call forwarding on channel %d\n", p->
channel);
2268 memset(exten, 0,
sizeof(exten));
2281 if (bridge_channel) {
2305 memset(exten, 0,
sizeof(exten));
2319 memset(exten, 0,
sizeof(exten));
2320 timeout = analog_get_firstdigit_timeout(p);
2321 }
else if (!strcmp(exten,
"*0")) {
2328 if (pbridge &&
ISTRUNK(pbridge)) {
2334 "Unable to flash-hook bridged trunk from channel %s: %s\n",
2356 ast_debug(1,
"Can't match %s from '%s' in context %s\n", exten,
2363 timeout = analog_get_interdigit_timeout(p);
2376 if (smdi_msg != NULL) {
2379 if (smdi_msg->
type ==
'B')
2381 else if (smdi_msg->
type ==
'N')
2433 "DTMFCID timed out waiting for ring. Exiting simple switch\n");
2462 ast_debug(1,
"CID got string '%s'\n", dtmfbuf);
2464 ast_debug(1,
"CID is '%s', flags %d\n", dtmfcid, flags);
2478 int timeout = 10000;
2483 struct timeval off_start;
2493 "CallerID returned with error on channel '%s'\n",
2533 "CID timed out waiting for ring. Exiting simple switch\n");
2560 "Channel %s in prering state, but I have nothing to do. Terminating simple switch, should be restarted by the actual ring.\n",
2570 int timeout = 10000;
2574 int ring_data_idx = 0;
2585 "CallerID returned with error on channel '%s'\n",
2601 "Hanging up due to polarity reversal on channel %d while detecting callerid\n",
2614 ring_data[ring_data_idx] = p->
ringt;
2695 int data_size =
sizeof(*cause_code);
2696 char *subclass =
NULL;
2719 p->
subs[idx].
f.
src =
"dahdi_handle_event";
2721 f = &p->
subs[idx].
f;
2729 ast_debug(1,
"Detected %sdigit '%c'\n", (res & ANALOG_EVENT_PULSEDIGIT) ?
"pulse ":
"", res & 0xff);
2738 ast_debug(1,
"DTMF Down '%c'\n", res & 0xff);
2754 data_size += strlen(subclass);
2756 memset(cause_code, 0, data_size);
2759 snprintf(cause_code->
code, data_size -
sizeof(*cause_code) + 1,
"ANALOG %s", subclass);
2767 ast_verb(3,
"Channel %d echo canceler disabled due to CED detection\n", p->
channel);
2770 #ifdef HAVE_DAHDI_ECHOCANCEL_FAX_MODE 2772 ast_verb(3,
"Channel %d detected a CED tone towards the network.\n", p->
channel);
2775 ast_verb(3,
"Channel %d detected a CED tone from the network.\n", p->
channel);
2778 ast_verb(3,
"Channel %d echo canceler disabled its NLP.\n", p->
channel);
2781 ast_verb(3,
"Channel %d echo canceler enabled its NLP.\n", p->
channel);
2818 ast_debug(1,
"Done dialing, but waiting for progress detection before doing more...\n");
2875 ast_verb(3,
"Channel %d still has (callwait) call, ringing phone\n", p->
channel);
2887 unsigned int mssinceflash;
2896 if (p->
owner != ast) {
2904 ast_debug(1,
"Last flash was %u ms ago\n", mssinceflash);
2908 ast_debug(1,
"Looks like a bounced flash, hanging up both calls on %d\n", p->
channel);
2995 return &p->
subs[idx].
f;
3040 return &p->
subs[idx].
f;
3047 return &p->
subs[idx].
f;
3167 ast_debug(1,
"Winkflash, index: %u, normal: %d, callwait: %d, thirdcall: %d\n",
3241 ast_debug(1,
"Flash when call not up or ringing\n");
3264 "Cannot allocate new call structure on channel %d\n",
3321 ast_debug(1,
"Got flash with three way call up, dropping last call on %d\n", p->
channel);
3339 ast_verb(3,
"Building conference call with %s and %s\n",
3395 ast_log(
LOG_WARNING,
"Received unexpected wink on channel of type ANALOG_SIG_FEATDMF_TA\n");
3460 ast_debug(1,
"Got hook complete in MF FGD, waiting for wink now on channel %d\n",p->
channel);
3490 ast_debug(1,
"Ignore Answer on polarity switch, channel %d\n", p->
channel);
3503 ast_debug(1,
"Ignore Hangup on polarity switch, channel %d\n", p->
channel);
3547 ast_debug(1,
"Polarity Reversal event occured - DEBUG 2: channel %d, state %u, pol= %d, aonp= %d, honp= %d, pdelay= %d, tv= %" PRIi64
"\n", p->
channel,
ast_channel_state(ast), p->
polarity, p->
answeronpolarityswitch, p->
hanguponpolarityswitch, p->
polarityonanswerdelay,
ast_tvdiff_ms(
ast_tvnow(), p->
polaritydelaytv) );
3550 ast_debug(1,
"Dunno what to do with event %d on channel %d\n", res, p->
channel);
3552 return &p->
subs[idx].
f;
3575 p->
subs[idx].
f.
src =
"dahdi_exception";
3589 ast_debug(1,
"Restoring owner of channel %d on event %d\n", p->
channel, res);
3650 f = &p->
subs[idx].
f;
3655 if (ast != p->
owner) {
3657 f = &p->
subs[idx].
f;
3683 ast_debug(1,
"channel (%d) - signaling (%d) - event (%s)\n",
3700 if (res && (
errno == EBUSY)) {
3731 ast_log(
LOG_WARNING,
"Unable to play dialtone on channel %d, do you have defaultzone and loadzone defined?\n", i->
channel);
3866 ast_verb(2,
"Starting post polarity CID detection on channel %d\n",
3881 "handle_init_event detected polarity reversal on non-FXO (ANALOG_SIG_FXS) interface %d\n",
3893 ast_verb(2,
"Starting DTMF CID detection on channel %d\n",
3908 "handle_init_event detected dtmfcid generation event on non-FXO (ANALOG_SIG_FXS) interface %d\n",
3938 p->
sig = signallingtype;
3986 if (new_pvt->
owner == oldchan) {
3989 for (x = 0; x < 3; x++) {
3990 if (new_pvt->
subs[x].
owner == oldchan) {
4027 ast_verb(3,
"%s DND on channel %d\n",
4028 flag ?
"Enabled" :
"Disabled",
static int analog_send_callerid(struct analog_pvt *p, int cwcid, struct ast_party_caller *caller)
int(*const conf_add)(void *pvt, enum analog_sub sub)
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
void(*const get_and_handle_alarms)(void *pvt)
#define ANALOG_SMDI_MD_WAIT_TIMEOUT
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
static int analog_handles_digit(struct ast_frame *f)
int(*const on_hook)(void *pvt)
Set channel on hook.
char cid_name[AST_MAX_EXTENSION]
#define analog_get_index(ast, p, nullok)
void ast_set_callerid(struct ast_channel *chan, const char *cid_num, const char *cid_name, const char *cid_ani)
Set caller ID number, name and ANI and generate AMI event.
unsigned int threewaycalling
int ast_matchmore_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Looks to see if adding anything to this extension might match something. (exists ^ canmatch) ...
#define ast_channel_lock(chan)
unsigned int use_callerid
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
struct ast_smdi_interface * smdi_iface
The SMDI interface to get SMDI messages from.
char * str
Subscriber phone number (Malloced)
int(*const wink)(void *pvt, enum analog_sub sub)
static int analog_unalloc_sub(struct analog_pvt *p, enum analog_sub x)
char fwd_st[SMDI_MAX_STATION_NUM_LEN+1]
int ast_streamfile(struct ast_channel *c, const char *filename, const char *preflang)
Streams a file.
static int _analog_get_index(struct ast_channel *ast, struct analog_pvt *p, int nullok, const char *fname, unsigned long line)
void(*const answer_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch=yes.
void(*const start_polarityswitch)(void *pvt)
Reset FXS line polarity to IDLE, based on answeronpolarityswitch and hanguponpolarityswitch.
Asterisk main include file. File version handling, generic pbx functions.
enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_transferee, struct ast_channel *to_transfer_target)
Attended transfer.
struct ast_features_pickup_config * ast_get_chan_features_pickup_config(struct ast_channel *chan)
Get the pickup configuration options for a channel.
char chan_name[AST_CHANNEL_NAME]
int ast_queue_control(struct ast_channel *chan, enum ast_control_frame_type control)
Queue a control frame without payload.
struct ast_party_caller caller
struct ast_party_caller caller
Channel Caller ID information.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
struct timeval polaritydelaytv
static int analog_check_for_conference(struct analog_pvt *p)
int(*const start_cid_detect)(void *pvt, int cid_signalling)
CallerID (and other GR30) management and generation Includes code and algorithms from the Zapata libr...
int(*const is_off_hook)(void *pvt)
void * analog_handle_init_event(struct analog_pvt *i, int event)
#define ast_pthread_create_detached(a, b, c, d)
static int analog_stop_cid_detect(struct analog_pvt *p)
static const struct @163 cidtypes[]
struct ast_party_id id
Connected party ID.
void * ast_channel_tech_pvt(const struct ast_channel *chan)
#define ast_channel_unref(c)
Decrease channel reference count.
int(*const is_dialing)(void *pvt, enum analog_sub sub)
static struct ast_frame * __analog_handle_event(struct analog_pvt *p, struct ast_channel *ast)
static int analog_off_hook(struct analog_pvt *p)
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
struct ast_party_name name
Subscriber name.
static int analog_start(struct analog_pvt *p)
int analog_hangup(struct analog_pvt *p, struct ast_channel *ast)
static int analog_set_linear_mode(struct analog_pvt *p, enum analog_sub sub, int linear_mode)
void(*const handle_dtmf)(void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest)
int ast_queue_unhold(struct ast_channel *chan)
Queue an unhold frame.
char mohsuggest[MAX_MUSICCLASS]
#define AST_CAUSE_NETWORK_OUT_OF_ORDER
#define ast_set_flag(p, flag)
static int analog_play_tone(struct analog_pvt *p, enum analog_sub sub, enum analog_tone tone)
char calling_st[SMDI_MAX_STATION_NUM_LEN+1]
static void analog_lock_sub_owner(struct analog_pvt *pvt, enum analog_sub sub_idx)
void ast_callid_threadstorage_auto_clean(ast_callid callid, int callid_created)
Use in conjunction with ast_callid_threadstorage_auto. Cleans up the references and if the callid was...
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
static int analog_train_echocanceller(struct analog_pvt *p)
int(*const dial_digits)(void *pvt, enum analog_sub sub, struct analog_dialoperation *dop)
void(*const hangup_polarityswitch)(void *pvt)
Switch FXS line polarity, based on answeronpolarityswitch and hanguponpolarityswitch.
int(*const check_confirmanswer)(void *pvt)
char callwait_name[AST_MAX_EXTENSION]
struct ast_channel * owner
static int analog_get_callerid(struct analog_pvt *p, char *name, char *number, enum analog_event *ev, size_t timeout)
static int analog_get_event(struct analog_pvt *p)
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
int ast_say_digit_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang)
says digits of a string
static int analog_handle_notify_message(struct ast_channel *chan, struct analog_pvt *p, int cid_flags, int neon_mwievent)
struct analog_callback analog_callbacks
static int analog_start_cid_detect(struct analog_pvt *p, int cid_signalling)
int ast_ignore_pattern(const char *context, const char *pattern)
Checks to see if a number should be ignored.
static void analog_start_polarityswitch(struct analog_pvt *p)
ast_channel_state
ast_channel states
int(*const send_callerid)(void *pvt, int cwcid, struct ast_party_caller *caller)
void analog_handle_dtmf(struct analog_pvt *p, struct ast_channel *ast, enum analog_sub idx, struct ast_frame **dest)
const char * analog_cidstart_to_str(enum analog_cid_start cid_start)
char * str
Subscriber name (Malloced)
const char *(*const get_orig_dialstring)(void *pvt)
#define ANALOG_MATCH_DIGIT_TIMEOUT
Default time (ms) to wait, in case of ambiguous match.
void(*const all_subchannels_hungup)(void *pvt)
int ast_parking_blind_transfer_park(struct ast_bridge_channel *parker, const char *context, const char *exten, transfer_channel_cb parked_channel_cb, struct transfer_channel_data *parked_channel_data)
Perform a blind transfer to a parking extension.
struct ast_channel * ss_astchan
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
unsigned int usedistinctiveringdetection
unsigned int transfertobusy
static void analog_all_subchannels_hungup(struct analog_pvt *p)
int64_t ast_tvdiff_ms(struct timeval end, struct timeval start)
Computes the difference (in milliseconds) between two struct timeval instances.
#define ast_strdup(str)
A wrapper for strdup()
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
int ast_queue_cc_frame(struct ast_channel *chan, const char *const monitor_type, const char *const dialstring, enum ast_cc_service_type service, void *private_data)
Queue an AST_CONTROL_CC frame.
static void analog_publish_dnd_state(int channel, const char *status)
unsigned int hidecallerid
int ast_channel_setoption(struct ast_channel *channel, int option, void *data, int datalen, int block)
Sets an option on a channel.
static char cid_num[AST_MAX_EXTENSION]
static void analog_set_outgoing(struct analog_pvt *p, int is_outgoing)
int polarityonanswerdelay
int analog_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, void *newp)
static void analog_hangup_polarityswitch(struct analog_pvt *p)
#define ast_verb(level,...)
struct ast_smdi_md_message * ast_smdi_md_message_wait(struct ast_smdi_interface *iface, int timeout)
Get the next SMDI message from the queue.
static int analog_wink(struct analog_pvt *p, enum analog_sub index)
int ast_canmatch_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Looks for a valid matching extension.
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
struct ast_frame_subclass subclass
struct ast_cc_config_params * ast_channel_get_cc_config_params(struct ast_channel *chan)
Get the CCSS parameters from a channel.
unsigned int use_smdi
TRUE if SMDI (Simplified Message Desk Interface) is enabled.
struct analog_pvt * analog_new(enum analog_sigtype signallingtype, void *private_data)
static int analog_get_sub_fd(struct analog_pvt *p, enum analog_sub sub)
static const char * analog_get_orig_dialstring(struct analog_pvt *p)
int(*const play_tone)(void *pvt, enum analog_sub sub, enum analog_tone tone)
int ast_queue_hangup_with_cause(struct ast_channel *chan, int cause)
Queue a hangup frame with hangupcause set.
unsigned int cancallforward
static void analog_set_waitingfordt(struct analog_pvt *p, struct ast_channel *ast)
#define ast_strlen_zero(foo)
void(*const set_polarity)(void *pvt, int value)
Set FXS line polarity to 0=IDLE NZ=REVERSED.
enum ast_cc_monitor_policies ast_get_cc_monitor_policy(struct ast_cc_config_params *config)
Get the cc_monitor_policy.
struct ast_channel * owner
int(*const confmute)(void *pvt, int mute)
int ast_callid_threadassoc_add(ast_callid callid)
Adds a known callid to thread storage of the calling thread.
#define gen_analog_field_callback(type, callback_name, def_value)
int(*const allocate_sub)(void *pvt, enum analog_sub sub)
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
struct ast_party_id id
Caller party ID.
enum analog_sigtype sigtype
static void analog_unlock_private(struct analog_pvt *p)
#define EVENT_FLAG_SYSTEM
#define ast_debug(level,...)
Log a DEBUG message.
int(*const check_for_conference)(void *pvt)
void *(*const get_sigpvt_bridged_channel)(struct ast_channel *chan)
static int analog_alloc_sub(struct analog_pvt *p, enum analog_sub x)
void(*const handle_notify_message)(struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent)
struct ast_party_id ani
Automatic Number Identification (ANI)
static void * __analog_ss_thread(void *data)
void ast_channel_rings_set(struct ast_channel *chan, int value)
static int analog_dial_digits(struct analog_pvt *p, enum analog_sub sub, struct analog_dialoperation *dop)
void ast_set_hangupsource(struct ast_channel *chan, const char *source, int force)
Set the source of the hangup in this channel and it's bridge.
void(*const set_needringing)(void *pvt, int value)
int(*const conf_del)(void *pvt, enum analog_sub sub)
static void * analog_get_bridged_channel(struct ast_channel *chan)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
int(*const get_sub_fd)(void *pvt, enum analog_sub sub)
static void analog_swap_subs(struct analog_pvt *p, enum analog_sub a, enum analog_sub b)
static void analog_publish_channel_alarm_clear(int channel)
struct ast_party_connected_line * ast_channel_connected(struct ast_channel *chan)
void(*const set_dialing)(void *pvt, int is_dialing)
void(*const deadlock_avoidance_private)(void *pvt)
void(*const set_callwaiting)(void *pvt, int callwaiting_enable)
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
int(*const start)(void *pvt)
#define AST_MAX_EXTENSION
#define AST_CAUSE_NORMAL_CLEARING
void ast_party_number_init(struct ast_party_number *init)
Initialize the given number structure.
Caller Party information.