I have already asterisk in my system then I have install freepbx.
Now I got following when try to start asterisk using -gc.
[May 26 01:10:09] NOTICE[31812]: loader.c:1170 load_modules: 2 modules will be loaded.
..[May 26 01:10:09] NOTICE[31812]: cdr.c:1607 do_reload: CDR simple logging enabled.
[May 26 01:10:09] NOTICE[31812]: loader.c:1170 load_modules: 198 modules will be loaded.
.[May 26 01:10:09] NOTICE[31812]: res_smdi.c:1418 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.
...........[May 26 01:10:09] NOTICE[31812]: config.c:2338 ast_config_engine_register: Registered Config Engine sqlite3
.[May 26 01:10:09] NOTICE[31812]: config.c:2338 ast_config_engine_register: Registered Config Engine curl
[May 26 01:10:09] WARNING[31812]: res_config_mysql.c:1487 load_mysql_config: MySQL RealTime: No database host found, using localhost via socket.
[May 26 01:10:09] WARNING[31812]: res_config_mysql.c:1499 load_mysql_config: MySQL RealTime: No database port found, using 3306 as default.
.[May 26 01:10:09] WARNING[31812]: res_config_mysql.c:1528 load_mysql_config: MySQL realtime: no requirements setting found, using 'warn' as default.
[May 26 01:10:09] NOTICE[31812]: config.c:2338 ast_config_engine_register: Registered Config Engine mysql
asterisk: src/hostapi/alsa/pa_linux_alsa.c:863: BuildDeviceList: Assertion `devIdx < numDeviceNames' failed.
........Aborted (core dumped)
When using asterisk -vr I got following error.
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
When using asterisk -vvvvc I got following error.
Asterisk Dynamic Loader Starting:
[May 26 02:10:56] NOTICE[23425]: loader.c:1170 load_modules: 2 modules will be loaded.
chan_local.so => (Local Proxy Channel (Note: used internally by other modules))
pbx_config.so => (Text Extension Configuration)
[May 26 02:10:56] NOTICE[23425]: cdr.c:1607 do_reload: CDR simple logging enabled.
Asterisk PBX Core Initializing
Registering builtin applications:
[Answer]
[BackGround]
[Busy]
[Congestion]
[ExecIfTime]
[Goto]
[GotoIf]
[GotoIfTime]
[ImportVar]
[Hangup]
[Incomplete]
[NoOp]
[Proceeding]
[Progress]
[RaiseException]
[ResetCDR]
[Ringing]
[SayAlpha]
[SayDigits]
[SayNumber]
[SayPhonetic]
[Set]
[MSet]
[SetAMAFlags]
[Wait]
[WaitExten]
Asterisk Dynamic Loader Starting:
[May 26 02:10:56] NOTICE[23425]: loader.c:1170 load_modules: 198 modules will be loaded.
res_monitor.so => (Call Monitoring Resource)
[May 26 02:10:56] NOTICE[23425]: res_smdi.c:1418 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.
res_http_websocket.so => (HTTP WebSocket Support)
res_crypto.so => (Cryptographic Digital Signatures)
res_stun_monitor.so => (STUN Network Monitor)
res_agi.so => (Asterisk Gateway Interface (AGI))
res_speech.so => (Generic Speech Recognition API)
res_fax.so => (Generic FAX Applications)
res_calendar.so => (Asterisk Calendar integration)
res_ael_share.so => (share-able code for AEL)
res_curl.so => (cURL Resource Module)
func_curl.so => (Load external URL)
[May 26 02:10:56] NOTICE[23425]: config.c:2338 ast_config_engine_register: Registered Config Engine sqlite3
res_config_sqlite3.so => (SQLite 3 realtime config engine)
[May 26 02:10:56] NOTICE[23425]: config.c:2338 ast_config_engine_register: Registered Config Engine curl
res_config_curl loaded.
res_config_curl.so => (Realtime Curl configuration)
[May 26 02:10:56] WARNING[23425]: res_config_mysql.c:1487 load_mysql_config: MySQL RealTime: No database host found, using localhost via socket.
[May 26 02:10:56] WARNING[23425]: res_config_mysql.c:1499 load_mysql_config: MySQL RealTime: No database port found, using 3306 as default.
[May 26 02:10:56] WARNING[23425]: res_config_mysql.c:1528 load_mysql_config: MySQL realtime: no requirements setting found, using 'warn' as default.
[May 26 02:10:56] NOTICE[23425]: config.c:2338 ast_config_engine_register: Registered Config Engine mysql
res_config_mysql.so => (MySQL RealTime Configuration Driver)
res_timing_pthread.so => (pthread Timing Interface)
res_timing_timerfd.so => (Timerfd Timing Interface)
res_format_attr_silk.so => (SILK Format Attribute Module)
res_format_attr_celt.so => (CELT Format Attribute Module)
res_musiconhold.so => (Music On Hold Resource)
res_rtp_asterisk.so => (Asterisk RTP Stack)
res_rtp_multicast.so => (Multicast RTP Engine)
chan_bridge.so => (Bridge Interaction Channel)
asterisk: src/hostapi/alsa/pa_linux_alsa.c:863: BuildDeviceList: Assertion `devIdx < numDeviceNames' failed.
Aborted
When I start asterisk service at that time asterisk shutdown is failed.
Can any one help me to fix this issue?
Any help/suggestion would be appreciable.
Also please check your ip tables is stop or not.
Try disable selinux or change to permissed mode.
Check owner of ctl file and compare with user in /etc/asterisk/asterisk.conf
The logs / CLI you posted clearly show that it is core-dumping on trying to load the ALSA module. That's likely a problem with the sound-card driver. In the short term, you can just delete that offending module and see if Asterisk will properly load without it.
Further Reading
Why are core dump files generated?
Please Note:
If this answer helped you solve your problem, please 'accept' it so that others with the same issue can find the solution more easily.
Related
We just installed Rancher Desktop 1.4.1 (nerdctl v 0.20.0) on Windows 10 and we seem to have a problem pulling images and logging into a registry:
nerdctl pull alpine
docker.io/library/alpine:latest: resolving |--------------------------------------|
elapsed: 9.9 s total: 0.0 B (0.0 B/s)
INFO[0010] trying next host error="failed to do request: Head \"https://registry-1.docker.io/v2/library/alpine/manifests/latest\": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:47744->192.168.167.172:53: i/o timeout" host=registry-1.docker.io
FATA[0010] failed to resolve reference "docker.io/library/alpine:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/alpine/manifests/latest": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:47744->192.168.167.172:53: i/o timeout
Trying to login results in similar errors:
nerdctl --debug-full login registry-1.docker.io
/usr/local/bin/docker-credential-rancher-desktop: source: line 5: can't open '/etc/rancher/desktop/credfwd': No such file or directory
Enter Username: myusername
Enter Password:
DEBU[0030] Ignoring hosts dir "/etc/containerd/certs.d" error="stat /etc/containerd/certs.d: no such file or directory"
DEBU[0030] Ignoring hosts dir "/etc/docker/certs.d" error="stat /etc/docker/certs.d: no such file or directory"
DEBU[0030] len(regHosts)=1
ERRO[0040] failed to call tryLoginWithRegHost error="failed to call rh.Client.Do: Get \"https://registry-1.docker.io/v2/\": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:36590->192.168.167.172:53: i/o timeout" i=0
FATA[0040] failed to call rh.Client.Do: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:36590->192.168.167.172:53: i/o timeout
It looks like nerdctl is having problems resolving hostnames. It always times-out after 10 seconds.
Is there a way to explicitly configure hostname resolution in Rancher or nerdctl?
Any help would be appreciated.
here is my Console log of asterisk server
[Feb 15 12:17:49] WARNING[3558][C-00000000]: res_rtp_asterisk.c:2141 dtlsetup: Could not set policies when setting up DTLS-SRTP on '0x7fd64400caa0
[Feb 15 12:17:49] WARNING[3558][C-00000000]: res_rtp_asterisk.c:4465 ast_d: RTP Read error: Unspecified. Hanging up.
Channel SIP/7005-00000000 left 'simple_bridge' basic-bridge <222810-4890-bedf-84d549cea2b0>
== Spawn extension (default, 7008, 1) exited non-zero on 'SIP/7005-0000
-- Channel SIP/7008-00000001 left 'simple_bridge' basic-bridge <222810-4890-bedf-84d549cea2b0>
IS Any changes needed in sip.conf ?
in sip.conf
[7005] ; This will be WebRTC client
type=peer ;
username=7005 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=Z-jj! ; The SIP Password for SIP.js
encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is dialing
directmedia=yes ; Asterisk will relay media for this peer
transport=udp,ws,wss,tcp ; Asterisk will allow this peer to register on UDP or WebSockets
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS
disallow=all
disallow=all
allow=ulaw
allow=alaw
allow=speex
allow=gsm
dtlsverify=fingerprint
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
;nat=force_rport,comedia
force_avp=yes
Read error: Unspecified
Check your firewall and NAT settings.
I'm new at asterisk and following asterisk example:
sip.conf
[general]
transport=udp
[friends_internal](!)
type=friend
host=dynamic
context=from-internal
disallow=all
allow=ulaw
[demo-alice](friends_internal)
secret=verysecretpassword
qualify=yes
; put a strong, unique password here instead
qualify=yes
[demo-bob](friends_internal)
secret=othersecretpassword ; put a strong, unique password here instead
And this is pjsip.conf:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
;Templates for the necessary config sections
[endpoint_internal](!)
type=endpoint
context=from-internal
disallow=all
allow=ulaw
[auth_userpass](!)
type=auth
auth_type=userpass
[aor_dynamic](!)
type=aor
max_contacts=1
;Definitions for our phones, using the templates above
[demo-alice](endpoint_internal)
auth=demo-alice
aors=demo-alice
[demo-alice](auth_userpass)
password=unsecurepassword ; put a strong, unique password here instead
username=demo-alice
[demo-alice](aor_dynamic)
[demo-bob](endpoint_internal)
auth=demo-bob
aors=demo-bob
[demo-bob](auth_userpass)
password=unsecurepassword ; put a strong, unique password here instead
username=demo-bob
[demo-bob](aor_dynamic)
I used Ekiga softphone to login demo-alice account:
ubuntu*CLI>
-- Added contact 'sip:demo-alice#192.168.0.217:5060' to AOR 'demo-alice' with expiration of 3600 seconds
== Contact demo-alice/sip:demo-alice#192.168.0.217:5060 has been created
== Endpoint demo-alice is now Reachable
-- Contact demo-alice/sip:demo-alice#192.168.0.217:5060 is now Unknown. RTT: 0.000 msec
[Oct 25 16:40:10] WARNING[16587]: res_pjsip_pubsub.c:3134 pubsub_on_rx_publish_request: No registered publish handler for event presence
[Oct 25 16:40:10] WARNING[16587]: res_pjsip_pubsub.c:3134 pubsub_on_rx_publish_request: No registered publish handler for event presence
ubuntu*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
demo-alice (Unspecified) D Auto (No) No 0 Unmonitored
demo-bob (Unspecified) D Auto (No) No 0 Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline]
ubuntu*CLI>
Ekiga show I already registered but Asterisk server didn't.
It said: Reached but status is Unknown or Unmonitored with Unspecified IP. Help!!!
I'm using Ubuntu 16.04 and Asterisk 13.11.2 in Ubuntu server 16.04.
You propably want to use chan_sip OR chan_pjsip.
Check modules.conf to prevent one of them from loading...
In your CLI it seems, ekiga is registered on chan_pjsip.
So try "pjsip show endpoints" (-> chan_pjsip) instead of "sip show peers" (-> chan_sip).
I'm working on a PHP probject using Asterisk.I need to store Asterisk CDR in a database .I want to know how could I connect Asterisk to phpmyadmin.I installed Asterisk on centos 6( which is installed on virtual box) and phpmyadmin is installed on another system.
Asterisk support direct mysql cdr log. So no need do anything like that
http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql
You'll need the cdr_mysql module. It's in the addons category.
Configuration is at /etc/asterisk/cdr_mysql.conf:
[global]
dbname = asteriskcdrdb
user = asterisk
password = supersecret
charset = utf8
table = cdr
;timezone = UTC
;compat = no
hostname = 127.0.0.1
port = 3306
To check if the module is loaded:
asterisk*CLI> cdr show status
Call Detail Record (CDR) settings
----------------------------------
Logging: Enabled
Mode: Simple
Log unanswered calls: No
Log congestion: No
* Registered Backends
-------------------
mysql
To check if connection succeeded:
asterisk*CLI> cdr mysql status
Connected to asteriskcdrdb on 127.0.0.1 using table cdr for 8 days, 12 hours, 8 minutes, 38 seconds.
Wrote 0 records since last restart.
I have a continental calling card and I'm not sure how to make it possible to dial out with my asterisk server.
It is a VOIP prepaid card. I can call out on a softphone using their server address and my username and password.
I can't figure out my sip.conf or my dial plan.
Here is what I have.
sip.conf:
[continentalcard]
host=continental.com
defaultuser=username ;; user on continental's server
secret=password
register => username:password#continental.com
context=global
[frank]
type=friend
defaultuser=frank ;; user on my local asterisk server
secret=password
host=dynamic
context=internal
extensions.conf:
[global]
CARD=SIP/continentalcard
[internal]
exten => 100,1,Dial(SIP/frank)
same => n,Hangup()
include => continentalcard
[continentalcard] ;; outgoing
exten => _1NXXNXXXXXX,1,Dial(${CARD}/${EXTEN})
I get the following message on the CLI as I try to dial out 1-222-333-4444 (not the real number):
== Using SIP RTP CoS mark 5
-- Executing [12223334444#internal:1] Dial("SIP/frank-00000151", "SIP/continentalcard:12223334444") in new stack
== Using SIP RTP CoS mark 5
[Oct 3 04:02:57] ERROR[22923]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("continentalcard", "12223334444", ...): Servname not supported for ai_socktype
[Oct 3 04:02:57] WARNING[22923]: chan_sip.c:5866 create_addr: No such host: continentalcard:12223334444
[Oct 3 04:02:57] WARNING[22923]: app_dial.c:2345 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'SIP/frank-00000151' status is 'CHANUNAVAIL'
Update: Filled sip.conf with the global context. Also just noticed your missing a / in extensions.conf. Please look below
You have your sip.conf formatted incorrectly.
[global]
register => username:password#continental.com
context=continentalcard
[continentalcard]
host=continental.com
defaultuser=username
secret=password
context=continentalcard
Registration should be placed under the [global] context in sip.conf.
Context should be continentalcard not global. When the softphone dials 1NXXNXXXXXX it should start using the continentalcard context from extensions and perform the Dial(${CARD}/${EXTEN})