Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. presence

presence

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 104 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    D
    dave99
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • D
      D
      dave99
      wrote on last edited by
      #2

      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,)
      
      1 Reply Last reply
      0
      • N
        N
        nicolas
        wrote on last edited by
        #3

        Thanks for posting it out! I might add that to the FAQ or documentation in the future. Just for your information, the next fop release will have initial support for callback hooks in Perl. I am doing it in order to fire some custom dialplan applications when presence is changed (This way you can actually set your phone into DND in FreePBX when you set it in fop2 without the need to override freepbx dialplan). I am using it currently to set agents on pause.

        Best regards,

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups