~ubuntu-branches/debian/sid/kamailio/sid

« back to all changes in this revision

Viewing changes to modules/mohqueue/mohq.h

  • Committer: Package Import Robot
  • Author(s): Victor Seva
  • Date: 2014-01-06 11:47:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140106114713-t8xidp4arzrnyeya
Tags: 4.1.1-1
* New upstream release
* debian/patches:
  - add upstream fixes
* Added tls outbound websocket autheph dnssec modules
  - openssl exception added to their license
* removing sparc and ia64 from supported archs
  for mono module (Closes: #728915)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id$
 
3
 *
 
4
 * Copyright (C) 2013 Robert Boisvert
 
5
 *
 
6
 * This file is part of the mohqueue module for sip-router, a free SIP server.
 
7
 *
 
8
 * The mohqueue module is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2 of the License, or
 
11
 * (at your option) any later version
 
12
 *
 
13
 * The mohqueue module is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
21
 *
 
22
 */
 
23
 
 
24
#ifndef MOHQ_H
 
25
#define MOHQ_H
 
26
 
 
27
#include "mohq_common.h"
 
28
#include "mohq_locks.h"
 
29
 
 
30
/**********
 
31
* definitions
 
32
**********/
 
33
 
 
34
#define URI_LEN     100
 
35
#define USLEEP_LEN  10
 
36
#define MOHDIRLEN   100
 
37
#define MOHFILELEN  100
 
38
 
 
39
/**********
 
40
* structures
 
41
**********/
 
42
 
 
43
typedef struct
 
44
  {
 
45
  int ntype;
 
46
  char *pencode;
 
47
  } rtpmap;
 
48
 
 
49
/* mohq_flags values */
 
50
#define MOHQF_ACT 0x01
 
51
#define MOHQF_CHK 0x02
 
52
#define MOHQF_DBG 0x04
 
53
 
 
54
typedef struct
 
55
  {
 
56
  char mohq_name [26];
 
57
  char mohq_uri [URI_LEN + 1];
 
58
  char mohq_mohdir [MOHDIRLEN + 1];
 
59
  char mohq_mohfile [MOHFILELEN + 1];
 
60
  int mohq_flags;
 
61
  int mohq_id;
 
62
  } mohq_lst;
 
63
 
 
64
/* call_state values */
 
65
#define CLSTA_ENTER     100
 
66
#define CLSTA_PRACKSTRT 101
 
67
#define CLSTA_PRACKRPLY 102
 
68
#define CLSTA_RINGING   103
 
69
#define CLSTA_INVITED   104
 
70
#define CLSTA_CANCEL    105
 
71
#define CLSTA_INQUEUE   200
 
72
#define CLSTA_REFER     301
 
73
#define CLSTA_RFRWAIT   302
 
74
#define CLSTA_BYE       305
 
75
 
 
76
typedef struct
 
77
  {
 
78
  int call_active;
 
79
  char call_id [101];
 
80
  char call_from [URI_LEN + 1];
 
81
  char call_referto [URI_LEN + 1];
 
82
  char call_contact [URI_LEN + 1];
 
83
  char call_tag [101];
 
84
  char call_via [1024];
 
85
  char call_addr [IP_ADDR_MAX_STR_SIZE + 4];
 
86
  int call_state;
 
87
  int call_cseq;
 
88
  int call_aport;
 
89
  mohq_lst *pmohq;
 
90
  time_t call_time;
 
91
  unsigned int call_hash;
 
92
  unsigned int call_label;
 
93
  sip_msg_t *call_pmsg;
 
94
  } call_lst;
 
95
 
 
96
typedef struct
 
97
  {
 
98
  char *mohdir;
 
99
  str db_url;
 
100
  str db_ctable;
 
101
  str db_qtable;
 
102
  } mod_cfg;
 
103
 
 
104
typedef struct
 
105
  {
 
106
  mod_cfg pcfg [1];
 
107
  time_t mohq_update;
 
108
  int mohq_cnt;
 
109
  mohq_lst *pmohq_lst;
 
110
  mohq_lock pmohq_lock [1];
 
111
  int call_cnt;
 
112
  call_lst *pcall_lst;
 
113
  mohq_lock pcall_lock [1];
 
114
  db_func_t pdb [1];
 
115
  tm_api_t ptm [1];
 
116
  sl_api_t psl [1];
 
117
  rr_api_t prr [1];
 
118
  cmd_function fn_rtp_answer;
 
119
  cmd_function fn_rtp_destroy;
 
120
  cmd_function fn_rtp_offer;
 
121
  cmd_function fn_rtp_stream_c;
 
122
  cmd_function fn_rtp_stream_s;
 
123
  } mod_data;
 
124
 
 
125
/**********
 
126
* global varb declarations
 
127
**********/
 
128
 
 
129
extern mod_data *pmod_data;
 
130
extern rtpmap prtpmap [];
 
131
 
 
132
#endif /* MOHQ_H */
 
 
b'\\ No newline at end of file'