On 21.12.17 10:34, Daniel Tryba wrote:
On Wed, Dec 20, 2017 at 04:45:07PM +0530, Arun NV wrote:
There is a requirement to add a new user to *Kamailio* programmatically using *PHP*. I tried to add username and password to *subscriber* table manually using *SQL* queries, but it won't works because *ha1* and *ha1b* should be added to the table. I don't know how Kamailio generate *ha1* and *ha1b*.
ha1 and ha1b aren't needed. But you question has been asked in the past and even been answered: https://lists.kamailio.org/pipermail/sr-users/2010-May/063982.html
Siremis has the code to get ha1 and ha1b in PHP:
- https://github.com/asipto/siremis/blob/master/siremis/modules/sipadmin/sbs/a...
The keys of recArr should be self explanatory, however, if the realm is not the same as domain, then repalce the domain field with realm value.
Cheers, Daniel