asterisk2billing.org
http://forum.asterisk2billing.org/

*PATCH* (1.6) Environment based configuration selection
http://forum.asterisk2billing.org/viewtopic.php?f=34&t=7145
Page 1 of 1

Author:  whardier [ Sat Feb 20, 2010 2:48 am ]
Post subject:  *PATCH* (1.6) Environment based configuration selection

I'd like to see this in mainstream, perhaps using different wording for variable names. I was recently using OpenVZ and virualizing many systems to offer a highly available and secure A2Billing hosting platform which means seperate Asterisk processes per virtual host. I decided to work with the PHP and reduce that requirement by allowing Asterisk and the web server the ability to supply a simple environment variable that will determine which configuration file is read. Within the dialplan you can set the environment variable before calling the AGI() and use mod_env in Apache.

Attachments:
AllowCustomConfig.diff.gz [2.9 KiB]
Downloaded 998 times

Author:  areski [ Sat Feb 20, 2010 6:17 pm ]
Post subject:  Re: *PATCH* (1.6) Environment based configuration selection

Well done, it s a good start for an addition, I had something similar in mind but never went through it.

Few comments :
1) Patch submit : You need to use Trac, so that we can follow up your addition efficiently
2) How to deliver a patch : http://www.asterisk2billing.org/cgi-bin ... evelopment
very important so that we can apply this quickly and see exactly the changes being done.


About the feature itself, it might need to be improved at certainly levels :
1) AGI, decided the configuration to load :
- We could create a Dialplan variable : A2BILLING_CONFIG before calling the AGI and therefore define the config to use.

2) SIP/IAX Config : The system should share the same config files, we might want to create sip/iax_additional_a2billing.conf under an unique name for each A2Billing installation. Installation might have an unique A2Billing Instance Name, this could be generated at installation time.

3) SIP/IAX Realtime : Same issues as above, for this we will need to use a shared table as Asterisk cannot retrieve realtime information from different tables. So that will be a bit more complex but there is ways to achieve this which will request a lot more of code changes. Trying to use the AIN into the a shared sip/iax config table might help to achieve this.
We can think about having database Asterisk with realtime sip_users building by UNION from all the A2Billing installed on the system... well that s just a quick thoughts, maybe we can come up with more elegants ideas.

Note you could be worry also if the length of username is small, this might outcome with overwrite of config settings, which will lead to connection issues which might be hard to identify.


It will be nice to see this addition into A2Billing and you will get all my support on this.

Cheers,
/Areski

Author:  Zoyla1 [ Tue Mar 31, 2015 10:48 am ]
Post subject:  Re: *PATCH* (1.6) Environment based configuration selection

I am very frustrated about which of DeadAGI or AGI to use on extensions.conf?

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/