Programming :: Bash: Script For Cleaning Voicemails From Asterisk?

Apr 15, 2010

I have to clean the voicemails from asterisk, but I want to keep at least, the voicemails for five days.I started writing a script, but I'm a bit stuck, and I've trying somethings for sometime, but still I can't get itThe hierarchy of Asterisk Voicemails is like this:

default
10000
INBOX

[code]....

View 4 Replies


ADVERTISEMENT

Programming :: Bash Script For Cleaning Home Directories

Jul 25, 2011

Im running on Solaris 10 and I am trying to write a script that will look at all the directories in export.home and then grep for the those in passwd and will display the directories that don't have a password associated with them

Here is what I got so far but its not working.
#!usr/bin/bash
for i in 'ls /export/home'
do
test='getent passwd | grep $i'
if [ $test="" ]
then
echo "No Home Diectories Found $i"
fi
done

All this does is display what was listed in the export.home. What I want it to do is just display what was not found in password.

View 2 Replies View Related

Fedora Servers :: Asterisk Ztdummy Compiled / But Not Loaded / Even Afer Asterisk Reinstall?

Sep 13, 2009

I compiled and installed the Asterisk ztdummy package because there is no rpm for it, unfortunately, and i even reinstalled asterisk, but i still get the "No application 'Meetme' for extension..." error when trying to conference. I do a "module show", and it lists other modules that were compiled with the zt source, but not ztdummy.Does anyone know how to fix this? This is more than a passing interest or hobby, because i need to conference about 3 to 5 people to help me test a new Website Content Management System and User Forums Management System i am about to launch as a service.

View 3 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 Replies View Related

Programming :: Bash: Get Filename And Extension Using Bash?

Jan 9, 2010

I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:

Let FILE="thefilenameofsomefilesfor_instance.txt"

Code:

NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`

I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.

View 5 Replies View Related

Programming :: Bash Programming - Rename Files In A Loop?

Mar 31, 2011

I need to rename the resulted searched files from a loopI have the following code:

find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done

basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell

View 10 Replies View Related

Programming :: Write A Bash Script That Sources Another Bash Script?

Jan 29, 2011

I am trying to write a bash script that sources another bash script. Essentially, I need a few lines to check to see if a certain variable is set. If not, I set it manually, and then source a scripts with that variable in the path. I wrote a test script to try it, but for some reason the last line does not work. Here is what I wrote:

#!/bin/sh
source ~setupdir/setup.shrc #just a test, this line works
echo ${#SETUP} # prints 0 if setup is not set, which it isn't
if [ ${#SETUP} -eq 0 ]
then
SETUP="~setupdir"
fi
echo $SETUP # prints ~setupdir

[Code]...

View 5 Replies View Related

Fedora :: Remove Asterisk With Yum?

Aug 3, 2011

i installed asterisk with yum, the command i used is that yum install asterisk*
Now i want ro remove only asterisk, not its depencies. how i do this?

View 7 Replies View Related

Programming :: Bash Scripting To Programming?

Jul 13, 2011

i'm in the process of learing C++. currently i'm creating shell scripts to get things done. i'm just curious how, as a programmer using C++ you would get a similar job done.as an example i have a script that takes the contents of files, pipes it to some sed and awk commands, which is piped to create a new file. that file is then imported into a mysql database.if you were going to do this in C++, would you call the sed/awk programs to modify the file, or can it be done within the program itself? i'm probably jumping the gun here because i've just started learing about pointers so this is above my ability

View 12 Replies View Related

Fedora :: Cleaning Up /var/tmp

Dec 19, 2009

Can i safelly clean up /var/tmp? it contains 730mb of files

View 12 Replies View Related

Ubuntu :: Using Ver. 10.04 - Cleaning HD

Nov 16, 2010

Can anyone clean up, and thus free up space on, my hard drive. i've tried -computer janitor, constantly empty the trash, and delete stuff from the download folder. where is the stuff i've installed going, not in synaptic- i've searched for programs i want to delete there and cannot find them. meanwhile i've got like 400mb left on a 13 GB HD and cant do a thing about it.

View 4 Replies View Related

General :: Build IVR With Usb Modem Using Asterisk?

Aug 27, 2011

I have a USB 3g modem, which also supports voice calling, I want to implement IVR ( Interactive Voice response) with it on linux, Can I do it with Asterisk? If yes, then please help me on how to do this ( references) ?

Is there example or howtos available to do this?

Can I develop IVR system in linux without Asterisk?

Note: I am very new to Asterisk and IVR.

View 2 Replies View Related

Networking :: How To Monitor Asterisk Using Nagios

Mar 31, 2011

What are the standard procedures to monitor asterisk with nagios? I downloaded check_asterisk from URL...

View 1 Replies View Related

Software :: Asterisk Realm Authentification?

Jan 26, 2011

I just installed asteriks on my remote server ,and set up 2 account for test purpose.i added these lines to sip.conf

Code:
[benchabane]
type=friend
username=benchabane
secret=tcpip13
host=dynamic
context=mygroup

[Code]...

View 1 Replies View Related

Ubuntu :: TMP Folder Not Cleaning Up?

May 29, 2011

After figuring out that this is happening on my brand new 10.04 install, I've suddenly realized it explained what was happening on the 9.10 install I'm replacing.

I'm finding out on the internet that /tmp in Ubuntu is typically a Ramdisk, thus cleared automatically on reboot - but that's not how I was ever taught to setup a linux box; I *always* create /home var et al and mount them separately, including /tmp.

So on my new 10.04 install I am informed my tmp partition is down to 12 Meg, and find K9Copy crashed last night (I initially thought this was due to a crash, but testing shows it just - leaves them there. K9Copy!) leaving a 4.5 Gig file sitting in tmp. I add a couple Gig to the tmp partition (LVM rocks btw.) and reboot. Files are still there.

I finally went in via gksu nautilus and manually deleted the data.

More research find this results in exactly the kind of issues I was having previously in my 9.10 install (albeit without the helpful warning that helped me figure it out) of Firefox and various other programs acting glitchy because they right to tmp and it's full.

I'm a n00b, and really don't know how to fix this - the 'proper' way to clean tmp seems to involve dropping entirely out of X to userlevel 0 and running from the commandline?!?! . . /tmp is supposed to be for temporary files; ideally a program should clean up after itself, but it's actually Ubuntu's job to clean this.

My going in and manually cleaning out files is insane if gksu nautilus is involved, nevermind if that's the *wrong* way. I'm certainly not the guy to write a cronjob to clean this. On the other hand - this only started in the last week or so (on 9.10) so it has to be a recent change.

View 1 Replies View Related

CentOS 5 :: Tmpwatch Not Cleaning Up /tmp?

Jun 10, 2011

We have the standard tmpwatch installed (via yum) and it creates this script in /etc/cron.daily:

root@##### [/etc/cron.daily]# cat tmpwatch
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix

[code]....

View 2 Replies View Related

Fedora Security :: Can't Connect Radiusclient -ng With Asterisk

May 22, 2009

I want to authenticate and authorize for SiP user of my * box, it is my project, but i did not finish it, hic hic! My asterisk box is version 1.6.0, fedora 10.the first, i downed and installed freeradius to my computer, and run "radiusd -X", it's run normally. Then, I installed radiusclient-ng0.5.6, it's rpm file. All is perfect. But the problem is i can't run asterisk box as radiusclient.

View 2 Replies View Related

Server :: Asterisk User Andvoicemails With Mysql?

Jun 1, 2010

I have been reading about asterisk, I did some basic configuration, a small ivr, record messages.. but I was wondering how and what/where should I modify to use a database to save sip users and voicemail user..then we can add user/voicemail with php-myadmin I always search but I cant find about this configuration..

View 1 Replies View Related

Server :: Error When Compiling App_cbmysql.so On Asterisk 1.6

Jan 13, 2011

My asterisk version is 1.6 and Web-MeetMe is 4.0.2 I get the following upon issuing "make" in web-meetme/cbmysql/ :

Quote:

cc -pipe -I/usr/include/mysql -L/usr/lib/mysql -fPIC -I/usr/src/asterisk -D_GNU_SOURCE -I/usr/include/mysql -c -o app_cbmysql.o app_cbmysql.c
app_cbmysql.c:14:22: error: asterisk.h: No such file or directory
app_cbmysql.c:25:33: error: asterisk/autoconfig.h: No such file or directory
app_cbmysql.c:26:27: error: asterisk/lock.h: No such file or directory

[Code]....

View 2 Replies View Related

Software :: Compatibility With Htpasswd And Htaccess On Asterisk?

Mar 4, 2010

Has anyone ever had any luck with htpasswd and htaccess on asterisk, I set it up on a test apache server in VMWare just to make sure I knew what I was doing, so It was a very basic html page that I used, however, when I go to implement it on one of my Asterisk Servers, It comes up with the following page after I type a user name and password credentials in:

***************************************************************************
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny4 with Suhosin-Patch Server at fred Port 80
***************************************************************************

Anyone know if its compatible? and if so, is there any tricks around this?

View 2 Replies View Related

CentOS 5 :: Unable To Install Asterisk Gui Using Svn Command?

Jan 18, 2009

I want to install Asterisk gui using svn command, but I have the following error:

# svn co http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui
svn: PROPFIND request failed on '/svn/asterisk-gui/trunk'
svn: PROPFIND of '/svn/asterisk-gui/trunk': Could not resolve hostname `svn.digium.com': Temporary failure in name resolution (http://svn.digium.com)

View 5 Replies View Related

CentOS 5 :: Minimal Package List For Asterisk?

Jan 7, 2010

We would like to install Asterisk with a minimal centos build. We are writing kick-starts to install packages, does anyone know or have to hand a packages list which installs minimum system requirements for asterisk? Preferably this will not exceed the contents of disk 1

View 4 Replies View Related

Fedora :: Cleaning Old Packages From Yum Cache?

Mar 12, 2010

I have enabled the option to keep the yum cache when updating Fedora 12 and I was wondering if there was a way in which I could remove old versions of the same package from the cache?

I have Fedora installed on more than one machine and I make them share a common update location for their updates to avoid downloading the same packages twice (bandwidth quota expensive in Australia).

how I could accomplish that? yum clean doesn't seem to have any options to only remove old packages!!!

Example: The yum update cache has:

wireshark-gnome-1.2.5-3.fc12.x86_64.rpm
wireshark-gnome-1.2.6-1.fc12.x86_64.rpm

I wish to only keep the most recent version that is wireshark-gnome-1.2.6-1.fc12.x86_64.rpm, but for all the packages.

View 4 Replies View Related

OpenSUSE :: How Can I Do Manually Cleaning Of The Trashcan

Jun 9, 2011

Recently I moved to trashcan a big amount of data to be erased, but when I tried to erase the data it refuses to do it and keeps telling me I have to manually clean the trashcan, so anyone can tell me how I do it? opensuse 11.4 KDE 4.6!

View 1 Replies View Related

Ubuntu :: Cleaning Firefox Stuff ?

Jan 9, 2010

I'm writing a script to clean my computer.

Everything is good to go except i have no clue how to clear firefox's history and whatnot from the command line.

This is one of the commands i found...: rm .mozilla/firefox/linux-blog.default/cookies.txt

It tells me no such file or directory.

View 2 Replies View Related

Ubuntu :: Cleaning Up GRUB & It's Implications?

Apr 18, 2010

Would like to ask for some advise regarding GRUB. I have been using Windows for a long time and recently have finally decided to switch to Linux. A good friend recommended Ubuntu and I have installed it on an 8GB USB thumbdrive for test drive. Nowadays, I mainly boot from this thumbdrive for my personal computing use. [I am a supporter of the "Immersion Learning" school. The only way for me to really learn is to force myself to use the system ] as I frequently updates my Ubuntu 9.10 via the Update Manager, I found my GRUB screen now have multiple entries like below:

[Code]....

I would like to remove the last 4 lines but:

1. I'm not sure how to do it?

2. And do i just delete the entries or do i also have to delete some system files? {this is important as i am running this on a USB thumbdrive and would like to remove any files that are no longer necessarily and keep the installation as lean as possible}.

View 5 Replies View Related

Ubuntu :: Cleaning Up The Grub Menu?

Jul 4, 2010

I see too many entries upon turning on my laptop: [URL]..There should only be 3 entries: Windows partition, Ubuntu partition, and the memtest thing, I believe. The *doubling* up of Windows and Ubuntu is due to me wiping Ubuntu, then reinstalling Ubuntu. The third entry for Ubuntu is due to re apt-get install'ing gnome-desktop. How can simplify the menu?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved