/
Phone API Reference - Core - digium.setLedState

Phone API Reference - Core - digium.setLedState

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

digium.setLedState

Description

This function can be used to change the state of one of the phone's LED lights.

Basic Example: 

digium.setLedState(parameters);

 

This function can be used to change the state of one of the phone's LED lights.  An app can only control LEDs when it is in the foreground; once it goes into the background, the phone gui will return all LEDs to its default behavior. When an app sets its first LED, all other LEDs will be turned off.  The app is then responsible for all LED settings until it is backgrounded.  When an app returns to the foreground, it will need to set the LEDs to its desired state again (generally in its onforeground handler).

Parameters

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

name

Yes

string

 

The name of the LED to target. Possible values are as follows:

  • msg (Voicemail Indicator light)

  • hdst (headset), spkr (speaker), mute

  • line[n] (line number [1-6] with n being a number. E.G. line1)

  • blf[n] (blf line [1-10] with n being a number. E.G. blf1)

color

Yes

string

 

Which color to activate for the LED. Possible choices are green, red and amber.

state

Yes

string

 

Which state the LED should be set as. Possible options are:

  • on

  • off

  • fast (fast blink)

  • slow (slow blink)

 

Related content

Phone API Reference - Core - digium.foreground
Phone API Reference - Core - digium.foreground
More like this
Phone API Reference - Core - digium.app
Phone API Reference - Core - digium.app
More like this
Phone API Reference - Core - digium.background
Phone API Reference - Core - digium.background
More like this
Phone API Reference - Core - digium.event - List of Event Types
Phone API Reference - Core - digium.event - List of Event Types
More like this
Phone API Reference - Core - digium.phone.observeCallEvents
Phone API Reference - Core - digium.phone.observeCallEvents
More like this
Phone API Reference - Core - digium.phone.hangup
Phone API Reference - Core - digium.phone.hangup
More like this

Return to Documentation Home I Return to Sangoma Support