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. Custom Presence FOP2.

Custom Presence FOP2.

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 441 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.
  • M
    M
    moses
    wrote on last edited by
    #1

    Hi FOP2

    If i check config presence.js the default as below :

    var presence = new Object();
    presence[''] = '#6094AB'; --> AVAILABLE as default VALUE
    presence['Do not Disturb'] = '#FF8A8A';
    presence['Out to lunch'] = '#57BCD9';
    presence['Break'] = '#6094DB';
    presence['Meeting'] = '#CDD11B';

    If value presence "AVAILABLE" , ext can received in and out call.

    If value presence other than "available", we can't received incoming call, but we can outgoing call.

    How can i change default value "available" to other value", i want every user/agent that login to fop2 can't receive call. If agent/user want to receive incoming call, they should be change presence to "available"

    And more powerful if we can set default value presence for group extension fop2 like :

    presence status after login to fop2
    presence status after call on hook/hangup
    presence status after call parking
    presence status after call blind tranfer, supervised tranfer
    presence status after transfer to mobile
    presence status after spy
    presence status after hangup conference

    Thanks

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

      FOP2 does not control or change your dialplan. What you want to do has to do with your dialplan. You want an extension not be able to dial out if they are in some state (no matter if you use FOP2 or anything else for setting that state).

      That must be done at the dialplan level. It can be done, but you must modify your outbound dial macros. That modification is not done with FOP2, it is a core modification in your backend (and FOP2 is just a frontend).

      The presence in FOP2, as is, does absolutely nothing in your dialplan or asterisk setup. In order to tied the presence to your dialplan, you must use a plugin. For FreePBX you have the presence DND plugin, that as the name implies, will set the entry in the asterisk database signaling an extension is on DND. But you might very well NOT have that plugin installed, in that case, changing presence in FOP2 won't affect extensions in any way, it will just be a visual representation of a state in the FOP2 display and nothing else.

      Now, if you want to use the DND entry to prevent users being able to dial out, then you should modify the FreePBX dialplan, you could do so by using the macro-dialout-trunk-predial-hook provided by FreePBX, that lets you intercept outbound trunk calls before they are placed, and you can add your logic there, like checking to see if the ASTDB "DND" value is set, and if so abort/exit without dialing.

      Now, to make FOP2 change an extension to DND on login, you can write a plugin that performs that action (on login, change presence automatically).

      So, you can do what you want, but requires a bit of programming in all sides of your installation.

      Best regards,

      1 Reply Last reply
      0
      • M
        M
        moses
        wrote on last edited by
        #3

        Dear FOP2,

        *"Now, to make FOP2 change an extension to DND on login, you can write a plugin that performs that action (on login, change presence automatically)."
        *

        Can you give me sample plugin (how to write on fop2) so i can try do develop.

        Thanks

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

          Log into the FOP2 Manager, select the plugins section and install some of the free plugins you will find (there are around 25 free plugins). Once they are installed, you will see their source in /var/www/html/fop2/admin/plugins/xxxxxx and you can inspect code there.

          There is also a plugins directory in the fop2 tarball, with a sampleplugin that is like a skeleton for a new plugin.

          Best regards,

          1 Reply Last reply
          0
          • M
            M
            moses
            wrote on last edited by
            #5

            Ok thanks for your info.

            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