added features:
[sip-router] / modules / tm / tm_load.h
1 /*
2  * $Id$
3  *
4  * Copyright (C) 2001-2003 FhG Fokus
5  *
6  * This file is part of ser, a free SIP server.
7  *
8  * ser 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  * For a license to use the ser software under conditions
14  * other than those described here, or to purchase support for this
15  * software, please contact iptel.org by e-mail at the following addresses:
16  *    info@iptel.org
17  *
18  * ser is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License 
24  * along with this program; if not, write to the Free Software 
25  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26  *
27  *
28  * History:
29  * --------
30  * 2003-03-06  voicemail changes accepted
31  *
32  */
33
34
35 #ifndef _TM_BIND_H
36 #define _TM_BIND_H
37
38 #include "defs.h"
39
40
41 #include "../../sr_module.h"
42 #include "t_hooks.h"
43 #include "uac.h"
44 #include "t_fwd.h"
45 #include "t_reply.h"
46 #include "t_lookup.h"
47 #include "t_reply.h"
48 #include "dlg.h"
49
50 /* export not usable from scripts */
51 #define NO_SCRIPT       -1
52
53 #define T_RELAY_TO           "t_relay_to"
54 #define T_RELAY_TO_UDP       "t_relay_to_udp"
55 #define T_RELAY_TO_TCP       "t_relay_to_tcp"
56 #define T_RELAY_TO_TLS       "t_relay_to_tls"
57 #define T_RELAY              "t_relay"
58 #define T_REPLY              "t_reply"
59 #define T_REPLY_WB           "t_reply_with_body"
60 #define T_REPLY_UNSAFE       "t_reply_unsafe"
61 #define T_ADDBLIND           "t_add_blind"
62 #define T_REPLY_UNSAFE       "t_reply_unsafe"
63 #define T_FORWARD_NONACK     "t_forward_nonack"
64 #define T_FORWARD_NONACK_URI "t_forward_nonack_uri"
65 #define T_FORWARD_NONACK_UDP "t_forward_nonack_udp"
66 #define T_FORWARD_NONACK_TCP "t_forward_nonack_tcp"
67 #define T_FORWARD_NONACK_TLS "t_forward_nonack_tls"
68 #define T_GET_TI             "t_get_trans_ident"
69 #define T_LOOKUP_IDENT       "t_lookup_ident"
70 #define T_IS_LOCAL           "t_is_local"
71 #define T_REQUEST_WITHIN     "request_within"
72 #define T_REQUEST_OUTSIDE    "request_outside"
73 #define T_GETT               "t_gett"
74
75
76
77 struct tm_binds {
78         register_tmcb_f  register_tmcb;
79         cmd_function     t_relay_to_udp;
80         cmd_function     t_relay_to_tcp;
81         cmd_function     t_relay;
82         tnewtran_f       t_newtran;
83         treply_f         t_reply;
84         treply_wb_f      t_reply_with_body;
85         tislocal_f       t_is_local;
86         tget_ti_f        t_get_trans_ident;
87         tlookup_ident_f  t_lookup_ident;
88         taddblind_f      t_addblind;
89         treply_f         t_reply_unsafe;
90         tfwd_f           t_forward_nonack;
91         reqwith_t        t_request_within;
92         reqout_t         t_request_outside;
93         req_t            t_request;
94         new_dlg_uac_f      new_dlg_uac;
95         dlg_response_uac_f dlg_response_uac;
96         new_dlg_uas_f      new_dlg_uas;
97         dlg_request_uas_f  dlg_request_uas;
98         free_dlg_f         free_dlg;
99         print_dlg_f        print_dlg;
100         tgett_f            t_gett;
101         calculate_hooks_f  calculate_hooks;
102         t_uac_t            t_uac;
103         enum route_mode*   route_mode;
104 };
105
106 extern int tm_init;
107
108 typedef int(*load_tm_f)( struct tm_binds *tmb );
109 int load_tm( struct tm_binds *tmb);
110
111
112 #endif