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. Presense change question

Presense change question

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

    I have a call center that uses a queue in FreePBX. If an agent changes the presence status to anything but "Available" in FOP2, it sets the presence to Do Not Disturb. This repesents some issues in FreePBX as to how the call is routed under my configuration.

    I found the options for editing the presence.js file to list different options, however, is there a way to PAUSE the agent using that availability setting instead of setting them to DND?

    Thanks

    -peter

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

      There is a way to change behavior and use queue pauses instead of DND, by modyfing FOP2Callbacks.pm and creating a custom context in Asterisk. It is not that simple to do, but neither that complicated. There is no standard recipe as queues and members can vary from installation to installation, and so your custom context must match your setup. Basically, in FOP2Callbacks.pm you intercept the change presence action and instead of setting and ASTDB entry for it, you originate a call to your custom context:

      In FOP2Callbacks.pm flashcommand function:

          if($command eq "setastdb") {
      
              # Pause Local/xxxx@from-queue/n
      
              $return = "Action: Originate\r\n";
              $return .= "Channel: Local/".$parameters[2].":".$parameters[3];
              $return .= "\@custom-logpause-freepbx\r\n";
              $return .= "Application: Noop\r\n";
              $return .= "\r\n";
              push @allreturn, $return;
              return @allreturn;
      
      

      And your custom-logpause context in the dialplan:

      [custom-logpause-freepbx]
      exten => _X.,1,Verbose(Exten ${EXTEN})
      exten => _X.,n,Set(ACLIDNUM=${CUT(EXTEN,:,1)})
      exten => _X.,n,Set(PAUSECODE=${CUT(EXTEN,:,2)})
      exten => _X.,n,Set(MIAGENTE=Local/${ACLIDNUM}@from-queue/n)
      exten => _X.,n,Verbose(MIAGENTE  = ${MIAGENTE})
      exten => _X.,n,Verbose(ACLIDNUM  = ${ACLIDNUM})
      exten => _X.,n,Verbose(PAUSECODE = ${PAUSECODE})
      exten => _X.,n,GotoIf($[ "x${PAUSECODE}" = "x" ]?unpause)
      exten => _X.,n(pause),QueueLog(NONE,NONE,${MIAGENTE},PAUSE,${PAUSECODE})
      exten => _X.,n,PauseQueueMember(,${MIAGENTE},,${PAUSECODE})
      exten => _X.,n,Set(DB(PAUSECUSTOM/${ACLIDNUM})=${PAUSECODE}:${EPOCH})
      exten => _X.,n,Goto(end)
      exten => _X.,n(unpause),QueueLog(NONE,NONE,${MIAGENTE},UNPAUSE)
      exten => _X.,n,UnPauseQueueMember(,${MIAGENTE})
      exten => _X.,n,NoOp(${DB_DELETE(PAUSECUSTOM/${ACLIDNUM})})
      exten => _X.,n(end),Verbose(Fin log pausa)
      exten => _X.,n,Hangup
      
      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