[OpenSIPS-Devel] Accounting enhancement proposal

Ben Newlin Ben.Newlin at genesys.com
Mon Apr 15 09:04:33 EDT 2019


Dan,

I have a wrapper around t_relay that does many things, so no I would not get rid of it if the accounting module was updated. I'm actually currently setting the acc_extra variables in branch_route, so I would probably remove them from there. You cut off the next few sentences of my email where I said this design pattern was not specific to the accounting module changes we were discussing, but then proceeded to ask a specific question about those changes as a way of discounting my statement.

"For the wrapper routes suggestion, I only used t_relay as an example because you did. The larger point is that using routes to handle cases where many different parts of code have to perform the same action can greatly improve the size and readability of the config script and reduce the chances of some obscure path being missed when changes are made to that action in the future. It is a good policy in many programming languages; OpenSIPS is no different!"

Ben Newlin 

On 4/15/19, 5:26 AM, "Devel on behalf of Dan Pascu" <devel-bounces at lists.opensips.org on behalf of dan at ag-projects.com> wrote:

    On 12 Apr 2019, at 15:42, Ben Newlin wrote:
    
    > Dan,
    > 
    > Yes and I was agreeing with your proposal!
    
    I know, but I do not think discussing workarounds for the current system helps with designing the enhancement.
    
    > However, I'm not convinced these are only workarounds, or that they should not be needed/used even if changes are made to the acc module.
    
    If you would get an event when accounting happens, that would trigger a custom route as I proposed, would you still wrap t_relay or store things in $acc_extra() only to avoid copying them there?
    
    --
    Dan
    
    
    
    
    
    _______________________________________________
    Devel mailing list
    Devel at lists.opensips.org
    http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
    
    



More information about the Devel mailing list