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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
/*
* $Id: t_msgbuilder.h,v 1.4 2005/11/28 19:47:29 bogdan_iancu Exp $
*
* Copyright (C) 2001-2003 FhG Fokus
*
* This file is part of openser, a free SIP server.
*
* openser is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version
*
* openser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* History:
* --------
* 2004-02-11 FIFO/CANCEL + alignments (hash=f(callid,cseq)) (uli+jiri)
*/
#ifndef _MSGBUILDER_H
#define _MSGBUILDER_H
#include "../../ip_addr.h"
#include "dlg.h"
#define CSEQ "CSeq: "
#define CSEQ_LEN (sizeof(CSEQ)-1)
#define TO "To: "
#define TO_LEN (sizeof(TO)-1)
#define CALLID "Call-ID: "
#define CALLID_LEN (sizeof(CALLID)-1)
#define FROM "From: "
#define FROM_LEN (sizeof(FROM)-1)
#define FROMTAG ";tag="
#define FROMTAG_LEN (sizeof(FROMTAG)-1)
#define TOTAG ";tag="
#define TOTAG_LEN (sizeof(TOTAG)-1)
char *build_local(struct cell *Trans, unsigned int branch,
unsigned int *len, char *method, int method_len, str *to);
char *build_uac_request( str msg_type, str dst, str from,
str fromtag, int cseq, str callid, str headers,
str body, int branch,
struct cell *t, unsigned int *len);
/*
* The function creates an ACK to 200 OK. Route set will be created
* and parsed. The function is used by tm when it generates
* local ACK to 200 OK (on behalf of applications using uac
*/
char *build_dlg_ack(struct sip_msg* rpl, struct cell *Trans, unsigned int branch,
str* to, unsigned int *len);
/*
* Create a request
*/
char* build_uac_req(str* method, str* headers, str* body, dlg_t* dialog,
int branch, struct cell *t, int* len);
int t_calc_branch(struct cell *t,
int b, char *branch, int *branch_len);
/* exported minimum functions for use in t_cancel */
char* print_callid_mini(char* target, str callid);
char* print_cseq_mini(char* target, str* cseq, str* method);
#endif
|