nua_tag.h 44.3 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3
/*
 * This file is part of the Sofia-SIP package
 *
4
 * Copyright (C) 2006 Nokia Corporation.
Pekka Pessi's avatar
Pekka Pessi committed
5 6 7
 *
 * 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
 * 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
 *
 */

Pekka Pessi's avatar
Pekka Pessi committed
25 26
#ifndef NUA_TAG_H
/** Defined when <sofia-sip/nua_tag.h> has been included. */
Pekka Pessi's avatar
Pekka Pessi committed
27
#define NUA_TAG_H
Pekka Pessi's avatar
Pekka Pessi committed
28

Pekka Pessi's avatar
Pekka Pessi committed
29
/**@file sofia-sip/nua_tag.h
30
 * @brief Tags for Sofia-SIP User Agent Library
Pekka Pessi's avatar
Pekka Pessi committed
31 32 33 34 35 36 37
 *
 * @author Pekka Pessi <Pekka.Pessi@nokia.com>
 *
 * @date Created: Mon Feb 19 18:54:26 EET 2001 ppessi
 */

#ifndef SU_TAG_H
38
#include <sofia-sip/su_tag.h>
Pekka Pessi's avatar
Pekka Pessi committed
39 40
#endif
#ifndef SDP_TAG_H
41
#include <sofia-sip/sdp_tag.h>
Pekka Pessi's avatar
Pekka Pessi committed
42 43
#endif
#ifndef URL_TAG_H
44
#include <sofia-sip/url_tag.h>
Pekka Pessi's avatar
Pekka Pessi committed
45 46
#endif
#ifndef SIP_TAG_H
47
#include <sofia-sip/sip_tag.h>
Pekka Pessi's avatar
Pekka Pessi committed
48 49
#endif
#ifndef NTA_TAG_H
50
#include <sofia-sip/nta_tag.h>
Pekka Pessi's avatar
Pekka Pessi committed
51
#endif
52
#ifndef NEA_TAG_H
53
#include <sofia-sip/nea_tag.h>
54
#endif
55
#ifndef SOA_TAG_H
56
#include <sofia-sip/soa_tag.h>
57
#endif
58

59 60
SOFIA_BEGIN_DECLS

61 62 63 64 65
/** NUA agent. */
typedef struct nua_s nua_t;

/** NUA transaction handle. */
typedef struct nua_handle_s nua_handle_t;
Pekka Pessi's avatar
Pekka Pessi committed
66

67
/** List of all NUA tags. */
68
SOFIAPUBVAR tag_type_t nua_tag_list[];
69

70 71
/** Filter tag matching any nua tag. */
#define NUTAG_ANY()          nutag_any, ((tag_value_t)0)
72
SOFIAPUBVAR tag_typedef_t nutag_any;
Pekka Pessi's avatar
Pekka Pessi committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92

/** URL address from application to NUA
 *
 * @par Used with
 *    nua_create() \n
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    other calls that create SIP request
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string \n
 *    Own address for nua_create(), nua_set_params() and nua_get_params(). \n
 *    Target address for other calls.
 *
 * Corresponding tag taking reference parameter is NUTAG_URL_REF
 */
#define NUTAG_URL(x)            nutag_url, urltag_url_v(x)
93
SOFIAPUBVAR tag_typedef_t nutag_url;
Pekka Pessi's avatar
Pekka Pessi committed
94 95

#define NUTAG_URL_REF(x)        nutag_url_ref, urltag_url_vr(&(x))
96
SOFIAPUBVAR tag_typedef_t nutag_url_ref;
Pekka Pessi's avatar
Pekka Pessi committed
97 98 99 100 101 102 103 104 105 106 107 108 109 110

/** Address as a string
 *
 * @par Used with
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    String in form "name <url>"
 *
 * Corresponding tag taking reference parameter is NUTAG_ADDRESS_REF()
 */
#define NUTAG_ADDRESS(x)        nutag_address, tag_str_v(x)
111
SOFIAPUBVAR tag_typedef_t nutag_address;
Pekka Pessi's avatar
Pekka Pessi committed
112 113

#define NUTAG_ADDRESS_REF(x)    nutag_address_ref, tag_str_vr(&(x))
114
SOFIAPUBVAR tag_typedef_t nutag_address_ref;
Pekka Pessi's avatar
Pekka Pessi committed
115

116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
/**Set request retry count.
 *
 * Retry count determines how many times stack will automatically retry
 * after an recoverable error response, like 302, 401 or 407.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    unsigned
 *
 * @par Values
 *    @c 0   Never retry automatically \n
 *
 * Corresponding tag taking reference parameter is NUTAG_RETRY_COUNT_REF()
 */
#define NUTAG_RETRY_COUNT(x)      nutag_retry_count, tag_uint_v(x)
134
SOFIAPUBVAR tag_typedef_t nutag_retry_count;
135 136

#define NUTAG_RETRY_COUNT_REF(x)  nutag_retry_count_ref, tag_uint_vr(&(x))
137
SOFIAPUBVAR tag_typedef_t nutag_retry_count_ref;
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156

/**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
 *    unsigned
 *
 * @par Values
 *    @c 0   Do not allow any subscriptions \n
 *
 * Corresponding tag taking reference parameter is NUTAG_MAX_SUBSCRIPTIONS_REF()
 */
#define NUTAG_MAX_SUBSCRIPTIONS(x)      nutag_max_subscriptions, tag_uint_v(x)
157
SOFIAPUBVAR tag_typedef_t nutag_max_subscriptions;
158 159 160

#define NUTAG_MAX_SUBSCRIPTIONS_REF(x) \
nutag_max_subscriptions_ref, tag_uint_vr(&(x))
161
SOFIAPUBVAR tag_typedef_t nutag_max_subscriptions_ref;
162

Pekka Pessi's avatar
Pekka Pessi committed
163
/** Intentionally undocumented. */
Pekka Pessi's avatar
Pekka Pessi committed
164
#define NUTAG_UICC(x)  nutag_uicc, tag_str_v(x)
165
SOFIAPUBVAR tag_typedef_t nutag_uicc;
Pekka Pessi's avatar
Pekka Pessi committed
166 167

#define NUTAG_UICC_REF(x) nutag_uicc_ref, tag_str_vr(&(x))
168
SOFIAPUBVAR tag_typedef_t nutag_uicc_ref;
Pekka Pessi's avatar
Pekka Pessi committed
169

170
/** Ask NUA to create dialog for this handle
Pekka Pessi's avatar
Pekka Pessi committed
171
 *
172
 * @par Used with nua calls that send a SIP request
Pekka Pessi's avatar
Pekka Pessi committed
173 174 175 176 177
 *
 * @par Parameter type
 *   int
 *
 * @par Values
178 179
 *    @c False (zero) \n
 *    @c True (nonzero)
Pekka Pessi's avatar
Pekka Pessi committed
180
 *
181
 * Corresponding tag taking reference parameter is NUTAG_USE_DIALOG_REF()
Pekka Pessi's avatar
Pekka Pessi committed
182
 */
183
#define NUTAG_USE_DIALOG(x)        nutag_use_dialog, tag_bool_v(x)
184
SOFIAPUBVAR tag_typedef_t nutag_use_dialog;
Pekka Pessi's avatar
Pekka Pessi committed
185

186
#define NUTAG_USE_DIALOG_REF(x)    nutag_use_dialog_ref, tag_bool_vr(&(x))
187
SOFIAPUBVAR tag_typedef_t nutag_use_dialog_ref;
Pekka Pessi's avatar
Pekka Pessi committed
188 189 190 191 192


/* Protocol engine parameters,
 * set by nua_set_params(), get by nua_get_params() */

193
#if 0
Pekka Pessi's avatar
Pekka Pessi committed
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209

/**Pointer to a SDP Offer-Answer session object.
 *
 * Pointer to the media session object.
 *
 * @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_SESSION_REF.
 */
#define NUTAG_SOA_SESSION(x)  nutag_soa_session, tag_ptr_v(x)
210
SOFIAPUBVAR tag_typedef_t nutag_soa_session;
Pekka Pessi's avatar
Pekka Pessi committed
211 212 213

#define NUTAG_SOA_SESSION_REF(x) \
 nutag_soa_session_ref, tag_ptr_vr(&(x),(x))
214
SOFIAPUBVAR tag_typedef_t nutag_soa_session_ref;
Pekka Pessi's avatar
Pekka Pessi committed
215

216 217
#endif

218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
/**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_SESSION_REF.
 */
#define NUTAG_SOA_NAME(x)  nutag_soa_name, tag_str_v(x)
233
SOFIAPUBVAR tag_typedef_t nutag_soa_name;
234 235 236

#define NUTAG_SOA_NAME_REF(x) \
 nutag_soa_name_ref, tag_str_vr(&(x))
237
SOFIAPUBVAR tag_typedef_t nutag_soa_name_ref;
238

239
/**Establish early media session using 183 responses and PRACK requests.
Pekka Pessi's avatar
Pekka Pessi committed
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   False \n
 *    @c !=0 True
 *
 * Corresponding tag taking reference parameter is NUTAG_EARLY_MEDIA_REF()
*/
#define NUTAG_EARLY_MEDIA(x)    nutag_early_media, tag_bool_v(x)
255
SOFIAPUBVAR tag_typedef_t nutag_early_media;
Pekka Pessi's avatar
Pekka Pessi committed
256 257

#define NUTAG_EARLY_MEDIA_REF(x) nutag_early_media_ref, tag_bool_vr(&(x))
258
SOFIAPUBVAR tag_typedef_t nutag_early_media_ref;
Pekka Pessi's avatar
Pekka Pessi committed
259

260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
/**Respond only 183 with 100rel.
 *
 * If this parameter is set, stack uses 100rel only with 183: otherwise, all
 * 1XX responses (except <i>100 Trying</i>) uses 100rel.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int (boolean)
 *
 * @par Values
 *    @c 0   False \n
 *    @c !=0 True
 *
 * Corresponding tag taking reference parameter is NUTAG_ONLY183_100REL_REF()
*/
#define NUTAG_ONLY183_100REL(x)    nutag_only183_100rel, tag_bool_v(x)
SOFIAPUBVAR tag_typedef_t nutag_only183_100rel;

#define NUTAG_ONLY183_100REL_REF(x) nutag_only183_100rel_ref, tag_bool_vr(&(x))
SOFIAPUBVAR tag_typedef_t nutag_only183_100rel_ref;

Pekka Pessi's avatar
Pekka Pessi committed
284 285 286 287 288 289 290 291 292 293
/** 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() \n
 *    nua_get_params()
 *
 * @par Parameter type
Pekka Pessi's avatar
Pekka Pessi committed
294
 *    int (enum nua_af)
Pekka Pessi's avatar
Pekka Pessi committed
295 296 297 298 299 300 301 302
 *
 * @par Values
 *    @c 0  no timer \n
 *    @c >0 timer in seconds
 *
 * Corresponding tag taking reference parameter is NUTAG_INVITE_TIMER_REF()
 */
#define NUTAG_INVITE_TIMER(x)  nutag_invite_timer, tag_uint_v((x))
303
SOFIAPUBVAR tag_typedef_t nutag_invite_timer;
Pekka Pessi's avatar
Pekka Pessi committed
304 305

#define NUTAG_INVITE_TIMER_REF(x) nutag_invite_timer_ref, tag_uint_vr(&(x))
306
SOFIAPUBVAR tag_typedef_t nutag_invite_timer_ref;
Pekka Pessi's avatar
Pekka Pessi committed
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326

/**Default session timer in seconds.
 *
 * Set default session timer in seconds when using session timer extension.
 * Re-INVITE will be sent in given intervals.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *    @c 0  disable \n
 *    @c >0 interval in seconds
 *
 * Corresponding tag taking reference parameter is NUTAG_SESSION_TIMER_REF()
 */
#define NUTAG_SESSION_TIMER(x)  nutag_session_timer, tag_uint_v((x))
327
SOFIAPUBVAR tag_typedef_t nutag_session_timer;
Pekka Pessi's avatar
Pekka Pessi committed
328 329

#define NUTAG_SESSION_TIMER_REF(x) nutag_session_timer_ref, tag_uint_vr((&(x)))
330
SOFIAPUBVAR tag_typedef_t nutag_session_timer_ref;
Pekka Pessi's avatar
Pekka Pessi committed
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348

/** Minimum acceptable refresh interval for session.
 *
 * Specifies the value of Min-SE header in seconds.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *    interval in seconds.
 *
 * Corresponding tag taking reference parameter is NUTAG_MIN_SE_REF()
*/
#define NUTAG_MIN_SE(x)         nutag_min_se, tag_uint_v((x))
349
SOFIAPUBVAR tag_typedef_t nutag_min_se;
Pekka Pessi's avatar
Pekka Pessi committed
350 351

#define NUTAG_MIN_SE_REF(x)     nutag_min_se_ref, tag_uint_vr((&(x)))
352
SOFIAPUBVAR tag_typedef_t nutag_min_se_ref;
Pekka Pessi's avatar
Pekka Pessi committed
353 354

enum nua_session_refresher {
355
  nua_no_refresher, nua_local_refresher, nua_remote_refresher, nua_any_refresher
Pekka Pessi's avatar
Pekka Pessi committed
356 357 358 359 360 361 362 363 364 365 366
};

/** Specify preferred refresher.
 *
 * Specify for session timer extension which party is the preferred refresher.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
367 368
 *   enum { #nua_no_refresher,  #nua_local_refresher, #nua_remote_refresher,
 *          #nua_any_refresher }
Pekka Pessi's avatar
Pekka Pessi committed
369 370
 *
 * @par Values
371
 *    @c nua_no_refresher (session timers are disabled) \n
Pekka Pessi's avatar
Pekka Pessi committed
372
 *    @c nua_local_refresher \n
373 374
 *    @c nua_remote_refresher \n
 *    @c nua_any_refresher (default) \n
Pekka Pessi's avatar
Pekka Pessi committed
375 376 377 378
 *
 * Corresponding tag taking reference parameter is NUTAG_SESSION_REFRESHER_REF()
 */
#define NUTAG_SESSION_REFRESHER(x)  nutag_session_refresher, tag_int_v((x))
379
SOFIAPUBVAR tag_typedef_t nutag_session_refresher;
Pekka Pessi's avatar
Pekka Pessi committed
380 381

#define NUTAG_SESSION_REFRESHER_REF(x) nutag_session_refresher_ref, tag_int_vr((&(x)))
382
SOFIAPUBVAR tag_typedef_t nutag_session_refresher_ref;
Pekka Pessi's avatar
Pekka Pessi committed
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399

/** Use UPDATE as refresh method.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    boolean
 *
 * @par Values
 *    @c 1 Use UPDATE \n
 *    @c 0 Use INVITE
 *
 * Corresponding tag taking reference parameter is NUTAG_UPDATE_REFRESH_REF()
 */
#define NUTAG_UPDATE_REFRESH(x)  nutag_update_refresh, tag_bool_v((x))
400
SOFIAPUBVAR tag_typedef_t nutag_update_refresh;
Pekka Pessi's avatar
Pekka Pessi committed
401 402

#define NUTAG_UPDATE_REFRESH_REF(x) nutag_update_refresh_ref, tag_bool_vr((&(x)))
403
SOFIAPUBVAR tag_typedef_t nutag_update_refresh_ref;
Pekka Pessi's avatar
Pekka Pessi committed
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419

/** Send alerting (180 Ringing) automatically
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   No automatic sending of "180 Ringing" \n
 *    @c !=0 "180 Ringing" sent automatically
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTOALERT_REF()
 */
420
#define NUTAG_AUTOALERT(x)      nutag_autoalert, tag_bool_v(x)
421
SOFIAPUBVAR tag_typedef_t nutag_autoalert;
Pekka Pessi's avatar
Pekka Pessi committed
422

423
#define NUTAG_AUTOALERT_REF(x)  nutag_autoalert_ref, tag_bool_vr(&(x))
424
SOFIAPUBVAR tag_typedef_t nutag_autoalert_ref;
Pekka Pessi's avatar
Pekka Pessi committed
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440

/** ACK automatically
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0    No automatic sending of ACK \n
 *    @c !=0 ACK sent automatically
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTOACK_REF()
 */
441
#define NUTAG_AUTOACK(x)        nutag_autoack, tag_bool_v(x)
442
SOFIAPUBVAR tag_typedef_t nutag_autoack;
Pekka Pessi's avatar
Pekka Pessi committed
443

444
#define NUTAG_AUTOACK_REF(x)    nutag_autoack_ref, tag_bool_vr(&(x))
445
SOFIAPUBVAR tag_typedef_t nutag_autoack_ref;
Pekka Pessi's avatar
Pekka Pessi committed
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461

/** Answer (200 Ok) automatically to incoming call
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0    No automatic sending of "200 Ok" \n
 *    @c !=0 "200 Ok" sent automatically
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTOANSWER_REF()
 */
462
#define NUTAG_AUTOANSWER(x)     nutag_autoanswer, tag_bool_v(x)
463
SOFIAPUBVAR tag_typedef_t nutag_autoanswer;
Pekka Pessi's avatar
Pekka Pessi committed
464

465
#define NUTAG_AUTOANSWER_REF(x) nutag_autoanswer_ref, tag_bool_vr(&(x))
466
SOFIAPUBVAR tag_typedef_t nutag_autoanswer_ref;
Pekka Pessi's avatar
Pekka Pessi committed
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482

/** Enable incoming INVITE
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   Incoming INVITE not enabled. NUA answers 403 Forbidden \n
 *    @c !=0 Incoming INVITE enabled
 *
 * Corresponding tag taking reference parameter is NUTAG_ENABLEINVITE_REF()
 */
483
#define NUTAG_ENABLEINVITE(x)   nutag_enableinvite, tag_bool_v(x)
484
SOFIAPUBVAR tag_typedef_t nutag_enableinvite;
Pekka Pessi's avatar
Pekka Pessi committed
485

486
#define NUTAG_ENABLEINVITE_REF(x) nutag_enableinvite_ref, tag_bool_vr(&(x))
487
SOFIAPUBVAR tag_typedef_t nutag_enableinvite_ref;
Pekka Pessi's avatar
Pekka Pessi committed
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503

/** Enable incoming MESSAGE
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   Incoming MESSAGE not enabled. NUA answers 403 Forbidden \n
 *    @c !=0 Incoming MESSAGE enabled
 *
 * Corresponding tag taking reference parameter is NUTAG_ENABLEMESSAGE_REF()
 */
504
#define NUTAG_ENABLEMESSAGE(x)  nutag_enablemessage, tag_bool_v(x)
505
SOFIAPUBVAR tag_typedef_t nutag_enablemessage;
Pekka Pessi's avatar
Pekka Pessi committed
506

507
#define NUTAG_ENABLEMESSAGE_REF(x) nutag_enablemessage_ref, tag_bool_vr(&(x))
508
SOFIAPUBVAR tag_typedef_t nutag_enablemessage_ref;
Pekka Pessi's avatar
Pekka Pessi committed
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526

/** Enable incoming MESSAGE with To tag.
 *
 * Set this parameter if you want to chat with Windows Messenger.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   False \n
 *    @c !=0 True
 *
 * Corresponding tag taking reference parameter is NUTAG_ENABLEMESSENGER_REF()
 */
527
#define NUTAG_ENABLEMESSENGER(x)  nutag_enablemessenger, tag_bool_v(x)
528
SOFIAPUBVAR tag_typedef_t nutag_enablemessenger;
Pekka Pessi's avatar
Pekka Pessi committed
529 530

#define NUTAG_ENABLEMESSENGER_REF(x) \
531
  nutag_enablemessenger_ref, tag_bool_vr(&(x))
532
SOFIAPUBVAR tag_typedef_t nutag_enablemessenger_ref;
Pekka Pessi's avatar
Pekka Pessi committed
533 534 535 536 537 538 539 540 541 542 543

/* Start NRC Boston */

/** Enable S/MIME
 *
 * @par Used with
 *    nua_create() \n
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
Pekka Pessi's avatar
Pekka Pessi committed
544
 *    boolean
Pekka Pessi's avatar
Pekka Pessi committed
545 546 547 548 549 550 551 552
 *
 * @par Values
 *    @c 0   S/MIME is Disabled \n
 *    @c !=0 S/MIME is Enabled
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_ENABLE_REF()
 */
#define NUTAG_SMIME_ENABLE(x)  nutag_smime_enable, tag_bool_v(x)
553
SOFIAPUBVAR tag_typedef_t nutag_smime_enable;
Pekka Pessi's avatar
Pekka Pessi committed
554 555

#define NUTAG_SMIME_ENABLE_REF(x) nutag_smime_enable_ref, tag_bool_vr(&(x))
556
SOFIAPUBVAR tag_typedef_t nutag_smime_enable_ref;
Pekka Pessi's avatar
Pekka Pessi committed
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579

/** 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
 *   @c -1 (SM_ID_NULL) No security service needed \n
 *   @c  0 (SM_ID_CLEAR_SIGN) Clear signing \n
 *   @c  1 (SM_ID_SIGN) S/MIME signing \n
 *   @c  2 (SM_ID_ENCRYPT) S/MIME encryption
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_OPT_REF()
 */
#define NUTAG_SMIME_OPT(x)  nutag_smime_opt, tag_int_v(x)
580
SOFIAPUBVAR tag_typedef_t nutag_smime_opt;
Pekka Pessi's avatar
Pekka Pessi committed
581 582

#define NUTAG_SMIME_OPT_REF(x) nutag_smime_opt_ref, tag_int_vr(&(x))
583
SOFIAPUBVAR tag_typedef_t nutag_smime_opt_ref;
Pekka Pessi's avatar
Pekka Pessi committed
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607

/* End NRC Boston */

/** 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
 *   @c -1 (SM_MODE_NULL) Unspecified \n
 *   @c  0 (SM_MODE_PAYLOAD_ONLY) SIP payload only \n
 *   @c  1 (SM_MODE_TUNNEL) SIP tunneling mode \n
 *   @c  2 (SM_MODE_SIPFRAG) SIPfrag protection
 *
 * Corresponding tag taking reference parameter is NUTAG_SMIME_PROTECTION_MODE_REF()
 */
#define NUTAG_SMIME_PROTECTION_MODE(x) nutag_smime_protection_mode, tag_uint_v(x)
608
SOFIAPUBVAR tag_typedef_t nutag_smime_protection_mode;
Pekka Pessi's avatar
Pekka Pessi committed
609 610 611

#define NUTAG_SMIME_PROTECTION_MODE_REF(x) \
           nutag_smime_protection_mode_ref, tag_uint_vr(&(x))
612
SOFIAPUBVAR tag_typedef_t nutag_smime_protection_mode_ref;
Pekka Pessi's avatar
Pekka Pessi committed
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628

/** 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()
 */
#define NUTAG_SMIME_MESSAGE_DIGEST(x) nutag_smime_message_digest, tag_str_v(x)
629
SOFIAPUBVAR tag_typedef_t nutag_smime_message_digest;
Pekka Pessi's avatar
Pekka Pessi committed
630 631 632

#define NUTAG_SMIME_MESSAGE_DIGEST_REF(x) \
            nutag_smime_message_digest_ref, tag_str_vr((&x))
633
SOFIAPUBVAR tag_typedef_t nutag_smime_message_digest_ref;
Pekka Pessi's avatar
Pekka Pessi committed
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649

/** 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()
 */
#define NUTAG_SMIME_SIGNATURE(x) nutag_smime_signature, tag_str_v(x)
650
SOFIAPUBVAR tag_typedef_t nutag_smime_signature;
Pekka Pessi's avatar
Pekka Pessi committed
651 652 653

#define NUTAG_SMIME_SIGNATURE_REF(x) \
            nutag_smime_signature_ref, tag_str_vr((&x))
654
SOFIAPUBVAR tag_typedef_t nutag_smime_signature_ref;
Pekka Pessi's avatar
Pekka Pessi committed
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670

/** 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()
 */
#define NUTAG_SMIME_KEY_ENCRYPTION(x) nutag_smime_key_encryption, tag_str_v(x)
671
SOFIAPUBVAR tag_typedef_t nutag_smime_key_encryption;
Pekka Pessi's avatar
Pekka Pessi committed
672 673 674

#define NUTAG_SMIME_KEY_ENCRYPTION_REF(x) \
          nutag_smime_key_encryption_ref, tag_str_vr((&x))
675
SOFIAPUBVAR tag_typedef_t nutag_smime_key_encryption_ref;
Pekka Pessi's avatar
Pekka Pessi committed
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691

/** 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()
 */
#define NUTAG_SMIME_MESSAGE_ENCRYPTION(x) nutag_smime_message_encryption, tag_str_v(x)
692
SOFIAPUBVAR tag_typedef_t nutag_smime_message_encryption;
Pekka Pessi's avatar
Pekka Pessi committed
693 694 695

#define NUTAG_SMIME_MESSAGE_ENCRYPTION_REF(x) \
           nutag_smime_message_encryption_ref, tag_str_vr((&x))
696
SOFIAPUBVAR tag_typedef_t nutag_smime_message_encryption_ref;
Pekka Pessi's avatar
Pekka Pessi committed
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711

/** 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()
 */
#define NUTAG_CERTIFICATE_DIR(x) nutag_certificate_dir, tag_str_v(x)
712
SOFIAPUBVAR tag_typedef_t nutag_certificate_dir;
Pekka Pessi's avatar
Pekka Pessi committed
713 714 715

#define NUTAG_CERTIFICATE_DIR_REF(x) \
          nutag_certificate_dir_ref, tag_str_vr((&x))
716
SOFIAPUBVAR tag_typedef_t nutag_certificate_dir_ref;
Pekka Pessi's avatar
Pekka Pessi committed
717 718 719 720 721 722 723 724 725 726 727 728 729 730

/** 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()
 */
#define NUTAG_CERTIFICATE_PHRASE(x) nutag_certificate_phrase, tag_str_v(x)
731
SOFIAPUBVAR tag_typedef_t nutag_certificate_phrase;
Pekka Pessi's avatar
Pekka Pessi committed
732 733 734

#define NUTAG_CERTIFICATE_PHRASE_REF(x) \
          nutag_certificate_phrase_ref, tag_str_vr((&x))
735
SOFIAPUBVAR tag_typedef_t nutag_certificate_phrase_ref;
Pekka Pessi's avatar
Pekka Pessi committed
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753

/** 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()
 */
#define NUTAG_SIPS_URL(x)       nutag_sips_url, urltag_url_v(x)
754
SOFIAPUBVAR tag_typedef_t nutag_sips_url;
Pekka Pessi's avatar
Pekka Pessi committed
755 756

#define NUTAG_SIPS_URL_REF(x)   nutag_sips_url_ref, urltag_url_vr(&(x))
757
SOFIAPUBVAR tag_typedef_t nutag_sips_url_ref;
Pekka Pessi's avatar
Pekka Pessi committed
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792

/** Outbound proxy URL
 *
 * Same tag as NTATAG_DEFAULT_PROXY
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_create()
 *
 * @par Parameter type
 *    url_string_t const * (either char const * or url_t *)
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_PROXY_REF()
 */
#define NUTAG_PROXY(x)          NTATAG_DEFAULT_PROXY(x)
#define NUTAG_PROXY_REF(x)      NTATAG_DEFAULT_PROXY_REF(x)
#define nutag_proxy             ntatag_default_proxy

/** 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()
 */
#define NUTAG_REGISTRAR(x)      nutag_registrar, urltag_url_v(x)
793
SOFIAPUBVAR tag_typedef_t nutag_registrar;
Pekka Pessi's avatar
Pekka Pessi committed
794 795

#define NUTAG_REGISTRAR_REF(x)  nutag_registrar_ref, urltag_url_vr(&(x))
796
SOFIAPUBVAR tag_typedef_t nutag_registrar_ref;
Pekka Pessi's avatar
Pekka Pessi committed
797

798
/** Outbound option string.
799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815
 *
 * The outbound option string can specify how the NAT traversal is handled.
 * The option tokens are as follows:
 * - "gruuize": try to generate a GRUU
 * - "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").
 *
 * @note
 * Options string is used so that no new tags need to be added when the
 * outbound functionality changes.
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831
 *
 * @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()
 */
#define NUTAG_OUTBOUND(x)      nutag_outbound, tag_str_v(x)
832
SOFIAPUBVAR tag_typedef_t nutag_outbound;
833 834

#define NUTAG_OUTBOUND_REF(x)  nutag_outbound_ref, tag_str_vr(&(x))
835
SOFIAPUBVAR tag_typedef_t nutag_outbound_ref;
836

837 838
#if notyet

839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855
/** 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()
 */
#define NUTAG_OUTBOUND_SET1(x)      nutag_outbound_set1, tag_str_v(x)
856
SOFIAPUBVAR tag_typedef_t nutag_outbound_set1;
857 858

#define NUTAG_OUTBOUND_SET1_REF(x)  nutag_outbound_set1_ref, tag_str_vr(&(x))
859
SOFIAPUBVAR tag_typedef_t nutag_outbound_set1_ref;
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877

/** 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()
 */
#define NUTAG_OUTBOUND_SET2(x)      nutag_outbound_set2, tag_str_v(x)
878
SOFIAPUBVAR tag_typedef_t nutag_outbound_set2;
879 880

#define NUTAG_OUTBOUND_SET2_REF(x)  nutag_outbound_set2_ref, tag_str_vr(&(x))
881
SOFIAPUBVAR tag_typedef_t nutag_outbound_set2_ref;
882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899

/** 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()
 */
#define NUTAG_OUTBOUND_SET3(x)      nutag_outbound_set3, tag_str_v(x)
900
SOFIAPUBVAR tag_typedef_t nutag_outbound_set3;
901 902

#define NUTAG_OUTBOUND_SET3_REF(x)  nutag_outbound_set3_ref, tag_str_vr(&(x))
903
SOFIAPUBVAR tag_typedef_t nutag_outbound_set3_ref;
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921

/** 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()
 */
#define NUTAG_OUTBOUND_SET4(x)      nutag_outbound_set4, tag_str_v(x)
922
SOFIAPUBVAR tag_typedef_t nutag_outbound_set4;
923 924

#define NUTAG_OUTBOUND_SET4_REF(x)  nutag_outbound_set4_ref, tag_str_vr(&(x))
925
SOFIAPUBVAR tag_typedef_t nutag_outbound_set4_ref;
926

927 928
#endif	/* ...notyet */

Pekka Pessi's avatar
Pekka Pessi committed
929 930 931 932 933 934
/** Pointer to SIP parser structure
 *
 * @par Used with
 *    nua_create()
 *
 * @par Parameter type
Pekka Pessi's avatar
Pekka Pessi committed
935
 *    msg_mclass_t *
Pekka Pessi's avatar
Pekka Pessi committed
936 937
 *
 * @par Values
938
 *    Pointer to an extended SIP parser.
Pekka Pessi's avatar
Pekka Pessi committed
939
 *
940 941 942
 * @sa msg_mclass_clone(), msg_mclass_insert_header()
 *
 * Corresponding tag taking reference parameter is NUTAG_SIP_PARSER_REF().
Pekka Pessi's avatar
Pekka Pessi committed
943
 */
944 945
#define NUTAG_SIP_PARSER(x)     NTATAG_MCLASS(x)
#define NUTAG_SIP_PARSER_REF(x) NTATAG_MCLASS_REF(x)
Pekka Pessi's avatar
Pekka Pessi committed
946

Pekka Pessi's avatar
Pekka Pessi committed
947
/** Authentication data ("scheme" "realm" "user" "password")
Pekka Pessi's avatar
Pekka Pessi committed
948 949 950 951 952 953 954 955
 *
 * @par Used with
 *    nua_authenticate()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
Pekka Pessi's avatar
Pekka Pessi committed
956 957
 *    NULL terminated string of format: \n
 *    basic digest scheme:"realm":user:password  \n
958
 *    @b NOTE the double quotes around realm!
Pekka Pessi's avatar
Pekka Pessi committed
959 960
 *    For example: \n
 *	\code Digest:"nokia proxy":xyz:secret \endcode
Pekka Pessi's avatar
Pekka Pessi committed
961 962 963 964
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTH_REF()
 */
#define NUTAG_AUTH(x)		nutag_auth, tag_str_v(x)
965
SOFIAPUBVAR tag_typedef_t nutag_auth;
Pekka Pessi's avatar
Pekka Pessi committed
966 967

#define NUTAG_AUTH_REF(x)	    nutag_auth_ref, tag_str_vr(&(x))
968
SOFIAPUBVAR tag_typedef_t nutag_auth_ref;
Pekka Pessi's avatar
Pekka Pessi committed
969

970
/** Keepalive interval in milliseconds.
971 972 973 974 975 976 977 978 979 980 981 982 983
 *
 * @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
 *
 * @par Values 
 *   - 0 - disable keepalives
984
 *   - 120000 - default value (120000 milliseconds, 120 seconds)
985 986 987 988 989
 *
 * Corresponding tag taking reference parameter is
 * NUTAG_KEEPALIVE_REF()
 */
#define NUTAG_KEEPALIVE(x) nutag_keepalive, tag_uint_v(x)
990
SOFIAPUBVAR tag_typedef_t nutag_keepalive;
991 992

#define NUTAG_KEEPALIVE_REF(x) nutag_keepalive_ref, tag_uint_vr(&(x))
993
SOFIAPUBVAR tag_typedef_t nutag_keepalive_ref;
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007

/** Transport-level keepalive interval for streams.
 *
 * @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
 *
 * @par Values 
1008 1009 1010 1011
 *
 * Transport-level keepalive interval for streams in milliseconds. If this
 * parameter specified, it takes presedence over value given in
 * NUTAG_KEEPALIVE().
1012 1013 1014
 *
 * Corresponding tag taking reference parameter is
 * NUTAG_KEEPALIVE_STREAM_REF()
1015 1016
 *
 * @todo Actually pass NUTAG_KEEPALIVE_STREAM() to transport layer.
1017 1018
 */
#define NUTAG_KEEPALIVE_STREAM(x) nutag_keepalive_stream, tag_uint_v(x)
1019
SOFIAPUBVAR tag_typedef_t nutag_keepalive_stream;
1020 1021 1022

#define NUTAG_KEEPALIVE_STREAM_REF(x) \
nutag_keepalive_stream_ref, tag_uint_vr(&(x))
1023
SOFIAPUBVAR tag_typedef_t nutag_keepalive_stream_ref;
1024

Pekka Pessi's avatar
Pekka Pessi committed
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039
/** Lifetime of authentication data in seconds.
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *    @c 0   Use authentication data only for this handle \n
 *    @c !=0 Lifetime in seconds
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTHTIME_REF()
 */
#define NUTAG_AUTHTIME(x)	nutag_authtime, tag_uint_v(x)
1040
SOFIAPUBVAR tag_typedef_t nutag_authtime;
Pekka Pessi's avatar
Pekka Pessi committed
1041 1042

#define NUTAG_AUTHTIME_REF(x)	nutag_authtime_ref, tag_uint_vr(&(x))
1043
SOFIAPUBVAR tag_typedef_t nutag_authtime_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057

/** Events
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    void *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_EVENT_REF()
 */
#define NUTAG_EVENT(x)          nutag_event, tag_ptr_v(x)
1058
SOFIAPUBVAR tag_typedef_t nutag_event;
Pekka Pessi's avatar
Pekka Pessi committed
1059 1060

#define NUTAG_EVENT_REF(x)      nutag_event_ref, tag_ptr_vr(&(x),(x))
1061
SOFIAPUBVAR tag_typedef_t nutag_event_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071

/** Response status code
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
Pekka Pessi's avatar
Pekka Pessi committed
1072 1073 1074 1075 1076 1077 1078
 * 100 - preliminary response, request is being processed by next hop \n
 * 1XX - preliminary response, request is being processed by UAS \n
 * 2XX - successful final response \n
 * 3XX - redirection error response \n
 * 4XX - client error response \n
 * 5XX - server error response \n
 * 6XX - global error response \n
Pekka Pessi's avatar
Pekka Pessi committed
1079 1080 1081 1082
 *
 * Corresponding tag taking reference parameter is NUTAG_STATUS_REF()
 */
#define NUTAG_STATUS(x)         nutag_status, tag_uint_v(x)
1083
SOFIAPUBVAR tag_typedef_t nutag_status;
Pekka Pessi's avatar
Pekka Pessi committed
1084 1085

#define NUTAG_STATUS_REF(x)     nutag_status_ref, tag_uint_vr(&(x))
1086
SOFIAPUBVAR tag_typedef_t nutag_status_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100

/** Response phrase
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_PHRASE_REF()
 */
#define NUTAG_PHRASE(x)         nutag_phrase, tag_str_v(x)
1101
SOFIAPUBVAR tag_typedef_t nutag_phrase;
Pekka Pessi's avatar
Pekka Pessi committed
1102 1103

#define NUTAG_PHRASE_REF(x)     nutag_phrase_ref, tag_str_vr(&(x))
1104
SOFIAPUBVAR tag_typedef_t nutag_phrase_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118

/** NUA Handle
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    nua_handle_t *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_HANDLE_REF()
 */
#define NUTAG_HANDLE(x)         nutag_handle, nutag_handle_v(x)
1119
SOFIAPUBVAR tag_typedef_t nutag_handle;
Pekka Pessi's avatar
Pekka Pessi committed
1120 1121

#define NUTAG_HANDLE_REF(x)     nutag_handle_ref, nutag_handle_vr(&(x))
1122
SOFIAPUBVAR tag_typedef_t nutag_handle_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1123

1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142
/** Registration handle (used with requests and nua_respond())
 *
 * 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()
*/
#define NUTAG_IDENTITY(x)   nutag_identity, nutag_handle_v(x)
1143
SOFIAPUBVAR tag_typedef_t nutag_identity;
1144 1145

#define NUTAG_IDENTITY_REF(x) nutag_identity_ref, nutag_handle_vr(&(x))
1146
SOFIAPUBVAR tag_typedef_t nutag_identity_ref;
1147

1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162
/**Intance identifier.
 *
 * @par Used with
 *    nua_create(), nua_set_params(), nua_get_params(), 
 *    nua_register()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Value
 *    urn:uuid string.
 *
 * Corresponding tag taking reference parameter is NUTAG_INSTANCE_REF()
 */
#define NUTAG_INSTANCE(x)        nutag_instance, tag_str_v(x)
1163
SOFIAPUBVAR tag_typedef_t nutag_instance;
1164 1165

#define NUTAG_INSTANCE_REF(x)    nutag_instance_ref, tag_str_vr(&(x))
1166
SOFIAPUBVAR tag_typedef_t nutag_instance_ref;
1167

Pekka Pessi's avatar
Pekka Pessi committed
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187
/** Refer reply handle (used with refer)
 *
 * When making a call in response to a REFER request [RFC3515] with
 * nua_invite(), the application can ask NUA to automatically generate
 * notifications about the call progress to the referrer. In order to
 * do that the application should pass to the stack the handle, which
 * it used to receive the REFER request. It should also pass the event
 * header object along with the handle using NUTAG_REFER_EVENT().
 *
 * @par Used with
 *    nua_invite()
 *
 * @par Parameter type
 *    nua_handle_t *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_NOTIFY_REFER_REF()
*/
#define NUTAG_NOTIFY_REFER(x)   nutag_notify_refer, nutag_handle_v(x)
1188
SOFIAPUBVAR tag_typedef_t nutag_notify_refer;
Pekka Pessi's avatar
Pekka Pessi committed
1189 1190

#define NUTAG_NOTIFY_REFER_REF(x) nutag_notify_refer_ref, nutag_handle_vr(&(x))
1191
SOFIAPUBVAR tag_typedef_t nutag_notify_refer_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212

/** Event used with automatic refer notifications.
 *
 * When creating a call in response to a REFER request [RFC3515]
 * the application can ask NUA to automatically generate notifications
 * about the call progress to the referrer. The #nua_i_refer event will
 * contain a suitable SIP event header for the notifications in the
 * NUTAG_REFER_EVENT() tag. The application should store the SIP event
 * header and when it makes the referred call, it should pass it back
 * to the stack again using the NUTAG_REFER_EVENT() tag.
 *
 * @par Used with
 *
 * @par Parameter type
 *    sip_event_t *
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_REFER_EVENT_REF()
 */
#define NUTAG_REFER_EVENT(x)   nutag_refer_event, siptag_event_v(x)
1213
SOFIAPUBVAR tag_typedef_t nutag_refer_event;
Pekka Pessi's avatar
Pekka Pessi committed
1214 1215

#define NUTAG_REFER_EVENT_REF(x) nutag_refer_event_ref, siptag_event_vr(&(x))
1216
SOFIAPUBVAR tag_typedef_t nutag_refer_event_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237

/** Invite pauses referrer's handle.
 *
 * When creating a call in response to a REFER [RFC3515] request,
 * the application can ask that the original call will be muted
 * when the new call is connected by specifying NUTAG_REFER_PAUSE()
 * along with NUTAG_NOTIFY_REFER() as a parameter to nua_invite() call.
 *
 * @par Used with
 *    nua_invite()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   False
 *    @c !=0 True
 *
 * Corresponding tag taking reference parameter is NUTAG_REFER_PAUSE_REF()
 */
#define NUTAG_REFER_PAUSE(x)   nutag_refer_pause, tag_bool_v(x)
1238
SOFIAPUBVAR tag_typedef_t nutag_refer_pause;
Pekka Pessi's avatar
Pekka Pessi committed
1239 1240

#define NUTAG_REFER_PAUSE_REF(x) nutag_refer_pause_ref, tag_bool_vr(&(x))
1241
SOFIAPUBVAR tag_typedef_t nutag_refer_pause_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259

/** User-Agent string
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    see
 *    <a href="http://www.ietf.org/rfc/rfc3261.txt">RFC 3261</a> \n
 *    default string is of format "nua/2.0"
 *
 * Corresponding tag taking reference parameter is NUTAG_USER_AGENT_REF()
 */
#define NUTAG_USER_AGENT(x)     nutag_user_agent, tag_str_v(x)
1260
SOFIAPUBVAR tag_typedef_t nutag_user_agent;
Pekka Pessi's avatar
Pekka Pessi committed
1261 1262

#define NUTAG_USER_AGENT_REF(x) nutag_user_agent_ref, tag_str_vr(&(x))
1263
SOFIAPUBVAR tag_typedef_t nutag_user_agent_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1264

1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280
/** Allow a method (or methods).
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_set_hparams() \n
 *    any handle-specific nua call
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    Valid method name, or comma-separated list of them.
 *
 * Corresponding tag taking reference parameter is NUTAG_ALLOW_REF()
 */
#define NUTAG_ALLOW(x)     nutag_allow, tag_str_v(x)
1281
SOFIAPUBVAR tag_typedef_t nutag_allow;
1282 1283

#define NUTAG_ALLOW_REF(x) nutag_allow_ref, tag_str_vr(&(x))
1284
SOFIAPUBVAR tag_typedef_t nutag_allow_ref;
1285

1286 1287 1288 1289 1290 1291 1292 1293 1294 1295
/** Call state
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 * - @c nua_callstate_init - Initial state
Pekka Pessi's avatar
Pekka Pessi committed
1296
 * - @c nua_callstate_authenticating - 401/407 received
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307
 * - @c nua_callstate_calling - INVITE sent
 * - @c nua_callstate_proceeding - 18X received
 * - @c nua_callstate_received - INVITE received
 * - @c nua_callstate_early - 18X sent (w/SDP)
 * - @c nua_callstate_ready        - 2XX received or sent
 * - @c nua_callstate_terminating - BYE sent
 * - @c nua_callstate_terminated  - BYE complete
 *
 * Corresponding tag taking reference parameter is NUTAG_CALLSTATE_REF()
 */
#define NUTAG_CALLSTATE(x) nutag_callstate, tag_int_v(x)
1308
SOFIAPUBVAR tag_typedef_t nutag_callstate;
1309 1310

#define NUTAG_CALLSTATE_REF(x) nutag_callstate_ref, tag_int_vr(&(x))
1311
SOFIAPUBVAR tag_typedef_t nutag_callstate_ref;
1312 1313 1314

enum nua_callstate {
  nua_callstate_init,		/**< Initial state */
Pekka Pessi's avatar
Pekka Pessi committed
1315
  nua_callstate_authenticating, /**< 401/407 received */
1316 1317
  nua_callstate_calling,	/**< INVITE sent */
  nua_callstate_proceeding,	/**< 18X received */
1318
  nua_callstate_completing,	/**< 2XX received */
1319 1320
  nua_callstate_received,	/**< INVITE received */
  nua_callstate_early,		/**< 18X sent (w/SDP) */
1321 1322
  nua_callstate_completed,	/**< 2XX sent */
  nua_callstate_ready,		/**< 2XX received, ACK sent, or vice versa */
1323 1324 1325 1326
  nua_callstate_terminating,	/**< BYE sent */
  nua_callstate_terminated	/**< BYE complete */
};

1327
/** Get name for NUA call state */
Pekka Pessi's avatar
Pekka Pessi committed
1328
SOFIAPUBFUN char const *nua_callstate_name(enum nua_callstate state);
1329

Pekka Pessi's avatar
Pekka Pessi committed
1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350
/** Subscription state
 *
 * @par Used with
 *    #nua_r_subscribe \n
 *    #nua_i_notify
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *   @c nua_substate_embryonic (0) \n
 *   @c nua_substate_pending (1) \n
 *   @c nua_substate_active (2) \n
 *   @c nua_substate_terminated	(3) \n
 *
 * see
 * <a href="http://www.ietf.org/rfc/rfc3265.txt">RFC 3265</a>
 *
 * Corresponding tag taking reference parameter is NUTAG_SUBSTATE_REF()
*/
#define NUTAG_SUBSTATE(x) nutag_substate, tag_int_v(x)
1351
SOFIAPUBVAR tag_typedef_t nutag_substate;
Pekka Pessi's avatar
Pekka Pessi committed
1352 1353

#define NUTAG_SUBSTATE_REF(x) nutag_substate_ref, tag_int_vr(&(x))
1354
SOFIAPUBVAR tag_typedef_t nutag_substate_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1355

1356
enum nua_substate {
1357 1358 1359 1360 1361
  nua_substate_extended = nea_extended,
  nua_substate_embryonic = nea_embryonic,
  nua_substate_pending = nea_pending,
  nua_substate_active = nea_active,
  nua_substate_terminated = nea_terminated
Pekka Pessi's avatar
Pekka Pessi committed
1362 1363
};

1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384
/**Default lifetime for implicit subscriptions created by REFER.
 *
 * Default expiration time in seconds for implicit subscriptions created by
 * REFER.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_set_hparams() \n
 *    nua_get_hparams() \n
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *    @c 0  disable \n
 *    @c >0 interval in seconds
 *
 * Corresponding tag taking reference parameter is NUTAG_REFER_EXPIRES()
 */
#define NUTAG_REFER_EXPIRES(x)  nutag_refer_expires, tag_uint_v((x))
1385
SOFIAPUBVAR tag_typedef_t nutag_refer_expires;
1386 1387

#define NUTAG_REFER_EXPIRES_REF(x) nutag_refer_expires_ref, tag_uint_vr((&(x)))
1388
SOFIAPUBVAR tag_typedef_t nutag_refer_expires_ref;
1389

Pekka Pessi's avatar
Pekka Pessi committed
1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410
/** Add media tags from our offer to Accept-Contact headers.
 *
 * Automatically generate Accept-Contact headers for caller
 * preference processing according to our current media capabilities.
 *
 * @par Used with
 *    nua_invite()  \n
 *    nua_update()  \n
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   Do not add media tags \n
 *    @c !=0 Add media tags
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_FEATURES_REF()
 */
#define NUTAG_MEDIA_FEATURES(x) nutag_media_features, tag_bool_v(x)
1411
SOFIAPUBVAR tag_typedef_t nutag_media_features;
Pekka Pessi's avatar
Pekka Pessi committed
1412 1413 1414

#define NUTAG_MEDIA_FEATURES_REF(x) \
          nutag_media_features_ref, tag_bool_vr(&(x))
1415
SOFIAPUBVAR tag_typedef_t nutag_media_features_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1416 1417 1418

/** Add methods and media tags to Contact headers. */
#define NUTAG_CALLEE_CAPS(x) nutag_callee_caps, tag_bool_v(x)
1419
SOFIAPUBVAR tag_typedef_t nutag_callee_caps;
Pekka Pessi's avatar
Pekka Pessi committed
1420 1421 1422

#define NUTAG_CALLEE_CAPS_REF(x) \
          nutag_callee_caps_ref, tag_bool_vr(&(x))
1423
SOFIAPUBVAR tag_typedef_t nutag_callee_caps_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1424 1425 1426 1427 1428 1429 1430 1431 1432

/** If true, add "path" to Supported in REGISTER.
 *
 * @sa <a href="http://www.ietf.org/rfc/rfc3327.txt">RFC 3327</a>,
 * <i>"SIP Extension Header Field for Registering Non-Adjacent Contacts"</i>,
 * D. Willis, B. Hoeneisen,
 * December 2002.
 */
#define NUTAG_PATH_ENABLE(x)   nutag_path_enable, tag_bool_v(x)
1433
SOFIAPUBVAR tag_typedef_t nutag_path_enable;
Pekka Pessi's avatar
Pekka Pessi committed
1434 1435

#define NUTAG_PATH_ENABLE_REF(x) nutag_path_enable_ref, tag_bool_vr(&(x))
1436
SOFIAPUBVAR tag_typedef_t nutag_path_enable_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1437 1438 1439 1440 1441 1442 1443 1444 1445

/** Use route from Service-Route header in response to REGISTER.
 *
 * @sa <a href="http://www.ietf.org/rfc/rfc3327.txt">RFC 3327</a>,
 * <i>"SIP Extension Header Field for Registering Non-Adjacent Contacts"</i>,
 * D. Willis, B. Hoeneisen,
 * December 2002.
 */
#define NUTAG_SERVICE_ROUTE_ENABLE(x) nutag_service_route_enable, tag_bool_v(x)
1446
SOFIAPUBVAR tag_typedef_t nutag_service_route_enable;
Pekka Pessi's avatar
Pekka Pessi committed
1447 1448 1449

#define NUTAG_SERVICE_ROUTE_ENABLE_REF(x) \
          nutag_service_route_enable_ref, tag_bool_vr(&(x))
1450
SOFIAPUBVAR tag_typedef_t nutag_service_route_enable_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466

/** Enable local media (MSS)
 *
 * @par Used with
 *    nua_create()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   False \n
 *    @c !=0 True
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_ENABLE_REF()
*/
#define NUTAG_MEDIA_ENABLE(x) nutag_media_enable, tag_bool_v(x)
1467
SOFIAPUBVAR tag_typedef_t nutag_media_enable;
Pekka Pessi's avatar
Pekka Pessi committed
1468 1469 1470

#define NUTAG_MEDIA_ENABLE_REF(x) \
          nutag_media_enable_ref, tag_bool_vr(&(x))
1471
SOFIAPUBVAR tag_typedef_t nutag_media_enable_ref;
Pekka Pessi's avatar
Pekka Pessi committed
1472

1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483
/** Indicate that SDP offer has been received.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
 *    boolean
 *
 * Corresponding tag taking reference parameter is NUTAG_OFFER_RECV_REF()
 */
#define NUTAG_OFFER_RECV(x) nutag_offer_recv, tag_bool_v(x)
1484
SOFIAPUBVAR tag_typedef_t nutag_offer_recv;
1485 1486

#define NUTAG_OFFER_RECV_REF(x) nutag_offer_recv_ref, tag_bool_vr(&(x))
1487
SOFIAPUBVAR tag_typedef_t nutag_offer_recv_ref;
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499

/** Indicate that SDP answer has been received.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
 *    boolean
 *
 * Corresponding tag taking reference parameter is NUTAG_ANSWER_RECV_REF()
 */
#define NUTAG_ANSWER_RECV(x) nutag_answer_recv, tag_bool_v(x)
1500
SOFIAPUBVAR tag_typedef_t nutag_answer_recv;
1501 1502

#define NUTAG_ANSWER_RECV_REF(x) nutag_answer_recv_ref, tag_bool_vr(&(x))
1503
SOFIAPUBVAR tag_typedef_t nutag_answer_recv_ref;
1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515

/** Indicate that SDP offer has been sent.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
 *    boolean
 *
 * Corresponding tag taking reference parameter is NUTAG_OFFER_SENT_REF()
 */
#define NUTAG_OFFER_SENT(x) nutag_offer_sent, tag_bool_v(x)
1516
SOFIAPUBVAR tag_typedef_t nutag_offer_sent;
1517 1518

#define NUTAG_OFFER_SENT_REF(x) nutag_offer_sent_ref, tag_bool_vr(&(x))
1519
SOFIAPUBVAR tag_typedef_t nutag_offer_sent_ref;
1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531

/** Indicate that SDP answer has been sent.
 *
 * @par Used with
 *    #nua_i_state
 *
 * @par Parameter type
 *    boolean
 *
 * Corresponding tag taking reference parameter is NUTAG_ANSWER_SENT_REF()
 */
#define NUTAG_ANSWER_SENT(x) nutag_answer_sent, tag_bool_v(x)
1532
SOFIAPUBVAR tag_typedef_t nutag_answer_sent;
1533 1534

#define NUTAG_ANSWER_SENT_REF(x) nutag_answer_sent_ref, tag_bool_vr(&(x))
1535
SOFIAPUBVAR tag_typedef_t nutag_answer_sent_ref;
1536

Pekka Pessi's avatar
Pekka Pessi committed
1537 1538 1539 1540 1541 1542 1543 1544
#if SU_HAVE_INLINE
su_inline tag_value_t nutag_handle_v(nua_handle_t *v) { return (tag_value_t)v; }
su_inline tag_value_t nutag_handle_vr(nua_handle_t **vp) {return(tag_value_t)vp;}
#else
#define nutag_handle_v(v)   (tag_value_t)(v)
#define nutag_handle_vr(v)  (tag_value_t)(v)
#endif

Pekka Pessi's avatar
Pekka Pessi committed
1545 1546
/* Tags for compatibility */

1547 1548 1549
#define NUTAG_USE_LEG(x) NUTAG_USE_DIALOG(x)
#define NUTAG_USE_LEG_REF(x) NUTAG_USE_DIALOG_REF(x)

1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568
#define NUTAG_AF(x) SOATAG_AF((x))
#define NUTAG_AF_REF(x) SOATAG_AF_REF((x))

enum nua_af {
  nutag_af_any = SOA_AF_ANY,
  nutag_af_ip4_only = SOA_AF_IP4_ONLY,
  nutag_af_ip6_only = SOA_AF_IP6_ONLY,
  nutag_af_ip4_ip6 = SOA_AF_IP4_IP6,
  nutag_af_ip6_ip4 = SOA_AF_IP6_IP4
};

#define NUTAG_AF_ANY      nutag_af_any
#define NUTAG_AF_IP4_ONLY nutag_af_ip4_only
#define NUTAG_AF_IP6_ONLY nutag_af_ip6_only
#define NUTAG_AF_IP4_IP6  nutag_af_ip4_ip6
#define NUTAG_AF_IP6_IP4  nutag_af_ip6_ip4

#define NUTAG_MEDIA_ADDRESS(x)  SOATAG_ADDRESS((x))
#define NUTAG_MEDIA_ADDRESS_REF(x)   SOATAG_ADDRESS_REF((x))
Pekka Pessi's avatar
Pekka Pessi committed
1569

Pekka Pessi's avatar
Pekka Pessi committed
1570 1571
#define NUTAG_HOLD(x) SOATAG_HOLD((x) ? "*" : NULL)

Pekka Pessi's avatar
Pekka Pessi committed
1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596
#define NUTAG_ACTIVE_AUDIO(x) SOATAG_ACTIVE_AUDIO((x))
#define NUTAG_ACTIVE_AUDIO_REF(x) SOATAG_ACTIVE_AUDIO_REF((x))
#define NUTAG_ACTIVE_VIDEO(x) SOATAG_ACTIVE_VIDEO((x))
#define NUTAG_ACTIVE_VIDEO_REF(x) SOATAG_ACTIVE_VIDEO_REF((x))
#define NUTAG_ACTIVE_IMAGE(x) SOATAG_ACTIVE_IMAGE((x))
#define NUTAG_ACTIVE_IMAGE_REF(x) SOATAG_ACTIVE_IMAGE_REF((x))
#define NUTAG_ACTIVE_CHAT(x) SOATAG_ACTIVE_CHAT((x))
#define NUTAG_ACTIVE_CHAT_REF(x) SOATAG_ACTIVE_CHAT_REF((x))

enum {
  nua_active_rejected = SOA_ACTIVE_REJECTED,
  nua_active_disabled = SOA_ACTIVE_DISABLED,
  nua_active_inactive = SOA_ACTIVE_INACTIVE,
  nua_active_sendonly = SOA_ACTIVE_SENDONLY,
  nua_active_recvonly = SOA_ACTIVE_RECVONLY,
  nua_active_sendrecv = SOA_ACTIVE_SENDRECV
};

#define NUTAG_SRTP_ENABLE(x)  SOATAG_SRTP_ENABLE((x))
#define NUTAG_SRTP_ENABLE_REF(x) SOATAG_SRTP_ENABLE_REF((x))
#define NUTAG_SRTP_CONFIDENTIALITY(x)  SOATAG_SRTP_CONFIDENTIALITY((x))
#define NUTAG_SRTP_CONFIDENTIALITY_REF(x) SOATAG_SRTP_CONFIDENTIALITY_REF((x))
#define NUTAG_SRTP_INTEGRITY_PROTECTION(x)  SOATAG_SRTP_INTEGRITY((x))
#define NUTAG_SRTP_INTEGRITY_PROTECTION_REF(x) SOATAG_SRTP_INTEGRITY_REF((x))

1597 1598
SOFIA_END_DECLS

Pekka Pessi's avatar
Pekka Pessi committed
1599
#endif