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 monitoring for asterisk plain (USERDEVICE MODE)

FOP2 monitoring for asterisk plain (USERDEVICE MODE)

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 335 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,

    Today i know how astdb working on userdevice mode, i can see script agi user_login_out and i think we can change the script using shell script and execute the script on dialplan asterisk

    Here is the small script example :

    LOGIN
    asterisk -rx "database put DEVICE/${DEVICE} user ${USER}"
    asterisk -rx "database put AMPUSER/${USER} device ${DEVICE}"
    asterisk -rx "dialplan add extension ${USER},hint,SIP/${DEVICE} into ext-local"
    exten => s,n,UserEvent(UserDeviceAdded,Action: UserEvent,Data: ${USER},${DEVICE})

    LOGOUT
    asterisk -rx "database del AMPUSER ${USER}/device"
    asterisk -rx "database put DEVICE/${DEVICE} user none"
    asterisk -rx "dialplan remove extension ${USER}@ext-local hint"
    exten => s,n,UserEvent(UserDeviceRemoved,Action: UserEvent,Data: ${USER},${DEVICE})

    And variable "database show" we can set on asterisk using CLI database put/del etc

    /AMPUSER/${USER}/device : 4001
    /DEVICE/${DEVICE}/user : 100

    etc....

    My Question are :

    What should i do on fop2 configuration to support userdevice mode on asterisk plain?

    I only need fop2 monitoring GREEN color if i run command Login, GREY if run script LOGOUT and RED if i call out from device.

    Thanks

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

      FOP2 users are configured with USER/xxx buttons, while devices are congigured with SIP/xxx (or whatever other tech they use).

      So, in the button configuration on FOP2 you must have

      [USER/100]
      type=extension
      extension=100
      Label=Mary
      ...

      At startup the ASTDB will be quieried to perform the device mapping with the user, and then UserEvents will be read to dynamically change that mapping.

      Best regards,

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

        Dear FOP2 Team,

        I try to explore userdevice mode on asterisk plain.

        USER : 2000
        DEVICE : 100

        Here is my config on fop2.cfg

        user=2000:2000:dial::configonreload
        buttonfile=buttons.cfg


        ** buttons.cfg**

        [USER/2000]
        type=extension
        extension=2000
        label=2000
        context=from-internal
        autoanswerheader=__SIPADDHEADER51=Call-Info=answer-after=0.001

        After i restart fop2 and then login from http://ip/fop2 , user : 2000, password : 2000, it show green color (see pic on attachment fop2_box_green.png), in normal state (using freepbx), before not success login from xlite/softphone by press *11 it should be "GRAY" color

        Here is i my config (asterisk)

        sip.conf

        [general]
        #include sip_general_additional.conf
        [authentication]

        [100]
        deny=0.0.0.0/0.0.0.0
        secret=100@password
        dtmfmode=rfc2833
        canreinvite=no
        context=from-internal
        host=dynamic
        trustrpid=yes
        sendrpid=no
        type=friend
        nat=no
        port=5060
        qualify=yes
        qualifyfreq=60
        transport=udp
        avpf=no
        icesupport=no
        encryption=no
        callgroup=
        pickupgroup=
        dial=SIP/100
        mailbox=100@device
        permit=0.0.0.0/0.0.0.0
        callerid=100 <100>
        callcounter=yes
        faxdetect=no
        cc_monitor_policy=generic


        extensions.conf

        [general]
        static = yes
        writeprotect = no
        autofallthrough = yes
        clearglobalvars = no

        [globals]

        [from-internal]
        exten => 2000,hint,SIP/100


        asterisk -rx "database show"

        /AMPUSER/2000/device : 100
        /AMPUSER/2000/password : 2000
        /DEVICE/100/dial : SIP/100
        /DEVICE/100/type : adhoc
        /DEVICE/100/user : 2000
        /SIP/Registry/100 : 27.111.XX.XX:36698:300💯sip:100@27.111.XX.XX:36698;rinstance=55805cdce59f495c

        [root@cls asterisk]# asterisk -rx "core show hints"

        -= Registered Asterisk Dial Plan Hints =-
                       2000@from-internal       : SIP/100               State:Idle            Watchers  0
        

        • 1 hints registered

        Pls help me to solve this issue so i can using userdevice mode on asterisk plain.

        Thanks

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

          Go to the fop2 manager, configuration and set startNotRegistered to true

          Best regards,

          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