Commit 7d895b49 authored by Pekka Pessi's avatar Pekka Pessi

nua module: added NUTAG_ONLY183_100REL().

sofia-sip/nua_tag.h, nua_tag.c, nua_params.h, nua_params.c.

darcs-hash:20060519113343-65a35-05b89c45eec21ca31238fd24796ee3600f70434d.gz
parent f54a2a41
...@@ -77,6 +77,7 @@ int nua_stack_set_defaults(nua_handle_t *nh, ...@@ -77,6 +77,7 @@ int nua_stack_set_defaults(nua_handle_t *nh,
NHP_SET(nhp, invite_enable, 1); NHP_SET(nhp, invite_enable, 1);
NHP_SET(nhp, auto_alert, 0); NHP_SET(nhp, auto_alert, 0);
NHP_SET(nhp, early_media, 0); NHP_SET(nhp, early_media, 0);
NHP_SET(nhp, only183_100rel, 0);
NHP_SET(nhp, auto_answer, 0); NHP_SET(nhp, auto_answer, 0);
NHP_SET(nhp, auto_ack, 1); NHP_SET(nhp, auto_ack, 1);
NHP_SET(nhp, invite_timeout, 120); NHP_SET(nhp, invite_timeout, 120);
...@@ -359,6 +360,10 @@ int nua_stack_set_params(nua_t *nua, nua_handle_t *nh, nua_event_t e, ...@@ -359,6 +360,10 @@ int nua_stack_set_params(nua_t *nua, nua_handle_t *nh, nua_event_t e,
else if (t->t_tag == nutag_early_media) { else if (t->t_tag == nutag_early_media) {
NHP_SET(nhp, early_media, t->t_value != 0); NHP_SET(nhp, early_media, t->t_value != 0);
} }
/* NUTAG_ONLY183_100REL(only183_100rel) */
else if (t->t_tag == nutag_only183_100rel) {
NHP_SET(nhp, only183_100rel, t->t_value != 0);
}
/* NUTAG_AUTOANSWER(auto_answer) */ /* NUTAG_AUTOANSWER(auto_answer) */
else if (t->t_tag == nutag_autoanswer) { else if (t->t_tag == nutag_autoanswer) {
NHP_SET(nhp, auto_answer, t->t_value != 0); NHP_SET(nhp, auto_answer, t->t_value != 0);
...@@ -832,6 +837,7 @@ int nua_stack_get_params(nua_t *nua, nua_handle_t *nh, nua_event_t e, ...@@ -832,6 +837,7 @@ int nua_stack_get_params(nua_t *nua, nua_handle_t *nh, nua_event_t e,
TIF(NUTAG_ENABLEINVITE, invite_enable), TIF(NUTAG_ENABLEINVITE, invite_enable),
TIF(NUTAG_AUTOALERT, auto_alert), TIF(NUTAG_AUTOALERT, auto_alert),
TIF(NUTAG_EARLY_MEDIA, early_media), TIF(NUTAG_EARLY_MEDIA, early_media),
TIF(NUTAG_ONLY183_100REL, only183_100rel),
TIF(NUTAG_AUTOANSWER, auto_answer), TIF(NUTAG_AUTOANSWER, auto_answer),
TIF(NUTAG_AUTOACK, auto_ack), TIF(NUTAG_AUTOACK, auto_ack),
TIF(NUTAG_INVITE_TIMER, invite_timeout), TIF(NUTAG_INVITE_TIMER, invite_timeout),
......
...@@ -44,6 +44,7 @@ typedef struct nua_handle_preferences ...@@ -44,6 +44,7 @@ typedef struct nua_handle_preferences
unsigned nhp_invite_enable:1; unsigned nhp_invite_enable:1;
unsigned nhp_auto_alert:1; unsigned nhp_auto_alert:1;
unsigned nhp_early_media:1;/**< Establish early media session */ unsigned nhp_early_media:1;/**< Establish early media session */
unsigned nhp_only183_100rel:1;/**< Only 100rel 183. */
unsigned nhp_auto_answer:1; unsigned nhp_auto_answer:1;
unsigned nhp_auto_ack:1; /**< Automatically ACK a final response */ unsigned nhp_auto_ack:1; /**< Automatically ACK a final response */
unsigned :0; unsigned :0;
...@@ -108,6 +109,7 @@ typedef struct nua_handle_preferences ...@@ -108,6 +109,7 @@ typedef struct nua_handle_preferences
unsigned nhb_invite_enable:1; unsigned nhb_invite_enable:1;
unsigned nhb_auto_alert:1; unsigned nhb_auto_alert:1;
unsigned nhb_early_media:1; unsigned nhb_early_media:1;
unsigned nhb_only183_100rel:1;
unsigned nhb_auto_answer:1; unsigned nhb_auto_answer:1;
unsigned nhb_auto_ack:1; unsigned nhb_auto_ack:1;
unsigned nhb_invite_timeout:1; unsigned nhb_invite_timeout:1;
......
...@@ -49,6 +49,7 @@ tag_typedef_t nutag_uicc = STRTAG_TYPEDEF(uicc); ...@@ -49,6 +49,7 @@ tag_typedef_t nutag_uicc = STRTAG_TYPEDEF(uicc);
tag_typedef_t nutag_media_features = BOOLTAG_TYPEDEF(media_features); tag_typedef_t nutag_media_features = BOOLTAG_TYPEDEF(media_features);
tag_typedef_t nutag_callee_caps = BOOLTAG_TYPEDEF(callee_caps); tag_typedef_t nutag_callee_caps = BOOLTAG_TYPEDEF(callee_caps);
tag_typedef_t nutag_early_media = BOOLTAG_TYPEDEF(early_media); tag_typedef_t nutag_early_media = BOOLTAG_TYPEDEF(early_media);
tag_typedef_t nutag_only183_100rel = BOOLTAG_TYPEDEF(only183_100rel);
tag_typedef_t nutag_media_enable = BOOLTAG_TYPEDEF(media_enable); tag_typedef_t nutag_media_enable = BOOLTAG_TYPEDEF(media_enable);
tag_typedef_t nutag_soa_session = PTRTAG_TYPEDEF(soa_session); tag_typedef_t nutag_soa_session = PTRTAG_TYPEDEF(soa_session);
......
...@@ -236,7 +236,7 @@ SOFIAPUBVAR tag_typedef_t nutag_soa_name; ...@@ -236,7 +236,7 @@ SOFIAPUBVAR tag_typedef_t nutag_soa_name;
nutag_soa_name_ref, tag_str_vr(&(x)) nutag_soa_name_ref, tag_str_vr(&(x))
SOFIAPUBVAR tag_typedef_t nutag_soa_name_ref; SOFIAPUBVAR tag_typedef_t nutag_soa_name_ref;
/** Establish early media session using 183 responses and PRACK requests. /**Establish early media session using 183 responses and PRACK requests.
* *
* @par Used with * @par Used with
* nua_set_params() \n * nua_set_params() \n
...@@ -257,6 +257,30 @@ SOFIAPUBVAR tag_typedef_t nutag_early_media; ...@@ -257,6 +257,30 @@ SOFIAPUBVAR tag_typedef_t nutag_early_media;
#define NUTAG_EARLY_MEDIA_REF(x) nutag_early_media_ref, tag_bool_vr(&(x)) #define NUTAG_EARLY_MEDIA_REF(x) nutag_early_media_ref, tag_bool_vr(&(x))
SOFIAPUBVAR tag_typedef_t nutag_early_media_ref; SOFIAPUBVAR tag_typedef_t nutag_early_media_ref;
/**Respond only 183 with 100rel.
*
* If this parameter is set, stack uses 100rel only with 183: otherwise, all
* 1XX responses (except <i>100 Trying</i>) uses 100rel.
*
* @par Used with
* nua_set_params() \n
* nua_get_params()
*
* @par Parameter type
* int (boolean)
*
* @par Values
* @c 0 False \n
* @c !=0 True
*
* Corresponding tag taking reference parameter is NUTAG_ONLY183_100REL_REF()
*/
#define NUTAG_ONLY183_100REL(x) nutag_only183_100rel, tag_bool_v(x)
SOFIAPUBVAR tag_typedef_t nutag_only183_100rel;
#define NUTAG_ONLY183_100REL_REF(x) nutag_only183_100rel_ref, tag_bool_vr(&(x))
SOFIAPUBVAR tag_typedef_t nutag_only183_100rel_ref;
/** Timer for outstanding INVITE in seconds. /** Timer for outstanding INVITE in seconds.
* *
* INVITE will be canceled if no answer is received before timer expires. * INVITE will be canceled if no answer is received before timer expires.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment