Any way to fully remove ALL Asterisk files and directories?

I was trying to do some tweaks on Asterisk 1.2, and when I rebooted (Debian) I got the following error:

Unable to connect to remote asterisk (does / var/run/asterisk.ctl exist?)

I thought that was odd, as it had been working for some time so I rebooted again. I got the same error after the reboot, so I decided to to an apt-get remove asterisk to uninstall it. I then reinstalled it using apt-get install asterisk however I am still getting the same error message.

Is there a way to completely wipe ALL the Asterisk files (and subdirectories even if they contain files) from my machine? I basically want to do a 100% fresh install and make sure all remnants of the previous install are gone.

I should add that asterisk.ctl DOES exist in the directory, so its very puzzling.

root@LS-GL7D6:/var/run/asterisk# ls
asterisk.ctl asterisk.pid

Any ideas? Should I try and work with this install or go the full 100% uninstall then try to reinstall again?

SORRY FOR THE 3 POSTS AT ONCE!

However, after some reboots it seems to be having a new problem. Below is what the output is when I restart the system and try to run Asterisk in regular and safe mode. I am pulling my hair out so if anyone knows anything please tell me!

root@LS-GL7D6:~# ls
asterisk.ctl
root@LS-GL7D6:~# asterisk -r
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
root@LS-GL7D6:~# safe_asterisk
Cannot find your TTY (9)
root@LS-GL7D6:~#

To remove asterisk, did you do the following? apt-get --purge remove asterisk
or

As I told you before, the debian asterisk package seems very old, you woule be better off downloading the source files and doing a manual install.

Ian.

Hi

WHY, Just fault the installation you have. the error just means for some reason asterisk wont load, You need to find what os wrong.

By starting asterisk from the console with asterisk -vvvvvvvvvvc and seeing what happens and aslo looking at the logs you should be able to fault it.

Just reinstalling is not the way to go…

Ian

[quote=“pmlco”]
As I told you before, the debian asterisk package seems very old, you woule be better off downloading the source files and doing a manual install.

Ian.[/quote]

You are correct that it is old, however after discussing it with you last time I did some research. Due to the fact that I am running a custom linux distro, and due to the fact that my device (its not a PC) has an ARM processor, this is the version I am stuck using. I went to the developer forums for the group that built the distro I am using, and some of their top gurus ‘just’ figured out a way to get a newer linux kernel to load on the device, however it still is kind of 50/50. I have nowhere near the skill level of the linux developers, so I have basically decided I need to work with what is available at the current time. Trust me when I tell you its frustrating being stuck with this!

[quote=“ianplain”]
By starting asterisk from the console with asterisk -vvvvvvvvvvc and seeing what happens and aslo looking at the logs you should be able to fault it.

Ian[/quote]

I will run that command again tonight and post the results. I did notice a few error messages, however they seemed to be regarding not having a music on hold mp3 file. I will double check, the post, then hopefully someone will be able to help me spot the issue.

root@LS-GL7D6:~# asterisk -vc
Asterisk 1.2.13, Copyright © 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘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 ‘show license’ for details.

Unable to open logger.conf: No such file or directory; default settings will be used.
Asterisk Event Logger Started /var/log/asterisk/event_log
Asterisk Dynamic Loader loading preload modules:
Asterisk Management interface listening on port 5038
Mar 20 18:05:37 NOTICE[30906]: cdr.c:1192 do_reload: CDR simple logging enabled.
Asterisk PBX Core Initializing
Registering builtin applications:
[AbsoluteTimeout]
[Answer]
[BackGround]
[Busy]
[Congestion]
[DigitTimeout]
[Goto]
[GotoIf]
[GotoIfTime]
[ExecIfTime]
[Hangup]
[NoOp]
[Progress]
[ResetCDR]
[ResponseTimeout]
[Ringing]
[SayNumber]
[SayDigits]
[SayAlpha]
[SayPhonetic]
[SetAccount]
[SetAMAFlags]
[SetGlobalVar]
[SetLanguage]
[Set]
[SetVar]
[ImportVar]
[Wait]
[WaitExten]
Asterisk Dynamic Loader Starting:
[res_features.so] => (Call Features Resource)
[res_config_odbc.so] => (ODBC Configuration)
Mar 20 18:05:37 NOTICE[30906]: config.c:863 ast_config_engine_register: Registered Config Engine odbc
res_config_odbc loaded.
[res_monitor.so] => (Call Monitoring Resource)
[res_adsi.so] => (ADSI Resource)
[res_agi.so] => (Asterisk Gateway Interface (AGI))
[res_indications.so] => (Indications Configuration)
[res_musiconhold.so] => (Music On Hold Resource)
Mar 20 18:05:37 WARNING[30906]: res_musiconhold.c:852 moh_register: Unable to open pseudo channel for timing… Sound may be choppy.
[res_crypto.so] => (Cryptographic Digital Signatures)
[res_odbc.so] => (ODBC Resource)
Mar 20 18:05:37 NOTICE[30906]: res_odbc.c:265 load_odbc_config: Adding ENV var: INFORMIXSERVER=my_special_database
Mar 20 18:05:37 NOTICE[30906]: res_odbc.c:265 load_odbc_config: Adding ENV var: INFORMIXDIR=/opt/informix
Mar 20 18:05:37 NOTICE[30906]: res_odbc.c:294 load_odbc_config: registered database handle ‘asterisk’ dsn->[asterisk]
Mar 20 18:05:37 NOTICE[30906]: res_odbc.c:554 odbc_obj_connect: Connecting asterisk
Mar 20 18:05:37 WARNING[30906]: res_odbc.c:565 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
Mar 20 18:05:37 NOTICE[30906]: res_odbc.c:599 load_module: res_odbc loaded.
[pbx_loopback.so] => (Loopback Switch)
[pbx_realtime.so] => (Realtime Switch)
[pbx_spool.so] => (Outgoing Spool Support)
[pbx_functions.so] => (Builtin dialplan functions)
[pbx_config.so] => (Text Extension Configuration)
Mar 20 18:05:37 WARNING[30906]: pbx.c:3761 ast_merge_contexts_and_delete: Requested contexts didn’t get merged
[pbx_ael.so] => (Asterisk Extension Language Compiler)
[pbx_dundi.so] => (Distributed Universal Number Discovery (DUNDi))
Mar 20 18:05:37 WARNING[30917]: res_musiconhold.c:421 spawn_mp3: Found no files in '/usr/share/asterisk/mohmp3’
Mar 20 18:05:37 WARNING[30917]: res_musiconhold.c:493 monmp3thread: Unable to spawn mp3player
[chan_features.so] => (Feature Proxy Channel)
[chan_oss.so] => (OSS Console Channel Driver)
[chan_skinny.so] => (Skinny Client Control Protocol (Skinny))
[chan_agent.so] => (Agent Proxy Channel)
[chan_local.so] => (Local Proxy Channel)
[chan_phone.so] => (Linux Telephony API Support)
[chan_sip.so] => (Session Initiation Protocol (SIP))
Mar 20 18:05:37 NOTICE[30906]: chan_sip.c:12616 reload_config: Unable to load config sip.conf
[chan_mgcp.so] => (Media Gateway Control Protocol (MGCP))
[chan_iax2.so] => (Inter Asterisk eXchange (Ver 2))
Mar 20 18:05:37 WARNING[30906]: chan_iax2.c:9776 load_module: Unable to open IAX timing interface: No such device or address
Mar 20 18:05:37 ERROR[30906]: chan_iax2.c:8810 set_config: Unable to load config iax.conf
[chan_zap.so] => (Zapata Telephony w/PRI)
Mar 20 18:05:37 ERROR[30906]: chan_zap.c:10316 setup_zap: Unable to load config zapata.conf
Mar 20 18:05:37 WARNING[30906]: loader.c:414 __load_resource: chan_zap.so: load_module failed, returning -1
Mar 20 18:05:37 WARNING[30906]: loader.c:554 load_modules: Loading module chan_zap.so failed!

There are a few “errors” and “warnings”, so if anyone can help that would be great.

You need to look at your zap.conf and zapata.conf as there is an error in them

Ian

[quote=“ianplain”]You need to look at your zap.conf and zapata.conf as there is an error in them

Ian[/quote]

Does it matter if I am not using an external devices (PRI cards, etc)? I didnt set those files up in the past is why I ask.

You will either need to compile and install dahdi or zapata. Even if you dont use a card, you still need some of the features of the cards for bits of asterisk to work properly, such as meetme().

If there is no card installed, it will load a dummy driver. This should fix your problem…if I have read things correctly :confused:

Let me know how you go
Cheers
Chris