3CX API to Set UserStatus

Discussion in '3CX Phone System - General' started by lklm, Mar 5, 2013.

Thread Status:
Not open for further replies.
  1. lklm

    Mar 18, 2009
    Likes Received:
    I have logged a support ticket - but as this relates to API, I'm guessing not likely to get an official answer...

    Anyway...with the following code - as altered from the OMSamples API Help files I cannot get UserStatus to change:

    namespace OMSamples.Samples
    [SampleWarning("LG Change Status on Reception Extension")]
    [SampleDescription("LG Change Status on Reception Extension")]
    class stchange : ISample
    public void Run(params string[] args)
    PhoneSystem ps = PhoneSystem.Root;
    Extension ext = ps.GetDNByNumber("100") as Extension;
    ext.QueueStatus = QueueStatusType.LoggedOut;
    ext.UserStatus = UserStatusType.Away;

    I can alter the QueueStatusType to LoggedIn or LoggedOut and it will change when I run the application, however the "UserStatus" does not change.

    Further to this in trying to get this working - I would like to be able to set more than just Available and Away, such as "Out of Office" (The same as when using MyPhone where ALL available status can be chosen.)

    Overall what I am trying to develop is a neat way to allow changing Both Status and Logged in status at the same time. (Several other old threads have asked in the form of "On button Status change" - or thereabouts.

    At the moment when both receptionists that needs to go to lunch will have to Log out of the queue and put the phone on Out of Office just so inbound calls don't get stuck in the Queue over and above the maxqueue wait time before spilling over to the Ondemand group that rings all stations in the office. Subsequently when the second "fill-in" receptionist returns from lunch half an hour earlier than the other, the status needs to change to Away so that the spillover calls go directly to the Fill-in receptionists station away from the Reception area. Then when the Full time receptionist returns she has to change the Status to Available, and log into the queue.

    Then at the end of the day the Receptionist changes to Log out of the queue AND change to Out of Office which allows spillover to perform as normal and go straight to OnDemand.

    All in all the process is as follows if using programmed buttons or dialling:
    8:30am - arrive - *30 (Available), wait for confirm then *62 (login to queue)
    1:00pm Lunch - *32 (O/Office), wait for confirm then *63 (logout of queue)
    1:30pm temp - *31 (Away), wait for confirm then *63 (logout of queue) - 2nd function superfluous, but added just in case.)
    2:00pm Back - *30 (Available, wait for confirm then *62 (login to queue)
    5:00pm End of Day - *32 (O/Office), wait for confirm then *63 (logout of queue)

    As can be imagined it is quite a lot of button presses and delays just to change effective status - Even if each of the 2 x changes can be done in one button press would be better than what it is.
    WE have reverted to using XML Browser, but again it is only one command at a time.

    So we were hoping to create a small App which would sit on the Reception desktop with 3 or 4 big buttons to change the status easily - or alternatively if using XML Browser to be able to trigger each of the options...But at this stage we are stuck with even the simplest of issues because the "UserStatus" does not appear to update when triggered.

    Any help We can get on this one would be much appreciated.

    We have a 32SC Call center edition - 3CXV11, and currently testing this code just on my laptop with VS2012 and 3CXV11 with Demo key.


  2. SY

    SY Well-Known Member
    3CX Support

    Jan 26, 2007
    Likes Received:
    Hi Leigh,

    Tab "Office Hours" in extension configuration allows to configure automatic switching of the profiles.
    Looks like it provides exact functionality you are asking for. Please check it.

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.