Asterisk - The Open Source Telephony Project
18.5.0
|
the chan_misdn channel driver for Asterisk More...
#include "asterisk.h"
#include <pthread.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <signal.h>
#include <sys/file.h>
#include <semaphore.h>
#include <ctype.h>
#include <time.h>
#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/io.h"
#include "asterisk/frame.h"
#include "asterisk/translate.h"
#include "asterisk/cli.h"
#include "asterisk/musiconhold.h"
#include "asterisk/dsp.h"
#include "asterisk/file.h"
#include "asterisk/callerid.h"
#include "asterisk/indications.h"
#include "asterisk/app.h"
#include "asterisk/features.h"
#include "asterisk/term.h"
#include "asterisk/sched.h"
#include "asterisk/stringfields.h"
#include "asterisk/abstract_jb.h"
#include "asterisk/causes.h"
#include "asterisk/format.h"
#include "asterisk/format_cap.h"
#include "asterisk/features_config.h"
#include "asterisk/bridge.h"
#include "asterisk/pickup.h"
#include "asterisk/format_cache.h"
#include "chan_misdn_config.h"
#include "isdn_lib.h"
#include "asterisk/strings.h"
Go to the source code of this file.
Data Structures | |
struct | allowed_bearers |
struct | chan_list |
Channel call record structure. More... | |
struct | hold_info |
struct | misdn_jb |
struct | robin_list |
struct | state_struct |
Macros | |
#define | chan_list_ref(obj, debug) ao2_t_ref((obj), +1, (debug)) |
#define | chan_list_unref(obj, debug) ao2_t_ref((obj), -1, (debug)) |
#define | MISDN_ASTERISK_TECH_PVT(ast) ast_channel_tech_pvt(ast) |
#define | MISDN_ASTERISK_TECH_PVT_SET(ast, value) ast_channel_tech_pvt_set(ast, value) |
#define | ORG_AST 1 |
#define | ORG_MISDN 2 |
#define | TRANSFER_ON_HELD_CALL_HANGUP 1 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | _misdn_tasks_add_variable (int timeout, ast_sched_cb callback, const void *data, int variable) |
int | add_in_calls (int port) |
int | add_out_calls (int port) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static enum mISDN_NUMBER_PLAN | ast_to_misdn_plan (unsigned ast_number_plan) |
static int | ast_to_misdn_pres (int presentation) |
static enum mISDN_REDIRECTING_REASON | ast_to_misdn_reason (const enum AST_REDIRECTING_REASON ast) |
static int | ast_to_misdn_screen (int screening) |
static enum mISDN_NUMBER_TYPE | ast_to_misdn_ton (unsigned ast_number_type) |
static const char * | bearer2str (int cap) |
static enum event_response_e | cb_events (enum event_e event, struct misdn_bchannel *bc, void *user_data) |
static void | chan_list_destructor (void *obj) |
static struct chan_list * | chan_list_init (int orig) |
int | chan_misdn_jb_empty (struct misdn_bchannel *bc, char *buf, int len) |
static void | chan_misdn_log (int level, int port, char *tmpl,...) |
static int | cl_dequeue_chan (struct chan_list *chan) |
static void | cl_queue_chan (struct chan_list *chan) |
static char * | complete_ch (struct ast_cli_args *a) |
static char * | complete_debug_port (struct ast_cli_args *a) |
static char * | complete_show_config (struct ast_cli_args *a) |
static void | config_jitterbuffer (struct chan_list *ch) |
void | debug_numtype (int port, int numtype, char *type) |
static int | dialtone_indicate (struct chan_list *cl) |
static void | do_immediate_setup (struct misdn_bchannel *bc, struct chan_list *ch, struct ast_channel *ast) |
static void | export_aoc_vars (int originator, struct ast_channel *ast, struct misdn_bchannel *bc) |
void | export_ch (struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_list *ch) |
Export parameters to the dialplan environment variables. More... | |
static struct chan_list * | find_chan_by_bc (struct misdn_bchannel *bc) |
static struct chan_list * | find_hold_active_call (struct misdn_bchannel *bc) |
static struct chan_list * | find_hold_call (struct misdn_bchannel *bc) |
static struct chan_list * | find_hold_call_l3 (unsigned long l3_id) |
static void | free_robin_list (void) |
static struct chan_list * | get_chan_by_ast_name (const char *name) |
static struct robin_list * | get_robin_position (char *group) |
static char * | handle_cli_misdn_port_block (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_port_down (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_port_unblock (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_port_up (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_restart_pid (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_restart_port (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_send_digit (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_send_display (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_send_facility (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_send_restart (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_set_crypt_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_set_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_set_tics (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_show_channel (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_show_channels (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_show_config (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_show_port (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_show_ports_stats (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_show_stacks (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_misdn_toggle_echocancel (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void | hangup_chan (struct chan_list *ch, struct misdn_bchannel *bc) |
static void | hanguptone_indicate (struct chan_list *cl) |
void | import_ch (struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_list *ch) |
Import parameters from the dialplan environment variables. More... | |
static int | load_module (void) |
Load the module. More... | |
static void | misdn_add_number_prefix (int port, enum mISDN_NUMBER_TYPE number_type, char *number, size_t size) |
static int | misdn_answer (struct ast_channel *ast) |
static int | misdn_attempt_transfer (struct chan_list *active_ch, struct chan_list *held_ch) |
static int | misdn_call (struct ast_channel *ast, const char *dest, int timeout) |
static int | misdn_chan_is_valid (struct chan_list *ch) |
static int | misdn_check_l2l1 (struct ast_channel *chan, const char *data) |
static void | misdn_copy_redirecting_from_ast (struct misdn_bchannel *bc, struct ast_channel *ast) |
static void | misdn_copy_redirecting_to_ast (struct ast_channel *ast, const struct misdn_party_redirecting *redirect, char *tag) |
static int | misdn_digit_begin (struct ast_channel *chan, char digit) |
static int | misdn_digit_end (struct ast_channel *ast, char digit, unsigned int duration) |
static int | misdn_facility_exec (struct ast_channel *chan, const char *data) |
static void | misdn_facility_ie_handler (enum event_e event, struct misdn_bchannel *bc, struct chan_list *ch) |
static int | misdn_fixup (struct ast_channel *oldast, struct ast_channel *ast) |
static const char * | misdn_get_ch_state (struct chan_list *p) |
static void | misdn_get_connected_line (struct ast_channel *ast, struct misdn_bchannel *bc, int originator) |
static int | misdn_hangup (struct ast_channel *ast) |
static int | misdn_indication (struct ast_channel *ast, int cond, const void *data, size_t datalen) |
static int | misdn_is_msn_valid (int port, const struct misdn_party_dialing *dialed) |
void | misdn_jb_destroy (struct misdn_jb *jb) |
frees the data and destroys the given jitterbuffer struct More... | |
int | misdn_jb_empty (struct misdn_jb *jb, char *data, int len) |
gets len bytes out of the jitterbuffer if available, else only the available data is returned and the return value indicates the number of data. More... | |
int | misdn_jb_fill (struct misdn_jb *jb, const char *data, int len) |
fills the jitterbuffer with len data returns < 0 if there was an error (buffer overrun). More... | |
struct misdn_jb * | misdn_jb_init (int size, int upper_threshold) |
allocates the jb-structure and initialize the elements More... | |
static int | misdn_l1_task (const void *vdata) |
static struct ast_channel * | misdn_new (struct chan_list *cl, int state, char *exten, char *callerid, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, int port, int c) |
static int | misdn_overlap_dial_task (const void *data) |
static void | misdn_prefix_string (const char *str_prefix, char *str_main, size_t size) |
static void | misdn_queue_connected_line_update (struct ast_channel *ast, const struct misdn_party_id *id, enum AST_CONNECTED_LINE_UPDATE_SOURCE source, char *cid_tag) |
static struct ast_frame * | misdn_read (struct ast_channel *ast) |
static struct ast_channel * | misdn_request (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause) |
static int | misdn_send_text (struct ast_channel *chan, const char *text) |
static int | misdn_set_opt_exec (struct ast_channel *chan, const char *data) |
static int | misdn_tasks_add (int timeout, ast_sched_cb callback, const void *data) |
static int | misdn_tasks_add_variable (int timeout, ast_sched_cb callback, const void *data) |
static void | misdn_tasks_destroy (void) |
static void | misdn_tasks_init (void) |
static void | misdn_tasks_remove (int task_id) |
static void * | misdn_tasks_thread_func (void *data) |
static void | misdn_tasks_wakeup (void) |
static int | misdn_to_ast_plan (enum mISDN_NUMBER_PLAN number_plan) |
static int | misdn_to_ast_pres (int presentation) |
static enum AST_REDIRECTING_REASON | misdn_to_ast_reason (const enum mISDN_REDIRECTING_REASON q931) |
static int | misdn_to_ast_screen (int screening) |
static int | misdn_to_ast_ton (enum mISDN_NUMBER_TYPE number_type) |
static const char * | misdn_to_str_plan (enum mISDN_NUMBER_PLAN number_plan) |
static const char * | misdn_to_str_pres (int presentation) |
static const char * | misdn_to_str_screen (int screening) |
static const char * | misdn_to_str_ton (enum mISDN_NUMBER_TYPE number_type) |
static void | misdn_update_caller_id (struct ast_channel *ast, const struct misdn_party_id *id, char *cid_tag) |
static void | misdn_update_connected_line (struct ast_channel *ast, struct misdn_bchannel *bc, int originator) |
static void | misdn_update_redirecting (struct ast_channel *ast, struct misdn_bchannel *bc, int originator) |
static void | misdn_update_remote_party (struct ast_channel *ast, const struct misdn_party_id *id, enum AST_CONNECTED_LINE_UPDATE_SOURCE source, char *cid_tag) |
static int | misdn_write (struct ast_channel *ast, struct ast_frame *frame) |
static int | pbx_start_chan (struct chan_list *ch) |
static void | print_bc_info (int fd, struct chan_list *help, struct misdn_bchannel *bc) |
static void | print_bearer (struct misdn_bchannel *bc) |
static void | print_facility (const struct FacParm *fac, const struct misdn_bchannel *bc) |
static struct ast_frame * | process_ast_dsp (struct chan_list *tmp, struct ast_frame *frame) |
static int | read_config (struct chan_list *ch) |
static void | release_chan (struct chan_list *ch, struct misdn_bchannel *bc) |
static void | release_chan_early (struct chan_list *ch) |
static int | reload (void) |
static void | reload_config (void) |
static int | send_cause2ast (struct ast_channel *ast, struct misdn_bchannel *bc, struct chan_list *ch) |
static void | send_digit_to_chan (struct chan_list *cl, char digit) |
static void | show_config_description (int fd, enum misdn_cfg_elements elem) |
static void | sighandler (int sig) |
static int | start_bc_tones (struct chan_list *cl) |
static void | start_pbx (struct chan_list *ch, struct misdn_bchannel *bc, struct ast_channel *chan) |
static int | stop_bc_tones (struct chan_list *cl) |
static int | stop_indicate (struct chan_list *cl) |
static int | unload_module (void) |
static void | update_config (struct chan_list *ch) |
Updates caller ID information from config. More... | |
static int | update_ec_config (struct misdn_bchannel *bc) |
static void | update_name (struct ast_channel *tmp, int port, int c) |
static void | wait_for_digits (struct chan_list *ch, struct misdn_bchannel *bc, struct ast_channel *chan) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Channel driver for mISDN Support (BRI/PRI)" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_DEPRECATED, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, } |
static const struct allowed_bearers | allowed_bearers_array [] |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | chan_misdn_clis [] |
static struct chan_list * | cl_te =NULL |
Global channel call record list head. More... | |
static ast_mutex_t | cl_te_lock |
static int | g_config_initialized = 0 |
static int | glob_channel = 0 |
static char | global_tracefile [BUFFERSIZE+1] |
static int | max_ports |
int | MAXTICS = 8 |
static int * | misdn_debug |
static int * | misdn_debug_only |
static int * | misdn_in_calls |
static int * | misdn_out_calls |
static int * | misdn_ports |
static struct ast_sched_context * | misdn_tasks = NULL |
the main schedule context for stuff like l1 watcher, overlap dial, ... More... | |
static pthread_t | misdn_tasks_thread |
static struct ast_channel_tech | misdn_tech |
static const char | misdn_type [] = "mISDN" |
static ast_mutex_t | release_lock |
static struct robin_list * | robin = NULL |
static const struct state_struct | state_array [] |
static int | tracing = 0 |
the chan_misdn channel driver for Asterisk
MISDN http://www.misdn.org/
Definition in file chan_misdn.c.
Definition at line 371 of file chan_misdn.c.
Referenced by cl_queue_chan(), find_chan_by_bc(), find_hold_active_call(), find_hold_call(), find_hold_call_l3(), get_chan_by_ast_name(), misdn_chan_is_valid(), and misdn_new().
Definition at line 372 of file chan_misdn.c.
Referenced by cb_events(), chan_misdn_jb_empty(), cl_dequeue_chan(), handle_cli_misdn_send_digit(), handle_cli_misdn_send_display(), handle_cli_misdn_send_facility(), handle_cli_misdn_toggle_echocancel(), misdn_hangup(), misdn_request(), misdn_write(), release_chan(), and release_chan_early().
#define MISDN_ASTERISK_TECH_PVT | ( | ast | ) | ast_channel_tech_pvt(ast) |
Definition at line 683 of file chan_misdn.c.
Referenced by cb_events(), do_immediate_setup(), misdn_answer(), misdn_call(), misdn_digit_end(), misdn_facility_exec(), misdn_fixup(), misdn_hangup(), misdn_indication(), misdn_read(), misdn_send_text(), misdn_set_opt_exec(), misdn_update_connected_line(), misdn_write(), release_chan(), and release_chan_early().
#define MISDN_ASTERISK_TECH_PVT_SET | ( | ast, | |
value | |||
) | ast_channel_tech_pvt_set(ast, value) |
Definition at line 684 of file chan_misdn.c.
Referenced by misdn_hangup(), misdn_new(), release_chan(), and release_chan_early().
#define ORG_AST 1 |
Asterisk created the channel (outgoing call)
Definition at line 343 of file chan_misdn.c.
Referenced by cb_events(), export_aoc_vars(), misdn_hangup(), misdn_request(), print_bc_info(), read_config(), release_chan(), and release_chan_early().
#define ORG_MISDN 2 |
mISDN created the channel (incoming call)
Definition at line 345 of file chan_misdn.c.
Referenced by cb_events(), misdn_get_connected_line(), misdn_indication(), misdn_update_connected_line(), and misdn_update_redirecting().
#define TRANSFER_ON_HELD_CALL_HANGUP 1 |
Definition at line 8334 of file chan_misdn.c.
enum misdn_chan_state |
Definition at line 325 of file chan_misdn.c.
enum misdn_hold_state |
Enumerator | |
---|---|
MISDN_HOLD_IDLE | HOLD not active |
MISDN_HOLD_ACTIVE | Call is held |
MISDN_HOLD_TRANSFER | Held call is being transferred |
MISDN_HOLD_DISCONNECT | Held call is being disconnected |
Definition at line 347 of file chan_misdn.c.
|
static |
Definition at line 12838 of file chan_misdn.c.
|
static |
Definition at line 12838 of file chan_misdn.c.
|
inlinestatic |
Definition at line 3591 of file chan_misdn.c.
References ast_sched_add_variable(), misdn_tasks_init(), and misdn_tasks_wakeup().
Referenced by misdn_tasks_add(), and misdn_tasks_add_variable().
int add_in_calls | ( | int | port | ) |
Definition at line 8844 of file chan_misdn.c.
References ast_log, LOG_NOTICE, misdn_cfg_get(), and MISDN_CFG_MAX_IN.
Referenced by cb_events().
int add_out_calls | ( | int | port | ) |
Definition at line 8859 of file chan_misdn.c.
References ast_log, LOG_NOTICE, misdn_cfg_get(), and MISDN_CFG_MAX_OUT.
Referenced by misdn_call().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 12838 of file chan_misdn.c.
|
static |
Definition at line 2042 of file chan_misdn.c.
References NUMPLAN_DATA, NUMPLAN_ISDN, NUMPLAN_NATIONAL, NUMPLAN_PRIVATE, NUMPLAN_TELEX, and NUMPLAN_UNKNOWN.
Referenced by misdn_call(), misdn_copy_redirecting_from_ast(), and misdn_get_connected_line().
|
static |
Definition at line 2145 of file chan_misdn.c.
References AST_PRES_ALLOWED, AST_PRES_RESTRICTED, AST_PRES_RESTRICTION, and AST_PRES_UNAVAILABLE.
Referenced by misdn_copy_redirecting_from_ast(), misdn_get_connected_line(), and update_config().
|
static |
Definition at line 2274 of file chan_misdn.c.
References ARRAY_LEN, AST_REDIRECTING_REASON_AWAY, AST_REDIRECTING_REASON_CALL_FWD_DTE, AST_REDIRECTING_REASON_DEFLECTION, AST_REDIRECTING_REASON_DO_NOT_DISTURB, AST_REDIRECTING_REASON_FOLLOW_ME, AST_REDIRECTING_REASON_NO_ANSWER, AST_REDIRECTING_REASON_OUT_OF_ORDER, AST_REDIRECTING_REASON_TIME_OF_DAY, AST_REDIRECTING_REASON_UNAVAILABLE, AST_REDIRECTING_REASON_UNCONDITIONAL, AST_REDIRECTING_REASON_UNKNOWN, AST_REDIRECTING_REASON_USER_BUSY, mISDN_REDIRECTING_REASON_CALL_FWD, mISDN_REDIRECTING_REASON_CALL_FWD_BUSY, mISDN_REDIRECTING_REASON_CALL_FWD_DTE, mISDN_REDIRECTING_REASON_DEFLECTION, mISDN_REDIRECTING_REASON_NO_REPLY, mISDN_REDIRECTING_REASON_OUT_OF_ORDER, and mISDN_REDIRECTING_REASON_UNKNOWN.
Referenced by misdn_copy_redirecting_from_ast().
|
static |
Definition at line 2242 of file chan_misdn.c.
References AST_PRES_NETWORK_NUMBER, AST_PRES_NUMBER_TYPE, AST_PRES_USER_NUMBER_FAILED_SCREEN, AST_PRES_USER_NUMBER_PASSED_SCREEN, and AST_PRES_USER_NUMBER_UNSCREENED.
Referenced by misdn_copy_redirecting_from_ast(), misdn_get_connected_line(), and update_config().
|
static |
Definition at line 1916 of file chan_misdn.c.
References NUMTYPE_ABBREVIATED, NUMTYPE_INTERNATIONAL, NUMTYPE_NATIONAL, NUMTYPE_NETWORK_SPECIFIC, NUMTYPE_SUBSCRIBER, and NUMTYPE_UNKNOWN.
Referenced by misdn_call(), misdn_copy_redirecting_from_ast(), and misdn_get_connected_line().
|
static |
Definition at line 2373 of file chan_misdn.c.
References ARRAY_LEN, ast_copy_string(), chan_misdn_log(), allowed_bearers::display, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, NUMPLAN_ISDN, NUMTYPE_UNKNOWN, misdn_bchannel::port, and misdn_party_id::presentation.
Referenced by cb_events(), print_bc_info(), and print_bearer().
|
static |
queue new chan
Supplementary Services
Definition at line 9917 of file chan_misdn.c.
References add_in_calls(), misdn_bchannel::addr, chan_list::addr, chan_list::allowed_bearers, ao2_cleanup, ao2_ref, misdn_bchannel::AOCD_need_export, args, ARRAY_LEN, chan_list::ast, AST_APP_ARG, ast_canmatch_extension(), AST_CAUSE_DESTINATION_OUT_OF_ORDER, AST_CAUSE_INCOMPATIBLE_DESTINATION, AST_CAUSE_NORMAL_CLEARING, AST_CAUSE_UNALLOCATED, AST_CAUSE_USER_BUSY, ast_channel_bridge_peer(), ast_channel_caller(), ast_channel_cleanup, ast_channel_exten(), ast_channel_exten_set(), ast_channel_generator(), ast_channel_generatordata(), ast_channel_generatordata_set(), ast_channel_hangupcause_set(), ast_channel_lock, ast_channel_queue_redirecting_update(), ast_channel_redirecting(), ast_channel_rings_set(), ast_channel_transfercapability_set(), ast_channel_unlock, AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER, AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER, AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING, AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_RINGING, ast_copy_string(), ast_deactivate_generator(), AST_DECLARE_APP_ARGS, ast_exists_extension(), ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, AST_FRAME_DTMF, AST_FRAME_VOICE, ast_get_chan_features_pickup_config(), AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_named_caller_presentation(), ast_party_id_reset(), ast_party_redirecting_copy(), ast_party_redirecting_free(), ast_party_redirecting_init(), ast_pickup_call(), ast_poll, AST_PRES_RESTRICTED, AST_PRES_USER_NUMBER_UNSCREENED, ast_queue_control(), ast_queue_frame(), ast_queue_hold(), ast_queue_unhold(), ast_set_callerid(), ast_setstate(), AST_STANDARD_APP_ARGS, AST_STATE_RESERVED, AST_STATE_RINGING, ast_strdup, ast_strdupa, ast_strlen_zero, ast_transfercapability2str(), ast_tv(), ast_tvnow(), bc, chan_list::bc, misdn_bchannel::bc_state, bc_state2str(), bearer2str(), misdn_bchannel::bframe, misdn_bchannel::bframe_len, buf, misdn_bchannel::caller, misdn_bchannel::capability, misdn_bchannel::cause, cb_log, chan_list_init(), chan_list_unref, chan_misdn_log(), hold_info::channel, misdn_bchannel::channel, cl_queue_chan(), misdn_bchannel::connected, chan_list::context, misdn_bchannel::cw, ast_frame::data, ast_frame::datalen, ast_frame::delivery, misdn_bchannel::dialed, do_immediate_setup(), misdn_bchannel::dtmf, misdn_bchannel::dummy, errno, EVENT_ALERTING, EVENT_BCHAN_ACTIVATED, EVENT_BCHAN_DATA, EVENT_BCHAN_ERROR, EVENT_CLEANUP, EVENT_CONNECT, EVENT_CONNECT_ACKNOWLEDGE, EVENT_DISCONNECT, EVENT_DTMF_TONE, EVENT_FACILITY, EVENT_HOLD, EVENT_HOLD_ACKNOWLEDGE, EVENT_HOLD_REJECT, EVENT_INFORMATION, EVENT_NEW_BC, EVENT_NEW_CHANNEL, EVENT_NEW_L3ID, EVENT_NOTIFY, EVENT_PORT_ALARM, EVENT_PROCEEDING, EVENT_PROGRESS, EVENT_REGISTER, EVENT_RELEASE, EVENT_RELEASE_COMPLETE, EVENT_RESTART, EVENT_RETRIEVE, EVENT_RETRIEVE_ACKNOWLEDGE, EVENT_RETRIEVE_REJECT, EVENT_SETUP, EVENT_SETUP_ACKNOWLEDGE, EVENT_STATUS, EVENT_TIMEOUT, EVENT_TONE_GENERATE, export_aoc_vars(), export_ch(), misdn_bchannel::fac_in, misdn_bchannel::fac_out, chan_list::far_alerting, find_chan_by_bc(), find_hold_active_call(), find_hold_call(), find_hold_call_l3(), ast_frame_subclass::format, ast_frame::frametype, misdn_party_redirecting::from, ast_generator::generate, hangup_chan(), hanguptone_indicate(), chan_list::hold, ast_party_caller::id, chan_list::ignore_dtmf, misdn_bchannel::incoming_cid_tag, INFO_CAPABILITY_DIGITAL_UNRESTRICTED, misdn_bchannel::info_dad, INFO_PI_INBAND_AVAILABLE, misdn_bchannel::infos_pending, ast_frame_subclass::integer, misdn_bchannel::keypad, misdn_bchannel::l3_id, chan_list::l3id, LOG_ERROR, LOG_NOTICE, LOG_WARNING, ast_frame::mallocd, manager_isdn_get_info(), misdn_add_number_prefix(), MISDN_ALERTING, MISDN_ASTERISK_TECH_PVT, misdn_attempt_transfer(), MISDN_CALLING, MISDN_CALLING_ACKNOWLEDGE, misdn_cap_is_speech(), MISDN_CFG_ALARM_BLOCK, MISDN_CFG_ALWAYS_IMMEDIATE, MISDN_CFG_APPEND_MSN_TO_CALLERID_TAG, misdn_cfg_get(), MISDN_CFG_HOLD_ALLOWED, MISDN_CFG_IMMEDIATE, MISDN_CFG_REJECT_CAUSE, MISDN_CLEANING, MISDN_CONNECTED, misdn_copy_redirecting_to_ast(), MISDN_DIALING, MISDN_DISCONNECTED, MISDN_EXTCANTMATCH, misdn_facility_ie_handler(), MISDN_GEN_APPEND_DIGITS2EXTEN, misdn_get_ch_state(), MISDN_HOLD_ACTIVE, MISDN_HOLD_DISCONNECT, MISDN_HOLD_IDLE, misdn_inband_avail(), MISDN_INCOMING_SETUP, misdn_is_msn_valid(), misdn_lib_is_ptp(), misdn_lib_log_ies(), misdn_lib_port_block(), misdn_lib_send_event(), misdn_new(), MISDN_NOTHING, mISDN_NOTIFY_CODE_CALL_IS_DIVERTING, mISDN_NOTIFY_CODE_CALL_TRANSFER_ACTIVE, mISDN_NOTIFY_CODE_CALL_TRANSFER_ALERTING, mISDN_NOTIFY_CODE_DIVERSION_ACTIVATED, mISDN_NOTIFY_CODE_INVALID, misdn_overlap_dial_task(), MISDN_PROCEEDING, MISDN_PROGRESS, mISDN_REDIRECTING_REASON_NO_REPLY, mISDN_REDIRECTING_REASON_UNKNOWN, misdn_tasks_add_variable(), misdn_to_ast_plan(), misdn_to_ast_pres(), misdn_to_ast_screen(), misdn_to_ast_ton(), misdn_to_str_plan(), misdn_to_str_pres(), misdn_to_str_screen(), misdn_to_str_ton(), misdn_update_remote_party(), MISDN_WAITING4DIGS, ast_custom_function::name, misdn_party_id::name, allowed_bearers::name, chan_list::need_busy, misdn_bchannel::need_disconnect, misdn_bchannel::need_more_infos, misdn_bchannel::need_release, misdn_bchannel::need_release_complete, chan_list::noautorespond_on_setup, misdn_bchannel::notify_description_code, misdn_bchannel::nt, chan_list::nttimeout, NULL, misdn_party_dialing::number, misdn_party_id::number, ast_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, ast_frame::offset, ORG_AST, ORG_MISDN, chan_list::originator, misdn_bchannel::out_cause, chan_list::overlap_dial, chan_list::overlap_dial_task, chan_list::overlap_tv, chan_list::overlap_tv_lock, parse(), pbx_builtin_setvar_helper(), misdn_bchannel::pid, chan_list::pipe, ast_party_number::plan, hold_info::port, misdn_bchannel::port, misdn_party_id::presentation, ast_party_number::presentation, print_bearer(), ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, misdn_bchannel::progress_indicator, ast_frame::ptr, RAII_VAR, read_config(), misdn_party_redirecting::reason, misdn_bchannel::redirecting, release_chan(), RESPONSE_ERR, RESPONSE_IGNORE_SETUP, RESPONSE_IGNORE_SETUP_WITHOUT_CLOSE, RESPONSE_OK, RESPONSE_RELEASE_SETUP, misdn_jb::samples, ast_frame::samples, misdn_party_id::screening, misdn_bchannel::sending_complete, misdn_jb::size, ast_frame::src, start_bc_tones(), start_pbx(), hold_info::state, chan_list::state, stop_bc_tones(), stop_indicate(), ast_frame::subclass, ast_party_id::tag, tmp(), misdn_party_redirecting::to, ast_party_redirecting::to, misdn_party_redirecting::to_changed, misdn_bchannel::tone_cnt, update_name(), and wait_for_digits().
Referenced by load_module().
|
static |
Definition at line 7792 of file chan_misdn.c.
References ao2_ref, ast_dsp_free(), ast_mutex_destroy, chan_list::dsp, chan_list::jb, misdn_jb_destroy(), misdn_tasks_remove(), NULL, chan_list::overlap_dial, chan_list::overlap_dial_task, chan_list::overlap_tv_lock, and chan_list::pipe.
Referenced by chan_list_init().
|
static |
Returns a reference to the new chan_list.
Definition at line 7831 of file chan_misdn.c.
References ao2_alloc, chan_list_destructor(), chan_misdn_log(), chan_list::need_busy, chan_list::need_hangup, chan_list::need_queue_hangup, NULL, chan_list::originator, chan_list::overlap_dial_task, and chan_list::pipe.
Referenced by cb_events(), and misdn_request().
int chan_misdn_jb_empty | ( | struct misdn_bchannel * | bc, |
char * | buf, | ||
int | len | ||
) |
Definition at line 12574 of file chan_misdn.c.
References chan_list_unref, find_chan_by_bc(), chan_list::jb, and misdn_jb_empty().
Referenced by load_module().
|
static |
Definition at line 12768 of file chan_misdn.c.
References ast_log, AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CHANNEL_DRIVER, AST_MODULE_INFO(), AST_MODULE_SUPPORT_DEPRECATED, ast_strlen_zero, ast_verbose(), ASTERISK_GPL_KEY, errno, global_tracefile, load_module(), LOG_WARNING, NULL, reload(), tmp(), and unload_module().
Referenced by bearer2str(), cb_events(), chan_list_init(), cl_queue_chan(), config_jitterbuffer(), debug_numtype(), dialtone_indicate(), do_immediate_setup(), export_ch(), find_chan_by_bc(), find_hold_call(), get_chan_by_ast_name(), load_module(), misdn_answer(), misdn_attempt_transfer(), misdn_call(), misdn_check_l2l1(), misdn_digit_end(), misdn_facility_exec(), misdn_facility_ie_handler(), misdn_fixup(), misdn_hangup(), misdn_indication(), misdn_jb_empty(), misdn_jb_fill(), misdn_jb_init(), misdn_l1_task(), misdn_new(), misdn_overlap_dial_task(), misdn_read(), misdn_request(), misdn_set_opt_exec(), misdn_tasks_destroy(), misdn_tasks_init(), misdn_tasks_thread_func(), misdn_write(), print_bearer(), print_facility(), process_ast_dsp(), read_config(), release_chan(), send_cause2ast(), start_pbx(), stop_indicate(), update_config(), update_name(), and wait_for_digits().
|
static |
Definition at line 8398 of file chan_misdn.c.
References ast_mutex_lock, ast_mutex_unlock, chan_list_unref, and chan_list::next.
Referenced by release_chan(), and release_chan_early().
|
static |
Definition at line 8377 of file chan_misdn.c.
References ast_mutex_lock, ast_mutex_unlock, chan_list::bc, chan_list_ref, chan_misdn_log(), chan_list::next, NULL, and misdn_bchannel::port.
Referenced by cb_events(), and misdn_request().
|
static |
Definition at line 5654 of file chan_misdn.c.
References ast_complete_channels(), ast_cli_args::line, ast_cli_args::n, ast_cli_args::pos, and ast_cli_args::word.
Referenced by handle_cli_misdn_send_digit(), handle_cli_misdn_send_display(), handle_cli_misdn_send_facility(), handle_cli_misdn_show_channel(), and handle_cli_misdn_toggle_echocancel().
|
static |
Definition at line 5659 of file chan_misdn.c.
References ast_strdup, ast_cli_args::n, NULL, ast_cli_args::pos, and ast_cli_args::word.
Referenced by handle_cli_misdn_set_debug().
|
static |
Definition at line 5682 of file chan_misdn.c.
References ast_strdup, BUFFERSIZE, ast_cli_args::line, MISDN_CFG_FIRST, misdn_cfg_get_name(), misdn_cfg_get_next_port(), MISDN_CFG_LAST, MISDN_GEN_FIRST, MISDN_GEN_LAST, ast_cli_args::n, NULL, ast_cli_args::pos, and ast_cli_args::word.
Referenced by handle_cli_misdn_show_config().
|
static |
Definition at line 5817 of file chan_misdn.c.
References chan_list::bc, cb_log, chan_misdn_log(), chan_list::jb, chan_list::jb_len, chan_list::jb_upper_threshold, len(), misdn_jb_destroy(), misdn_jb_init(), misdn_bchannel::nojitter, NULL, and misdn_bchannel::port.
Referenced by misdn_set_opt_exec(), and read_config().
void debug_numtype | ( | int | port, |
int | numtype, | ||
char * | type | ||
) |
Definition at line 5853 of file chan_misdn.c.
References ast_copy_string(), chan_misdn_log(), MISDN_CFG_ECHOCANCEL, misdn_cfg_get(), NUMTYPE_ABBREVIATED, NUMTYPE_INTERNATIONAL, NUMTYPE_NATIONAL, NUMTYPE_NETWORK_SPECIFIC, NUMTYPE_SUBSCRIBER, NUMTYPE_UNKNOWN, and misdn_bchannel::port.
Referenced by misdn_call(), misdn_get_connected_line(), and read_config().
|
static |
AST INDICATIONS END
Definition at line 7707 of file chan_misdn.c.
References chan_list::ast, ast_channel_zone(), ast_get_indication_tone(), ast_playtones_start(), chan_list::bc, chan_misdn_log(), ast_tone_zone_sound::data, misdn_cfg_get(), MISDN_CFG_NODIALTONE, chan_list::norxtone, chan_list::notxtone, misdn_bchannel::port, and chan_list::ts.
Referenced by wait_for_digits().
|
static |
Definition at line 8659 of file chan_misdn.c.
References chan_list::ast, ast_canmatch_extension(), AST_CAUSE_UNALLOCATED, ast_channel_caller(), ast_channel_context(), ast_channel_exten(), ast_channel_exten_set(), AST_FRAME_DTMF, ast_queue_frame(), ast_strdupa, ast_strlen_zero, ast_tv(), misdn_bchannel::caller, chan_misdn_log(), ast_frame::data, ast_frame::datalen, ast_frame::delivery, EVENT_DISCONNECT, EVENT_PROCEEDING, EVENT_RELEASE_COMPLETE, EVENT_SETUP_ACKNOWLEDGE, ast_frame::frametype, hangup_chan(), hanguptone_indicate(), ast_frame_subclass::integer, ast_frame::mallocd, MISDN_ASTERISK_TECH_PVT, MISDN_DIALING, MISDN_INCOMING_SETUP, misdn_lib_is_ptp(), misdn_lib_send_event(), name, chan_list::noautorespond_on_setup, misdn_bchannel::nt, NULL, misdn_party_id::number, ast_frame::offset, misdn_bchannel::out_cause, pbx_start_chan(), misdn_bchannel::port, ast_frame::ptr, ast_frame::samples, ast_frame::src, chan_list::state, and ast_frame::subclass.
Referenced by cb_events().
|
static |
Definition at line 3458 of file chan_misdn.c.
References misdn_bchannel::AOCD, misdn_bchannel::AOCD_need_export, misdn_bchannel::AOCDtype, ast_channel_bridge_peer(), ast_channel_cleanup, ast_channel_ref, buf, misdn_bchannel::chargingUnit, misdn_bchannel::currency, NULL, ORG_AST, pbx_builtin_setvar_helper(), and RAII_VAR.
Referenced by cb_events(), and misdn_facility_ie_handler().
void export_ch | ( | struct ast_channel * | chan, |
struct misdn_bchannel * | bc, | ||
struct chan_list * | ch | ||
) |
Export parameters to the dialplan environment variables.
Definition at line 8811 of file chan_misdn.c.
References ast_strlen_zero, chan_misdn_log(), misdn_bchannel::keypad, pbx_builtin_setvar_helper(), misdn_bchannel::pid, misdn_bchannel::port, misdn_bchannel::sending_complete, tmp(), misdn_bchannel::urate, misdn_bchannel::uu, and misdn_bchannel::uulen.
Referenced by cb_events().
|
static |
Returns a reference to the found chan_list.
Definition at line 8259 of file chan_misdn.c.
References ast_mutex_lock, ast_mutex_unlock, chan_list::bc, misdn_bchannel::caller, chan_list_ref, chan_misdn_log(), misdn_bchannel::dialed, misdn_party_id::name, chan_list::next, NULL, misdn_party_dialing::number, misdn_party_id::number, and misdn_bchannel::port.
Referenced by cb_events(), and chan_misdn_jb_empty().
|
static |
Definition at line 8351 of file chan_misdn.c.
References chan_list::ast, ast_mutex_lock, ast_mutex_unlock, chan_list::bc, chan_list_ref, chan_list::hold, MISDN_ALERTING, MISDN_CONNECTED, MISDN_HOLD_IDLE, MISDN_PROCEEDING, MISDN_PROGRESS, chan_list::next, NULL, misdn_bchannel::port, hold_info::state, and chan_list::state.
Referenced by cb_events().
|
static |
Returns a reference to the found chan_list.
Definition at line 8283 of file chan_misdn.c.
References ast_mutex_lock, ast_mutex_unlock, misdn_bchannel::caller, chan_list_ref, chan_misdn_log(), hold_info::channel, misdn_bchannel::channel, misdn_bchannel::dialed, chan_list::hold, MISDN_HOLD_ACTIVE, misdn_party_id::name, chan_list::next, NULL, misdn_party_dialing::number, misdn_party_id::number, hold_info::port, misdn_bchannel::port, misdn_bchannel::pri, and hold_info::state.
Referenced by cb_events().
|
static |
Returns a reference to the found chan_list.
Definition at line 8317 of file chan_misdn.c.
References ast_mutex_lock, ast_mutex_unlock, chan_list_ref, chan_list::hold, chan_list::l3id, MISDN_HOLD_IDLE, chan_list::next, NULL, and hold_info::state.
Referenced by cb_events().
|
static |
Definition at line 629 of file chan_misdn.c.
References ast_free, robin_list::group, robin_list::next, and NULL.
Referenced by reload_config(), and unload_module().
|
static |
Returns a reference to the found chan_list.
Definition at line 786 of file chan_misdn.c.
References ao2_lock, ao2_ref, ao2_unlock, ARRAY_LEN, chan_list::ast, ast_calloc, AST_CAUSE_NORMAL_CLEARING, ast_channel_datastore_find(), ast_channel_lock, ast_channel_name(), ast_channel_trylock, ast_channel_unlock, ast_free, AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_REMOVE_HEAD, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_mutex_lock, ast_mutex_unlock, ast_safe_sleep_conditional(), bc, chan_list_ref, chan_misdn_log(), ast_datastore::data, EVENT_RELEASE_COMPLETE, misdn_lib_send_event(), mISDN_REDIRECTING_REASON_CALL_FWD, mISDN_REDIRECTING_REASON_CALL_FWD_BUSY, mISDN_REDIRECTING_REASON_NO_REPLY, mISDN_REDIRECTING_REASON_UNKNOWN, name, chan_list::next, NULL, NUMPLAN_DATA, NUMPLAN_ISDN, NUMPLAN_NATIONAL, NUMPLAN_PRIVATE, NUMPLAN_TELEX, NUMPLAN_UNKNOWN, NUMTYPE_ABBREVIATED, NUMTYPE_INTERNATIONAL, NUMTYPE_NATIONAL, NUMTYPE_NETWORK_SPECIFIC, NUMTYPE_SUBSCRIBER, NUMTYPE_UNKNOWN, pbx_builtin_setvar_helper(), tmp(), ast_datastore_info::type, type, value, and var.
Referenced by handle_cli_misdn_send_digit(), handle_cli_misdn_send_display(), handle_cli_misdn_send_facility(), and handle_cli_misdn_toggle_echocancel().
|
static |
Definition at line 641 of file chan_misdn.c.
References ast_calloc, ast_free, ast_strdup, robin_list::group, robin_list::next, NULL, robin_list::prev, and robin.
Referenced by misdn_request().
|
static |
Definition at line 3830 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, misdn_lib_port_block(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3940 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, misdn_lib_get_port_down(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3852 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, misdn_lib_port_unblock(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3918 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, misdn_lib_get_port_up(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 4144 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, NULL, reload_config(), and ast_cli_entry::usage.
|
static |
Definition at line 3896 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, misdn_lib_pid_restart(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3874 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, misdn_lib_port_restart(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 5509 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, chan_list::ast, ast_cli(), ast_dtmf_stream(), chan_list_unref, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_ch(), ast_cli_args::fd, get_chan_by_ast_name(), NULL, send_digit_to_chan(), tmp(), and ast_cli_entry::usage.
|
static |
Definition at line 5611 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), ast_copy_string(), chan_list::bc, chan_list_unref, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_ch(), misdn_bchannel::display, EVENT_INFORMATION, ast_cli_args::fd, get_chan_by_ast_name(), misdn_lib_send_event(), NULL, tmp(), and ast_cli_entry::usage.
|
static |
Definition at line 5183 of file chan_misdn.c.
References ao2_lock, ao2_unlock, ast_cli_args::argc, ast_cli_args::argv, ARRAY_LEN, ast_copy_string(), ast_verbose(), chan_list::bc, chan_list_unref, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_ch(), dummy(), EVENT_FACILITY, EVENT_REGISTER, misdn_bchannel::fac_out, get_chan_by_ast_name(), misdn_lib_port_is_nt(), misdn_lib_send_event(), misdn_make_dummy(), NULL, print_facility(), tmp(), and ast_cli_entry::usage.
|
static |
Definition at line 5477 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, misdn_bchannel::channel, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, misdn_lib_send_restart(), NULL, misdn_bchannel::port, and ast_cli_entry::usage.
|
static |
Definition at line 3807 of file chan_misdn.c.
References ast_cli_args::argc, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3720 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_debug_port(), ast_cli_args::fd, max_ports, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 4339 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, MAXTICS, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 4303 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, chan_list::ast, ast_channel_name(), ast_mutex_lock, ast_mutex_unlock, chan_list::bc, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_ch(), ast_cli_args::fd, chan_list::next, NULL, print_bc_info(), and ast_cli_entry::usage.
|
static |
Definition at line 4230 of file chan_misdn.c.
References ast_cli_args::argc, chan_list::ast, ast_channel_caller(), ast_channel_exten(), ast_cli(), ast_mutex_lock, ast_mutex_unlock, chan_list::bc, hold_info::channel, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, chan_list::hold, chan_list::l3id, misdn_dump_chanlist(), MISDN_HOLD_IDLE, name, chan_list::next, NULL, misdn_bchannel::pid, hold_info::port, print_bc_info(), S_COR, hold_info::state, and ast_cli_entry::usage.
|
static |
Definition at line 3987 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), BUFFERSIZE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_show_config(), ast_cli_args::fd, MISDN_CFG_FIRST, misdn_cfg_get_config_string(), misdn_cfg_get_elem(), misdn_cfg_get_next_port(), misdn_cfg_is_port_valid(), MISDN_CFG_LAST, MISDN_GEN_FIRST, MISDN_GEN_LAST, NULL, misdn_jb::ok, show_config_description(), and ast_cli_entry::usage.
|
static |
Definition at line 4421 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), buf, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, get_show_stack_details(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 4392 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, misdn_cfg_get_next_port(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 4361 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli(), buf, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, get_show_stack_details(), misdn_cfg_get_next_port(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 5564 of file chan_misdn.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), chan_list::bc, chan_list_unref, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_ch(), ast_cli_args::fd, get_chan_by_ast_name(), manager_ec_disable(), manager_ec_enable(), NULL, tmp(), chan_list::toggle_ec, update_ec_config(), and ast_cli_entry::usage.
|
static |
Definition at line 8447 of file chan_misdn.c.
References chan_list::ast, ast_hangup(), ast_queue_hangup_with_cause(), misdn_bchannel::cause, cb_log, chan_list::need_hangup, chan_list::need_queue_hangup, misdn_bchannel::port, and send_cause2ast().
Referenced by ast_unreal_hangup(), cb_events(), do_immediate_setup(), and start_pbx().
|
static |
Definition at line 7738 of file chan_misdn.c.
References chan_list::bc, misdn_lib_send_tone(), and TONE_HANGUP.
Referenced by cb_events(), do_immediate_setup(), misdn_hangup(), misdn_indication(), misdn_overlap_dial_task(), and start_pbx().
void import_ch | ( | struct ast_channel * | chan, |
struct misdn_bchannel * | bc, | ||
struct chan_list * | ch | ||
) |
Import parameters from the dialplan environment variables.
Definition at line 8786 of file chan_misdn.c.
References ast_channel_lock, ast_channel_unlock, ast_copy_string(), ast_log, misdn_bchannel::keypad, LOG_NOTICE, pbx_builtin_getvar_helper(), misdn_bchannel::sending_complete, tmp(), misdn_bchannel::uu, and misdn_bchannel::uulen.
Referenced by misdn_call().
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 11315 of file chan_misdn.c.
References ast_calloc, ast_channel_register(), ast_cli_register_multiple, ast_custom_function_register, ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_free, ast_log, ast_malloc, AST_MODULE_LOAD_DECLINE, ast_mutex_init, ast_register_application, ast_strlen_zero, BUFFERSIZE, ast_channel_tech::capabilities, misdn_lib_iface::cb_event, cb_events(), chan_misdn_jb_empty(), chan_misdn_log(), g_config_initialized, global_tracefile, LOG_ERROR, max_ports, misdn_cfg_get(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), MISDN_CFG_L1_TIMEOUT, misdn_cfg_update_ptp(), misdn_check_l2l1(), misdn_facility_exec(), MISDN_GEN_DEBUG, MISDN_GEN_NTDEBUGFILE, MISDN_GEN_NTDEBUGFLAGS, MISDN_GEN_NTKEEPCALLS, MISDN_GEN_TRACEFILE, misdn_l1_task(), misdn_lib_init(), misdn_lib_maxports_get(), misdn_lib_nt_debug_init(), misdn_lib_nt_keepcalls(), misdn_ports, misdn_set_opt_exec(), misdn_tasks_add(), NULL, and unload_module().
Referenced by chan_misdn_log().
|
static |
Definition at line 3424 of file chan_misdn.c.
References misdn_cfg_get(), MISDN_CFG_TON_PREFIX_ABBREVIATED, MISDN_CFG_TON_PREFIX_INTERNATIONAL, MISDN_CFG_TON_PREFIX_NATIONAL, MISDN_CFG_TON_PREFIX_NETWORK_SPECIFIC, MISDN_CFG_TON_PREFIX_SUBSCRIBER, MISDN_CFG_TON_PREFIX_UNKNOWN, MISDN_MAX_NUMBER_LEN, misdn_prefix_string(), NUMTYPE_ABBREVIATED, NUMTYPE_INTERNATIONAL, NUMTYPE_NATIONAL, NUMTYPE_NETWORK_SPECIFIC, NUMTYPE_SUBSCRIBER, and NUMTYPE_UNKNOWN.
Referenced by cb_events(), misdn_facility_ie_handler(), misdn_is_msn_valid(), and read_config().
|
static |
Definition at line 6824 of file chan_misdn.c.
References AST_CAUSE_NETWORK_OUT_OF_ORDER, AST_CAUSE_PROTOCOL_ERROR, ast_channel_lock, ast_channel_unlock, ast_copy_string(), ast_log, ast_queue_hangup_with_cause(), ast_strlen_zero, ast_true(), chan_list::bc, chan_misdn_log(), misdn_bchannel::connected, misdn_bchannel::crypt_key, misdn_bchannel::dialed, EVENT_CONNECT, misdn_bchannel::fac_out, misdn_bchannel::hdlc, LOG_WARNING, MISDN_ASTERISK_TECH_PVT, MISDN_CONNECTED, misdn_lib_send_event(), misdn_bchannel::nodsp, misdn_bchannel::nojitter, misdn_party_dialing::number, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_dialing::number_plan, misdn_party_id::number_type, misdn_party_dialing::number_type, misdn_bchannel::outgoing_colp, pbx_builtin_getvar_helper(), misdn_bchannel::port, misdn_party_id::presentation, misdn_bchannel::presentation, print_facility(), misdn_party_id::screening, start_bc_tones(), chan_list::state, stop_indicate(), and tmp().
|
static |
Definition at line 8619 of file chan_misdn.c.
References chan_list::ast, ast_bridge_transfer_attended(), AST_BRIDGE_TRANSFER_SUCCESS, ast_channel_lock_both, ast_channel_name(), ast_channel_ref, ast_channel_unlock, ast_channel_unref, chan_misdn_log(), chan_list::hold, MISDN_ALERTING, MISDN_CONNECTED, MISDN_HOLD_TRANSFER, MISDN_PROCEEDING, MISDN_PROGRESS, hold_info::port, retval, hold_info::state, and chan_list::state.
Referenced by cb_events().
|
static |
we should have l3id after sending setup
Definition at line 6554 of file chan_misdn.c.
References add_out_calls(), args, AST_APP_ARG, AST_CAUSE_NORMAL_CIRCUIT_CONGESTION, AST_CAUSE_NORMAL_CLEARING, AST_CAUSE_NORMAL_TEMPORARY_FAILURE, ast_channel_caller(), ast_channel_connected_effective_id(), ast_channel_context(), ast_channel_exten_set(), ast_channel_hangupcause_set(), ast_channel_name(), ast_channel_transfercapability(), ast_copy_string(), AST_DECLARE_APP_ARGS, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, AST_NONSTANDARD_APP_ARGS, ast_setstate(), AST_STATE_DIALING, AST_STATE_DOWN, AST_STATE_RESERVED, ast_strdup, ast_strdupa, ast_strlen_zero, ast_to_misdn_plan(), ast_to_misdn_ton(), ast_transfercapability2str(), chan_list::bc, misdn_bchannel::caller, misdn_bchannel::capability, chan_misdn_log(), misdn_party_redirecting::count, debug_numtype(), misdn_bchannel::dialed, ENOCHAN, EVENT_SETUP, ext, misdn_bchannel::fac_out, misdn_party_redirecting::from, misdn_bchannel::hdlc, ast_party_caller::id, import_ch(), misdn_bchannel::incoming_cid_tag, INFO_CAPABILITY_DIGITAL_UNRESTRICTED, misdn_bchannel::l3_id, chan_list::l3id, LOG_WARNING, MISDN_ASTERISK_TECH_PVT, MISDN_CALLING, MISDN_CFG_APPEND_MSN_TO_CALLERID_TAG, misdn_cfg_get(), MISDN_CFG_LOCALDIALPLAN, misdn_copy_redirecting_from_ast(), misdn_lib_is_ptp(), misdn_lib_send_event(), misdn_set_opt_exec(), misdn_party_id::name, ast_party_id::name, misdn_bchannel::nt, misdn_party_dialing::number, misdn_party_id::number, ast_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, NUMPLAN_ISDN, NUMTYPE_UNKNOWN, misdn_bchannel::outgoing_colp, pbx_builtin_setvar_helper(), misdn_bchannel::pid, ast_party_number::plan, misdn_bchannel::port, misdn_party_id::presentation, misdn_bchannel::presentation, print_facility(), misdn_party_redirecting::reason, misdn_bchannel::redirecting, misdn_bchannel::sending_complete, misdn_bchannel::set_presentation, chan_list::state, stop_bc_tones(), ast_party_name::str, ast_party_number::str, ast_party_id::tag, tmp(), update_config(), ast_party_name::valid, and ast_party_number::valid.
|
static |
Definition at line 749 of file chan_misdn.c.
References chan_list::ast, ast_mutex_lock, ast_mutex_unlock, chan_list_ref, chan_list::next, NULL, and tmp().
Referenced by misdn_hangup().
|
static |
Definition at line 12291 of file chan_misdn.c.
References args, AST_APP_ARG, ast_copy_string(), AST_DECLARE_APP_ARGS, ast_log, ast_safe_sleep(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, BUFFERSIZE, chan_misdn_log(), LOG_WARNING, misdn_cfg_get(), misdn_cfg_get_next_port(), MISDN_CFG_GROUPNAME, misdn_lib_get_port_up(), misdn_lib_port_up(), parse(), and timeout.
Referenced by load_module().
|
static |
Definition at line 6382 of file chan_misdn.c.
References ast_channel_redirecting(), ast_channel_redirecting_effective_from(), ast_channel_redirecting_effective_to(), ast_copy_string(), ast_to_misdn_plan(), ast_to_misdn_pres(), ast_to_misdn_reason(), ast_to_misdn_screen(), ast_to_misdn_ton(), misdn_party_redirecting::count, ast_party_redirecting::count, misdn_party_redirecting::from, misdn_party_id::name, ast_party_id::name, misdn_party_id::number, ast_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, NUMPLAN_UNKNOWN, NUMTYPE_UNKNOWN, ast_party_number::plan, misdn_party_id::presentation, ast_party_number::presentation, misdn_party_redirecting::reason, misdn_bchannel::redirecting, S_COR, S_OR, misdn_party_id::screening, ast_party_name::str, ast_party_number::str, misdn_party_redirecting::to, ast_party_name::valid, and ast_party_number::valid.
Referenced by misdn_call(), and misdn_update_redirecting().
|
static |
Definition at line 6437 of file chan_misdn.c.
References ast_channel_redirecting(), ast_channel_set_redirecting(), ast_party_redirecting_set_init(), ast_party_redirecting_reason::code, misdn_party_redirecting::count, ast_party_redirecting::count, misdn_party_redirecting::from, ast_party_redirecting::from, ast_set_party_redirecting::from, misdn_to_ast_plan(), misdn_to_ast_pres(), misdn_to_ast_reason(), misdn_to_ast_screen(), misdn_to_ast_ton(), misdn_party_id::number, ast_party_id::number, ast_set_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, ast_party_number::plan, misdn_party_id::presentation, ast_party_number::presentation, misdn_party_redirecting::reason, ast_party_redirecting::reason, misdn_party_id::screening, ast_party_number::str, ast_party_id::tag, misdn_party_redirecting::to, ast_party_redirecting::to, ast_set_party_redirecting::to, and ast_party_number::valid.
Referenced by cb_events(), and misdn_facility_ie_handler().
|
static |
Definition at line 6909 of file chan_misdn.c.
|
static |
Definition at line 6915 of file chan_misdn.c.
References chan_list::ast, ast_channel_exten_set(), ast_copy_string(), ast_log, bc, chan_list::bc, buf, chan_misdn_log(), misdn_bchannel::dialed, digit, EVENT_INFORMATION, misdn_bchannel::info_dad, misdn_bchannel::infos_pending, LOG_WARNING, MISDN_ASTERISK_TECH_PVT, MISDN_CALLING, MISDN_CALLING_ACKNOWLEDGE, misdn_lib_send_event(), misdn_party_dialing::number, misdn_bchannel::port, send_digit_to_chan(), misdn_bchannel::send_dtmf, and chan_list::state.
|
static |
Definition at line 12168 of file chan_misdn.c.
References args, AST_APP_ARG, ast_channel_tech(), AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, chan_list::bc, chan_misdn_log(), EVENT_FACILITY, misdn_bchannel::fac_out, LOG_WARNING, MISDN_ASTERISK_TECH_PVT, misdn_lib_send_event(), parse(), misdn_bchannel::port, and print_facility().
Referenced by load_module().
|
static |
Definition at line 9095 of file chan_misdn.c.
References misdn_bchannel::AOCD, misdn_bchannel::AOCD_need_export, misdn_bchannel::AOCDtype, chan_list::ast, AST_CAUSE_NORMAL_CLEARING, ast_channel_queue_redirecting_update(), ast_channel_redirecting(), AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER, AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING, AST_CONTROL_BUSY, ast_copy_string(), AST_LIST_LOCK, AST_LIST_UNLOCK, ast_party_id_reset(), ast_party_redirecting_copy(), ast_party_redirecting_free(), ast_party_redirecting_init(), AST_PRES_ALLOWED, AST_PRES_RESTRICTED, AST_PRES_USER_NUMBER_UNSCREENED, ast_queue_control(), buf, misdn_bchannel::caller, misdn_bchannel::capability, chan_misdn_log(), misdn_bchannel::chargingUnit, misdn_party_redirecting::count, misdn_bchannel::currency, misdn_bchannel::dialed, EVENT_ALERTING, EVENT_DISCONNECT, EVENT_RELEASE, EVENT_RELEASE_COMPLETE, EVENT_SETUP, export_aoc_vars(), misdn_bchannel::fac_in, misdn_bchannel::fac_out, misdn_party_redirecting::from, misdn_bchannel::hdlc, misdn_bchannel::incoming_cid_tag, misdn_add_number_prefix(), misdn_copy_redirecting_to_ast(), misdn_lib_send_event(), mISDN_NOTIFY_CODE_CALL_TRANSFER_ACTIVE, mISDN_NOTIFY_CODE_CALL_TRANSFER_ALERTING, mISDN_NOTIFY_CODE_INVALID, mISDN_REDIRECTING_REASON_DEFLECTION, misdn_update_remote_party(), misdn_party_id::name, misdn_bchannel::notify_description_code, NULL, misdn_party_dialing::number, misdn_party_id::number, ast_party_id::number, misdn_party_id::number_plan, misdn_party_dialing::number_plan, misdn_party_id::number_type, misdn_party_dialing::number_type, NUMPLAN_ISDN, NUMPLAN_UNKNOWN, NUMTYPE_UNKNOWN, chan_list::originator, misdn_bchannel::port, misdn_party_id::presentation, ast_party_number::presentation, print_facility(), ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, misdn_party_redirecting::reason, misdn_bchannel::redirecting, misdn_party_id::screening, misdn_party_redirecting::to, ast_party_redirecting::to, and misdn_party_redirecting::to_changed.
Referenced by cb_events().
|
static |
Definition at line 6958 of file chan_misdn.c.
References chan_list::ast, chan_list::bc, chan_misdn_log(), chan_list::l3id, MISDN_ASTERISK_TECH_PVT, misdn_get_ch_state(), and misdn_bchannel::port.
|
static |
Definition at line 4102 of file chan_misdn.c.
References ARRAY_LEN, NULL, chan_list::state, state, and state_struct::txt.
Referenced by cb_events(), misdn_fixup(), misdn_hangup(), misdn_write(), and print_bc_info().
|
static |
Definition at line 6226 of file chan_misdn.c.
References ast_channel_connected_effective_id(), ast_copy_string(), ast_to_misdn_plan(), ast_to_misdn_pres(), ast_to_misdn_screen(), ast_to_misdn_ton(), misdn_bchannel::caller, misdn_bchannel::connected, debug_numtype(), MISDN_CFG_CPNDIALPLAN, misdn_cfg_get(), MISDN_CFG_LOCALDIALPLAN, misdn_party_id::name, ast_party_id::name, misdn_party_id::number, ast_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, NUMPLAN_ISDN, NUMPLAN_UNKNOWN, NUMTYPE_UNKNOWN, ORG_MISDN, ast_party_number::plan, misdn_bchannel::port, misdn_party_id::presentation, ast_party_number::presentation, S_COR, S_OR, misdn_party_id::screening, ast_party_name::str, ast_party_number::str, ast_party_name::valid, and ast_party_number::valid.
Referenced by misdn_update_connected_line().
|
static |
Definition at line 7117 of file chan_misdn.c.
References chan_list::ast, AST_CAUSE_NORMAL_CLEARING, ast_channel_caller(), ast_channel_context(), ast_channel_exten(), ast_channel_hangupcause(), ast_channel_name(), ast_copy_string(), ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, AST_STATE_RESERVED, bc, chan_list::bc, misdn_bchannel::cause, chan_list_unref, chan_misdn_log(), EVENT_DISCONNECT, EVENT_RELEASE, EVENT_RELEASE_COMPLETE, hanguptone_indicate(), chan_list::hold, INFO_PI_INBAND_AVAILABLE, chan_list::l3id, LOG_NOTICE, LOG_WARNING, MISDN_ALERTING, MISDN_ASTERISK_TECH_PVT, MISDN_ASTERISK_TECH_PVT_SET, MISDN_BUSY, MISDN_CALLING, MISDN_CALLING_ACKNOWLEDGE, misdn_chan_is_valid(), MISDN_CLEANING, MISDN_CONNECTED, MISDN_DIALING, MISDN_DISCONNECTED, misdn_get_ch_state(), MISDN_HOLD_DISCONNECT, MISDN_HOLD_IDLE, MISDN_INCOMING_SETUP, misdn_lib_find_held_bc(), misdn_lib_release(), misdn_lib_send_event(), MISDN_NOTHING, MISDN_PROCEEDING, MISDN_PROGRESS, name, chan_list::need_busy, misdn_bchannel::need_disconnect, chan_list::need_hangup, chan_list::need_queue_hangup, misdn_bchannel::need_release, misdn_bchannel::nt, NULL, ORG_AST, chan_list::originator, misdn_bchannel::out_cause, pbx_builtin_getvar_helper(), misdn_bchannel::pid, hold_info::port, misdn_bchannel::port, misdn_bchannel::progress_indicator, release_chan(), release_chan_early(), start_bc_tones(), hold_info::state, chan_list::state, stop_bc_tones(), misdn_bchannel::uu, misdn_bchannel::uulen, and var.
|
static |
Definition at line 6975 of file chan_misdn.c.
References AST_CAUSE_INVALID_NUMBER_FORMAT, AST_CAUSE_SWITCH_CONGESTION, AST_CAUSE_USER_BUSY, ast_channel_name(), AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_FLASH, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_MASQUERADE_NOTIFY, AST_CONTROL_OFFHOOK, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_REDIRECTING, AST_CONTROL_RING, AST_CONTROL_RINGING, AST_CONTROL_TAKEOFFHOOK, AST_CONTROL_UNHOLD, ast_log, ast_moh_start(), ast_moh_stop(), ast_setstate(), AST_STATE_BUSY, AST_STATE_RING, chan_list::bc, chan_misdn_log(), EVENT_ALERTING, EVENT_DISCONNECT, EVENT_PROCEEDING, EVENT_PROGRESS, hanguptone_indicate(), chan_list::hold, chan_list::incoming_early_audio, LOG_WARNING, MISDN_ALERTING, MISDN_ASTERISK_TECH_PVT, MISDN_CONNECTED, MISDN_HOLD_IDLE, misdn_lib_send_event(), misdn_update_connected_line(), misdn_update_redirecting(), chan_list::mohinterpret, misdn_bchannel::nt, ORG_MISDN, chan_list::originator, misdn_bchannel::out_cause, chan_list::overlap_dial, misdn_bchannel::pid, misdn_bchannel::port, start_bc_tones(), hold_info::state, chan_list::state, and stop_indicate().
|
static |
Definition at line 9904 of file chan_misdn.c.
References ast_copy_string(), misdn_add_number_prefix(), misdn_cfg_is_msn_valid(), misdn_party_dialing::number, and misdn_party_dialing::number_type.
Referenced by cb_events().
void misdn_jb_destroy | ( | struct misdn_jb * | jb | ) |
frees the data and destroys the given jitterbuffer struct
Definition at line 12639 of file chan_misdn.c.
References ast_free, ast_mutex_destroy, misdn_jb::mutexjb, misdn_jb::ok, and misdn_jb::samples.
Referenced by chan_list_destructor(), and config_jitterbuffer().
int misdn_jb_empty | ( | struct misdn_jb * | jb, |
char * | data, | ||
int | len | ||
) |
gets len bytes out of the jitterbuffer if available, else only the available data is returned and the return value indicates the number of data.
Definition at line 12716 of file chan_misdn.c.
References ast_mutex_lock, ast_mutex_unlock, chan_misdn_log(), len(), misdn_jb::mutexjb, misdn_jb::ok, misdn_jb::rp, misdn_jb::samples, misdn_jb::size, misdn_jb::state_buffer, misdn_jb::state_empty, and misdn_jb::wp.
Referenced by chan_misdn_jb_empty().
int misdn_jb_fill | ( | struct misdn_jb * | jb, |
const char * | data, | ||
int | len | ||
) |
fills the jitterbuffer with len data returns < 0 if there was an error (buffer overrun).
Definition at line 12650 of file chan_misdn.c.
References ast_mutex_lock, ast_mutex_unlock, misdn_jb::bytes_wrote, chan_misdn_log(), len(), misdn_jb::mutexjb, misdn_jb::ok, misdn_jb::rp, misdn_jb::samples, misdn_jb::size, misdn_jb::state_buffer, misdn_jb::state_empty, misdn_jb::state_full, misdn_jb::upper_threshold, and misdn_jb::wp.
Referenced by misdn_write().
struct misdn_jb * misdn_jb_init | ( | int | size, |
int | upper_threshold | ||
) |
allocates the jb-structure and initialize the elements
Definition at line 12602 of file chan_misdn.c.
References ast_calloc, ast_free, ast_mutex_init, chan_misdn_log(), misdn_jb::mutexjb, NULL, misdn_jb::ok, misdn_jb::samples, misdn_jb::size, and misdn_jb::upper_threshold.
Referenced by config_jitterbuffer().
|
static |
Definition at line 3619 of file chan_misdn.c.
References chan_misdn_log(), and misdn_lib_isdn_l1watcher().
Referenced by load_module().
|
static |
Definition at line 8174 of file chan_misdn.c.
References ast_party_caller::ani, ao2_ref, chan_list::ast, ast_callerid_parse(), ast_channel_alloc, ast_channel_caller(), ast_channel_exten_set(), ast_channel_nativeformats_set(), ast_channel_priority_set(), ast_channel_rings_set(), ast_channel_set_fd(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_tech_set(), ast_channel_unlock, ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_format(), ast_jb_configure(), ast_log, AST_STATE_RING, ast_strdup, ast_strlen_zero, chan_list_ref, chan_misdn_log(), cid_name, cid_num, LOG_ERROR, MISDN_ASTERISK_TECH_PVT_SET, misdn_cfg_get_next_port(), misdn_get_global_jbconf(), misdn_lib_port_is_pri(), NULL, ast_party_id::number, chan_list::pipe, ast_party_number::str, tmp(), and ast_party_number::valid.
Referenced by cb_events(), and misdn_request().
|
static |
Definition at line 3628 of file chan_misdn.c.
References chan_list::ast, AST_CAUSE_UNALLOCATED, ast_channel_exten_set(), ast_exists_extension(), ast_mutex_lock, ast_mutex_unlock, ast_strlen_zero, ast_tvdiff_ms(), ast_tvnow(), chan_list::bc, misdn_bchannel::caller, chan_misdn_log(), chan_list::context, misdn_bchannel::dialed, EVENT_DISCONNECT, hanguptone_indicate(), MISDN_CLEANING, MISDN_DIALING, misdn_lib_send_event(), MISDN_WAITING4DIGS, misdn_party_dialing::number, misdn_party_id::number, misdn_bchannel::out_cause, chan_list::overlap_dial, chan_list::overlap_dial_task, chan_list::overlap_tv, chan_list::overlap_tv_lock, pbx_start_chan(), misdn_bchannel::port, chan_list::state, and stop_indicate().
Referenced by cb_events().
|
static |
Definition at line 3381 of file chan_misdn.c.
References misdn_jb::size.
Referenced by misdn_add_number_prefix().
|
static |
Definition at line 6135 of file chan_misdn.c.
References ast_channel_queue_connected_line_update(), ast_party_connected_line_init(), ast_set_party_id_all(), ast_party_connected_line::id, ast_set_party_connected_line::id, misdn_to_ast_plan(), misdn_to_ast_pres(), misdn_to_ast_screen(), misdn_to_ast_ton(), misdn_party_id::number, ast_party_id::number, ast_set_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, ast_party_number::plan, misdn_party_id::presentation, ast_party_number::presentation, ast_set_party_connected_line::priv, misdn_party_id::screening, ast_party_connected_line::source, ast_party_number::str, ast_party_id::tag, and ast_party_number::valid.
Referenced by misdn_update_remote_party().
|
static |
Definition at line 7393 of file chan_misdn.c.
References chan_list::ast_dsp, ast_format_alaw, AST_FRAME_VOICE, ast_poll, chan_list::ast_rd_buf, ast_tv(), ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), chan_list::bc, chan_misdn_log(), ast_frame::data, ast_frame::datalen, ast_frame::delivery, errno, chan_list::faxdetect, chan_list::faxdetect_timeout, chan_list::faxdetect_tv, chan_list::faxhandled, ast_frame_subclass::format, chan_list::frame, ast_frame::frametype, chan_list::hold, len(), ast_frame::mallocd, MISDN_ASTERISK_TECH_PVT, MISDN_HOLD_IDLE, NULL, ast_frame::offset, chan_list::pipe, misdn_bchannel::port, process_ast_dsp(), ast_frame::ptr, ast_frame::samples, ast_frame::src, hold_info::state, ast_frame::subclass, and tmp().
|
static |
Definition at line 7855 of file chan_misdn.c.
References args, AST_APP_ARG, ast_copy_string(), AST_DECLARE_APP_ARGS, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, AST_NONSTANDARD_APP_ARGS, AST_STATE_RESERVED, ast_strdupa, ast_strlen_zero, chan_list::bc, BUFFERSIZE, chan_list_init(), chan_list_unref, chan_misdn_log(), misdn_bchannel::channel, robin_list::channel, cl_queue_chan(), misdn_bchannel::dec, ext, get_robin_position(), LOG_ERROR, LOG_WARNING, METHOD_ROUND_ROBIN, METHOD_STANDARD_DEC, misdn_cfg_get(), misdn_cfg_get_next_port(), misdn_cfg_get_next_port_spin(), MISDN_CFG_GROUPNAME, misdn_cfg_is_group_method(), MISDN_CFG_PMP_L1_CHECK, misdn_lib_get_free_bc(), misdn_lib_get_maxchans(), misdn_lib_port_up(), misdn_lib_release(), misdn_new(), chan_list::need_hangup, NULL, ORG_AST, misdn_bchannel::port, robin_list::port, and read_config().
|
static |
Definition at line 8115 of file chan_misdn.c.
References ast_copy_string(), ast_log, chan_list::bc, misdn_bchannel::display, EVENT_INFORMATION, LOG_WARNING, MISDN_ASTERISK_TECH_PVT, misdn_lib_send_event(), and tmp().
|
static |
Definition at line 12365 of file chan_misdn.c.
References ast_channel_tech(), ast_copy_string(), chan_list::ast_dsp, ast_dsp_new(), ast_dsp_set_features(), ast_log, ast_strdupa, ast_strlen_zero, chan_list::bc, misdn_bchannel::capability, chan_misdn_log(), config_jitterbuffer(), misdn_bchannel::crypt_key, misdn_bchannel::display, chan_list::dsp, DSP_FEATURE_DIGIT_DETECT, DSP_FEATURE_FAX_DETECT, misdn_bchannel::ec_deftaps, misdn_bchannel::ec_enable, chan_list::faxdetect, chan_list::faxdetect_timeout, misdn_bchannel::hdlc, chan_list::ignore_dtmf, INFO_CAPABILITY_DIGITAL_UNRESTRICTED, chan_list::jb_len, chan_list::jb_upper_threshold, keys, LOG_WARNING, MISDN_ASTERISK_TECH_PVT, MISDN_CFG_FAXDETECT_TIMEOUT, misdn_cfg_get(), MISDN_GEN_CRYPT_KEYS, misdn_bchannel::nodsp, misdn_bchannel::nojitter, NULL, misdn_bchannel::orig, chan_list::originator, parse(), misdn_bchannel::port, misdn_bchannel::presentation, misdn_bchannel::rxgain, misdn_bchannel::send_dtmf, misdn_bchannel::set_presentation, strsep(), tmp(), and misdn_bchannel::txgain.
Referenced by load_module(), and misdn_call().
|
static |
Definition at line 3604 of file chan_misdn.c.
References _misdn_tasks_add_variable().
Referenced by load_module().
|
static |
Definition at line 3609 of file chan_misdn.c.
References _misdn_tasks_add_variable().
Referenced by cb_events().
|
static |
Definition at line 3574 of file chan_misdn.c.
References ast_sched_context_destroy(), cb_log, chan_misdn_log(), misdn_tasks_thread, and NULL.
Referenced by unload_module().
|
static |
Definition at line 3554 of file chan_misdn.c.
References ast_sched_context_create(), chan_misdn_log(), misdn_tasks_thread, misdn_tasks_thread_func(), NULL, and pthread_create.
Referenced by _misdn_tasks_add_variable().
|
static |
Definition at line 3614 of file chan_misdn.c.
References AST_SCHED_DEL.
Referenced by chan_list_destructor().
|
static |
Definition at line 3528 of file chan_misdn.c.
References ast_sched_runq(), ast_sched_wait(), chan_misdn_log(), NULL, and sighandler().
Referenced by misdn_tasks_init().
|
inlinestatic |
Definition at line 3586 of file chan_misdn.c.
References misdn_tasks_thread.
Referenced by _misdn_tasks_add_variable().
|
static |
Definition at line 2000 of file chan_misdn.c.
References NUMPLAN_DATA, NUMPLAN_ISDN, NUMPLAN_NATIONAL, NUMPLAN_PRIVATE, NUMPLAN_TELEX, and NUMPLAN_UNKNOWN.
Referenced by cb_events(), misdn_copy_redirecting_to_ast(), misdn_queue_connected_line_update(), and misdn_update_caller_id().
|
static |
Definition at line 2117 of file chan_misdn.c.
References AST_PRES_ALLOWED, AST_PRES_RESTRICTED, and AST_PRES_UNAVAILABLE.
Referenced by cb_events(), misdn_copy_redirecting_to_ast(), misdn_queue_connected_line_update(), and misdn_update_caller_id().
|
static |
Definition at line 2314 of file chan_misdn.c.
References AST_REDIRECTING_REASON_CALL_FWD_DTE, AST_REDIRECTING_REASON_DEFLECTION, AST_REDIRECTING_REASON_NO_ANSWER, AST_REDIRECTING_REASON_OUT_OF_ORDER, AST_REDIRECTING_REASON_UNCONDITIONAL, AST_REDIRECTING_REASON_UNKNOWN, AST_REDIRECTING_REASON_USER_BUSY, mISDN_REDIRECTING_REASON_CALL_FWD, mISDN_REDIRECTING_REASON_CALL_FWD_BUSY, mISDN_REDIRECTING_REASON_CALL_FWD_DTE, mISDN_REDIRECTING_REASON_DEFLECTION, mISDN_REDIRECTING_REASON_NO_REPLY, mISDN_REDIRECTING_REASON_OUT_OF_ORDER, and mISDN_REDIRECTING_REASON_UNKNOWN.
Referenced by misdn_copy_redirecting_to_ast().
|
static |
Definition at line 2210 of file chan_misdn.c.
References AST_PRES_NETWORK_NUMBER, AST_PRES_USER_NUMBER_FAILED_SCREEN, AST_PRES_USER_NUMBER_PASSED_SCREEN, and AST_PRES_USER_NUMBER_UNSCREENED.
Referenced by cb_events(), misdn_copy_redirecting_to_ast(), misdn_queue_connected_line_update(), and misdn_update_caller_id().
|
static |
Definition at line 1874 of file chan_misdn.c.
References NUMTYPE_ABBREVIATED, NUMTYPE_INTERNATIONAL, NUMTYPE_NATIONAL, NUMTYPE_NETWORK_SPECIFIC, NUMTYPE_SUBSCRIBER, and NUMTYPE_UNKNOWN.
Referenced by cb_events(), misdn_copy_redirecting_to_ast(), misdn_queue_connected_line_update(), and misdn_update_caller_id().
|
static |
Definition at line 1958 of file chan_misdn.c.
References NUMPLAN_DATA, NUMPLAN_ISDN, NUMPLAN_NATIONAL, NUMPLAN_PRIVATE, NUMPLAN_TELEX, NUMPLAN_UNKNOWN, and str.
Referenced by cb_events().
|
static |
Definition at line 2084 of file chan_misdn.c.
References str.
Referenced by cb_events(), and update_config().
|
static |
Definition at line 2173 of file chan_misdn.c.
References str.
Referenced by cb_events(), and update_config().
|
static |
Definition at line 1832 of file chan_misdn.c.
References NUMTYPE_ABBREVIATED, NUMTYPE_INTERNATIONAL, NUMTYPE_NATIONAL, NUMTYPE_NETWORK_SPECIFIC, NUMTYPE_SUBSCRIBER, NUMTYPE_UNKNOWN, and str.
Referenced by cb_events().
|
static |
Definition at line 6171 of file chan_misdn.c.
References ast_party_caller::ani, ast_set_party_caller::ani, ast_channel_caller(), ast_channel_lock, ast_channel_set_caller_event(), ast_channel_unlock, ast_party_caller_set_init(), ast_party_caller::id, ast_set_party_caller::id, misdn_to_ast_plan(), misdn_to_ast_pres(), misdn_to_ast_screen(), misdn_to_ast_ton(), misdn_party_id::number, ast_party_id::number, ast_set_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, ast_party_number::plan, misdn_party_id::presentation, ast_party_number::presentation, misdn_party_id::screening, ast_party_number::str, ast_party_id::tag, and ast_party_number::valid.
Referenced by misdn_update_remote_party().
|
static |
Definition at line 6300 of file chan_misdn.c.
References misdn_bchannel::caller, misdn_bchannel::connected, EVENT_FACILITY, EVENT_NOTIFY, misdn_bchannel::fac_out, MISDN_ASTERISK_TECH_PVT, MISDN_CONNECTED, misdn_get_connected_line(), misdn_lib_is_ptp(), misdn_lib_port_is_nt(), misdn_lib_send_event(), mISDN_NOTIFY_CODE_CALL_TRANSFER_ACTIVE, misdn_bchannel::notify_description_code, ORG_MISDN, misdn_bchannel::outgoing_colp, misdn_bchannel::port, misdn_party_id::presentation, print_facility(), misdn_bchannel::redirecting, chan_list::state, misdn_party_redirecting::to, and misdn_party_redirecting::to_changed.
Referenced by misdn_indication().
|
static |
Definition at line 6483 of file chan_misdn.c.
References ast_channel_exten(), EVENT_FACILITY, EVENT_NOTIFY, misdn_bchannel::fac_out, match(), misdn_copy_redirecting_from_ast(), misdn_lib_is_ptp(), misdn_lib_port_is_nt(), misdn_lib_send_event(), mISDN_NOTIFY_CODE_CALL_IS_DIVERTING, misdn_bchannel::notify_description_code, misdn_party_id::number, ORG_MISDN, misdn_bchannel::outgoing_colp, misdn_bchannel::port, misdn_party_id::presentation, print_facility(), misdn_party_redirecting::reason, misdn_bchannel::redirecting, misdn_party_redirecting::to, and misdn_party_redirecting::to_changed.
Referenced by misdn_indication().
|
static |
Definition at line 6210 of file chan_misdn.c.
References misdn_queue_connected_line_update(), and misdn_update_caller_id().
Referenced by cb_events(), and misdn_facility_ie_handler().
|
static |
Definition at line 7478 of file chan_misdn.c.
References misdn_bchannel::active, misdn_bchannel::addr, AST_BRIDGE_COMPLETE, AST_BRIDGE_DTMF_CHANNEL_0, AST_BRIDGE_DTMF_CHANNEL_1, AST_BRIDGE_FAILED, AST_BRIDGE_FAILED_NOWARN, ast_channel_caller(), ast_channel_exten(), ast_channel_hangupcause_hash_set(), ast_channel_name(), AST_CONTROL_PVT_CAUSE_CODE, ast_debug, ast_format_alaw, ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), AST_FRAME_CONTROL, AST_FRAME_DTMF, AST_FRAME_VOICE, ast_log, ast_read(), ast_verb, ast_waitfor_n(), ast_write(), chan_list::bc, misdn_bchannel::bc_state, BCHAN_ACTIVATED, BCHAN_BRIDGED, misdn_bchannel::caller, misdn_bchannel::capability, cb_log, chan_list_unref, chan_misdn_log(), ast_frame::data, ast_frame::datalen, chan_list::dropped_frame_cnt, ast_frame_subclass::format, ast_frame::frametype, chan_list::hold, chan_list::ignore_dtmf, ast_frame_subclass::integer, chan_list::jb, misdn_bchannel::l3_id, LOG_NOTICE, LOG_WARNING, max, MISDN_ASTERISK_TECH_PVT, misdn_cap_is_speech(), MISDN_CFG_BRIDGING, misdn_cfg_get(), MISDN_GEN_BRIDGING, misdn_get_ch_state(), MISDN_HOLD_IDLE, misdn_jb_fill(), misdn_lib_bridge(), misdn_lib_split_bridge(), misdn_lib_tone_generator_start(), misdn_lib_tx2misdn_frm(), misdn_party_id::name, misdn_bchannel::nojitter, chan_list::notxtone, misdn_party_id::number, misdn_bchannel::pid, misdn_bchannel::port, ast_frame::ptr, S_COR, ast_frame::samples, ast_frame::src, hold_info::state, ast_frame::subclass, and chan_list::ts.
|
static |
Channel Queue End
Definition at line 8438 of file chan_misdn.c.
References chan_list::ast, ast_pbx_start(), and chan_list::need_hangup.
Referenced by do_immediate_setup(), misdn_overlap_dial_task(), and start_pbx().
|
static |
Definition at line 4167 of file chan_misdn.c.
References misdn_bchannel::active, misdn_bchannel::addr, chan_list::addr, chan_list::ast, ast_channel_caller(), ast_channel_context(), ast_channel_exten(), ast_channel_name(), ast_cli(), misdn_bchannel::bc_state, bc_state2str(), bearer2str(), misdn_bchannel::capability, misdn_bchannel::channel, misdn_bchannel::display, misdn_bchannel::ec_enable, misdn_party_redirecting::from, misdn_bchannel::holded, misdn_bchannel::l3_id, chan_list::l3id, misdn_get_ch_state(), name, misdn_party_id::name, chan_list::norxtone, chan_list::notxtone, misdn_bchannel::nt, misdn_party_id::number, ORG_AST, chan_list::originator, misdn_bchannel::pid, misdn_bchannel::port, misdn_bchannel::redirecting, and misdn_party_redirecting::to.
Referenced by handle_cli_misdn_show_channel(), and handle_cli_misdn_show_channels().
|
static |
Definition at line 3355 of file chan_misdn.c.
References bearer2str(), misdn_bchannel::capability, chan_misdn_log(), INFO_CODEC_ALAW, INFO_CODEC_ULAW, misdn_bchannel::law, and misdn_bchannel::port.
Referenced by cb_events().
|
static |
Definition at line 2762 of file chan_misdn.c.
References chan_misdn_log(), and misdn_bchannel::port.
Referenced by handle_cli_misdn_send_facility(), misdn_answer(), misdn_call(), misdn_facility_exec(), misdn_facility_ie_handler(), misdn_update_connected_line(), misdn_update_redirecting(), reload(), and wait_for_digits().
|
static |
Definition at line 7318 of file chan_misdn.c.
References chan_list::ast, ast_async_goto(), ast_channel_caller(), ast_channel_context(), ast_channel_exten(), ast_channel_macrocontext(), ast_channel_name(), ast_debug, chan_list::ast_dsp, ast_dsp_process(), ast_exists_extension(), AST_FRAME_DTMF, ast_log, ast_verb, chan_list::bc, BUFFERSIZE, chan_misdn_log(), context, chan_list::dsp, misdn_bchannel::ec_enable, chan_list::faxdetect, chan_list::faxhandled, ast_frame::frametype, ast_frame_subclass::integer, isdn_lib_stop_dtmf(), isdn_lib_update_ec(), isdn_lib_update_rxgain(), isdn_lib_update_txgain(), LOG_NOTICE, LOG_WARNING, MISDN_CFG_FAXDETECT_CONTEXT, misdn_cfg_get(), NULL, pbx_builtin_setvar_helper(), misdn_bchannel::port, misdn_bchannel::rxgain, S_COR, S_OR, ast_frame::subclass, and misdn_bchannel::txgain.
Referenced by misdn_read().
|
static |
Definition at line 5922 of file chan_misdn.c.
References chan_list::allowed_bearers, misdn_bchannel::AOCDtype, chan_list::ast, ast_callerid_parse(), ast_channel_callgroup_set(), ast_channel_context_set(), ast_channel_exten_set(), ast_channel_lock, ast_channel_named_callgroups_set(), ast_channel_named_pickupgroups_set(), ast_channel_pickupgroup_set(), ast_channel_unlock, ast_copy_string(), chan_list::ast_dsp, ast_dsp_new(), ast_dsp_set_features(), ast_free, ast_log, ast_mutex_init, ast_print_group(), ast_print_namedgroups(), ast_str_create, ast_str_reset(), ast_strlen_zero, bc, chan_list::bc, buf, buf2, BUFFERSIZE, misdn_bchannel::caller, misdn_bchannel::capability, chan_misdn_log(), cid_name, cid_num, config_jitterbuffer(), chan_list::context, debug_numtype(), misdn_bchannel::dialed, misdn_bchannel::display_connected, misdn_bchannel::display_setup, chan_list::dsp, DSP_FEATURE_DIGIT_DETECT, DSP_FEATURE_FAX_DETECT, misdn_bchannel::early_bconnect, chan_list::far_alerting, chan_list::faxdetect, chan_list::faxdetect_timeout, misdn_bchannel::hdlc, chan_list::ignore_dtmf, misdn_bchannel::incoming_cid_tag, chan_list::incoming_early_audio, INFO_CAPABILITY_DIGITAL_RESTRICTED, INFO_CAPABILITY_DIGITAL_UNRESTRICTED, chan_list::jb_len, chan_list::jb_upper_threshold, misdn_bchannel::keypad, LOG_WARNING, misdn_add_number_prefix(), MISDN_CFG_ALLOWED_BEARERS, MISDN_CFG_ASTDTMF, MISDN_CFG_CALLERID, MISDN_CFG_CALLGROUP, MISDN_CFG_CONTEXT, MISDN_CFG_DIALPLAN, MISDN_CFG_DISPLAY_CONNECTED, MISDN_CFG_DISPLAY_SETUP, MISDN_CFG_EARLY_BCONNECT, MISDN_CFG_FAR_ALERTING, MISDN_CFG_FAXDETECT, MISDN_CFG_FAXDETECT_TIMEOUT, misdn_cfg_get(), MISDN_CFG_HDLC, MISDN_CFG_INCOMING_CALLERID_TAG, MISDN_CFG_INCOMING_EARLY_AUDIO, MISDN_CFG_JITTERBUFFER, MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CFG_LANGUAGE, MISDN_CFG_MUSICCLASS, MISDN_CFG_NAMEDCALLGROUP, MISDN_CFG_NAMEDPICKUPGROUP, MISDN_CFG_NEED_MORE_INFOS, MISDN_CFG_NOAUTORESPOND_ON_SETUP, MISDN_CFG_NTTIMEOUT, MISDN_CFG_OUTGOING_COLP, MISDN_CFG_OVERLAP_DIAL, MISDN_CFG_PICKUPGROUP, MISDN_CFG_RXGAIN, MISDN_CFG_SENDDTMF, MISDN_CFG_TE_CHOOSE_CHANNEL, MISDN_CFG_TXGAIN, chan_list::mohinterpret, misdn_party_id::name, misdn_bchannel::need_more_infos, chan_list::noautorespond_on_setup, chan_list::nttimeout, NULL, misdn_party_dialing::number, misdn_party_id::number, misdn_party_dialing::number_plan, misdn_party_id::number_type, misdn_party_dialing::number_type, NUMPLAN_ISDN, ORG_AST, chan_list::originator, misdn_bchannel::outgoing_colp, chan_list::overlap_dial, chan_list::overlap_dial_task, chan_list::overlap_tv_lock, misdn_bchannel::port, misdn_bchannel::rxgain, misdn_bchannel::send_dtmf, misdn_bchannel::te_choose_channel, misdn_bchannel::txgain, and update_ec_config().
Referenced by cb_events(), and misdn_request().
|
static |
Definition at line 8495 of file chan_misdn.c.
References chan_list::ast, ast_channel_caller(), ast_channel_context(), ast_channel_exten(), ast_channel_trylock, ast_channel_unlock, ast_mutex_lock, ast_mutex_unlock, ast_setstate(), AST_STATE_DOWN, AST_STATE_RESERVED, chan_list_unref, chan_misdn_log(), cl_dequeue_chan(), DEADLOCK_AVOIDANCE, misdn_bchannel::l3_id, MISDN_ASTERISK_TECH_PVT, MISDN_ASTERISK_TECH_PVT_SET, MISDN_CLEANING, name, NULL, ORG_AST, chan_list::originator, misdn_bchannel::pid, misdn_bchannel::port, S_COR, and chan_list::state.
Referenced by cb_events(), and misdn_hangup().
|
static |
Definition at line 8561 of file chan_misdn.c.
References chan_list::ast, ast_channel_trylock, ast_channel_unlock, ast_mutex_lock, ast_mutex_unlock, ast_setstate(), AST_STATE_DOWN, AST_STATE_RESERVED, chan_list_unref, cl_dequeue_chan(), DEADLOCK_AVOIDANCE, chan_list::hold, MISDN_ASTERISK_TECH_PVT, MISDN_ASTERISK_TECH_PVT_SET, MISDN_CLEANING, MISDN_HOLD_IDLE, NULL, ORG_AST, chan_list::originator, hold_info::port, hold_info::state, and chan_list::state.
Referenced by misdn_hangup().
|
static |
Definition at line 11538 of file chan_misdn.c.
References ao2_alloc, ao2_ref, ARRAY_LEN, AST_APP_ARG, AST_CAUSE_NORMAL_CLEARING, ast_channel_datastore_add(), ast_channel_lock, ast_channel_name(), ast_channel_tech(), ast_channel_unlock, ast_copy_string(), ast_datastore_alloc, ast_debug, AST_DEFINE_APP_ARGS_TYPE, ast_false(), AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, ast_true(), ast_verb, bc, context, ast_datastore::data, DATASTORE_INHERIT_FOREVER, EVENT_FACILITY, EVENT_REGISTER, EVENT_RELEASE_COMPLETE, exten, misdn_bchannel::fac_out, ast_datastore::inheritance, LOG_ERROR, LOG_WARNING, MISDN_CFG_CC_REQUEST_RETENTION, misdn_cfg_get(), misdn_lib_port_is_nt(), misdn_lib_send_event(), misdn_make_dummy(), name, NULL, misdn_bchannel::out_cause, parse(), pbx_builtin_setvar_helper(), misdn_bchannel::port, print_facility(), priority, ptp, reload_config(), and request().
Referenced by chan_misdn_log().
|
static |
Definition at line 4123 of file chan_misdn.c.
References ast_log, free_robin_list(), g_config_initialized, global_tracefile, LOG_WARNING, max_ports, misdn_cfg_get(), misdn_cfg_reload(), misdn_cfg_update_ptp(), MISDN_GEN_DEBUG, and MISDN_GEN_TRACEFILE.
Referenced by handle_cli_misdn_reload(), and reload().
|
static |
-1 | if can hangup after calling. |
0 | if cannot hangup after calling. |
Definition at line 8725 of file chan_misdn.c.
References AST_CAUSE_CALL_REJECTED, AST_CAUSE_DESTINATION_OUT_OF_ORDER, AST_CAUSE_NO_ROUTE_DESTINATION, AST_CAUSE_NO_ROUTE_TRANSIT_NET, AST_CAUSE_NUMBER_CHANGED, AST_CAUSE_UNALLOCATED, AST_CAUSE_USER_BUSY, ast_channel_hangupcause_set(), AST_CONTROL_BUSY, ast_queue_control(), misdn_bchannel::cause, chan_misdn_log(), MISDN_BUSY, chan_list::need_busy, misdn_bchannel::pid, misdn_bchannel::port, and chan_list::state.
Referenced by hangup_chan().
|
static |
Definition at line 3681 of file chan_misdn.c.
References chan_list::ast, ast_channel_name(), ast_debug, and ast_playtones_start().
Referenced by handle_cli_misdn_send_digit(), and misdn_digit_end().
|
inlinestatic |
Definition at line 3962 of file chan_misdn.c.
References ast_cli(), BUFFERSIZE, COLOR_BRWHITE, COLOR_YELLOW, desc, misdn_cfg_get_desc(), misdn_cfg_get_name(), MISDN_CFG_LAST, name, term_color(), and tmp().
Referenced by handle_cli_misdn_show_config().
|
static |
Definition at line 3524 of file chan_misdn.c.
Referenced by misdn_tasks_thread_func().
|
static |
Definition at line 7764 of file chan_misdn.c.
References chan_list::bc, misdn_lib_tone_generator_stop(), chan_list::norxtone, and chan_list::notxtone.
Referenced by cb_events(), misdn_answer(), misdn_hangup(), and misdn_indication().
|
static |
Definition at line 8875 of file chan_misdn.c.
References chan_misdn_log(), EVENT_RELEASE, EVENT_RELEASE_COMPLETE, hangup_chan(), hanguptone_indicate(), misdn_lib_send_event(), misdn_bchannel::nt, pbx_start_chan(), and misdn_bchannel::port.
Referenced by cb_events().
|
static |
Definition at line 7772 of file chan_misdn.c.
References chan_list::norxtone, and chan_list::notxtone.
Referenced by cb_events(), misdn_call(), and misdn_hangup().
|
static |
Definition at line 7743 of file chan_misdn.c.
References chan_list::ast, ast_playtones_stop(), ast_tone_zone_sound_unref(), chan_list::bc, chan_misdn_log(), misdn_lib_tone_generator_stop(), misdn_bchannel::port, and chan_list::ts.
Referenced by cb_events(), misdn_answer(), misdn_indication(), and misdn_overlap_dial_task().
|
static |
TE STUFF END
Definition at line 11262 of file chan_misdn.c.
References ao2_cleanup, ast_channel_unregister(), ast_cli_unregister_multiple(), ast_custom_function_unregister(), ast_free, ast_unregister_application(), ast_verb, ast_channel_tech::capabilities, free_robin_list(), g_config_initialized, misdn_cfg_destroy(), misdn_lib_destroy(), misdn_ports, misdn_tasks_destroy(), and NULL.
Referenced by chan_misdn_log(), and load_module().
|
static |
Updates caller ID information from config.
Definition at line 5761 of file chan_misdn.c.
References chan_list::ast, ast_channel_connected(), ast_log, ast_to_misdn_pres(), ast_to_misdn_screen(), bc, chan_list::bc, misdn_bchannel::caller, misdn_bchannel::capability, chan_misdn_log(), misdn_bchannel::hdlc, INFO_CAPABILITY_DIGITAL_RESTRICTED, INFO_CAPABILITY_DIGITAL_UNRESTRICTED, LOG_WARNING, misdn_cfg_get(), MISDN_CFG_HDLC, MISDN_CFG_PRES, MISDN_CFG_SCREEN, misdn_to_str_pres(), misdn_to_str_screen(), misdn_bchannel::port, misdn_party_id::presentation, and misdn_party_id::screening.
Referenced by misdn_call().
|
static |
Definition at line 5903 of file chan_misdn.c.
References misdn_bchannel::ec_deftaps, misdn_bchannel::ec_enable, MISDN_CFG_ECHOCANCEL, misdn_cfg_get(), and misdn_bchannel::port.
Referenced by handle_cli_misdn_toggle_echocancel(), and read_config().
|
static |
Definition at line 8150 of file chan_misdn.c.
References ast_change_name(), ast_channel_name(), chan_misdn_log(), misdn_cfg_get_next_port(), and misdn_lib_port_is_pri().
Referenced by cb_events().
|
static |
Definition at line 8889 of file chan_misdn.c.
References ast_channel_alloc, ast_channel_dialed(), ast_channel_name(), ast_channel_priority_set(), ast_channel_release(), ast_channel_unlock, ast_free, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, ast_pbx_start(), AST_STATE_DOWN, ast_strdup, ast_verb, chan_misdn_log(), misdn_bchannel::dialed, dialtone_indicate(), EVENT_FACILITY, EVENT_SETUP_ACKNOWLEDGE, misdn_bchannel::fac_out, LOG_ERROR, LOG_WARNING, misdn_lib_port_is_nt(), misdn_lib_send_event(), misdn_make_dummy(), MISDN_WAITING4DIGS, misdn_bchannel::nt, NULL, misdn_party_dialing::number, ast_party_dialed::number, print_facility(), chan_list::state, and ast_party_dialed::str.
Referenced by cb_events().
|
static |
Definition at line 12838 of file chan_misdn.c.
|
static |
Definition at line 2362 of file chan_misdn.c.
|
static |
Definition at line 12838 of file chan_misdn.c.
|
static |
Definition at line 5734 of file chan_misdn.c.
Global channel call record list head.
Definition at line 704 of file chan_misdn.c.
|
static |
Definition at line 705 of file chan_misdn.c.
|
static |
Definition at line 129 of file chan_misdn.c.
Referenced by load_module(), reload_config(), and unload_module().
|
static |
Definition at line 8148 of file chan_misdn.c.
|
static |
Definition at line 127 of file chan_misdn.c.
Referenced by chan_misdn_log(), load_module(), and reload_config().
|
static |
Definition at line 696 of file chan_misdn.c.
Referenced by handle_cli_misdn_set_debug(), load_module(), and reload_config().
int MAXTICS = 8 |
Definition at line 612 of file chan_misdn.c.
Referenced by handle_cli_misdn_set_tics().
|
static |
Definition at line 694 of file chan_misdn.c.
|
static |
Definition at line 695 of file chan_misdn.c.
|
static |
Definition at line 698 of file chan_misdn.c.
|
static |
Definition at line 699 of file chan_misdn.c.
|
static |
Definition at line 673 of file chan_misdn.c.
Referenced by load_module(), and unload_module().
|
static |
the main schedule context for stuff like l1 watcher, overlap dial, ...
Definition at line 670 of file chan_misdn.c.
|
static |
Definition at line 671 of file chan_misdn.c.
Referenced by misdn_tasks_destroy(), misdn_tasks_init(), and misdn_tasks_wakeup().
|
static |
Definition at line 8130 of file chan_misdn.c.
|
static |
Definition at line 690 of file chan_misdn.c.
|
static |
Definition at line 323 of file chan_misdn.c.
|
static |
Definition at line 626 of file chan_misdn.c.
Referenced by get_robin_position().
|
static |
Definition at line 4083 of file chan_misdn.c.
|
static |
Definition at line 692 of file chan_misdn.c.