25 #undef AST_BACKGROUND_STACKSIZE 26 #define AST_BACKGROUND_STACKSIZE 768 * 1024 28 #define SEC_TO_HOLD_THREAD 24 76 ooMonitorCmdChannels();
83 struct pollfd pfds[1];
89 ooMonitorCallChannels((ooCallData*)mycthread->
call);
100 pfds[0].fd = mycthread->
thePipe[0];
101 pfds[0].events = POLLIN;
103 if (ooPDRead(pfds, 1, mycthread->
thePipe[0]))
104 res = read(mycthread->
thePipe[0], &c, 1);
117 }
while (mycthread->
call !=
NULL && res >= 0);
157 ast_log(
LOG_ERROR,
"Can't create thread pipe for call %s\n", call->callToken);
167 ast_debug(1,
"new call thread created for call %s\n", call->callToken);
182 ast_debug(1,
"using existing call thread for call %s\n", call->callToken);
194 ooStopMonitorCallChannels(call);
232 ast_verb(0,
"\tAdding capabilities to H323 endpoint\n");
241 ast_verb(0,
"\tAdding g711 ulaw capability to H323 endpoint\n");
252 ast_verb(0,
"\tAdding g711 alaw capability to H323 endpoint\n");
264 ast_verb(0,
"\tAdding g729A capability to H323 endpoint\n");
266 ret = ooH323EpAddG729Capability(OO_G729A, 2, 24,
273 ast_verb(0,
"\tAdding g729 capability to H323 endpoint\n");
275 ret |= ooH323EpAddG729Capability(OO_G729, 2, 24,
281 ast_verb(0,
"\tAdding g729b capability to H323 endpoint\n");
283 ret |= ooH323EpAddG729Capability(OO_G729B, 2, 24,
293 ast_verb(0,
"\tAdding g7231 capability to H323 endpoint\n");
295 ret = ooH323EpAddG7231Capability(OO_G7231, 1, 1,
FALSE,
306 ast_verb(0,
"\tAdding g726 capability to H323 endpoint\n");
319 ast_verb(0,
"\tAdding g726aal2 capability to H323 endpoint\n");
332 ast_verb(0,
"\tAdding h263 capability to H323 endpoint\n");
334 ret = ooH323EpAddH263VideoCapability(OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
345 ast_verb(0,
"\tAdding gsm capability to H323 endpoint\n");
347 ret = ooH323EpAddGSMCapability(OO_GSMFULLRATE, 4,
FALSE,
FALSE,
358 ast_verb(0,
"\tAdding speex capability to H323 endpoint\n");
360 ret = ooH323EpAddSpeexCapability(OO_SPEEX, 4, 4,
FALSE,
372 ret |= ooH323EpEnableDTMFCISCO(0);
374 ret |= ooH323EpEnableDTMFRFC2833(0);
376 ret |= ooH323EpEnableDTMFH245Alphanumeric();
378 ret |= ooH323EpEnableDTMFH245Signal();
387 int ret = 0, x, txframes;
389 ast_verb(0,
"\tAdding capabilities to call(%s, %s)\n", call->callType,
393 ret |= ooCallEnableDTMFCISCO(call,dtmfcodec);
395 ret |= ooCallEnableDTMFRFC2833(call,dtmfcodec);
397 ret |= ooCallEnableDTMFH245Alphanumeric(call);
399 ret |= ooCallEnableDTMFH245Signal(call);
402 ooCapabilityAddT38Capability(call, OO_T38, OORXANDTX,
415 ast_verb(0,
"\tAdding g711 ulaw capability to call(%s, %s)\n",
416 call->callType, call->callToken);
419 ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
429 ast_verb(0,
"\tAdding g711 alaw capability to call(%s, %s)\n",
430 call->callType, call->callToken);
433 ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
444 ast_verb(0,
"\tAdding g726 capability to call (%s, %s)\n",
445 call->callType, call->callToken);
448 ret = ooCallAddG726Capability(call, OO_G726, txframes,
grxframes,
FALSE,
459 ast_verb(0,
"\tAdding g726aal2 capability to call (%s, %s)\n",
460 call->callType, call->callToken);
463 ret = ooCallAddG726Capability(call, OO_G726AAL2, txframes,
grxframes,
FALSE,
476 ast_verb(0,
"\tAdding g729A capability to call(%s, %s)\n",
477 call->callType, call->callToken);
479 ret= ooCallAddG729Capability(call, OO_G729A, txframes, txframes,
487 ast_verb(0,
"\tAdding g729 capability to call(%s, %s)\n",
488 call->callType, call->callToken);
490 ret|= ooCallAddG729Capability(call, OO_G729, txframes, txframes,
496 ast_verb(0,
"\tAdding g729B capability to call(%s, %s)\n",
497 call->callType, call->callToken);
499 ret|= ooCallAddG729Capability(call, OO_G729B, txframes, txframes,
510 ast_verb(0,
"\tAdding g7231 capability to call (%s, %s)\n",
511 call->callType, call->callToken);
513 ret = ooCallAddG7231Capability(call, OO_G7231, 1, 1,
FALSE,
524 ast_verb(0,
"\tAdding h263 capability to call (%s, %s)\n",
525 call->callType, call->callToken);
527 ret = ooCallAddH263VideoCapability(call, OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
538 ast_verb(0,
"\tAdding gsm capability to call(%s, %s)\n",
539 call->callType, call->callToken);
541 ret = ooCallAddGSMCapability(call, OO_GSMFULLRATE, 4,
FALSE,
FALSE,
551 ast_verb(0,
"\tAdding Speex capability to call(%s, %s)\n",
552 call->callType, call->callToken);
554 ret = ooCallAddSpeexCapability(call, OO_SPEEX, 4, 4,
FALSE,
573 case T_H225AliasAddress_dialedDigits:
574 ooH323EpAddAliasDialedDigits(cur->value);
576 case T_H225AliasAddress_h323_ID:
577 ooH323EpAddAliasH323ID(cur->value);
579 case T_H225AliasAddress_url_ID:
580 ooH323EpAddAliasURLID(cur->value);
582 case T_H225AliasAddress_email_ID:
583 ooH323EpAddAliasEmailID(cur->value);
586 ast_debug(1,
"Ignoring unknown alias type\n");
691 ast_debug(1,
"Cap %d is not supported by driver yet\n", cap);
void * ooh323c_call_thread(void *dummy)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
void close_udptl_connection(ooCallData *call)
static void dummy(char *unused,...)
int ooh323c_start_call_thread(ooCallData *call)
int ooh323c_start_transmit_datachannel(ooCallData *call, ooLogicalChannel *pChannel)
int ooh323c_stop_call_thread(ooCallData *call)
int ooh323c_start_receive_datachannel(ooCallData *call, ooLogicalChannel *pChannel)
static struct callthread * callThreads
#define ast_mutex_lock(a)
#define SEC_TO_HOLD_THREAD
void setup_udptl_connection(ooCallData *call, const char *remoteIp, int remotePort)
static pthread_t ooh323c_thread
void ast_update_use_count(void)
Notify when usecount has been changed.
#define ast_pthread_create_detached_background(a, b, c, d)
#define ast_verb(level,...)
#define ast_module_unref(mod)
Release a reference to the module.
#define ast_pthread_create_background(a, b, c, d)
#define ast_debug(level,...)
Log a DEBUG message.
static ast_mutex_t callThreadsLock
#define ast_mutex_trylock(a)
#define AST_PTHREADT_NULL
#define ao2_ref(o, delta)
int ooh323c_stop_stack_thread(void)
Core PBX routines and definitions.
int ooh323c_start_stack_thread()
int ooh323c_start_receive_channel(ooCallData *call, ooLogicalChannel *pChannel)
#define H323_DTMF_H245ALPHANUMERIC
struct ast_format * convertH323CapToAsteriskCap(int cap)
static const struct cfalias aliases[]
int ooh323c_set_aliases(ooAliases *aliases)
#define ast_calloc(num, len)
A wrapper for calloc()
void setup_rtp_connection(ooCallData *call, const char *remoteIp, int remotePort)
int ooh323c_stop_transmit_channel(ooCallData *call, ooLogicalChannel *pChannel)
Support for logging to various files, console and syslog Configuration in file logger.conf.
int ooh323c_stop_receive_datachannel(ooCallData *call, ooLogicalChannel *pChannel)
#define H323_DTMF_H245SIGNAL
int ooh323c_start_transmit_channel(ooCallData *call, ooLogicalChannel *pChannel)
void close_rtp_connection(ooCallData *call)
int ooh323c_set_capability(struct ast_format_cap *cap, int dtmf, int dtmfcodec)
int ooh323c_stop_transmit_datachannel(ooCallData *call, ooLogicalChannel *pChannel)
#define ast_mutex_init(pmutex)
void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txframes)
#define ast_mutex_destroy(a)
static pthread_t ooh323cmd_thread
int ooh323c_stop_receive_channel(ooCallData *call, ooLogicalChannel *pChannel)
void * ooh323c_cmd_thread(void *dummy)
static snd_pcm_format_t format
int ooh323c_set_capability_for_call(ooCallData *call, struct ast_format_cap *cap, int dtmf, int dtmfcodec, int t38support, int g729onlyA)
#define AST_MUTEX_DEFINE_STATIC(mutex)
#define H323_DTMF_RFC2833
void * ooh323c_stack_thread(void *dummy)
Structure for mutex and tracking information.
struct ast_module * myself
#define ast_mutex_unlock(a)
#define ast_module_ref(mod)
Hold a reference to the module.