[SR-Users] Does Kamailio provide any API for other program to create sip account

Olle E. Johansson oej at edvina.net
Wed Jun 26 10:31:52 CEST 2013


26 jun 2013 kl. 06:36 skrev Xiangwen Chen <cxw1987 at gmail.com>:

> Thanks David,
> 
> My user account system is written in Python, can "kamctl" script be called in a python program?
> if not, can the user account system directly access the kamailio database, and do an SQL insert to create a new sip account?
Better to access the database directly.

You have to understand that Kamailio has no real sense of a "user account". You build your own database model and adopt Kamailio authentication to it and provide services based on a number of pieces of data, like groups, service sets, ip addresses and so on. Kamailio is a tool kit that you adopt to your service.

The SIP protocol has a user account used in the authentication process (if you use that). That account has a user name and a shared secret - you can call it a password. For this authentication account you have to validate the From: user address - the caller ID. Is that valid for the authentication provided? One authentication user can have multiple caller IDs, like a personal address - sip:alice at example.com - or a shared caller ID like "sip:sales at example.com".

If you don't use SIP authentication, you can in some situations trust the IP address and use that as part of your authentication - and then check the caller ID if it's valid for that IP. There are many ways.

Kamailio is very open for your architecture needs. It's not like FreeSwitch or Asterisk that has a more fixed definition of a PBX user and a device. You build your service, using the modules we provide and the core functions.

Have a great time exploring Kamailio!

/O


More information about the sr-users mailing list