Restrict extensions

Status
Not open for further replies.
Feb 21, 2017
74
3
8
40
Hello everyone

On this occasion I turn to you to guide me in the following questions.


In the system there is the possibility of using a password that allows me to use a restricted phone?

In the system there is the possibility of using an electronic lock that allows me to lock an extension at the user's will?
 

simcard

Member
Jan 22, 2017
49
4
8
Hi Kristiam,

We've looked into these scenarios and offer the following advice;

1. One option to consider is using the toll_allow feature in conjunction with an outbound route that triggers a lua script to check the pin; if pin matches action = let call pass otherwise anti-action = play a recording re: not authorised and hang-up. You could use the Voicemail pin as the callers pin for making calls too.

If you're up for creating a lua script, I suspect the DISA code (see fpbx features: http://fusionpbx-docs.readthedocs.io/en/latest/additional_information/feature_codes.html ) would give you a starting point to hack up something.

There have been some requests to the project via github for this functionality;
- https://github.com/fusionpbx/fusionpbx/issues/1693 (suggests a module is available? I couldn't find one)
- https://github.com/fusionpbx/fusionpbx/issues/1946 (suggests that the functions exist, but would need to be activated - something you learn in the admin course)

But it looks like what ever solution you use, you have some lua coding ahead of you.

2. I would also use toll_allow for this one; there is no 'status' of an extension so to speak. By using toll_allow with an outbound script that like above plays a recording then hangs up is not too difficult. The user still stays active, and you could still allow them to call emergency services and even you customer service number if you want, but all other calls types would result in the recording & hangup.

We've not implemented either, so we don't have any steps or code to offer you - these are just our thoughts around what was possible.

We're finding very quickly that lua, along with creating an application or 'app' are the two great ways of extending fpbx; editing the core code is a no-no as it will break as soon as there is an update. The app idea needs a bit more thought, but could solve the lack of an extension status option (re: ability to suspend etc users).

regards,
A
 
Feb 21, 2017
74
3
8
40
Thanks for your answer in order there is no way to do what I want without creating an application, in that sense I will put hands to work in the creation of a lua application and when I have something I will share it
 
  • Like
Reactions: simcard

TheOperator

Member
Nov 30, 2016
39
13
8
Bavaria, Germany
The pin-number app is hidden by default. Check the settings in Advanced -> Menu Manager -> default and search for "PIN Number". You might also have to adjust the permissions via Advanced -> Group Manager.
The lua script mentioned above should be located under /usr/share/freeswitch/scripts/pin_number.lua and /var/www/fusionpbx/resources/install/scripts/pin_number.lua and seems to be quite readable ;-).
 
Feb 21, 2017
74
3
8
40
Excellent I've been reading the script lua and it seems to make sense the subject now is that I do not know how to use it someone could lend me a hand to put this feature into operation
 
Status
Not open for further replies.