[Serusers] ReTransmission of CANCELs on 0.9.7

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Dec 4 13:16:09 CET 2009


On Nov 19, 2009 at 17:00, rupert.organ at bt.com <rupert.organ at bt.com> wrote:
>  
> Hi All,
> 
> Has anyone come up against an issue on 0.9.6 / 0.9.7 whereby a SIP App
> Server, delivers a CANCEL to the SER.
> The SER proxies the CANCELs to all the forked endpoints.
> At the same time it sends "200 Cancelling" back to the SIP App
> server...(this suppresses CANCEL retransmission from the SIP App
> server).
> If one of the CANCELs from the SER to the SIP UA gets lost....the phone
> keeps ringing.
> There is no CANCEL retransmission on the SER !!!

There is, but only for the branches on which a provisional reply was
received.
There are 3 cases:
1. no reply received => ser 0.9.x will not send _any_ CANCEL on this
                        branch, it will just close it.
2. provisional reply received (>=100 && < 200) => CANCEL will be sent
                       and retransmitted
3. final reply (>= 200) => nothing will be done (it's too late for
                           CANCEL)

(1) can introduce "ringing" problems: the  reply from UA is lost, ser
thinks it has received no reply and when CANCEL comes it just closes the
branch.
This behaviour can be changed in ser 2.1 or sip-router 3.0
(see
http://sip-router.org/docbook/sip-router/branch/master/modules/tm/tm.html#cancel_b_method).
In fact on both of them the default behaviour is to keep retransmitting
the original INVITE if there is no response received on the branch.

There's no easy way to backport it to 0.9.x. OTOH one could try
modifying the code to retransmit CANCELs even on branches where no
response was received (similar to cancel_b_method set to 2 in ser 2.1/sr
3.0). I could tell you what to change (2 or 3 lines), but I can't
guarantee that it won't introduce some nasty side effect.


> There is CANCEL retransmission on the SIP App, but when it sends SER
> replies "no pending branches"

No, that behaviour is correct:
"If a matching response context is found, the element MUST
   immediately return a 200 (OK) response to the CANCEL request."
(rfc3261 16.10 CANCEL Processing)

> 
> Ideally want the SER do CANCEL retransmissions. I understand the timers
> were rewritten in 0.10.x but this is not hardened version like
> 0.9.6....any suggestions?

sip-router 3.0 :-)  However it would require config and db scheme changes.

If you want to keep using 0.9.x then at least upgrade to 0.9.9-rc1
 (the 0.9.x are bugfix only releases, so no config or db changes are
 needed).


Andrei



More information about the sr-users mailing list