Newbie_From_Hell's picture

I'm trying to configure a BLF to show the stat of the Day/Night function on my GXP2000

we are running Asterisk 1.4 and FreePBX 2.5

the day/night in question is on *280 and the extension that i want to show the "hint" on is 110

i have had a search around and have found some infomation but i just don't understand what i need to do.

could someone please list a couple of steps to get this configured as i don't really want to play to much as it is a production system.

Many Thanks


__________________


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Simply configure a Busy Lamp Field with "*280" for the UserID

LeeZ's picture

Since you're running FreePBX 2.5, the hint is already in the dialplan so you don't need to do anything else to your Asterisk configuration.

All you need to do is go to the "Basic Settings" web page on the GXP-2000, select "Busy Lamp Field" on one of the multi-purpose keys, and put "*280" in the "UserID" field. Now the lamp will glow green in day mode and red in night mode, and you can toggle by simply pressing the button.


Oops

LeeZ's picture

Oops; my mistake - I wasn't thinking. You do have to install the DevState backport into your Asterisk source, since it's in Asterisk 1.6, not 1.4. Give me a minute and I'll dig up the instructions for that.


Installing func_devstate

LeeZ's picture

You can download the devstate backport from http://svncommunity.digium.com/view/russell/asterisk-1.4/func_devstate-1.... The README.txt file has the instructions, which are basically just to download func_devstate.c into the funcs directory of your Asterisk source, then do "menu makeselect" and build as usual. After that, simply follow the directions in my original response to enable the BLF button on your Grandstream.

Lee


Done That

Newbie_From_Hell's picture

is there anyway to check it all worked

did menuselect, then make and make install

showed that it picked up the new file, and said installation sucessful

reloaded the server (then rebooted to make sure) but core show hints doesn't show anything new ?

Thanks


from the logfile

Newbie_From_Hell's picture

[Aug 21 22:22:49] VERBOSE[2464] logger.c: == Registered custom function DEVSTATE
[Aug 21 22:22:49] VERBOSE[2464] logger.c: func_devstate.so => (Gets or sets a device state in the dialplan)
[Aug 21 22:22:49] VERBOSE[2464] logger.c: == Registered application 'MacroExit'
[Aug 21 22:22:49] VERBOSE[2464] logger.c: == Registered application 'MacroIf'
[Aug 21 22:22:49] VERBOSE[2464] logger.c: == Registered application 'MacroExclusive'
[Aug 21 22:22:49] VERBOSE[2464] logger.c: == Registered application 'Macro'


Add a line to amportal.conf

LeeZ's picture

My fault again. I did this a few weeks ago myself, and have obviously forgotten all the steps I went through.

You need to add the following line to /etc/amportal.conf:

USEDEVSTATE=true

That should enable the new hints in FreePBX.

By the way, you can find several threads that discuss this by searching on "devstate" on the freepbx.org web site. That's what I did to get it working when I upgraded.


any other pointers at all, I

Newbie_From_Hell's picture

any other pointers at all,

I have added the line, and searched around,

SHOW FUNCTION DEVSTATE shows its loaded

but the hints aren't being created, i've found details on how to create them manually, but as there supposed to be created automatically i'm obviously missing something

Thanks again


Figured it out

Newbie_From_Hell's picture

just after i wrote the message above, i made an adjustment to the day / night in question.

moment i did that and reloaded everything got created, i think it was either because i wasn't reloading from the freepbx interface (just doing reload from the asterisk cli) or that a change had to be made (even just a name) just to poke it into action.

so for anybody else using 2.5 with asterisk 1.4 the stages are

1. download func_devstat (website above)
2. copy it to /usr/src/asterisk/funcs
3. cd /usr/src/asterisk
4. make menuselect
5. make all
6. make install
7. asterisk -r
8. reload
9. exit
10. nano /etc/amportal.conf
11. add USEDEVSTATE=true to the end
12. reload from within the freepbx interface

thanks for all the help