| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#ifndef _OO_CHAN_H323_H_ |
| 17 |
#define _OO_CHAN_H323_H_ |
| 18 |
|
| 19 |
#include "asterisk.h" |
| 20 |
#undef PACKAGE_NAME |
| 21 |
#undef PACKAGE_TARNAME |
| 22 |
#undef PACKAGE_VERSION |
| 23 |
#undef PACKAGE_STRING |
| 24 |
#undef PACKAGE_BUGREPORT |
| 25 |
|
| 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> |
| 41 |
|
| 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" |
| 66 |
#include "asterisk/stasis_channels.h" |
| 67 |
#include "asterisk/format_cache.h" |
| 68 |
#include "asterisk/paths.h" |
| 69 |
|
| 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" |
| 81 |
|
| 82 |
|
| 83 |
struct ooh323_pvt; |
| 84 |
struct ooh323_user; |
| 85 |
struct ooh323_peer; |
| 86 |
|
| 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); |
| 90 |
|
| 91 |
int delete_users(void); |
| 92 |
int delete_peers(void); |
| 93 |
|
| 94 |
int ooh323_destroy(struct ooh323_pvt *p); |
| 95 |
int reload_config(int reload); |
| 96 |
int restart_monitor(void); |
| 97 |
|
| 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); |
| 102 |
struct ast_frame *ooh323_rtp_read |
| 103 |
(struct ast_channel *ast, struct ooh323_pvt *p); |
| 104 |
|
| 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); |
| 107 |
|
| 108 |
int ooh323_convertAsteriskCapToH323Cap(struct ast_format *format); |
| 109 |
|
| 110 |
int ooh323_convert_hangupcause_asteriskToH323(int cause); |
| 111 |
int ooh323_convert_hangupcause_h323ToAsterisk(int cause); |
| 112 |
int update_our_aliases(ooCallData *call, struct ooh323_pvt *p); |
| 113 |
|
| 114 |
|
| 115 |
int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg); |
| 116 |
int ooh323_onReceivedDigit(OOH323CallData *call, const char* digit); |
| 117 |
|
| 118 |
void setup_udptl_connection(ooCallData *call, const char *remoteIp, int remotePort); |
| 119 |
void close_udptl_connection(ooCallData *call); |
| 120 |
|
| 121 |
EXTERN char *handle_cli_ooh323_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); |
| 122 |
|
| 123 |
#endif |