Skip to main content

Permit/Deny in MySQL

Posted by eherr on Sun, 01/10/2016

I have over 300 extensions registered in the Business ( STE ) PBX

I want to update all the extension so that their extension has the following additional options set:

deny=0.0.0.0/0.0.0.0
permit=x.x.x.x/24

But I dont want to go to each extension in the GUI.

I have found out how to temporarily add it via MySQL

UPDATE sip_users SET deny = '0.0.0.0/0.0.0.0' WHERE tltype = 0;
UPDATE sip_users SET permit = 'x.x.x.x' WHERE tltype = 0;

However, this is temporary and if changes are made in the GUI, the permit and deny values go back to NULL as these 'keys' are not actually set in the GUI.

Is there a way so that it can be come permanent?

Thanks,
--E


Submitted by thirdlane on Sun, 01/10/2016 Permalink

My general recommendation is not to make changes in the database directly - or bad things may happen :).

To update more than one extension at the same time you can do the following:

1) select extensions you want to apply the update to
2) click the Advanced Actions button on the top right that looks like dropdown and specify fields you need updated. In case of deny and permit you should use Other Options section
3) Apply update