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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
|
/*
* $Id$
*
* Copyright (C) 2001-2005 FhG Fokus
* Copyright (C) 2008 Daniel-Constantin Mierla (asipto.com)
*
* This file is part of Kamailio, a free SIP server.
*
* Kamailio 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
*
* Kamailio 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _PV_CORE_H_
#define _PV_CORE_H_
#include "../../pvar.h"
#include "../../parser/parse_to.h"
int pv_get_msgid(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_udp(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_5060(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_return_code(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_pid(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_method(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_methodid(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_msgtype(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_status(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_reason(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_ruri(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_ouri(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_xuri_attr(struct sip_msg *msg, struct sip_uri *parsed_uri,
pv_param_t *param, pv_value_t *res);
int pv_get_ruri_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_ouri_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_errinfo_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_contact(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_xto_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res, struct to_body *xto, int type);
int pv_get_to_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_from_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_cseq(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_msg_buf(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_msg_len(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_flags(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_hexflags(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_flag(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_bflags(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_hexbflags(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_bflag(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_sflags(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_hexsflags(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_sflag(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_callid(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_srcip(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_srcport(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_srcaddr_uri(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_rcvip(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_rcvport(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_force_sock(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_useragent(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_refer_to(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_diversion(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_rpid(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_ppi_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_pai(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_proto(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_dset(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_dsturi(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_dsturi_attr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_content_type(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_content_length(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_msg_body(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_body_size(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_authattr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_acc_username(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_branch(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_branches(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_avp(struct sip_msg *msg, pv_param_t *param, pv_value_t *res);
int pv_get_hdr(struct sip_msg *msg, pv_param_t *param, pv_value_t *res);
int pv_get_scriptvar(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_true(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_version(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_server_id(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_cnt(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_ruid(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_location_ua(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_tcpconn_id(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
/********* end PV get functions *********/
/********* start PV set functions *********/
int pv_set_avp(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_scriptvar(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_dsturi(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_ruri(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_ruri_user(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_ruri_host(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_ruri_port(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_branch(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_force_sock(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_mflags(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_mflag(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_sflags(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_sflag(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_bflags(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_bflag(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_to_uri(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_to_username(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_to_domain(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_to_display(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_from_uri(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_from_username(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_from_domain(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
int pv_set_from_display(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val);
/********* end PV set functions *********/
int pv_parse_scriptvar_name(pv_spec_p sp, str *in);
int pv_parse_hdr_name(pv_spec_p sp, str *in);
int pv_parse_cnt_name(pv_spec_p sp, str *in);
int pv_parse_af_name(pv_spec_p sp, str *in);
int pv_get_af(sip_msg_t *msg, pv_param_t *param,
pv_value_t *res);
int pv_parse_K_name(pv_spec_p sp, str *in);
int pv_get_K(sip_msg_t *msg, pv_param_t *param,
pv_value_t *res);
int pv_parse_flag_param(pv_spec_p sp, str *in);
int pv_parse__s_name(pv_spec_p sp, str *in);
int pv_get__s(sip_msg_t *msg, pv_param_t *param,
pv_value_t *res);
int pv_parse_expires_name(pv_spec_p sp, str *in);
int pv_get_expires(sip_msg_t *msg, pv_param_t *param,
pv_value_t *res);
#endif
|