Can't Make or Receive Calls

Dears all,

I already installed the asterisk server on Ubuntu 20.04 successfully.

  1. Ubuntu 20.04 LTS
    Firewall: stopped

  2. 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)

  3. 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

[1001]
type=friend
host=dynamic
secret=1234
context=default

[1002]
type=friend
host=dynamic
secret=5678
context=default

extensions.conf
[default]
exten => 1001,1,Dial(SIP/1001,10)
exten => 1002,1,Dial(SIP/1002,10)

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)
asterisk
CLI> sip show help
No such command ‘sip show help’ (type ‘core show help sip show’ for other possible commands)
asterisk*CLI>

Can you check and help me this case

chan_sip failed to load. Typical reasons:

  1. it wasn’t built;
  2. it wasn’t loaded;
  3. there is an error in configuration.

For (1) check your modules directory.

For (2) check modules.conf.

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.

1 Like

For (1) check your modules directory.

ls /usr/lib/asterisk/modules/
app_adsiprog.so codec_a_mu.so res_config_ldap.so
app_agent_pool.so codec_dahdi.so res_config_odbc.so
app_alarmreceiver.so codec_g722.so res_config_pgsql.so
app_amd.so codec_g726.so res_config_sqlite3.so
app_authenticate.so codec_gsm.so res_convert.so
app_bridgeaddchan.so codec_lpc10.so res_crypto.so
app_bridgewait.so codec_resample.so res_curl.so
app_cdr.so codec_speex.so res_fax.so
app_celgenuserevent.so codec_ulaw.so res_fax_spandsp.so
app_chanisavail.so format_g719.so res_format_attr_amr.so
app_channelredirect.so format_g723.so res_format_attr_celt.so
app_chanspy.so format_g726.so res_format_attr_g729.so
app_confbridge.so format_g729.so res_format_attr_h263.so
app_controlplayback.so format_gsm.so res_format_attr_h264.so
app_dahdiras.so format_h263.so res_format_attr_ilbc.so
app_db.so format_h264.so res_format_attr_opus.so
app_dial.so format_ilbc.so res_format_attr_silk.so
app_dictate.so format_ogg_speex.so res_format_attr_siren14.so
app_directed_pickup.so format_ogg_vorbis.so res_format_attr_siren7.so
app_directory.so format_pcm.so res_format_attr_vp8.so
app_disa.so format_siren14.so res_hep_pjsip.so
app_dumpchan.so format_siren7.so res_hep_rtcp.so
app_echo.so format_sln.so res_hep.so
app_exec.so format_vox.so res_http_media_cache.so
app_externalivr.so format_wav_gsm.so res_http_post.so
app_festival.so format_wav.so res_http_websocket.so
app_flash.so func_aes.so res_limit.so
app_followme.so func_base64.so res_manager_devicestate.so
app_forkcdr.so func_blacklist.so res_manager_presencestate.so
app_getcpeid.so func_callcompletion.so res_monitor.so
app_ices.so func_callerid.so res_musiconhold.so
app_image.so func_cdr.so res_mutestream.so
app_jack.so func_channel.so res_odbc.so
app_macro.so func_config.so res_odbc_transaction.so
app_milliwatt.so func_curl.so res_parking.so
app_minivm.so func_cut.so res_phoneprov.so
app_mixmonitor.so func_db.so res_pjproject.so
app_morsecode.so func_devstate.so res_pjsip_acl.so
app_mp3.so func_dialgroup.so res_pjsip_authenticator_digest.so
app_nbscat.so func_dialplan.so res_pjsip_caller_id.so
app_originate.so func_enum.so res_pjsip_config_wizard.so
app_page.so func_env.so res_pjsip_dialog_info_body_generator.so
app_playback.so func_extstate.so res_pjsip_diversion.so
app_playtones.so func_frame_trace.so res_pjsip_dlg_options.so
app_privacy.so func_global.so res_pjsip_dtmf_info.so
app_queue.so func_groupcount.so res_pjsip_empty_info.so
app_readexten.so func_hangupcause.so res_pjsip_endpoint_identifier_anonymous.so
app_read.so func_holdintercept.so res_pjsip_endpoint_identifier_ip.so
app_record.so func_iconv.so res_pjsip_endpoint_identifier_user.so
app_sayunixtime.so func_jitterbuffer.so res_pjsip_exten_state.so
app_senddtmf.so func_lock.so res_pjsip_header_funcs.so
app_sendtext.so func_logic.so res_pjsip_history.so
app_sms.so func_math.so res_pjsip_logger.so
app_softhangup.so func_md5.so res_pjsip_messaging.so
app_speech_utils.so func_module.so res_pjsip_mwi_body_generator.so
app_stack.so func_odbc.so res_pjsip_mwi.so
app_stasis.so func_periodic_hook.so res_pjsip_nat.so
app_stream_echo.so func_pitchshift.so res_pjsip_notify.so
app_system.so func_pjsip_aor.so res_pjsip_one_touch_record_info.so
app_talkdetect.so func_pjsip_contact.so res_pjsip_outbound_authenticator_digest.so
app_test.so func_pjsip_endpoint.so res_pjsip_outbound_publish.so
app_transfer.so func_presencestate.so res_pjsip_outbound_registration.so
app_url.so func_rand.so res_pjsip_path.so
app_userevent.so func_realtime.so res_pjsip_phoneprov_provider.so
app_verbose.so func_sha1.so res_pjsip_pidf_body_generator.so
app_voicemail.so func_shell.so res_pjsip_pidf_digium_body_supplement.so
app_waitforring.so func_sorcery.so res_pjsip_pidf_eyebeam_body_supplement.so
app_waitforsilence.so func_speex.so res_pjsip_publish_asterisk.so
app_waituntil.so func_sprintf.so res_pjsip_pubsub.so
app_while.so func_srv.so res_pjsip_refer.so
app_zapateller.so func_strings.so res_pjsip_registrar.so
bridge_builtin_features.so func_sysinfo.so res_pjsip_rfc3326.so
bridge_builtin_interval_features.so func_talkdetect.so res_pjsip_sdp_rtp.so
bridge_holding.so func_timeout.so res_pjsip_send_to_voicemail.so
bridge_native_rtp.so func_uri.so res_pjsip_session.so
bridge_simple.so func_version.so res_pjsip_sips_contact.so
bridge_softmix.so func_vmcount.so res_pjsip.so
cdr_adaptive_odbc.so func_volume.so res_pjsip_t38.so
cdr_csv.so pbx_ael.so res_pjsip_transport_websocket.so
cdr_custom.so pbx_config.so res_pjsip_xpidf_body_generator.so
cdr_manager.so pbx_dundi.so res_realtime.so
cdr_odbc.so pbx_loopback.so res_resolver_unbound.so
cdr_pgsql.so pbx_lua.so res_rtp_asterisk.so
cdr_radius.so pbx_realtime.so res_rtp_multicast.so
cdr_sqlite3_custom.so pbx_spool.so res_security_log.so
cdr_tds.so res_adsi.so res_smdi.so
cel_custom.so res_ael_share.so res_snmp.so
cel_manager.so res_agi.so res_sorcery_astdb.so
cel_odbc.so res_ari_applications.so res_sorcery_config.so
cel_pgsql.so res_ari_asterisk.so res_sorcery_memory_cache.so
cel_radius.so res_ari_bridges.so res_sorcery_memory.so
cel_sqlite3_custom.so res_ari_channels.so res_sorcery_realtime.so
cel_tds.so res_ari_device_states.so res_speech.so
chan_alsa.so res_ari_endpoints.so res_srtp.so
chan_bridge_media.so res_ari_events.so res_stasis_answer.so
chan_console.so res_ari_model.so res_stasis_device_state.so
chan_dahdi.so res_ari_playbacks.so res_stasis_playback.so
chan_iax2.so res_ari_recordings.so res_stasis_recording.so
chan_mgcp.so res_ari.so res_stasis_snoop.so
chan_motif.so res_ari_sounds.so res_stasis.so
chan_oss.so res_calendar_caldav.so res_stasis_test.so
chan_pjsip.so res_calendar_ews.so res_statsd.so
chan_rtp.so res_calendar_exchange.so res_stun_monitor.so
chan_sip.so res_calendar_icalendar.so res_timing_dahdi.so
chan_skinny.so res_calendar.so res_timing_pthread.so
chan_unistim.so res_clialiases.so res_timing_timerfd.so
codec_adpcm.so res_clioriginate.so res_xmpp.so
codec_alaw.so res_config_curl.so

2. For (2) check modules.conf.
; Asterisk configuration file
;
; Module Loader configuration file
;

[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]

Please check it

Looks like (3), then.

You can also try manually loading, from the CLI.

That’s not what the message tells you to do, but as sip show peers is valid, I don’t think it will help.

This is message after I trye manually loading the chan_sip.so.

asteriskCLI> module load chan_sip.so
Unable to load module chan_sip.so
Command ‘module load chan_sip.so’ failed.
SIP channel loading…
[Apr 29 13:19:18] NOTICE[68514]: chan_sip.c:32441 reload_config: Unable to load config sip.conf
[Apr 29 13:19:18] ERROR[68514]: message.c:1540 ast_msg_tech_unregister: No ‘sip’ message technology found.
asterisk
CLI>

Please help me.

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.

Thank you so much for your advise.

My issue resolved and it’s working well.

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.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.