I already installed the asterisk server on Ubuntu 20.04 successfully.
Ubuntu 20.04 LTS
Firewall: stopped
Asterisk status:
Version: Asterisk 16.2.1~dfsg-2ubuntu1, Copyright (C) 1999 - 2018, Digium, Inc. and others.
sudo systemctl status asterisk.service
● asterisk.service - Asterisk PBX
Loaded: loaded (/lib/systemd/system/asterisk.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-04-28 15:08:15 +07; 46min ago
Docs: man:asterisk(8)
Configuration
After then, I config the users as follows
sip.conf
[general]
context=default
allowguest=no ; Allow or reject guest calls (default is yes)
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=192.168.7.3 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=192.168.7.3 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=udp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
allow=all
allow=ulaw
allow=alaw
allow=ilbc
dtmfmode=rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
But I can not make the calls between the two user
Also, I can not find these cli as follows:
asteriskCLI> sip show peers
No such command ‘sip show peers’ (type ‘core show help sip show’ for other possible commands)
asteriskCLI> sip show help
No such command ‘sip show help’ (type ‘core show help sip show’ for other possible commands)
asterisk*CLI>
For (3) check the log files from when the load was attempted.
Note that chan_sip is deprecated, and isn’t included in the default build for the latest version of Asterisk, and Asterisk 16.2 is about three years old. Although it is unlikely that bugs in chan_sip will ever be fixed, you would need to be using Asterisk16.17.0, or (a later major version) before a bug report would even be considered.
Unless 1001 and 1002 share the same IP address, it is better to make them type=peer. However that has nothing to do with the module not loading.
[modules]
autoload=yes
;
; Any modules that need to be loaded before the Asterisk core has been
; initialized (just after the logger has been initialized) can be loaded
; using ‘preload’. This will frequently be needed if you wish to map all
; module configuration files into Realtime storage, since the Realtime
; driver will need to be loaded before the modules using those configuration
; files are initialized.
;
; An example of loading ODBC support would be:
;preload => res_odbc.so
;preload => res_config_odbc.so
;
; If you want, load the GTK console right away.
; Don’t load the KDE console since
; it’s not as sophisticated right now.
;
noload => pbx_gtkconsole.so
;load => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
;
; Intercom application is obsoleted by
; chan_oss. Don’t load it.
;
noload => app_intercom.so
;
; The ‘modem’ channel driver and its subdrivers are
; obsolete, don’t load them.
;
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
;
; Comment this out (after installing CAPI middleware and hardware
; drivers) if you have CAPI-able hardware and wish to use it in
; Asterisk.
;
noload => chan_capi.so
;
load => res_musiconhold.so
;
; Do not load load local channel drivers (using the system speaker) by default,
; they are not used in most installations and might block the sound hardware
;
noload => chan_alsa.so
noload => chan_console.so
noload => chan_oss.so
;
; Disable CDR logging to SQLite by default since it writes unconditionally to
; cdr.db without a way to rotate it.
;
noload => cdr_sqlite.so
;
; These conflict with app_directory.so and each other.
noload => app_directory_odbc.so
;
; Enable these if you want to configure Asterisk in a database
;
noload => res_config_odbc.so
noload => res_config_pgsql.so
;
; Module names listed in “global” section will have symbols globally
; exported to modules loaded after them.
;
[global]
It can’t read sip.conf. Check that it is in the right place and has execute permissions for the user running Asterisk on all directories, and read permission on the file itself.
Please note that you shouldn’t be using chan_sip as it has been deprecated, in favour of chan_pjsip.
Please note that you shouldn’t be using chan_sip as it has been deprecated, in favour of chan_pjsip.
===> I noted it. I will check and find out how to use and configure it.
Do you have any document for this.