Hello, everybody!
Can I answer to the incoming BYE with 200 ok from the application without
using NUTAG_WITH?
I`ve init nua with NUTAG_AUTOANSWER(0) and NUTAG_APPL_METHOD("BYE"). Than
I got nua_i_bye event. I want to answer 200
with nua_resopnd(nh, 200, NULL, NUTAG_NULL()), but stack emits nua_i_error
500 - answer to non-existing request.
Looking into code:
----
void
nua_stack_respond(nua_t *nua, nua_handle_t *nh,
int status, char const *phrase, tagi_t const *tags)
{
nua_server_request_t *sr;
tagi_t const *t;
msg_t const *request = NULL;
t = tl_find_last(tags, nutag_with);
if (t)
request = (msg_t const *)t->t_value;
for (sr = nh->nh_ds->ds_sr; sr; sr = sr->sr_next) {
if (request && sr->sr_request.msg == request)
break;
>>>
/* nua_respond() to INVITE can be used without NUTAG_WITH() */
if (!t && sr->sr_method == sip_method_invite)
break;
>>>
}
if (sr == NULL) {
nua_stack_event(nua, nh, NULL, nua_i_error,
500, "Responding to a Non-Existing Request", NULL);
return;
}
...
----
why I must use NUTAG_WITH to respond to BYE? What side effects can I get
if doing something like that:
>>>
if (!t && (sr->sr_method == sip_method_invite || sr->sr_method ==
sip_method_bye))
break;
>>>
--
Best regards,
Vladimir O. Luchko
Novosibirsk
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel