For wholesale/retail users, following are the steps needed to perform in order to setup the billing system properly.
1) First of all we need to create Providers.
2) Next we need to create trunks and associate them with providers.
3) Then We need to create Call Plans.
4) Next we need to define prefixes.
5) After that we need to create tariffs and add rates for each prefix and link them with call plans and trunks.
6) Once this is setup, now our system is connected with our Vendors / Carrier.
7) Now we need to create customers and their billing. We need to create customers account from User section and then assign them Call plans.
8) After this we need to create sip accounts for those users so that they can be authenticated to our billing system. S4Switch provide two type of authentication, one is IP authentication and second is Digest authentication.
9) And in the last we need to add balance for users so that they can make calls.
These are the basic steps we need to follow in order to bring the working SIP accounts to make the calls.