Thank you jiri,
I totally agree, but I have a question that occured to me now and I cant
find answer:
If Kamailio receives a CANCEL from a UAC after kamailio has responded with
a 200 to the corresponding INVITE, what does t_relay_cancel() do in the
following 2 cases:
1. CANCEL received before the ACK from UAC. This is legal from the side of
the UAC, since the UAC may have sent the CANCEL before it receives the 200
to the INVITE that kamailio sent.
2. CANCEL received after the ACK . This is illegal, but anyway, kamailio
must do something. I can't find in the RFC if it should respond 200 to the
CANCEL and drop it, or 481(Call/Transaction Does Not Exist). Although 481
seems more resonable, 16.10 section of RFC says: "... If a matching
response context is found, the element MUST immediately return a 200 (OK)
response to the CANCEL request.". It does not discriminate if the
corresponding INVITE has been 200ed or not. Any insights?
In the spirit of what you wrote in your reply, could I configure it
somehow, to take initiative and translate the CANCEL to a BYE downstream,
no matter whether CANCEL is received before or after the ACK?
Bill
On Fri, May 3, 2013 at 12:26 PM, Jiri Kuthan <jiri(a)iptel.org> wrote:
On 5/3/13 11:04 AM, Vassilis Radis wrote:
Hello all,
In the documentation of the t_relay_cancel() (TM module) there is an
example that reads:
if (method == CANCEL) {
if (!t_relay_cancel()) { # implicit drop if relaying was successful,
# nothing to do
# corresponding INVITE transaction found but error occurred
sl_reply("500", "Internal Server Error");
drop;
}
# bad luck, corresponding INVITE transaction is missing,
# do the same as for INVITEs
}
What bothers me is the phrase#do the same as or INVITEs, because in RFC(
http://tools.ietf.org/**html/rfc3261#section-16.10<http://tools.ietf.org…)
it says:
If a response context is not found, the element does not have any
knowledge of the request to apply the CANCEL to. It MUST*statelessly*
forward the CANCEL request (it may have statelessly forwarded the
associated request previously).
So aren't we supposed to immediately statelessly forward the CANCEL if
t_relay_cancel() did not find the INVITE transaction, instead of doing the
same as INVITEs, which could be t_relay() (not stateless)?. Like below:
if (method == CANCEL) {
if (!t_relay_cancel()) { # implicit drop if relaying was successful,
# nothing to do
# corresponding INVITE transaction found but error occurred
sl_reply("500", "Internal Server Error");
drop;
}
# bad luck, corresponding INVITE transaction is missing,
forward();
}
Am I correct or am i missing something?
It could be even more standardized this way indeed. Aparts
from standards, measured by common sense I cannot realize
that either way would break something. The CANCEL should
not be appearing there at all. Perhaps it would make a difference
when SER is restarted and one after it went alive again,
UAC sent a CANCEL. Then what you suggest would perform better.
If you want to make sure you have captured this case, also make
sure that branch ids are configured to be produced statelessly.
Otherwise SER-proxied CANCEL won't match the previous INVITE anyhow.
other than that, SER is much better than RFC3261. Its
registrar is stateless (in departure from the RFC, otherwise
it would be more vulnerable to DoS attacks), INVITE transaction
is hold after a 200 passes through (otherwise it would not
absorb retransmissions, create another transaction and
cause interop issues), and probably more.
I just wanted to say it is really important to look first
at what interop issues one may have or not, as SER the
way it is is likely to produce better interop than
consequent standard compliance. In most cases you
can achieve it by configuration changes, I just think
you don't want to :)
-jiri
> Thank you in advance,
> Bill
>
>
>
> ______________________________**_________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
>
http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**users<http:/…
>
>