[OpenSIPS-Users] AVP availability in CANCEL

Callum Guy callum.guy at x-on.co.uk
Mon Mar 16 11:22:14 EST 2020


Hi All,

I have a simple question regarding availability of AVP variables in CANCEL.
I'm not sure when OpenSIPs will load the AVP's for a transaction so am
looking for information here. The situation is that I want to flag sessions
using a media proxy and close the sessions when a CANCEL arrives before the
call is answered.

This is how I enable and track rtpengine:

route[RTPENGINE_OFFER_IE] {
  set_dlg_flag(10);
  $avp(media_proxy) := "on";
  rtpengine_offer("trust-address replace-session-connection
in-iface=internal out-iface=external ICE=remove");
}

The current logic sets both a dialog variable and an AVP when rtpengine is
offered. When BYE/CANCEL messages arrive the script does this:

if (is_method("BYE|CANCEL")) {
  match_dialog();
  if (is_dlg_flag_set(10) || $avp(media_proxy) == "on") {
    rtpengine_delete();
  }
}

I was hoping that the dialog would be matched by call ID and tags however
this does not appear to work so I must be missing some info. The AVP was
added later to try and make it work for the CANCEL requests but also did
not work.

I'm planning on replacing the AVP with a transaction flag tonight, is that
likely to resolve the issue? Apologies if these are basic questions,
availability of different types of flags and AVP's really aren't clear to
me so any advice would be appreciated!

Thanks,

Callum

-- 





*0333 332 0000  |  www.x-on.co.uk <http://www.x-on.co.uk>  |   ** 
<https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel> 
  <https://twitter.com/xonuk> *


X-on
is a trading name of Storacall 
Technology Ltd a limited company registered in
England and Wales.


Registered Office : Avaland House, 110 London Road, Apsley, Hemel 
Hempstead,
Herts, HP3 9SD. Company Registration No. 2578478.

The 
information in this e-mail is confidential and for use by the addressee(s)

only. If you are not the intended recipient, please notify X-on immediately 
on +44(0)333 332 0000 and delete the
message from your computer. If you are 
not a named addressee you must not use,
disclose, disseminate, distribute, 
copy, print or reply to this email. Views
or opinions expressed by an 
individual
within this email may not necessarily
reflect the views of X-on 
or its associated companies. Although X-on routinely
screens for viruses, 
addressees should scan this email and any attachments
for
viruses. X-on 
makes no representation or warranty as to the absence of viruses
in this 
email or any attachments.










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200316/ca173f28/attachment.html>


More information about the Users mailing list