📄 nua_tag.h
字号:
SOFIAPUBVAR tag_typedef_t nutag_allow_ref;/** Indicate that a method (or methods) are handled by application. * * This tag is used to add a new method to the already existing set of * methods handled by application, or clear the set. If you want to * determine the set explicitly, include NUTAG_APPL_METHOD() twice, * first with NULL and then with your supported set. * * The default set of application methods now include INVITE, REGISTER, * PUBLISH and SUBSCRIBE. * * If the request method is in the set of methods handled by application, * the nua stack does not automatically respond to the incoming request nor * it will automatically send such a request. Note if the application adds * the PRACK and UPDATE requests to the set of application methods it must * also take care for sending the PRACK and UPDATE requests during the call * setup when necessary. * * @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_APPL_METHOD_REF() * * @since Working since @VERSION_1_12_5. */#define NUTAG_APPL_METHOD(x) nutag_appl_method, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_appl_method;#define NUTAG_APPL_METHOD_REF(x) nutag_appl_method_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_appl_method_ref;/** Support a feature. * * This tag is used to add a new feature to the existing set of supported * SIP features. If you want to ignore the existing set of supported * features, use SIPTAG_SUPPORTED_STR() or SIPTAG_SUPPORTED(). * * The set of supported features is added to the @Supported header in the * response or request messages. For incoming requests, an error response * <i>420 Bad Extension </i> is automatically returned if the request * requires features that are not included in the supported feature set. * * @par Used with * nua_set_params() \n * nua_set_hparams() \n * any handle-specific nua call * * @par Parameter type * char const * * * @par Values * Feature name, or comma-separated list of them. * * Corresponding tag taking reference parameter is NUTAG_SUPPORTED_REF() * * @since New in @VERSION_1_12_2. */#define NUTAG_SUPPORTED(x) nutag_supported, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_supported;#define NUTAG_SUPPORTED_REF(x) nutag_supported_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_supported_ref;/** Allow an event or events. * * This tag is used to add a new event to the already existing set of * allowed events. If you want to ignore the existing set of allowed events, * set the allowed event set with SIPTAG_ALLOW_EVENTS_STR() or * SIPTAG_ALLOW_EVENTS(). * * The set of allowed methods is added to the @AllowEvents header in the * response to the SUBSCRIBE or PUBLISH requests. For incoming SUBSCRIBE or * PUBLISH request, an error response <i>489 Bad Event</i> is automatically * returned if the incoming method is not included in the set. * * @par Used with * nua_set_params() \n * nua_set_hparams() \n * any handle-specific nua call * * @par Parameter type * char const * * * @par Values * Valid event name, or comma-separated list of them. * * @sa @AllowEvents, @RFC3265, @RFC3903, #nua_i_subscribe, #nua_i_publish, * nua_subscribe(), nua_publish(), SIPTAG_ALLOW_EVENTS(), * SIPTAG_ALLOW_EVENTS_STR() * * @NEW_1_12_4. * * Corresponding tag taking reference parameter is NUTAG_ALLOW_EVENTS_REF() */#define NUTAG_ALLOW_EVENTS(x) nutag_allow_events, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_allow_events;#define NUTAG_ALLOW_EVENTS_REF(x) nutag_allow_events_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_allow_events_ref;/** Call state * * @par Used with * #nua_i_state * * @par Parameter type * int * * @par Values * - #nua_callstate_init - Initial state * - #nua_callstate_authenticating - 401/407 received * - #nua_callstate_calling - INVITE sent * - #nua_callstate_proceeding - 18X received * - #nua_callstate_completing - 2XX received * - #nua_callstate_received - INVITE received (and 100 Trying sent) * - #nua_callstate_early - 18X sent * - #nua_callstate_completed - 2XX sent * - #nua_callstate_ready - 2XX and ACK received/sent * - #nua_callstate_terminating - BYE sent * - #nua_callstate_terminated - BYE complete * * Corresponding tag taking reference parameter is NUTAG_CALLSTATE_REF() */#define NUTAG_CALLSTATE(x) nutag_callstate, tag_int_v(x)SOFIAPUBVAR tag_typedef_t nutag_callstate;#define NUTAG_CALLSTATE_REF(x) nutag_callstate_ref, tag_int_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_callstate_ref;enum nua_callstate { nua_callstate_init, /**< Initial state */ nua_callstate_authenticating, /**< 401/407 received */ nua_callstate_calling, /**< INVITE sent */ nua_callstate_proceeding, /**< 18X received */ nua_callstate_completing, /**< 2XX received */ nua_callstate_received, /**< INVITE received */ nua_callstate_early, /**< 18X sent (w/SDP) */ nua_callstate_completed, /**< 2XX sent */ nua_callstate_ready, /**< 2XX received, ACK sent, or vice versa */ nua_callstate_terminating, /**< BYE sent */ nua_callstate_terminated /**< BYE complete */};/** Get name for NUA call state */SOFIAPUBFUN char const *nua_callstate_name(enum nua_callstate state);/**Subscription state. * * @par Used with * #nua_notify() \n * #nua_r_subscribe \n * #nua_i_notify \n * #nua_i_subscribe \n * #nua_r_notify \n * nua_notify() \n * nua_respond() to SUBSCRIBE * * @par Parameter type * int * * @par Values * - #nua_substate_embryonic (0) * - #nua_substate_pending (1) * - #nua_substate_active (2) * - #nua_substate_terminated (3) * * Note that the @SubscriptionState or @Expires headers specified by * application overrides the subscription state specified by * NUTAG_SUBSTATE(). Application can terminate subscription by including * NUTAG_SUBSTATE(nua_substate_terminated), @SubscriptionState with value * "terminated" or @Expires header with value 0 in the NOTIFY request sent * by nua_notify(). * * @sa @RFC3265, @SubscriptionState, SIPTAG_SUBSCRIPTION_STATE(), * SIPTAG_SUBSCRIPTION_STATE_STR(), #nua_r_subscribe, #nua_i_subscribe, * #nua_i_refer, #nua_r_notify, #nua_i_notify. * * Corresponding tag taking reference parameter is NUTAG_SUBSTATE_REF() */#define NUTAG_SUBSTATE(x) nutag_substate, tag_int_v(x)SOFIAPUBVAR tag_typedef_t nutag_substate;#define NUTAG_SUBSTATE_REF(x) nutag_substate_ref, tag_int_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_substate_ref;/** Parameter type of NUTAG_SUBSTATE() */enum nua_substate { /** Extended state, considered as active. */ nua_substate_extended = nea_extended, /** Embryonic subscription: SUBSCRIBE sent */ nua_substate_embryonic = nea_embryonic, nua_substate_pending = nea_pending, /**< Pending subscription */ nua_substate_active = nea_active, /**< Active subscription */ nua_substate_terminated = nea_terminated /**< Terminated subscription */};/** Return name of subscription state. @NEW_1_12_5. */SOFIAPUBFUN char const *nua_substate_name(enum nua_substate substate);/** Convert string to enum nua_substate. @NEW_1_12_5. */SOFIAPUBFUN enum nua_substate nua_substate_make(char const *sip_substate);/**Send unsolicited NOTIFY request. * * Some applications may require sending unsolicited NOTIFY requests, that * is, NOTIFY without SUBSCRIBE or REFER request sent by event watcher. * However, sending NOTIFY request requires an existing dialog usage by * default. If NUTAG_NEWSUB(1) is included in the nua_notify() the usage * is create the usage by itself. * * If you want to create a subscription that does not terminate immediately * include SIPTAG_SUBSCRIPTION_STATE_STR() with an "expires" parameter in * the argument list, too. * * @par Used with * nua_notify() * * @par Parameter type * int (boolean) * * @par Values * - 0 - false (default) - do not create new subscription * but reject NOTIFY with 481 locally \n * - 1 - true - create a subscription if it does not exist \n * * Corresponding tag taking reference parameter is NUTAG_NEWSUB(). * * @since @NEW_1_12_5. */#define NUTAG_NEWSUB(x) nutag_newsub, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_newsub;#define NUTAG_NEWSUB_REF(x) nutag_newsub_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_newsub_ref;/**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))SOFIAPUBVAR tag_typedef_t nutag_refer_expires;#define NUTAG_REFER_EXPIRES_REF(x) nutag_refer_expires_ref, tag_uint_vr((&(x)))SOFIAPUBVAR tag_typedef_t nutag_refer_expires_ref;/**Always use id parameter with refer event. * * When an incoming REFER creates an implicit subscription, the event header * in the NOTIFY request may have an id parameter. The id parameter can be * either always included (default behavior), or the parameter can be used * only for the second and subsequent REFER requests received in a given * dialog. * * Note that once the subscription is created, the event header should not * be modified. Therefore this tag has no effect on already established * subscriptions, and its use makes sense largely on nua_set_params() only. * * @par Used with * nua_set_params() (nua_set_hparams(), nua_invite(), nua_respond(), * nua_update()). * * @par Parameter type * int (boolean) * * @par Values * 0 (false, do not use id with subscription created with first REFER request) \n * 1 (true, use id with all subscriptions created with REFER request) \n * * Corresponding tag taking reference parameter is NUTAG_REFER_WITH_ID_REF(). * * @since New in @VERSION_1_12_2. */#define NUTAG_REFER_WITH_ID(x) nutag_refer_with_id, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_refer_with_id;#define NUTAG_REFER_WITH_ID_REF(x) nutag_refer_with_id_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_refer_with_id_ref;/**Add media tags from our offer to Accept-Contact headers. * * Automatically generate @AcceptContact headers for caller * preference processing according to our the media capabilities in @a soa. * * @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() * * @sa nua_invite(), SOATAG_USER_SDP(), SIPTAG_ACCEPT_CONTACT(), * NUTAG_CALLEE_CAPS() */#define NUTAG_MEDIA_FEATURES(x) nutag_media_features, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_media_features;#define NUTAG_MEDIA_FEATURES_REF(x) \ nutag_media_features_ref, tag_bool_vr(&(x))SOFIAPUBVAR 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)SOFIAPUBVAR tag_typedef_t nutag_callee_caps;#define NUTAG_CALLEE_CAPS_REF(x) \ nutag_callee_caps_ref, tag_bool_vr(&(x))SOFIAPUBVAR 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)SOFIAPUBVAR tag_typedef_t nutag_path_enable;#define NUTAG_PATH_ENABLE_REF(x) nutag_path_enable_ref, tag_bool_vr(&(x))SOFIAPUBVAR 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)SOFIAPUBVAR tag_typedef_t nutag_service_route_enable;#define NUTAG_SERVICE_ROUTE_ENABLE_REF(x) \ nutag_service_route_enable_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_service_route_enable_ref;/** Enable built-in media session handling * * The built-in media session object @soa takes care of most details * of offer-answer negotiation. * * @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)SOFIAPUBVAR tag_typedef_t nutag_media_enable;#define NUTAG_MEDIA_ENABLE_REF(x) \ nutag_media_enable_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_media_enable_ref;/** 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)SOFIAPUBVAR tag_typedef_t nutag_offer_recv;#define NUTAG_OFFER_RECV_REF(x) nutag_offer_recv_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_offer_recv_ref;/** 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)SOFIAPUBVAR tag_typedef_t nutag_answer_recv;#define NUTAG_ANSWER_RECV_REF(x) nutag_answer_recv_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_answer_recv_ref;/** Indicate that SDP offer has b
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -