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. FOP2 + dynamic agents

FOP2 + dynamic agents

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 144 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
    tekach
    wrote on last edited by
    #1

    Hello,

    first of all, allow me to thank you for the great product you've provided.

    However, we have a slight problem using new version of FOP2 with our dynamic agents login/logout script. Script is supposed to log in user to device (deviceandusermode enabled in freepbx) and add agent to the queues. Most of the time everything works perfectly - only sometimes, when agent logs out of the queue, the agent's button in FOP2 stays busy forever. Line on the physical phone is not busy, user can login and logout again, he can take calls, reseting the phone doesn't help either. Problem goes away if i restart fop2 service.

    Screenshot:
    http://www.grom.si/download/annoyance.jpg

    We're using:

    • Asterisk 1.4.40
    • Freepbx 2.8.1.4
    • Fop2 2.20
    • I've added custom dialplans to extensions_override_freepbx.conf

    Dialplan for logging in /out users to device and adding / removing agents from the queues:

    [macro-agent-management-sso]
    exten => s,1,Wait(1)
    exten => s,n,Set(DEVICEUSER=${DB(DEVICE/${CALLERID(number)}/user)})
    exten => s,n,Set(CID=${CALLERID(number)})
    exten => s,n,Macro(user-callerid,SKIPTTL)
    exten => s,n,Set(CALLBACKNUM=${CALLERID(number)})
    exten => s,n,Set(AGENT_IP=${SIPCHANINFO(peerip)})
    exten => s,n,NoOp(${AGENT_IP})
    exten => s,n,GoToIf($[${DB_EXISTS(agent_location/${CID})}]?go)
    exten => s,n(get_user),Read(PROMPT,agent-user,8);
    exten => s,n,Set(CALLBACKNUM=${PROMPT})
    exten => s,n,Set(DB(agent_location/${CID})=${PROMPT})
    exten => s,n,Set(CALLBACKNUM=${DB(agent_location/${CID})})
    exten => s,n(go),AGI(agent.pl)
    exten => s,n,GotoIf($["${AGENT_ACTION}" = "logout"]?logout)
    ; Login
    exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
    exten => s,n,AGI(user_login_out.agi,login,${CALLERID(number)},${CALLBACKNUM})
    exten => s,n,System(/var/lib/asterisk/agi-bin/notify.pl ${CID} ${AGENT_IP} ${AGENT_ACTION})
    exten => s,n,Playback(agent-loginok)
    exten => s,n,SayDigits(${CALLBACKNUM})
    exten => s,n,Goto(end)
    ; Logout
    exten => s,n(logout),UserEvent(RefreshQueue)
    exten => s,n,NoOp("Before Execif")
    ;exten => s,n,ExecIf(${DB_EXISTS(agent_location/${CID})}?Set,CALLBACKNUM=${DB_DELETE(agent_location/${CID})})
    exten => s,n,Set(CALLBACKNUM=${DB_DELETE(agent_location/${CID})})
    exten => s,n,NoOp("After Execif/ Before AGI")
    exten => s,n,AGI(user_login_out.agi|logout|${CID})
    exten => s,n,NoOp("After AGI")
    exten => s,n,System(/var/lib/asterisk/agi-bin/notify.pl ${CID} ${AGENT_IP} ${AGENT_ACTION})
    exten => s,n,Playback(agent-loggedoff)
    exten => s,n(end),Hangup
    exten => s,n,MacroExit()

    I set up fop2 using fop2 module in freepbx. Can anyone see something obviously wrong?

    Thanks for your help
    Andrej

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

      Hi,

      It is really hard to see anything right or wrong on a custom context like that. Unfortunately fixing this will not be easy at all. You will need to see if the users in fop2 are being generated as USER/XXXX (you can run /usr/local/fop2/autoconfig-users-freepbx.sh and look at the output). User & device mode complicates things further.

      If this happens ALWAYS, then it is easy to replicate. In that case you can start fop2_server in debug level 1 and capture the output:

      service fop2 stop
      cd /usr/local/fop2
      script capture.log
      ./fop2_server -X 1
      

      ..then log the user to trigger the problem, verify that in the fop2 screen you see it stuck, and then stop fop2_server and the capture.

      ctrl-C
      exit
      

      Then send me all relevant information via email and I might try to look into it. The relevant pieces are the output from autoconfig-buttons-freepbx.sh and the captured log, compressed to save some space.

      1 Reply Last reply
      0
      • T
        T
        tekach
        wrote on last edited by
        #3

        Problem was solved by correcting the dialplan (adding sanity checks for login attempts) - Users were able to login with blank extensions (it happened sometimes by mistake). When they corrected their error and logged in properly, it caused strange results.

        Bottom line: all solved. Thanks for taking time & looking into it, Nicolas. Keep up the good work.

        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