[OpenSIPS-Users] dialog and CANCEL

Denis Putyato denis7979 at mail.ru
Mon Mar 21 12:55:51 CET 2011


Hello

 

There is such scheme of call

 

One gateway – 1.1.1.1

Opensips – 2.2.2.2

Another gateway – 3.3.3.3

Calls from 1.1.1.1 to 3.3.3.3 through 2.2.2.2

I use CDR_flag for accounting

 

A piece of script config:

…

modparam("dialog", "default_timeout", 1800)

…

…

onreply_route[1] {

if (t_was_cancelled()) {

   exit;

  }

if (status=~"200||18[0,3]") {

if (isflagset(10) && has_body("application/sdp")) {

  rtpproxy_answer("con");

  }

  if (isflagset(21) && nat_uac_test("55")) fix_nated_contact();

   store_dlg_value("calleeip","$si");

   store_dlg_value("calleeport","$sp");

   store_dlg_value("calleecont","$ct.fields(uri)");

   if (status=~"200" && $rm=="INVITE" && !isflagset(29)) { 

   set_dlg_profile("answer","$avp(i:71)");

   set_dlg_profile("outdiranswer","$avp(i:3)");

   }

  }

  return();

}

….

 

As you can see in testlog file, 1.1.1.1 trying cancel initial request by sending CANCEL, this CANCEL Opensips forwarding to 3.3.3.3 but from 3.3.3.3 Opensips receives 200 OK on INVITE. Because of this there is no CANCEL of the dialog on Opensips and after 1800 sec (see “default_timeout”) I have a CDR record in Opensips with duration of 1800 sec.

 

The question. Why does Opensips forward 200 OK from 3.3.3.3 to 1.1.1.1 when initial request was cancelled, and why Opensips makes accounting dialog when initial request was cancelled?  

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110321/801b62af/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testlog
Type: application/octet-stream
Size: 23308 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20110321/801b62af/attachment-0001.obj>


More information about the Users mailing list