1 /* 2 * This file is part of the Sofia-SIP package 3 * 4 * Copyright (C) 2005 Nokia Corporation. 5 * 6 * Contact: Pekka Pessi <pekka.pessi@nokia.com> 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public License 10 * as published by the Free Software Foundation; either version 2.1 of 11 * the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, but 14 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 21 * 02110-1301 USA 22 * 23 */ 24 25 /**@CFILE nta_tag.c 26 * @brief Tags for Nokia SIP Transaction API 27 * 28 * @note This file is used to automatically generate 29 * nta_tag_ref.c and nta_tag_dll.c 30 * 31 * @author Pekka Pessi <Pekka.Pessi@nokia.com> 32 * 33 * @date Created: Tue Jul 24 22:28:34 2001 ppessi 34 */ 35 36 #include "config.h" 37 38 #include <string.h> 39 #include <assert.h> 40 41 #define TAG_NAMESPACE "nta" 42 43 #include "sofia-sip/nta_tag.h" 44 #include <sofia-sip/su_tag_class.h> 45 #include <sofia-sip/sip_tag_class.h> 46 #include <sofia-sip/url_tag_class.h> 47 48 #include <sofia-sip/sip_protos.h> 49 50 tag_typedef_t ntatag_any = NSTAG_TYPEDEF(*); 51 52 /**@def NTATAG_MCLASS(x) 53 * 54 * Message class used by NTA. 55 * 56 * The nta can use a custom or extended parser created with 57 * msg_mclass_clone(). 58 * 59 * @par Used with 60 * nua_create(), nua_set_params(), 61 * nta_agent_create(), nta_agent_set_params() 62 * 63 * @par Parameter type 64 * pointer to #msg_mclass_t. 65 * 66 * @par Values 67 * - custom or extended parser created with msg_mclass_clone() 68 * - NULL - use default parser 69 * 70 * @par Default Value 71 * - Value returned by sip_default_mclass() 72 * 73 * @sa NTATAG_SIPFLAGS() 74 */ 75 tag_typedef_t ntatag_mclass = PTRTAG_TYPEDEF(mclass); 76 77 /**@def NTATAG_BAD_REQ_MASK(x) 78 * 79 * Mask for bad request messages. 80 * 81 * If an incoming request has erroneous headers matching with the mask, nta 82 * automatically returns a 400 Bad Message response to them. 83 * 84 * If mask ~0U (all bits set) is specified, all requests with any bad header 85 * are dropped. By default only the requests with bad headers essential for 86 * request processing or proxying are dropped. 87 * 88 * @par Used with 89 * nua_create(), nua_set_params(), 90 * nta_agent_create(), nta_agent_set_params() 91 * 92 * @par Parameter type 93 * unsigned int 94 * 95 * @par Values 96 * - bitwise or of enum #sip_bad_mask values 97 * 98 * @par Default Value 99 * - <code>sip_mask_response | sip_mask_ua | sip_mask_100rel | </code><br> 100 * <code>sip_mask_events | sip_mask_timer | sip_mask_publish</code> 101 * The following headers are considered essential by default: 102 * - @ref sip_request \"request line\"", @From, @To, @CSeq, @CallID, 103 * @ContentLength, @Via, @ContentType, @ContentDisposition, 104 * @ContentEncoding, @Supported, @Contact, @Require, @RecordRoute, @RAck, 105 * @RSeq, @Event, @Expires, @SubscriptionState, @SessionExpires, 106 * @MinSE, @SIPETag, and @SIPIfMatch. 107 * 108 * @sa enum #sip_bad_mask, NTATAG_BAD_RESP_MASK() 109 */ 110 tag_typedef_t ntatag_bad_req_mask = UINTTAG_TYPEDEF(bad_req_mask); 111 112 /**@def NTATAG_BAD_RESP_MASK(x) 113 * 114 * Mask for bad response messages. 115 * 116 * If an incoming response has erroneous headers matching with the mask, nta 117 * drops the response message. 118 * 119 * If mask ~0U (all bits set) is specified, all responses with any bad header 120 * are dropped. By default only the responses with bad headers essential for 121 * response processing or proxying are dropped. 122 * 123 * @par Used with 124 * nua_create(), nua_set_params(), 125 * nta_agent_create(), nta_agent_set_params() 126 * 127 * @par Parameter type 128 * unsigned int 129 * 130 * @par Values 131 * - bitwise or of enum #sip_bad_mask values 132 * 133 * @sa enum #sip_bad_mask, NTATAG_BAD_REQ_MASK() 134 * 135 * @par Default Value 136 * - <code>sip_mask_response | sip_mask_ua | sip_mask_100rel | </code><br> 137 * <code>sip_mask_events | sip_mask_timer | sip_mask_publish</code> 138 * The following headers are considered essential by default: 139 * - @ref sip_status \"status line\"", @From, @To, @CSeq, @CallID, 140 * @ContentLength, @Via, @ContentType, @ContentDisposition, 141 * @ContentEncoding, @Supported, @Contact, @Require, @RecordRoute, @RAck, 142 * @RSeq, @Event, @Expires, @SubscriptionState, @SessionExpires, 143 * @MinSE, @SIPETag, and @SIPIfMatch. 144 */ 145 tag_typedef_t ntatag_bad_resp_mask = UINTTAG_TYPEDEF(bad_resp_mask); 146 147 /**@def NTATAG_DEFAULT_PROXY(x) 148 * 149 * URL for (default) proxy. 150 * 151 * The requests are sent towards the <i>default outbound proxy</i> regardless 152 * the values of request-URI or @Route headers in the request. The URL of 153 * the default proxy is not added to the request in the @Route header or in 154 * the request-URI (against the recommendation of @RFC3261 section 8.1.2). 155 * 156 * The outbound proxy set by NTATAG_DEFAULT_PROXY() is used even if the 157 * dialog had an established route set or registration provided User-Agent 158 * with a @ServiceRoute set. 159 * 160 * @par Used with 161 * nua_create(), nua_set_params(), 162 * nta_agent_create(), nta_agent_set_params(), 163 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 164 * nta_outgoing_tcancel(), nta_outgoing_prack(), nta_msg_tsend() 165 * 166 * @par Parameter type 167 * Pointer to a url_t structure or a string containg a SIP or SIPS URI 168 * 169 * @par Values 170 * - Valid SIP or SIPS URI 171 */ 172 tag_typedef_t ntatag_default_proxy = URLTAG_TYPEDEF(default_proxy); 173 174 /**@def NTATAG_CONTACT(x) 175 * 176 * Contact used by NTA. 177 */ 178 tag_typedef_t ntatag_contact = SIPHDRTAG_NAMED_TYPEDEF(contact, contact); 179 180 /** @def NTATAG_TARGET(x) 181 * 182 * Dialog target (contact) used by NTA. 183 */ 184 tag_typedef_t ntatag_target = SIPHDRTAG_NAMED_TYPEDEF(target, contact); 185 186 /** @def NTATAG_ALIASES(x) 187 * 188 * Aliases used by NTA. 189 * @deprecated 190 */ 191 tag_typedef_t ntatag_aliases = SIPHDRTAG_NAMED_TYPEDEF(aliases, contact); 192 193 /**@def NTATAG_METHOD(x) 194 * 195 * Method name. 196 * 197 * Create a dialogless #nta_leg_t object matching only requests with 198 * the specified method. 199 * 200 * @par Used with 201 * nta_leg_tcreate() 202 * 203 * @par Parameter type 204 * String containing method name. 205 * 206 * @par Values 207 * - A SIP method name (e.g., "SUBSCRIBE"). 208 * 209 * @par Default Value 210 * - None (i.e., all requests methods match with the leg) 211 * 212 */ 213 tag_typedef_t ntatag_method = STRTAG_TYPEDEF(method); 214 215 /**@def NTATAG_BRANCH_KEY(x) 216 * 217 * Branch ID to the topmost @Via header. 218 * 219 * The NTA generates a random branch ID for the topmost @Via header by default. 220 * The application can the branch by itself, for intance, if it wants to 221 * create a @RFC2543-era transaction. 222 * 223 * Note that according to @RFC3261 the branch ID must start with "z9hG4bK". 224 * 225 * @par Used with 226 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 227 * nta_outgoing_tcancel(), nta_outgoing_prack(), nta_msg_tsend() 228 * 229 * @par Parameter type 230 * string 231 * 232 * @par Value 233 * - The "branch" ID to to insert into topmost @Via header of the 234 * request to be sent 235 * 236 * @par Default Value 237 * - A token is generated, either by random when a client transaction is 238 * created or by hashing the headers and contents of the request when 239 * request is sent statelessly 240 * 241 * @sa @RFC3261 section 8.1.1.7 242 */ 243 tag_typedef_t ntatag_branch_key = STRTAG_TYPEDEF(branch_key); 244 245 /**@def NTATAG_ACK_BRANCH(x) 246 * 247 * Branch of the transaction to ACK. 248 * 249 * When creating a ACK transaction, the application should provide the 250 * branch parameter from the original transaction to the stack. The ACK 251 * transaction object then receives all the retransmitted 2XX responses to 252 * the original INVITE transaction. 253 * 254 * @par Used with 255 * nta_outgoing_mcreate(), nta_outgoing_tcreate() 256 * 257 * @par Parameter type 258 * string 259 * 260 * @par Value 261 * - "branch" ID used to store the ACK transaction in the nta hash 262 * table for outgoing client transaction 263 * 264 * @par Default Value 265 * - The INVITE transaction is looked from the hash table using the @CallID, 266 * @CSeq, @From and @To tags and its branch ID is used 267 */ 268 tag_typedef_t ntatag_ack_branch = STRTAG_TYPEDEF(ack_branch); 269 270 /**@def NTATAG_COMP(x) 271 * 272 * Compression algorithm. 273 * 274 * Set compression algorithm for request as described in @RFC3486. 275 * 276 * @note This tag is has no effect without a compression plugin. 277 * 278 * @par Used with 279 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 280 * nta_outgoing_tcancel(), nta_outgoing_prack(), nta_msg_tsend() 281 * 282 * @par 283 * Note that NTATAG_COMP(NULL) can be used with nta_incoming_set_params() 284 * and nta_incoming_treply(), too. It indicates that the response is sent 285 * uncompressed, no matter what the client has in @a comp parameter of @Via 286 * header. 287 * 288 * @par Parameter type 289 * string 290 * 291 * @par Values 292 * - name of the compression algorithm 293 * 294 * @par Default Value 295 * - "sigcomp" 296 * 297 * @sa @RFC3320, @RFC3486, TPTAG_COMPARTMENT(), 298 * NTATAG_SIGCOMP_ALGORITHM(), NTATAG_SIGCOMP_AWARE(), 299 * NTATAG_SIGCOMP_CLOSE(), NTATAG_SIGCOMP_OPTIONS() 300 */ 301 tag_typedef_t ntatag_comp = CSTRTAG_TYPEDEF(comp); 302 303 /**@def NTATAG_MSG(x) 304 * 305 * Pass a SIP message to treply()/tcreate() functions. 306 * 307 * @par Used with 308 * nta_outgoing_tcreate(), nta_incoming_treply() 309 * 310 * @par Parameter type 311 * #msg_t 312 * 313 * @par Values 314 * - A message object which will be completed, serialized and encoded. 315 * Note that the functions modify directly the message. 316 * 317 * @par Default Value 318 * - A new message object is created and populated by the function call. 319 * 320 * @sa msg_copy(), msg_dup(), msg_create(), sip_default_mclass() 321 */ 322 tag_typedef_t ntatag_msg = PTRTAG_TYPEDEF(msg); 323 324 /**@def NTATAG_TPORT(x) 325 * 326 * Pass a transport object. The transport object is used to send the request 327 * or response message(s). 328 * 329 * @par Used with 330 * nta_outgoing_tcreate(), nta_outgoing_mcreate(), nta_outgoing_tcancel(), 331 * nta_incoming_create(), nta_msg_tsend(), nta_msg_mreply() 332 * 333 * @par Parameter type 334 * - #tport_t 335 * 336 * @par Values 337 * - A pointer to the transport object. Note that a new reference to the transport 338 * is created. 339 * 340 * @par Default Value 341 * - The transport is selected by resolving the outbound URI (specified with 342 * NTATAG_DEFAULT_PROXY(), the topmost @Route URI or Request-URI. 343 */ 344 tag_typedef_t ntatag_tport = PTRTAG_TYPEDEF(tport); 345 346 /**@def NTATAG_SMIME(x) 347 * 348 * Provide S/MIME context to NTA. 349 * 350 * @todo S/MIME is not implemented. 351 */ 352 tag_typedef_t ntatag_smime = PTRTAG_TYPEDEF(smime); 353 354 /**@def NTATAG_REMOTE_CSEQ(x) 355 * 356 * Remote CSeq number. 357 * 358 * Specify remote command sequence number for a #nta_leg_t dialog object. If 359 * an request is received matching with the dialog but with @CSeq number 360 * less than the remote sequence number associated with the dialog, a <i>500 361 * Internal Server Error</i> response is automatically returned to the client. 362 * 363 * @par Used with 364 * nta_leg_tcreate() 365 * 366 * @par Parameter type 367 * - uint32_t 368 * 369 * @par Values 370 * - Remote command sequence number 371 * 372 * @par Default Value 373 * - Initially 0, then determined by the received requests 374 * 375 */ 376 tag_typedef_t ntatag_remote_cseq = UINTTAG_TYPEDEF(remote_cseq); 377 378 /**@def NTATAG_MAXSIZE(x) 379 * 380 * Maximum size of incoming message. 381 * 382 * If the size of an incoming request message would exceed the 383 * given limit, the stack will automatically respond with <i>413 Request 384 * Entity Too Large</i>. 385 * 386 * @par Used with 387 * nua_create(), nua_set_params(), 388 * nta_agent_create(), nta_agent_set_params() 389 * 390 * @par Parameter type 391 * - #usize_t 392 * 393 * @par Values 394 * - Maximum acceptable size of an incoming request message. 395 * 396 * @par Default Value 397 * - 2097152 (bytes or 2 megabytes) 398 * 399 * @sa msg_maxsize(), NTATAG_UDP_MTU() 400 */ 401 tag_typedef_t ntatag_maxsize = USIZETAG_TYPEDEF(maxsize); 402 403 /**@def NTATAG_MAX_PROCEEDING(x) 404 * 405 * Maximum size of proceeding queue. 406 * 407 * If the size of the proceedng message queue would exceed the 408 * given limit, the stack will automatically respond with <i>503 409 * Service Unavailable</i>. 410 * 411 * @par Used with 412 * nua_create(), nua_set_params(), 413 * nta_agent_create(), nta_agent_set_params() 414 * 415 * @par Parameter type 416 * - #usize_t 417 * 418 * @par Values 419 * - Maximum acceptable size of a queue (size_t). 420 * 421 * @NEW_1_12_9 422 */ 423 tag_typedef_t ntatag_max_proceeding = USIZETAG_TYPEDEF(max_proceeding); 424 425 /**@def NTATAG_UDP_MTU(x) 426 * 427 * Maximum size of outgoing UDP request. 428 * 429 * The maximum UDP request size is used to control use of UDP with overtly 430 * large messages. The IETF requires that the SIP requests over 1300 bytes 431 * are sent over congestion-controlled transport such as TCP. If a SIP 432 * message size exceeds the UDP MTU, the TCP is tried instead of UDP. (If 433 * the TCP connection is refused, the stack reverts back to UDP). 434 * 435 * @par Used with 436 * nua_create(), nua_set_params(), 437 * nta_agent_create(), nta_agent_set_params() 438 * 439 * @par Parameter type 440 * - unsigned 441 * 442 * @par Values 443 * - Maximum size of an outgoing UDP request 444 * 445 * @par Default Value 446 * - 1300 (bytes) 447 * 448 * @sa @RFC3261 section 18.1.1, NTATAG_MAXSIZE() 449 */ 450 tag_typedef_t ntatag_udp_mtu = UINTTAG_TYPEDEF(udp_mtu); 451 452 /**@def NTATAG_MAX_FORWARDS(x) 453 * 454 * Default value for @MaxForwards header. 455 * 456 * The default value of @MaxForwards header added to the requests. The 457 * initial value recommended by @RFC3261 is 70, but usually SIP proxies use 458 * much lower default value, such as 24. 459 * 460 * @par Used with 461 * nua_create(), nua_set_params(), 462 * nta_agent_create(), nta_agent_set_params() 463 * 464 * @par Parameter type 465 * unsigned 466 * 467 * @par Values 468 * - Default value added to the @MaxForwards header in the sent requests 469 * 470 * @par Default Value 471 * - 70 (hops) 472 * 473 * @since New in @VERSION_1_12_2. 474 */ 475 tag_typedef_t ntatag_max_forwards = UINTTAG_TYPEDEF(max_forwards); 476 477 /**@def NTATAG_SIP_T1(x) 478 * 479 * Initial retransmission interval (in milliseconds) 480 * 481 * Set the T1 retransmission interval used by the SIP transaction engine. The 482 * T1 is the initial duration used by request retransmission timers A and E 483 * (UDP) as well as response retransmission timer G. 484 * 485 * @par Used with 486 * nua_create(), nua_set_params(), 487 * nta_agent_create(), nta_agent_set_params() 488 * 489 * @par Parameter type 490 * unsigned int 491 * 492 * @par Values 493 * - Value of SIP T1 in milliseconds 494 * 495 * @par Default Value 496 * - #NTA_SIP_T1 or 500 (milliseconds) 497 * 498 * @sa @RFC3261 appendix A, #NTA_SIP_T1, NTATAG_SIP_T1X4(), NTATAG_SIP_T1(), NTATAG_SIP_T4() 499 */ 500 tag_typedef_t ntatag_sip_t1 = UINTTAG_TYPEDEF(sip_t1); 501 502 /**@def NTATAG_SIP_T1X64(x) 503 * 504 * Transaction timeout (defaults to T1 * 64). 505 * 506 * Set the T1x64 timeout value used by the SIP transaction engine. The T1x64 is 507 * duration used for timers B, F, H, and J (UDP) by the SIP transaction engine. 508 * The timeout value T1x64 can be adjusted separately from the initial 509 * retransmission interval T1, which is set with NTATAG_SIP_T1(). 510 * 511 * The default value for T1x64 is 64 times value of T1, or 32000 milliseconds. 512 * 513 * @par Used with 514 * nua_create(), nua_set_params(), 515 * nta_agent_create(), nta_agent_set_params() 516 * 517 * @par Parameter type 518 * unsigned int 519 * 520 * @par Values 521 * - Value of T1x64 in milliseconds 522 * 523 * @par Default Value 524 * - 64 * #NTA_SIP_T1 or 32000 (milliseconds) 525 * 526 * @sa @RFC3261 appendix A, #NTA_SIP_T1, NTATAG_SIP_T1(), NTATAG_SIP_T2(), NTATAG_SIP_T4() 527 * 528 */ 529 tag_typedef_t ntatag_sip_t1x64 = UINTTAG_TYPEDEF(sip_t1x64); 530 531 /**@def NTATAG_SIP_T2(x) 532 * 533 * Maximum retransmission interval (in milliseconds) 534 * 535 * Set the maximum retransmission interval used by the SIP transaction 536 * engine. The T2 is the maximum duration used for the timers E (UDP) and G 537 * by the SIP transaction engine. Note that the timer A is not capped by T2. 538 * Retransmission interval of INVITE requests grows exponentially until the 539 * timer B fires. 540 * 541 * @par Used with 542 * nua_create(), nua_set_params(), 543 * nta_agent_create(), nta_agent_set_params() 544 * 545 * @par Parameter type 546 * unsigned int 547 * 548 * @par Values 549 * - Value of SIP T2 in milliseconds 550 * 551 * @par Default Value 552 * - #NTA_SIP_T2 or 4000 (milliseconds) 553 * 554 * @sa @RFC3261 appendix A, #NTA_SIP_T2, NTATAG_SIP_T1(), NTATAG_SIP_T1X4(), NTATAG_SIP_T4() 555 */ 556 tag_typedef_t ntatag_sip_t2 = UINTTAG_TYPEDEF(sip_t2); 557 558 /**@def NTATAG_SIP_T4(x) 559 * 560 * Transaction lifetime (in milliseconds) 561 * 562 * Set the lifetime for completed transactions used by the SIP transaction 563 * engine. A completed transaction is kept around for the duration of T4 in 564 * order to catch late responses. The T4 is the maximum duration for the 565 * messages to stay in the network and the duration of SIP timer K. 566 * 567 * @par Used with 568 * nua_create(), nua_set_params(), 569 * nta_agent_create(), nta_agent_set_params() 570 * 571 * @par Parameter type 572 * unsigned int 573 * 574 * @par Values 575 * - Value of SIP T4 in milliseconds 576 * 577 * @par Default Value 578 * - #NTA_SIP_T4 or 4000 (milliseconds) 579 * 580 * @sa @RFC3261 appendix A, #NTA_SIP_T4, NTATAG_SIP_T1(), NTATAG_SIP_T1X4(), NTATAG_SIP_T2() 581 */ 582 tag_typedef_t ntatag_sip_t4 = UINTTAG_TYPEDEF(sip_t4); 583 584 /**@def NTATAG_PROGRESS(x) 585 * 586 * Progress timer for User-Agents (interval for retranmitting 1XXs). 587 * 588 * The UAS should retransmit preliminary responses to the INVITE 589 * transactions every minute in order to re-set the timer C within the 590 * intermediate proxies. 591 * 592 * The default value for the progress timer is 60000. 593 * 594 * @par Used with 595 * nua_create(), nua_set_params(), 596 * nta_agent_create(), nta_agent_set_params() 597 * 598 * @par Parameter type 599 * unsigned int 600 * 601 * @par Values 602 * Value of progress timer in milliseconds. 603 * 604 * @par Default Value 605 * - 90000 (milliseconds, 1.5 minutes) 606 * 607 * @sa @RFC3261 sections 13.3.1.1, 16.7 and 16.8, NTATAG_TIMER_C(), 608 * NTATAG_SIP_T1(), NTATAG_SIP_T1X4(), NTATAG_SIP_T2(), NTATAG_SIP_T4() 609 */ 610 tag_typedef_t ntatag_progress = UINTTAG_TYPEDEF(progress); 611 612 /**@def NTATAG_TIMER_C(x) 613 * 614 * Value for timer C in milliseconds. 615 * 616 * By default the INVITE transaction will not timeout after a preliminary 617 * response has been received. However, an intermediate proxy can timeout 618 * the transaction using timer C. Timer C is reset every time a response 619 * belonging to the transaction is received. 620 * 621 * The default value for the timer C is 185000 milliseconds (3 minutes and 5 622 * seconds). By default, timer C is not run on user agents (if NTATAG_UA(1) 623 * without NTATAG_TIMER_C() is given). 624 * 625 * @par Used with 626 * nua_create(), nua_set_params(), 627 * nta_agent_create(), nta_agent_set_params() 628 * 629 * @par Parameter type 630 * unsigned int 631 * 632 * @par Values 633 * Value of SIP timer C in milliseconds. The default value is used 634 * instead if NTATAG_TIMER_C(0) is given. 635 * 636 * @par Default Value 637 * - 185000 (milliseconds, 3 minutes) 638 * 639 * @sa @RFC3261 sections 13.3.1.1, 16.7 and 16.8, 640 * NTATAG_UA(1), NTATAG_TIMER_C(), 641 * NTATAG_SIP_T1(), NTATAG_SIP_T1X4(), NTATAG_SIP_T2(), NTATAG_SIP_T4() 642 * 643 * @NEW_1_12_7. 644 */ 645 tag_typedef_t ntatag_timer_c = UINTTAG_TYPEDEF(timer_c); 646 647 /**@def NTATAG_GRAYLIST(x) 648 * 649 * Avoid failed servers. 650 * 651 * The NTATAG_GRAYLIST() provides the time that the servers are avoided 652 * after a request sent to them has been failed. Avoiding means that if a 653 * domain provides multiple servers, the failed servers are tried last. 654 * 655 * @par Used with 656 * nua_create(), nua_set_params(), 657 * nta_agent_create(), nta_agent_set_params() 658 * 659 * @par Parameter type 660 * unsigned int 661 * 662 * @par Values 663 * - Number of seconds that server is kept in graylist, from 0 to 86400. 664 * 665 * @par Default Value 666 * - 600 (graylist server for 10 minutes) 667 * 668 * @sa NTATAG_BLACKLIST(), NTATAG_TIMEOUT_408() 669 * 670 * @NEW_1_12_8 671 */ 672 tag_typedef_t ntatag_graylist = UINTTAG_TYPEDEF(graylist); 673 674 /**@def NTATAG_BLACKLIST(x) 675 * 676 * Add Retry-After header to error responses returned to application. 677 * 678 * The NTATAG_BLACKLIST() provides a default value for @RetryAfter header 679 * added to the internally generated responses such as <i>503 DNS Error</i> 680 * or <i>408 Timeout</i>. The idea is that the application can retain its 681 * current state and retry the operation after a while. 682 * 683 * @par Used with 684 * nua_create(), nua_set_params(), 685 * nta_agent_create(), nta_agent_set_params() 686 * 687 * @par Parameter type 688 * unsigned int 689 * 690 * @par Values 691 * - Value of @a delta-seconds in @RetryAfter header, from 0 to 86400 692 * 693 * @par Default Value 694 * - 0 (no @RetryAfter header is included) 695 * 696 * @sa NTATAG_TIMEOUT_408() 697 */ 698 tag_typedef_t ntatag_blacklist = UINTTAG_TYPEDEF(blacklist); 699 700 /**@def NTATAG_DEBUG_DROP_PROB(x) 701 * 702 * Packet drop probability for debugging. 703 * 704 * The packet drop probability parameter is useful mainly for debugging 705 * purposes. The stack drops an incoming message received over an unreliable 706 * transport (such as UDP) with the given probability. The range is in 0 .. 707 * 1000, 500 means p=0.5. 708 * 709 * @par Used with 710 * nua_create(), nua_set_params(), 711 * nta_agent_create(), nta_agent_set_params() 712 * 713 * @par Parameter type 714 * unsigned integer 715 * 716 * @par Values 717 * - Valid values are in range 0 ... 1000 718 * - Probablity to drop a given message is value / 1000. 719 * 720 * @par Default Value 721 * - 0 (no packets are dropped) 722 * 723 * @sa TPTAG_DEBUG_DROP() 724 */ 725 tag_typedef_t ntatag_debug_drop_prob = UINTTAG_TYPEDEF(debug_drop_prob); 726 727 /**@def NTATAG_SIGCOMP_OPTIONS(x) 728 * 729 * Semicolon-separated SigComp options. 730 * 731 * @note This tag is has no effect without a SigComp plugin. 732 * 733 * @par Used with 734 * nua_create(), nua_set_params(), 735 * nta_agent_create(), nta_agent_set_params(), 736 * nta_agent_add_tport() 737 * 738 * @par Parameter type 739 * string 740 * 741 * @par Values 742 * - semicolon-separated parameter-value pairs, passed to the SigComp plugin 743 * 744 * @sa NTATAG_COMP(), NTATAG_SIGCOMP_ALGORITHM(), NTATAG_SIGCOMP_AWARE(), 745 * NTATAG_SIGCOMP_CLOSE(), @RFC3320 746 */ 747 tag_typedef_t ntatag_sigcomp_options = STRTAG_TYPEDEF(sigcomp_options); 748 749 /**@def NTATAG_SIGCOMP_CLOSE(x) 750 * 751 * Close SigComp compartment after completing transaction. 752 * 753 * @note This tag is has no effect without a SigComp plugin. 754 * 755 * @par Used with 756 * nta_incoming_set_params(), nta_incoming_treply() 757 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 758 * nta_outgoing_tmcreate(), nta_outgoing_tcancel(), 759 * nta_outgoing_prack(), nta_msg_tsend(), nta_msg_treply() 760 * 761 * @par Parameter type 762 * boolean: true (non-zero or non-NULL pointer) 763 * or false (zero or NULL pointer) 764 * 765 * @par Values 766 * - true - application takes care of compartment management 767 * - false - stack manages compartments 768 * 769 * @sa NTATAG_COMP(), TPTAG_COMPARTMENT(), 770 * NTATAG_SIGCOMP_ALGORITHM(), NTATAG_SIGCOMP_AWARE(), 771 * NTATAG_SIGCOMP_OPTIONS(), @RFC3320 772 */ 773 tag_typedef_t ntatag_sigcomp_close = BOOLTAG_TYPEDEF(sigcomp_close); 774 775 /**@def NTATAG_SIGCOMP_AWARE(x) 776 * 777 * Indicate that the application is SigComp-aware. 778 * 779 * @note This tag is has no effect without a SigComp plugin. 780 * 781 * @par Used with 782 * nua_create(), nua_set_params(), 783 * nta_agent_create(), nta_agent_set_params() 784 * 785 * @par Parameter type 786 * boolean: true (non-zero or non-NULL pointer) 787 * or false (zero or NULL pointer) 788 * 789 * @par Values 790 * - true - application takes care of compartment management 791 * - false - stack manages compartments 792 * 793 * @sa NTATAG_COMP(), NTATAG_SIGCOMP_ALGORITHM(), NTATAG_SIGCOMP_CLOSE(), 794 * NTATAG_SIGCOMP_OPTIONS(), @RFC3320 795 */ 796 tag_typedef_t ntatag_sigcomp_aware = BOOLTAG_TYPEDEF(sigcomp_aware); 797 798 /**@def NTATAG_SIGCOMP_ALGORITHM(x) 799 * 800 * Specify SigComp algorithm. 801 * 802 * @note This tag is has no effect without a SigComp plugin. 803 * 804 * @par Used with 805 * nua_create(), nua_set_params(), 806 * nta_agent_create(), nta_agent_set_params(), 807 * nta_agent_add_tport() 808 * 809 * @par Parameter type 810 * string 811 * 812 * @par Values 813 * - opaque string passed to the SigComp plugin 814 * 815 * @sa NTATAG_COMP(), NTATAG_SIGCOMP_AWARE(), NTATAG_SIGCOMP_CLOSE(), 816 * NTATAG_SIGCOMP_OPTIONS(), @RFC3320 817 */ 818 tag_typedef_t ntatag_sigcomp_algorithm = STRTAG_TYPEDEF(sigcomp_algorithm); 819 820 /**@def NTATAG_UA(x) 821 * 822 * If true, NTA acts as User Agent Server or Client by default. 823 * 824 * When acting as an UA, the NTA stack will 825 * - respond with 481 to a PRACK request with no matching "100rel" response 826 * - check for out-of-order CSeq headers for each #nta_leg_t dialog object 827 * - if NTATAG_MERGE_482(1) is also used, return <i>482 Request Merged</i> to 828 * a duplicate request with same @CallID, @CSeq, @From tag but different 829 * topmost @Via header (see @RFC3261 section 8.2.2.2 Merged Requests) 830 * - silently discard duplicate final responses to INVITE 831 * - retransmit preliminary responses (101..199) to INVITE request in regular 832 * intervals ("timer N2") 833 * - retransmit 2XX response to INVITE request with exponential intervals 834 * - handle ACK sent in 2XX response to an INVITE using the 835 * #nta_ack_cancel_f callback bound to #nta_incoming_t with 836 * nta_incoming_bind() 837 * - not use timer C unless its value has been explicitly set 838 * 839 * @note This NUTAG_UA(1) is set internally by nua_create() 840 * 841 * @par Used with 842 * nta_agent_create() \n 843 * nta_agent_set_params() \n 844 * 845 * @par Parameter type 846 * boolean: true (non-zero or non-NULL pointer) 847 * or false (zero or NULL pointer) 848 * 849 * @par Values 850 * - true - act as an UA 851 * - false - act as an proxy 852 * 853 * @par Default Value 854 * - 0 (false) 855 * 856 * @sa NTATAG_MERGE_482() 857 */ 858 tag_typedef_t ntatag_ua = BOOLTAG_TYPEDEF(ua); 859 860 /**@def NTATAG_STATELESS(x) 861 * 862 * Enable stateless processing. 863 * 864 * @par Server side 865 * The incoming requests are processed statefully if there is a default leg 866 * (created with nta_leg_default()). This option is provided for proxies or 867 * other server elements that process requests statelessly. 868 * 869 * @par Used with 870 * nua_create(), nua_set_params(), 871 * nta_agent_create(), nta_agent_set_params() 872 * 873 * @par Values 874 * - true - do not pass incoming requests to default leg 875 * - false - pass incoming requests to default leg, if it exists 876 * 877 * @par Default Value 878 * - 0 (false, pass incoming requests to default leg) 879 * 880 * @par Client side 881 * The outgoing requests can be sent statelessly, too, if the 882 * NTATAG_STATELESS(1) is included in the tag list of nta_outgoing_tcreate(). 883 * 884 * @par Used with 885 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 886 * nta_outgoing_tcancel(), nta_outgoing_prack() 887 * 888 * @par Parameter type 889 * boolean: true (non-zero or non-NULL pointer) 890 * or false (zero or NULL pointer) 891 * 892 * @par Values 893 * - true - create only a transient #nta_outgoing_t transaction object 894 * - false - create an ordinary client transaction object 895 * 896 * @par Default Value 897 * - 0 (false, create client transaction) 898 * 899 * @sa NTATAG_IS_UA(), nta_incoming_default(), nta_outgoing_default(), 900 * nta_leg_default() 901 */ 902 tag_typedef_t ntatag_stateless = BOOLTAG_TYPEDEF(stateless); 903 904 /**@def NTATAG_USER_VIA(x) 905 * 906 * Allow application to insert Via headers. 907 * 908 * @par Used with 909 * nua_create(), nua_set_params(), 910 * nta_agent_create(), nta_agent_set_params(), 911 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 912 * nta_outgoing_tcancel(), nta_outgoing_prack(), nta_msg_tsend() 913 * 914 * @par Parameter type 915 * boolean: true (non-zero or non-NULL pointer) 916 * or false (zero or NULL pointer) 917 * 918 * @par Values 919 * - true - do not add @Via header to the request (if it has one) 920 * - false - always add a @Via header 921 * 922 * @par Default Value 923 * - 0 (false, always add a @Via header) 924 * 925 * @sa NTATAG_BRANCH(), NTATAG_TPORT() 926 */ 927 tag_typedef_t ntatag_user_via = BOOLTAG_TYPEDEF(user_via); 928 929 /**@def NTATAG_PASS_100(x) 930 * 931 * Pass "<i>100 Trying</i>" provisional answers to the application. 932 * 933 * By default, the stack silently processes the <i>100 Trying</i> responses 934 * from the server. Usually the <i>100 Trying</i> responses are not 935 * important to the application but rather sent by the outgoing proxy 936 * immediately after it has received the request. However, the application 937 * can ask nta for them by setting NTATAG_PASS_100(1) if, for instance, the 938 * <i>100 Trying</i> responses are needed for user feedback. 939 * 940 * @par Used with 941 * nua_create(), nua_set_params(), 942 * nta_agent_create(), nta_agent_set_params(), 943 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 944 * nta_outgoing_tcancel(), nta_outgoing_prack(), nta_msg_tsend() 945 * 946 * @par Parameter type 947 * boolean: true (non-zero or non-NULL pointer) 948 * or false (zero or NULL pointer) 949 * 950 * @par Values 951 * - true - pass <i>100 Trying</i> to application 952 * - false - silently process <i>100 Trying</i> responses 953 * 954 * @par Default Value 955 * - 0 (false, save application from seeing 100 Trying) 956 * 957 * @sa NTATAG_EXTRA_100(), NTATAG_DEFAULT_PROXY() 958 */ 959 tag_typedef_t ntatag_pass_100 = BOOLTAG_TYPEDEF(pass_100); 960 961 /**@def NTATAG_EXTRA_100(x) 962 * 963 * Respond with "100 Trying" if application has not responded. 964 * 965 * As per recommended by @RFC4320, the stack can generate a 100 Trying 966 * response to the non-INVITE requests if the application has not responded 967 * to a request within half of the SIP T2 (the default value for T2 is 4000 968 * milliseconds, so the extra <i>100 Trying</i> would be sent after 2 seconds). 969 * 970 * At agent level, this option applies to retransmissions of both non-INVITE 971 * and INVITE transactions. 972 * 973 * At incoming request level, this option can disable sending the 100 Trying for 974 * both retransmissions (if set at agent level) and N1 firings, for just a given 975 * incoming request. 976 * 977 * @par Used with 978 * nua_create(), nua_set_params(), 979 * nta_agent_create(), nta_agent_set_params(), 980 * nta_incoming_set_params() 981 * 982 * @par Parameter type 983 * boolean: true (non-zero or non-NULL pointer) 984 * or false (zero or NULL pointer) 985 * 986 * @par Values 987 * - true - send extra 100 Trying if application does not respond 988 * - false - do not send 100 Trying 989 * 990 * @par Default Value at Agent level 991 * - 0 (false, do not respond with 100 Trying to retransmissions) 992 * 993 * @par Default Value at incoming transaction level 994 * - 1 (true, respond with 100 Trying to retransmissions and when N1 fired) 995 * 996 * @sa @RFC4320, NTATAG_PASS_408(), NTATAG_TIMEOUT_408() 997 */ 998 tag_typedef_t ntatag_extra_100 = BOOLTAG_TYPEDEF(extra_100); 999 1000 /**@def NTATAG_TIMEOUT_408(x) 1001 * 1002 * Generate "408 Request Timeout" response when request times out. 1003 * 1004 * This tag is used to prevent stack from generating extra 408 response 1005 * messages to non-INVITE requests upon timeout. As per recommended by 1006 * @RFC4320, the <i>408 Request Timeout</i> responses to non-INVITE 1007 * transaction are not sent over the network to the client by default. The 1008 * application can ask stack to pass the 408 responses with 1009 * NTATAG_PASS_408(1). 1010 * 1011 * @par Used with 1012 * nua_create(), nua_set_params(), 1013 * nta_agent_create(), nta_agent_set_params() 1014 * 1015 * @par Parameter type 1016 * boolean: true (non-zero or non-NULL pointer) 1017 * or false (zero or NULL pointer) 1018 * 1019 * @par Values 1020 * - true - generate 408 response 1021 * - false - invoke #nta_response_f callback with NULL sip pointer 1022 * when a non-INVITE transaction times out 1023 * 1024 * @sa @RFC4320, NTATAG_PASS_408(), NTATAG_EXTRA_100(), 1025 */ 1026 tag_typedef_t ntatag_timeout_408 = BOOLTAG_TYPEDEF(timeout_408); 1027 1028 /**@def NTATAG_PASS_408(x) 1029 * 1030 * Pass "408 Request Timeout" responses to the client. 1031 * 1032 * As per recommended by @RFC4320, the <i>408 Request Timeout</i> responses 1033 * to non-INVITE transaction are not sent over the network to the client by 1034 * default. The application can ask stack to pass the 408 responses with 1035 * NTATAG_PASS_408(1). 1036 * 1037 * Note that unlike NTATAG_PASS_100(), this tags changes the way server side 1038 * works. 1039 * 1040 * @par Used with 1041 * nua_create(), nua_set_params(), 1042 * nta_agent_create(), nta_agent_set_params() 1043 * 1044 * @par Parameter type 1045 * boolean: true (non-zero or non-NULL pointer) 1046 * or false (zero or NULL pointer) 1047 * 1048 * @par Values 1049 * - true - pass superfluous 408 responses 1050 * - false - discard superfluous 408 responses 1051 * 1052 * @sa @RFC4320, NTATAG_EXTRA_100(), NTATAG_TIMEOUT_408() 1053 * 1054 */ 1055 tag_typedef_t ntatag_pass_408 = BOOLTAG_TYPEDEF(pass_408); 1056 1057 /**@def NTATAG_MERGE_482(x) 1058 * 1059 * Merge requests, send 482 to other requests. 1060 * 1061 * If an User-Agent receives a duplicate request with same @CallID, @CSeq, 1062 * @From tag but different topmost @Via header (see @RFC3261 section 8.2.2.2 1063 * Merged Requests), it should return <i>482 Request Merged</i> response to 1064 * the duplicate request. Such a duplicate request has been originally 1065 * generated by a forking proxy and usually routed via different route to 1066 * the User-Agent. The User-Agent should only respond meaningfully to the 1067 * first request and return the 482 response to the following forked 1068 * requests. 1069 * 1070 * Note that also NTATAG_UA(1) should be set before nta detects merges and 1071 * responds with 482 to them. 1072 * 1073 * @note If your application is an multi-lined user-agent, you may consider 1074 * disabling request merging. However, you have to somehow handle merging 1075 * within a single line. 1076 * 1077 * @par Used with 1078 * nua_create(), nua_set_params(), 1079 * nta_agent_create(), nta_agent_set_params() 1080 * 1081 * @par Parameter type 1082 * boolean: true (non-zero or non-NULL pointer) 1083 * or false (zero or NULL pointer) 1084 * 1085 * @par Values 1086 * - true - detect duplicate requests and respond with 482 to them 1087 * - false - process duplicate requests separately 1088 * 1089 * @sa NTATAG_UA(1) 1090 */ 1091 tag_typedef_t ntatag_merge_482 = BOOLTAG_TYPEDEF(merge_482); 1092 1093 /**@def NTATAG_CANCEL_2543(x) 1094 * 1095 *Follow @RFC2543 semantics with CANCEL. 1096 * 1097 * By default, the nta follows "@RFC3261" semantics when CANCELing a 1098 * request. The CANCEL does not terminate transaction, rather, it is just a 1099 * hint to the server that it should respond immediately (with <i>487 1100 * Request Terminated</i> if it has no better response). Also, if the 1101 * original request was sent over unreliable transport such as UDP, the 1102 * CANCEL is delayed until the server has sent a preliminary response to the 1103 * original request. 1104 * 1105 * If NTATAG_CANCEL_2543(1) is given, the transaction is canceled 1106 * immediately internally (a 487 response is generated locally) and the 1107 * CANCEL request is sent without waiting for an provisional response. 1108 * 1109 * @par Used with 1110 * nua_create(), nua_set_params(), 1111 * nta_agent_create(), nta_agent_set_params() 1112 * nta_outgoing_tcancel() 1113 * 1114 * @par Parameter type 1115 * boolean: true (non-zero or non-NULL pointer) 1116 * or false (zero or NULL pointer) 1117 * 1118 * @par Values 1119 * - true - follow "RFC 2543" semantics with CANCEL 1120 * - false - follow "RFC 3261" semantics with CANCEL 1121 * 1122 * @sa NTATAG_CANCEL_408() 1123 */ 1124 tag_typedef_t ntatag_cancel_2543 = BOOLTAG_TYPEDEF(cancel_2543); 1125 1126 /**@def NTATAG_CANCEL_408(x) 1127 * 1128 * Do not send a CANCEL but just timeout the request. 1129 * 1130 * Calling nta_outgoing_tcancel() with this tag set marks request as 1131 * canceled but does not actually send a CANCEL request. If 1132 * NTATAG_CANCEL_2543(1) is also included, a 487 response is generated 1133 * internally. 1134 * 1135 * @par Used with 1136 * nta_outgoing_tcancel() \n 1137 * 1138 * @par Parameter type 1139 * boolean: true (non-zero or non-NULL pointer) 1140 * or false (zero or NULL pointer) 1141 * 1142 * @par Values 1143 * - true - do not send CANCEL 1144 * - false - let request to timeout 1145 * 1146 * @sa NTATAG_CANCEL_2543() 1147 */ 1148 tag_typedef_t ntatag_cancel_408 = BOOLTAG_TYPEDEF(cancel_408); 1149 1150 /**@def NTATAG_CANCEL_487(x) 1151 * 1152 * When a CANCEL is received, automatically return 487 response to original request. 1153 * 1154 * When the CANCEL is received for an ongoing server transaction 1155 * #nta_incoming_t, the stack will automatically return a <i>487 Request 1156 * Terminated</i> response to the client after returning from the 1157 * #nta_incoming_f callback bound to the transaction with 1158 * nta_incoming_bind() 1159 * 1160 * The application can delay sending the response to the original request 1161 * when NTATAG_CANCEL_408(0) is used. This is useful, for instance, with a 1162 * proxy that forwards the CANCEL downstream and the forwards the response 1163 * back to upstream. 1164 * 1165 * @par Used with 1166 * nua_create(), nua_set_params(), 1167 * nta_agent_create(), nta_agent_set_params() 1168 * 1169 * @par Parameter type 1170 * boolean: true (non-zero or non-NULL pointer) 1171 * or false (zero or NULL pointer) 1172 * 1173 * @par Values 1174 * - true - respond automatically to the CANCELed transaction 1175 * - false - application takes care of responding 1176 * 1177 * @sa NTATAG_CANCEL_2543(), nta_incoming_bind() 1178 */ 1179 tag_typedef_t ntatag_cancel_487 = BOOLTAG_TYPEDEF(cancel_487); 1180 1181 /**@def NTATAG_TAG_3261(x) 1182 * 1183 * When responding to requests, use unique tags. 1184 * 1185 * If set the UA would generate an unique @From/@To tag for all dialogs. If 1186 * unset UA would reuse same tag in order to make it easier to re-establish 1187 * dialog state after a reboot. 1188 * 1189 * @par Used with 1190 * nua_create(), nua_set_params(), 1191 * nta_agent_create(), nta_agent_set_params() 1192 * 1193 * @par Parameter type 1194 * boolean: true (non-zero or non-NULL pointer) 1195 * or false (zero or NULL pointer) 1196 * 1197 * @par Values 1198 * - true - use different tag for each dialog 1199 * - false - use same tag for all dialogs 1200 * 1201 * @sa @RFC3261 section 12.2.2 1202 */ 1203 tag_typedef_t ntatag_tag_3261 = BOOLTAG_TYPEDEF(tag_3261); 1204 1205 /**@def NTATAG_REL100(x) 1206 * 1207 * Include rel100 in INVITE requests. 1208 * 1209 * Include feature tag "100rel" in @Supported header of the INVITE requests. 1210 * 1211 * @par Used with 1212 * nua_create(), nua_set_params(), 1213 * nta_agent_create(), nta_agent_set_params() 1214 * 1215 * @par Parameter type 1216 * boolean: true (non-zero or non-NULL pointer) 1217 * or false (zero or NULL pointer) 1218 * 1219 * @par Values 1220 * - true - include "100rel" 1221 * - false - do not include "100rel" 1222 * 1223 * @sa nta_outgoing_prack(), nta_reliable_treply(), nta_reliable_mreply() 1224 */ 1225 tag_typedef_t ntatag_rel100 = BOOLTAG_TYPEDEF(rel100); 1226 1227 /**@def NTATAG_NO_DIALOG(x) 1228 * 1229 * Create a leg without dialog. */ 1230 tag_typedef_t ntatag_no_dialog = BOOLTAG_TYPEDEF(no_dialog); 1231 1232 /**@def NTATAG_USE_TIMESTAMP(x) 1233 * 1234 * Use @Timestamp header. 1235 * 1236 * If set, a @Timestamp header would be added to stateful requests. The 1237 * header can be used to calculate the roundtrip transport latency between 1238 * client and server. 1239 * 1240 * @par Used with 1241 * nua_create(), 1242 * nta_agent_create(), 1243 * nta_agent_set_params(), 1244 * nta_outgoing_mcreate(), nta_outgoing_tcreate(), 1245 * nta_outgoing_tcancel(), and nta_outgoing_prack(). 1246 * 1247 * @par Parameter type 1248 * boolean: true (non-zero or non-NULL pointer) 1249 * or false (zero or NULL pointer) 1250 * 1251 * @par Values 1252 * - true - Add @Timestamp header 1253 * - false - do not add @Timestamp header 1254 * 1255 * @sa @RFC3261 section 8.2.6 1256 */ 1257 tag_typedef_t ntatag_use_timestamp = BOOLTAG_TYPEDEF(use_timestamp); 1258 1259 /**@def NTATAG_SIPFLAGS(x) 1260 * 1261 * Set SIP parser flags. 1262 * 1263 * The SIP parser flags affect how the messages are parsed and the result 1264 * presented to the application. They also control encoding of messages. 1265 * The most important flags are as follows: 1266 * - MSG_FLG_COMPACT - use compact form 1267 * (single-letter header names, minimum whitespace) 1268 * - MSG_FLG_EXTRACT_COPY - cache printable copy of headers when parsing. 1269 * Using this flag can speed up proxy processing considerably. It is 1270 * implied when the parsed messages are logged (because #TPORT_LOG 1271 * environment variable is set, or TPTAG_LOG() is used. 1272 * 1273 * @par Used with 1274 * nua_create(), nua_set_params(), 1275 * nta_agent_create(), nta_agent_set_params() 1276 * 1277 * @par Parameter type 1278 * unsigned int 1279 * 1280 * @par Values 1281 * - Bitwise OR of SIP parser flags (enum #msg_flg_user) 1282 * 1283 * @sa NTATAG_PRELOAD(), enum #msg_flg_user, sip_s::sip_flags 1284 */ 1285 tag_typedef_t ntatag_sipflags = UINTTAG_TYPEDEF(sipflags); 1286 1287 /**@def NTATAG_CLIENT_RPORT(x) 1288 * 1289 * Enable client-side "rport". 1290 * 1291 * This tag controls @RFC3581 support on client side. The "rport" parameter 1292 * is used when the response has to be routed symmetrically through a NAT box. 1293 * 1294 * The client-side support involves just adding the "rport" parameter to the topmost 1295 * @Via header before the request is sent. 1296 * 1297 * @note By default, the client "rport" is disabled when nta is used, and 1298 * enabled when nua is used. 1299 * 1300 * @par Used with 1301 * nua_create() (nua uses NTATAG_CLIENT_RPORT(1) by default) \n 1302 * nta_agent_create() \n 1303 * nta_agent_set_params() \n 1304 * 1305 * @par Parameter type 1306 * boolean: true (non-zero or non-NULL pointer) 1307 * or false (zero or NULL pointer) 1308 * 1309 * @par Values 1310 * - true - add "rport" parameter 1311 * - false - do not add "rport" parameter 1312 * 1313 * @note The NTATAG_RPORT() is a synonym for this. 1314 * 1315 * @sa @RFC3581, NTATAG_SERVER_RPORT(), NTATAG_TCP_RPORT(), NTATAG_TLS_RPORT(), @Via 1316 */ 1317 tag_typedef_t ntatag_client_rport = BOOLTAG_TYPEDEF(client_rport); 1318 1319 /**@def NTATAG_SERVER_RPORT(x) 1320 * 1321 * Use rport parameter at server. 1322 * 1323 * This tag controls @RFC3581 support on server side. The "rport" parameter 1324 * is used when the response has to be routed symmetrically through a NAT 1325 * box. 1326 * 1327 * If the topmost @Via header has an "rport" parameter, the server stores 1328 * the port number from which the request was sent in it. When sending the 1329 * response back to the client, the server uses the port number in the 1330 * "rport" parameter rather than the client-supplied port number in @Via 1331 * header. 1332 * 1333 * Note that on server-side the port number is stored regardless of the 1334 * transport protocol. (It is assumed that client supports rport if it 1335 * includes "rport" parameter in @Via field). 1336 * 1337 * @par Used with 1338 * nua_create(), nua_set_params(), 1339 * nta_agent_create(), nta_agent_set_params() 1340 * 1341 * @par Parameter type 1342 * boolean: true (non-zero or non-NULL pointer) 1343 * or false (zero or NULL pointer) 1344 * 1345 * @par Values 1346 * - 2 - add "rport" parameter even if was not present in request 1347 * - 1 - use "rport" parameter (default) 1348 * - 0 - do not use "rport" parameter 1349 * 1350 * @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_TCP_RPORT(), NTATAG_TLS_RPORT(), @Via 1351 * 1352 * @since Tag type and NTATAG_SERVER_RPORT(2) was added in @VERSION_1_12_9. 1353 */ 1354 tag_typedef_t ntatag_server_rport = INTTAG_TYPEDEF(server_rport); 1355 1356 1357 /**@def NTATAG_TCP_RPORT(x) 1358 * 1359 * Use rport with TCP, too. 1360 * 1361 * @par Used with 1362 * nua_create(), nua_set_params(), 1363 * nta_agent_create(), nta_agent_set_params() 1364 * 1365 * @par Parameter type 1366 * boolean: true (non-zero or non-NULL pointer) 1367 * or false (zero or NULL pointer) 1368 * 1369 * @par Values 1370 * - true - include rport parameter in the TCP via line on client side 1371 * - false - do not include rport parameter in the TCP via line on client side 1372 * 1373 * @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_SERVER_RPORT(), @Via 1374 */ 1375 tag_typedef_t ntatag_tcp_rport = BOOLTAG_TYPEDEF(tcp_rport); 1376 1377 /**@def NTATAG_TLS_RPORT(x) 1378 * 1379 * Use rport with TLS, too. 1380 * 1381 * @par Used with 1382 * nua_create(), nua_set_params(), 1383 * nta_agent_create(), nta_agent_set_params() 1384 * 1385 * @par Parameter type 1386 * boolean: true (non-zero or non-NULL pointer) 1387 * or false (zero or NULL pointer) 1388 * 1389 * @par Values 1390 * - true - include rport parameter in the TLS via line on client side 1391 * - false - do not include rport parameter in the TLS via line 1392 * on client side 1393 * 1394 * @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_SERVER_RPORT(), @Via 1395 * 1396 * @NEW_1_12_10 1397 */ 1398 tag_typedef_t ntatag_tls_rport = BOOLTAG_TYPEDEF(tls_rport); 1399 1400 /**@def NTATAG_TLS_ORQ_CONNECT_TIMEOUT(x) 1401 * 1402 * Connect Timeout for outgoing requests using TLS. 1403 * 1404 * @par Used with 1405 * nua_create(), nua_set_params(), 1406 * nta_agent_create(), nta_agent_set_params() 1407 * 1408 * @par Parameter type 1409 * unsigned 1410 * 1411 * @par Values 1412 * - 0 - Disabled 1413 * - value - Milliseconds 1414 * 1415 * @NEW_1_13_2 1416 */ 1417 tag_typedef_t ntatag_tls_orq_connect_timeout = UINTTAG_TYPEDEF(tls_orq_connect_timeout); 1418 1419 /**@def NTATAG_PRELOAD(x) 1420 * 1421 * Preload by N bytes. 1422 * 1423 * When the memory block is allocated for an incoming request by the stack, 1424 * the stack can allocate some extra memory for the parser in addition to 1425 * the memory used by the actual message contents. 1426 * 1427 * While wasting some memory, this can speed up parsing considerably. 1428 * Recommended amount of preloading per packet is 1500 bytes. 1429 * 1430 * @par Used with 1431 * nua_create(), nua_set_params(), 1432 * nta_agent_create(), nta_agent_set_params() 1433 * 1434 * @par Parameter type 1435 * unsigned 1436 * 1437 * @par Values 1438 * Amount of extra per-message memory allocated for parser. 1439 * 1440 * @sa NTATAG_SIPFLAGS() and #MSG_FLG_EXTRACT_COPY 1441 */ 1442 tag_typedef_t ntatag_preload = UINTTAG_TYPEDEF(preload); 1443 1444 /**@def NTATAG_USE_NAPTR(x) 1445 * 1446 * If true, try to use NAPTR records when resolving. 1447 * 1448 * The application can disable NTA from using NAPTR records when resolving 1449 * SIP URIs. 1450 * 1451 * @par Used with 1452 * nua_create(), nua_set_params(), 1453 * nta_agent_create(), nta_agent_set_params() 1454 * 1455 * @par Parameter type 1456 * boolean: true (non-zero or non-NULL pointer) 1457 * or false (zero or NULL pointer) 1458 * 1459 * @par Values 1460 * - true - enable NAPTR resolving 1461 * - false - disable NAPTR resolving 1462 * 1463 * @bug NAPTRs are not used with SIPS URIs in any case. 1464 * 1465 * @sa @RFC3263, NTATAG_USE_SRV() 1466 */ 1467 tag_typedef_t ntatag_use_naptr = BOOLTAG_TYPEDEF(naptr); 1468 1469 /**@def NTATAG_USE_SRV(x) 1470 * 1471 * If true, try to use SRV records when resolving. 1472 * 1473 * The application can disable NTA from using SRV records when resolving 1474 * SIP URIs. 1475 * 1476 * @par Used with 1477 * nua_create(), nua_set_params(), 1478 * nta_agent_create(), nta_agent_set_params() 1479 * 1480 * @par Parameter type 1481 * boolean: true (non-zero or non-NULL pointer) 1482 * or false (zero or NULL pointer) 1483 * 1484 * @par Values 1485 * - true - enable SRV resolving 1486 * - false - disable SRV resolving 1487 * 1488 * @sa @RFC3263, NTATAG_USE_NAPTR() 1489 */ 1490 tag_typedef_t ntatag_use_srv = BOOLTAG_TYPEDEF(srv); 1491 1492 /**@def NTATAG_SRV_503(x) 1493 * 1494 * If true, try to use another destination from SRV records on 503 response. RFC3263 1495 * 1496 * The application can disable NTA from using a new route after 503 1497 * 1498 * @par Used with 1499 * nua_create(), nua_set_params(), agent_recv_response(), 1500 * nta_agent_create(), nta_agent_set_params() 1501 * 1502 * @par Parameter type 1503 * boolean: true (non-zero or non-NULL pointer) 1504 * or false (zero or NULL pointer) 1505 * 1506 * @par Values 1507 * - true - enable new destination on 503 1508 * - false - still use the same destination after timeout 1509 * 1510 * @sa @RFC3263 1511 */ 1512 tag_typedef_t ntatag_srv_503 = BOOLTAG_TYPEDEF(srv_503); 1513 1514 1515 /**@def NTATAG_RSEQ(x) 1516 * 1517 * @RSeq value for nta_outgoing_prack(). 1518 * 1519 * @par Used with 1520 * nta_outgoing_prack() 1521 * 1522 * @par Parameter type 1523 * @c unsigned @c int 1524 * 1525 * @par Values 1526 * Response sequence number from the @RSeq header. 1527 */ 1528 tag_typedef_t ntatag_rseq = UINTTAG_TYPEDEF(rseq); 1529 1530 /* Status */ 1531 1532 /**@def NTATAG_S_IRQ_HASH_REF(x) 1533 * 1534 * Get size of hash table for server-side transactions. 1535 * 1536 * Return number of transactions that fit in the hash table for server-side 1537 * transactions. 1538 * 1539 * @sa nta_agent_get_stats(), NTATAG_S_IRQ_HASH_USED_REF(), 1540 * NTATAG_S_ORQ_HASH_REFxs(), NTATAG_S_LEG_HASH_REF() 1541 */ 1542 tag_typedef_t ntatag_s_irq_hash = USIZETAG_TYPEDEF(s_irq_hash); 1543 1544 /**@def NTATAG_S_ORQ_HASH_REF(x) 1545 * 1546 * Get size of hash table for client-side transactions. 1547 * 1548 * Return number of transactions that fit in the hash table for client-side 1549 * transactions. 1550 * 1551 * @sa nta_agent_get_stats(), NTATAG_S_ORQ_HASH_USED_REF(), 1552 * NTATAG_S_IRQ_HASH_REF(), NTATAG_S_LEG_HASH_REF() 1553 */ 1554 tag_typedef_t ntatag_s_orq_hash = USIZETAG_TYPEDEF(s_orq_hash); 1555 1556 /**@def NTATAG_S_LEG_HASH_REF(x) 1557 * 1558 * Get size of hash table for dialogs. 1559 * 1560 * Return number of dialog objects that fit in the hash table for dialogs. 1561 * 1562 * @sa nta_agent_get_stats(), NTATAG_S_LEG_HASH_USED_REF(), 1563 * NTATAG_S_IRQ_HASH_REF(), NTATAG_S_ORQ_HASH_REF() 1564 */ 1565 tag_typedef_t ntatag_s_leg_hash = USIZETAG_TYPEDEF(s_leg_hash); 1566 1567 /**@def NTATAG_S_IRQ_HASH_USED_REF(x) 1568 * 1569 * Get number of server-side transactions in the hash table. 1570 * 1571 * Return number of server-side transactions objects in the hash table. The 1572 * number includes all transactions destroyed by the application which have 1573 * not expired yet. 1574 * 1575 * @sa nta_agent_get_stats(), NTATAG_S_IRQ_HASH_REF(), 1576 * NTATAG_S_ORQ_HASH_USED_REF(), NTATAG_S_LEG_HASH_USED_REF() 1577 */ 1578 /**@def NTATAG_S_IRQ_HASH_USED_REF(x) 1579 * 1580 * Get number of server-side transactions in the hash table. 1581 * 1582 * Return number of server-side transactions objects in the hash table. The 1583 * number includes all transactions destroyed by the application which have 1584 * not expired yet. 1585 * 1586 * @sa nta_agent_get_stats(), NTATAG_S_IRQ_HASH_REF(), 1587 * NTATAG_S_ORQ_HASH_USED_REF(), NTATAG_S_LEG_HASH_USED_REF() 1588 */ 1589 tag_typedef_t ntatag_s_irq_hash_used = USIZETAG_TYPEDEF(s_irq_hash_used); 1590 1591 /**@def NTATAG_S_ORQ_HASH_USED_REF(x) 1592 * 1593 * Get number of client-side transactions in the hash table. 1594 * 1595 * Return number of client-side transactions objects in the hash table. The 1596 * number includes all transactions destroyed by the application which have 1597 * not expired yet. 1598 * 1599 * @sa nta_agent_get_stats(), NTATAG_S_ORQ_HASH_REF(), 1600 * NTATAG_S_IRQ_HASH_USED_REF(), NTATAG_S_LEG_HASH_USED_REF() 1601 */ 1602 tag_typedef_t ntatag_s_orq_hash_used = USIZETAG_TYPEDEF(s_orq_hash_used); 1603 1604 /**@def NTATAG_S_LEG_HASH_USED_REF(x) 1605 * 1606 * Get number of dialogs in the hash table. 1607 * 1608 * Return number of dialog objects in the hash table. Note that the 1609 * nta_leg_t objects created with NTATAG_NO_DIALOG(1) and this not 1610 * corresponding to a dialog are not included in the number. 1611 * 1612 * @sa nta_agent_get_stats(), NTATAG_S_LEG_HASH_REF(), 1613 * NTATAG_S_IRQ_HASH_USED_REF(), NTATAG_S_ORQ_HASH_USED_REF() 1614 */ 1615 tag_typedef_t ntatag_s_leg_hash_used = USIZETAG_TYPEDEF(s_leg_hash_used); 1616 1617 /**@def NTATAG_S_RECV_MSG_REF(x) 1618 * 1619 * Get number of SIP messages received. 1620 * 1621 * Return number SIP messages that has been received. The number includes 1622 * also bad and unparsable messages. 1623 * 1624 * @sa nta_agent_get_stats(), NTATAG_S_BAD_MESSAGE_REF(), 1625 * NTATAG_S_RECV_REQUEST_REF(), NTATAG_S_RECV_RESPONSE_REF() 1626 */ 1627 tag_typedef_t ntatag_s_recv_msg = USIZETAG_TYPEDEF(s_recv_msg); 1628 1629 /**@def NTATAG_S_RECV_REQUEST_REF(x) 1630 * 1631 * Get number of SIP requests received. 1632 * 1633 * Return number SIP requests that has been received. The number includes 1634 * also number of bad requests available with NTATAG_S_BAD_REQUEST_REF(). 1635 * 1636 * @sa nta_agent_get_stats(), NTATAG_S_BAD_REQUEST_REF(), 1637 * NTATAG_S_RECV_MSG_REF(), NTATAG_S_RECV_RESPONSE_REF() 1638 */ 1639 tag_typedef_t ntatag_s_recv_request = USIZETAG_TYPEDEF(s_recv_request); 1640 1641 /**@def NTATAG_S_RECV_RESPONSE_REF(x) 1642 * 1643 * Get number of SIP responses received. 1644 * 1645 * Return number SIP responses that has been received. The number includes 1646 * also number of bad and unusable responses available with 1647 * NTATAG_S_BAD_RESPONSE_REF(). 1648 * 1649 * @sa nta_agent_get_stats(), NTATAG_S_BAD_RESPONSE_REF(), 1650 * NTATAG_S_RECV_MSG_REF(), NTATAG_S_RECV_REQUEST_REF() 1651 */ 1652 tag_typedef_t ntatag_s_recv_response = USIZETAG_TYPEDEF(s_recv_response); 1653 1654 /**@def NTATAG_S_BAD_MESSAGE_REF(x) 1655 * 1656 * Get number of bad SIP messages received. 1657 * 1658 * Return number of bad SIP messages that has been received. 1659 * 1660 * @sa nta_agent_get_stats(), NTATAG_S_RECV_MSG_REF(), 1661 * NTATAG_S_BAD_REQUEST_REF(), NTATAG_S_BAD_RESPONSE_REF(). 1662 */ 1663 tag_typedef_t ntatag_s_bad_message = USIZETAG_TYPEDEF(s_bad_message); 1664 1665 /**@def NTATAG_S_BAD_REQUEST_REF(x) 1666 * 1667 * Get number of bad SIP requests received. 1668 * 1669 * Return number of bad SIP requests that has been received. 1670 * 1671 * @sa nta_agent_get_stats(), NTATAG_S_BAD_MESSAGE_REF(), 1672 * NTATAG_S_BAD_RESPONSE_REF(). 1673 */ 1674 tag_typedef_t ntatag_s_bad_request = USIZETAG_TYPEDEF(s_bad_request); 1675 1676 /**@def NTATAG_S_BAD_RESPONSE_REF(x) 1677 * 1678 * Get number of bad SIP responses received. 1679 * 1680 * Return number of bad SIP responses that has been received. 1681 * 1682 * @sa nta_agent_get_stats(), NTATAG_S_BAD_MESSAGE_REF(), 1683 * NTATAG_S_BAD_REQUEST_REF() 1684 */ 1685 tag_typedef_t ntatag_s_bad_response = USIZETAG_TYPEDEF(s_bad_response); 1686 1687 /**@def NTATAG_S_DROP_REQUEST_REF(x) 1688 * 1689 * Get number of SIP requests dropped. 1690 * 1691 * Return number of SIP requests that has been randomly dropped after 1692 * receiving them because of NTATAG_DEBUG_DROP_PROB() has been set. 1693 * 1694 * @sa nta_agent_get_stats(), NTATAG_DEBUG_DROP_PROB(), 1695 * NTATAG_S_DROP_RESPONSE_REF() 1696 * 1697 * @note The value was not calculated before @VERSION_1_12_7. 1698 */ 1699 tag_typedef_t ntatag_s_drop_request = USIZETAG_TYPEDEF(s_drop_request); 1700 1701 /**@def NTATAG_S_DROP_RESPONSE_REF(x) 1702 * 1703 * Get number of SIP responses dropped. 1704 * 1705 * Return number of SIP responses that has been randomly dropped after 1706 * receiving them because of NTATAG_DEBUG_DROP_PROB() has been set. 1707 * 1708 * @sa nta_agent_get_stats(), NTATAG_DEBUG_DROP_PROB(), 1709 * NTATAG_S_DROP_REQUEST_REF() 1710 * 1711 * @note The value was not calculated before @VERSION_1_12_7. 1712 */ 1713 tag_typedef_t ntatag_s_drop_response = USIZETAG_TYPEDEF(s_drop_response); 1714 1715 /**@def NTATAG_S_CLIENT_TR_REF(x) 1716 * 1717 * Get number of client transactions created. 1718 * 1719 * Return number of client transactions created. The number also includes 1720 * client transactions with which stack failed to send the request because 1721 * the DNS resolving failed or the transport failed. 1722 * 1723 * @note The number include stateless requests sent with nta_msg_tsend(), 1724 * too. 1725 * 1726 * @sa nta_agent_get_stats(), NTATAG_S_SENT_REQUEST_REF(), 1727 * NTATAG_S_SERVER_TR_REF(). 1728 */ 1729 tag_typedef_t ntatag_s_client_tr = USIZETAG_TYPEDEF(s_client_tr); 1730 1731 /**@def NTATAG_S_SERVER_TR_REF(x) 1732 * 1733 * Get number of server transactions created. 1734 * 1735 * Return number of server transactions created. 1736 * 1737 * @sa nta_agent_get_stats(), NTATAG_S_RECV_RESPONSE_REF(), 1738 * NTATAG_S_CLIENT_TR_REF(), NTATAG_S_DIALOG_TR_REF(), 1739 */ 1740 tag_typedef_t ntatag_s_server_tr = USIZETAG_TYPEDEF(s_server_tr); 1741 1742 /**@def NTATAG_S_DIALOG_TR_REF(x) 1743 * 1744 * Get number of in-dialog server transactions created. 1745 * 1746 * Return number of in-dialog server transactions created. The number 1747 * includes only those transactions that were correlated with a dialog 1748 * object. 1749 * 1750 * @sa nta_agent_get_stats(), NTATAG_S_SERVER_TR_REF(), 1751 * NTATAG_S_CLIENT_TR_REF(), NTATAG_S_RECV_RESPONSE_REF(). 1752 */ 1753 tag_typedef_t ntatag_s_dialog_tr = USIZETAG_TYPEDEF(s_dialog_tr); 1754 1755 /**@def NTATAG_S_ACKED_TR_REF(x) 1756 * 1757 * Get number of server transactions that have received ACK. 1758 * 1759 * Return number of INVITE server transactions for which an ACK request has 1760 * been received. 1761 * 1762 * @sa nta_agent_get_stats(), NTATAG_S_SERVER_TR_REF(), 1763 * NTATAG_S_CANCELED_TR_REF() 1764 */ 1765 tag_typedef_t ntatag_s_acked_tr = USIZETAG_TYPEDEF(s_acked_tr); 1766 1767 /**@def NTATAG_S_CANCELED_TR_REF(x) 1768 * 1769 * Get number of server transactions that have been CANCELed. 1770 * 1771 * Return number of server transactions for which an CANCEL request has been 1772 * received. Currently, the count includes only INVITE server transactions 1773 * that have been CANCELed. 1774 * 1775 * @sa nta_agent_get_stats(), NTATAG_S_SERVER_TR_REF(), 1776 * NTATAG_S_ACKED_TR_REF(). 1777 */ 1778 tag_typedef_t ntatag_s_canceled_tr = USIZETAG_TYPEDEF(s_canceled_tr); 1779 1780 /**@def NTATAG_S_TRLESS_REQUEST_REF(x) 1781 * 1782 * Get number of requests that were processed stateless. 1783 * 1784 * Return number of received requests that were processed statelessly, 1785 * either with #nta_message_f message callback given with the 1786 * nta_agent_create() or, missing the callback, by returning a <i>501 Not 1787 * Implemented</i> response to the request. 1788 * 1789 * @sa nta_agent_get_stats(), <sofia-sip/nta_stateless.h>, 1790 * nta_agent_create(), #nta_message_f, NTATAG_S_TRLESS_TO_TR_REF(), 1791 * NTATAG_S_TRLESS_RESPONSE_REF() 1792 */ 1793 tag_typedef_t ntatag_s_trless_request = USIZETAG_TYPEDEF(s_trless_request); 1794 1795 /**@def NTATAG_S_TRLESS_TO_TR_REF(x) 1796 * 1797 * Get number of requests converted to transactions by message callback. 1798 * 1799 * Return number of requests that were converted to a server transaction 1800 * with nta_incoming_create(). 1801 * 1802 * @sa nta_agent_get_stats(), nta_incoming_create(), nta_agent_create(), 1803 * #nta_message_f, NTATAG_S_TRLESS_REQUEST_REF() 1804 */ 1805 tag_typedef_t ntatag_s_trless_to_tr = USIZETAG_TYPEDEF(s_trless_to_tr); 1806 1807 /**@def NTATAG_S_TRLESS_RESPONSE_REF(x) 1808 * 1809 * Get number of responses without matching request. 1810 * 1811 * Return number of received responses for which no matching client 1812 * transaction was found. Such responses are processed either by the 1813 * client transaction created with nta_outgoing_default(), the 1814 * #nta_message_f message callback given to nta_agent_create(), or, missing 1815 * both the default client transaction and message callback, they are 1816 * silently discarded. 1817 * 1818 * The NTATAG_S_TRLESS_200_REF() counter counts those successful 2XX 1819 * responses to the INVITE without client transaction which are silently 1820 * discarded. 1821 * 1822 * @sa nta_agent_get_stats(), nta_outgoing_default(), nta_agent_create(), 1823 * <sofia-sip/nta_stateless.h>, #nta_message_f, nta_msg_ackbye(), 1824 * NTATAG_S_TRLESS_REQUEST_REF(), NTATAG_S_TRLESS_200_REF(). 1825 */ 1826 tag_typedef_t ntatag_s_trless_response = USIZETAG_TYPEDEF(s_trless_response); 1827 1828 /**@def NTATAG_S_TRLESS_200_REF(x) 1829 * 1830 * Get number of successful responses missing INVITE client transaction. 1831 * 1832 * Return number of received 2XX responses to INVITE transaction for which 1833 * no matching client transaction was found nor which were processed by a 1834 * default client transaction created with nta_outgoing_default() or 1835 * #nta_message_f message callback given to nta_agent_create(). 1836 * 1837 * @sa nta_agent_get_stats(), nta_outgoing_default(), nta_agent_create(), 1838 * <sofia-sip/nta_stateless.h>, #nta_message_f, nta_msg_ackbye(), 1839 * NTATAG_S_TRLESS_RESPONSE_REF(). 1840 */ 1841 tag_typedef_t ntatag_s_trless_200 = USIZETAG_TYPEDEF(s_trless_200); 1842 1843 /**@def NTATAG_S_MERGED_REQUEST_REF(x) 1844 * 1845 * Get number of requests merged by UAS. 1846 * 1847 * Return number of requests for which UAS already has returned a response 1848 * and which were merged (that is, returned a <i>482 Request Merged</i> 1849 * response). 1850 * 1851 * @sa nta_agent_get_stats(), NTATAG_UA(1), @RFC3261 section 8.2.2.2 1852 */ 1853 tag_typedef_t ntatag_s_merged_request = USIZETAG_TYPEDEF(s_merged_request); 1854 1855 /**@def NTATAG_S_SENT_MSG_REF(x) 1856 * 1857 * Get number of SIP messages sent by stack. 1858 * 1859 * Return number of SIP messages given to the transport layer for 1860 * transmission by the SIP stack. The number includes also messages which 1861 * the transport layer failed to send for different reasons. 1862 * 1863 * @sa nta_agent_get_stats(), NTATAG_S_RECV_MSG_REF(), 1864 * NTATAG_S_SENT_REQUEST_REF(), NTATAG_S_SENT_RESPONSE_REF() 1865 */ 1866 tag_typedef_t ntatag_s_sent_msg = USIZETAG_TYPEDEF(s_sent_msg); 1867 1868 /**@def NTATAG_S_SENT_REQUEST_REF(x) 1869 * 1870 * Get number of SIP requests sent by stack. 1871 * 1872 * Return number of SIP requests given to the transport layer for 1873 * transmission by the SIP stack. The number includes retransmissions and 1874 * messages which the transport layer failed to send for different reasons. 1875 * 1876 * @sa nta_agent_get_stats(), NTATAG_S_RECV_REQUEST_REF(), 1877 * NTATAG_S_SENT_MSG_REF(), NTATAG_S_SENT_RESPONSE_REF() 1878 */ 1879 tag_typedef_t ntatag_s_sent_request = USIZETAG_TYPEDEF(s_sent_request); 1880 1881 /**@def NTATAG_S_SENT_RESPONSE_REF(x) 1882 * 1883 * Get number of SIP responses sent by stack. 1884 * 1885 * Return number of SIP responses given to the transport layer for 1886 * transmission by the SIP stack. The number includes retransmissions and 1887 * messages which the transport layer failed to send for different reasons. 1888 * 1889 * @sa nta_agent_get_stats(), NTATAG_S_RECV_RESPONSE_REF(), 1890 * NTATAG_S_SENT_MSG_REF(), NTATAG_S_SENT_REQUEST_REF() 1891 */ 1892 tag_typedef_t ntatag_s_sent_response = USIZETAG_TYPEDEF(s_sent_response); 1893 1894 /**@def NTATAG_S_RETRY_REQUEST_REF(x) 1895 * 1896 * Get number of SIP requests retransmitted by stack. 1897 * 1898 * Return number of SIP requests given to the transport layer for 1899 * retransmission by the SIP stack. The number includes messages which the 1900 * transport layer failed to send for different reasons. 1901 * 1902 * @sa nta_agent_get_stats(), NTATAG_S_SENT_MSG_REF(), 1903 * NTATAG_S_SENT_REQUEST_REF(), NTATAG_S_RETRY_RESPONSE_REF() 1904 */ 1905 tag_typedef_t ntatag_s_retry_request = USIZETAG_TYPEDEF(s_retry_request); 1906 1907 /**@def NTATAG_S_RETRY_RESPONSE_REF(x) 1908 * 1909 * Get number of SIP responses retransmitted by stack. 1910 * 1911 * Return number of SIP responses given to the transport layer for 1912 * retransmission by the SIP stack. The number includes messages which the 1913 * transport layer failed to send for different reasons. 1914 * 1915 * @sa nta_agent_get_stats(), NTATAG_S_SENT_MSG_REF(), 1916 * NTATAG_S_SENT_REQUEST_REF(), NTATAG_S_RETRY_REQUEST_REF() 1917 */ 1918 tag_typedef_t ntatag_s_retry_response = USIZETAG_TYPEDEF(s_retry_response); 1919 1920 /**@def NTATAG_S_RECV_RETRY_REF(x) 1921 * 1922 * Get number of retransmitted SIP requests received by stack. 1923 * 1924 * Return number of SIP requests received by the stack. This number only 1925 * includes retransmission for which a matching server transaction object 1926 * was found. 1927 * 1928 * @sa nta_agent_get_stats(), NTATAG_S_RETRY_REQUEST_REF(). 1929 */ 1930 tag_typedef_t ntatag_s_recv_retry = USIZETAG_TYPEDEF(s_recv_retry); 1931 1932 /**@def NTATAG_S_TOUT_REQUEST_REF(x) 1933 * 1934 * Get number of SIP client transactions that has timeout. 1935 * 1936 * Return number of SIP client transactions that has timeout. 1937 * 1938 * @sa nta_agent_get_stats(), NTATAG_S_TOUT_RESPONSE_REF(). 1939 */ 1940 tag_typedef_t ntatag_s_tout_request = USIZETAG_TYPEDEF(s_tout_request); 1941 1942 /**@def NTATAG_S_TOUT_RESPONSE_REF(x) 1943 * 1944 * Get number of SIP server transactions that has timeout. 1945 * 1946 * Return number of SIP server transactions that has timeout. The number 1947 * includes only the INVITE transactions for which the stack has received no 1948 * ACK requests. 1949 * 1950 * @sa nta_agent_get_stats(), NTATAG_S_TOUT_REQUEST_REF(). 1951 */ 1952 tag_typedef_t ntatag_s_tout_response = USIZETAG_TYPEDEF(s_tout_response); 1953 1954 /* Internal */ 1955 tag_typedef_t ntatag_delay_sending = BOOLTAG_TYPEDEF(delay_sending); 1956 tag_typedef_t ntatag_incomplete = BOOLTAG_TYPEDEF(incomplete); 1957 1958 1959 tag_typedef_t ntatag_q_in_completed = SIZETAG_TYPEDEF(q_in_completed); 1960 tag_typedef_t ntatag_q_in_final_failed = SIZETAG_TYPEDEF(q_in_final_failed); 1961 tag_typedef_t ntatag_q_in_inv_completed = SIZETAG_TYPEDEF(q_in_inv_completed); 1962 tag_typedef_t ntatag_q_in_inv_confirmed = SIZETAG_TYPEDEF(q_in_inv_confirmed); 1963 tag_typedef_t ntatag_q_in_preliminary = SIZETAG_TYPEDEF(q_in_preliminary); 1964 tag_typedef_t ntatag_q_in_proceeding = SIZETAG_TYPEDEF(q_in_proceeding); 1965 tag_typedef_t ntatag_q_in_terminated = SIZETAG_TYPEDEF(q_in_terminated); 1966 1967 tag_typedef_t ntatag_q_out_completed = SIZETAG_TYPEDEF(q_out_completed); 1968 tag_typedef_t ntatag_q_out_delayed = SIZETAG_TYPEDEF(q_out_delayed); 1969 tag_typedef_t ntatag_q_out_inv_calling = SIZETAG_TYPEDEF(q_out_inv_calling); 1970 tag_typedef_t ntatag_q_out_inv_completed = SIZETAG_TYPEDEF(q_out_inv_completed); 1971 tag_typedef_t ntatag_q_out_inv_proceeding = SIZETAG_TYPEDEF(q_out_inv_proceeding); 1972 tag_typedef_t ntatag_q_out_resolving = SIZETAG_TYPEDEF(q_out_resolving); 1973 tag_typedef_t ntatag_q_out_terminated = SIZETAG_TYPEDEF(q_out_terminated); 1974