
You will not surprise anyone with IP telephony, many use the services of Skype, SipNet, TelMe and many, many others. Having joined forces with like-minded people, we decided not to repeat the existing solutions, but to create a service for the integration of already existing Internet telephony providers.
What for? The main objective of our service is to bring together all providers, and to give the opportunity to use simultaneously different gateways at the most favorable tariffs for this time and in this direction.
In the topic I will talk about what was behind the scenes: the chosen architecture, pleasant solutions and development tools. And the most inquisitive habrayuzerov waiting for a small gift.
What have we implemented?
- Unified balance, there is no need to replenish accounts on different sites, to remember a lot of passwords, etc.
- Comparison of tariffs in the directions and selection of the most suitable.
- The ability to call directly from the site.
- Detailed call details.
- Convenient and secure API.
- Additional functionality, such as phone number identification, text-to-speech, sending SMS.
Most of the features are available now on the
uvoiceme.ru website, the smaller one is in closed beta testing.
Last year we also submitted an application to participate in Web Ready, but we did not make it to the final :)
')
Our "chips"
It is possible to assign a provider to the dialing prefix, i.e. configure it so that, for example, we call Canada using one gateway and use another for calls to Russia (in order to minimize the total cost of calls).
The call can be made directly from the site, without installing additional software - for this we have developed the corresponding Java Applet. We will be able to install such a web phone on your website!
There is an opportunity to connect two phones (including through the API) - the service will reach the participants in the conversation and, if they agree, connect them.
The hardware and software side of the issue
Hosting- Dedicated server - AMD Opteron Dual Core 1218 5200+ 2 cores, 4 GB DDR2 RAM, 2x 300GB HDD SATA2 (software RAID1), Ubuntu 10.10 x64.
- Virtual server video chat, VDS to Debian 5.0.
- Shared hosting from .masterhost, Windows Server 2008, ASP.NET (.NET Framework 4).
Implementation- Communigate Pro is used as the IP-PBX server. Free license for 5 users.
- Self-recorded billing, Postgres 8.4.6 database.
- Between billing and IP-PBX server there is a layer written in Cherry Python, which provides data exchange.
- The site and API are implemented on ASP.NET C # (Web Forms, WCF Services), software developed using the Microsoft BizSpark program was used for development.
Architecture

How does billing work?
For the curious, I decided to describe exactly how our billing system works - someone may come in handy, someone will just be interested.
User balance storage is implemented in the standard way, by storing transactions with signs of “income” and “expense” in the table of transactions. The replenishment amount is stored with the sign “+”, and all debits from the account are stored with the sign “-”.
There are the following database methods for recording calls:
- INITCALL - IP-PBX calls this method with the number to which the user should call. Billing checks the user's balance and availability of the call, the provider settings in this direction. Gives back the settings of the provider through which you want to make a call.
- STARTCALL - writes to the database the beginning of the call. Fixes a call using the UID of the call, with rates for this direction in a special table.
- PINGCALL - every 30 seconds checks the balance status and the ability to continue the call, deducts the amount in accordance with the tariff.
- ENDCALL - called when the call is completed, takes the last PINGCALL call from the database, calculates the time difference and writes off equivalent funds.
- INFO - periodically called to record the state of the call.
- ERROR - called when an error occurs and fixes it in the database.
That's all. In the future we plan to implement billing via RADIUS.
Our API
For third-party developers, we provide a convenient API that allows you to easily integrate all the functionality developed by us into your application (the application itself can be absolutely anyone: web, mobile, or just desktop).
The site has implemented an API (REST), which consists of the following methods for:
- Authorizing the client when accessing the API returns sessionId to access the methods.
- Get user information.
- Search user by login.
- Immediately call the addressee (two numbers are specified).
- Sending SMS.
- Sending WAV files to an IP-PBX server for playback to its destination.
- Make a call to check the phone number.
- Add a new contact to the user's contact list.
- Remove a contact from the user's contact list.
- Retrieving user’s contact list.
More details on the developed API can be found directly at
uvoiceme.ru/services.aspx#apiMonetization
Now all tariffs have a minimum margin. In the future we plan to open providers (now they are hidden under the names SIP1..SIPN), remove the mark-up and take payment only for additional services, such as API or enter a subscription fee.
Now you can replenish the balance through the WebMoney system or by activating the PIN-code. In the future, we assume the implementation of PIN-codes in the form of prepaid cards.
The PIN itself can be purchased for Yandex.Money. To do this, after authorization, you must go to
this page and select a PIN code. The ratings are 3, 5, 10, 15, 20.
our team
Reading similar topics, I am always interested in the team that makes this project. Therefore, I provide the most complete list of project participants.
nodir - general manual, database, auxiliary utilities
dilshod (tdilshod@gmail.com) - the layer between Communigate and billing
albertum (i),
morgun ,
SoberPlatypus - website, API, testing
Alexey (ICQ: 233082107) - design
Regina (ICQ: 248258665, solaris.ar@gmail.com) - Copyright
Team members who have not yet received permission to publish personal data in this topic:Anonymous - setup and scripts for Communigate
Alexander - "dialer" on Java Applets
Anonymous - layout
Andrew - information security
I would also like to note that during the development of the site and the API, a terrific experience in remote programming was obtained, the Npgsql rake, etc. was found and bypassed. It was really interesting!
Habrabonus
The first 50 habrousers who have registered on our site and have written their account at nodir (your login@uvoiceme.ru) will be given a bonus in the form of a refill of 1 USD. Just like a voucher from Skype, but without problems =)
For all other habrausers who are not among the 50 lucky ones, we will charge a surcharge.