dave99

Member

Last active 15 years ago

  1. 15 years ago
    Thu Sep 3 15:56:13 2009
    dave99 posted in presence.

    I messed around with this and answered my own questions. In case anyone else is looking, this is what I did in freepbx. Create a custom destination that calls the context below, then created a Misc Application that directs to the custom destination with feature code *33. The context below checks if there is a fop2state set in the ASTDB for the extension, and if not then sets it with the value "Out to lunch". When the user is back from lunch and hits *33 again, it see's the entry in astdb, and removes it, clearing the status from the fop2 panel. I made a custom playback message (OutLunch), so you'd need to change that in the playback function below.

    This helps our receptionist know who is in & out of the office without having to intercom to the user to check.

    [app-lunch-toggle]
    exten => s,1,Answer
    exten => s,n,Wait(1)
    exten => s,n,Macro(user-callerid,)
    exten => s,n,Set(CHAN=${CUT(CHANNEL,-,1)})
    exten => s,n,Set(TEST=${DB_EXISTS(fop2state/${CHAN})})
    exten => s,n,GotoIf($[ "x${TEST}x" = "x0x" ]?50:70)
    exten => s,50,Set(DB(fop2state/${CHAN})=Out to lunch)
    exten => s,n,UserEvent(FOP2ASTDB|Family: fop2state|Channel: ${CHAN}|Value: Out to lunch)
    exten => s,n,Playback(custom/OutLunch&activated)
    exten => s,n,Macro(hangupcall,)
    exten => s,70,dbDel(fop2state/${CHAN})
    exten => s,n,UserEvent(FOP2ASTDB|Family: fop2state|Channel: ${CHAN}|Value: )
    exten => s,n,Playback(custom/OutLunch&de-activated)
    exten => s,n,Macro(hangupcall,)
  2. Mon Aug 31 21:23:57 2009
    dave99 started the conversation presence.

    I have the DND presence function working ok, however I was looking for examples for the additional presence features, like "out to lunch" & "meeting". I'd like to assign these to feature codes in asterisk, like *31, *32 etc, however I'm not able to make it work by looking at the DND feature code. Any hints/examples on how to make this work?

    Thanks