Configuring Asterisk BLF for the Grandstream GXP-2000

From JoatWiki
Jump to: navigation, search

Configuring Asterisk BLF for the Grandstream GXP-2000

(28 Dec 2008) - Many office-grade multi-line phones allow you to monitor the state of other phones. The Grandstream GXP-2000 is no exception. Following are my notes in configuring the Grandstream's Busy Lamp Field (BLF) support so that other lines' state is displayed on any of the 7 programmable buttons down the right side of the phone.

Hints about hints

The Grandstream's BLF feature works with Asterisk's hint directive. It's a feature that's seen a bit of tweaking in the recent past so, depending on the version of firmware for the phone and the version of Asterisk, your mileage will most definitely vary. Various diffs that I've picked up from other people include:

  • It's been stated that Asterisk 1.4 doesn't allow for monitoring of internal calls but 1.6 does. I cannot confirm this statement as I'm only running 1.6.x nowadays.
  • The more recent versions of Grandstream GXP-2000 firmware have switched from calling it "Asterisk BLF" to just "Busy Lamp Field (BLF)". It's still the same feature.
  • Asterisk's "hint" feature is one of those obvious-after-you've-figured-it-out features. If you're frustrated in trying to get it to work, keep at it. It DOES work.

Configuring a hint (extensions.conf)

A hint (in Asterisk) looks a bit weird. It's written in the syntax of a normal extension but that extension doesn't have to exist. Example:

exten => 9705,hint,SIP/1705

In the above, there is no phone connected to 9705. You'll get an error if you dial it. To make your dialplan easier to read, you can even attach the hint to extension of the phone being "watched". Example:

exten => 1705,hint,SIP/1705
exten => 1705,1,Dial(SIP/1705,20,t)

9705 (or the 1705 to the left of "hint") is just the name for the hint. It's only used by the "watching" phone. (Something to try: does "Bob" work in place of "9705"?)

Configuring SIP (sip.conf)

The above won't work unless you make a few adjustments to the watched phone's entry in sip.conf:

  • type should be "peer" vice "friend"
  • notifyringing should be set to "yes"
  • call-limit should be explicitly declared (set it to 1, 20, 100 or whatever)

Here's the entry for my cordless phone in sip.conf (secret and context have been changed for my own protection):

[1705]
type=peer
username=1705
secret=blahpasswordblah
callerid=<1705>
host=dynamic
canreinvite=no
disallow=all
allow=alaw
allow=ulaw
context=default
notifyringing=yes
call-limit=100
limitonpeers=yes

Note: for more security, you'll want to add in subscribecontext. However, that's an exercise for you to research later.

Configuring the phone

Quite easy:

  • Log into the phone
  • At the top, click on "Basic Settings" and scroll down to the "Multipurpose Key" section
  • For "Key Mode", select "Busy Lamp Field (BLF)". (Note: on older firmware, this is "Asterisk BLF".)
  • For "Name", make something up. It's just a label. (I used "cordless" in the example below.)
  • For UserID, enter the extension used in the hint line in extensions.conf ("1705" in the above example).
blf.jpg

Finishing up

Not much else to do but:

  • Restart Asterisk
  • Reboot the phone (give the phone about 30 seconds to reload/rejoin everything)
  • Make a call to or from the "watched" phone. Whichever lamp you configured should light up for the duration of the call.

Other things to do

I'll add these later:

  • Use "subscribecontext" to increase the security on this configuration
  • Configure the phone and Asterisk to allow for pick up of an incoming call to the "watched" phone (Note: It looks like the additional configuration is mostly on the Asterisk end.)

Troubleshooting

Running "core show hints" at the command line will help in troubleshooting:

The following indicates that you either don't have the syntax in extensions.conf or sip.conf correct:

desk*CLI> core show hints
There are no registered dialplan hints

The following indicates that you have the Asterisk end configured correctly but not the phone:

desk*CLI> core show hints
desk*CLI> 
    -= Registered Asterisk Dial Plan Hints =-
                   1705@default             : SIP/1705              State:Idle            Watchers  0
----------------
- 1 hints registered

The following is what it should look like if Asterisk and the phone are configured correctly:

desk*CLI> core show hints
desk*CLI> 
    -= Registered Asterisk Dial Plan Hints =-
                   1705@default             : SIP/1705              State:InUse           Watchers  1
----------------
- 1 hints registered

Sources/Additional Reading

Credits include:





Comments:

Leave a Comment

Personal tools