00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef _MSGBUILDER_H
00035 #define _MSGBUILDER_H
00036
00037 #include "../../ip_addr.h"
00038 #include "defs.h"
00039 #include "dlg.h"
00040 #include "h_table.h"
00041
00042
00043 #define CSEQ "CSeq: "
00044 #define CSEQ_LEN (sizeof(CSEQ)-1)
00045 #define TO "To: "
00046 #define TO_LEN (sizeof(TO)-1)
00047 #define CALLID "Call-ID: "
00048 #define CALLID_LEN (sizeof(CALLID)-1)
00049 #define FROM "From: "
00050 #define FROM_LEN (sizeof(FROM)-1)
00051 #define FROMTAG ";tag="
00052 #define FROMTAG_LEN (sizeof(FROMTAG)-1)
00053 #define TOTAG ";tag="
00054 #define TOTAG_LEN (sizeof(TOTAG)-1)
00055
00056
00057 char *build_local(struct cell *Trans, unsigned int branch,
00058 unsigned int *len, char *method, int method_len, str *to
00059 #ifdef CANCEL_REASON_SUPPORT
00060 , struct cancel_reason* reason
00061 #endif
00062 );
00063
00064 char *build_local_reparse(struct cell *Trans, unsigned int branch,
00065 unsigned int *len, char *method, int method_len, str *to
00066 #ifdef CANCEL_REASON_SUPPORT
00067 , struct cancel_reason* reason
00068 #endif
00069 );
00070
00071 char *build_uac_request( str msg_type, str dst, str from,
00072 str fromtag, int cseq, str callid, str headers,
00073 str body, int branch,
00074 struct cell *t, unsigned int *len);
00075
00076
00077
00078
00079 char *build_uac_cancel(str *headers,str *body,struct cell *cancelledT,
00080 unsigned int branch, unsigned int *len, struct dest_info* dst);
00081
00082
00083
00084
00085
00086
00087
00088 char *build_dlg_ack(struct sip_msg* rpl, struct cell *Trans,
00089 unsigned int branch, str *hdrs, str *body,
00090 unsigned int *len, struct dest_info* dst);
00091
00092
00093
00094
00095
00096 char* build_uac_req(str* method, str* headers, str* body, dlg_t* dialog, int branch,
00097 struct cell *t, int* len, struct dest_info* dst);
00098
00099
00100 int t_calc_branch(struct cell *t,
00101 int b, char *branch, int *branch_len);
00102
00103
00104 char* print_callid_mini(char* target, str callid);
00105 char* print_cseq_mini(char* target, str* cseq, str* method);
00106
00107 #endif