nua_tag.h 45.1 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/*
 * This file is part of the Sofia-SIP package
 *
 * Copyright (C) 2005 Nokia Corporation.
 *
 * Contact: Pekka Pessi <pekka.pessi@nokia.com>
 *
 * * This library is free software; you can redistribute it and/or
 * 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
 *
 */

#ifndef NUA_TAG_H /** Defined when <nua_tag.h> has been included. */
26
#define NUA_TAG_H "$Id: nua_tag.h,v 1.3 2005/09/09 10:56:31 ppessi Exp $"
Pekka Pessi's avatar
Pekka Pessi committed
27 28 29 30 31 32 33

/**@file nua_tag.h
 * @brief Tags for Nokia User Agent Library
 *
 * @author Pekka Pessi <Pekka.Pessi@nokia.com>
 *
 * @date Created: Mon Feb 19 18:54:26 EET 2001 ppessi
34
 * $Date: 2005/09/09 10:56:31 $
Pekka Pessi's avatar
Pekka Pessi committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
 */

#ifndef SU_TAG_H
#include <su_tag.h>
#endif
#ifndef SDP_TAG_H
#include <sdp_tag.h>
#endif
#ifndef URL_TAG_H
#include <url_tag.h>
#endif
#ifndef SIP_TAG_H
#include <sip_tag.h>
#endif
#ifndef NTA_TAG_H
#include <nta_tag.h>
#endif
#ifndef NUA_H
#include <nua.h>
#endif

/** List of all NUA tags. */
extern tag_type_t nua_tag_list[];

/** 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)
extern tag_typedef_t nutag_url;

#define NUTAG_URL_REF(x)        nutag_url_ref, urltag_url_vr(&(x))
extern tag_typedef_t nutag_url_ref;

/** 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)
extern tag_typedef_t nutag_address;

#define NUTAG_ADDRESS_REF(x)    nutag_address_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_address_ref;

#define NUTAG_UICC(x)  nutag_uicc, tag_str_v(x)
extern tag_typedef_t nutag_uicc;

#define NUTAG_UICC_REF(x) nutag_uicc_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_uicc_ref;

/** Ask NUA to create leg for this handle
 *
 * @par Used with
 *    calls that send a SIP request
 *
 * @par Parameter type
 *   int
 *
 * @par Values
 *    @c 0   False \n
 *    @c !=0 True
 *
 * Corresponding tag taking reference parameter is NUTAG_USE_LEG_REF()
 */
#define NUTAG_USE_LEG(x)        nutag_use_leg, tag_bool_v(x)
extern tag_typedef_t nutag_use_leg;

#define NUTAG_USE_LEG_REF(x)    nutag_use_leg_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_use_leg_ref;

/** Create a session for this handle */
#define NUTAG_USE_SESSION(x)        nutag_use_session, tag_bool_v(x)
extern tag_typedef_t nutag_use_session;

#define NUTAG_USE_SESSION_REF(x)    nutag_use_session_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_use_session_ref;

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

/** Preferred address family for transport media
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_invite() \n
 *    nua_respond()
 *
 * @par Parameter type
 *    int (enum nua_af)
 *
 * @par Values
 *    @c NUTAG_AF_ANY (default) (0) any address family \n
 *    @c NUTAG_AF_IP4_ONLY      (1) only IP version 4 \n
 *    @c NUTAG_AF_IP6_ONLY      (2) only IP version 6 \n
 *    @c NUTAG_AF_IP4_IP6       (3) either IP version 4 or 6,
 *                                  version 4 preferred \n
 *    @c NUTAG_AF_IP6_IP4       (4) either IP version 4 or 6,
 *                                  version 6 preferred
 *
 * Corresponding tag taking reference parameter is NUTAG_AF_REF()
 */
#define NUTAG_AF(x)             nutag_af, tag_int_v((x))
extern tag_typedef_t nutag_af;

#define NUTAG_AF_REF(x)         nutag_af_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_af_ref;

enum nua_af {
  nutag_af_any,
  nutag_af_ip4_only,
  nutag_af_ip6_only,
  nutag_af_ip4_ip6,
  nutag_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

/** Pass media address to the NUA stack.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_invite() \n
 *    nua_respond()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string containing a domain name,
 *    IPv4 address, or IPv6 address.
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_ADDRESS_REF()
*/
#define NUTAG_MEDIA_ADDRESS(x)  nutag_media_address, tag_str_v(x)
extern tag_typedef_t nutag_media_address;

#define NUTAG_MEDIA_ADDRESS_REF(x) nutag_media_address_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_media_address_ref;

/** Name of the media template for the NUA stack.
 *
 * @par Used with
 *    nua_invite() \n
 *    nua_update() \n
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_PATH_REF()
*/
#define NUTAG_MEDIA_PATH(x)  nutag_media_path, tag_str_v(x)
extern tag_typedef_t nutag_media_path;

#define NUTAG_MEDIA_PATH_REF(x) nutag_media_path_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_media_path_ref;

Pekka Pessi's avatar
Pekka Pessi committed
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
#if 1

/**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)
extern tag_typedef_t nutag_soa_session;

#define NUTAG_SOA_SESSION_REF(x) \
 nutag_soa_session_ref, tag_ptr_vr(&(x),(x))
extern tag_typedef_t nutag_soa_session_ref;

247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
/**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)
extern tag_typedef_t nutag_soa_name;

#define NUTAG_SOA_NAME_REF(x) \
 nutag_soa_name_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_soa_name_ref;

Pekka Pessi's avatar
Pekka Pessi committed
268 269
#else

Pekka Pessi's avatar
Pekka Pessi committed
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314
/** Pointer to a media subsystem.
 *
 * Pointer to MSS media subsystem object. The mss object can be used to
 * customize the media with mss_config_add(), for example.
 *
 * @par Used with
 *    nua_get_param()
 *
 * @par Parameter type
 *    void * (actually mss_t*)
 *
 * @par Values
 *    Pointer to MSS media subsystem.
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_SUBSYSTEM_REF.
 */
#define NUTAG_MEDIA_SUBSYSTEM(x)  nutag_media_subsystem, tag_ptr_v(x)
extern tag_typedef_t nutag_media_subsystem;

#define NUTAG_MEDIA_SUBSYSTEM_REF(x) \
 nutag_media_subsystem_ref, tag_ptr_vr(&(x),(x))
extern tag_typedef_t nutag_media_subsystem_ref;

/** Pointer to a media session.
 *
 * Pointer to MSS media session. Used with NUTAG_MEDIA_CLONE()
 * when multiple SIP calls share common media session.
 *
 * @par Used with
 *
 * @par Parameter type
 *    void * (actually ms_t*)
 *
 * @par Values
 *    Pointer to MSS media session.
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_SESSION_REF.
 */
#define NUTAG_MEDIA_SESSION(x)  nutag_media_session, tag_ptr_v(x)
extern tag_typedef_t nutag_media_session;

#define NUTAG_MEDIA_SESSION_REF(x) \
 nutag_media_session_ref, tag_ptr_vr(&(x),(x))
extern tag_typedef_t nutag_media_session_ref;

Pekka Pessi's avatar
Pekka Pessi committed
315 316
#endif

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 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489
/** Clone media session.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_invite() \n
 *    nua_respond()
 *
 * @par Parameter type
 *    int
 *
 * @par Values
 *    @c 0   False \n
 *    @c !=0 True
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_CLONE_REF()
*/
#define NUTAG_MEDIA_CLONE(x)  nutag_media_clone, tag_bool_v(x)
extern tag_typedef_t nutag_media_clone;

#define NUTAG_MEDIA_CLONE_REF(x) nutag_media_clone_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_media_clone_ref;

/** Media parameter file name to the NUA stack.
 *
 * Media parameter file name to the NUA stack (mss.cfg).
 * Used for debugging RTP and RTCP.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_invite() \n
 *    nua_update()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_PARAMS_REF()
*/
#define NUTAG_MEDIA_PARAMS(x)  nutag_media_params, tag_str_v(x)
extern tag_typedef_t nutag_media_params;

#define NUTAG_MEDIA_PARAMS_REF(x) nutag_media_params_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_media_params_ref;

/** Pass media description file name to the NUA stack.
 *
 * Pass name of media description file that contains media templates
 * (normally mss.sdp) to the NUA stack.
 *
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params() \n
 *    nua_create()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_DESCS_REF()
 */
#define NUTAG_MEDIA_DESCS(x)  nutag_media_descs, tag_str_v(x)
extern tag_typedef_t nutag_media_descs;

#define NUTAG_MEDIA_DESCS_REF(x) nutag_media_descs_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_media_descs_ref;

// Addition for JPIP - START
extern tag_typedef_t nutag_image_local;
/** Local image window passed to mss_setup().
 *
 * The contents of tag item NUTAG_IMAGE_LOCAL() is passed to media session
 * as parameters to mss_setup().
 */
#define NUTAG_IMAGE_LOCAL(x)   nutag_image_local, tag_str_v(x)
                                                                                                                                                                                                     
                                                                                                                                                                                                     
extern tag_typedef_t nutag_image_local_ref;
#define NUTAG_IMAGE_LOCAL_REF(x) nutag_image_local_ref, tag_str_vr(&(x))
                                                                                                                                                                                                     
                                                                                                                                                                                                     
extern tag_typedef_t nutag_image_remote;
/**Remote image window passed to mss_setup().
 *
 * The contents of tag item NUTAG_IMAGE_REMOTE() is passed to media session
 * as parameters to mss_setup().
 */
#define NUTAG_IMAGE_REMOTE(x)  nutag_image_remote, tag_str_v(x)
                                                                                                                                                                                                                                                                                                                                                                                   
extern tag_typedef_t nutag_image_remote_ref;
#define NUTAG_IMAGE_REMOTE_REF(x) nutag_image_remote_ref, tag_str_vr(&(x))
                                                                                                                                                                                                     
                                                                                                                                                                                                     
extern tag_typedef_t nutag_target_image_name;
/** Target image name used in JPIP session passed to mss_setup()
 *
 * The content of tag item NUTAG_TARGET_IMAGE_NAME() is passed to media session
 * as parameter to mss_setup().
 *
 */
#define NUTAG_TARGET_IMAGE_NAME(x) nutag_target_image_name, tag_str_v(x)
                                                                                                                                                                                                     
                                                                                                                                                                                                     
extern tag_typedef_t nutag_target_image_name_ref;
#define NUTAG_TARGET_IMAGE_NAME_REF(x) nutag_target_image_name_ref, tag_str_vr(&(x))

/** Active image call */
#define NUTAG_ACTIVE_IMAGE(x) nutag_active_image, tag_int_v(x)
extern tag_typedef_t nutag_active_image;
                                                                                
                                                                                
                                                                                
                                                                                
#define NUTAG_ACTIVE_IMAGE_REF(x) nutag_active_image_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_active_image_ref;
                                                                              

// Addition for JPIP - END

/** Local video window passed to mss_setup().
 *
 * The content of this tag is passed to media session
 * in parameters to mss_setup().
 *
 * @par Used with
 *    nua_invite() \n
 *    nua_respond()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string X window handle of
 *    drawing window. Pointer printed with printf \%p format string.
 *
 * Corresponding tag taking reference parameter is NUTAG_VIDEO_LOCAL_REF()
 */
#define NUTAG_VIDEO_LOCAL(x)   nutag_video_local, tag_str_v(x)
extern tag_typedef_t nutag_video_local;

#define NUTAG_VIDEO_LOCAL_REF(x) nutag_video_local_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_video_local_ref;

/**Remote video window passed to mss_setup().
 *
 * The content of this tag is passed to media session
 * in parameters to mss_setup().
 *
 * @par Used with
 *    nua_invite() \n
 *    nua_respond()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string
 *    X window handle of drawing window. Pointer printed with \%p
 *    format string of printf().
 *
 * Corresponding tag taking reference parameter is NUTAG_VIDEO_REMOTE_REF()
 */
#define NUTAG_VIDEO_REMOTE(x)  nutag_video_remote, tag_str_v(x)
extern tag_typedef_t nutag_video_remote;

#define NUTAG_VIDEO_REMOTE_REF(x) nutag_video_remote_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_video_remote_ref;

Pekka Pessi's avatar
Pekka Pessi committed
490
/** Establish early media session using 183 responses and PRACK requests.
Pekka Pessi's avatar
Pekka Pessi committed
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520
 *
 * @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)
extern tag_typedef_t nutag_early_media;

#define NUTAG_EARLY_MEDIA_REF(x) nutag_early_media_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_early_media_ref;

/** 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
521
 *    int (enum nua_af)
Pekka Pessi's avatar
Pekka Pessi committed
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 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 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768
 *
 * @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))
extern tag_typedef_t nutag_invite_timer;

#define NUTAG_INVITE_TIMER_REF(x) nutag_invite_timer_ref, tag_uint_vr(&(x))
extern tag_typedef_t nutag_invite_timer_ref;

/**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))
extern tag_typedef_t nutag_session_timer;

#define NUTAG_SESSION_TIMER_REF(x) nutag_session_timer_ref, tag_uint_vr((&(x)))
extern tag_typedef_t nutag_session_timer_ref;

/** 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))
extern tag_typedef_t nutag_min_se;

#define NUTAG_MIN_SE_REF(x)     nutag_min_se_ref, tag_uint_vr((&(x)))
extern tag_typedef_t nutag_min_se_ref;

enum nua_session_refresher {
  nua_no_refresher, nua_local_refresher, nua_remote_refresher
};

/** 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
 *    enum { nua_no_refresher,  nua_local_refresher, nua_remote_refresher }
 *
 * @par Values
 *    @c nua_no_refresher    \n
 *    @c nua_local_refresher \n
 *    @c nua_remote_refresher
 *
 * Corresponding tag taking reference parameter is NUTAG_SESSION_REFRESHER_REF()
 */
#define NUTAG_SESSION_REFRESHER(x)  nutag_session_refresher, tag_int_v((x))
extern tag_typedef_t nutag_session_refresher;

#define NUTAG_SESSION_REFRESHER_REF(x) nutag_session_refresher_ref, tag_int_vr((&(x)))
extern tag_typedef_t nutag_session_refresher_ref;

/** 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))
extern tag_typedef_t nutag_update_refresh;

#define NUTAG_UPDATE_REFRESH_REF(x) nutag_update_refresh_ref, tag_bool_vr((&(x)))
extern tag_typedef_t nutag_update_refresh_ref;

/** 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()
 */
#define NUTAG_AUTOALERT(x)      nutag_autoAlert, tag_bool_v(x)
extern tag_typedef_t nutag_autoAlert;

#define NUTAG_AUTOALERT_REF(x)  nutag_autoAlert_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_autoAlert_ref;

/** 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()
 */
#define NUTAG_AUTOACK(x)        nutag_autoACK, tag_bool_v(x)
extern tag_typedef_t nutag_autoACK;

#define NUTAG_AUTOACK_REF(x)    nutag_autoACK_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_autoACK_ref;

/** 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()
 */
#define NUTAG_AUTOANSWER(x)     nutag_autoAnswer, tag_bool_v(x)
extern tag_typedef_t nutag_autoAnswer;

#define NUTAG_AUTOANSWER_REF(x) nutag_autoAnswer_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_autoAnswer_ref;

/** 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()
 */
#define NUTAG_ENABLEINVITE(x)   nutag_enableInvite, tag_bool_v(x)
extern tag_typedef_t nutag_enableInvite;

#define NUTAG_ENABLEINVITE_REF(x) nutag_enableInvite_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_enableInvite_ref;

/** 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()
 */
#define NUTAG_ENABLEMESSAGE(x)  nutag_enableMessage, tag_bool_v(x)
extern tag_typedef_t nutag_enableMessage;

#define NUTAG_ENABLEMESSAGE_REF(x) nutag_enableMessage_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_enableMessage_ref;

/** 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()
 */
#define NUTAG_ENABLEMESSENGER(x)  nutag_enableMessenger, tag_bool_v(x)
extern tag_typedef_t nutag_enableMessenger;

#define NUTAG_ENABLEMESSENGER_REF(x) \
  nutag_enableMessenger_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_enableMessenger_ref;

/* 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
769
 *    boolean
Pekka Pessi's avatar
Pekka Pessi committed
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 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 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 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 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 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 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 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 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201
 *
 * @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)
extern tag_typedef_t nutag_smime_enable;

#define NUTAG_SMIME_ENABLE_REF(x) nutag_smime_enable_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_smime_enable_ref;

/** 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)
extern tag_typedef_t nutag_smime_opt;

#define NUTAG_SMIME_OPT_REF(x) nutag_smime_opt_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_smime_opt_ref;

/* 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)
extern tag_typedef_t nutag_smime_protection_mode;

#define NUTAG_SMIME_PROTECTION_MODE_REF(x) \
           nutag_smime_protection_mode_ref, tag_uint_vr(&(x))
extern tag_typedef_t nutag_smime_protection_mode_ref;

/** 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)
extern tag_typedef_t nutag_smime_message_digest;

#define NUTAG_SMIME_MESSAGE_DIGEST_REF(x) \
            nutag_smime_message_digest_ref, tag_str_vr((&x))
extern tag_typedef_t nutag_smime_message_digest_ref;

/** 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)
extern tag_typedef_t nutag_smime_signature;

#define NUTAG_SMIME_SIGNATURE_REF(x) \
            nutag_smime_signature_ref, tag_str_vr((&x))
extern tag_typedef_t nutag_smime_signature_ref;

/** 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)
extern tag_typedef_t nutag_smime_key_encryption;

#define NUTAG_SMIME_KEY_ENCRYPTION_REF(x) \
          nutag_smime_key_encryption_ref, tag_str_vr((&x))
extern tag_typedef_t nutag_smime_key_encryption_ref;

/** 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)
extern tag_typedef_t nutag_smime_message_encryption;

#define NUTAG_SMIME_MESSAGE_ENCRYPTION_REF(x) \
           nutag_smime_message_encryption_ref, tag_str_vr((&x))
extern tag_typedef_t nutag_smime_message_encryption_ref;

/** Enable SRTP */
#define NUTAG_SRTP_ENABLE(x)  nutag_srtp_enable, tag_bool_v(x)
extern tag_typedef_t nutag_srtp_enable;

#define NUTAG_SRTP_ENABLE_REF(x) nutag_srtp_enable_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_srtp_enable_ref;

/** Enable SRTP confidentiality */
#define NUTAG_SRTP_CONFIDENTIALITY(x)  nutag_srtp_confidentiality, tag_bool_v(x)
extern tag_typedef_t nutag_srtp_confidentiality;

#define NUTAG_SRTP_CONFIDENTIALITY_REF(x) nutag_srtp_confidentiality_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_srtp_confidentiality_ref;

/** Enable SRTP integrity protection */
#define NUTAG_SRTP_INTEGRITY_PROTECTION(x)  nutag_srtp_integrity_protection, tag_bool_v(x)
extern tag_typedef_t nutag_srtp_integrity_protection;

#define NUTAG_SRTP_INTEGRITY_PROTECTION_REF(x) nutag_srtp_integrity_protection_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_srtp_integrity_protection_ref;

/** 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)
extern tag_typedef_t nutag_certificate_dir;

#define NUTAG_CERTIFICATE_DIR_REF(x) \
          nutag_certificate_dir_ref, tag_str_vr((&x))
extern tag_typedef_t nutag_certificate_dir_ref;

/** 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)
extern tag_typedef_t nutag_certificate_phrase;

#define NUTAG_CERTIFICATE_PHRASE_REF(x) \
          nutag_certificate_phrase_ref, tag_str_vr((&x))
extern tag_typedef_t nutag_certificate_phrase_ref;

/** 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)
extern tag_typedef_t nutag_sips_url;

#define NUTAG_SIPS_URL_REF(x)   nutag_sips_url_ref, urltag_url_vr(&(x))
extern tag_typedef_t nutag_sips_url_ref;

/** 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)
extern tag_typedef_t nutag_registrar;

#define NUTAG_REGISTRAR_REF(x)  nutag_registrar_ref, urltag_url_vr(&(x))
extern tag_typedef_t nutag_registrar_ref;

/** Allowed sip methods. If this tag is not used all methods are allowed by default.
 * @par Used with
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated string of allowed SIP methods separated by commas
 *
 * Corresponding tag taking reference parameter is NUTAG_ALLOW_REF()
 */
#define NUTAG_ALLOW(x)          nutag_allow, tag_str_v(x)
extern tag_typedef_t nutag_allow;

#define NUTAG_ALLOW_REF(x)      nutag_allow_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_allow_ref;

/** Pointer to SIP parser structure
 *
 * @par Used with
 *    nua_create()
 *
 * @par Parameter type
 *    void * (actually msg_mclass)
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_SIP_PARSER_REF()
 */
#define NUTAG_SIP_PARSER(x)     nutag_sip_parser, tag_ptr_v(x)
extern tag_typedef_t nutag_sip_parser;

#define NUTAG_SIP_PARSER_REF(x) \
          nutag_sip_parser_ref, tag_ptr_vr(&(x), (x))
extern tag_typedef_t nutag_sip_parser_ref;

/** Authentication data ("realm" "user" "password")
 *
 * @par Used with
 *    nua_authenticate()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated string of format: basic digest scheme:"realm":user:password  \n
 *    for example: \n
 *	@code Digest:"nokia proxy":xyz:secret \endcode
 *
 * Corresponding tag taking reference parameter is NUTAG_AUTH_REF()
 */
#define NUTAG_AUTH(x)		nutag_auth, tag_str_v(x)
extern tag_typedef_t nutag_auth;

#define NUTAG_AUTH_REF(x)	    nutag_auth_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_auth_ref;

/** 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)
extern tag_typedef_t nutag_authtime;

#define NUTAG_AUTHTIME_REF(x)	nutag_authtime_ref, tag_uint_vr(&(x))
extern tag_typedef_t nutag_authtime_ref;

/** 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)
extern tag_typedef_t nutag_event;

#define NUTAG_EVENT_REF(x)      nutag_event_ref, tag_ptr_vr(&(x),(x))
extern tag_typedef_t nutag_event_ref;

/** Response status code
 *
 * @par Used with
 *    Currently not processed by NUA
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *
 * Corresponding tag taking reference parameter is NUTAG_STATUS_REF()
 */
#define NUTAG_STATUS(x)         nutag_status, tag_uint_v(x)
extern tag_typedef_t nutag_status;

#define NUTAG_STATUS_REF(x)     nutag_status_ref, tag_uint_vr(&(x))
extern tag_typedef_t nutag_status_ref;

/** 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)
extern tag_typedef_t nutag_phrase;

#define NUTAG_PHRASE_REF(x)     nutag_phrase_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_phrase_ref;

/** 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)
extern tag_typedef_t nutag_handle;

#define NUTAG_HANDLE_REF(x)     nutag_handle_ref, nutag_handle_vr(&(x))
extern tag_typedef_t nutag_handle_ref;

/** Hold & unhold
 *
 * @par Used with
 *    nua_invite() \n
 *    nua_update()
 *
 * @par Parameter type
Pekka Pessi's avatar
Pekka Pessi committed
1202
 *    int (boolean)
Pekka Pessi's avatar
Pekka Pessi committed
1203 1204 1205 1206 1207 1208 1209
 *
 * @par Values
 *    @c 1 hold call \n
 *    @c 0 unhold call
 *
 * Corresponding tag taking reference parameter is NUTAG_HOLD_REF()
 */
Pekka Pessi's avatar
Pekka Pessi committed
1210
#define NUTAG_HOLD(x)           nutag_hold, tag_bool_v(x)
Pekka Pessi's avatar
Pekka Pessi committed
1211 1212
extern tag_typedef_t nutag_hold;

Pekka Pessi's avatar
Pekka Pessi committed
1213
#define NUTAG_HOLD_REF(x)       nutag_hold_ref, tag_bool_vr(&(x))
Pekka Pessi's avatar
Pekka Pessi committed
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591
extern tag_typedef_t nutag_hold_ref;

/** 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)
extern tag_typedef_t nutag_notify_refer;

#define NUTAG_NOTIFY_REFER_REF(x) nutag_notify_refer_ref, nutag_handle_vr(&(x))
extern tag_typedef_t nutag_notify_refer_ref;

/** 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)
extern tag_typedef_t nutag_refer_event;

#define NUTAG_REFER_EVENT_REF(x) nutag_refer_event_ref, siptag_event_vr(&(x))
extern tag_typedef_t nutag_refer_event_ref;

/** 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)
extern tag_typedef_t nutag_refer_pause;

#define NUTAG_REFER_PAUSE_REF(x) nutag_refer_pause_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_refer_pause_ref;

/** 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)
extern tag_typedef_t nutag_user_agent;

#define NUTAG_USER_AGENT_REF(x) nutag_user_agent_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_user_agent_ref;

/** Audio session status
 *
 * @par Used with
 *    #nua_i_active \n
 *    #nua_r_media_describe
 *
 * @par Parameter type
 *    enum { nua_active_inactive, nua_active_sendonly, 
 *           nua_active_recvonly, nua_active_sendrecv }
 *
 * @par Values
 *    @c nua_active_inactive  (0) \n
 *    @c nua_active_sendonly  (1) \n
 *    @c nua_active_recvonly  (2) \n
 *    @c nua_active_sendrecv  (3) \n
 *
 *  Corresponding tag taking reference parameter is NUTAG_ACTIVE_AUDIO_REF()
 *
 */
#define NUTAG_ACTIVE_AUDIO(x) nutag_active_audio, tag_int_v(x)
extern tag_typedef_t nutag_active_audio;

#define NUTAG_ACTIVE_AUDIO_REF(x) nutag_active_audio_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_active_audio_ref;

/** Video session status
 *
 * @par Used with
 *    #nua_i_active \n
 *    #nua_r_media_describe
 *
 * @par Parameter type
 *    enum { nua_active_inactive, nua_active_sendonly, 
 *           nua_active_recvonly, nua_active_sendrecv }
 *
 * @par Values
 *    @c nua_active_inactive (0) \n
 *    @c nua_active_sendonly (1) \n
 *    @c nua_active_recvonly (2) \n
 *    @c nua_active_sendrecv (3) \n
 *
 * Corresponding tag taking reference parameter is NUTAG_ACTIVE_VIDEO_REF()
 */
#define NUTAG_ACTIVE_VIDEO(x) nutag_active_video, tag_int_v(x)
extern tag_typedef_t nutag_active_video;

#define NUTAG_ACTIVE_VIDEO_REF(x) nutag_active_video_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_active_video_ref;

/** Active chat session status
 *
 * @par Used with
 *    #nua_i_active \n
 *    #nua_r_media_describe
 *
 * @par Parameter type
 *    enum { nua_active_inactive, nua_active_sendonly, 
 *           nua_active_recvonly, nua_active_sendrecv }
 *
 * @par Values
 *    @c nua_active_inactive (0) \n
 *    @c nua_active_sendonly (1) \n
 *    @c nua_active_recvonly (2) \n
 *    @c nua_active_sendrecv (3) \n
 *
 * Corresponding tag taking reference parameter is NUTAG_ACTIVE_CHAT_REF()
 */
#define NUTAG_ACTIVE_CHAT(x)     nutag_active_chat, tag_int_v(x)
extern tag_typedef_t nutag_active_chat;

#define NUTAG_ACTIVE_CHAT_REF(x) nutag_active_chat_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_active_chat_ref;

enum {
  nua_active_disabled = -4,
  nua_active_inactive = 0,
  nua_active_sendonly = 1,
  nua_active_recvonly = 2,
  nua_active_sendrecv = nua_active_sendonly | nua_active_recvonly
};

/** 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)
extern tag_typedef_t nutag_substate;

#define NUTAG_SUBSTATE_REF(x) nutag_substate_ref, tag_int_vr(&(x))
extern tag_typedef_t nutag_substate_ref;

enum {
  nua_substate_embryonic = 0,
  nua_substate_pending,
  nua_substate_active,
  nua_substate_terminated
};

/** 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)
extern tag_typedef_t nutag_media_features;

#define NUTAG_MEDIA_FEATURES_REF(x) \
          nutag_media_features_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_media_features_ref;

/** Add methods and media tags to Contact headers. */
#define NUTAG_CALLEE_CAPS(x) nutag_callee_caps, tag_bool_v(x)
extern tag_typedef_t nutag_callee_caps;

#define NUTAG_CALLEE_CAPS_REF(x) \
          nutag_callee_caps_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_callee_caps_ref;

/** 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)
extern tag_typedef_t nutag_path_enable;

#define NUTAG_PATH_ENABLE_REF(x) nutag_path_enable_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_path_enable_ref;

/** 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)
extern tag_typedef_t nutag_service_route_enable;

#define NUTAG_SERVICE_ROUTE_ENABLE_REF(x) \
          nutag_service_route_enable_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_service_route_enable_ref;

/** 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)
extern tag_typedef_t nutag_media_enable;

#define NUTAG_MEDIA_ENABLE_REF(x) \
          nutag_media_enable_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_media_enable_ref;

/** Media event path name
 *
 * @par Used with
 *    nua_invite() \n
 *    nua_update() \n
 *    nua_set_params() \n
 *    nua_get_params()
 *
 * @par Parameter type
 *    char const *
 *
 * @par Values
 *    NULL terminated character string
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_EVENT_PATH_REF()
 */
#define NUTAG_MEDIA_EVENT_PATH(x) nutag_media_event_path, tag_str_v(x)
extern tag_typedef_t nutag_media_event_path;

#define NUTAG_MEDIA_EVENT_PATH_REF(x) \
          nutag_media_event_path_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_media_event_path_ref;

/** Media event data
 *
 * @par Used with
 *    nua_media_event() \n
 *    #nua_i_media_event \n
 *    nua_invite() \n
 *    nua_update() \n
 *    nua_handle()
 *
 * @par Parameter type
 *    void *
 *
 * @par Values
 *    Free format data
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_EVENT_DATA_REF()
 */
#define NUTAG_MEDIA_EVENT_DATA(x) \
          nutag_media_event_data, tag_ptr_v(x)
extern tag_typedef_t nutag_media_event_data;

#define NUTAG_MEDIA_EVENT_DATA_REF(x) \
          nutag_media_event_data_ref, tag_ptr_vr(&(x),(x))
extern tag_typedef_t nutag_media_event_data_ref;

/** Media event data length
 *
 * @par Used with
 *    nua_media_event()   \n
 *    #nua_i_media_event \n
 *    nua_invite() \n
 *    nua_update() \n
 *    nua_handle()
 *
 * @par Parameter type
 *    unsigned int
 *
 * @par Values
 *    Length of media event data in octets
 *
 * Corresponding tag taking reference parameter is NUTAG_MEDIA_EVENT_DLEN_REF()
 */
#define NUTAG_MEDIA_EVENT_DLEN(x) nutag_media_event_dlen, tag_uint_v(x)
extern tag_typedef_t nutag_media_event_dlen;

#define NUTAG_MEDIA_EVENT_DLEN_REF(x) \
          nutag_media_event_dlen_ref, tag_uint_vr(&(x))
extern tag_typedef_t nutag_media_event_dlen_ref;


#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

#endif