Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: in acc allow setting variables for *_extra_bye after loose_route #526

Closed
rrb3942 opened this issue May 28, 2015 · 3 comments

Comments

@rrb3942
Copy link
Contributor

rrb3942 commented May 28, 2015

Currently if you use the *_extra_bye options in the Acc module you must make sure that the variables are set before calling loose_route or they are not populated.

This can be problematic if you need to access data associated with the dialog (such as a $dlg_val) for calculations or other processing to populate those values. Making it so that they can be populated after calling loose_route (such as the change made to $DLG_timeout in 1.11) would make this much easier and more intuitive.

@vladpaiu
Copy link
Member

vladpaiu commented Jun 2, 2015

Hello,

This can be achieved now by using the dialog exported events ( see http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id297207 )
By using the event_route module ( http://www.opensips.org/html/docs/modules/2.1.x/event_route#id293506 ) and declaring a script route as route[E_DLG_STATE_CHANGED] , you will be able to detect when the dialog switches from the 4 state ( established ) to state 5 ( ended ) - the route will get called before the accounting is done, thus allowing you to populate your variables.

Best Regards,
Vlad

@rrb3942
Copy link
Contributor Author

rrb3942 commented Jun 11, 2015

Hey Vlad,

Thank you for the response. That will work great for me.

I still think that it is a bit unintuitive that any variables after calling loose_route don't get accounted for, as loose_route tends to be one of the very first calls that will be made on a request with a totag (which a BYE is pretty much guaranteed to have).

The documentation should at least mention this, as I know it was not obvious to me when I first attempted to use it.

Thanks for your help.

@rrb3942
Copy link
Contributor Author

rrb3942 commented Dec 10, 2018

Pretty sure this is all taken care of with the new accounting variables and changes.

@rrb3942 rrb3942 closed this as completed Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants