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. Setting presence from phone

Setting presence from phone

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 76 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.
  • T
    T
    tbolick
    wrote on last edited by
    #1

    How can I set up some feature codes to allow someone to set a presence other than DND, like 'out to lunch', 'in meeting', etc?

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      Look at the override contexts fop2 is using, and use them as a base. be careful as the contexts are different across freepbx versions, this is just an example, you will have to look at your own extensions_override_fop2.conf file:

      [app-dnd-on]
      include => app-dnd-on-custom
      exten => *78,1,Answer
      exten => *78,n,Wait(1)
      exten => *78,n,Macro(user-callerid,)
      ; added for fop2
      exten => *78,n,Set(DB(DND/${AMPUSER})=YES)
      exten => *78,n,Set(CHAN=${CUT(CHANNEL,-,1)})
      **exten => *78,n,Set(DB(fop2state/${CHAN})=Do not Disturb)
      exten => *78,n,UserEvent(FOP2ASTDB,Family: fop2state,Channel: ${CHAN},Value: Do not Disturb)
      **
      ; end fop2 addition
      exten => *78,n,Set(DB(DND/${AMPUSER})=YES)
      exten => *78,n,Set(STATE=BUSY)
      exten => *78,n,Gosub(app-dnd-on,sstate,1)
      exten => *78,n(hook_1),Playback(do-not-disturb&activated)
      exten => *78,n,Macro(hangupcall,)
      exten => sstate,1,Set(DEVICE_STATE(Custom:DND${AMPUSER})=${STATE})
      exten => sstate,n,Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)})
      exten => sstate,n,GotoIf($["${DEVICES}" = "" ]?return)
      exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
      exten => sstate,n,Set(ITER=1)
      exten => sstate,n(begin),Set(DEVICE_STATE(Custom:DEVDND${CUT(DEVICES,&,${ITER})})=${STATE})
      exten => sstate,n,Set(ITER=$[${ITER} + 1])
      exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin)
      exten => sstate,n(return),Return()

      I have highlighted the part where you set the "label" to Do not disturb, that you can change for something else.

      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