[OpenSIPS-Users] Opensips should reply "SIP/2.0 200 canceling" to CANCEL after forwarding ? or wait after reply

Julien Chavanton jc at atlastelecom.com
Mon Jun 21 23:04:38 CEST 2010


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100621/611d5516/attachment-0001.htm 


More information about the Users mailing list