Asterisk - The Open Source Telephony Project
18.5.0
|
#include "asterisk.h"
#include "asterisk/lock.h"
#include "asterisk/linkedlists.h"
#include "asterisk/module.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/frame.h"
#include "asterisk/cli.h"
#include "asterisk/stringfields.h"
#include "asterisk/manager.h"
Go to the source code of this file.
Data Structures | |
struct | ast_fax_document |
struct | ast_fax_documents |
struct | ast_fax_session |
The data required to handle a fax session. More... | |
struct | ast_fax_session_details |
The data communicated between the high level applications and the generic fax function. More... | |
struct | ast_fax_t38_parameters |
struct | ast_fax_tech |
used to register a FAX technology module with res_fax More... | |
Macros | |
#define | AST_FAX_FRFLAG_GATEWAY (1 << 13) |
Enumerations | |
enum | ast_fax_capabilities { AST_FAX_TECH_SEND = (1 << 0), AST_FAX_TECH_RECEIVE = (1 << 1), AST_FAX_TECH_AUDIO = (1 << 2), AST_FAX_TECH_T38 = (1 << 3), AST_FAX_TECH_MULTI_DOC = (1 << 4), AST_FAX_TECH_GATEWAY = (1 << 5), AST_FAX_TECH_V21_DETECT = (1 << 6) } |
capabilities for res_fax to locate a fax technology module More... | |
enum | ast_fax_modems { AST_FAX_MODEM_V17 = (1 << 0), AST_FAX_MODEM_V27TER = (1 << 1), AST_FAX_MODEM_V29 = (1 << 2), AST_FAX_MODEM_V34 = (1 << 3) } |
fax modem capabilities More... | |
enum | ast_fax_optflag { AST_FAX_OPTFLAG_FALSE = 0, AST_FAX_OPTFLAG_TRUE, AST_FAX_OPTFLAG_DEFAULT } |
fax session options More... | |
enum | ast_fax_state { AST_FAX_STATE_UNINITIALIZED = 0, AST_FAX_STATE_INITIALIZED, AST_FAX_STATE_OPEN, AST_FAX_STATE_ACTIVE, AST_FAX_STATE_COMPLETE, AST_FAX_STATE_RESERVED, AST_FAX_STATE_INACTIVE } |
current state of a fax session More... | |
Functions | |
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. More... | |
unsigned int | ast_fax_maxrate (void) |
get the maxiumum supported fax rate More... | |
unsigned int | ast_fax_minrate (void) |
get the minimum supported fax rate More... | |
const char * | ast_fax_session_operation_str (struct ast_fax_session *s) |
get string representation of a FAX session's operation More... | |
const char * | ast_fax_state_to_str (enum ast_fax_state state) |
convert an ast_fax_state to a string More... | |
int | ast_fax_tech_register (struct ast_fax_tech *tech) |
register a fax technology More... | |
void | ast_fax_tech_unregister (struct ast_fax_tech *tech) |
unregister a fax technology More... | |
#define AST_FAX_FRFLAG_GATEWAY (1 << 13) |
Definition at line 232 of file res_fax.h.
Referenced by fax_gateway_framehook(), spandsp_fax_gw_t30_gen(), and t38_tx_packet_handler().
enum ast_fax_capabilities |
capabilities for res_fax to locate a fax technology module
Definition at line 35 of file res_fax.h.
enum ast_fax_modems |
fax modem capabilities
Enumerator | |
---|---|
AST_FAX_MODEM_V17 | V.17 |
AST_FAX_MODEM_V27TER | V.27ter |
AST_FAX_MODEM_V29 | V.29 |
AST_FAX_MODEM_V34 | V.34 |
enum ast_fax_optflag |
fax session options
Enumerator | |
---|---|
AST_FAX_OPTFLAG_FALSE | false/disable configuration override |
AST_FAX_OPTFLAG_TRUE | true/enable configuration override |
AST_FAX_OPTFLAG_DEFAULT | use the configured default |
enum ast_fax_state |
current state of a fax session
Definition at line 65 of file res_fax.h.
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.
The first four parameters can be represented with Asterisk's LOG_* levels. In other words, this function may be called like
ast_fax_log(LOG_DEBUG, msg);
Definition at line 1036 of file res_fax.c.
References ast_log, ast_log_dynamic_level, and fax_logger_level.
Referenced by spandsp_log().
unsigned int ast_fax_maxrate | ( | void | ) |
get the maxiumum supported fax rate
Definition at line 796 of file res_fax.c.
References get_general_options(), and fax_options::maxrate.
Referenced by acf_faxopt_write().
unsigned int ast_fax_minrate | ( | void | ) |
get the minimum supported fax rate
Definition at line 804 of file res_fax.c.
References get_general_options(), and fax_options::minrate.
Referenced by acf_faxopt_write().
const char* ast_fax_session_operation_str | ( | struct ast_fax_session * | s | ) |
get string representation of a FAX session's operation
Definition at line 4254 of file res_fax.c.
References AST_FAX_TECH_GATEWAY, AST_FAX_TECH_RECEIVE, AST_FAX_TECH_SEND, AST_FAX_TECH_V21_DETECT, ast_fax_session_details::caps, and ast_fax_session::details.
Referenced by cli_fax_show_sessions(), manager_fax_sessions_entry(), and spandsp_manager_fax_session().
const char* ast_fax_state_to_str | ( | enum ast_fax_state | state | ) |
convert an ast_fax_state to a string
convert an ast_fax_state to a string
Definition at line 1013 of file res_fax.c.
References AST_FAX_STATE_ACTIVE, AST_FAX_STATE_COMPLETE, AST_FAX_STATE_INACTIVE, AST_FAX_STATE_INITIALIZED, AST_FAX_STATE_OPEN, AST_FAX_STATE_RESERVED, AST_FAX_STATE_UNINITIALIZED, ast_log, and LOG_WARNING.
Referenced by cli_fax_show_sessions(), manager_fax_sessions_entry(), spandsp_fax_cli_show_session(), spandsp_fax_write(), and spandsp_manager_fax_session().
int ast_fax_tech_register | ( | struct ast_fax_tech * | tech | ) |
register a fax technology
register a fax technology
Definition at line 974 of file res_fax.c.
References ast_calloc, AST_RWLIST_INSERT_TAIL, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, ast_fax_tech::description, fax_module::tech, and ast_fax_tech::type.
Referenced by load_module().
void ast_fax_tech_unregister | ( | struct ast_fax_tech * | tech | ) |
unregister a fax technology
unregister a fax technology
Definition at line 992 of file res_fax.c.
References ast_free, AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, fax_module::tech, and ast_fax_tech::type.
Referenced by unload_module().