Existe algum problema em saber como estou iniciando o Asterisk em 17.10 artful:
thufir@dur:~$
thufir@dur:~$ script asterisk
Script started, file is asterisk
thufir@dur:~$
thufir@dur:~$
thufir@dur:~$ asterisk -rvvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
thufir@dur:~$
thufir@dur:~$ asterisk -rvvvc
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
thufir@dur:~$
thufir@dur:~$
thufir@dur:~$ asterisk -vvvc
Unable to open pid file '/var/run/asterisk/asterisk.pid': Permission denied
Asterisk 13.17.2~dfsg-1ubuntu1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
[ Initializing Custom Configuration Options ]
== Parsing '/etc/asterisk/extconfig.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/asterisk.conf': Not found (Permission denied)
== Manager registered action DBGet
== Manager registered action DBPut
== Manager registered action DBDel
== Manager registered action DBDelTree
PBX UUID: 3f843f55-7665-4763-a2b8-f8810a1ebcdb
== Registered 'audio' codec 'amr' at sample rate '8000' with id '1'
== Created cached format with name 'amr'
== Registered 'audio' codec 'amrwb' at sample rate '16000' with id '2'
== Created cached format with name 'amrwb'
== Registered 'audio' codec 'g723' at sample rate '8000' with id '3'
== Created cached format with name 'g723'
== Registered 'audio' codec 'ulaw' at sample rate '8000' with id '4'
== Created cached format with name 'ulaw'
== Registered 'audio' codec 'alaw' at sample rate '8000' with id '5'
== Created cached format with name 'alaw'
== Registered 'audio' codec 'gsm' at sample rate '8000' with id '6'
== Created cached format with name 'gsm'
== Registered 'audio' codec 'g726' at sample rate '8000' with id '7'
== Created cached format with name 'g726'
== Registered 'audio' codec 'g726aal2' at sample rate '8000' with id '8'
== Created cached format with name 'g726aal2'
== Registered 'audio' codec 'adpcm' at sample rate '8000' with id '9'
== Created cached format with name 'adpcm'
== Registered 'audio' codec 'slin' at sample rate '8000' with id '10'
== Created cached format with name 'slin'
== Registered 'audio' codec 'slin' at sample rate '12000' with id '11'
== Created cached format with name 'slin12'
== Registered 'audio' codec 'slin' at sample rate '16000' with id '12'
== Created cached format with name 'slin16'
== Registered 'audio' codec 'slin' at sample rate '24000' with id '13'
== Created cached format with name 'slin24'
== Registered 'audio' codec 'slin' at sample rate '32000' with id '14'
== Created cached format with name 'slin32'
== Registered 'audio' codec 'slin' at sample rate '44100' with id '15'
== Created cached format with name 'slin44'
== Registered 'audio' codec 'slin' at sample rate '48000' with id '16'
== Created cached format with name 'slin48'
== Registered 'audio' codec 'slin' at sample rate '96000' with id '17'
== Created cached format with name 'slin96'
== Registered 'audio' codec 'slin' at sample rate '192000' with id '18'
== Created cached format with name 'slin192'
== Registered 'audio' codec 'lpc10' at sample rate '8000' with id '19'
== Created cached format with name 'lpc10'
== Registered 'audio' codec 'g729' at sample rate '8000' with id '20'
== Created cached format with name 'g729'
== Registered 'audio' codec 'speex' at sample rate '8000' with id '21'
== Created cached format with name 'speex'
== Registered 'audio' codec 'speex' at sample rate '16000' with id '22'
== Created cached format with name 'speex16'
== Registered 'audio' codec 'speex' at sample rate '32000' with id '23'
== Created cached format with name 'speex32'
== Registered 'audio' codec 'ilbc' at sample rate '8000' with id '24'
== Created cached format with name 'ilbc'
== Registered 'audio' codec 'g722' at sample rate '16000' with id '25'
== Created cached format with name 'g722'
== Registered 'audio' codec 'siren7' at sample rate '16000' with id '26'
== Created cached format with name 'siren7'
== Registered 'audio' codec 'siren14' at sample rate '32000' with id '27'
== Created cached format with name 'siren14'
== Registered 'audio' codec 'testlaw' at sample rate '8000' with id '28'
== Created cached format with name 'testlaw'
== Registered 'audio' codec 'g719' at sample rate '48000' with id '29'
== Created cached format with name 'g719'
== Registered 'audio' codec 'opus' at sample rate '48000' with id '30'
== Created cached format with name 'opus'
== Registered 'image' codec 'jpeg' at sample rate '0' with id '31'
== Created cached format with name 'jpeg'
== Registered 'image' codec 'png' at sample rate '0' with id '32'
== Created cached format with name 'png'
== Registered 'video' codec 'h261' at sample rate '1000' with id '33'
== Created cached format with name 'h261'
== Registered 'video' codec 'h263' at sample rate '1000' with id '34'
== Created cached format with name 'h263'
== Registered 'video' codec 'h263p' at sample rate '1000' with id '35'
== Created cached format with name 'h263p'
== Registered 'video' codec 'h264' at sample rate '1000' with id '36'
== Created cached format with name 'h264'
== Registered 'video' codec 'mpeg4' at sample rate '1000' with id '37'
== Created cached format with name 'mpeg4'
== Registered 'video' codec 'vp8' at sample rate '1000' with id '38'
== Created cached format with name 'vp8'
== Registered 'text' codec 'red' at sample rate '0' with id '39'
== Created cached format with name 'red'
== Registered 'text' codec 't140' at sample rate '0' with id '40'
== Created cached format with name 't140'
== Registered 'audio' codec 'none' at sample rate '8000' with id '41'
== Created cached format with name 'none'
== Registered 'audio' codec 'silk' at sample rate '8000' with id '42'
== Created cached format with name 'silk8'
== Registered 'audio' codec 'silk' at sample rate '12000' with id '43'
== Created cached format with name 'silk12'
== Registered 'audio' codec 'silk' at sample rate '16000' with id '44'
== Created cached format with name 'silk16'
== Registered 'audio' codec 'silk' at sample rate '24000' with id '45'
== Created cached format with name 'silk24'
== Sorcery registered wizard 'bucket'
== Sorcery registered wizard 'bucket_file'
== Parsing '/etc/asterisk/sorcery.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/stasis.conf': Not found (Permission denied)
Unable to load config file 'stasis.conf'
Could not load Stasis configuration; using defaults
Unable to bind socket to /var/run/asterisk/asterisk.ctl: Address already in use
== Parsing '/etc/asterisk/logger.conf': Not found (Permission denied)
[Nov 13 11:49:51] ERROR[4857]: logger.c:1720 init_logger: Errors detected in logger.conf. Default console logging is being used.
== Parsing '/etc/asterisk/pjproject.conf': Not found (Permission denied)
== Message handler 'dialplan' registered.
== Registered custom function 'MESSAGE'
== Registered custom function 'MESSAGE_DATA'
== Registered application 'MessageSend'
== Manager registered action MessageSend
== Manager registered action DataGet
== Registered channel type 'Surrogate' (Surrogate channel used to pull channel from an application)
== Parsing '/etc/asterisk/codecs.conf': Not found (Permission denied)
== Manager registered action BridgeTechnologyList
== Manager registered action BridgeTechnologySuspend
== Manager registered action BridgeTechnologyUnsuspend
Asterisk Dynamic Loader Starting:
== Parsing '/etc/asterisk/modules.conf': Not found (Permission denied)
[Nov 13 11:49:51] WARNING[4857]: loader.c:1299 load_modules: No 'modules.conf' found, no modules will be loaded.
== Parsing '/etc/asterisk/features.conf': Not found (Permission denied)
[Nov 13 11:49:51] ERROR[4857]: config_options.c:655 aco_process_config: Unable to load config file 'features.conf'
[Nov 13 11:49:51] NOTICE[4857]: features_config.c:1857 load_config: Could not load features config; using defaults
== Registered custom function 'FEATURE'
== Registered custom function 'FEATUREMAP'
== Registered application 'Bridge'
== Manager registered action Bridge
== Parsing '/etc/asterisk/dnsmgr.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/acl.conf': Not found (Permission denied)
[Nov 13 11:49:51] ERROR[4857]: config_options.c:655 aco_process_config: Unable to load config file 'acl.conf'
== Parsing '/etc/asterisk/http.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/indications.conf': Not found (Permission denied)
[Nov 13 11:49:51] WARNING[4857]: indications.c:1065 load_indications: Can't find indications config file indications.conf.
== Parsing '/etc/asterisk/cdr.conf': Not found (Permission denied)
[Nov 13 11:49:51] ERROR[4857]: config_options.c:655 aco_process_config: Unable to load config file 'cdr.conf'
[Nov 13 11:49:51] NOTICE[4857]: cdr.c:4077 process_config: Failed to process CDR configuration; using defaults
[Nov 13 11:49:51] NOTICE[4857]: cdr.c:4180 cdr_toggle_runtime_options: CDR simple logging enabled.
== Parsing '/etc/asterisk/dsp.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/udptl.conf': Not found (Permission denied)
[Nov 13 11:49:51] ERROR[4857]: config_options.c:655 aco_process_config: Unable to load config file 'udptl.conf'
[Nov 13 11:49:51] NOTICE[4857]: udptl.c:1324 __ast_udptl_reload: Could not load udptl config; using defaults
Asterisk PBX Core Initializing
== Registering builtin functions:
== Registered custom function 'EXCEPTION'
== Registered custom function 'TESTTIME'
== Manager registered action ShowDialPlan
== Manager registered action ExtensionStateList
== Registered application 'Answer'
== Registered application 'BackGround'
== Registered application 'Busy'
== Registered application 'Congestion'
== Registered application 'ExecIfTime'
== Registered application 'Goto'
== Registered application 'GotoIf'
== Registered application 'GotoIfTime'
== Registered application 'ImportVar'
== Registered application 'Hangup'
== Registered application 'Incomplete'
== Registered application 'NoOp'
== Registered application 'Proceeding'
== Registered application 'Progress'
== Registered application 'RaiseException'
== Registered application 'Ringing'
== Registered application 'SayAlpha'
== Registered application 'SayAlphaCase'
== Registered application 'SayDigits'
== Registered application 'SayNumber'
== Registered application 'SayPhonetic'
== Registered application 'SetAMAFlags'
== Registered application 'Wait'
== Registered application 'WaitExten'
== Registered application 'Set'
== Registered application 'MSet'
== Registered channel type 'Local' (Local Proxy Channel Driver)
== Manager registered action LocalOptimizeAway
== Parsing '/etc/asterisk/cel.conf': Not found (Permission denied)
[Nov 13 11:49:51] ERROR[4857]: config_options.c:655 aco_process_config: Unable to load config file 'cel.conf'
[Nov 13 11:49:51] NOTICE[4857]: cel.c:1776 ast_cel_engine_init: Failed to process CEL configuration; using defaults
== Manager registered action Ping
== Manager registered action Events
== Manager registered action Logoff
== Manager registered action Login
== Manager registered action Challenge
== Manager registered action Hangup
== Manager registered action Status
== Manager registered action Setvar
== Manager registered action Getvar
== Manager registered action GetConfig
== Manager registered action GetConfigJSON
== Manager registered action UpdateConfig
== Manager registered action CreateConfig
== Manager registered action ListCategories
== Manager registered action Redirect
== Manager registered action Atxfer
== Manager registered action Originate
== Manager registered action Command
== Manager registered action ExtensionState
== Manager registered action PresenceState
== Manager registered action AbsoluteTimeout
== Manager registered action MailboxStatus
== Manager registered action MailboxCount
== Manager registered action ListCommands
== Manager registered action SendText
== Manager registered action UserEvent
== Manager registered action WaitEvent
== Manager registered action CoreSettings
== Manager registered action CoreStatus
== Manager registered action Reload
== Manager registered action LoggerRotate
== Manager registered action CoreShowChannels
== Manager registered action ModuleLoad
== Manager registered action ModuleCheck
== Manager registered action AOCMessage
== Manager registered action Filter
== Manager registered action BlindTransfer
== Registered custom function 'AMI_CLIENT'
== Parsing '/etc/asterisk/manager.conf': Not found (Permission denied)
[Nov 13 11:49:51] NOTICE[4857]: manager.c:8942 __init_manager: Unable to open AMI configuration manager.conf, or configuration is invalid.
== Parsing '/etc/asterisk/enum.conf': Not found (Permission denied)
== Registered application 'CallCompletionRequest'
== Registered application 'CallCompletionCancel'
== Parsing '/etc/asterisk/ccss.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/ccss.conf': Not found (Permission denied)
Asterisk Dynamic Loader Starting:
== Parsing '/etc/asterisk/modules.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/cli_permissions.conf': Not found (Permission denied)
== Parsing '/etc/asterisk/cli.conf': Not found (Permission denied)
Asterisk Ready.
*CLI> sip show peers
No such command 'sip show peers' (type 'core show help sip show' for other possible commands)
*CLI>
*CLI> sip peers show
No such command 'sip peers show' (type 'core show help sip peers' for other possible commands)
*CLI> sip show peers;
No such command 'sip show peers;' (type 'core show help sip show' for other possible commands)
*CLI>
*CLI> help
No such command 'help' (type 'core show help help' for other possible commands)
*CLI>
*CLI> quit
No such command 'quit' (type 'core show help quit' for other possible commands)
*CLI> Asterisk cleanly ending (0).
Executing last minute cleanups
== Manager unregistered action DBGet
== Manager unregistered action DBPut
== Manager unregistered action DBDel
== Manager unregistered action DBDelTree
thufir@dur:~$
thufir@dur:~$ exit
exit
Script done, file is asterisk
thufir@dur:~$
thufir@dur:~$
depois de fazer isso, então consigo realmente abrir o console normalmente:
thufir@dur:~$
thufir@dur:~$ sudo asterisk -rvvv
Asterisk 13.17.2~dfsg-1ubuntu1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.17.2~dfsg-1ubuntu1 currently running on dur (pid = 1189)
dur*CLI>
dur*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
dur*CLI>
dur*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups
thufir@dur:~$
Antes de responder que isso é porque eu não usei sudo
desde o início, tentei isso ontem e recebi mensagens de erro semelhantes com sudo asterisk -rvvv
, para minha lembrança, mesmo quando usar sudo
.
O Pardon não recriou o exemplo na sequência correta para demonstrar isso.
veja também: