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 ... evelopmentvery 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