Correct way to setup autoprovisioning? (sip.conf vs users.conf)

Hi,
What is the “correct” way to setup autoprovisioning today, in 2016?

I have already setup Asterisk with phones in sip.conf, and now I see that I have to use users.conf because res_phoneprov uses that file to build the phone config files.

However, after a more detailed research, I discovered that users.conf seem to be deprecated, mentioned in these two places:
http://forums.asterisk.org/viewtopic.php?p=200388&sid=c779109ed8def34fd36ffb9d148ebacc#p200388
http://forums.digium.com/viewtopic.php?p=211072&sid=7617fe78facc6f5a1fb0c9d04ae16874#p211072

Also, as my system is already tested and in production in several places, I can’t risk switching to users.conf, seemingly deprecated although Asterisk documentation mentions it in provisioning tutorial.

Can I patch res_phoneprov to use another file (like provisioning.conf) to avoid users.conf-sip.conf conflict, is it safe to switch to users.conf, or something else?

pjsip has a res_phoneprov backend, I’ve been able to use it on my Asterisk 13.0 test server.

I was using it with ODBC with my endpoints stored in a mysql database, I did have to reload res_phoneprov on each change to the database but that may have been fixed by now.

There’s not exactly a mechanism to fix the requirement to reload. Something ultimately has to inform it that the world has changed. As res_odbc provides no mechanism for push notification from the database (plus each database would have to support it) you are the one to do it. Otherwise you’d have to poll the database, which is horrible for performance.

1 Like