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. Queue Channel StateInterface incorrect

Queue Channel StateInterface incorrect

Scheduled Pinned Locked Moved Support
8 Posts 3 Posters 463 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
    dcundiff
    wrote on last edited by
    #1

    Hi,

    I'm using the latest version of everything

    Fop 2.27 / FopAdmin 1.0 / FreePBX 2.11.0.38

    Using the latest versions I'm having a problem with creation of the Queue Channel field. In FopAdmin/functions-freepbx.php the following code is setting the stateInterface to be USER/extension.

    188 if ($conf['EXTENSIONS'] == "deviceanduser") {
    189 $fields="extension,concat('USER/',extension) AS dial, if(voicemail='novm','',concat(extension,'@',voicemail)) AS mailbox,name,IF(voicemail<>'novm',concat('$vmprefix',extension),'') AS extenvoicemail";

    That causes the queue members to be invalid since it doesn't actually exist as a state interface. Changing "concat('USER/',extension) AS dial" to just "dial" fixes the problem.

    I am using deviceanduser mode. If USER/ should be a stateinterface on FreePBX I may have to look into that instead. This system has been upgraded through many versions of FreePBX and may have missed something during one.

    There's also a problem where it's duplicating the queue fields but I haven't tracked that one down yet. An example entry in the database(After I corrected the USER/) is below. Most fields are just duplicated but Penalty is 0 and 60. It should just be 60.

    Local/8052@from-queue/n|Penalty=0|MemberName=????|StateInterface=SIP/8052&Local/8052@from-queue/n|Penalty=60|MemberName=????|StateInterface=SIP/8052|Queue=8900

    Dave

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

      Hi Dave,

      Do you know what does FreePBX do with state interface in device & user mode ? There is no known state interface for a user, as it might log from any device. Because the queuechannel directive is static in FOP2 (like the queue member definition in queues.conf), it is not possible to know for sure the device to use (at it will vary depending on the device or deviceS a user is logged into).

      So, do you know what does FreePBX do with that field when adding members? Having USER/xxxx as a state interface is not a valid asterisk configuration (the USER abstraction is exclusive for FOP2, so that is clearly a bug in fop2manager, but the fix would be to leave the state interface empty as of now, as it is done with custom or virtual extensions).

      Regarding the duplication, if you look closely, they are not duplicated, you have a global setting for queue membrers, and you might have individual queue settings with different parameters. In your example, queue 8900 has a 60 penalty, and the other value is the global one for all the other queues.

      For fixing the USER/xxx state interface, look at functions-freepbx.php , on line 539 and change this:

          if(substr($device,0,6)=="VIRTUA" || substr($device,0,6)=="CUSTOM") {
      

      to this:

          if(substr($device,0,6)=="VIRTUA" || substr($device,0,6)=="CUSTOM" || substr($device,0,5)=="USER") {
      
      1 Reply Last reply
      0
      • D
        D
        dcundiff
        wrote on last edited by
        #3

        Ah! I now see the & in the field list. That explains everything!

        As for the StateInterface the only things that are usable in FreePBX are devices that I'm aware of. I changed line 189 since in my setup it works to match the device to the user by default. If a user logs into a different device you'll have to grab the stateinterface for that user when you see the login event in AMI. Does the fop2_server do that currently? If so I can revert my change and take yours which will set the stateinterface to nothing and let the fop2_server assign the stateinterface at runtime.

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

          Changing the queuechannel setting based on ami events is not done by default, but a plugin could be written to intercept the events for when a user logs in and change the queuechannel in the fop2 configuration on the fly. Do you know if the FreePBX .agi that fires the user event is fixed on newer releases? (it's been broken for ages, since asterisk 1.8 came out).

          In user&device mode in FreePBX an extension can log from sip phone A and sip phone B, and when that extension is rang, both A and B will be dialed, but we cannot have more than one device for the state interface. What state interface is good in that case? If a plugin is written, only the last login event would modify the state interface in the queue configuration.

          1 Reply Last reply
          0
          • D
            D
            dcundiff
            wrote on last edited by
            #5

            Hi,

            This seems to be the proper way to monitor a queue member attached to multiple devices.

            https://issues.asterisk.org/jira/browse/ASTERISK-14178

            I change the QueueChannel to the following

            Local/8008@from-queue/n|Penalty=0|MemberName=Dave C|HINT:8008@ext-local

            and it appears to work as intended. My agent is still valid and I can answer calls.

            I have done VERY limited testing. I have to setup a few extensions and test queues and I haven't had very much free time lately. If I can manage to test it more thoroughly I'll report back.

            Dave

            1 Reply Last reply
            0
            • D
              D
              dcundiff
              wrote on last edited by
              #6

              Hi

              Almost forgot. You also have to set the following to true in FreePBX advanced settings.

              Asterisk Queues Patch 15168 Installed

              Athought I'm not sure if that is required if FreePBX detects a version of Asterisk which should have the patch included. This may just be for people who have custom built asterisk with the patch.

              Dave

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

                Thanks Dave for your feedback! It is very much appreciated. If the HINT is standard in FreePBX then I will update the manager to use that syntax for user&device mode. Please let me know how your testing goes.

                Best regards,

                1 Reply Last reply
                0
                • P
                  P
                  paul.carrero
                  wrote on last edited by
                  #8

                  Not trying to resurrect a very old thread, but is there a way to force FOP2 to use state_interface hint:XXX@ext-local when adding members to queues? right now on fpbx v14 with a pjsip extension, it's adding as state_interface PJSIP/XXX

                  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