Asterisk - The Open Source Telephony Project GIT-master-d856a3e
|
#include "ooh323cDriver.h"
#include "asterisk.h"
#include "asterisk/lock.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
Go to the source code of this file.
Data Structures | |
struct | callthread |
Macros | |
#define | AST_BACKGROUND_STACKSIZE 768 * 1024 |
#define | SEC_TO_HOLD_THREAD 24 |
Functions | |
struct ast_format * | convertH323CapToAsteriskCap (int cap) |
void * | ooh323c_call_thread (void *dummy) |
void * | ooh323c_cmd_thread (void *dummy) |
int | ooh323c_set_aliases (ooAliases *aliases) |
int | ooh323c_set_capability (struct ast_format_cap *cap, int dtmf, int dtmfcodec) |
int | ooh323c_set_capability_for_call (ooCallData *call, struct ast_format_cap *cap, int dtmf, int dtmfcodec, int t38support, int g729onlyA) |
void * | ooh323c_stack_thread (void *dummy) |
int | ooh323c_start_call_thread (ooCallData *call) |
int | ooh323c_start_receive_channel (ooCallData *call, ooLogicalChannel *pChannel) |
int | ooh323c_start_receive_datachannel (ooCallData *call, ooLogicalChannel *pChannel) |
int | ooh323c_start_stack_thread () |
int | ooh323c_start_transmit_channel (ooCallData *call, ooLogicalChannel *pChannel) |
int | ooh323c_start_transmit_datachannel (ooCallData *call, ooLogicalChannel *pChannel) |
int | ooh323c_stop_call_thread (ooCallData *call) |
int | ooh323c_stop_receive_channel (ooCallData *call, ooLogicalChannel *pChannel) |
int | ooh323c_stop_receive_datachannel (ooCallData *call, ooLogicalChannel *pChannel) |
int | ooh323c_stop_stack_thread (void) |
int | ooh323c_stop_transmit_channel (ooCallData *call, ooLogicalChannel *pChannel) |
int | ooh323c_stop_transmit_datachannel (ooCallData *call, ooLogicalChannel *pChannel) |
Variables | |
static struct callthread * | callThreads = NULL |
static ast_mutex_t | callThreadsLock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
OOBOOL | gH323Debug |
OOH323EndPoint | gH323ep |
static int | grxframes = 240 |
static int | gtxframes = 20 |
struct ast_module * | myself |
static pthread_t | ooh323c_thread = AST_PTHREADT_NULL |
static pthread_t | ooh323cmd_thread = AST_PTHREADT_NULL |
#define AST_BACKGROUND_STACKSIZE 768 * 1024 |
Definition at line 26 of file ooh323cDriver.c.
#define SEC_TO_HOLD_THREAD 24 |
Definition at line 28 of file ooh323cDriver.c.
struct ast_format * convertH323CapToAsteriskCap | ( | int | cap | ) |
Definition at line 664 of file ooh323cDriver.c.
References ast_debug, ast_format_alaw, ast_format_g723, ast_format_g726, ast_format_g726_aal2, ast_format_g729, ast_format_gsm, ast_format_h263, ast_format_speex, ast_format_ulaw, and NULL.
Referenced by ooh323c_start_receive_channel(), and ooh323c_start_transmit_channel().
void * ooh323c_call_thread | ( | void * | dummy | ) |
Definition at line 80 of file ooh323cDriver.c.
References ast_free, ast_module_unref, ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, ast_update_use_count(), c, callthread::call, callThreads, callThreadsLock, dummy(), FALSE, callthread::inUse, callthread::lock, myself, callthread::next, NULL, callthread::prev, SEC_TO_HOLD_THREAD, and callthread::thePipe.
Referenced by ooh323c_start_call_thread().
void * ooh323c_cmd_thread | ( | void * | dummy | ) |
Definition at line 73 of file ooh323cDriver.c.
References dummy().
Referenced by ooh323c_start_stack_thread().
int ooh323c_set_aliases | ( | ooAliases * | aliases | ) |
Definition at line 566 of file ooh323cDriver.c.
int ooh323c_set_capability | ( | struct ast_format_cap * | cap, |
int | dtmf, | ||
int | dtmfcodec | ||
) |
Definition at line 227 of file ooh323cDriver.c.
References ao2_ref, ast_format_alaw, ast_format_cap_count(), ast_format_cap_get_format(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_g723, ast_format_g726, ast_format_g726_aal2, ast_format_g729, ast_format_gsm, ast_format_h263, ast_format_speex, ast_format_ulaw, ast_verb, FALSE, gH323Debug, grxframes, gtxframes, H323_DTMF_CISCO, H323_DTMF_H245ALPHANUMERIC, H323_DTMF_H245SIGNAL, H323_DTMF_RFC2833, ooh323c_start_receive_channel(), ooh323c_start_transmit_channel(), ooh323c_stop_receive_channel(), and ooh323c_stop_transmit_channel().
Referenced by load_module().
int ooh323c_set_capability_for_call | ( | ooCallData * | call, |
struct ast_format_cap * | cap, | ||
int | dtmf, | ||
int | dtmfcodec, | ||
int | t38support, | ||
int | g729onlyA | ||
) |
Definition at line 383 of file ooh323cDriver.c.
References ao2_ref, ast_format_alaw, ast_format_cap_count(), ast_format_cap_get_format(), ast_format_cap_get_format_framing(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_g723, ast_format_g726, ast_format_g726_aal2, ast_format_g729, ast_format_gsm, ast_format_h263, ast_format_speex, ast_format_ulaw, ast_verb, call(), FALSE, g729onlyA, gH323Debug, grxframes, H323_DTMF_CISCO, H323_DTMF_H245ALPHANUMERIC, H323_DTMF_H245SIGNAL, H323_DTMF_RFC2833, ooh323c_start_receive_channel(), ooh323c_start_receive_datachannel(), ooh323c_start_transmit_channel(), ooh323c_start_transmit_datachannel(), ooh323c_stop_receive_channel(), ooh323c_stop_receive_datachannel(), ooh323c_stop_transmit_channel(), and ooh323c_stop_transmit_datachannel().
Referenced by onNewCallCreated(), and ooh323_onReceivedSetup().
void * ooh323c_stack_thread | ( | void * | dummy | ) |
Definition at line 66 of file ooh323cDriver.c.
References dummy().
Referenced by ooh323c_start_stack_thread().
int ooh323c_start_call_thread | ( | ooCallData * | call | ) |
Definition at line 130 of file ooh323cDriver.c.
References ast_calloc, ast_debug, ast_free, ast_log, ast_module_ref, ast_mutex_destroy, ast_mutex_init, ast_mutex_lock, ast_mutex_trylock, ast_mutex_unlock, ast_pthread_create_detached_background, c, callthread::call, call(), callThreads, callThreadsLock, gH323Debug, callthread::inUse, callthread::lock, LOG_ERROR, myself, callthread::next, NULL, ooh323c_call_thread(), PF_LOCAL, callthread::thePipe, and TRUE.
Referenced by onNewCallCreated().
int ooh323c_start_receive_channel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 593 of file ooh323cDriver.c.
References ast_log, call(), convertH323CapToAsteriskCap(), LOG_ERROR, and NULL.
Referenced by ooh323c_set_capability(), and ooh323c_set_capability_for_call().
int ooh323c_start_receive_datachannel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 642 of file ooh323cDriver.c.
Referenced by ooh323c_set_capability_for_call().
int ooh323c_start_stack_thread | ( | void | ) |
Definition at line 199 of file ooh323cDriver.c.
References ast_log, ast_pthread_create_background, LOG_ERROR, NULL, ooh323c_cmd_thread(), ooh323c_stack_thread(), ooh323c_thread, and ooh323cmd_thread.
Referenced by load_module().
int ooh323c_start_transmit_channel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 607 of file ooh323cDriver.c.
References ast_format_alaw, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_g729, ast_format_ulaw, ast_log, call(), convertH323CapToAsteriskCap(), LOG_ERROR, NULL, ooh323_set_write_format(), and setup_rtp_connection().
Referenced by ooh323c_set_capability(), and ooh323c_set_capability_for_call().
int ooh323c_start_transmit_datachannel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 647 of file ooh323cDriver.c.
References call(), and setup_udptl_connection().
Referenced by ooh323c_set_capability_for_call().
int ooh323c_stop_call_thread | ( | ooCallData * | call | ) |
Definition at line 192 of file ooh323cDriver.c.
References AST_PTHREADT_NULL, and call().
Referenced by onCallCleared().
int ooh323c_stop_receive_channel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 630 of file ooh323cDriver.c.
Referenced by ooh323c_set_capability(), and ooh323c_set_capability_for_call().
int ooh323c_stop_receive_datachannel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 653 of file ooh323cDriver.c.
Referenced by ooh323c_set_capability_for_call().
int ooh323c_stop_stack_thread | ( | void | ) |
Definition at line 214 of file ooh323cDriver.c.
References AST_PTHREADT_NULL, NULL, ooh323c_thread, and ooh323cmd_thread.
Referenced by unload_module().
int ooh323c_stop_transmit_channel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 635 of file ooh323cDriver.c.
References call(), and close_rtp_connection().
Referenced by ooh323c_set_capability(), and ooh323c_set_capability_for_call().
int ooh323c_stop_transmit_datachannel | ( | ooCallData * | call, |
ooLogicalChannel * | pChannel | ||
) |
Definition at line 658 of file ooh323cDriver.c.
References call(), and close_udptl_connection().
Referenced by ooh323c_set_capability_for_call().
|
static |
Referenced by ooh323c_call_thread(), and ooh323c_start_call_thread().
|
static |
Definition at line 48 of file ooh323cDriver.c.
Referenced by ooh323c_call_thread(), and ooh323c_start_call_thread().
|
extern |
Definition at line 381 of file chan_ooh323.c.
Referenced by build_peer(), build_user(), close_rtp_connection(), close_udptl_connection(), configure_local_rtp(), find_call(), find_friend(), find_peer(), find_user(), handle_cli_ooh323_reload(), handle_cli_ooh323_set_debug(), onAlerting(), onCallCleared(), onCallEstablished(), onModeChanged(), onNewCallCreated(), onOutgoingCall(), onProgress(), ooh323_alloc(), ooh323_answer(), ooh323_call(), ooh323_delete_peer(), ooh323_destroy(), ooh323_digit_begin(), ooh323_digit_end(), ooh323_do_reload(), ooh323_fixup(), ooh323_get_codec(), ooh323_get_rtp_peer(), ooh323_hangup(), ooh323_indicate(), ooh323_new(), ooh323_onReceivedSetup(), ooh323_queryoption(), ooh323_request(), ooh323_rtp_read(), ooh323_set_read_format(), ooh323_set_rtp_peer(), ooh323_set_write_format(), ooh323c_set_capability(), ooh323c_set_capability_for_call(), ooh323c_start_call_thread(), reload_config(), reload_module(), setup_rtp_connection(), setup_rtp_remote(), setup_udptl_connection(), and unload_module().
|
extern |
|
static |
Definition at line 36 of file ooh323cDriver.c.
Referenced by ooh323c_set_capability(), and ooh323c_set_capability_for_call().
|
static |
Definition at line 38 of file ooh323cDriver.c.
Referenced by ooh323c_set_capability().
|
extern |
Definition at line 113 of file chan_ooh323.c.
Referenced by load_module(), onCallCleared(), ooh323_destroy(), ooh323_hangup(), ooh323_new(), ooh323c_call_thread(), and ooh323c_start_call_thread().
|
static |
Definition at line 34 of file ooh323cDriver.c.
Referenced by ooh323c_start_stack_thread(), and ooh323c_stop_stack_thread().
|
static |
Definition at line 35 of file ooh323cDriver.c.
Referenced by ooh323c_start_stack_thread(), and ooh323c_stop_stack_thread().