IrisBroadcast / connect

A sample configuration for the Kamailio SIP Proxy with the additions for CCM
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Typing error and modifications #2

Closed Harunbk closed 5 years ago

Harunbk commented 5 years ago

Hello,

thank you for providing this project. I want to use it, but I have a few questions.

I use the IRIS Connect configuration on my Kamailio. However, I had to make some changes to run it without any errors in my network.

I commented out the route route[NATDETECT] (line 513-523), route[NATMANAGE] (line 530-559) and route[DLGURI] (line 565-568).

I also replaced: if (!proxy_authenticate("$fd", "subscriber"))…. on line 492 to if (!auth_check("$fd", "subscriber", "1"))….

Probably I found a typing error in line 267: modparam("rtimer", "exec", "timer=senddlg;route=CCMDIALOG;") But your function is called route[CCMDLG] not route[CCMDIALOG]

I can add users with kamctl in the kamailio database and the Rest-API of the kamailio sends data when registering, dialog start, dialog end and register-expired.

Now the Kamailio "subscriber" table is used, but how can I change to the CCM "sipaccount" table to bypass „kamctl add…“ to add new Users and use the account managment from CCM? Then how should the Konfigration look like?

I look forward to your reply.

Thank you in advance! Best regards

harunbk

oej commented 5 years ago

Hi! Thanks for the typo report, someone will have to fix that. (I no longer have any commit rights here)

This configuration is based on the default Kamailio configuration file and documentation for that can be found in the kamailio project. That explains a lot of the extra stuff, like the routes you commented out.

In order to use the SIPaccount table you need to use a database driver for the database you use and the pv based authentication. First you perform a query to get the expected password, store that in a pseudo variable and then use that for the pv based authentication.

Check https://kamailio.org/docs/modules/5.2.x/modules/auth.html#auth.f.pv_auth_check for inspiration.

Regards, /Olle

Harunbk commented 5 years ago

Hi,

Thanks for your help Olle!

I'm working on getting the password from the sipaccounts table from the CCM database as you explained above.

The database from the kamailio is not only used for the subscriber table. The Kamailio stores therein for example also the location table for the assignment of permanent and temporary IP-adress and so on.

Is it possible to completely abolish the Kamailio database and operate only with one (the CCM) database? Or is the local kamailio database still necessary for the kamailio to save data I mentioned above?

What about security when the passwords in the database are in plain text? Is there an option to hash them?

Thank you in advance!!

Regards harunbk

oej commented 5 years ago

You still need the location table in order to enable restarts without loosing registration. So you need a kamailio database and access to the CCM database from Kamailio. That's not a problem for kamailio at all.

CCM stores password in clear text, so you are bound to use that.