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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00056 #ifndef PIS_CSCF_SIP_H
00057 #define PIS_CSCF_SIP_H
00058
00059 #include "../../sr_module.h"
00060 #include "../../parser/contact/parse_contact.h"
00061 #include "../../parser/digest/digest.h"
00062 #include "../../parser/parse_rr.h"
00063
00064 int cscf_add_header_first(struct sip_msg *msg, str *hdr,int type);
00065 int cscf_add_header(struct sip_msg *msg, str *hdr,int type);
00066 int cscf_add_header_rpl(struct sip_msg *msg, str *hdr);
00067 int cscf_add_contact(struct sip_msg *msg,str uri,int expires);
00068
00069 str cscf_get_private_identity(struct sip_msg *msg, str realm);
00070 str cscf_get_public_identity(struct sip_msg *msg);
00071 int cscf_get_expires_hdr(struct sip_msg *msg);
00072 int cscf_get_max_expires(struct sip_msg *msg);
00073 str cscf_get_public_identity_from_requri(struct sip_msg *msg);
00074
00075 struct sip_msg *cscf_get_request(unsigned int hash,unsigned int label);
00076
00077 int cscf_get_integrity_protected(struct sip_msg *msg,str realm);
00078 int cscf_get_transaction(struct sip_msg *msg, unsigned int *hash, unsigned int *label);
00079 int cscf_reply_transactional(struct sip_msg *msg, int code, char *text);
00080 str cscf_get_auts(struct sip_msg *msg, str realm);
00081 str cscf_get_nonce(struct sip_msg *msg, str realm);
00082 str cscf_get_algorithm(struct sip_msg *msg, str realm);
00083 str cscf_get_digest_uri(struct sip_msg *msg, str realm);
00084 int cscf_get_nonce_response(struct sip_msg *msg, str realm,str *nonce,str *response,
00085 enum qop_type *qop,str *qop_str,str *nc,str *cnonce,str *uri);
00086 str cscf_get_user_agent(struct sip_msg *msg);
00087 contact_body_t *cscf_parse_contacts(struct sip_msg *msg);
00088 str cscf_get_path(struct sip_msg *msg);
00089 str cscf_get_event(struct sip_msg *msg);
00090 str cscf_get_asserted_identity(struct sip_msg *msg);
00091 str cscf_get_asserted_identity_domain(struct sip_msg *msg);
00092 str cscf_get_contact(struct sip_msg *msg);
00093
00094 str cscf_get_first_route(struct sip_msg *msg,struct hdr_field **hr);
00095 int cscf_remove_first_route(struct sip_msg *msg,str value);
00096
00097 int cscf_remove_own_route(struct sip_msg *msg,struct hdr_field **h);
00098
00099 str cscf_get_record_routes(struct sip_msg *msg);
00100
00101 struct hdr_field* cscf_get_next_record_route(struct sip_msg *msg,struct hdr_field *start);
00102
00103 struct hdr_field* cscf_get_next_via_hdr(struct sip_msg *msg,struct hdr_field *start);
00104 str cscf_get_next_via_str(struct sip_msg *msg, struct hdr_field * h, int pos, struct hdr_field **h_out, int *pos_out);
00105
00106 int cscf_via_matching( struct via_body *req_via, struct via_body *rpl_via );
00107 int cscf_str_via_matching(str *sreq_via, str *srpl_via);
00108
00109 str cscf_get_realm_from_ruri(struct sip_msg *msg);
00110
00111 str cscf_get_identity_from_ruri(struct sip_msg *msg);
00112
00113 str cscf_get_call_id(struct sip_msg *msg,struct hdr_field **hr);
00114 int cscf_get_cseq(struct sip_msg *msg,struct hdr_field **hr);
00115 str cscf_get_cseq_method(struct sip_msg *msg,struct hdr_field **hr);
00116
00117 struct sip_msg* cscf_get_request_from_reply(struct sip_msg *reply);
00118
00119 str cscf_get_called_party_id(struct sip_msg *msg,struct hdr_field **hr);
00120
00121 int cscf_get_subscription_state(struct sip_msg *msg);
00122
00123
00124 int cscf_replace_string(struct sip_msg *msg, str orig,str repl);
00125
00126 struct hdr_field* cscf_get_header(struct sip_msg * msg , str header_name);
00127 struct hdr_field* cscf_get_next_header(struct sip_msg * msg ,
00128 str header_name,struct hdr_field* last_header);
00129 struct hdr_field* cscf_get_next_header_type(struct sip_msg * msg ,
00130 hdr_types_t type, struct hdr_field* last_header);
00131
00132 str cscf_get_headers_content(struct sip_msg * msg , str header_name);
00133
00134 str cscf_get_body(struct sip_msg * msg);
00135
00136
00137
00138 str cscf_get_visited_network_id(struct sip_msg *msg, struct hdr_field **h);
00139 str cscf_get_access_network_info(struct sip_msg *msg, struct hdr_field **h);
00140
00141 str cscf_get_authorization(struct sip_msg *msg, struct hdr_field **h);
00142 str cscf_get_authenticate(struct sip_msg *msg,struct hdr_field **h);
00143
00144 str cscf_get_session_expires_body(struct sip_msg *msg,struct hdr_field **h);
00145 time_t cscf_get_session_expires(str expHdr, str *refresher);
00146 str cscf_get_min_se(struct sip_msg *msg,struct hdr_field **h);
00147
00148 int cscf_del_header(struct sip_msg *msg,struct hdr_field *h);
00149 int cscf_del_all_headers(struct sip_msg *msg,int hdr_type);
00150
00151 struct via_body* cscf_get_first_via(struct sip_msg *msg, struct hdr_field **h);
00152 struct via_body* cscf_get_last_via(struct sip_msg *msg);
00153 struct via_body* cscf_get_ue_via(struct sip_msg *msg);
00154
00155 str cscf_get_realm(struct sip_msg *msg);
00156 str cscf_get_realm_from_uri(str uri);
00157
00158 int cscf_get_p_associated_uri(struct sip_msg *msg,str **public_id,int *public_id_cnt);
00159 int cscf_get_first_p_associated_uri(struct sip_msg *msg,str *public_id);
00160
00161 name_addr_t cscf_get_preferred_identity(struct sip_msg *msg,struct hdr_field **h);
00162 str cscf_get_called_party_id(struct sip_msg *msg,struct hdr_field **hr);
00163
00164 struct hdr_field* cscf_get_next_route(struct sip_msg *msg,struct hdr_field *start);
00165
00166 int cscf_is_myself(str uri);
00167
00168 str cscf_get_content_type(struct sip_msg *msg);
00169
00170 int cscf_get_content_len(struct sip_msg *msg);
00171
00172 str* cscf_get_service_route(struct sip_msg *msg,int *size);
00173
00174 int cscf_get_originating_contact(struct sip_msg *msg,str *host,int *port,int *transport);
00175 int cscf_get_terminating_contact(struct sip_msg *msg,str *host,int *port,int *transport);
00176
00177 int cscf_get_terminating_identity(struct sip_msg *msg,str *uri);
00178
00179 int cscf_add_p_charging_vector(struct sip_msg *msg);
00180
00181 str cscf_get_last_via_sent_by(struct sip_msg *msg);
00182 str cscf_get_last_via_received(struct sip_msg *msg);
00183
00184 int cscf_get_from_tag(struct sip_msg* msg, str* tag);
00185 int cscf_get_to_tag(struct sip_msg* msg, str* tag);
00186 int cscf_get_from_uri(struct sip_msg* msg,str *local_uri);
00187 int cscf_get_to_uri(struct sip_msg* msg,str *local_uri);
00188 #endif