# Database connection
mysql_user=root
mysql_passwd=mypass123

# mysql_server, default: localhost
#  mysql_server=localhost

#mysql_db, default: sems
#  mysql_db=sems

# table for registration status 
# default: registrations
# registrations_table="registrations"

# query joining subscriber info with registration table
joined_query="select subscribers.subscriber_id as subscriber_id, subscribers.user as user, subscribers.pass as pass, subscribers.realm as realm, registrations.registration_status as registration_status, registrations.expiry as expiry, registrations.last_registration as last_registration from subscribers left join registrations on subscribers.subscriber_id=registrations.subscriber_id;"

#example with contact:
# joined_query="select subscribers.subscriber_id as subscriber_id, subscribers.user as user, subscribers.pass as pass, subscribers.realm as realm, subscribers.contact as contact, registrations.registration_status as registration_status, registrations.expiry as expiry, registrations.last_registration as last_registration from subscribers left join registrations on subscribers.subscriber_id=registrations.subscriber_id;"

# Does the user column (used as auth user) contain the domain?
# in this case it will be stripped when constructing From/To/contact
#username_with_domain default: no
#username_with_domain=yes

# outbound_proxy=<sip_uri>
# set the outbound proxy to send registrations through
#
#outbound_proxy=sip:10.0.0.2:5070

# contact_hostport=<host:port> - overriding contact host:port
# sets the contact host:port portion that is registered
# default: empty
#contact_hostport=10.0.0.50:5080

# db_read_contact=[yes, no] : read individual contact to register from DB?
# note: joined_query must select the contact, too
# default: no
#db_read_contact=yes

#save_contacts=[yes, no] : save contacts?
# for monitoring and troubleshooting, all contacts returned with a positive reply
# may be saved to DB in the registrations.contacts colums
# default: yes
#save_contacts=yes

#save_auth_replies=[yes, no] : update status on 401 replies (auth)?
# usually, 401 replies which are resent with auth are not saved. if save_auth_replies=yes,
# last_code and last_reason in DB is updated with the 401
#save_auth_replies=yes

# expires: desired expires, i.e. expires value that is requested
# default: 7200
#   expires=300

# error_retry_interval
#
# default: 300

# reregister_interval: fraction of actual expires after which register is refreshed
# default: reregister_interval=0.5
#reregister_interval=0.5

# minimum_reregister_interval: if set, re-register is scheduled in least loaded time
#  in minimum_reregister_interval .. reregister_interval i order to smooth load spikes
#  must be smaller than reregister_interval
#  default: off
#
#  example: 
#    reregister_interval=0.5
#    minimum_reregister_interval=0.4
#   on a registration expiring in 3600s, the least loaded spot between 1440s and 1800s
#   is chosen
#  
#minimum_reregister_interval=0.4

# enable_ratelimiting=yes : Enable ratelimiting?
# default: no
# if enabled, the amount of initial REGISTER requests is limited (not counting re-trans-
# missions and requests re-sent for authentication)
#enable_ratelimiting=yes

# ratelimit_rate=300 : rate of initial REGISTER requests to send as maximum
#ratelimit_rate=2

# ratelimit_per=1 : per time unit (in seconds, e.g. 300 REGISTER in 1 second)
#ratelimit_per=1

#ratelimit_slowstart=[yes|no] : on startup send initially ratelimit_rate or 0 requests
#default: no
#ratelimit_slowstart=yes

# delete_removed_registrations=yes : delete removed registrations from registrations
#  table in DB? (otherwise they will stay with STATUS_REMOVED)
# default: yes
#
#delete_removed_registrations=no

# delete_failed_deregistrations=yes : delete failed de-registrations from registrations
#  table in DB? (otherwise they will stay with STATUS_TO_BE_REMOVED)
# only applicable if delete_removed_registrations=yes
# default: no
#
#delete_failed_deregistrations=no
