Set presence on any extension

What I would like to do is click on an extension and then set the presence for that extension. I want to do this so our admin staff can update the presence for other staff (like is someone calls in sick etc…).

Can you give me any hints how I could do this?

Thanks

Comments

  • You can't when logged as other user.

    One way would be to set a master password and login as every extension and set its presence. Kind of cumbersone but it will work.

    Best regards,
  • Hi Nicolás,

    I have found a way through the dialplan but I have a number of servers and I have noticed that the db entries are in the server where the extensions resides. FOP2 is installed in server=0 but the extension is in server=2 so I need to run it on server=2 can you tell me if this is correct?

    I am also working a web interface with PHP/AMI that does the same thing.

    ;example
    exten => s,1,Answer
    exten => s,n,Wait(1)
    exten => s,n,Read(WHATEXT,pcg/pcg_exten,3,,1,3)
    exten => s,n,GotoIf($[${LEN(${WHATEXT})} = 3 ]?5:1);three digit extension
    exten => s,5,Set(CHAN=SIP/${WHATEXT})
    exten => s,n,Set(TIMEOUT(digit)=3)
    exten => s,n,Set(TIMEOUT(response)=6)
    exten => s,n,BackGround(pcg/pcg_avaliable)
    exten => s,n,BackGround(pcg/pcg_inspection)
    exten => s,n,BackGround(pcg/pcg_outoffice)
    exten => s,n,BackGround(pcg/pcg_leave)
    exten => s,n,BackGround(silence/5)
    exten => s,n,Hangup()
    ;Available
    exten => 0,1,Set(DB_VAL=${DB_DELETE(fop2state/${CHAN})})
    exten => 0,n,UserEvent(FOP2ASTDB|Family: fop2state|Channel: ${CHAN}|Value: )
    exten => 0,n,Playback(pcg/pcg_sset)
    exten => 0,n,Hangup()
    ;Inspection
    exten => 1,1,Set(DB(fop2state/${CHAN})=Inspection)
    exten => 1,n,UserEvent(FOP2ASTDB|Family: fop2state|Channel: ${CHAN}|Value: Inspection)
    exten => 1,n,Playback(pcg/pcg_sset)
    exten => 1,n,Hangup()
    ;Out of office
    exten => 2,1,Set(DB(fop2state/${CHAN})=Out of office)
    exten => 2,n,UserEvent(FOP2ASTDB|Family: fop2state|Channel: ${CHAN}|Value: Out of office)
    exten => 2,n,Playback(pcg/pcg_sset)
    exten => 2,n,Hangup()
    ;Leave
    exten => 3,1,Set(DB(fop2state/${CHAN})=Leave)
    exten => 3,n,UserEvent(FOP2ASTDB|Family: fop2state|Channel: ${CHAN}|Value: Leave)
    exten => 3,n,Playback(pcg/pcg_sset)
    exten => 3,n,Hangup()

    exten => t,1,Hangup()

    exten => i,1,Playback(pcg/pcg_invalid)
    exten => i,2,Goto(fop-presence,s,1)
    exten => i,3,Hangup()


    Also thanks for a superb product!

    Brett
  • Hi Brett,

    Although I have not tried, FOP2 does not consider the server for the button matching, so, as long as the channel name is the same (no matter the server they are) it will work.

    Best regards,
Sign In or Register to comment.