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. Unregistered and Diabled Trunks still showing on FOP2

Unregistered and Diabled Trunks still showing on FOP2

Scheduled Pinned Locked Moved Support
22 Posts 2 Posters 521 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.
  • R
    R
    Ramblin
    wrote on last edited by
    #10
    1. I did NOT run the
      /usr/local/fop2/generate_override_contexts.pl -write
      script, but it says this is not required; that it is an option if you want tighter FreePBX configuration
      RIchard

    I did run
    /usr/local/fop2/generate_override_contexts.pl -write
    which did edit the files as described

    I then restarted fop2 - no change
    I then rebooted the system - no change

    I still have:

    • trunks not reflecting a loss of registration
    • no icons in the Toolbar

    I really like the FOP2 system design (heck I just bought 2 licenses); I'd like to get it fully functional

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

      Hi,

      We are many hours a day available at the live help, sometimes that is the best way to fix configuration issues.

      If you do not see action buttons is because you are logged with an extension that is NOT listed in the extension box below, your extension must be also present as a button in order to perform actions. It is mandatory. If you log with user "johndoe" or an extension number that does not match any "extension" in your button config, then you won't see the action buttons.

      Do you see sip registration status for your extensions? for trunks works the same, as long as the trunk channel matches the peerstatus event channel.

      1 Reply Last reply
      0
      • R
        R
        Ramblin
        wrote on last edited by
        #12

        We are many hours a day available at the live help, sometimes that is the best way to fix configuration issues.
        If you do not see action buttons is because you are logged with an extension that is NOT listed in the extension

        With your help, I think I just discovered an undocumented feature 🙂
        I had manually established a user (I disabled the auto-config of users) in the fop2.cfg file (say johndoe) as
        user=<johndoe>:<password>:all
        to be the generic user who could monitor all extensions, trunks, ...

        This allowed me to have "johndoe" act as a system administrator to diagnose connection status and issues. It might even be an outside contractor who does not have an extension. It really does not matter.

        Now that I know about the need to have the user be an actual extension, I realize that the "johndoe" user could be intentionally set up for someone you want to have read-only status to the panel. No control icons, just read-only. Nice feature actually.

        So yes, now that I have established, as a user, one of the legitimate extensions (mine), I can see the toolbar with the icons.
        I need now to figure out how to do the lsiten and whisper feature so I can coach a new call centre employee, but I'll dig into that.

        Thank you.
        One item resolved - and yes, the root cause was user issue 😞 .

        However, I still am not able to get the trunk button to show in the panel when the SIP trunk goes unregistered.
        I signed in as the real extension user and manually disabled the trunk.
        When I ran

        asterisk -rx 'sip show registry'
        

        it did properly show the trunk as Not Registered / No Authentication

        Host                                    dnsmgr Username       Refresh State                Reg.Time                 
        ...
        sip06.unlimitel.ca:5060                 N      5195940055         120 No Authentication                             
        ...
        17 SIP registrations.
        

        but the trunk button in the FOP2 panels stayed green througout.
        I left the trunk in a Not Registered state for 5 minutes in case there was a lag issue with FOP2 or something, but no change - the button stayed green.

        I hear you that the FOP2 panel uses AMI and I am using CLI commands, but the net is that the trunk loses registration so I would have expected the panel button to realize that.
        When an extension is not registered, it greys out (regardeless of what user I sign in with), but not the trunks.

        So maybe it is time to try a live interaction.
        I am in the Eastern Standard Time zone.
        Where are you and what would be a good time to try and use the live interaction?

        Thanks for your help on this; it is a great piece of software and I'd like to get the configuration working fully.

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

          The grayed out buttons are done for SIP Status (sip show peers). Not registry information. A Peer with qualify set will send periodic events via AMI about its status. So, check "sip show peers" for your trunks, not "sip show registry"

          Best regards,

          1 Reply Last reply
          0
          • R
            R
            Ramblin
            wrote on last edited by
            #14

            check "sip show peers" for your trunks

            I disabled the trunk and then ran

            asterisk -rx 'sip show registry'
            

            just to make sure it was disabled and yes, it was.

            I then went and ran

            asterisk =rx 'sip show peers'
            

            and it showed no problems

            But the trunk was unusable

            I waited for 10 minutes with the trun in a disablled status but it made no difference:

            • sip show registry continued to show the SIP trunk as not Registered
            • sip show peers continued to show no problems

            The trunk was not usable for the 10 minutes that is was not registered, but FOP2 showed it as fine (using sip show peers)

            Is there a way to get sip show peers to show the non-functioning trunK?
            If not, is there a way to get the panel to reflect sip show registry as well as sip show peers?

            R

            1 Reply Last reply
            0
            • R
              R
              Ramblin
              wrote on last edited by
              #15

              The FOP1 panel used to show when the trunk went unregistered

              Is there some coed I could take from that and try to integrate with FOP2?

              I know I am harping on one bit of funcitonality here, but it was the ability of FOP1 to show when trunks went unregistered that allowed me to resolve an issue with a trunk service provider. They initially denied any issue at their end but by using FOP1's ability to dispaly trunk status, I was able to track the status and get the provider to fix (although never admit to 🙂 ) the error on their end.

              So I am hoping to retain that functionality in FOP2

              FOP2 is a great piece of software and does many things FOP1 did not do. I am hoping to keep the one thing FOP1 did do that at this point it appears FOP2 does not do.

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

                FOP2 shows sip peer status, including trunks. If a "sip show peers" shows a trunk as lagged or unreachable, it will show as such in the fop2 display. (if the manager event is properly received).

                Best regards,

                1 Reply Last reply
                0
                • R
                  R
                  Ramblin
                  wrote on last edited by
                  #17

                  FOP2 shows sip peer status, including trunks.
                  Best regards,

                  Nicolas,

                  I get the fact that FOP2 shows sip peer status , NOT sip registry status.

                  What I do not understand is why FOP1 showed the trunk when it went unregistered but FOP2 does not.
                  Did something change between fop1 and FOP2?

                  I literally copied/pasted the trunk (and extension) settings from the old (64-bit CentOS 6.2, Asterisk 1.8, FreePBX 2.9, fop1) system to the new (64-bit CentOS 6.4, Asterisk 11, FreePBX 2.11, FOP2) system and on the fop1 system, when the trunk went out of registration, the trunk button "dimmed" but on the FOP2 system it does not change colour.

                  It may be that the same peer settings for the trunk or the same AMI settings are no longer sending the same status messages out, but I do not know how to check this.
                  Can you advise?

                  I have experimented on numerous trunks, but I will share with you the settings for one trunk (private info replaced by {content}) that I got by running

                  asterisk -rx 'sip show peer Mktg_5-out'
                  

                  which produced

                    * Name       : Mktg_5-out
                    Description  :
                    Secret       : <Set>
                    MD5Secret    : <Not set>
                    Remote Secret: <Not set>
                    Context      : from-pstn
                    Record On feature : automon
                    Record Off feature : automon
                    Subscr.Cont. : <Not set>
                    Language     :
                    Tonezone     : <Not set>
                    AMA flags    : Unknown
                    Transfer mode: open
                    CallingPres  : Presentation Allowed, Not Screened
                    Callgroup    :
                    Pickupgroup  :
                    Named Callgr :
                    Nam. Pickupgr:
                    MOH Suggest  :
                    Mailbox      :
                    VM Extension : *97
                    LastMsgsSent : 0/0
                    Call limit   : 0
                    Max forwards : 0
                    Dynamic      : No
                    Callerid     : "" <>
                    MaxCallBR    : 150 kbps
                    Expire       : -1
                    Insecure     : port,invite
                    Force rport  : Yes
                    Symmetric RTP: Yes
                    ACL          : No
                    DirectMedACL : No
                    T.38 support : No
                    T.38 EC mode : Unknown
                    T.38 MaxDtgrm: -1
                    DirectMedia  : No
                    PromiscRedir : No
                    User=Phone   : No
                    Video Support: Yes
                    Text Support : No
                    Ign SDP ver  : No
                    Trust RPID   : No
                    Send RPID    : No
                    Subscriptions: Yes
                    Overlap dial : Yes
                    DTMFmode     : rfc2833
                    Timer T1     : 500
                    Timer B      : 32000
                    ToHost       : {provider_FQDN}
                    Addr->IP     : {privider_IP_address}:5060
                    Defaddr->IP  : (null)
                    Prim.Transp. : UDP
                    Allowed.Trsp : UDP
                    Def. Username: {phone number}
                    SIP Options  : (none)
                    Codecs       : (ulaw)
                    Codec Order  : (ulaw:20)
                    Auto-Framing :  No
                    Status       : OK (18 ms)
                    Useragent    :
                    Reg. Contact :
                    Qualify Freq : 60000 ms
                    Keepalive    : 0 ms
                    Sess-Timers  : Accept
                    Sess-Refresh : uas
                    Sess-Expires : 1800 secs
                    Min-Sess     : 90 secs
                    RTP Engine   : asterisk
                    Parkinglot   :
                    Use Reason   : No
                    Encryption   : No
                  

                  Do you see anything in this setup that would prevent "sip show peers" from getting a failed trunk through to FOP2?

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

                    I see this in your post:

                    asterisk -rx 'sip show peer Mktg_5-out'

                    Name of the peer is "Mktg_5-out", what is the name of the fop2 channel for that trunk button? If you have TWO separate names, one for inbound, one for outbound, you will have to specify the other/missing one in the channel field in the fop2 buttons freepbx admin page. Or add it as an extra channel field in your button definition if configuring manually. Otherwise, any event related to that extra channel name will not match your button.

                    Example in fop2 buttons.cfg:

                    [SIP/Mktg_5]
                    type=trunk
                    ...
                    ...
                    

                    If you have events received with SIP/Mktg_5-out, they will not match as they are in fact a different channel. So, add an extra channel, like:

                    [SIP/Mktg_5]
                    type=trunk
                    channel=SIP/Mktg_5-out
                    ...
                    ...
                    
                    1 Reply Last reply
                    0
                    • N
                      N
                      nicolas
                      wrote on last edited by
                      #19

                      By the way, just to be sure I tried with my own installation for a sip trunk I have. If I block the ip address via iptables, in a couple of minutes I received the proper unreachable event and the button is grayed out in fop2.

                      If you want to log the manager output for debug, you can set the options line in /etc/sysconfig/fop2 like this

                      OPTIONS="-d -X 15 -l /tmp"

                      That will log output into tmp (output.log and error log in fop2 2.26 or prior, fop2_debug log in fop2 2.27 beta). You will see, among other things, the events being received in AMI, like:

                      127.0.0.1            <- Event: PeerStatus
                      127.0.0.1            <- Privilege: system,all
                      127.0.0.1            <- ChannelType: SIP
                      127.0.0.1            <- Peer: SIP/trunkprovider
                      127.0.0.1            <- PeerStatus: Unreachable
                      127.0.0.1            <- Time: -1
                      

                      Best regards,

                      1 Reply Last reply
                      0
                      • R
                        R
                        Ramblin
                        wrote on last edited by
                        #20

                        If you have TWO separate names, one for inbound, one for outbound, you will have to specify the other/missing one in the channel field in the fop2 buttons freepbx admin page.
                        Example in fop2 buttons.cfg:

                        [SIP/Mktg_5]
                        type=trunk
                        ...
                        ...
                        

                        If you have events received with SIP/Mktg_5-out, they will not match as they are in fact a different channel. So, add an extra channel, like:

                        [SIP/Mktg_5]
                        type=trunk
                        channel=SIP/Mktg_5-out
                        ...
                        ...
                        

                        I think you may be on to something, but I am not sure I fully understand the solution (sorry for being dense)

                        Here is my FreePBX setup for trunk Mktg 5
                        http://docs.ayuda.ca/Mkgt_5-Trunk.jpg

                        When I tried to make the Trunk Name (Outgoing settings) and the Context Name (Incoming Settings) the same, I got an error message saying

                        Trunk Name and User Context cannot be set to the same value
                        

                        so Ieft them as is, with the
                        Trunk Name (Top setting): Mktg 5
                        Outgoing Settings / Trunk Name: Mktg_5-out
                        Incoming Settings / User Conttext : Mktg_5-in

                        I added, using the FreePBX -> Other -> FOP2 Buttons, the additional Mktg_5-in Channel to my SIP?Mktg_5-out trunk and then

                        • rebuilt the buttons.cfg file using /usr/local/fop2/autoconfig-buttons-freepbx.sh > /usr/local/fop2/buttons.cfg
                        • restarted fop2 using service fop2 restart
                          and I now have, in my buttons.cfg file the following entry for SIP/Mktg_5-out
                        [SIP/Mktg_5-out]
                        type=trunk
                        label=SIP/Mktg_5-out
                        queuecontext=from-internal
                        privacy=none
                        channel=SIP/Mktg_5-in
                        rtmp=0
                        

                        I entered a bad secret in the registration settings for the Mktg 5 trunk and within a minute, the registration was reflected as bad, but the Trunk button did not change. I also noticed that I did not have any extra buttons in the panel for the Inbound trunk (should I have extra buttons for the additional channel?).

                        I noticed in your example, you used SIP/Mktg_5 not SIP/Mktgt_5-out in your trunk definition. I have "Mktg 5" as my (free-text) Trunk name but Mktg_5-out and Mktg_5-in as my outbound and inbound setting names. When I run the autoconfigure with

                        /usr/local/fop2/autoconfig-buttons-freepbx.sh > /usr/local/fop2/buttons.cfg
                        

                        it automatically picks up the Mktg_5-out name.
                        Is that an issue?

                        I am guessing we are close and I appreciate you sticking with me on this; I hope I can "get it" quickly.

                        1 Reply Last reply
                        0
                        • R
                          R
                          Ramblin
                          wrote on last edited by
                          #21

                          If you want to log the manager output for debug, you can set the options line in /etc/sysconfig/fop2 like this
                          OPTIONS="-d -X 15 -l /tmp"

                          I changed (temporarily, that quickly started adding up to quite a log file) the settings in /etc/sysconfig/fop2 to the above and restarted fop2

                          The output.log populated very quickly but the error.log got no entries.

                          The entries in the output.log for Mktg_5 were

                          127.0.0.1       <- Event: PeerEntry
                          127.0.0.1       <- Channeltype: SIP
                          127.0.0.1       <- ObjectName: Mktg_5-in
                          127.0.0.1       <- ChanObjectType: peer
                          127.0.0.1       <- IPaddress: {IP_address_of_provider}
                          127.0.0.1       <- IPport: 5060
                          127.0.0.1       <- Dynamic: no
                          127.0.0.1       <- AutoForcerport: no
                          127.0.0.1       <- Forcerport: yes
                          127.0.0.1       <- AutoComedia: no
                          127.0.0.1       <- Comedia: yes
                          127.0.0.1       <- VideoSupport: yes
                          127.0.0.1       <- TextSupport: no
                          127.0.0.1       <- ACL: no
                          127.0.0.1       <- Status: OK (17 ms)
                          127.0.0.1       <- RealtimeDevice: no
                          127.0.0.1       <- Description: 
                          127.0.0.1       <- Server: 0
                          
                          127.0.0.1       <- Event: PeerEntry
                          127.0.0.1       <- Channeltype: SIP
                          127.0.0.1       <- ObjectName: Mktg_5-out
                          127.0.0.1       <- ChanObjectType: peer
                          127.0.0.1       <- IPaddress: {IP_address_of_provider}
                          127.0.0.1       <- IPport: 5060
                          127.0.0.1       <- Dynamic: no
                          127.0.0.1       <- AutoForcerport: no
                          127.0.0.1       <- Forcerport: yes
                          127.0.0.1       <- AutoComedia: no
                          127.0.0.1       <- Comedia: yes
                          127.0.0.1       <- VideoSupport: yes
                          127.0.0.1       <- TextSupport: no
                          127.0.0.1       <- ACL: no
                          127.0.0.1       <- Status: OK (17 ms)
                          127.0.0.1       <- RealtimeDevice: no
                          127.0.0.1       <- Description: 
                          127.0.0.1       <- Server: 0
                          

                          This was the same as the entries for the other channels (for which I had NOT yet added the extra channel in the fop2 admin) and no errors/outages were reported even though the registry did show No Authentication.

                          I don't know where to go now.

                          I was wondering if the timing settings were such that the Peer never realized the trunk was out, but:

                          • I had the same settings in the previous (fop1) system that did show trunk registration failures
                          • the registry settings are immmediately being seen
                          • I had left the (non-registered) state as is for 15 minutes so I thought that would allow any delays to be recognized

                          Something is different between ours systems though, since you are getting yours to work, so FOP2 is certainly capable of it. It just is not doing it with my configuration. All the other functinality is working (Extensions grey out when not connected, Conference, Park, Trunks show properly when being used, Toollbar Icon commands work, ...)

                          One thing I did try: On Mktg_8-out (another trunk, that the outbound routes are configured to use as the first one for local calls) I entered a bad secret in the Rgistration string and the Sip Registry recognized the trunk as Not Authenticated, yet, when I made a local call, Mktg_8-out was still used and the call was completed.

                          Then I entered a bad secret in the Oubound Settings, the Inbound settings and the Registration string and the Mktg_8-out trunk did NOT process the call; it passed to Mktg_7-out (as it is supposed to).

                          However, in neither case, did the error.log get any entries.

                          Is this helping to zero in on the issue?

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

                            An emtpy error_log is good news.. and not related at all with your issue. The event that FOP2 monitors for registration status is "PeerStatus", I posted a sample event before, here it is again:

                            127.0.0.1            <- Event: PeerStatus
                            127.0.0.1            <- Privilege: system,all
                            127.0.0.1            <- ChannelType: SIP
                            127.0.0.1            <- Peer: SIP/trunkprovider
                            127.0.0.1            <- PeerStatus: Unreachable
                            127.0.0.1            <- Time: -1
                            

                            Your Asterisk server must broadcast an event like that when you have qualify problems with a trunk.

                            Again. fop2 monitors qualify events, not Registry events. A bad password does not make a sip peer unreachable, it just fails a registration event. fop2 only monitors PeerStatus events. The PeerEntries are read at startup, but the meat of realtime sip status information is actually the PeerStatus event.

                            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