chan_ooh323.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2005 by Objective Systems, Inc.
00003  *
00004  * This software is furnished under an open source license and may be 
00005  * used and copied only in accordance with the terms of this license. 
00006  * The text of the license may generally be found in the root 
00007  * directory of this installation in the COPYING file.  It 
00008  * can also be viewed online at the following URL:
00009  *
00010  *   http://www.obj-sys.com/open/license.html
00011  *
00012  * Any redistributions of this file including modified versions must 
00013  * maintain this copyright notice.
00014  *
00015  *****************************************************************************/
00016 #ifndef _OO_CHAN_H323_H_
00017 #define _OO_CHAN_H323_H_
00018 
00019 #include "asterisk.h"
00020 #undef PACKAGE_NAME
00021 #undef PACKAGE_TARNAME
00022 #undef PACKAGE_VERSION
00023 #undef PACKAGE_STRING
00024 #undef PACKAGE_BUGREPORT
00025 
00026 #include <stdlib.h>
00027 #include <stdio.h>
00028 #include <string.h>
00029 #include <sys/socket.h>
00030 #include <sys/param.h>
00031 #include <arpa/inet.h>
00032 #include <net/if.h>
00033 #include <netinet/in.h>
00034 #include <netinet/in_systm.h>
00035 #include <netinet/ip.h>
00036 #include <unistd.h>
00037 #include <netdb.h>
00038 #include <errno.h>
00039 #include <fcntl.h>
00040 #include <signal.h>
00041 #include <sys/signal.h>
00042 
00043 #include "asterisk/lock.h"
00044 #include "asterisk/channel.h"
00045 #include "asterisk/config.h"
00046 #include "asterisk/logger.h"
00047 #include "asterisk/module.h"
00048 #include "asterisk/pbx.h"
00049 #include "asterisk/utils.h"
00050 #include "asterisk/options.h"
00051 #include "asterisk/sched.h"
00052 #include "asterisk/io.h"
00053 #include "asterisk/causes.h"
00054 #include "asterisk/rtp_engine.h"
00055 #include "asterisk/acl.h"
00056 #include "asterisk/callerid.h"
00057 #include "asterisk/file.h"
00058 #include "asterisk/cli.h"
00059 #include "asterisk/app.h"
00060 #include "asterisk/musiconhold.h"
00061 #include "asterisk/manager.h"
00062 #include "asterisk/dsp.h"
00063 #include "asterisk/stringfields.h"
00064 #include "asterisk/format.h"
00065 #include "asterisk/format_cap.h"
00066 #include "asterisk/udptl.h"
00067 #include "asterisk/stasis_channels.h"
00068 #include "asterisk/format_cache.h"
00069 
00070 #include "ootypes.h"
00071 #include "ooUtils.h"
00072 #include "ooCapability.h"
00073 #include "oochannels.h"
00074 #include "ooh323ep.h"
00075 #include "ooh323cDriver.h"
00076 #include "ooCalls.h"
00077 #include "ooq931.h"
00078 #include "ooStackCmds.h"
00079 #include "ooCapability.h"
00080 #include "ooGkClient.h"
00081 
00082 
00083 struct ooh323_pvt;
00084 struct ooh323_user;
00085 struct ooh323_peer;
00086 /* Helper functions */
00087 struct ooh323_user *find_user(const char * name, const char *ip);
00088 struct ooh323_peer *find_peer(const char * name, int port);
00089 void ooh323_delete_peer(struct ooh323_peer *peer);   
00090 
00091 int delete_users(void);
00092 int delete_peers(void);
00093 
00094 int ooh323_destroy(struct ooh323_pvt *p);
00095 int reload_config(int reload);
00096 int restart_monitor(void);
00097 
00098 int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
00099 void setup_rtp_connection(ooCallData *call, const char *remoteIp, 
00100                           int remotePort);
00101 void close_rtp_connection(ooCallData *call);
00102 struct ast_frame *ooh323_rtp_read
00103          (struct ast_channel *ast, struct ooh323_pvt *p);
00104 
00105 void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txframes);
00106 void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt);
00107 
00108 int ooh323_convertAsteriskCapToH323Cap(struct ast_format *format);
00109 
00110 int ooh323_convert_hangupcause_asteriskToH323(int cause);
00111 int ooh323_convert_hangupcause_h323ToAsterisk(int cause);
00112 int update_our_aliases(ooCallData *call, struct ooh323_pvt *p);
00113 
00114 /* h323 msg callbacks */
00115 int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg);
00116 int ooh323_onReceivedDigit(OOH323CallData *call, const char* digit);
00117 
00118 void setup_udptl_connection(ooCallData *call, const char *remoteIp, int remotePort);
00119 void close_udptl_connection(ooCallData *call);
00120 
00121 EXTERN char *handle_cli_ooh323_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
00122 
00123 #endif

Generated on Thu Apr 16 06:27:23 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6