dlg_req_within.h

00001 /*
00002  * $Id$
00003  *
00004  * Copyright (C) 2007 Voice System SRL
00005  *
00006  * This file is part of Kamailio, a free SIP server.
00007  *
00008  * Kamailio is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * Kamailio is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License 
00019  * along with this program; if not, write to the Free Software 
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  * History:
00023  * --------
00024  * 2007-07-10  initial version (ancuta)
00025 */
00026 
00027 
00028 
00029 
00030 #ifndef DLG_REQUEST_WITHIN_H
00031 #define DLG_REQUEST_WITHIN_H
00032 
00033 #include "dlg_hash.h"
00034 #include "../../modules/tm/tm_load.h"
00035 
00036 #define MAX_FWD                 "70"
00037 #define MAX_SIZE                256
00038 #define RCV_BYE_REPLY   1
00039 
00040 #define MI_DIALOG_NOT_FOUND             "Requested Dialog not found"
00041 #define MI_DIALOG_NOT_FOUND_LEN         (sizeof(MI_DIALOG_NOT_FOUND)-1)
00042 #define MI_DLG_OPERATION_ERR            "Operation failed"
00043 #define MI_DLG_OPERATION_ERR_LEN        (sizeof(MI_DLG_OPERATION_ERR)-1)
00044 
00045 extern struct tm_binds d_tmb;
00046 extern int dlg_enable_stats;
00047 extern stat_var * active_dlgs;
00048 
00049 struct mi_root * mi_terminate_dlg(struct mi_root *cmd_tree, void *param );
00050 
00051 dlg_t* build_dlg_t(struct dlg_cell * cell, int dir);
00052 int free_tm_dlg(dlg_t *td);
00053 int dlg_bye(struct dlg_cell *dlg, str *hdrs, int side);
00054 int dlg_bye_all(struct dlg_cell *dlg, str *hdrs);
00055 int dlg_send_ka(dlg_cell_t *dlg, int dir, str *hdrs);
00056 
00057 #endif