dotcom
(dotcom)
1
Hi all,
I’m using the DND script from the great @lgaetz for a while now… which works as expected.
However, since I need to fire this script a lot, it is causing a high CPU usage.
First guess would be because of the
include ‘/etc/freepbx.conf’; and $FreePBX = FreePBX::Create();
Is there a more “light weight” way to do this? Something like:
- database del DND XXX
- devstate change Custom:DNDXXX NOT_INUSE
- devstate change Custom:DEVDNDXXX NOT_INUSE
Thanks!
adell4444
(Andrew)
2
Yeah you can adjust the the value in asterisk db. To turn on:
database put DND 100 YES
devstate change Custom:DND100 INUSE
To turn off:
database del DND 100
devstate change Custom:DND100 NOT_INUSE
1 Like
dotcom
(dotcom)
3
Thank you sir, testing now
dotcom
(dotcom)
4
It seems the correct way to turn DND off is:
database del DND 100
devstate change Custom:DND100 UNAVAILABLE
And maybe:
devstate change Custom:DEVDND100 UNAVAILABLE
1 Like
system
(system)
Closed
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.