Asterisk 18.3 FreePBX 15.0.17.34 Can not connect to Asterisk


(Lorne Gaetz) #7

A normal FreePBX manager.conf will look like this:

;
; AMI - Asterisk Manager interface - Generated at 2019-04-15T16:12:27+00:00
;
; FreePBX needs this to be enabled. Note that if you enable it on a different IP, you need
; to assure that this can't be reached from un-authorized hosts with the ACL settings (permit/deny).
; Also, remember to configure non-default port or IP-addresses in amportal.conf.
;
; The AMI connection is used both by the portal and the operator's panel in FreePBX.
;
; FreePBX assumes an AMI connection to localhost:5038 by default.
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+

[admin]
secret = <<random generated string>>
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
writetimeout = 5000

#include manager_additional.conf
#include manager_custom.conf

If you are missing the content of manager.conf, I don’t see any way that asterisk-version-switch could have done that. It looks like you’ve done something to write asterisk sample config, in which case many other files will be corrupted as well.


#8

I do recall a portion of the instructions for usecallmanager that mentions certain sample config that is required for the patches use. I don’t have permissions to post a link to those instructions but let me give this a shot here. (usecallmanager.nz) the patching asterisk page. However this does not mention any configurations for manager.conf.

Below is the configuration I have.

;
; AMI - The Asterisk Manager Interface
;
; Third party application call management support and PBX event supervision
;
; Use the "manager show commands" at the CLI to list available manager commands
; and their authorization levels.
;
; "manager show command <command>" will show a help text.
;
; ---------------------------- SECURITY NOTE -------------------------------
; Note that you should not enable the AMI on a public IP address. If needed,
; block this TCP port with iptables (or another FW software) and reach it
; with IPsec, SSH, or SSL vpn tunnel.  You can also make the manager
; interface available over http/https if Asterisk's http server is enabled in
; http.conf and if both "enabled" and "webenabled" are set to yes in
; this file.  Both default to no.  httptimeout provides the maximum
; timeout in seconds before a web based session is discarded.  The
; default is 60 seconds.
;
[general]
enabled = no
;webenabled = yes

port = 5038
bindaddr = 0.0.0.0

; Parameters that control AMI over TLS. ("enabled" must be set too).
; You can open a connection to this socket with e.g.
;
;       openssl s_client -connect my_host:5039
;
;tlsenable=no           ; set to YES to enable it
;tlsbindaddr=0.0.0.0:5039               ; address and port to bind to, default to bindaddr and port 5039
;tlscertfile=/tmp/asterisk.pem  ; path to the certificate.
;tlsprivatekey=/tmp/private.pem ; path to the private key, if no private given,
                                ; if no tlsprivatekey is given, default is to search
                                                                ; tlscertfile for private key.
;tlscipher=<cipher string>      ; string specifying which SSL ciphers to use or not use
;
;allowmultiplelogin = yes               ; IF set to no, rejects manager logins that are already in use.
;                               ; The default is yes.
;
;displayconnects = yes
;
; Add a Unix epoch timestamp to events (not action responses)
;
;timestampevents = yes

;brokeneventsaction = yes   ; Restore previous behavior that caused the events
                            ; action to not return a response in certain
                            ; circumstances.  Defaults to 'no'.

;
; Display certain channel variables every time a channel-oriented
; event is emitted:
;
; Note that this does incur a performance penalty and should be avoided if possible.
;
;channelvars = var1,var2,var3

; debug = on    ; enable some debugging info in AMI messages (default off).
                ; Also accessible through the "manager debug" CLI command.

; authtimeout specifies the maximum number of seconds a client has to
; authenticate.  If the client does not authenticate beofre this timeout
; expires, the client will be disconnected. (default: 30 seconds)

;authtimeout = 30

; authlimit specifies the maximum number of unauthenticated sessions that will
; be allowed to connect at any given time.

;authlimit = 50

;httptimeout = 60
; a) httptimeout sets the Max-Age of the http cookie
; b) httptimeout is the amount of time the webserver waits
;    on a action=waitevent request (actually its httptimeout-10)
; c) httptimeout is also the amount of time the webserver keeps
;    a http session alive after completing a successful action


;[mark]
;secret = mysecret
;deny=0.0.0.0/0.0.0.0
;permit=209.16.236.73/255.255.255.0
;acl=named_acl_example               ; use a named ACL from acl.conf
;
;
;setvar=PBXACCOUNT=edvina
; The setvar option defines channel variables that will be set when this account
; originates a call. You can define multiple setvar= commands for one manager
; user.
;
;eventfilter=Event: Newchannel
;eventfilter=Channel: (PJ)?SIP/(james|jim|john)-
;eventfilter=!Channel: DAHDI/
; The eventfilter option is used to whitelist or blacklist events per user.
; A filter consists of an (unanchored) regular expression that is run on the
; entire event data. If the first character of the filter is an exclamation
; mark (!), the filter is appended to the blacklist instead of the whitelist.
; After first checking the read access below, the regular expression filters
; are processed as follows:
; - If no filters are configured all events are reported as normal.
; - If there are white filters only: implied black all filter processed first,
; then white filters.
; - If there are black filters only: implied white all filter processed first,
; then black filters.
; - If there are both white and black filters: implied black all filter processed
; first, then white filters, and lastly black filters.

;
; If the device connected via this user accepts input slowly,
; the timeout for writes to it can be increased to keep it
; from being disconnected (value is in milliseconds)
;
; writetimeout = 100
;
;displayconnects = yes  ; Display on CLI user login/logoff
;
; Authorization for various classes
;
; Read authorization permits you to receive asynchronous events, in general.
; Write authorization permits you to send commands and get back responses.  The
; following classes exist:
;
; all       - All event classes below (including any we may have missed).
; system    - General information about the system and ability to run system
;             management commands, such as Shutdown, Restart, and Reload. This
;             class also includes dialplan manipulation actions such as
;             DialplanExtensionAdd and DialplanExtensionRemove.
; call      - Information about channels and ability to set information in a
;             running channel.
; log       - Logging information.  Read-only. (Defined but not yet used.)
; verbose   - Verbose information.  Read-only. (Defined but not yet used.)
; agent     - Information about queues and agents and ability to add queue
;             members to a queue.
; user      - Permission to send and receive UserEvent.
; config    - Ability to read and write configuration files.
; command   - Permission to run CLI commands.  Write-only.
; dtmf      - Receive DTMF events.  Read-only.
; reporting - Ability to get information about the system.
; cdr       - Output of cdr_manager, if loaded.  Read-only.
; dialplan  - Receive NewExten and VarSet events.  Read-only.
; originate - Permission to originate new calls.  Write-only.
; agi       - Output AGI commands executed.  Input AGI command to execute.
; cc        - Call Completion events.  Read-only.
; aoc       - Permission to send Advice Of Charge messages and receive Advice
;           - Of Charge events.
; test      - Ability to read TestEvent notifications sent to the Asterisk Test
;             Suite.  Note that this is only enabled when the TEST_FRAMEWORK
;             compiler flag is defined.
; security  - Security Events.  Read-only.
; message   - Permissions to send out of call messages. Write-only
;
;read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
;write = system,call,agent,user,config,command,reporting,originate,message

#9

Please keep in mind that this is an relatively old installation of FreePBX that has been updated overtime.


(Lorne Gaetz) #10

You’ve followed a tutorial for compiling asterisk that’s incompatible with FreePBX and unsuitable for the FreePBX Distro. I can’t assist.


#11

Alright, in that case what is the proper way to go about compiling asterisk with this patch that is compatible w/ FreePBX? Or is there a phone out there that you would instead recommend that has a nice display on it?


(Dave Burgess) #12

Step 1 - don’t install the patch. You don’t need it for the SIP version of the Cisco phones. The patch provides SCCP connectivity, which you can’t get on this phone.

Step 2 - install the FreePBX distro ‘as is’ and connect the phone using the normal SIP phone installation process. This will either include using the Open Source EPM or (if you’re feeling adventurous) use the Chan-SCCP-B Driver and the SCCP Manager package to manage the SIP credentialed phone.


(Lorne Gaetz) #13

You will have to define what nice display means to you. Pretty much all current SIP phones have what I would call a nice display.

Any open SIP device will work with Asterisk. Many beginners get caught in the Cisco trap (myself included). There is a reason they are dirt cheap on fleabay.

As a Sangoma employee I will say that Sangoma phones will provide a solid experience with FreePBX. I shall leave to others to make competing recommendations, there are several.

There are many free or nearly free desktop and mobile soft clients that you can use for testing if you just want to get started right away.


(R. Stindl) #14

You can use Ciscos with freePBX, but it’s kind of an advanced project…
Here is a tutorial for freePBX 14 and Asterisk 13. The problem is, when you patch Asterisk you are stuck with this version. You can never update your Asterisk version again.
https://wiki.freepbx.org/display/FOP/Cisco

Here you’ll find the patch and config files
https://usecallmanager.nz/patching-asterisk.html

Why do you want to update to Asterisk 18??? Your Cisco phone is more than 10 years old…what do you think would improve with the newest Asterisk version?

I still use Asterisk 13…it’s stable and works…the newest versions of Asterisk are just for beta testers :wink:


#15

Hey! I wanted to move to 18 as it is the new LTS version of asterisk. 13 will be going away at some point and I needed to patch anyways (security and such) I did have this working at one point on 13 just wanted to tinker and get it up on 18.


(R. Stindl) #16

Support for your Cisco ends in two months…there is a good chance that you wont see any sip-firmware-updates in the future…Asterisk 18 is new and still in development…


(Jared Busch) #17

That is not how things work


(Simon Telephonics) #18

That usecallmanager patch is old cruft that should be avoided. The xml reference is handy though.


(Lorne Gaetz) #19

Not sure what this is intended to mean. If by ‘in development’ you mean supported, then yes it’s in development. After that it will be end of life. 18 is newer than 16 (which is also supported), but that fact alone does not make it new.


#20

Heh, fair enough. Whats the new method?


#21

Also Cisco support for that doesn’t matter in this case as I am not using CUCM nor does that phone have an active support contract. I got the 9951 as an introduction to how VOIP works. ( I am a network engineer by trade ) and decided hey its cisco their stuff is great in the networking side and they tend to stick to RFC’s fairly closely. Then I learned that SIP really is a bastard protocol and that FreePBX and cisco do not go together very well LOL.


(R. Stindl) #22

you are right…what I meant is that in the past you were better off with an older version of Asterisk…the newest version always needed some time to mature :wink:
But things might have changed since…


#23

When it comes to software I tend to stick to the LTS branches. (Long term support) These tend to be the most stable and rigorously tested versions that will have support for a very lengthy period of time. For example Ubuntu has LTS versions.


(R. Stindl) #24

Asterisk 13 still gets security fixes and I dont need new features, except for music on hold in HD…it is a painful experience to listen to music, which gets destroyed by codec translations during a call.
I would switch to a newer Asterisk version, if MOH would sound like a real 16bit 16000Hz audio, but it doesnt (on external lines)…and I am not sure if it really is a problem of the telephone service providers, because they support g722 and other HD-codecs.


(Ted Mittelstaedt) #25

The Cisco 9951 is probably the worst Cisco phone to use with Asterisk even worse than the 7940s of which I have 6 of - and the only reason I even spent time screwing with them is because I got all of them free and the lure of free stuff is–well you know, free is a very good price! But as bad as the SIP implementation is for the 7940 Cisco found a way to make it worse on the 99xx series.

Have you seen this:
http://labs.wrprojects.com/configuring-a-cisco-9951-phone-for-asterisk/
As it contains instructions on configuring the 9951 with FreePBX

The reason Cisco phones are dirt cheap on fleabay is because Cisco is the darling of large corporations and large corps sometimes like to do forklift replacement projects. Since Cisco is giving the boot to the 9951 model in a few months by the end of the year Ebay is going to be flooded with those phones.

If you are thinking of going into VoIP business it’s worth it to learn Cisco product’s peculiarities but in my opinion Cisco has become ruined over the last 20 years, they have headed down the embrace-and-extend path for a long time now. I rarely specify them for new customers of mine anymore. 20 years ago though I was installing Cisco routers for every customer. Those were the days. Sigh.

Get yourself some used Polycom phones they are very cheap since Polycom sold dump trucks full of them to Ring Central who handed them out like candy, and as subscribers dumped Ring Central years later they dumped these phones - and unlike many phones out there Polycom provided a way to allow someone with physical control of the phone to be able to unlock it and use it with off-the-shelf Polycom firmware. The only thing that is annoying with them is that they default to using FTP for pulling a config after a factory reset on startup instead of TFTP. You can pick up a Soundpoint IP 335 for around $13 off Ebay for example and that’s an excellent little solid phone and easy-peasy to configure.


(R. Stindl) #26

I never understood, why people spend $1000 on a cell phone, but refuse to pay $200 for a desktop phone.
The Digium/Sangoma D65s are excellent phones and you have two options of using them with freePBX, the EPM or the Digium-phones-config-module…actually there is a third option…the advanced DPMA configuration with xml files…

The Digium/Sangoma D80 is even better…but it is missing an important feature, which is a remote restart option. Currently the German translations in the GUI of the phone are also very bad…