438 struct timeval base_tv;
452 struct timeval timeout_start;
471 struct timeval timeout_start;
483 #define FAX_DETECT_MODE_CNG (1 << 0) 484 #define FAX_DETECT_MODE_T38 (1 << 1) 485 #define FAX_DETECT_MODE_BOTH (FAX_DETECT_MODE_CNG | FAX_DETECT_MODE_T38) 490 #define FAX_MAXBUCKETS 10 492 #define RES_FAX_TIMEOUT 10000 493 #define FAX_GATEWAY_TIMEOUT RES_FAX_TIMEOUT 522 #define RES_FAX_MINRATE 4800 523 #define RES_FAX_MAXRATE 14400 524 #define RES_FAX_STATUSEVENTS 0 525 #define RES_FAX_MODEM (AST_FAX_MODEM_V17 | AST_FAX_MODEM_V27TER | AST_FAX_MODEM_V29) 526 #define RES_FAX_T38TIMEOUT 5000 553 static const char *
config =
"res_fax.conf";
581 unsigned int last_consec_frames, last_consec_ms;
582 unsigned char wassil;
591 history->
silence = (dspsilence != 0) ? 1 : 0;
592 if (history->
silence != wassil) {
598 if ((last_consec_frames != 0)) {
599 ast_verb(0,
"Channel '%s' fax session '%u', [ %.3ld.%.6ld ], %s sent %u frames (%u ms) of %s.\n",
600 s->
channame, s->
id, (
long) diff.tv_sec, (
long int) diff.tv_usec,
601 (c2s) ?
"channel" :
"stack", last_consec_frames, last_consec_ms,
602 (wassil) ?
"silence" :
"energy");
672 if (!(details = datastore->
data)) {
783 datastore->
data = details;
814 char *m[5], *tok, *v = (
char *) value, *rest;
817 if (!strchr(v,
',')) {
821 tok = strtok_r(v,
", ", &rest);
824 tok = strtok_r(
NULL,
", ", &rest);
830 for (j = 0; j < i; j++) {
831 if (!strcasecmp(m[j],
"v17")) {
833 }
else if (!strcasecmp(m[j],
"v27")) {
835 }
else if (!strcasecmp(m[j],
"v29")) {
837 }
else if (!strcasecmp(m[j],
"v34")) {
840 ast_log(
LOG_WARNING,
"ignoring invalid modem setting: '%s', valid options {v17 | v27 | v29 | v34}\n", m[j]);
849 size_t size = bufsize;
996 ast_verb(3,
"Unregistering FAX module type '%s'\n", tech->
type);
1000 if (fax->
tech != tech) {
1005 ast_verb(4,
"Unregistered FAX module type '%s'\n", tech->
type);
1017 return "Uninitialized";
1019 return "Initialized";
1036 void ast_fax_log(
int level,
const char *
file,
const int line,
const char *
function,
const char *msg)
1041 ast_log(level, file, line,
function,
"%s", msg);
1050 if (sscanf(ratestr,
"%d", &rate) != 1) {
1065 ast_log(
LOG_WARNING,
"ignoring invalid rate '%s'. Valid options are {2400 | 4800 | 7200 | 9600 | 12000 | 14400 | 28800 | 33600}\n", ratestr);
1177 char caps[128] =
"";
1301 char caps[128] =
"";
1335 if (!details || !json_array) {
1372 char *filenames, *
c;
1384 size += strlen(separator) + strlen(prefix) + strlen(doc->
filename);
1418 if (!json_filenames) {
1422 json_object =
ast_json_pack(
"{s: s, s: s, s: s, s: s, s: o}",
1429 "filenames", json_filenames);
1469 #define GENERIC_FAX_EXEC_SET_VARS(fax, chan, errorstr, reason) \ 1471 if (ast_strlen_zero(fax->details->result)) \ 1472 ast_string_field_set(fax->details, result, "FAILED"); \ 1473 if (ast_strlen_zero(fax->details->resultstr)) \ 1474 ast_string_field_set(fax->details, resultstr, reason); \ 1475 if (ast_strlen_zero(fax->details->error)) \ 1476 ast_string_field_set(fax->details, error, errorstr); \ 1477 set_channel_variables(chan, fax->details); \ 1480 #define GENERIC_FAX_EXEC_ERROR_QUIET(fax, chan, errorstr, reason) \ 1482 GENERIC_FAX_EXEC_SET_VARS(fax, chan, errorstr, reason); \ 1485 #define GENERIC_FAX_EXEC_ERROR(fax, chan, errorstr, reason) \ 1487 ast_log(LOG_ERROR, "channel '%s' FAX session '%u' failure, reason: '%s' (%s)\n", ast_channel_name(chan), fax->id, reason, errorstr); \ 1488 GENERIC_FAX_EXEC_ERROR_QUIET(fax, chan, errorstr, reason); \ 1532 struct timeval start;
1560 (frame->
datalen ==
sizeof(t38_parameters))) {
1595 unsigned int expected_frametype = -1;
1599 const char *tempvar;
1606 struct timeval start;
1611 if (t38negotiated) {
1689 while (remaining_time > 0) {
1716 (frame->
datalen ==
sizeof(t38_parameters))) {
1717 unsigned int was_t38 = t38negotiated;
1742 if (t38negotiated && !was_t38) {
1789 }
else if (ofd == fax->
fd) {
1792 if (!(frame = fax->
tech->
read(fax))) {
1805 if (ms && (ofd < 0)) {
1808 if (remaining_time <= 0)
1819 if (remaining_time <= 0) {
1826 ast_debug(3,
"channel '%s' - event loop stopped { timeout: %d, remaining_time: %d }\n",
ast_channel_name(chan), timeout, remaining_time);
1831 if (!strcasecmp(details->
result,
"FAILED")) {
1844 if (orig_read_format) {
1847 if (orig_write_format) {
1861 struct timeval start;
1895 (frame->
datalen ==
sizeof(t38_parameters))) {
1964 (frame->
datalen ==
sizeof(t38_parameters))) {
2025 if (!json_array || !json_filename) {
2032 const char *remote_station_id;
2033 const char *local_station_id;
2034 const char *fax_pages;
2035 const char *fax_resolution;
2036 const char *fax_bitrate;
2041 remote_station_id =
ast_strdupa(remote_station_id);
2060 json_object =
ast_json_pack(
"{s: s, s: s, s: s, s: s, s: s, s: s, s: o}",
2062 "remote_station_id",
S_OR(remote_station_id,
""),
2063 "local_station_id",
S_OR(local_station_id,
""),
2064 "fax_pages",
S_OR(fax_pages,
""),
2065 "fax_resolution",
S_OR(fax_resolution,
""),
2066 "fax_bitrate",
S_OR(fax_bitrate,
""),
2084 char *
parse, modems[128] =
"";
2088 struct ast_fax_tech_token *token =
NULL;
2110 ast_log(
LOG_ERROR,
"System cannot provide memory for session requirements.\n");
2120 ast_string_field_set(details, resultstr,
"can't receive a fax on a channel with a T.38 gateway");
2122 ast_log(
LOG_ERROR,
"executing ReceiveFAX on a channel with a T.38 Gateway is not supported\n");
2136 ast_log(
LOG_ERROR,
"'modems' setting '%s' is incompatible with 'minrate' setting %u\n", modems, details->
minrate);
2145 ast_log(
LOG_ERROR,
"'modems' setting '%s' is incompatible with 'maxrate' setting %u\n", modems, details->
maxrate);
2191 if (!(doc =
ast_calloc(1,
sizeof(*doc) + strlen(
args.filename) + 1))) {
2195 ast_log(
LOG_ERROR,
"System cannot provide memory for session requirements.\n");
2280 return (!channel_alive) ? -1 : 0;
2288 struct timeval start;
2301 if (
ast_playtones_start(chan, 1024,
"!1100/500,!0/3000,!1100/500,!0/3000,!1100/500,!0/3000", 1)) {
2330 (frame->
datalen ==
sizeof(t38_parameters))) {
2402 (frame->
datalen ==
sizeof(t38_parameters))) {
2472 (frame->
datalen ==
sizeof(t38_parameters))) {
2534 if (!json_filenames) {
2539 const char *remote_station_id;
2540 const char *local_station_id;
2541 const char *fax_pages;
2542 const char *fax_resolution;
2543 const char *fax_bitrate;
2548 remote_station_id =
ast_strdupa(remote_station_id);
2566 json_obj =
ast_json_pack(
"{s: s, s: s, s: s, s: s, s: s, s: s, s: o}",
2568 "remote_station_id",
S_OR(remote_station_id,
""),
2569 "local_station_id",
S_OR(local_station_id,
""),
2570 "fax_pages",
S_OR(fax_pages,
""),
2571 "fax_resolution",
S_OR(fax_resolution,
""),
2572 "fax_bitrate",
S_OR(fax_bitrate,
""),
2573 "filenames", json_filenames);
2592 char *
parse, *filenames, *
c, modems[128] =
"";
2593 int channel_alive, file_count;
2596 struct ast_fax_tech_token *token =
NULL;
2618 ast_log(
LOG_ERROR,
"System cannot provide memory for session requirements.\n");
2630 ast_log(
LOG_ERROR,
"executing SendFAX on a channel with a T.38 Gateway is not supported\n");
2644 ast_log(
LOG_ERROR,
"'modems' setting '%s' is incompatible with 'minrate' setting %u\n", modems, details->
minrate);
2653 ast_log(
LOG_ERROR,
"'modems' setting '%s' is incompatible with 'maxrate' setting %u\n", modems, details->
maxrate);
2698 filenames =
args.filenames;
2699 while ((c =
strsep(&filenames,
"&"))) {
2700 if (access(c, (F_OK | R_OK)) < 0) {
2704 ast_log(
LOG_ERROR,
"access failure. Verify '%s' exists and check permissions.\n",
args.filenames);
2708 if (!(doc =
ast_calloc(1,
sizeof(*doc) + strlen(c) + 1))) {
2712 ast_log(
LOG_ERROR,
"System cannot provide memory for session requirements.\n");
2728 if (file_count > 1) {
2808 return (!channel_alive) ? -1 : 0;
2817 return (!channel_alive) ? -1 : 0;
2898 ast_log(
LOG_ERROR,
"Can't reserve a FAX session, gateway attempt failed.\n");
2940 ast_log(
LOG_ERROR,
"Can't create a FAX session, gateway attempt failed.\n");
2954 if (start_res < 0) {
2981 .datalen =
sizeof(t38_parameters),
2983 .data.ptr = &t38_parameters,
3014 struct ast_channel *other = (active == chan) ? peer : chan;
3021 if (active_v21_session->
tech->
write(active_v21_session, f) == 0 &&
3064 if (active == chan) {
3068 if (active == chan) {
3087 if (active == chan) {
3112 struct ast_channel *other = (active == chan) ? peer : chan;
3194 ast_debug(1,
"%s is attempting to negotiate T.38 after we already sent a negotiation request based on v21 preamble detection\n",
ast_channel_name(active));
3350 switch (gateway->
s->
state) {
3451 if (chan_is_hungup || peer_is_hungup) {
3602 short silence_buf[f->
samples];
3606 .data.ptr = silence_buf,
3608 .datalen =
sizeof(silence_buf),
3610 memset(silence_buf, 0,
sizeof(silence_buf));
3633 .disable_inheritance = 1,
3657 fr_hook.
data = gateway;
3680 if (faxdetect->
dsp) {
3712 if (!faxdetect->
dsp) {
3809 if (!faxdetect->
dsp) {
3847 const char *target_context;
3859 ast_verb(2,
"Redirecting '%s' to fax extension due to %s detection\n",
3867 (result ==
'f') ?
"CNG" :
"T38", target_context);
3900 ast_log(
LOG_ERROR,
"System cannot provide memory for session requirements.\n");
3911 fr_hook.
data = faxdetect;
3956 tklen = strlen(a->
word);
3959 snprintf(tbuf,
sizeof(tbuf),
"%u", s->
id);
3960 if (!strncasecmp(a->
word, tbuf, tklen) && ++wordnum > a->
n) {
3977 e->
command =
"fax show version";
3979 "Usage: fax show version\n" 3980 " Show versions of FAX For Asterisk components.\n";
3990 ast_cli(a->
fd,
"FAX For Asterisk Components:\n");
4010 e->
command =
"fax set debug {on|off}";
4012 "Usage: fax set debug { on | off }\n" 4013 " Enable/Disable FAX debugging on new FAX sessions. The basic FAX debugging will result in\n" 4014 " additional events sent to manager sessions with 'call' class permissions. When\n" 4015 " verbosity is greater than '5' events will be displayed to the console and audio versus\n" 4016 " energy analysis will be performed and displayed to the console.\n";
4023 if (!strcasecmp(what,
"on")) {
4025 }
else if (!strcasecmp(what,
"off")) {
4032 ast_cli(a->
fd,
"\n\nFAX Debug %s\n\n", (flag) ?
"Enabled" :
"Disabled");
4041 unsigned int num_modules = 0;
4045 e->
command =
"fax show capabilities";
4047 "Usage: fax show capabilities\n" 4048 " Shows the capabilities of the registered FAX technology modules\n";
4054 ast_cli(a->
fd,
"\n\nRegistered FAX Technology Modules:\n\n");
4062 ast_cli(a->
fd,
"%u registered modules\n\n", num_modules);
4071 char modems[128] =
"";
4076 e->
command =
"fax show settings";
4078 "Usage: fax show settings\n" 4079 " Show the global settings and defaults of both the FAX core and technology modules\n";
4087 ast_cli(a->
fd,
"FAX For Asterisk Settings:\n");
4088 ast_cli(a->
fd,
"\tECM: %s\n", options.
ecm ?
"Enabled" :
"Disabled");
4093 ast_cli(a->
fd,
"\tModem Modulations Allowed: %s\n", modems);
4095 ast_cli(a->
fd,
"\n\nFAX Technology Modules:\n\n");
4113 e->
command =
"fax show session";
4115 "Usage: fax show session <session number>\n" 4116 " Shows status of the named FAX session\n";
4126 if (sscanf(a->
argv[3],
"%u", &tmp.
id) != 1) {
4131 ast_cli(a->
fd,
"\nFAX Session Details:\n--------------------\n\n");
4147 char id_text[256] =
"";
4151 if (sscanf(session_number,
"%30u", &find_session.
id) != 1) {
4163 astman_send_error(s, m,
"Fax technology doesn't provide a handler for FAXSession");
4169 snprintf(id_text,
sizeof(id_text),
"ActionID: %s\r\n", action_id);
4187 e->
command =
"fax show stats";
4189 "Usage: fax show stats\n" 4190 " Shows a statistical summary of FAX transmissions\n";
4196 ast_cli(a->
fd,
"\nFAX Statistics:\n---------------\n\n");
4217 char id_text[256] =
"";
4222 snprintf(id_text,
sizeof(id_text),
"ActionID: %s\r\n", action_id);
4227 "CurrentSessions: %d\r\n" 4228 "ReservedSessions: %d\r\n" 4229 "TransmitAttempts: %d\r\n" 4230 "ReceiveAttempts: %d\r\n" 4231 "CompletedFAXes: %d\r\n" 4232 "FailedFAXes: %d\r\n" 4282 e->
command =
"fax show sessions";
4284 "Usage: fax show sessions\n" 4285 " Shows the current FAX sessions\n";
4291 ast_cli(a->
fd,
"\nCurrent FAX Sessions:\n\n");
4292 ast_cli(a->
fd,
"%-30.30s %-10.10s %-10.10s %-5.5s %-10.10s %-15.15s %-30.30s\n",
4293 "Channel",
"Tech",
"FAXID",
"Type",
"Operation",
"State",
"File(s)");
4300 ast_cli(a->
fd,
"%-30.30s %-10.10s %-10u %-5.5s %-10.10s %-15.15s %-30s\n",
4312 ast_cli(a->
fd,
"\n%d FAX sessions\n\n", session_count);
4334 "Technology: %s\r\n" 4335 "SessionNumber: %u\r\n" 4336 "SessionType: %s\r\n" 4359 snprintf(id_text,
sizeof(id_text),
"ActionID: %s\r\n", action_id);
4408 if (sscanf(value,
"%u", &timeout) != 1) {
4411 }
else if (timeout) {
4427 char modems[128] =
"";
4445 config, reload ?
"not changing" :
"using default");
4451 config, reload ?
"not changing" :
"using default");
4467 if (!strcasecmp(v->
name,
"minrate")) {
4468 ast_debug(3,
"reading minrate '%s' from configuration file\n", v->
value);
4474 }
else if (!strcasecmp(v->
name,
"maxrate")) {
4475 ast_debug(3,
"reading maxrate '%s' from configuration file\n", v->
value);
4481 }
else if (!strcasecmp(v->
name,
"statusevents")) {
4482 ast_debug(3,
"reading statusevents '%s' from configuration file\n", v->
value);
4484 }
else if (!strcasecmp(v->
name,
"ecm")) {
4485 ast_debug(3,
"reading ecm '%s' from configuration file\n", v->
value);
4487 }
else if ((!strcasecmp(v->
name,
"modem")) || (!strcasecmp(v->
name,
"modems"))) {
4490 }
else if (!strcasecmp(v->
name,
"t38timeout")) {
4506 ast_log(
LOG_ERROR,
"'modems' setting '%s' is incompatible with 'minrate' setting %u\n", modems, options.
minrate);
4513 ast_log(
LOG_ERROR,
"'modems' setting '%s' is incompatible with 'maxrate' setting %u\n", modems, options.
maxrate);
4536 if (!strcasecmp(data,
"ecm")) {
4538 }
else if (!strcasecmp(data,
"t38gateway") || !strcasecmp(data,
"gateway") ||
4539 !strcasecmp(data,
"t38_gateway") || !strcasecmp(data,
"faxgateway")) {
4541 }
else if (!strcasecmp(data,
"faxdetect")) {
4543 }
else if (!strcasecmp(data,
"error")) {
4545 }
else if (!strcasecmp(data,
"filename")) {
4552 }
else if (!strcasecmp(data,
"filenames")) {
4563 }
else if (!strcasecmp(data,
"headerinfo")) {
4565 }
else if (!strcasecmp(data,
"localstationid")) {
4567 }
else if (!strcasecmp(data,
"maxrate")) {
4568 snprintf(buf, len,
"%u", details->
maxrate);
4569 }
else if (!strcasecmp(data,
"minrate")) {
4570 snprintf(buf, len,
"%u", details->
minrate);
4571 }
else if (!strcasecmp(data,
"pages")) {
4573 }
else if (!strcasecmp(data,
"rate")) {
4575 }
else if (!strcasecmp(data,
"remotestationid")) {
4577 }
else if (!strcasecmp(data,
"resolution")) {
4579 }
else if (!strcasecmp(data,
"sessionid")) {
4580 snprintf(buf, len,
"%u", details->
id);
4581 }
else if (!strcasecmp(data,
"status")) {
4583 }
else if (!strcasecmp(data,
"statusstr")) {
4585 }
else if ((!strcasecmp(data,
"modem")) || (!strcasecmp(data,
"modems"))) {
4587 }
else if (!strcasecmp(data,
"t38timeout")) {
4588 snprintf(buf, len,
"%u", details->
t38timeout);
4589 }
else if (!strcasecmp(data,
"negotiate_both")) {
4612 if (!strcasecmp(data,
"ecm")) {
4621 }
else if (!strcasecmp(data,
"t38gateway") || !strcasecmp(data,
"gateway") ||
4622 !strcasecmp(data,
"t38_gateway") || !strcasecmp(data,
"faxgateway")) {
4624 char *timeout = strchr(val,
',');
4634 unsigned int gwtimeout;
4636 if (sscanf(timeout,
"%30u", &gwtimeout) == 1) {
4639 ast_log(
LOG_WARNING,
"Unsupported timeout '%s' passed to FAXOPT(%s).\n", timeout, data);
4661 }
else if (!strcasecmp(data,
"faxdetect")) {
4663 char *timeout = strchr(val,
',');
4672 if (
ast_true(val) || !strcasecmp(val,
"t38") || !strcasecmp(val,
"cng")) {
4675 if (sscanf(timeout,
"%30u", &fdtimeout) == 1) {
4683 if (!strcasecmp(val,
"t38")) {
4685 }
else if (!strcasecmp(val,
"cng")) {
4692 if (faxdetect < 0) {
4709 }
else if (!strcasecmp(data,
"headerinfo")) {
4711 }
else if (!strcasecmp(data,
"localstationid")) {
4713 }
else if (!strcasecmp(data,
"maxrate")) {
4718 }
else if (!strcasecmp(data,
"minrate")) {
4723 }
else if (!strcasecmp(data,
"t38timeout")) {
4727 }
else if ((!strcasecmp(data,
"modem")) || (!strcasecmp(data,
"modems"))) {
4729 }
else if (!strcasecmp(data,
"negotiate_both")) {
static int receivefax_exec(struct ast_channel *chan, const char *data)
initiate a receive FAX session
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
struct ast_variable * next
static enum ast_t38_state ast_channel_get_t38_state(struct ast_channel *chan)
Retrieves the current T38 state of a channel.
const ast_string_field result
int(*const switch_to_t38)(struct ast_fax_session *)
#define GENERIC_FAX_EXEC_ERROR(fax, chan, errorstr, reason)
#define ast_rwlock_rdlock(a)
#define ast_channel_lock(chan)
struct ast_frame * ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp, struct ast_frame *inf)
Return AST_FRAME_NULL frames when there is silence, AST_FRAME_BUSY on busies, and call progress...
Main Channel structure associated with a channel.
static const struct ast_app_option fax_exec_options[128]
static int receivefax_t38_init(struct ast_channel *chan, struct ast_fax_session_details *details)
static int manager_fax_sessions_entry(struct mansession *s, struct ast_fax_session *session, const char *id_text)
#define AST_CLI_DEFINE(fn, txt,...)
static struct ast_control_t38_parameters our_t38_parameters
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
#define AST_FAX_FRFLAG_GATEWAY
Asterisk locking-related definitions:
void astman_append(struct mansession *s, const char *fmt,...)
Asterisk main include file. File version handling, generic pbx functions.
const struct ast_fax_tech * tech
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
static void destroy_faxdetect(void *data)
destroy a FAX detect structure
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
#define AST_RWLOCK_DEFINE_STATIC(rwlock)
static void destroy_session_details(void *details)
destroy a FAX session details structure
int(*const generate_silence)(struct ast_fax_session *)
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
#define ast_smoother_feed(s, f)
struct ast_smoother * ast_smoother_new(int bytes)
unsigned int consec_frames
#define AST_RWLIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a read/write list of specified type, statically initialized...
String manipulation functions.
unsigned long frames_sent
const ast_string_field headerinfo
static int fax_gateway_start(struct fax_gateway *gateway, struct ast_fax_session_details *details, struct ast_channel *chan)
Create a fax session and start T.30<->T.38 gateway mode.
unsigned long frames_received
static unsigned int fax_rate_str_to_int(const char *ratestr)
convert a rate string to a rate
Asterisk version information.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define ast_test_flag(p, flag)
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category_name)
Support for translation of data formats. translate.c.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
static const char app_sendfax[]
static int generic_fax_exec(struct ast_channel *chan, struct ast_fax_session_details *details, struct ast_fax_session *reserved, struct ast_fax_tech_token *token)
this is the generic FAX session handling function
void ast_dsp_free(struct ast_dsp *dsp)
char *(*const cli_show_stats)(int)
const char * ast_get_version(void)
Retrieve the Asterisk version string.
used for gateway framehook
Convenient Signal Processing routines.
#define AST_RWLIST_WRLOCK(head)
Write locks a list.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
void astman_send_list_complete_start(struct mansession *s, const struct message *m, const char *event_name, int count)
Start the list complete event.
enum ast_fax_modems modems
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
descriptor for a cli entry.
static int manager_fax_session(struct mansession *s, const struct message *m)
static ast_rwlock_t options_lock
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
#define CONFIG_STATUS_FILEINVALID
static char * ast_fax_caps_to_str(enum ast_fax_capabilities caps, char *buf, size_t bufsize)
struct ast_dsp * ast_dsp_new(void)
Allocates a new dsp, assumes 8khz for internal sample rate.
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
static void destroy_session(void *session)
destroy a FAX session structure
void ast_fax_tech_unregister(struct ast_fax_tech *tech)
unregister a FAX technology module
static struct ast_json * generate_filenames_json(struct ast_fax_session_details *details)
struct ast_config * ast_config_load2(const char *filename, const char *who_asked, struct ast_flags flags)
Load a config file.
Structure for variables, used for configurations and for channel variables.
const ast_string_field transfer_rate
int framehook
framehook used in gateway mode
static void t38_parameters_ast_to_fax(struct ast_fax_t38_parameters *dst, const struct ast_control_t38_parameters *src)
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
static void t38_parameters_fax_to_ast(struct ast_control_t38_parameters *dst, const struct ast_fax_t38_parameters *src)
int ast_tvzero(const struct timeval t)
Returns true if the argument is 0,0.
void(*const release_token)(struct ast_fax_tech_token *)
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
static struct ast_frame * fax_gateway_detect_v21(struct fax_gateway *gateway, struct ast_channel *chan, struct ast_channel *peer, struct ast_channel *active, struct ast_frame *f)
static struct fax_detect * fax_detect_new(struct ast_channel *chan, int timeout, int flags)
Create a new fax detect object.
struct ast_smoother * smoother
enum ast_control_t38 request_response
static int session_hash_cb(const void *obj, const int flags)
hash callback for ao2
Structure for a data store type.
ast_channel_state
ast_channel states
const struct ast_fax_tech * tech
used for fax detect framehook
int ast_indicate_data(struct ast_channel *chan, int condition, const void *data, size_t datalen)
Indicates condition of channel, with payload.
static int report_send_fax_status(struct ast_channel *chan, struct ast_fax_session_details *details)
Report on the status of a completed fax send attempt.
#define ast_log_dynamic_level(level,...)
Send a log message to a dynamically registered log level.
#define DSP_FAXMODE_DETECT_SQUELCH
ast_t38_state
Possible T38 states on channels.
int(*const cancel_session)(struct ast_fax_session *)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
enum ast_control_t38_rate rate
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
void astman_send_ack(struct mansession *s, const struct message *m, char *msg)
Send ack in manager transaction.
struct ast_frame * ast_translate(struct ast_trans_pvt *tr, struct ast_frame *f, int consume)
translates one or more frames Apply an input frame into the translator and receive zero or one output...
static int session_cmp_cb(void *obj, void *arg, int flags)
compare callback for ao2
struct ast_fax_session * chan_v21_session
int64_t ast_tvdiff_ms(struct timeval end, struct timeval start)
Computes the difference (in milliseconds) between two struct timeval instances.
static void fax_gateway_indicate_t38(struct ast_channel *chan, struct ast_channel *active, struct ast_control_t38_parameters *control_params)
t38state
T38 States for a call.
#define ast_strdup(str)
A wrapper for strdup()
Structure for a data store object.
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
const char *const description
void ast_playtones_stop(struct ast_channel *chan)
Stop playing tones on a channel.
static const struct ast_datastore_info fax_datastore
static struct ast_frame * fax_gateway_request_t38(struct fax_gateway *gateway, struct ast_channel *chan)
static struct ast_fax_session_details * session_details_new(void)
create a FAX session details structure
I/O Management (derived from Cheops-NG)
struct ast_channel * chan
void ast_cli(int fd, const char *fmt,...)
void ast_fax_log(int level, const char *file, const int line, const char *function, const char *msg)
Log message at FAX or recommended level.
struct ast_fax_session * s
FAX Session.
#define ast_rwlock_unlock(a)
static int fax_gateway_attach(struct ast_channel *chan, struct ast_fax_session_details *details)
Attach a gateway framehook object to a channel.
static struct ast_frame * fax_gateway_framehook(struct ast_channel *chan, struct ast_frame *f, enum ast_framehook_event event, void *data)
T.30<->T.38 gateway framehook.
int ast_unregister_application(const char *app)
Unregister an application.
struct ast_format * peer_read_format
static struct ast_fax_session * fax_v21_session_new(struct ast_channel *chan)
struct ast_channel * ast_waitfor_nandfds(struct ast_channel **chan, int n, int *fds, int nfds, int *exception, int *outfd, int *ms)
Waits for activity on a group of channels.
Asterisk internal frame definitions.
#define ast_verb(level,...)
struct ast_trans_pvt * ast_channel_readtrans(const struct ast_channel *chan)
int ast_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
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
int args
This gets set in ast_cli_register()
const char * astman_get_header(const struct message *m, char *var)
Get header from mananger transaction.
static int load_module(void)
Load the module.
#define ast_module_unref(mod)
Release a reference to the module.
#define ast_strlen_zero(foo)
static struct ast_frame * fax_detect_framehook(struct ast_channel *chan, struct ast_frame *f, enum ast_framehook_event event, void *data)
Fax Detect Framehook.
struct ast_format * ast_channel_readformat(struct ast_channel *chan)
#define AST_APP_OPTIONS(holder, options...)
Declares an array of options for an application.
static char * cli_fax_show_sessions(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
display fax sessions
static void fixup_callback(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
Copies fax detection and gateway framehooks during masquerades.
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
void ast_logger_unregister_level(const char *name)
Unregister a previously registered logger level.
union ast_fax_session_details::@290 option
Configuration File Parser.
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
void ast_smoother_free(struct ast_smoother *s)
struct ast_fax_debug_info * debug_info
static int update_modem_bits(enum ast_fax_modems *bits, const char *value)
#define ast_debug(level,...)
Log a DEBUG message.
static int acf_faxopt_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
FAXOPT write function modifies the contents of a FAX option.
#define GENERIC_FAX_EXEC_SET_VARS(fax, chan, errorstr, reason)
unsigned int transcoding_mmr
struct ast_fax_t38_parameters our_t38_parameters
int ast_channel_make_compatible(struct ast_channel *chan, struct ast_channel *peer)
Make the frame formats of two channels compatible.
int ast_build_string(char **buffer, size_t *space, const char *fmt,...)
Build a string in a buffer, designed to be called repeatedly.
static char * cli_fax_show_version(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
#define SCOPED_CHANNELLOCK(varname, chan)
scoped lock specialization for channels.
General Asterisk PBX channel definitions.
static char * cli_fax_show_session(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
display details of a specified fax session
enum ast_fax_capabilities caps
struct ast_fax_tech_token *(*const reserve_session)(struct ast_fax_session *)
void astman_send_list_complete_end(struct mansession *s)
End the list complete event.
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
struct ast_json * ast_json_string_create(const char *value)
Construct a JSON string from value.
static int disable_t38(struct ast_channel *chan)
#define ast_string_field_init(x, size)
Initialize a field pool and fields.
static struct ast_mansession session
Data structure associated with a custom dialplan function.
static int check_modem_rate(enum ast_fax_modems modems, unsigned int rate)
#define AST_RWLIST_TRAVERSE
static const char app_receivefax[]
static void destroy_gateway(void *data)
destroy a FAX gateway session structure
struct ast_format * peer_write_format
#define ao2_ref(o, delta)
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
struct ast_fax_session_details * details
enum ast_control_t38_rate rate
void ast_config_destroy(struct ast_config *config)
Destroys a config.
In case you didn't read that giant block of text above the mansession_session struct, the struct mansession is named this solely to keep the API the same in Asterisk. This structure really represents data that is different from Manager action to Manager action. The mansession_session pointer contained within points to session-specific data.
#define DSP_FEATURE_FAX_DETECT
#define AST_RWLIST_REMOVE_CURRENT
#define ast_strdupa(s)
duplicate a string in memory from the stack
int detected_v21
1 if a v21 preamble has been detected
unsigned int ast_fax_minrate(void)
get the minimum supported fax rate
struct ast_fax_session_details * details
fax session details
int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode)
Set fax mode.
static struct ast_fax_session * fax_session_new(struct ast_fax_session_details *details, struct ast_channel *chan, struct ast_fax_session *reserved, struct ast_fax_tech_token *token)
create a FAX session
static void destroy_v21_sessions(struct fax_gateway *gateway)
destroy the v21 detection parts of a fax gateway session
The data communicated between the high level applications and the generic fax function.
#define ast_malloc(len)
A wrapper for malloc()
struct ao2_container * container
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
static int sendfax_exec(struct ast_channel *chan, const char *data)
initiate a send FAX session
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
struct ast_module * module
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
struct ast_format * chan_read_format
original audio formats
int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags *flags, char **args, char *optstr)
Parses a string containing application options and sets flags/arguments.
const ast_string_field remotestationid
int ast_logger_register_level(const char *name)
Register a new logger level.
const char * ast_channel_exten(const struct ast_channel *chan)
Core PBX routines and definitions.
struct ast_json * ast_json_array_create(void)
Create a empty JSON array.
int ast_check_hangup(struct ast_channel *chan)
Check to see if a channel is needing hang up.
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN
int ast_json_array_append(struct ast_json *array, struct ast_json *value)
Append to an array.
#define CONFIG_STATUS_FILEUNCHANGED
void ast_dsp_set_threshold(struct ast_dsp *dsp, int threshold)
Set the minimum average magnitude threshold to determine talking by the DSP.
const char * ast_channel_uniqueid(const struct ast_channel *chan)
struct stasis_topic * ast_channel_topic(struct ast_channel *chan)
A topic which publishes the events for a particular channel.
void ast_dsp_reset(struct ast_dsp *dsp)
Reset total silence count.
int ast_manager_unregister(const char *action)
Unregister a registered manager command.
unsigned int transcoding_mmr
unsigned int transcoding_jbig
static void fax_gateway_framehook_destroy(void *data)
Destroy the gateway data structure when the framehook is detached.
static int set_fax_t38_caps(struct ast_channel *chan, struct ast_fax_session_details *details)
ast_fax_modems
fax modem capabilities
static struct ast_fax_session_details * find_or_create_details(struct ast_channel *chan)
returns a reference counted details structure from the channel's fax datastore. If the datastore does...
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
#define FAX_DETECT_MODE_CNG
FAX Detect flags.
void(*const destroy_session)(struct ast_fax_session *)
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
static struct ast_frame * fax_gateway_detect_t38(struct fax_gateway *gateway, struct ast_channel *chan, struct ast_channel *peer, struct ast_channel *active, struct ast_frame *f)
T38 Gateway Negotiate t38 parameters.
unsigned int pages_transferred
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
static void fax_session_release(struct ast_fax_session *s, struct ast_fax_tech_token *token)
Release a session token.
#define ao2_unlink(container, obj)
int ast_remaining_ms(struct timeval start, int max_ms)
Calculate remaining milliseconds given a starting timestamp and upper bound.
unsigned int fill_bit_removal
struct ast_format * chan_write_format
#define AST_FRAMEHOOK_INTERFACE_VERSION
struct timeval timeout_start
the start of our timeout counter
static void set_channel_variables(struct ast_channel *chan, struct ast_fax_session_details *details)
Set fax related channel variables.
struct ast_fax_documents documents
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
used to register a FAX technology module with res_fax
char * ast_skip_blanks(const char *str)
Gets a pointer to the first non-whitespace character in a string.
struct sla_ringing_trunk * first
#define ao2_iterator_next(iter)
#define ao2_alloc(data_size, destructor_fn)
#define FAX_MAXBUCKETS
maximum buckets for res_fax ao2 containers
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define FAX_GATEWAY_TIMEOUT
#define ast_channel_unlock(chan)
static void parse(struct mgcp_request *req)
void ast_dsp_set_features(struct ast_dsp *dsp, int features)
Select feature set.
void stasis_publish(struct stasis_topic *topic, struct stasis_message *message)
Publish a message to a topic's subscribers.
static int manager_fax_stats(struct mansession *s, const struct message *m)
#define ast_calloc(num, len)
A wrapper for calloc()
const char *const version
#define RES_FAX_STATUSEVENTS
static int set_t38timeout(const char *value, unsigned int *t38timeout)
static int acf_faxopt_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
FAXOPT read function returns the contents of a FAX option.
static int reload_module(void)
static char * cli_fax_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
enable FAX debugging
void *(*const new_session)(struct ast_fax_session *, struct ast_fax_tech_token *)
ast_fax_capabilities
capabilities for res_fax to locate a fax technology module
ast_fax_state
current state of a fax session
enum ast_fax_modems modems
int ast_write(struct ast_channel *chan, struct ast_frame *frame)
Write a frame to a channel This function writes the given frame to the indicated channel.
void(*const manager_fax_session)(struct mansession *, const char *, struct ast_fax_session *)
struct ast_format * orig_format
original audio formats
Module has failed to load, may be in an inconsistent state.
#define ast_frisolate(fr)
Makes a frame independent of any static storage.
#define ao2_find(container, arg, flags)
static int fax_logger_level
static int unload_module(void)
unload res_fax
enum ast_t38_state t38_state
a flag to track the state of our negotiation
unsigned int ast_fax_maxrate(void)
get the maxiumum supported fax rate
static int global_fax_debug
#define ast_string_field_build(x, field, fmt, args...)
Set a field to a complex (built) value.
Structure used to handle boolean flags.
static const char * fax_session_type(struct ast_fax_session *s)
static const char * config
Support for logging to various files, console and syslog Configuration in file logger.conf.
static void destroy_callback(void *data)
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
struct stasis_message * ast_channel_blob_create_from_cache(const char *uniqueid, struct stasis_message_type *type, struct ast_json *blob)
Create a ast_channel_blob message, pulling channel state from the cache.
unsigned int transcoding_jbig
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
static void fax_detect_framehook_destroy(void *data)
Deref the faxdetect data structure when the faxdetect framehook is detached.
#define ast_rwlock_wrlock(a)
#define ast_module_running_ref(mod)
Hold a reference to the module if it is running.
struct ast_frame ast_null_frame
#define ast_channel_lock_both(chan1, chan2)
Lock two channels.
#define EVENT_FLAG_REPORTING
static struct ast_fax_session * fax_session_reserve(struct ast_fax_session_details *details, struct ast_fax_tech_token **token)
Reserve a fax session.
registered FAX technology modules are put into this list
int ast_dsp_silence(struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence)
Process the audio frame for silence.
#define AST_RWLIST_INSERT_TAIL
#define AST_LIST_HEAD_INIT_NOLOCK(head)
Initializes a list head structure.
char *(*const cli_show_session)(struct ast_fax_session *, int)
char * strsep(char **str, const char *delims)
static struct @460 faxregistry
The faxregistry is used to manage information and statistics for all FAX sessions.
static int set_config(int reload)
configure res_fax
#define ao2_replace(dst, src)
int ast_waitfor(struct ast_channel *chan, int ms)
Wait for input on a channel.
const char * ast_fax_session_operation_str(struct ast_fax_session *s)
get string representation of a FAX session's operation
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Standard Command Line Interface.
struct ast_frame * ast_smoother_read(struct ast_smoother *s)
static int report_receive_fax_status(struct ast_channel *chan, const char *filename)
Report on the final state of a receive fax operation.
struct ast_fax_document * next
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
static int manager_fax_sessions(struct mansession *s, const struct message *m)
static struct ast_fax_session_details * find_details(struct ast_channel *chan)
returns a reference counted pointer to a fax datastore, if it exists
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
struct ast_frame *(*const read)(struct ast_fax_session *)
struct ast_channel * ast_channel_bridge_peer(struct ast_channel *chan)
Get the channel's bridge peer only if the bridge is two-party.
struct ast_fax_tech_token * token
reserved fax session token
const char * ast_channel_name(const struct ast_channel *chan)
int attribute_pure ast_false(const char *val)
Make sure something is false. Determine if a string containing a boolean value is "false"...
static void set_general_options(const struct fax_options *options)
static struct fax_options general_options
static int fax_detect_attach(struct ast_channel *chan, int timeout, int flags)
Attach a faxdetect framehook object to a channel.
static int report_fax_status(struct ast_channel *chan, struct ast_fax_session_details *details, const char *status)
send a FAX status manager event
int ast_async_goto(struct ast_channel *chan, const char *context, const char *exten, int priority)
Set the channel to next execute the specified dialplan location.
int ast_answer(struct ast_channel *chan)
Answer a channel.
static struct fax_gateway * fax_gateway_new(struct ast_channel *chan, struct ast_fax_session_details *details)
Create a new fax gateway object.
enum ast_control_t38_rate_management rate_management
int ast_queue_control_data(struct ast_channel *chan, enum ast_control_frame_type control, const void *data, size_t datalen)
Queue a control frame with payload.
The data required to handle a fax session.
static char * fax_session_tab_complete(struct ast_cli_args *a)
fax session tab completion
static void debug_check_frame_for_silence(struct ast_fax_session *s, unsigned int c2s, struct ast_frame *frame)
struct ast_dsp * dsp
DSP Processor.
Data structure associated with a single frame of data.
enum ast_control_t38_rate_management rate_management
static char * cli_fax_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
display global defaults and settings
enum ast_fax_capabilities caps
int ast_fax_tech_register(struct ast_fax_tech *tech)
register a FAX technology module
Abstract JSON element (object, array, string, int, ...).
int ast_playtones_start(struct ast_channel *chan, int vol, const char *tonelist, int interruptible)
Start playing a list of tones on a channel.
Options provided by main asterisk program.
int(*const write)(struct ast_fax_session *, const struct ast_frame *)
#define DSP_FAXMODE_DETECT_CNG
const char * ast_channel_context(const struct ast_channel *chan)
int error(const char *format,...)
struct timeval ast_tvsub(struct timeval a, struct timeval b)
Returns the difference of two timevals a - b.
static int ast_fax_modem_to_str(enum ast_fax_modems bits, char *tbuf, size_t bufsize)
const ast_string_field resultstr
#define ast_datastore_alloc(info, uid)
union ast_frame::@263 data
enum ast_frame_type frametype
const ast_string_field localstationid
static char * cli_fax_show_stats(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
display fax stats
const char * ast_fax_state_to_str(enum ast_fax_state state)
convert a ast_fax_state to a string
#define AST_APP_OPTION(option, flagno)
Declares an application option that does not accept an argument.
const ast_string_field error
struct ast_format * format
const char * ast_channel_macrocontext(const struct ast_channel *chan)
#define ast_manager_register_xml(action, authority, func)
Register a manager callback using XML documentation to describe the manager.
struct timeval timeout_start
the start of our timeout counter
#define ASTERISK_GPL_KEY
The text the key() function should return.
char *(*const cli_show_capabilities)(int)
static struct ast_cli_entry fax_cli[]
static const struct fax_options default_options
int(*const start_session)(struct ast_fax_session *)
char *(*const cli_show_settings)(int)
#define FAX_DETECT_MODE_T38
void astman_send_error(struct mansession *s, const struct message *m, char *error)
Send error in manager transaction.
Asterisk module definitions.
struct ast_format * ast_channel_writeformat(struct ast_channel *chan)
struct debug_info_history c2s s2c
unsigned int fill_bit_removal
static char * cli_fax_show_capabilities(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
display registered FAX capabilities
struct ast_fax_t38_parameters their_t38_parameters
struct stasis_message_type * ast_channel_fax_type(void)
Message type for a fax operation.
static int sendfax_t38_init(struct ast_channel *chan, struct ast_fax_session_details *details)
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define ast_string_field_free_memory(x)
free all memory - to be called before destroying the object
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define AST_JSON_UTF8_VALIDATE(str)
Check str for UTF-8 and replace with an empty string if fails the check.
#define RES_FAX_T38TIMEOUT
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
const ast_string_field resolution
int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore *datastore)
Remove a datastore from a channel.
#define ast_custom_function_register(acf)
Register a custom function.
#define AST_RWLIST_TRAVERSE_SAFE_END
struct ast_fax_session * peer_v21_session
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
struct ast_custom_function acf_faxopt
FAXOPT dialplan function.
#define FAX_DETECT_MODE_BOTH
static char * generate_filenames_string(struct ast_fax_session_details *details, char *prefix, char *separator)
Generate a string of filenames using the given prefix and separator.
static char prefix[MAX_PREFIX]
#define AST_APP_ARG(name)
Define an application argument.
#define ast_string_field_set(x, field, data)
Set a field to a simple string value.
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
Send ack in manager transaction to begin a list.
static void get_general_options(struct fax_options *options)
#define ao2_link(container, obj)