x-ser(a)sidell.org wrote:
What database tables and fields do I need to edit (manually) to add a
local user? This would for a simple SIP telephone that does standard
registrations. No fancy features.
The domain table has been mentioned. If you use ser-oob.cfg you also
need to add an attribute named "digest_realm" for your domains to the
domain_attrs table containing the string that should be used as realm
for any digest authentication. Usually, this is set to the canonical
domain name.
Next you need to add the mapping between URI and user ID in the uri
table. Here, you need two extra bits in the flags field: DB_IS_TO (bit
3, with value 8) if you want to allow the use of the URI in incoming
calls and DB_IS_FROM (bit 4, with value 16) if it should be possible to
use it for outgoing calls.
Finally, you need to add credentials for registration and outgoing calls
in the credentials table. This one may be a bit tricky, as you need to
calculate the hash values in the ha1 and ha1b columns. I think there is
a tool "gen_ha1" that helps you with that. Alternatively, you can leave
the fields blank and instead set
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
in the config. In this case, SER is calculating those hashes on the fly.
Oh, wait. One fancy feature... How should I edit the
database tables
to cause all inbound calls to the user to be forwarded to a particular
URI?
Do this by setting the attribute "fwd_always_target" to the URI either
for the user in the user_attrs table or for the URI in the uri_attrs
table.
Best regards,
Martin