[OpenSIPS-Users] AVP availability in CANCEL

Ben Newlin Ben.Newlin at genesys.com
Mon Mar 16 13:01:15 EST 2020


Callum,

Both AVPs and transaction flags are tied to the transaction, so you must call t_check_trans so the transaction will be matched. I don’t see that happening in your code. I don’t believe match_dialog will do that for you.

Also, I think the issues you are having with dialog variables as you mentioned in another response may be related to an feature request we have open [1]. Basically, once the BYE is received the dialog is set to ENDED state and the dialog variable retrieval ignores dialogs in this state. Our use case is a bit different than yours, so it may not be the same.

[1] - https://github.com/OpenSIPS/opensips/issues/1637

Ben Newlin

From: Users <users-bounces at lists.opensips.org> on behalf of Callum Guy <callum.guy at x-on.co.uk>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org>
Date: Monday, March 16, 2020 at 7:23 AM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: [OpenSIPS-Users] AVP availability in CANCEL

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

[Image removed by sender.]

0333 332 0000  |  www.x-on.co.uk<http://www.x-on.co.uk>  |   [Image removed by sender.] <https://www.linkedin.com/company/x-on>   [Image removed by sender.] <https://www.facebook.com/XonTel>   [Image removed by sender.] <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/821ee2a8/attachment-0001.html>


More information about the Users mailing list