Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Solved Call Control API - Status of extension

Discussion in 'CRM / Helpdesk / App Integration' started by Michal Knezourek, Sep 29, 2017.

Thread Status:
Not open for further replies.
  1. Michal Knezourek

    Joined:
    Sep 29, 2017
    Messages:
    9
    Likes Received:
    1
    Hi everybody,
    I need to set status of extension via API.
    Is it possible? I don't see any functions to get and set status? by status I mean Available/Away.

    Thank you
    Michal
     
  2. Andreas Paradisiotis

    Joined:
    Apr 7, 2017
    Messages:
    53
    Likes Received:
    12
    Hello Michal Knezourek

    Here is an example to change the extension status using the Call Control API
    FwdProfiles[] is an array that contains the available options for presence/status


    Code:
                       var ext = PhoneSystem.Root.GetExtensions().FirstOrDefault(f => f.Number == "001");
    
                        if (ext != null)
                        {
                            ext.CurrentProfile = ext.FwdProfiles[3];
                            ext.Save();
                        }
                        
     
    Michal Knezourek likes this.
  3. Michal Knezourek

    Joined:
    Sep 29, 2017
    Messages:
    9
    Likes Received:
    1
    Perfect, thank you, it works great.
     
Thread Status:
Not open for further replies.