uac.h

Go to the documentation of this file.
00001 /*
00002  * $Id: uac.h 4951 2008-09-18 14:20:46Z henningw $
00003  *
00004  * Copyright (C) 2001-2003 FhG Fokus
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  * 2003-02-28 protocolization of t_uac_dlg completed (jiri)
00025  */
00026 
00027 /*! \file
00028  * \brief TM :: Simple UA support
00029  *
00030  * \ingroup tm
00031  * - Module: \ref tm
00032  */
00033 
00034 
00035 #ifndef _UAC_H
00036 #define _UAC_H
00037 
00038 #include <stdio.h>
00039 #include "../../str.h"
00040 #include "dlg.h"
00041 #include "t_hooks.h"
00042 
00043 /*! Default CSeq number */
00044 #define DEFAULT_CSEQ 10
00045 
00046 /* Pass provisional replies to fifo applications */
00047 extern int pass_provisional_replies;
00048 
00049 
00050 /*
00051  * Function prototypes
00052  */
00053 typedef int (*reqwith_t)(str* m, str* h, str* b, dlg_t* d, transaction_cb c, void* cp);
00054 typedef int (*reqout_t)(str* m, str* t, str* f, str* h, str* b, dlg_t** d, transaction_cb c, void* cp);
00055 typedef int (*req_t)(str* m, str* ruri, str* t, str* f, str* h, str* b, str *oburi, transaction_cb c, void* cp);
00056 
00057 
00058 /*
00059  * Generate a fromtag based on given Call-ID
00060  */
00061 void generate_fromtag(str* tag, str* callid);
00062 
00063 
00064 /*
00065  * Initialization function
00066  */
00067 int uac_init(void);
00068 
00069 
00070 /*
00071  * Send a request
00072  */
00073 int t_uac(str* method, str* headers, str* body, dlg_t* dialog, transaction_cb cb, void* cbp);
00074 
00075 
00076 /*
00077  * Send a message within a dialog
00078  */
00079 int req_within(str* m, str* h, str* b, dlg_t* d, transaction_cb c, void* cp);
00080 
00081 
00082 /*
00083  * Send an initial request that will start a dialog
00084  */
00085 int req_outside(str* m, str* t, str* f, str* h, str* b, dlg_t** d, transaction_cb c, void* cp);
00086 
00087 
00088 /*
00089  * Send a transactional request, no dialogs involved
00090  */
00091 int request(str* m, str* ruri, str* to, str* from, str* h, str* b, str *oburi, transaction_cb c, void* cp);
00092 
00093 
00094 #endif

Generated on Thu May 24 20:00:33 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6