<div style="font:14px/1.5 'Lucida Grande', '微软雅黑';color:#333;">Thanks for the explanation, it helps a lot. <div>I will try that. <br><span style="font: 14px/1.5 'Lucida Grande';color:#333;"><br></span><div class="foxmail_blockquote_fromhere_element" style="font: 12px/1.5 'Lucida Grande';padding:2px 0 2px 0;"><span style="color:#333;text-decoration:line-through;white-space:pre-wrap;">                            </span> Original Message <span style="color:#333;text-decoration:line-through;white-space:pre-wrap;">                            </span></div><div style="font: 12px/1.5 'Lucida Grande';background:#efefef;color:#666666;padding:8px;"><div><b style="color:#999;">Sender:</b> Olle E. Johansson<oej@edvina.net></div><div><b style="color:#999;">Recipient:</b> Kamailio (SER) - Users Mailing List<sr-users@lists.sip-router.org></div><div><b style="color:#999;">Date:</b> Wednesday, Jun 26, 2013 16:31</div><div><b style="color:#999;">Subject:</b> Re: [SR-Users] Does Kamailio provide any API for other program tocreate sip account</div></div><br><div class="mail_quote_51896BEC32B9448A9E9EA70DEB182C58" style="font: 14px/1.5 'Lucida Grande';color:#333;"><pre style="white-space:pre-wrap;">26 jun 2013 kl. 06:36 skrev Xiangwen Chen <cxw1987@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:<a href="mailto:alice@example.com" title="mailto:alice@example.com">alice@example.com</a> - or a shared caller ID like "sip:<a href="mailto:sales@example.com" title="mailto:sales@example.com">sales@example.com</a>".

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
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" title="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" title="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</cxw1987@gmail.com></pre></div></div></div>