Cnxcc prepaid module: workshop on Kamailio World

This is a short tutorial on how to test the cnxcc module with live traffic and from any softphone. These are the things that you need:

Register from any softphone:
* server:
* username: anything between 5000-9999. Actually anything will work, but I’d rather use those numbering ranges
* password: anything. It is not required
* credit: you will get 1$ credit every time you register. If you place a call and run out of credit, just register again and you will get +1$ on your account.

Place a call: you can actually call to any number with the following pattern: “^09\d{8}$”. This basically means that you can call to a number starting with “09”, that has 8 digits afterwards. Example: 0981223344

You will run out of credit: after a little more than 10 seconds, you will run out of credit and your call will be terminated. Don’t worry, you will receive a SIP MESSAGE on you UA, if it supports it, telling you what just happened.

Recharge your line: if you want more credit, just re-REGISTER from your UA

Check you credit: by texting “credit” to destination “service“, from your UA that supports SIP MESSAGE.

Check the web: you can actually hang up somebody else’s call, or your call, from the web interface. It looks nice and you can log in using “guest” as username and “123456” password.

Call each other: you have the option to call other registered users, but for this, you have to know the number of the other person, or guess it randomly ๐Ÿ˜‰

Duplicated username: you may have chosen the same username that someone else did. If that’s the case, your call will last less than 10 seconds if you call simultaneously, or not even start if someone already exhausted the credit. In the latter case, you will receive a SIP MESSAGE telling you that you have no credit left ;).

These are the files involved in this project. I hope you find them useful.

The demo has no media relay configured, so, you won’t have audio unless you are calling each other on the same network.