Asterisk - The Open Source Telephony Project  18.5.0
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004-2005 by Objective Systems, Inc.
3  *
4  * This software is furnished under an open source license and may be
5  * used and copied only in accordance with the terms of this license.
6  * The text of the license may generally be found in the root
7  * directory of this installation in the COPYING file. It
8  * can also be viewed online at the following URL:
9  *
10  *
11  *
12  * Any redistributions of this file including modified versions must
13  * maintain this copyright notice.
14  *
15  *****************************************************************************/
16 #ifndef _OO_CHAN_H323_H_
17 #define _OO_CHAN_H323_H_
19 #include "asterisk.h"
20 #undef PACKAGE_NAME
26 #include <stdlib.h>
27 #include <stdio.h>
28 #include <string.h>
29 #include <sys/socket.h>
30 #include <sys/param.h>
31 #include <arpa/inet.h>
32 #include <net/if.h>
33 #include <netinet/in.h>
34 #include <netinet/in_systm.h>
35 #include <netinet/ip.h>
36 #include <unistd.h>
37 #include <netdb.h>
38 #include <errno.h>
39 #include <fcntl.h>
40 #include <signal.h>
42 #include "asterisk/lock.h"
43 #include "asterisk/channel.h"
44 #include "asterisk/config.h"
45 #include "asterisk/logger.h"
46 #include "asterisk/module.h"
47 #include "asterisk/pbx.h"
48 #include "asterisk/utils.h"
49 #include "asterisk/options.h"
50 #include "asterisk/sched.h"
51 #include "asterisk/io.h"
52 #include "asterisk/causes.h"
53 #include "asterisk/rtp_engine.h"
54 #include "asterisk/acl.h"
55 #include "asterisk/callerid.h"
56 #include "asterisk/file.h"
57 #include "asterisk/cli.h"
58 #include "asterisk/app.h"
59 #include "asterisk/musiconhold.h"
60 #include "asterisk/manager.h"
61 #include "asterisk/dsp.h"
62 #include "asterisk/stringfields.h"
63 #include "asterisk/format.h"
64 #include "asterisk/format_cap.h"
65 #include "asterisk/udptl.h"
67 #include "asterisk/format_cache.h"
68 #include "asterisk/paths.h"
70 #include "ootypes.h"
71 #include "ooUtils.h"
72 #include "ooCapability.h"
73 #include "oochannels.h"
74 #include "ooh323ep.h"
75 #include "ooh323cDriver.h"
76 #include "ooCalls.h"
77 #include "ooq931.h"
78 #include "ooStackCmds.h"
79 #include "ooCapability.h"
80 #include "ooGkClient.h"
83 struct ooh323_pvt;
84 struct ooh323_user;
85 struct ooh323_peer;
86 /* Helper functions */
87 struct ooh323_user *find_user(const char * name, const char *ip);
88 struct ooh323_peer *find_peer(const char * name, int port);
89 void ooh323_delete_peer(struct ooh323_peer *peer);
91 int delete_users(void);
92 int delete_peers(void);
94 int ooh323_destroy(struct ooh323_pvt *p);
95 int reload_config(int reload);
96 int restart_monitor(void);
98 int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
99 void setup_rtp_connection(ooCallData *call, const char *remoteIp,
100  int remotePort);
101 void close_rtp_connection(ooCallData *call);
103  (struct ast_channel *ast, struct ooh323_pvt *p);
105 void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txframes);
106 void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt);
112 int update_our_aliases(ooCallData *call, struct ooh323_pvt *p);
114 /* h323 msg callbacks */
115 int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg);
116 int ooh323_onReceivedDigit(OOH323CallData *call, const char* digit);
118 void setup_udptl_connection(ooCallData *call, const char *remoteIp, int remotePort);
119 void close_udptl_connection(ooCallData *call);
121 EXTERN char *handle_cli_ooh323_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
123 #endif
void close_rtp_connection(ooCallData *call)
Definition: chan_ooh323.c:4810
EXTERN char * handle_cli_ooh323_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Definition: chan_ooh323.c:2778
char digit
Main Channel structure associated with a channel.
Music on hold handling.
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
int reload_config(int reload)
Definition: chan_ooh323.c:2813
void setup_udptl_connection(ooCallData *call, const char *remoteIp, int remotePort)
Definition: chan_ooh323.c:4839
int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
Definition: chan_ooh323.c:1840
CallerID (and other GR30) management and generation Includes code and algorithms from the Zapata libr...
void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txframes)
Definition: chan_ooh323.c:1553
Convenient Signal Processing routines.
int ooh323_convert_hangupcause_h323ToAsterisk(int cause)
Definition: chan_ooh323.c:5206
descriptor for a cli entry.
Definition: cli.h:171
int restart_monitor(void)
Start the channel monitor thread.
Definition: chan_ooh323.c:4082
UDPTL support for T.38.
int configure_local_rtp(struct ooh323_pvt *p, ooCallData *call)
Definition: chan_ooh323.c:4599
Definition of a media format.
Definition: format.c:43
static int call(void *data)
Definition: chan_pjsip.c:2358
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
I/O Management (derived from Cheops-NG)
void setup_rtp_connection(ooCallData *call, const char *remoteIp, int remotePort)
Definition: chan_ooh323.c:4775
Utility functions.
Media Format API.
int ooh323_convertAsteriskCapToH323Cap(struct ast_format *format)
Definition: chan_ooh323.c:4506
Configuration File Parser.
int ooh323_destroy(struct ooh323_pvt *p)
Definition: chan_ooh323.c:4117
General Asterisk PBX channel definitions.
int ooh323_onReceivedDigit(OOH323CallData *call, const char *digit)
Definition: chan_ooh323.c:1798
Asterisk file paths, configured in asterisk.conf.
struct ooh323_user * find_user(const char *name, const char *ip)
Definition: chan_ooh323.c:832
struct ast_frame * ooh323_rtp_read(struct ast_channel *ast, struct ooh323_pvt *p)
Definition: chan_ooh323.c:4978
Access Control of various sorts.
Scheduler Routines (derived from cheops)
void close_udptl_connection(ooCallData *call)
Definition: chan_ooh323.c:4901
int delete_peers(void)
Definition: chan_ooh323.c:4230
Core PBX routines and definitions.
Format Capabilities API.
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
static const char name[]
Definition: cdr_mysql.c:74
static int reload(void)
Definition: cdr_mysql.c:741
int ooh323_convert_hangupcause_asteriskToH323(int cause)
Definition: chan_ooh323.c:5179
void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt)
Definition: chan_ooh323.c:1625
Support for logging to various files, console and syslog Configuration in file logger.conf.
Standard Command Line Interface.
int update_our_aliases(ooCallData *call, struct ooh323_pvt *p)
Definition: chan_ooh323.c:4949
Data structure associated with a single frame of data.
Internal Asterisk hangup causes.
Options provided by main asterisk program.
struct ooh323_peer * find_peer(const char *name, int port)
Definition: chan_ooh323.c:890
Pluggable RTP Architecture.
void ooh323_delete_peer(struct ooh323_peer *peer)
Definition: chan_ooh323.c:2328
Asterisk module definitions.
static snd_pcm_format_t format
Definition: chan_alsa.c:102
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
int delete_users(void)
Definition: chan_ooh323.c:4265
Media Format Cache API.
static struct test_val a