📄 nua_tag.h
字号:
*/#define NUTAG_EARLY_ANSWER(x) nutag_early_answer, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_early_answer;#define NUTAG_EARLY_ANSWER_REF(x) nutag_early_answer_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_early_answer_ref;/**Include an extra copy of SDP answer in the response. * * When NUTAG_INCLUDE_EXTRA_SDP(1) is included in nua_respond() tags, stack * will include in the response a copy of the SDP offer/answer that was last * sent to the client. This tag should be used only when you know that the * remote end requires the extra SDP, for example, some versions of Cisco * SIPGateway need a copy of answer in 200 OK even when they indicate * support for 100rel. * * @par Used with * nua_respond() * * @par Parameter type * int (boolean) * * @par Values * @c 0 False \n * @c !=0 True * * Corresponding tag taking reference parameter is * NUTAG_INCLUDE_EXTRA_SDP_REF(). * * @note Requires that @soa is enabled with NUTAG_MEDIA_ENABLE(1). * * @sa NUTAG_EARLY_ANSWER(), NUTAG_EARLY_MEDIA(), NUTAG_AUTOALERT(), * NUTAG_MEDIA_ENABLE(), @RFC3264, @RFC3264 * * @since New in @VERSION_1_12_4. */#define NUTAG_INCLUDE_EXTRA_SDP(x) nutag_include_extra_sdp, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_include_extra_sdp;#define NUTAG_INCLUDE_EXTRA_SDP_REF(x) \ nutag_include_extra_sdp_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_include_extra_sdp_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(), nua_set_hparams(), * nua_get_params(), nua_get_hparams() * * @par Parameter type * int (enum nua_af) * * @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))SOFIAPUBVAR tag_typedef_t nutag_invite_timer;#define NUTAG_INVITE_TIMER_REF(x) nutag_invite_timer_ref, tag_uint_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_invite_timer_ref;/**Default session timer in seconds. * * Set default value for session timer in seconds when the session timer * extension is used. The tag value is the proposed session expiration time * in seconds, the session is refreshed twice during the expiration time. * * @par Sending INVITE and UPDATE Requests * * If NUTAG_SESSION_TIMER() is used with non-zero value, the value is used * in the @SessionExpires header included in the INVITE or UPDATE requests. * The intermediate proxies or the ultimate destination can lower the * interval in @SessionExpires header. If the value is too low, they can * reject the request with the status code <i>422 Session Timer Too * Small</i>. In that case, @b nua increases the value of @SessionExpires * header and retries the request automatically. * * @par Returning a Response to the INVITE and UPDATE Requests * * The NUTAG_SESSION_TIMER() value is also used when sending the final * response to the INVITE or UPDATE requests. If the NUTAG_SESSION_TIMER() * value is 0 or the value in the @SessionExpires header of the request is * lower than the value in NUTAG_SESSION_TIMER(), the value from the * incoming @SessionExpires header is used. However, if the value in * @SessionExpires is lower than the minimal acceptable session expiration * interval specified with the tag NUTAG_MIN_SE() the request is * automatically rejected with <i>422 Session Timer Too Small</i>. * * @par Refreshes * * After the initial INVITE request, the SIP session is refreshed at the * intervals indicated by the @SessionExpires header returned in the 2XX * response. The party indicated with the "refresher" parameter of the * @SessionExpires header sends a re-INVITE requests (or an UPDATE * request if NUTAG_UPDATE_REFRESH(1) parameter tag has been set). * * @par When to Use NUTAG_SESSION_TIMER()? * * The session time extension is enabled ("timer" feature tag is included in * @Supported header) but not activated by default (no @SessionExpires * header is included in the requests or responses by default). Using * non-zero value with NUTAG_SESSION_TIMER() or NUTAG_SESSION_REFRESHER() * activates it. When the extension is activated, @nua refreshes the call * state by sending periodic re-INVITE or UPDATE requests unless the remote * end indicated that it will take care of refreshes. * * The session timer extension is mainly useful for proxies or back-to-back * user agents that keep call state. The call state is "soft" meaning that * if no call-related SIP messages are processed for certain time the state * will be destroyed. An ordinary user-agent can also make use of session * timer if it cannot get any activity feedback from RTP or other media. * * @note The session timer extension is used only if the feature * tag "timer" is listed in the @Supported header, set by NUTAG_SUPPORTED(), * SIPTAG_SUPPORTED(), or SIPTAG_SUPPORTED_STR() tags. * * @par Used with * nua_invite(), nua_update(), nua_respond() \n * nua_set_params() or nua_set_hparams() \n * nua_get_params() or nua_get_hparams() * * See nua_set_hparams() for a complete list of the the nua operations that * accept this tag. * * @par Parameter type * unsigned int * * @par Values * @c 0 disable \n * @c >0 interval in seconds * * Corresponding tag taking reference parameter is NUTAG_SESSION_TIMER_REF() * * @sa NUTAG_SUPPORTED(), NUTAG_MIN_SE(), NUTAG_SESSION_REFRESHER(), * nua_invite(), #nua_r_invite, #nua_i_invite, nua_respond(), * nua_update(), #nua_r_update, #nua_i_update, * NUTAG_UPDATE_REFRESH(), @RFC4028, @SessionExpires, @MinSE */#define NUTAG_SESSION_TIMER(x) nutag_session_timer, tag_uint_v((x))SOFIAPUBVAR tag_typedef_t nutag_session_timer;#define NUTAG_SESSION_TIMER_REF(x) nutag_session_timer_ref, tag_uint_vr((&(x)))SOFIAPUBVAR tag_typedef_t nutag_session_timer_ref;/** Minimum acceptable refresh interval for session. * * Specifies the value of @MinSE header in seconds. The @b Min-SE header is * used to specify minimum acceptable refresh interval for session timer * extension. * * @par Used with * nua_handle(), nua_invite(), nua_update(), nua_respond() \n * nua_set_params() or nua_set_hparams() \n * nua_get_params() or nua_get_hparams() * * See nua_set_hparams() for a complete list of the nua operations that * accept this tag. * * @par Parameter type * unsigned int * * @par Values * interval in seconds. * * Corresponding tag taking reference parameter is NUTAG_MIN_SE_REF() * * @sa NUTAG_SESSION_TIMER(), NUTAG_SESSION_REFRESHER(), * NUTAG_UPDATE_REFRESH(), @RFC4028, @MinSE, @SessionExpires */#define NUTAG_MIN_SE(x) nutag_min_se, tag_uint_v((x))SOFIAPUBVAR tag_typedef_t nutag_min_se;#define NUTAG_MIN_SE_REF(x) nutag_min_se_ref, tag_uint_vr((&(x)))SOFIAPUBVAR tag_typedef_t nutag_min_se_ref;/** Enumeration type of NUTAG_SESSION_REFRESHER(). */enum nua_session_refresher { nua_no_refresher, /**< Disable session timer. */ nua_local_refresher, /**< Session refresh by local end. */ nua_remote_refresher, /**< Session refresh by remote end. */ nua_any_refresher /**< No preference (default). */};/**Specify the preferred refresher. * * Specify for session timer extension which party is the preferred refresher. * * @par Used with * nua_handle(), nua_invite(), nua_update(), nua_respond() \n * nua_set_params() or nua_set_hparams() \n * nua_get_params() or nua_get_hparams() * * See nua_set_hparams() for a complete list of all the nua operations that * accept this tag. * * @par Parameter type * enum { #nua_no_refresher, #nua_local_refresher, #nua_remote_refresher, * #nua_any_refresher } * * @par Values * @c nua_no_refresher (session timers are disabled) \n * @c nua_local_refresher \n * @c nua_remote_refresher \n * @c nua_any_refresher (default) \n * * Corresponding tag taking reference parameter is * NUTAG_SESSION_REFRESHER_REF() * * @sa NUTAG_SESSION_TIMER(), NUTAG_MIN_SE_REF(), * NUTAG_UPDATE_REFRESH(), @RFC4028, @SessionExpires, @MinSE */#define NUTAG_SESSION_REFRESHER(x) nutag_session_refresher, tag_int_v((x))SOFIAPUBVAR tag_typedef_t nutag_session_refresher;#define NUTAG_SESSION_REFRESHER_REF(x) nutag_session_refresher_ref, tag_int_vr((&(x)))SOFIAPUBVAR tag_typedef_t nutag_session_refresher_ref;/** Use UPDATE as refresh method. * * If this parameter is true and the remote endpoint has included UPDATE in * Allow header, the nua stack uses UPDATE instead of INVITE to refresh the * session when using the session timer extension. * * Note that the session timer headers @SessionExpires and @MinSE are always * included in the UPDATE request and responses regardless of the value of * this tag. * * @par Used with * nua_handle(), nua_invite(), nua_update(), nua_respond() \n * nua_set_params() or nua_set_hparams() \n * nua_get_params() or nua_get_hparams() * * See nua_set_hparams() for a complete list of all the nua operations that * accept this tag. * * @par Parameter type * boolean * * @par Values * @c 1 Use UPDATE \n * @c 0 Use INVITE * * Corresponding tag taking reference parameter is NUTAG_UPDATE_REFRESH_REF() * * @sa #nua_r_update, NUTAG_SESSION_TIMER(), NUTAG_MIN_SE_REF(), * NUTAG_UPDATE_REFRESH(), @RFC4028, @SessionExpires, @MinSE */#define NUTAG_UPDATE_REFRESH(x) nutag_update_refresh, tag_bool_v((x))SOFIAPUBVAR tag_typedef_t nutag_update_refresh;#define NUTAG_UPDATE_REFRESH_REF(x) nutag_update_refresh_ref, tag_bool_vr((&(x)))SOFIAPUBVAR 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)SOFIAPUBVAR tag_typedef_t nutag_autoalert;#define NUTAG_AUTOALERT_REF(x) nutag_autoalert_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_autoalert_ref;/** ACK automatically * * If this parameter is true, ACK is sent automatically after receiving 2XX * series response to INVITE. Note that ACK is always sent automatically by * lower layers of the stack after receiving an error response 3XX, 4XX, 5XX * or 6XX. * * @par Used with * nua_set_params(), nua_set_hparams(), \n * nua_get_params(), nua_get_hparams(), \n * nua_invite(), nua_ack(), nua_respond(), nua_update() \n * nua_respond() * * @par Parameter type * int * * @par Values * @c 0 No automatic sending of ACK \n * @c !=0 ACK sent automatically * * Default value is NUTAG_AUTOACK(1). * * Corresponding tag taking reference parameter is NUTAG_AUTOACK_REF() */#define NUTAG_AUTOACK(x) nutag_autoack, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_autoack;#define NUTAG_AUTOACK_REF(x) nutag_autoack_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_autoack_ref;/** Answer (with 200 Ok) automatically to incoming call. * * @par Used with * nua_set_params(), nua_set_hparams() \n * nua_get_params(), nua_get_hparams() \n * nua_invite() \n * nua_respond() * * @par Parameter type * int (boolean) * * @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() * * @note Requires that @soa is enabled with NUTAG_MEDIA_ENABLE(1). * * @par Auto-Answer to Re-INVITE requests * By default, NUA tries to auto answer the re-INVITEs used to refresh the * session when the media is enabled. Set NUTAG_AUTOANSWER(0) on the call * handle (e.g., include the tag with nua_invite(), nua_respond()) in order * to disable the auto answer on re-INVITEs. * * @bug If the re-INVITE modifies the session (e.g., SDP contains offer that * adds video stream to the session), NUA auto-answers it if * NUTAG_AUTOANSWER(0) has not been set on the handle. It accepts or rejects * media based on the existing user SDP (set with SOATAG_USER_SDP(), for * example). It should auto-answer only session refresh request and let * application decide how to handle requests to modify the session. * * @sa NUTAG_MEDIA_ENABLE(), NUTAG_AUTOALERT(), NUTAG_AUTOACK(). */#define NUTAG_AUTOANSWER(x) nutag_autoanswer, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_autoanswer;#define NUTAG_AUTOANSWER_REF(x) nutag_autoanswer_ref, tag_bool_vr(&(x))SOFIAPUBVAR 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)SOFIAPUBVAR tag_typedef_t nutag_enableinvite;#define NUTAG_ENABLEINVITE_REF(x) nutag_enableinvite_ref, tag_bool_vr(&(x))SOFIAPUBVAR 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)SOFIAPUBVAR tag_typedef_t nutag_enablemessage;#define NUTAG_ENABLEMESSAGE_REF(x) nutag_enablemessage_ref, tag_bool_vr(&(x))SOFIAPUBVAR 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)SOFIAPUBVAR tag_typedef_t nutag_enablemessenger;#define NUTAG_ENABLEMESSENGER_REF(x) \ nutag_enablemessenger_ref, tag_bool_vr(&(x))SOFIAPUBVAR 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 * boolean
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -