nua_tag.c 79.5 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5 6 7
/*
 * This file is part of the Sofia-SIP package
 *
 * Copyright (C) 2005 Nokia Corporation.
 *
 * Contact: Pekka Pessi <pekka.pessi@nokia.com>
 *
8
 * This library is free software; you can redistribute it and/or
Pekka Pessi's avatar
Pekka Pessi committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

/**@CFILE nua_tag.c  Tags and tag lists for NUA
 *
 * @author Pekka Pessi <Pekka.Pessi@nokia.com>
28
 * @author Martti Mela <Martti.Mela@nokia.com>
Pekka Pessi's avatar
Pekka Pessi committed
29 30 31 32 33 34 35 36
 *
 * @date Created: Wed Feb 21 10:13:29 2001 ppessi
 */

#include "config.h"

#define TAG_NAMESPACE "nua"

37
#include "sofia-sip/nua_tag.h"
Pekka Pessi's avatar
Pekka Pessi committed
38

39 40 41 42 43
#include <sofia-sip/msg_header.h>
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/url_tag_class.h>
#include <sofia-sip/sip_tag_class.h>
#include <sofia-sip/sip_hclasses.h>
Pekka Pessi's avatar
Pekka Pessi committed
44

Pekka Pessi's avatar
Pekka Pessi committed
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
/** @page nua_api_overview NUA API Overview
 *
 * This page shortly overviews the NUA API: different functions, tags, and
 * where and how they affect the working of NUA engine.
 *
 * The application and the NUA engine can pass various parameters between
 * them using tagged arguments. Tagged arguments can be used like named
 * arguments in higher-lever language.
 *
 * @par NUA Agent
 *
 * The NUA agent object is created with nua_create(). The nua_create() also
 * creates the transports and binds the transport sockets used by the SIP
 * stack.
 *
 * The special tags controlling the transports are
 * - NUTAG_URL(), NUTAG_SIPS_URL(),  NUTAG_CERTIFICATE_DIR(), NUTAG_SIP_PARSER()
 *
 * See nta_agent_add_tport() for discussion about magic URIs used to
 * initialize transports.
 *
 * The agent-wide parameter can be later modified or obtained with
 * nua_set_params() and nua_get_params(), respectively.
 *
 * The #su_root_t mainloop integration uses
 * - su_root_create(), su_root_threading(),
 *   su_root_poll(), su_root_run(), su_root_break()
 *
 * @par NUA Handles
 * - nua_handle(), nua_get_hparams(), nua_set_hparams()
 * - nua_handle_home(), nua_handle_has_invite(), nua_handle_has_subscribe(),
 *   nua_handle_has_register(), nua_handle_has_active_call(),
 *   nua_handle_has_call_on_hold(), nua_handle_has_events(),
 *   nua_handle_has_registrations(), nua_handle_remote(), and
 *   nua_handle_local().
 * - Settings:
 *   See nua_set_hparams(). There are a few "sticky" headers that are used
 *   on subsequent requests if given on any handle-specific call:
 *   - @Contact, @UserAgent, @Supported, @Allow, @Organization
 *
 * @par Client Generating SIP Requests
 * - nua_register(), nua_unregister(), nua_invite(), nua_cancel(),
 *   nua_ack(), nua_bye(), nua_options(), nua_refer(), nua_publish(),
 *   nua_unpublish(), nua_prack(), nua_info(), nua_update(), nua_message(),
 *   nua_subscribe(), nua_unsubscribe(), nua_notify(), nua_method()
 * - NUTAG_URL()
 *  Settings:
 * - NUTAG_RETRY_COUNT(), NUTAG_PROXY(),
 *   NUTAG_INITIAL_ROUTE() and NUTAG_INITIAL_ROUTE_STR()
 * - NUTAG_ALLOW(), SIPTAG_ALLOW(), and SIPTAG_ALLOW_STR()
 * - NUTAG_SUPPORTED(), SIPTAG_SUPPORTED(), and SIPTAG_SUPPORTED_STR()
 * - NUTAG_USER_AGENT(), SIPTAG_USER_AGENT() and SIPTAG_USER_AGENT_STR()
 * - SIPTAG_ORGANIZATION() and SIPTAG_ORGANIZATION_STR()
 *
 * @par Client Authenticating Requests
 * - nua_authenticate(), #nua_r_authenticate
 * - NUTAG_AUTH(), NUTAG_AUTH_CACHE()
 *
 * @par Server Processing Received SIP Requests
 * - nua_respond(), NUTAG_WITH_THIS(), NUTAG_WITH_SAVED(), NUTAG_WITH()
 * - #nua_i_invite, #nua_i_cancel, #nua_i_ack, #nua_i_bye,
 *   #nua_i_options, #nua_i_refer, #nua_i_publish, #nua_i_prack,
 *   #nua_i_info, #nua_i_update, #nua_i_message, #nua_i_subscribe,
 *   #nua_i_notify, #nua_i_method, #nua_i_register
 *  Settings:
110
 * - NUTAG_APPL_METHOD(), NUTAG_PROXY()
Pekka Pessi's avatar
Pekka Pessi committed
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
 * - NUTAG_ALLOW(), SIPTAG_ALLOW(), and SIPTAG_ALLOW_STR()
 * - NUTAG_SUPPORTED(), SIPTAG_SUPPORTED(), and SIPTAG_SUPPORTED_STR()
 *
 * @par Registrations and Contact Header Generation
 * - nua_register(), #nua_r_register(), #nua_i_outbound,
 *   nua_unregister(), and #nua_r_unregister
 * Settings:
 * - NUTAG_CALLEE_CAPS()
 * - NUTAG_DETECT_NETWORK_UPDATES()
 * - NUTAG_INSTANCE()
 * - NUTAG_KEEPALIVE()
 * - NUTAG_KEEPALIVE_STREAM()
 * - NUTAG_M_DISPLAY()
 * - NUTAG_M_FEATURES()
 * - NUTAG_M_PARAMS()
 * - NUTAG_M_USERNAME()
 * - NUTAG_OUTBOUND()
 * - NUTAG_PATH_ENABLE()
 * - NUTAG_SERVICE_ROUTE_ENABLE()
 * Specifications:
 * - @RFC3261 section 10, @RFC3327, @RFC3608, @RFC3680, @RFC3840,
 *   draft-ietf-sip-outbound, draft-ietf-sip-gruu-14
 *
 * @par INVITE Sessions and Call Model
 * - nua_invite(), #nua_r_invite, #nua_i_invite
 * - nua_handle_has_active_call(), nua_handle_has_call_on_hold(),
 *   nua_handle_has_invite()
 * - nua_cancel(), #nua_r_cancel, #nua_i_cancel
 * - nua_ack(), #nua_i_ack
 * - nua_bye(), #nua_r_bye, #nua_i_bye
 * - #nua_i_state, NUTAG_CALLSTATE(),
 *   NUTAG_OFFER_SENT(), NUTAG_OFFER_RECV(), NUTAG_ANSWER_RECV(), and
 *   NUTAG_ANSWER_SENT(), SOATAG_REMOTE_SDP(), SOATAG_REMOTE_SDP_STR(),
 *   SOATAG_LOCAL_SDP(), SOATAG_LOCAL_SDP_STR()
 *  Settings:
 * - NUTAG_AUTOACK(), NUTAG_AUTOALERT(), NUTAG_AUTOANSWER(),
 *   NUTAG_ENABLEINVITE(), NUTAG_INVITE_TIMER(), NUTAG_MEDIA_ENABLE(),
 *   SOATAG_USER_SDP(), SOATAG_USER_SDP_STR(), SOATAG_CAPS_SDP(),
 *   SOATAG_CAPS_SDP_STR()
 * Specifications:
 * - @RFC3261, @RFC3264
 *
 * @par In-Session Information requests
 * - nua_info() #nua_r_info, #nua_i_info
 * Settings:
 * - NUTAG_ALLOW("INFO"), NUTAG_APPL_METHOD("INFO")
 *
 * @par SDP Processing
 * - #nua_i_state, SOATAG_ACTIVE_AUDIO(), SOATAG_ACTIVE_VIDEO(),
 *   SOATAG_ACTIVE_IMAGE(), SOATAG_ACTIVE_CHAT(),
 *   SOATAG_REMOTE_SDP(), SOATAG_REMOTE_SDP_STR(),
 *   SOATAG_LOCAL_SDP(), SOATAG_LOCAL_SDP_STR()
 * Settings:
 * - NUTAG_MEDIA_ENABLE(), NUTAG_SOA_NAME(), NUTAG_EARLY_ANSWER(),
 *   SOATAG_USER_SDP(), SOATAG_USER_SDP_STR(), SOATAG_CAPS_SDP(),
 *   SOATAG_CAPS_SDP_STR()
 * Specifications:
 * - @RFC3264
 *
 * @par Call Model Extensions ("100rel" and "precondition")
 * Early
 * - nua_prack(), #nua_r_prack, #nua_i_prack
 * - nua_update() #nua_r_update, #nua_i_update
 * Settings:
 * - NUTAG_EARLY_MEDIA(), NUTAG_ONLY183_100REL()
 * - "100rel" or "precondition" in NUTAG_SUPPORTED()/SIPTAG_SUPPORTED()
 * Specifications:
 * - @RFC3262, @RFC3311, @RFC3312
 *
 * @par SIP Session Timers ("timer")
 * Periodic refresh of SIP Session initiated with INVITE with re-INVITE or
 * UPDATE requests.
 * Settings:
 * - NUTAG_MIN_SE(), NUTAG_SESSION_REFRESHER(),
185 186
 *   NUTAG_SESSION_TIMER(), NUTAG_UPDATE_REFRESH(),
 *   NUTAG_REFRESH_WITHOUT_SDP(),
Pekka Pessi's avatar
Pekka Pessi committed
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
 * - "timer" in NUTAG_SUPPORTED()/SIPTAG_SUPPORTED()
 * Specifications:
 * - @RFC4028
 *
 * @par Caller Preferences and Callee Caps
 * - Caller preferences in @AcceptContact header in a INVITE requests
 * - Callee caps contained in @Contact header in a REGISTER request
 * Settings:
 * - NUTAG_CALLEE_CAPS(), NUTAG_MEDIA_FEATURES(),
 *   NUTAG_M_FEATURES()
 * Specifications:
 * - @RFC3840, @RFC3841
 *
 * @par Instant Messaging
 * - nua_message(), #nua_r_message, #nua_i_message
 * Settings:
 * - NUTAG_APPL_METHOD("MESSAGE"),
 *   NUTAG_ENABLEMESSAGE(), NUTAG_ENABLEMESSENGER()
 * Specifications:
 * - @RFC3428
 *
 * @par Call Transfer
 * - nua_refer(), #nua_r_refer, #nua_i_notify, SIPTAG_EVENT(),
 *   @ReferTo, SIPTAG_REFER_TO(), @ReferredBy, SIPTAG_REFERRED_BY(),
 *   nua_handle_make_replaces(), @Replaces, SIPTAG_REPLACES(),
 *   @ReferSub, SIPTAG_REFER_SUB()
 * - #nua_i_refer, nua_notify(), #nua_r_notify,
 *   nua_handle_by_replaces()
 * - nua_invite() with NUTAG_NOTIFY_REFER() and NUTAG_REFER_EVENT()
 * Settings:
 * - NUTAG_REFER_EXPIRES(), NUTAG_REFER_WITH_ID()
 * Specifications:
 * - @RFC3515 (@ReferTo), @RFC3892 (@ReferredBy), @RFC3891 (@Replaces),
 *   @RFC4488, @ReferSub
 *
 * @par Internal SIP Event Server
 * - nua_notifier(), #nua_r_notifier, #nua_i_subscription,
 *   nua_authorize(), #nua_r_authorize, nua_terminate(), #nua_r_terminate
 * - SIPTAG_EVENT(), SIPTAG_CONTENT_TYPE(), SIPTAG_PAYLOAD(),
 *   NUTAG_SUBSTATE()
 * @par Settings
 * - NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
 *                          SIPTAG_ALLOW_EVENTS_STR()
 * - NUTAG_MAX_SUBSCRIPTIONS()
231
 * - NUTAG_SUBSTATE(), NUTAG_SUB_EXPIRES()
Pekka Pessi's avatar
Pekka Pessi committed
232 233 234 235 236
 * @par Specifications
 * - @RFC3265
 *
 * @par SIP Event Subscriber
 * - nua_subscribe(), #nua_r_subscribe, #nua_i_notify, NUTAG_SUBSTATE(),
237
 *   SIPTAG_EVENT(), SIPTAG_EXPIRES()
Pekka Pessi's avatar
Pekka Pessi committed
238 239 240 241 242 243
 * - nua_unsubscribe(), #nua_r_unsubscribe()
 * @par Specifications
 * - @RFC3265
 *
 * @par SIP Event Notifier
 * - #nua_i_subscribe(), nua_notify(), #nua_r_notify,
244
 *   NUTAG_SUBSTATE(), NUTAG_SUB_EXPIRES(), SIPTAG_EVENT()
Pekka Pessi's avatar
Pekka Pessi committed
245
 * Settings:
246
 * - NUTAG_SUB_EXPIRES()
Pekka Pessi's avatar
Pekka Pessi committed
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
 * - NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
 *                          SIPTAG_ALLOW_EVENTS_STR()
 * - NUTAG_ALLOW("SUBSCRIBE"), NUTAG_APPL_METHOD("SUBSCRIBE")
 * @par Specifications
 * - @RFC3265
 *
 * @par SIP Event Publisher
 * - nua_publish(), #nua_r_publish(), nua_unpublish(), nua_r_unpublish()
 * - @SIPETag, SIPTAG_ETAG(), @SIPIfMatch, SIPTAG_IF_MATCH()
 * @par Specifications
 * - @RFC3903
 *
 * @par SIP Event State Compositor (PUBLISH Server)
 * - #nua_i_publish, @SIPETag, @SIPIfMatch
 * @par Settings
 * - NUTAG_ALLOW("PUBLISH"), NUTAG_APPL_METHOD("PUBLISH")
 * @par Specifications
 * - @RFC3903
 *
 * @par Non-Standard Extension Methods
 * - nua_method(), NUTAG_METHOD(), #nua_r_method, NUTAG_DIALOG()
 * - #nua_i_method, nua_respond()
 * Settings:
 * - NUTAG_ALLOW(x), NUTAG_APPL_METHOD(x)
 *
272 273
 * @par Server Shutdown
 * - nua_shutdown(), NUTAG_SHUTDOWN_EVENTS(), nua_destroy().
Pekka Pessi's avatar
Pekka Pessi committed
274 275 276 277 278 279 280 281 282 283 284 285
 */

/* @par S/MIME
 * - NUTAG_SMIME_ENABLE()
 * - NUTAG_SMIME_KEY_ENCRYPTION()
 * - NUTAG_SMIME_MESSAGE_DIGEST()
 * - NUTAG_SMIME_MESSAGE_ENCRYPTION()
 * - NUTAG_SMIME_OPT()
 * - NUTAG_SMIME_PROTECTION_MODE()
 * - NUTAG_SMIME_SIGNATURE()
 */

286 287
tag_typedef_t nutag_any = NSTAG_TYPEDEF(*);

Pekka Pessi's avatar
Pekka Pessi committed
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
/**@def NUTAG_URL()
 *
 * URL address from application to NUA
 *
 * @par Used with
 *    any function that create SIP request or nua_handle() \n
 *    nua_create() \n
 *    nua_set_params() \n
 *    nua_get_params() \n
 *
 * @par Parameter type
 *    char const *   or   url_t *  or url_string_t *
 *
 * @par Values
 *    #url_string_t, which is either a pointer to #url_t or NULL terminated
303
 *    character string representing URL
Pekka Pessi's avatar
Pekka Pessi committed
304 305 306 307 308 309 310 311 312 313 314 315
 *
 * For normal nua calls, this tag is used as request target, which is usually
 * stored as request-URI.
 *
 * It is used to set stack's own address with nua_create(), nua_set_params()
 * and nua_get_params(). It can be specified multiple times when used with
 * nua_create().
 *
 * @sa SIPTAG_TO()
 *
 * Corresponding tag taking reference parameter is NUTAG_URL_REF()
 */
Pekka Pessi's avatar
Pekka Pessi committed
316
tag_typedef_t nutag_url = URLTAG_TYPEDEF(url);
Pekka Pessi's avatar
Pekka Pessi committed
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339


/**@def NUTAG_METHOD(x)
 *
 * Extension method name.
 *
 * Specify extension method name with nua_method() function.
 *
 * @par Used with
 *    nua_method() \n
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    Extension method name (e.g., "SERVICE")
 *
 * Corresponding tag taking reference parameter is NUTAG_METHOD_REF()
 *
 * @sa nua_method(), SIP_METHOD_UNKNOWN()
 *
 * @since New in @VERSION_1_12_4.
 */
340
tag_typedef_t nutag_method = STRTAG_TYPEDEF(method);
Pekka Pessi's avatar
Pekka Pessi committed
341

342
/**@def NUTAG_METHOD_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
343 344 345 346 347 348 349 350
 * Reference tag for NUTAG_METHOD().
 */


/*#@def NUTAG_UICC(x)
 *
 * Intentionally undocumented.
 */
Pekka Pessi's avatar
Pekka Pessi committed
351
tag_typedef_t nutag_uicc = STRTAG_TYPEDEF(uicc);
Pekka Pessi's avatar
Pekka Pessi committed
352

353
/*#@def NUTAG_UICC_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
 * Reference tag for NUTAG_UICC().
 */


/**@def NUTAG_MEDIA_FEATURES()
 *
 * Add media tags from our offer to Accept-Contact headers.
 *
 * Automatically generate @AcceptContact headers for caller
 * preference processing according to the media capabilities in @a soa.
 *
 * @par Used with
 * - nua_create(), nua_set_params(), nua_get_params()
 * - nua_handle(), nua_set_hparams(), nua_get_hparams()
 * - nua_invite()
 *
 * @par Parameter type
371
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
372 373
 *
 * @par Values
374 375
 *    - 0 (false) - Do not add @AcceptContact
 *    - 1 (true) - Add @AcceptContact with media tags
Pekka Pessi's avatar
Pekka Pessi committed
376 377 378 379 380 381
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_FEATURES_REF()
 *
 * @sa nua_invite(), @AcceptContact, @RFC3841, @RFC3840, SOATAG_USER_SDP(),
 * SIPTAG_ACCEPT_CONTACT(), NUTAG_CALLEE_CAPS()
 */
Pekka Pessi's avatar
Pekka Pessi committed
382
tag_typedef_t nutag_media_features = BOOLTAG_TYPEDEF(media_features);
Pekka Pessi's avatar
Pekka Pessi committed
383

384
/**@def NUTAG_MEDIA_FEATURES_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
385 386 387 388
 * Reference tag for NUTAG_MEDIA_FEATURES().
 */


389 390
/**@def NUTAG_CALLEE_CAPS(x)
 *
Pekka Pessi's avatar
Pekka Pessi committed
391 392 393 394 395 396 397 398 399 400 401 402
 * Add methods parameter and media feature parameter to the @Contact headers
 * generated for REGISTER request.
 *
 * @par Used with
 * - nua_create(), nua_set_params(), nua_get_params()
 * - nua_handle(), nua_set_hparams(), nua_get_hparams()
 * - nua_register()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
403 404
 *    - 0 (false) - Do not include methods and media feature parameters
 *    - 1 (true) - Include media tags in @Contact
Pekka Pessi's avatar
Pekka Pessi committed
405 406 407 408 409 410
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_FEATURES_REF().
 *
 * @sa nua_register(), @Contact, NUTAG_M_FEATURES(), @RFC3840, @RFC3841,
 * SOATAG_USER_SDP(), NUTAG_MEDIA_FEATURES()
 */
Pekka Pessi's avatar
Pekka Pessi committed
411
tag_typedef_t nutag_callee_caps = BOOLTAG_TYPEDEF(callee_caps);
Pekka Pessi's avatar
Pekka Pessi committed
412

413
/**@def NUTAG_CALLEE_CAPS_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
414 415 416 417 418 419 420 421 422 423 424 425 426 427
 * Reference tag for NUTAG_CALLEE_CAPS().
 */


/**@def NUTAG_EARLY_MEDIA(x)
 *
 * Establish early media session using 100rel, 183 responses and PRACK.
 *
 * @par Used with
 * - nua_create(), nua_set_params(), nua_get_params()
 * - nua_handle(), nua_set_hparams(), nua_get_hparams()
 * - nua_invite(), nua_respond()
 *
 * @par Parameter type
428
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
429 430
 *
 * @par Values
431 432
 *    - 0 (false) -  do not try to use early media
 *    - 1 (true) - try to use early media
Pekka Pessi's avatar
Pekka Pessi committed
433 434 435 436 437
 *
 * @sa NUTAG_EARLY_ANSWER()
 *
 * Corresponding tag taking reference parameter is NUTAG_EARLY_MEDIA_REF().
 */
Pekka Pessi's avatar
Pekka Pessi committed
438
tag_typedef_t nutag_early_media = BOOLTAG_TYPEDEF(early_media);
Pekka Pessi's avatar
Pekka Pessi committed
439

440
/**@def NUTAG_EARLY_MEDIA_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
441 442 443 444 445 446 447 448
 * Reference tag for NUTAG_EARLY_MEDIA().
 */


/**@def NUTAG_ONLY183_100REL(x)
 *
 * Require 100rel extension and PRACK only with 183 response.
 *
449 450 451
 * When NUTAG_EARLY_MEDIA() is set, and if this parameter is set, stack
 * includes feature tag "100rel" in the @Require header only with 183:
 * otherwise, all 1XX responses (except <i>100 Trying</i>) require 100rel.
Pekka Pessi's avatar
Pekka Pessi committed
452 453 454 455 456 457 458 459 460 461 462
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_handle() \n
 *    nua_set_hparams() \n
 *    nua_get_hparams() \n
 *    nua_invite() \n
 *    nua_respond()
 *
 * @par Parameter type
463
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
464 465
 *
 * @par Values
466
 *    - 0 (false) - include 100rel in all preliminary responses
467 468
 *    - 1 (true) - include 100rel only in 183 responses
 *
469
 * @note
470
 * This tag takes only effect when NUTAG_EARLY_MEDIA(1) has been used, too.
Pekka Pessi's avatar
Pekka Pessi committed
471 472
 *
 * Corresponding tag taking reference parameter is NUTAG_ONLY183_100REL_REF().
473
 *
474
 * @sa
Pekka Pessi's avatar
Pekka Pessi committed
475
 */
476
tag_typedef_t nutag_only183_100rel = BOOLTAG_TYPEDEF(only183_100rel);
Pekka Pessi's avatar
Pekka Pessi committed
477

478
/**@def NUTAG_ONLY183_100REL_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
479 480 481 482 483 484 485 486 487 488 489 490
 * Reference tag for NUTAG_ONLY183_100REL().
 */


/**@def NUTAG_EARLY_ANSWER(x)
 *
 * Establish early media session by including SDP answer in 1XX response.
 *
 * @par Used with
 *    nua_respond(), nua_set_params(), nua_set_hparams()
 *
 * @par Parameter type
491
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
492 493
 *
 * @par Values
494 495
 *    - 0 (false) - do not include SDP in non-100rel 1XX responses
 *    - 1 (true) - try to include SDP in preliminary responses
Pekka Pessi's avatar
Pekka Pessi committed
496 497 498 499 500 501
 *
 * Corresponding tag taking reference parameter is NUTAG_EARLY_ANSWER_REF().
 *
 * @note Requires that @soa is enabled with NUTAG_MEDIA_ENABLE(1).
 *
 * @sa NUTAG_EARLY_MEDIA(), NUTAG_AUTOALERT(), NUTAG_MEDIA_ENABLE()
502
 *
Pekka Pessi's avatar
Pekka Pessi committed
503 504
 * @since New in @VERSION_1_12_2.
 */
505
tag_typedef_t nutag_early_answer = BOOLTAG_TYPEDEF(early_answer);
Pekka Pessi's avatar
Pekka Pessi committed
506

507
/**@def NUTAG_EARLY_ANSWER_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526
 * Reference tag for NUTAG_EARLY_ANSWER().
 */


/**@def NUTAG_INCLUDE_EXTRA_SDP(x)
 *
 * Include an extra copy of SDP answer in the response.
 *
 * When NUTAG_INCLUDE_EXTRA_SDP(1) is included in nua_respond() tags, stack
 * will include in the response a copy of the SDP offer/answer that was last
 * sent to the client. This tag should be used only when you know that the
 * remote end requires the extra SDP, for example, some versions of Cisco
 * SIPGateway need a copy of answer in 200 OK even when they indicate
 * support for 100rel.
 *
 * @par Used with
 *    nua_respond()
 *
 * @par Parameter type
527
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
528 529
 *
 * @par Values
530
 *    - 0 (false) - do not include extra SDP on 200 OK
531
 *    - 1 (true) - include SDP in 200 OK even if it has been sent
532
 *                 a 100rel response, too
Pekka Pessi's avatar
Pekka Pessi committed
533 534 535 536 537 538 539 540
 *
 * Corresponding tag taking reference parameter is
 * NUTAG_INCLUDE_EXTRA_SDP_REF().
 *
 * @note Requires that @soa is enabled with NUTAG_MEDIA_ENABLE(1).
 *
 * @sa NUTAG_EARLY_ANSWER(), NUTAG_EARLY_MEDIA(), NUTAG_AUTOALERT(),
 * NUTAG_MEDIA_ENABLE(), @RFC3264, @RFC3264
541
 *
Pekka Pessi's avatar
Pekka Pessi committed
542 543
 * @since New in @VERSION_1_12_4.
 */
544
tag_typedef_t nutag_include_extra_sdp = BOOLTAG_TYPEDEF(include_extra_sdp);
Pekka Pessi's avatar
Pekka Pessi committed
545

546
/**@def NUTAG_INCLUDE_EXTRA_SDP_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
547 548 549 550 551 552 553 554 555
 * Reference tag for NUTAG_INCLUDE_EXTRA_SDP().
 */


/**@def NUTAG_MEDIA_ENABLE()
 *
 * Enable built-in media session handling
 *
 * The built-in media session object @soa takes care of most details
556
 * of offer-answer negotiation.
Pekka Pessi's avatar
Pekka Pessi committed
557 558 559 560 561 562 563 564
 *
 * @par Used with
 *    nua_create()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
565 566
 *    - 0 (false) - do not use soa
 *    - 1 (true) - use soa with SDP O/A
Pekka Pessi's avatar
Pekka Pessi committed
567 568 569
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_ENABLE_REF()
 */
Pekka Pessi's avatar
Pekka Pessi committed
570
tag_typedef_t nutag_media_enable = BOOLTAG_TYPEDEF(media_enable);
Pekka Pessi's avatar
Pekka Pessi committed
571

572
/**@def NUTAG_MEDIA_ENABLE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593
 * Reference tag for NUTAG_MEDIA_ENABLE().
 */



/**@def NUTAG_SOA_NAME(x)
 *
 * Name for SDP Offer-Answer session object.
 *
 * SDP Offer-Answer session object name.
 *
 * @par Used with nua_create(), nua_handle().
 *
 * @par Parameter type
 *    void * (actually soa_session_t *)
 *
 * @par Values
 *    Pointer to MSS media session.
 *
 * Corresponding tag taking reference parameter is NUTAG_SOA_NAME_REF().
 */
594
tag_typedef_t nutag_soa_name = STRTAG_TYPEDEF(soa_name);
Pekka Pessi's avatar
Pekka Pessi committed
595

596
/**@def NUTAG_SOA_NAME_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
597 598 599 600 601
 * Reference tag for NUTAG_SOA_NAME().
 */


/**@def NUTAG_RETRY_COUNT(x)
602
 *
Pekka Pessi's avatar
Pekka Pessi committed
603 604 605 606 607
 * Set request retry count.
 *
 * Retry count determines how many times stack will automatically retry
 * after an recoverable error response, like 302, 401 or 407.
 *
608 609
 * Note that the first request does not count as retry.
 *
Pekka Pessi's avatar
Pekka Pessi committed
610 611 612 613 614 615 616
 * @par Used with
 *    nua_create(), nua_set_params(), nua_handle(), nua_set_hparams(),
 *    nua_get_params(), nua_get_hparams(),
 *    nua_register(), nua_unregister(),
 *    nua_options(), nua_invite(), nua_ack(), nua_cancel(), nua_bye(),
 *    nua_prack(), nua_update(), nua_info(),
 *    nua_message(), nua_publish(), nua_unpublish(), nua_notifier(),
617
 *    nua_subscribe(), nua_unsubscribe(), nua_notify(), nua_refer(),
Pekka Pessi's avatar
Pekka Pessi committed
618 619 620 621 622 623 624
 *    nua_method(), nua_respond()
 *    nua_authenticate().
 *
 * @par Parameter type
 *    unsigned
 *
 * @par Values
625
 * - 0 - Never retry automatically
626 627
 * - Otherwise, number of extra transactions initiated after initial
 *   transaction failed with recoverable error response
Pekka Pessi's avatar
Pekka Pessi committed
628 629 630 631 632
 *
 * @NEW_1_12_4.
 *
 * Corresponding tag taking reference parameter is NUTAG_RETRY_COUNT_REF().
 */
633
tag_typedef_t nutag_retry_count = UINTTAG_TYPEDEF(retry_count);
Pekka Pessi's avatar
Pekka Pessi committed
634

635
/**@def NUTAG_RETRY_COUNT_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652
 *
 * Reference tag for NUTAG_RETRY_COUNT().
 */


/**@def NUTAG_MAX_SUBSCRIPTIONS(x)
 *
 * Set maximum number of simultaneous subscribers per single event server.
 *
 * Determines how many subscribers can simultaneously subscribe to a single
 * event.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
653
 *    unsigned int
Pekka Pessi's avatar
Pekka Pessi committed
654 655
 *
 * @par Values
656
 *    - 0 (zero) - do not allow any subscriptions
Pekka Pessi's avatar
Pekka Pessi committed
657 658 659
 *
 * @sa nua_notifier(), nua_authorize()
 *
660
 * Corresponding tag taking reference parameter is
Pekka Pessi's avatar
Pekka Pessi committed
661 662
 * NUTAG_MAX_SUBSCRIPTIONS_REF().
 */
663 664
tag_typedef_t nutag_max_subscriptions = UINTTAG_TYPEDEF(max_subscriptions);

665
/**@def NUTAG_MAX_SUBSCRIPTIONS_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694
 * Reference tag for NUTAG_MAX_SUBSCRIPTIONS().
 */


/**@def NUTAG_CALLSTATE()
 *
 * Call state
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 * - #nua_callstate_init - Initial state
 * - #nua_callstate_authenticating - 401/407 received
 * - #nua_callstate_calling - INVITE sent
 * - #nua_callstate_proceeding - 18X received
 * - #nua_callstate_completing   - 2XX received
 * - #nua_callstate_received - INVITE received (and 100 Trying sent)
 * - #nua_callstate_early       - 18X sent
 * - #nua_callstate_completed   - 2XX sent
 * - #nua_callstate_ready       - 2XX and ACK received/sent
 * - #nua_callstate_terminating - BYE sent
 * - #nua_callstate_terminated  - BYE complete
 *
 * Corresponding tag taking reference parameter is NUTAG_CALLSTATE_REF().
 */
695
tag_typedef_t nutag_callstate = INTTAG_TYPEDEF(callstate);
Pekka Pessi's avatar
Pekka Pessi committed
696

697
/**@def NUTAG_CALLSTATE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
698 699 700 701 702 703 704 705 706 707 708 709
 * Reference tag for NUTAG_CALLSTATE().
 */


/**@def NUTAG_OFFER_RECV()
 *
 * Indicate that SDP offer has been received.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
710
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
711 712 713
 *
 * Corresponding tag taking reference parameter is NUTAG_OFFER_RECV_REF().
 */
714
tag_typedef_t nutag_offer_recv = BOOLTAG_TYPEDEF(offer_recv);
Pekka Pessi's avatar
Pekka Pessi committed
715

716
/**@def NUTAG_OFFER_RECV_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
717 718 719 720 721 722 723 724 725 726 727 728
 * Reference tag for NUTAG_OFFER_RECV().
 */


/**@def NUTAG_ANSWER_RECV()
 *
 * Indicate that SDP answer has been received.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
729
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
730 731 732
 *
 * Corresponding tag taking reference parameter is NUTAG_ANSWER_RECV_REF().
 */
733
tag_typedef_t nutag_answer_recv = BOOLTAG_TYPEDEF(answer_recv);
Pekka Pessi's avatar
Pekka Pessi committed
734

735
/**@def NUTAG_ANSWER_RECV_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
736 737 738 739 740 741 742 743 744 745 746 747
 * Reference tag for NUTAG_ANSWER_RECV().
 */


/**@def NUTAG_OFFER_SENT()
 *
 * Indicate that SDP offer has been sent.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
748
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
749 750 751
 *
 * Corresponding tag taking reference parameter is NUTAG_OFFER_SENT_REF().
 */
752
tag_typedef_t nutag_offer_sent = BOOLTAG_TYPEDEF(offer_sent);
Pekka Pessi's avatar
Pekka Pessi committed
753

754
/**@def NUTAG_OFFER_SENT_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770
 * Reference tag for NUTAG_OFFER_SENT().
 */


/**@def NUTAG_ANSWER_SENT()
 *
 * Indicate that SDP answer has been sent.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
 *    int (boolean: nonzero is true, zero is false)
 *
 * Corresponding tag taking reference parameter is NUTAG_ANSWER_SENT_REF().
 */
771
tag_typedef_t nutag_answer_sent = BOOLTAG_TYPEDEF(answer_sent);
Pekka Pessi's avatar
Pekka Pessi committed
772

773
/**@def NUTAG_ANSWER_SENT_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
774 775
 * Reference tag for NUTAG_ANSWER_SENT().
 */
776

Pekka Pessi's avatar
Pekka Pessi committed
777

Pekka Pessi's avatar
Pekka Pessi committed
778 779 780 781 782 783
/**@def NUTAG_SUBSTATE()
 *
 * Subscription state.
 *
 * @par Used with
 * - with nua_create(), nua_set_params(), nua_get_params(),
784 785 786
 *   nua_handle(), nua_set_hparams(), nua_get_hparams(), and
 *   nua_notifier() to change the default subscription state returned by
 *   the internal event server
Pekka Pessi's avatar
Pekka Pessi committed
787
 * - with nua_notify() and nua_respond() to SUBSCRIBE to determine the
788 789
 *   subscription state (if application include @SubscriptionState
 *   header in the tag list, the NUTAG_SUBSTATE() value is ignored)
Pekka Pessi's avatar
Pekka Pessi committed
790
 * - with #nua_r_subscribe, #nua_i_notify, #nua_i_subscribe, and #nua_r_notify
791
 *   to indicate the current subscription state
Pekka Pessi's avatar
Pekka Pessi committed
792 793 794 795 796 797 798 799 800 801 802 803
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *   - #nua_substate_embryonic (0)
 *   - #nua_substate_pending (1)
 *   - #nua_substate_active (2)
 *   - #nua_substate_terminated (3)
 *
 * Note that the @SubscriptionState or @Expires headers specified by
 * application with the nua_notify() or nua_respond() to SUBSCRIBE overrides
804
 * the subscription state specified by NUTAG_SUBSTATE().
Pekka Pessi's avatar
Pekka Pessi committed
805 806 807 808 809 810 811 812 813 814 815 816 817
 * Application can terminate subscription by including
 * NUTAG_SUBSTATE(nua_substate_terminated), @SubscriptionState with value
 * "terminated" or @Expires header with value 0 in the NOTIFY request sent
 * by nua_notify().
 *
 * @sa @RFC3265, @SubscriptionState, SIPTAG_SUBSCRIPTION_STATE(),
 * SIPTAG_SUBSCRIPTION_STATE_STR(), nua_notifier(), #nua_r_subscribe,
 * #nua_i_subscribe, #nua_i_refer, #nua_r_notify, #nua_i_notify.
 *
 * Corresponding tag taking reference parameter is NUTAG_SUBSTATE_REF().
 */
tag_typedef_t nutag_substate = INTTAG_TYPEDEF(substate);

818
/**@def NUTAG_SUBSTATE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
819 820 821 822
 * Reference tag for NUTAG_SUBSTATE().
 */


823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847
/**@def NUTAG_SUB_EXPIRES()
 *
 * Default expiration time of subscriptions.
 *
 * @par Used with
 * - with nua_create(), nua_set_params(), nua_get_params(), nua_handle(),
 *   nua_set_hparams(), nua_get_hparams(), nua_respond(), nua_notify(), and
 *   nua_notifier() to change the default expiration time of subscriptions
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *   - default expiration time in seconds
 *
 * Note that the expires parameter in @SubscriptionState or @Expires header
 * in the nua_response() to the SUBSCRIBE overrides the default subscription
 * expiration specified by NUTAG_SUB_EXPIRES().
 *
 * @sa @RFC3265, NUTAG_REFER_EXPIRES(), @Expires, SIPTAG_EXPIRES(),
 * SIPTAG_EXPIRES_STR(), @SubscriptionState, nua_respond(), nua_notifier(),
 * #nua_r_subscribe, #nua_i_subscribe, #nua_r_refer, #nua_r_notify,
 * #nua_i_notify.
 *
 * Corresponding tag taking reference parameter is NUTAG_SUB_EXPIRES_REF().
848 849
 *
 * @NEW_1_12_9.
850 851 852
 */
tag_typedef_t nutag_sub_expires = UINTTAG_TYPEDEF(substate);

853
/**@def NUTAG_SUB_EXPIRES_REF(x)
854 855 856 857
 * Reference tag for NUTAG_SUB_EXPIRES().
 */


Pekka Pessi's avatar
Pekka Pessi committed
858 859 860 861 862
/**@def NUTAG_NEWSUB()
 *
 * Send unsolicited NOTIFY request.
 *
 * Some applications may require sending unsolicited NOTIFY requests, that
863
 * is, NOTIFY without SUBSCRIBE or REFER request sent by event watcher.
Pekka Pessi's avatar
Pekka Pessi committed
864 865 866 867 868 869 870 871 872 873 874 875
 * However, sending NOTIFY request requires an existing dialog usage by
 * default. If the nua_notify() tags include NUTAG_NEWSUB(1), the usage
 * is created by nua_notify() itself.
 *
 * If you want to create a subscription that does not terminate immediately
 * include SIPTAG_SUBSCRIPTION_STATE()/SIPTAG_SUBSCRIPTION_STATE_STR() with
 * an "expires" parameter in the argument list, too.
 *
 * @par Used with
 *    nua_notify()
 *
 * @par Parameter type
876
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
877 878
 *
 * @par Values
879 880 881
 *   - 0 - false (default) - do not create new subscription
 *         but reject NOTIFY with 481 locally
 *   - 1 - true - create a subscription if it does not exist
Pekka Pessi's avatar
Pekka Pessi committed
882 883 884
 *
 * Corresponding tag taking reference parameter is NUTAG_NEWSUB_REF().
 *
885
 * @NEW_1_12_5.
Pekka Pessi's avatar
Pekka Pessi committed
886 887 888
 */
tag_typedef_t nutag_newsub = BOOLTAG_TYPEDEF(newsub);

889
/**@def NUTAG_NEWSUB_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908
 * Reference tag for NUTAG_NEWSUB().
 */


/**@def NUTAG_INVITE_TIMER(x)
 *
 * Timer for outstanding INVITE in seconds.
 *
 * INVITE will be canceled if no answer is received before timer expires.
 *
 * @par Used with
 *    nua_invite() \n
 *    nua_set_params(), nua_set_hparams(),
 *    nua_get_params(), nua_get_hparams()
 *
 * @par Parameter type
 *    int (enum nua_af)
 *
 * @par Values
909 910
 *    - 0  no timer
 *    - >0 timer in seconds
Pekka Pessi's avatar
Pekka Pessi committed
911 912 913 914 915
 *
 * Corresponding tag taking reference parameter is NUTAG_INVITE_TIMER_REF().
 */
tag_typedef_t nutag_invite_timer = UINTTAG_TYPEDEF(invite_timer);

916
/**@def NUTAG_INVITE_TIMER_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
917 918 919 920 921 922 923 924 925 926 927 928
 * Reference tag for NUTAG_INVITE_TIMER().
 */


/**@def NUTAG_SESSION_TIMER(x)
 *
 * Default session timer in seconds.
 *
 * Set default value for session timer in seconds when the session timer
 * extension is used. The tag value is the proposed session expiration time
 * in seconds, the session is refreshed twice during the expiration time.
 *
929
 * @par Sending INVITE and UPDATE Requests
Pekka Pessi's avatar
Pekka Pessi committed
930 931
 *
 * If NUTAG_SESSION_TIMER() is used with non-zero value, the value is used
932
 * in the @SessionExpires header included in the INVITE or UPDATE requests.
Pekka Pessi's avatar
Pekka Pessi committed
933 934 935 936 937 938
 * The intermediate proxies or the ultimate destination can lower the
 * interval in @SessionExpires header. If the value is too low, they can
 * reject the request with the status code <i>422 Session Timer Too
 * Small</i>. In that case, @b nua increases the value of @SessionExpires
 * header and retries the request automatically.
 *
939
 * @par Returning a Response to the INVITE and UPDATE Requests
Pekka Pessi's avatar
Pekka Pessi committed
940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956
 *
 * The NUTAG_SESSION_TIMER() value is also used when sending the final
 * response to the INVITE or UPDATE requests. If the NUTAG_SESSION_TIMER()
 * value is 0 or the value in the @SessionExpires header of the request is
 * lower than the value in NUTAG_SESSION_TIMER(), the value from the
 * incoming @SessionExpires header is used. However, if the value in
 * @SessionExpires is lower than the minimal acceptable session expiration
 * interval specified with the tag NUTAG_MIN_SE() the request is
 * automatically rejected with <i>422 Session Timer Too Small</i>.
 *
 * @par Refreshes
 *
 * After the initial INVITE request, the SIP session is refreshed at the
 * intervals indicated by the @SessionExpires header returned in the 2XX
 * response. The party indicated with the "refresher" parameter of the
 * @SessionExpires header sends a re-INVITE requests (or an UPDATE
 * request if NUTAG_UPDATE_REFRESH(1) parameter tag has been set).
957
 *
958 959 960 961 962
 * Some SIP user-agents use INVITE without SDP offer to refresh session.
 * By default, NUA sends an offer in 200 OK to such an INVITE and expects
 * an answer back in ACK. If NUTAG_REFRESH_WITHOUT_SDP(1) tag is used,
 * no SDP offer is sent in 200 OK if re-INVITE was received without SDP.
 *
Pekka Pessi's avatar
Pekka Pessi committed
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994
 * @par When to Use NUTAG_SESSION_TIMER()?
 *
 * The session time extension is enabled ("timer" feature tag is included in
 * @Supported header) but not activated by default (no @SessionExpires
 * header is included in the requests or responses by default). Using
 * non-zero value with NUTAG_SESSION_TIMER() or NUTAG_SESSION_REFRESHER()
 * activates it. When the extension is activated, @nua refreshes the call
 * state by sending periodic re-INVITE or UPDATE requests unless the remote
 * end indicated that it will take care of refreshes.
 *
 * The session timer extension is mainly useful for proxies or back-to-back
 * user agents that keep call state. The call state is "soft" meaning that
 * if no call-related SIP messages are processed for certain time the state
 * will be destroyed. An ordinary user-agent can also make use of session
 * timer if it cannot get any activity feedback from RTP or other media.
 *
 * @note The session timer extension is used only if the feature
 * tag "timer" is listed in the @Supported header, set by NUTAG_SUPPORTED(),
 * SIPTAG_SUPPORTED(), or SIPTAG_SUPPORTED_STR() tags.
 *
 * @par Used with
 *    nua_invite(), nua_update(), nua_respond() \n
 *    nua_set_params() or nua_set_hparams() \n
 *    nua_get_params() or nua_get_hparams()
 *
 * See nua_set_hparams() for a complete list of the the nua operations that
 * accept this tag.
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
995 996
 *    - 0  disable
 *    - >0 interval in seconds
Pekka Pessi's avatar
Pekka Pessi committed
997 998 999 1000
 *
 * Corresponding tag taking reference parameter is NUTAG_SESSION_TIMER_REF().
 *
 * @sa NUTAG_SUPPORTED(), NUTAG_MIN_SE(), NUTAG_SESSION_REFRESHER(),
1001 1002
 * nua_invite(), #nua_r_invite, #nua_i_invite, nua_respond(),
 * nua_update(), #nua_r_update, #nua_i_update,
Pekka Pessi's avatar
Pekka Pessi committed
1003 1004 1005 1006
 * NUTAG_UPDATE_REFRESH(), @RFC4028, @SessionExpires, @MinSE
 */
tag_typedef_t nutag_session_timer = UINTTAG_TYPEDEF(session_timer);

1007
/**@def NUTAG_SESSION_TIMER_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
 * Reference tag for NUTAG_SESSION_TIMER().
 */


/**@def NUTAG_MIN_SE(x)
 *
 * Minimum acceptable refresh interval for session.
 *
 * Specifies the value of @MinSE header in seconds. The @b Min-SE header is
 * used to specify minimum acceptable refresh interval for session timer
 * extension.
 *
 * @par Used with
 *    nua_handle(), nua_invite(), nua_update(), nua_respond() \n
 *    nua_set_params() or nua_set_hparams() \n
 *    nua_get_params() or nua_get_hparams()
 *
 * See nua_set_hparams() for a complete list of the nua operations that
 * accept this tag.
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *    interval in seconds.
 *
 * Corresponding tag taking reference parameter is NUTAG_MIN_SE_REF().
 *
 * @sa NUTAG_SESSION_TIMER(), NUTAG_SESSION_REFRESHER(),
 * NUTAG_UPDATE_REFRESH(), @RFC4028, @MinSE, @SessionExpires
 */
tag_typedef_t nutag_min_se = UINTTAG_TYPEDEF(min_se);

1041
/**@def NUTAG_MIN_SE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064
 * Reference tag for NUTAG_MIN_SE().
 */


/**@def NUTAG_SESSION_REFRESHER(x)
 *
 * Specify the preferred refresher.
 *
 * Specify for session timer extension which party is the preferred refresher.
 *
 * @par Used with
 *    nua_handle(), nua_invite(), nua_update(), nua_respond() \n
 *    nua_set_params() or nua_set_hparams() \n
 *    nua_get_params() or nua_get_hparams()
 *
 * See nua_set_hparams() for a complete list of all the nua operations that
 * accept this tag.
 *
 * @par Parameter type
 *   enum { #nua_no_refresher,  #nua_local_refresher, #nua_remote_refresher,
 *          #nua_any_refresher }
 *
 * @par Values
1065 1066 1067 1068
 *    - nua_no_refresher (session timers are disabled)
 *    - nua_local_refresher
 *    - nua_remote_refresher
 *    - nua_any_refresher (default)
Pekka Pessi's avatar
Pekka Pessi committed
1069 1070 1071 1072 1073 1074 1075 1076 1077
 *
 * Corresponding tag taking reference parameter is
 * NUTAG_SESSION_REFRESHER_REF().
 *
 * @sa NUTAG_SESSION_TIMER(), NUTAG_MIN_SE_REF(),
 * NUTAG_UPDATE_REFRESH(), @RFC4028, @SessionExpires, @MinSE
 */
tag_typedef_t nutag_session_refresher = INTTAG_TYPEDEF(session_refresher);

1078
/**@def NUTAG_SESSION_REFRESHER_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089
 * Reference tag for NUTAG_SESSION_REFRESHER().
 */




/**@def NUTAG_UPDATE_REFRESH(x)
 *
 * Use UPDATE as refresh method.
 *
 * If this parameter is true and the remote endpoint has included UPDATE in
1090
 * Allow header, the nua stack uses UPDATE instead of INVITE to refresh the
Pekka Pessi's avatar
Pekka Pessi committed
1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105
 * session when using the session timer extension.
 *
 * Note that the session timer headers @SessionExpires and @MinSE are always
 * included in the UPDATE request and responses regardless of the value of
 * this tag.
 *
 * @par Used with
 *    nua_handle(), nua_invite(), nua_update(), nua_respond() \n
 *    nua_set_params() or nua_set_hparams() \n
 *    nua_get_params() or nua_get_hparams()
 *
 * See nua_set_hparams() for a complete list of all the nua operations that
 * accept this tag.
 *
 * @par Parameter type
1106
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1107 1108
 *
 * @par Values
1109 1110
 *    - 1 (true, use UPDATE)
 *    - 0 (false, use INVITE)
Pekka Pessi's avatar
Pekka Pessi committed
1111 1112 1113 1114
 *
 * Corresponding tag taking reference parameter is NUTAG_UPDATE_REFRESH_REF().
 *
 * @sa #nua_r_update, NUTAG_SESSION_TIMER(), NUTAG_MIN_SE_REF(),
1115
 * NUTAG_SESSION_REFRESHER(), @RFC4028, @SessionExpires, @MinSE
Pekka Pessi's avatar
Pekka Pessi committed
1116 1117 1118
 */
tag_typedef_t nutag_update_refresh = BOOLTAG_TYPEDEF(update_refresh);

1119
/**@def NUTAG_UPDATE_REFRESH_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1120 1121 1122 1123
 * Reference tag for NUTAG_UPDATE_REFRESH().
 */


1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162
/**@def NUTAG_REFRESH_WITHOUT_SDP(x)
 *
 * Do not send offer in response if re-INVITE was received without SDP.
 *
 * Some SIP user-agents use INVITE without SDP offer to refresh session.
 * By default, NUA sends an offer in 200 OK to such an INVITE and expects
 * an answer back in ACK.
 *
 * If NUTAG_REFRESH_WITHOUT_SDP(1) tag is used, no SDP offer is sent in 200
 * OK if re-INVITE was received without SDP.
 *
 * @par Used with
 *    nua_handle(), nua_invite(), nua_update(), nua_respond() \n
 *    nua_set_params() or nua_set_hparams() \n
 *    nua_get_params() or nua_get_hparams()
 *
 * See nua_set_hparams() for a complete list of all the nua operations that
 * accept this tag.
 *
 * @par Parameter type
 *    int (boolean: nonzero is true, zero is false)
 *
 * @par Values
 *    - 1 (true, do not try to send offer in response to re-INVITE)
 *    - 0 (false, always use SDP offer-answer in re-INVITEs)
 *
 * Corresponding tag taking reference parameter is NUTAG_REFRESH_WITHOUT_SDP_REF().
 *
 * @sa #nua_r_update, NUTAG_SESSION_TIMER(), NUTAG_MIN_SE_REF(),
 * NUTAG_SESSION_REFRESHER(), NUTAG_UPDATE_REFRESH(), @RFC4028,
 * @SessionExpires, @MinSE
 */
tag_typedef_t nutag_refresh_without_sdp = BOOLTAG_TYPEDEF(refresh_without_sdp);

/**@def NUTAG_REFRESH_WITHOUT_SDP_REF(x)
 * Reference tag for NUTAG_REFRESH_WITHOUT_SDP_REF().
 */


Pekka Pessi's avatar
Pekka Pessi committed
1163 1164 1165 1166 1167 1168 1169 1170
/**@def NUTAG_REFER_EXPIRES()
 *
 * Default lifetime for implicit subscriptions created by REFER.
 *
 * Default expiration time in seconds for implicit subscriptions created by
 * REFER.
 *
 * @par Used with
1171 1172 1173
 *    nua_handle(), nua_respond() \n
 *    nua_set_params() or nua_set_hparams() \n
 *    nua_get_params() or nua_get_hparams()
Pekka Pessi's avatar
Pekka Pessi committed
1174 1175 1176 1177 1178
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
1179 1180 1181
 *    - default interval in seconds
 *
 * @sa NUTAG_SUB_EXPIRES()
Pekka Pessi's avatar
Pekka Pessi committed
1182 1183 1184 1185 1186
 *
 * Corresponding tag taking reference parameter is NUTAG_REFER_EXPIRES_REF().
 */
tag_typedef_t nutag_refer_expires = UINTTAG_TYPEDEF(refer_expires);

1187
/**@def NUTAG_REFER_EXPIRES_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
 * Reference tag for NUTAG_REFER_EXPIRES().
 */


/**@def NUTAG_REFER_WITH_ID()
 *
 * Always use id parameter with refer event.
 *
 * When an incoming REFER creates an implicit subscription, the event header
 * in the NOTIFY request may have an id parameter. The id parameter can be
 * either always included (default behavior), or the parameter can be used
 * only for the second and subsequent REFER requests received in a given
 * dialog.
 *
 * Note that once the subscription is created, the event header should not
 * be modified. Therefore this tag has no effect on already established
 * subscriptions, and its use makes sense largely on nua_set_params() only.
 *
 * @par Used with
 *    nua_set_params() (nua_set_hparams(), nua_invite(), nua_respond(),
 *    nua_update()).
 *
 * @par Parameter type
1211
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1212 1213
 *
 * @par Values
1214 1215
 *   - 0 (false, do not use id with subscription created with first REFER request)
 *   - 1 (true, use id with all subscriptions created with REFER request)
Pekka Pessi's avatar
Pekka Pessi committed
1216 1217 1218 1219 1220 1221 1222
 *
 * Corresponding tag taking reference parameter is NUTAG_REFER_WITH_ID_REF().
 *
 * @since New in @VERSION_1_12_2.
 */
tag_typedef_t nutag_refer_with_id = BOOLTAG_TYPEDEF(refer_with_id);

1223
/**@def NUTAG_REFER_WITH_ID_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1224 1225 1226 1227 1228
 * Reference tag for NUTAG_REFER_WITH_ID().
 */

/**@def NUTAG_AUTOALERT(x)
 *
1229 1230 1231
 * Send alerting (180 Ringing) automatically (instead of 100 Trying). If the
 * early media has been enabled with NUTAG_EARLY_MEDIA(1), the stack will
 * send 183, wait for PRACK and then return 180 Ringing.
Pekka Pessi's avatar
Pekka Pessi committed
1232 1233 1234 1235 1236 1237
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
1238
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1239 1240
 *
 * @par Values
1241 1242
 *    - 0 (false) - no automatic sending of "180 Ringing"
 *    - 1 (true) - "180 Ringing" sent automatically
Pekka Pessi's avatar
Pekka Pessi committed
1243 1244 1245 1246 1247
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTOALERT_REF().
 */
tag_typedef_t nutag_autoalert = BOOLTAG_TYPEDEF(autoAlert);

1248
/**@def NUTAG_AUTOALERT_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263
 * Reference tag for NUTAG_AUTOALERT().
 */


/**@def NUTAG_AUTOANSWER(x)
 *
 * Answer (with 200 Ok) automatically to incoming call.
 *
 * @par Used with
 *    nua_set_params(), nua_set_hparams() \n
 *    nua_get_params(), nua_get_hparams() \n
 *    nua_invite() \n
 *    nua_respond()
 *
 * @par Parameter type
1264
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1265 1266
 *
 * @par Values
1267 1268
 *    - 0 (false) - No automatic sending of "200 Ok"
 *    - 1 (true) - "200 Ok" sent automatically
Pekka Pessi's avatar
Pekka Pessi committed
1269 1270 1271 1272
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTOANSWER_REF().
 *
 * @note Requires that @soa is enabled with NUTAG_MEDIA_ENABLE(1).
1273
 *
Pekka Pessi's avatar
Pekka Pessi committed
1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290
 * @par Auto-Answer to Re-INVITE requests
 * By default, NUA tries to auto answer the re-INVITEs used to refresh the
 * session when the media is enabled. Set NUTAG_AUTOANSWER(0) on the call
 * handle (e.g., include the tag with nua_invite(), nua_respond()) in order
 * to disable the auto answer on re-INVITEs.
 *
 * @bug If the re-INVITE modifies the session (e.g., SDP contains offer that
 * adds video stream to the session), NUA auto-answers it if
 * NUTAG_AUTOANSWER(0) has not been set on the handle. It accepts or rejects
 * media based on the existing user SDP (set with SOATAG_USER_SDP(), for
 * example). It should auto-answer only session refresh request and let
 * application decide how to handle requests to modify the session.
 *
 * @sa NUTAG_MEDIA_ENABLE(), NUTAG_AUTOALERT(), NUTAG_AUTOACK().
 */
tag_typedef_t nutag_autoanswer = BOOLTAG_TYPEDEF(autoAnswer);

1291
/**@def NUTAG_AUTOANSWER_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311
 * Reference tag for NUTAG_AUTOANSWER().
 */


/**@def NUTAG_AUTOACK(x)
 *
 * ACK automatically
 *
 * If this parameter is true, ACK is sent automatically after receiving 2XX
 * series response to INVITE. Note that ACK is always sent automatically by
 * lower layers of the stack after receiving an error response 3XX, 4XX, 5XX
 * or 6XX.
 *
 * @par Used with
 *    nua_set_params(), nua_set_hparams(), \n
 *    nua_get_params(), nua_get_hparams(), \n
 *    nua_invite(), nua_ack(), nua_respond(), nua_update() \n
 *    nua_respond()
 *
 * @par Parameter type
1312
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1313 1314
 *
 * @par Values
1315 1316
 *    - 0 (false) - No automatic sending of ACK
 *    - 1 (true) - ACK sent automatically
Pekka Pessi's avatar
Pekka Pessi committed
1317 1318
 *
 * Default value is NUTAG_AUTOACK(1).
1319
 *
Pekka Pessi's avatar
Pekka Pessi committed
1320 1321 1322 1323
 * Corresponding tag taking reference parameter is NUTAG_AUTOACK_REF().
 */
tag_typedef_t nutag_autoack = BOOLTAG_TYPEDEF(autoACK);

1324
/**@def NUTAG_AUTOACK_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1325 1326 1327 1328 1329 1330
 * Reference tag for NUTAG_AUTOACK().
 */


/**@def NUTAG_ENABLEINVITE(x)
 *
1331 1332
 * Enable incoming INVITE.
 *
Pekka Pessi's avatar
Pekka Pessi committed
1333 1334 1335 1336 1337 1338
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
1339
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1340 1341
 *
 * @par Values
1342 1343
 *    - 0 (false) - Incoming INVITE not enabled. NUA answers 403 Forbidden
 *    - 1 (true) - Incoming INVITE enabled
Pekka Pessi's avatar
Pekka Pessi committed
1344 1345 1346 1347 1348
 *
 * Corresponding tag taking reference parameter is NUTAG_ENABLEINVITE_REF().
 */
tag_typedef_t nutag_enableinvite = BOOLTAG_TYPEDEF(enableInvite);

1349
/**@def NUTAG_ENABLEINVITE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363
 * Reference tag for NUTAG_ENABLEINVITE().
 */



/**@def NUTAG_ENABLEMESSAGE(x)
 *
 * Enable incoming MESSAGE
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
1364
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1365 1366
 *
 * @par Values
1367 1368
 *    - 0 (false) - Incoming MESSAGE not enabled. NUA answers 403 Forbidden
 *    - 1 (true) - Incoming MESSAGE enabled
Pekka Pessi's avatar
Pekka Pessi committed
1369 1370 1371 1372 1373
 *
 * Corresponding tag taking reference parameter is NUTAG_ENABLEMESSAGE_REF().
 */
tag_typedef_t nutag_enablemessage = BOOLTAG_TYPEDEF(enableMessage);

1374
/**@def NUTAG_ENABLEMESSAGE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1375 1376 1377 1378 1379 1380 1381 1382 1383
 * Reference tag for NUTAG_ENABLEMESSAGE().
 */



/**@def NUTAG_ENABLEMESSENGER(x)
 *
 * Enable incoming MESSAGE with To tag.
 *
1384 1385 1386
 * Set this parameter true if you want to chat with Windows Messenger. When
 * it is set, stack will accept MESSAGE requests with To tag outside
 * existing dialogs.
Pekka Pessi's avatar
Pekka Pessi committed
1387 1388 1389 1390 1391 1392
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
1393
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1394 1395
 *
 * @par Values
1396 1397
 *    - 0 (false) - disable Windows-Messenger-specific features
 *    - 1 (true) - enable Windows-Messenger-specific features
Pekka Pessi's avatar
Pekka Pessi committed
1398 1399 1400 1401 1402
 *
 * Corresponding tag taking reference parameter is NUTAG_ENABLEMESSENGER_REF().
 */
tag_typedef_t nutag_enablemessenger = BOOLTAG_TYPEDEF(enableMessenger);

1403
/**@def NUTAG_ENABLEMESSENGER_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417
 * Reference tag for NUTAG_ENABLEMESSENGER().
 */


/**@def NUTAG_SMIME_ENABLE(x)
 *
 * Enable S/MIME
 *
 * @par Used with
 *    nua_create() \n
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
1418
 *    int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
1419 1420
 *
 * @par Values
1421 1422
 *    - 0 (false) - S/MIME is Disabled
 *    - 1 (true) - S/MIME is Enabled
Pekka Pessi's avatar
Pekka Pessi committed
1423 1424 1425 1426 1427
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_ENABLE_REF().
 */
tag_typedef_t nutag_smime_enable = BOOLTAG_TYPEDEF(smime_enable);

1428
/**@def NUTAG_SMIME_ENABLE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448
 * Reference tag for NUTAG_SMIME_ENABLE().
 */


/**@def NUTAG_SMIME_OPT(x)
 *
 * S/MIME Options
 *
 * This tag specifies the type of S/MIME security services requested
 * by the user.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_message()
 *
 * @par Parameter type
 *   int
 *
 * @par Values
1449 1450 1451 1452
 *   - -1 (SM_ID_NULL) No security service needed
 *   -  0 (SM_ID_CLEAR_SIGN) Clear signing
 *   -  1 (SM_ID_SIGN) S/MIME signing
 *   -  2 (SM_ID_ENCRYPT) S/MIME encryption
Pekka Pessi's avatar
Pekka Pessi committed
1453 1454 1455 1456 1457
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_OPT_REF().
 */
tag_typedef_t nutag_smime_opt = INTTAG_TYPEDEF(smime_opt);

1458
/**@def NUTAG_SMIME_OPT_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477
 * Reference tag for NUTAG_SMIME_OPT().
 */


/**@def NUTAG_SMIME_PROTECTION_MODE(x)
 *
 * S/MIME protection mode
 *
 * This tag specifies the protection mode of the SIP message by
 * S/MIME as requested by the user
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *   unsigned int
 *
 * @par Values
1478 1479 1480 1481
 *   - -1 (SM_MODE_NULL) Unspecified
 *   -  0 (SM_MODE_PAYLOAD_ONLY) SIP payload only
 *   -  1 (SM_MODE_TUNNEL) SIP tunneling mode
 *   -  2 (SM_MODE_SIPFRAG) SIPfrag protection
Pekka Pessi's avatar
Pekka Pessi committed
1482 1483 1484
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_PROTECTION_MODE_REF().
 */
1485
tag_typedef_t nutag_smime_protection_mode =
Pekka Pessi's avatar
Pekka Pessi committed
1486 1487
  INTTAG_TYPEDEF(smime_protection_mode);

1488
/**@def NUTAG_SMIME_PROTECTION_MODE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508
 * Reference tag for NUTAG_SMIME_PROTECTION_MODE().
 */


/**@def NUTAG_SMIME_MESSAGE_DIGEST(x)
 *
 * S/MIME digest algorithm
 *
 * This tag specifies the message digest algorithm to be used in S/MIME.
 *
 * @par Used with
 *    To be implemented
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_MESSAGE_DIGEST_REF().
 */
1509
tag_typedef_t nutag_smime_message_digest =
Pekka Pessi's avatar
Pekka Pessi committed
1510 1511
  STRTAG_TYPEDEF(smime_message_digest);

1512
/**@def NUTAG_SMIME_MESSAGE_DIGEST_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532
 * Reference tag for NUTAG_SMIME_MESSAGE_DIGEST().
 */


/**@def NUTAG_SMIME_SIGNATURE(x)
 *
 * S/MIME signature algorithm
 *
 * This tag specifies the signature algorithm to be used in S/MIME.
 *
 * @par Used with
 *    To be implemented.
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_SIGNATURE_REF().
 */
1533
tag_typedef_t nutag_smime_signature =
Pekka Pessi's avatar
Pekka Pessi committed
1534 1535
  STRTAG_TYPEDEF(smime_signature);

1536
/**@def NUTAG_SMIME_SIGNATURE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556
 * Reference tag for NUTAG_SMIME_SIGNATURE().
 */


/**@def NUTAG_SMIME_KEY_ENCRYPTION(x)
 *
 * S/MIME key encryption algorithm
 *
 * This tag specifies the key encryption algorithm to be used by S/MIME.
 *
 * @par Used with
 *    To be implemented
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_KEY_ENCRYPTION_REF().
 */
1557
tag_typedef_t nutag_smime_key_encryption =
Pekka Pessi's avatar
Pekka Pessi committed
1558 1559
  STRTAG_TYPEDEF(smime_key_encryption);

1560
/**@def NUTAG_SMIME_KEY_ENCRYPTION_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580
 * Reference tag for NUTAG_SMIME_KEY_ENCRYPTION().
 */


/**@def NUTAG_SMIME_MESSAGE_ENCRYPTION(x)
 *
 * S/MIME message encryption algorithm
 *
 * This tag specifies the message encryption algorithm to be used in S/MIME.
 *
 * @par Used with
 *    To be implemented.
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_MESSAGE_ENCRYPTION_REF().
 */
1581
tag_typedef_t nutag_smime_message_encryption =
Pekka Pessi's avatar
Pekka Pessi committed
1582 1583
  STRTAG_TYPEDEF(smime_message_encryption);

1584
/**@def NUTAG_SMIME_MESSAGE_ENCRYPTION_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608
 * Reference tag for NUTAG_SMIME_MESSAGE_ENCRYPTION().
 */


/**@def NUTAG_SIPS_URL(x)
 *
 * Local SIPS url.
 *
 * The application can specify an alternative local address for
 * NUA user agent engine. Usually the alternative address is a
 * secure SIP URI (SIPS) used with TLS transport.
 *
 * @par Used with
 *    nua_create()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_SIPS_URL_REF().
 */
tag_typedef_t nutag_sips_url = URLTAG_TYPEDEF(sips_url);

1609
/**@def NUTAG_SIPS_URL_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630
 * Reference tag for NUTAG_SIPS_URL().
 */


/**@def NUTAG_CERTIFICATE_DIR(x)
 *
 * X.500 certificate directory
 *
 * @par Used with
 *    nua_create()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated pathname of directory containing agent.pem and cafile.pem files.
 *
 * Corresponding tag taking reference parameter is NUTAG_CERTIFICATE_DIR_REF().
 */
tag_typedef_t nutag_certificate_dir = STRTAG_TYPEDEF(certificate_dir);

1631
/**@def NUTAG_CERTIFICATE_DIR_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651
 * Reference tag for NUTAG_CERTIFICATE_DIR().
 */


/**@def NUTAG_CERTIFICATE_PHRASE(x)
 *
 * Certificate phrase
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_CERTIFICATE_PHRASE_REF().
 */
tag_typedef_t nutag_certificate_phrase = STRTAG_TYPEDEF(certificate_phrase);

1652
/**@def NUTAG_CERTIFICATE_PHRASE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664
 * Reference tag for NUTAG_CERTIFICATE_PHRASE().
 */

extern msg_hclass_t sip_route_class[];

/**@def NUTAG_INITIAL_ROUTE(x)
 *
 * Specify initial route set.
 *
 * The initial route set is used instead or or in addition to the outbound
 * proxy URL given by NUTAG_PROXY(). The NUTAG_INITIAL_ROUTE() accepts a
 * list of parsed @Route header structures, NUTAG_INITIAL_ROUTE_STR() an
1665 1666
 * unparsed string.
 *
Pekka Pessi's avatar
Pekka Pessi committed
1667 1668 1669 1670
 * If a tag list contains multiple NUTAG_INITIAL_ROUTE() or
 * NUTAG_INITIAL_ROUTE_STR() tags, the route set is constructed from them
 * all.
 *
1671 1672 1673
 * The initial route is inserted into request message before the route
 * entries set with SIPTAG_ROUTE() or SIPTAG_ROUTE_STR().
 *
Pekka Pessi's avatar
Pekka Pessi committed
1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690
 * @par Used with
 *    nua_set_params() \n
 *    nua_set_hparams() \n
 *    any handle-specific nua call
 *
 * @par Parameter type
 *    sip_route_t const *
 *
 * @par Values
 *    Linked list of #sip_route_t structures
 *
 * Corresponding tag taking reference parameter is NUTAG_INITIAL_ROUTE_REF().
 *
 * @NEW_1_12_7.
 */
tag_typedef_t nutag_initial_route = SIPEXTHDRTAG_TYPEDEF(initial_route, route);

1691
/**@def NUTAG_INITIAL_ROUTE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706
 * Reference tag for NUTAG_INITIAL_ROUTE().
 */


/**@def NUTAG_INITIAL_ROUTE_STR(x)
 *
 * Specify initial route set.
 *
 * The initial route set is used instead or or in addition to the outbound
 * proxy URL given by NUTAG_PROXY(). The NUTAG_INITIAL_ROUTE() accepts a
 * list of parsed @Route header structures, NUTAG_INITIAL_ROUTE_STR() a
 * unparsed string containing route URIs, quoted with <> and separated by
 * commas.
 *
 * Please note that the syntax requires <> around the @Route URIs if they
1707
 * contain parameters, e.g., "lr".
Pekka Pessi's avatar
Pekka Pessi committed
1708 1709 1710
 *
 * If a tag list contains multiple NUTAG_INITIAL_ROUTE() or
 * NUTAG_INITIAL_ROUTE_STR() tags, the route set is constructed from them
1711
 * all.
Pekka Pessi's avatar
Pekka Pessi committed
1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736
 *
 * The initial route set can be reset with NUTAG_INITIAL_ROUTE(NULL).
 *
 * If a tag list of a request contains SIPTAG_ROUTE() or
 * SIPTAG_ROUTE_STR() tags, the resulting route set will contain first the
 * initial route entries followed by the route URIs given with the
 * SIPTAG_ROUTE()/SIPTAG_ROUTE_STR() tags.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_set_hparams() \n
 *    any handle-specific nua call
 *
 * @par Parameter type
 *    sip_route_t const *
 *
 * @par Values
 *    Linked list of #sip_route_t structures
 *
 * Corresponding tag taking reference parameter is NUTAG_INITIAL_ROUTE_STR_REF().
 *
 * @NEW_1_12_7.
 */
tag_typedef_t nutag_initial_route_str = STRTAG_TYPEDEF(inital_route_str);

1737
/**@def NUTAG_INITIAL_ROUTE_STR_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759
 * Reference tag for NUTAG_INITIAL_ROUTE_STR().
 */


/**@def NUTAG_REGISTRAR(x)
 *
 * Registrar URL
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    url_string_t const * (either char const * or url_t *)
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_REGISTRAR_REF().
 */
tag_typedef_t nutag_registrar = URLTAG_TYPEDEF(registrar);

1760
/**@def NUTAG_REGISTRAR_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786
 * Reference tag for NUTAG_REGISTRAR().
 */


/**@def NUTAG_IDENTITY(x)
 *
 * Registration handle (used with requests and nua_respond()) (NOT YET IMPLEMENTED)
 *
 * When a new request is made or new call is responded, a new identity can
 * be selected with NUTAG_IDENTITY(). The identity comprises of @b From
 * header, initial route set, local contact header and media tags associated
 * with it, soa handle and so on. User can make multiple registrations using
 * multiple identities.
 *
 * @par Used with
 *    nua_invite()
 *
 * @par Parameter type
 *    nua_handle_t *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_IDENTITY_REF().
 */
tag_typedef_t nutag_identity = PTRTAG_TYPEDEF(identity);

1787
/**@def NUTAG_IDENTITY_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820
 * Reference tag for NUTAG_IDENTITY().
 */


/**@def NUTAG_M_DISPLAY(x)
 *
 * Display name for @Contact.
 *
 * Specify display name for the Contact header URI generated for
 * registration request and dialog-creating requests/responses.
 *
 * Note that the display name is not included the request-URI when proxy
 * forwards the request towards the user-agent.
 *
 * @par Used with
 *    nua_register(), nua_set_hparams(), nua_set_params().
 *    nua_invite(), nua_respond(), nua_subscribe(), nua_notify()
 *
 * @par Parameter type
 *    string (char *)
 *
 * @par Values
 *    Valid display name.
 *
 * @sa NUTAG_M_USERNAME(), NUTAG_M_PARAMS(), NUTAG_M_FEATURES(),
 * NUTAG_CALLEE_CAPS().
 *
 * Corresponding tag taking reference parameter is NUTAG_M_DISPLAY_REF().
 *
 * @since New in @VERSION_1_12_2.
 */
tag_typedef_t nutag_m_display = STRTAG_TYPEDEF(m_display);

1821
/**@def NUTAG_M_DISPLAY_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855
 * Reference tag for NUTAG_M_DISPLAY().
 */


/**@def NUTAG_M_USERNAME(x)
 *
 * Username prefix for @Contact.
 *
 * Specify username part for the Contact header URI generated for
 * registration request and dialog-creating requests/responses.
 *
 * Using username, application can make multiple registrations using
 * multiple identities, or it can distinguish between different logical
 * destinations.
 *
 * @par Used with
 *    nua_register(), nua_set_hparams(), nua_set_params().
 *    nua_invite(), nua_respond(), nua_subscribe(), nua_notify()
 *
 * @par Parameter type
 *    string (char *)
 *
 * @par Values
 *    Valid SIP username.
 *
 * @sa NUTAG_M_DISPLAY(), NUTAG_M_PARAMS(), NUTAG_M_FEATURES(),
 * NUTAG_CALLEE_CAPS().
 *
 * Corresponding tag taking reference parameter is NUTAG_M_USERNAME_REF().
 *
 * @since New in @VERSION_1_12_2.
 */
tag_typedef_t nutag_m_username = STRTAG_TYPEDEF(m_username);

1856
/**@def NUTAG_M_USERNAME_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872
 * Reference tag for NUTAG_M_USERNAME().
 */


/**@def NUTAG_M_PARAMS(x)
 *
 * URL parameters for @Contact.
 *
 * Specify URL parameters for the @Contact header URI generated for
 * registration request and dialog-creating requests/responses.
 *
 * Please note that some proxies may remove even the non-transport
 * parameters from the request-URI when they forward the request towards
 * user-agent.
 *
 * @par Used with
1873
 *    nua_register(), nua_set_hparams(), nua_set_params(),
Pekka Pessi's avatar
Pekka Pessi committed
1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890
 *    nua_invite(), nua_respond(), nua_subscribe(), nua_notify()
 *
 * @par Parameter type
 *    string (char *)
 *
 * @par Values
 *    Semicolon-separated URL parameters.
 *
 * @sa NUTAG_M_DISPLAY(), NUTAG_M_USERNAME(), NUTAG_M_FEATURES(),
 * NUTAG_CALLEE_CAPS().
 *
 * Corresponding tag taking reference parameter is NUTAG_M_PARAMS_REF().
 *
 * @since New in @VERSION_1_12_2.
 */
tag_typedef_t nutag_m_params = STRTAG_TYPEDEF(m_params);

1891
/**@def NUTAG_M_PARAMS_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929
 * Reference tag for NUTAG_M_PARAMS().
 */


/**@def NUTAG_M_FEATURES(x)
 *
 * Header parameters for @Contact used in registration.
 *
 * Specify header parameters for the @Contact header generated for
 * registration request and dialog-creating requests/responses. Such header
 * parameters include "q", indicating preference for the @Contact URI, and
 * "expires", indicating the desired expiration time for the registration.
 *
 * Additional header parameters are typically media feature tags, specified in
 * @RFC3840. If NUTAG_CALLEE_CAPS(1) is specified, additional @Contact header
 * parameters are generated based on SDP capabilities and SIP @Allow header.
 *
 * When using the "outbound" extension option, the stack will also add
 * "+sip.instance" and "reg-id" header parameters to the @Contact.
 *
 * @par Used with
 *    nua_register(), nua_set_hparams(), nua_set_params()
 *
 * @par Parameter type
 *    string (char *)
 *
 * @par Values
 *    Semicolon-separated SIP header parameters.
 *
 * @sa NUTAG_M_DISPLAY(), NUTAG_M_USERNAME(), NUTAG_M_PARAMS(),
 * NUTAG_CALLEE_CAPS(), NUTAG_IDENTITY().
 *
 * Corresponding tag taking reference parameter is NUTAG_M_FEATURES_REF().
 *
 * @since New in @VERSION_1_12_2.
 */
tag_typedef_t nutag_m_features = STRTAG_TYPEDEF(m_features);

1930
/**@def NUTAG_M_FEATURES_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1931 1932 1933 1934 1935 1936 1937 1938 1939
 * Reference tag for NUTAG_M_FEATURES().
 */


/**@def NUTAG_INSTANCE(x)
 *
 * Intance identifier.
 *
 * @par Used with
1940
 *    nua_create(), nua_set_params(), nua_get_params(),
Pekka Pessi's avatar
Pekka Pessi committed
1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953
 *    nua_register()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Value
 *    urn:uuid string, a globally unique identifier for this user-agent
 *    instance.
 *
 * Corresponding tag taking reference parameter is NUTAG_INSTANCE_REF().
 */
tag_typedef_t nutag_instance = STRTAG_TYPEDEF(instance);

1954
/**@def NUTAG_INSTANCE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974
 * Reference tag for NUTAG_INSTANCE().
 */


/**@def NUTAG_OUTBOUND(x)
 *
 * Outbound option string.
 *
 * The outbound option string can specify how the NAT traversal is handled.
 * The option tokens are as follows:
 * - "gruuize": try to generate a GRUU contact from REGISTER response
 * - "outbound": use SIP outbound extension (off by default)
 * - "validate": validate registration behind a NAT by sending OPTIONS to self
 * - "natify": try to traverse NAT
 * - "use-rport": use rport to traverse NAT
 * - "options-keepalive": send periodic OPTIONS requests as keepalive messages
 *
 * An option token with "no-" or "not-" prefix turns the option off. For
 * example, if you want to try to traverse NATs but not to use OPTIONS
 * keepalive, use NUTAG_OUTBOUND("natify no-options-keepalive").
1975
 *
Pekka Pessi's avatar
Pekka Pessi committed
1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999
 * An empty string can be passed to let the stack choose the
 * default values for outbound usage (in the 1.12.5 release, the
 * defaults are: "gruuize no-outbound validate use-port options-keepalive").
 *
 * @note
 * Options string is used so that no new tags need to be added when the
 * outbound functionality changes.
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *    nua_set_hparams() \n
 *    nua_get_hparams()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_OUTBOUND_REF().
 */
tag_typedef_t nutag_outbound = STRTAG_TYPEDEF(outbound);

2000
/**@def NUTAG_OUTBOUND_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
 * Reference tag for NUTAG_OUTBOUND().
 */


/*#@def NUTAG_OUTBOUND_SET1(x)
 *
 * Outbound proxy set 1.
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *    nua_set_hparams() \n
 *    nua_get_hparams()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_OUTBOUND_SET1_REF().
 */
tag_typedef_t nutag_outbound_set1 = STRTAG_TYPEDEF(outbound_set1);

2025
/*#@def NUTAG_OUTBOUND_SET1_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049
 * Reference tag for NUTAG_OUTBOUND_SET1().
 */


/*#@def NUTAG_OUTBOUND_SET2(x)
 *
 * Outbound proxy set 2.
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *    nua_set_hparams() \n
 *    nua_get_hparams()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_OUTBOUND_SET2_REF().
 */
tag_typedef_t nutag_outbound_set2 = STRTAG_TYPEDEF(outbound_set2);

2050
/*#@def NUTAG_OUTBOUND_SET2_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074
 * Reference tag for NUTAG_OUTBOUND_SET2().
 */


/*#@def NUTAG_OUTBOUND_SET3(x)
 *
 * Outbound proxy set 3.
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *    nua_set_hparams() \n
 *    nua_get_hparams()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_OUTBOUND_SET3_REF().
 */
tag_typedef_t nutag_outbound_set3 = STRTAG_TYPEDEF(outbound_set3);

2075
/*#@def NUTAG_OUTBOUND_SET3_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099
 * Reference tag for NUTAG_OUTBOUND_SET3().
 */


/*#@def NUTAG_OUTBOUND_SET4(x)
 *
 * Outbound proxy set 4.
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *    nua_set_hparams() \n
 *    nua_get_hparams()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_OUTBOUND_SET4_REF().
 */
tag_typedef_t nutag_outbound_set4 = STRTAG_TYPEDEF(outbound_set4);

2100
/*#@def NUTAG_OUTBOUND_SET4_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2101 2102 2103 2104 2105 2106 2107 2108 2109
 * Reference tag for NUTAG_OUTBOUND_SET4().
 */



/**@def NUTAG_KEEPALIVE(x)
 *
 * Keepalive interval in milliseconds.
 *
2110
 * This setting applies to OPTIONS/STUN keepalives. See documentation
Pekka Pessi's avatar
Pekka Pessi committed
2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122
 * for nua_register() for more detailed information.
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *    nua_set_hparams() \n
 *    nua_get_hparams()
 *
 * @par Parameter type
 *    unsigned int
 *
2123
 * @par Values
Pekka Pessi's avatar
Pekka Pessi committed
2124 2125 2126 2127 2128 2129 2130 2131
 *   - 0 - disable keepalives
 *   - 120000 - default value (120000 milliseconds, 120 seconds)
 *
 * Corresponding tag taking reference parameter is
 * NUTAG_KEEPALIVE_REF().
 */
tag_typedef_t nutag_keepalive = UINTTAG_TYPEDEF(keepalive);

2132
/**@def NUTAG_KEEPALIVE_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152
 * Reference tag for NUTAG_KEEPALIVE().
 */


/**@def NUTAG_KEEPALIVE_STREAM(x)
 *
 * Transport-level keepalive interval for streams.
 *
 * See documentation for nua_register() for more detailed information.
 *
 * @par Used with
 *    nua_register()   \n
 *    nua_set_params() \n
 *    nua_get_params()
 *    nua_set_hparams() \n
 *    nua_get_hparams()
 *
 * @par Parameter type
 *    unsigned int
 *
2153
 * @par Values
Pekka Pessi's avatar
Pekka Pessi committed
2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165
 *
 * Transport-level keepalive interval for streams in milliseconds. If this
 * parameter specified, it takes presedence over value given in
 * NUTAG_KEEPALIVE().
 *
 * Corresponding tag taking reference parameter is
 * NUTAG_KEEPALIVE_STREAM_REF().
 *
 * @todo Actually pass NUTAG_KEEPALIVE_STREAM() to transport layer.
 */
tag_typedef_t nutag_keepalive_stream = UINTTAG_TYPEDEF(keepalive_stream);

2166
/**@def NUTAG_KEEPALIVE_STREAM_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178
 * Reference tag for NUTAG_KEEPALIVE_STREAM().
 */



/**@def NUTAG_USE_DIALOG(x)
 *
 * Ask NUA to create dialog for this handle
 *
 * @par Used with nua calls that send a SIP request
 *
 * @par Parameter type
2179
 *   int (boolean: nonzero is true, zero is false)
Pekka Pessi's avatar
Pekka Pessi committed
2180 2181
 *
 * @par Values
2182 2183
 *    - 0 (false) - do not create a dialog
 *    - 1 (true) - store dialog info
Pekka Pessi's avatar
Pekka Pessi committed
2184 2185 2186 2187 2188
 *
 * Corresponding tag taking reference parameter is NUTAG_USE_DIALOG_REF().
 */
tag_typedef_t nutag_use_dialog = BOOLTAG_TYPEDEF(use_dialog);

2189
/**@def NUTAG_USE_DIALOG_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214
 * Reference tag for NUTAG_USE_DIALOG().
 */


/**@def NUTAG_AUTH(x)
 *
 * Authentication data ("scheme" "realm" "user" "password")
 *
 * @par Used with
 *    nua_authenticate()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated string of format: \n
 *    basic digest scheme:"realm":user:password  \n
 *    @b NOTE the double quotes around realm!
 *    For example: \n
 *	\code Digest:"nokia proxy":xyz:secret \endcode
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTH_REF().
 */
tag_typedef_t nutag_auth = STRTAG_TYPEDEF(auth);

2215
/**@def NUTAG_AUTH_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230
 * Reference tag for NUTAG_AUTH().
 */


/**@def NUTAG_AUTHTIME(x)
 *
 * Lifetime of authentication data in seconds.
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
2231 2232
 *    - 0 (zero) - Use authentication data only for this handle
 *    - nonzero - Lifetime of authentication data in seconds
Pekka Pessi's avatar
Pekka Pessi committed
2233 2234 2235 2236 2237 2238
 *
 * @todo
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTHTIME_REF().
 */
tag_typedef_t nutag_authtime = INTTAG_TYPEDEF(authtime);
Pekka Pessi's avatar
Pekka Pessi committed
2239

2240
/**@def NUTAG_AUTHTIME_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
2241 2242
 * Reference tag for NUTAG_AUTHTIME().
 */
2243

2244

2245

Pekka Pessi's avatar
Pekka Pessi committed
2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259
/**@def NUTAG_EVENT(x)
 *
 * NUA event.
 *
 * @deprecated
 *
 * @par Parameter type
 *    enum nua_event_e
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_EVENT_REF().
 */
tag_typedef_t nutag_event = INTTAG_TYPEDEF(event);
2260

2261
/**@def NUTAG_EVENT_REF(x)