Hello, it's ok to build it via an integration of skype or another providers api, but as skype api's future is not foreseeable right now (ms announced to discontinue its support), it'll be a bet. But for my bid, I can write one if you want it.
Another and much better solution for this situation is using an Asterisk server as you can manage it with php codes directly. But there you'll have to buy fxo or gsm modules in order to place calls, another alternative is to use a voip plan from providers like skype etc.
By this method, you only use their gateways and continue using the system as long you want, independent from the provider. But it'll cost you more, so if you are interested please pm me back for more information.