Update callerid names directly in FreePBX's MySQL database and auto-populate astdb

Hi,

My question is quite simple.

I ran a script today that massively updated the devices and users tables with the caller id names taken from another database. I avoided connecting to Asterisk from my script to also update the astdb as I was updating FreePBX’s db. So now FreePBX has the “right” caller id name info but astdb/Asterisk still use the old data.

How do I tell FreePBX to “re-populate” astdb?
I tried setting to “true” the require_reload field in the “admin” table and that made the orange toolbar show up but pressing it did not update astdb.

I can modify my script to also update astdb but I’m sure FreePBX can do that for me. I just didn’t find that out yet.

Thanks,

Vieri

I simply used cURL within my scripts.

Hi Vieri,

How did you do the URI call from your app, it will require authentication.

When I parse the values for authetication it gets through but seems like I unable to do the call reset all.

this works fine from a browser. Appreciate if you can provide some tip or share on how you did it.

Yes this call works.

Would use this as a temp solution. Appreciate if some FreePBX dev team can comment if this is the right method or not.

Each time my scripts modify something directly in the database, I need to make this call:

https://SERVER/freepbx/admin/config.php?type=setup&display=devices&action=resetall

and it works.

However, I’m using FreePBX 2.5 and this “hack” is unsuported. The FreePBX dev team hasn’t said yet whether this method is “clean” or not. Or if they will (or already have) implement(ed) such a “function”.

Did you manage to make this work on how to update the astdb ?

I am also stuck with this issue

I guess this is what I should call:

/admin/config.php?type=setup&display=devices&action=resetall

Strange enough, I can’t seem to find anything in the FreePBX GUI that actually calls this so I’m not sure it’s “safe”.

I think it’s useful that FreePBX call a “resetall” action from the web UI.

Vieri