The Openser Developer hasn't become available yet, so I've been digging into Openser myself.
I now have a working model, if somewhat crude at the moment.
A very much out of the box openser.cfg file, now allows calls out via A2B unless it's local, then OpenSer(OS) handles the calls.
Users are authenticated at the OS end only. The users are validated against a view of sip buddies and card. This means simply add users as normal within A2B and they're active.
I've also resolved the issue where redirects and transfers were not accounted for. When a call is forwarded (FWDALL, FWDBUSY), a diverted from header is added to the SIP header which has the details of the phone doing the divert.
In asterisk, I examine the header for this content and then do a MYSQL select on the sip buddies table and discover the account code.
This is then set prior to A2B processing, so that the appropriate card is billed.
Once this has been thoughly tested, the ideal place for this lookup would be in A2B, but I don't want to mess with this until I'm 100% sure this is the way to go.
I've spent 4 days learning OpenSer writing complex scripts to maniplute headers to handle call divert, only to strip it all out as it's not required.
I'm not using mediaproxy at the moment, but will have to, to check NAT traversal.
The short of it is this
A really basic install of Openser.
The creation of a view within the openser DB.
A few scripts in the extensions.conf file, and that's it.
There is one major change though. When using Openser, the writing of the sip.conf files has to be surpressed for users. Having these in place will cause a double auth scenario which will fail. That said, do we really need huge sip.confs? It doesn't scale. Besides, using the above removes the need for asterisk realtime for sip peers.
Oh, and I can also load balance against multiple asterisk servers
ToDO:
Voicemail
MWI
Any comments would be appreciated.
regards