t_reply.h
Go to the documentation of this file.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 #ifndef _T_REPLY_H
00032 #define _T_REPLY_H
00033
00034 #include "../../tags.h"
00035
00036 #include "h_table.h"
00037
00038
00039 extern int restart_fr_on_each_reply;
00040 extern int onreply_avp_mode;
00041 extern int drop_stateless_replies;
00042
00043
00044 enum rps {
00045
00046 RPS_ERROR=0,
00047
00048 RPS_PUSHED_AFTER_COMPLETION,
00049
00050 RPS_DISCARDED,
00051
00052 RPS_STORE,
00053
00054 RPS_COMPLETED,
00055
00056 RPS_PROVISIONAL
00057 };
00058
00059 extern char tm_tags[TOTAG_VALUE_LEN];
00060 extern char *tm_tag_suffix;
00061
00062 extern int disable_6xx_block;
00063
00064
00065 int unmatched_totag(struct cell *t, struct sip_msg *ack);
00066
00067
00068 typedef unsigned int branch_bm_t;
00069
00070
00071 typedef int (*treply_f)(struct sip_msg * , unsigned int , str * );
00072 typedef int (*treply_wb_f)( struct cell* trans, unsigned int code, str *text,
00073 str *body, str *new_header, str *to_tag);
00074 typedef int (*tget_reply_totag_f)(struct sip_msg *, str *);
00075
00076 int t_get_reply_totag(struct sip_msg *msg, str *totag);
00077
00078 #define LOCK_REPLIES(_t) lock(&(_t)->reply_mutex )
00079 #define UNLOCK_REPLIES(_t) unlock(&(_t)->reply_mutex )
00080
00081
00082
00083
00084
00085
00086 int reply_received( struct sip_msg *p_msg ) ;
00087
00088
00089 int t_reply_with_body( struct cell *trans, unsigned int code,
00090 str *text, str *body, str *new_header, str *to_tag );
00091
00092
00093
00094
00095
00096 int t_reply( struct cell *t, struct sip_msg * , unsigned int , str * );
00097
00098
00099
00100
00101 int t_reply_unsafe( struct cell *t, struct sip_msg * , unsigned int , str * );
00102
00103
00104 enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch,
00105 unsigned int msg_status, branch_bm_t *cancel_bitmap );
00106
00107 enum rps local_reply( struct cell *t, struct sip_msg *p_msg, int branch,
00108 unsigned int msg_status, branch_bm_t *cancel_bitmap );
00109
00110 void set_final_timer( struct cell *t );
00111
00112 void cleanup_uac_timers( struct cell *t );
00113
00114 void on_negative_reply( struct cell* t, struct sip_msg* msg,
00115 int code, void *param );
00116
00117 typedef int (*tget_picked_f)(void);
00118
00119 int t_get_picked_branch(void);
00120
00121
00122
00123
00124 void t_on_negative( unsigned int go_to );
00125 unsigned int get_on_negative(void);
00126 void t_on_reply( unsigned int go_to );
00127 unsigned int get_on_reply(void);
00128
00129
00130
00131
00132
00133 int t_retransmit_reply( struct cell *t );
00134
00135 void tm_init_tags(void);
00136
00137 int unixsock_t_reply(str* msg);
00138
00139 #endif
00140