Commit b695a547 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

nua_session.c, nua_tag.h: do not auto-answer re-INVITE if media is disabled.

Updated NUTAG_AUTOANSWER() documentation. Added @bug description there.

darcs-hash:20060915105622-65a35-328b621b46835fbbc4a8ecb25ecda58fde7ee039.gz
parent 5cdf5d0e
......@@ -1138,8 +1138,12 @@ int process_invite2(nua_t *nua,
#define AUTOANSWER ((void*)-1)
if (NH_PGET(nh, auto_answer) ||
/* Auto-answert to re-INVITE unless auto_answer is set to 0 */
/* Auto-answer to re-INVITE unless auto_answer is set to 0 on handle */
(ss->ss_state == nua_callstate_ready &&
/* Auto-answer requires enabled media (soa).
* XXX - if the re-INVITE modifies the media we should not auto-answer.
*/
nh->nh_soa &&
!NH_PISSET(nh, auto_answer))) {
respond_to_invite(nua, nh, SIP_200_OK, AUTOANSWER);
return 0;
......
......@@ -462,8 +462,10 @@ SOFIAPUBVAR tag_typedef_t nutag_autoalert_ref;
/** ACK automatically
*
* @par Used with
* nua_set_params() \n
* nua_get_params()
* nua_set_params(), nua_set_hparams() \n
* nua_get_params(), nua_get_hparams() \n
* nua_invite() \n
* nua_respond()
*
* @par Parameter type
* int
......@@ -480,19 +482,36 @@ 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 (200 Ok) automatically to incoming call
/** Answer (with 200 Ok) automatically to incoming call.
*
* @par Used with
* nua_set_params() \n
* nua_get_params()
* nua_set_params(), nua_set_hparams() \n
* nua_get_params(), nua_get_hparams() \n
* nua_invite() \n
* nua_respond()
*
* @par Parameter type
* int
* int (boolean)
*
* @par Values
* @c 0 No automatic sending of "200 Ok" \n
* @c !=0 "200 Ok" sent automatically
*
* @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.
*
* @sa NUTAG_MEDIA_ENABLE(), NUTAG_AUTOALERT(), NUTAG_AUTOACK().
*
* @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.
*
* Corresponding tag taking reference parameter is NUTAG_AUTOANSWER_REF()
*/
#define NUTAG_AUTOANSWER(x) nutag_autoanswer, tag_bool_v(x)
......
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