📄 nua_tag.h
字号:
* * 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)extern tag_typedef_t nutag_identity;#define NUTAG_IDENTITY_REF(x) nutag_identity_ref, nutag_handle_vr(&(x))extern tag_typedef_t nutag_identity_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;/** 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)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;/** Call state * * @par Used with * #nua_i_state * * @par Parameter type * int * * @par Values * - @c nua_callstate_init - Initial state * - @c nua_callstate_authenticating - 401/407 received * - @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)extern tag_typedef_t nutag_callstate;#define NUTAG_CALLSTATE_REF(x) nutag_callstate_ref, tag_int_vr(&(x))extern 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 */char const *nua_callstate_name(enum nua_callstate state);/** 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 { 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};/**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))extern tag_typedef_t nutag_refer_expires;#define NUTAG_REFER_EXPIRES_REF(x) nutag_refer_expires_ref, tag_uint_vr((&(x)))extern tag_typedef_t nutag_refer_expires_ref;/** 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;/** 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)extern tag_typedef_t nutag_offer_recv;#define NUTAG_OFFER_RECV_REF(x) nutag_offer_recv_ref, tag_bool_vr(&(x))extern 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)extern tag_typedef_t nutag_answer_recv;#define NUTAG_ANSWER_RECV_REF(x) nutag_answer_recv_ref, tag_bool_vr(&(x))extern tag_typedef_t nutag_answer_recv_ref;/** 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)extern tag_typedef_t nutag_offer_sent;#define NUTAG_OFFER_SENT_REF(x) nutag_offer_sent_ref, tag_bool_vr(&(x))extern tag_typedef_t nutag_offer_sent_ref;/** 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)extern tag_typedef_t nutag_answer_sent;#define NUTAG_ANSWER_SENT_REF(x) nutag_answer_sent_ref, tag_bool_vr(&(x))extern tag_typedef_t nutag_answer_sent_ref;#if SU_HAVE_INLINEsu_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/* Tags for compatibility */#define NUTAG_USE_LEG(x) NUTAG_USE_DIALOG(x)#define NUTAG_USE_LEG_REF(x) NUTAG_USE_DIALOG_REF(x)#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))#define NUTAG_HOLD(x) SOATAG_HOLD((x) ? "*" : NULL)#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))SOFIA_END_DECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -