[OpenSIPS-Users] Opensips should reply "SIP/2.0 200 canceling" to CANCEL after forwarding ? or wait after reply
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Fri Jun 25 09:11:26 CEST 2010
Hi Julien,
The only case when the 487 is generated by opensips is when a CANCEL is
received for an INVITE branch which did not received yet no reply. In
such a case opensips will inject a 487 reply on that branch to
compensate to lack of reply from the downstream party.
The order of the requests in siptrace is really irrelevant (for < 1s
intervals) as it is strongly affected by the parallel processing in
opensips and by the DB op (to insert the trace).
Could you post the whole 487 reply from DB ? My guess the 487 is a
result of a race between the incoming CANCEL from caller and the first
100 reply from callee.
Regards,
Bogdan
Julien Chavanton wrote:
> Hi thanks for this feed back, unfortunatly I do nto have a full trace
> but I am using sip_trace data from database.
>
> This is waht I from on this call-id, it seems like an isolated case,
> but I am wandering where is the "487" triggered
>
> 88.88.88.88(UA) --> 10.10.10.1(opensips) --> 10.2.2.22(UA)
>
> I am handling CANCEL like this, could t_relay() trigger this call ?
>
> ####---> Handling CANCEL
> if ( is_method("CANCEL") ) {
> if ( t_check_trans() ){
> t_relay();
> }
> exit;
> }
>
> +---------------------+--------+--------+----------------------+----------------------+----------------+
> | time_stamp | method | status | fromip |
> toip | fromtag |
> +---------------------+--------+--------+----------------------+----------------------+----------------+
> | 2010-05-26 17:52:52 | INVITE | | udp:88.88.88.88:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:52 | INVITE | | udp:88.88.88.88:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:53 | INVITE | | udp:10.10.10.1:5060 |
> udp:10.2.2.22:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | CANCEL | | udp:88.88.88.88:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | INVITE | 100 | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | CANCEL | 200 | udp:10.10.10.1:5060 |
> udp:88.88.88.88:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | | 100 | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | INVITE | | udp:88.88.88.88:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | INVITE | 200 | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | CANCEL | | udp:10.10.10.1:5060 |
> udp:10.2.2.22:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | INVITE | 487 | udp:10.10.10.1:5060 |
> udp:88.88.88.88:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | | 200 | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:52:59 | INVITE | 200 | udp:10.10.10.1:5060 |
> udp:88.88.88.88:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:53:11 | ACK | | udp:88.88.88.88:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:53:27 | INVITE | 200 | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 17:53:27 | | 200 | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | SDhbtm701-9270 |
> | 2010-05-26 18:13:19 | BYE | | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | 1190677408 |
> | 2010-05-26 18:13:20 | BYE | | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | 1190677408 |
> | 2010-05-26 18:13:20 | BYE | | udp:10.10.10.1:5060 |
> udp:88.88.88.88:5060 | 1190677408 |
> | 2010-05-26 18:13:40 | BYE | 481 | udp:88.88.88.88:5060 |
> udp:10.10.10.1:5060 | 1190677408 |
> | 2010-05-26 18:13:40 | | 481 | udp:88.88.88.88:5060 |
> udp:10.10.10.1:5060 | 1190677408 |
> | 2010-05-26 18:13:40 | BYE | | udp:10.2.2.22:5060 |
> udp:10.10.10.1:5060 | 1190677408 |
> | 2010-05-26 18:13:40 | BYE | 481 | udp:10.10.10.1:5060 |
> udp:10.2.2.22:5060 | 1190677408 |
> +---------------------+--------+--------+----------------------+----------------------+----------------+
>
>
> ------------------------------------------------------------------------
> *From:* Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro]
> *Sent:* Mon 21/06/2010 5:09 PM
> *To:* OpenSIPS users mailling list
> *Cc:* Julien Chavanton
> *Subject:* Re: [OpenSIPS-Users] Opensips should reply "SIP/2.0 200
> canceling" to CANCEL after forwarding ? or wait after reply
>
> Hi Julien,
>
> I doubt opensips generates a 487 Request terminated for an INVITE when
> the CANCEL is passing through - the 497 is end to end, not hop by hop
> (as the CANCEL), So, the 487 is generated by callee and opensips simply
> relays it back.
>
> Regards,
> Bogdan
>
> Julien Chavanton wrote:
> >
> > Hi, regarding handling of CANCEL request,
> >
> > Please correct me if I am wrong,
> >
> > I have glare condition on how Opensips handled Cancel requests.
> > The problem is taht Opensips respond "487 Request terminated" strait
> > after forwarding the CANCEL but it does not know if the targe UA will
> > accept it.
> >
> > I think it should wait after the target UA to reply before, as this
> > can create out of sync situation if there is a problem with the target.
> > in this senario the "200 OK" is received at the same time as the
> > CANCEL is sent, in this case the target UA as the right to ignore the
> > CANCEL because it as generated a final response.
> >
> >
> > UA -----> CANCEL ------------------------> osips
> > UA <------ SIP/2.0 200 canceling --------> osips
> > osips <--- 200 OK <-- UA
> > osips ---> CANCEL --> UA
> > UA <---- SIP/2.0 487 Request Terminated -> osips
> >
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Bootcamp
> 20 - 24 September 2010, Frankfurt, Germany
> www.voice-system.ro
>
--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro
More information about the Users
mailing list