Updating Busy Lamp Fields (BLFs) via Call Control API

Status
Not open for further replies.

ThePhoton

Customer
Joined
Apr 1, 2018
Messages
4
Reaction score
0
Hi

I am trying to create an easy web interface for people to update their busy lamp fields (BLF), without having to give them permissions to login to the 3cx management console.

In the 3CX call control api there is a section which details BLFs, but it is marked as obsolete:
Code:
BusyLampFields Obsolete.
The collection of Busy Lamp Fields (BLF) for this phone device.
[ObsoleteAttribute("Use Settings property to store additional data")]
public BusyLampField[] BusyLampFields { get; set; }

The settings field it talks about doesn't appear to store any data.

Here is the code I'm using to check the settings field currently:

Code:
PhoneSystem ps = PhoneSystem.Root;

foreach(Extension e in ps.GetExtensions())
{
    if (e.Number != "012") { continue; }
    Console.WriteLine("012");
    Console.WriteLine(e.PhoneDevices.Count());
    foreach(PhoneDevice p in e.PhoneDevices)
    {
        Console.WriteLine(p.MAC + "" + p.Settings);
    }
}

Since the extension in question only has a softphone attached,the inner foreach loop never executes, but the 3cx client still has the configured BLFs.

Has anyone had any experience setting BLFs via code?

Thanks
Matt
 
Status
Not open for further replies.