forked from bg111/asterisk-chan-dongle
-
Notifications
You must be signed in to change notification settings - Fork 106
/
channel.h
46 lines (35 loc) · 1.51 KB
/
channel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
Copyright (C) 2010 bg <[email protected]>
*/
#ifndef CHAN_DONGLE_CHANNEL_H_INCLUDED
#define CHAN_DONGLE_CHANNEL_H_INCLUDED
#include "ast_config.h"
#include <asterisk/frame.h> /* enum ast_control_frame_type */
#include "ast_compat.h" /* asterisk compatibility fixes */
#include "export.h" /* EXPORT_DECL EXPORT_DEF */
typedef struct channel_var
{
const char * name;
char * value;
} channel_var_t;
struct pvt;
struct cpvt;
EXPORT_DECL struct ast_channel_tech channel_tech;
#if ASTERISK_VERSION_NUM >= 120000 /* 12+ */
EXPORT_DECL struct ast_channel* new_channel(
struct pvt * pvt, int ast_state, const char * cid_num, int call_idx,
unsigned dir, unsigned state, const char * exten,
const struct ast_assigned_ids *assignedids,
const struct ast_channel * requestor);
#else /* 12- */
EXPORT_DECL struct ast_channel* new_channel(
struct pvt * pvt, int ast_state, const char * cid_num, int call_idx,
unsigned dir, unsigned state, const char * exten,
const struct ast_channel * requestor);
#endif /* ^12- */
EXPORT_DECL int queue_control_channel (struct cpvt * cpvt, enum ast_control_frame_type control);
EXPORT_DECL int queue_hangup (struct ast_channel * channel, int hangupcause);
EXPORT_DECL void start_local_channel (struct pvt * pvt, const char * exten, const char * number, channel_var_t * vars);
EXPORT_DECL void change_channel_state(struct cpvt * cpvt, unsigned newstate, int cause);
EXPORT_DECL int channels_loop(struct pvt * pvt, const struct ast_channel * requestor);
#endif /* CHAN_DONGLE_CHANNEL_H_INCLUDED */