UPDATE: TeleYapper Phonebook

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Hi all,

I have just finished the latest (and hopefully greatest) version of the TeleYapper Phonebook.

For those unfamiliar with the TeleYapper Phonebook, it is a set of scripts that will let us add/edit/delete/export/import entries in/out of the TeleYapper database without having to use phpMyAdmin.

The scripts have only been tested to work with TeleYapper on PiaF.

The hardcoded login/password is now a thing of the past (just edit the include.php file)

Just a quick note of thanks to everyone who helped beta tested this with me. :cool:

If you have questions, comments, suggestions, etc, please let me know.

Thanks!

-Rick


INITIAL INSTALL INSTRUCTIONS
====================
1. Log into your PiaF box as root (at the command line) and type the following:

cd /root
wget http://www.highness.net/typhonebook.tgz
tar -zxvf typhonebook.tgz -C /
/var/www/html/maint/typhonebook/typhonebook.pbx
rm typhonebook.tgz

2. Go log into the PiaF box as "maint".
3. Select "Module Admin", then select "TeleYapper Phonebook" (its in the Maintenance section) and select "Install"
4. Once the configuration has been reloaded, you can click on the "Tools" tab and then select the TeleYapper Phonebook button.
5. Go ahead and Add / Edit / Delete/ Export / Import entries to your TeleYapper phonebook.

IF YOU'VE INSTALLED A PREVIOUS VERSION OF TYPB
=================================
1. Log into your PiaF box as "maint" and go to "Modules".
2. Select the TeleYapper Phonebook and select "Uninstall".
2. Reload the settings.
3. Use the instructions for INITIAL INSTALL INSTRUCTIONS.

If you find something weird or just plain stupid in TYPB, PLEASE email me at richard at highness dot com and give me a heads-up so I can fix it and give you credit for the fix.


-Rick
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,210
Reaction score
5,239
I sent Rick a note about this, but he obviously didn't get it. Untarring these files resets directory permissions to root for some directories that need to be owned by asterisk. Run update-fixes after the install, and all will be well. :smile5:
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Hi Ward,

I did get your e-mail. What I did differently this time, was make sure that the permissions and ownerships were correct before packaging them up. Then when I tarred them up, I used the -p and --owner directives which are supposed to preserve permissions and owner.

Just to be on the safe side, I included a typhonebook.pbx script (part 4 of step 1) that also changes permissions/ownership just in case it got munged up in the packaging.

-Rick
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,210
Reaction score
5,239
Hi Rick,
The problem is that the entire directory tree permissions/ownership get reset when you untar a file. So... even though the script would fix permissions in the destination folder, it didn't address root ownership that was injected further up the tree:

root@pbx:~/teleyapper/var/www $ cd html
root@pbx:~/teleyapper/var/www/html $ ls -all
total 16
drwxr-xr-x 4 root root 4096 Apr 18 06:13 .
drwxr-xr-x 3 root root 4096 Apr 18 06:13 ..
drwxr-xr-x 3 root root 4096 Apr 18 06:13 admin
drwxr-xr-x 3 root root 4096 Apr 18 06:13 maint
root@pbx:~/teleyapper/var/www/html $ cd maint
root@pbx:~/teleyapper/var/www/html/maint $ ls -all
total 12
drwxr-xr-x 3 root root 4096 Apr 18 06:13 .
drwxr-xr-x 4 root root 4096 Apr 18 06:13 ..
drwxr-xr-x 2 root root 4096 Apr 17 21:18 typhonebook


The easiest way to assure no foulups is to tar (from the root directory of the disk, i.e. / ) the actual files you're bundling up in place once everything is working the way you want it to work. Hope this helps. Like I told you, the only way I learned this was the hard way, too.
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Hi Ward!

I totally missed the part about doing it from /. I took it to mean /root. :eek:

I just want to make sure I get this so I don't make mistake again on my next module...

Once I'm happy with the way things look/work/etc, change the perms and owners.

Tar them up using the -p and --owner directives from / and then things should be ok?

-Rick
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,210
Reaction score
5,239
Here's what I use after positioning to root directory (cd /) and putting all of the files needed in the places they will actually reside...

To create a new tarball:
tar -cf reminder.tar /var/spool/asterisk/reminders

To add more to existing tarball: tar -uf reminder.tar /var/spool/asterisk/recurring

To list contents of tarball: tar -tf reminder.tar

To convert to gzipped: gzip reminder.tar and then mv reminder.tar.gz reminder.tgz

To unzip: gunzip reminder.tgz

To untar and install always from /: tar -zxvf reminder.tgz to make stuff line up correctly with proper ownership/permissions
 

jebradley

Member
Joined
Oct 30, 2007
Messages
36
Reaction score
0
What files have their permissions screwed up? I installed teleyapper and the new phonebook yesterday, and my system is not functioning now.

I'd just as soon have to go in and change a few file ownerships/permissions as to have to reinstall.
 

jebradley

Member
Joined
Oct 30, 2007
Messages
36
Reaction score
0
I figured out what the problem was. It obviously wasn't file permissions, as the system is now working. I'm not sure why asterisk didn't stop with an 'amportal restart' command, but once I went into the asterisk CLI and halted it and restarted, everything is now working again.

Now, I get to play with the aastra 57i CT phone that arrived yesterday when I didn't have time to play with it. At least the battery on the portable is charged, so I can jump right in!
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

If there is a call in progress, amportal restart does not stop Asterisk by design.

You'd need to type amportal kill which stops everything, then amportal start, alternatively, stop now at the asterisk CLI, as you did followed by an amportal restart would achieve the same ends.

Joe
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,210
Reaction score
5,239
What files have their permissions screwed up? I installed teleyapper and the new phonebook yesterday, and my system is not functioning now.

I'd just as soon have to go in and change a few file ownerships/permissions as to have to reinstall.

It's the ownership on the directories below /var/www/html. Issue the command ls -all /var/www/html and go from there. Or just run update-fixes.
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Teleyapper Phone Book - v1.10

OK, the permissions issue(s) should be fixed now and a minor bug fix has been patched.

So, if you're looking for the latest and greatest version of TeleYapper Phonebook, here are the install / upgrade instructions:

INITIAL INSTALL INSTRUCTIONS

1. Log into your PiaF box as root (at the command line) and type the following:

cd /root
wget http://www.highness.net/typhonebook.pbx
chmod +x typhonebook.pbx
./typhonebook.pbx




2. Go log into the PiaF box as "maint".

3. Select "Module Admin", then select "TeleYapper Phonebook" (its in the Maintenance section) and select "Install"

4. Once the configuration has been reloaded, you can click on the "Tools" tab and then select the TeleYapper Phonebook button.

5. Go ahead and Add / Edit / Delete/ Export / Import entries to your TeleYapper phonebook.

IF YOU'VE INSTALLED A PREVIOUS VERSION OF TYPB

1. Log into your PiaF box as "maint" and go to "Modules".
2. Select the TeleYapper Phonebook and select "Uninstall".
3. Reload the settings.
4. Use the instructio
ns for INITIAL INSTALL INSTRUCTIONS.

If you find something weird or just plain stupid in TYPB, PLEASE email me at richard at highness dot com and give me a heads-up so I can fix it and give you credit for the fix.


-Rick
 

thewisp

Member
Joined
Apr 22, 2008
Messages
59
Reaction score
2
Can someone please give the requirements of a csv file to have imported using teleyapper phonebook?

I have made an export and duplicated it and still no go. Any suggestions? When ever I upload a csv file it says invalid file.
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
The requirements are pretty simple. The file that you upload must be in a .csv format (text file); NOT the Excel spreadsheet saved with a .CSV extension.

You can do this one of several ways, but the easiest way is to enter your data into Excel and then do a "F)ile - Save A)s" and then choose the format of .CSV.

Once that file is saved, you should be able to open the file in notepad and view/edit the file. If you can't or the file is jibberish, you didn't save it as a .CSV file.

Once you verify that you can open the file in notepad, you can upload and import the file.

Use the Teleyapper Phonebook page to upload the file. Once the file has been uploaded, you can then click on the "Import" link to import it.

Hopefully that helps.

-Rick
 

KUMARULLAL

Guru
Joined
Feb 20, 2008
Messages
243
Reaction score
28
Hi Rick,
I followed your instruction and downloaded from this link http://www.highness.com/typhonebook.pbx
I installed it and it successfully installed.
But when I try to add an entry I get the following error
DB Selection failed.
Error # ()
Error msg: ()
What went wrong?
Please help
Thanks and Regards
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
Have you installed TeleYapper first?

Since this issue has cropped up a few times in the past couple of weeks, I wanted to make sure that people understood that Teleyapper Phonebook is an add-on to Teleyapper. So, consequently:

Teleyapper Phonebook will only work if Teleyapper 4.x has been previously installed.

-Rick
 

kwest

Member
Joined
Jun 28, 2008
Messages
52
Reaction score
0
I think the phone book is great! is there a way to make it show up on the user Control Panel as an icon?

Thanks
 

The Deacon

Guru
Joined
Jan 29, 2008
Messages
296
Reaction score
14
I'm working on it...

I'm working on making it a control panel icon, but I've been working out of town quite a bit lately (hopefully will be home NEXT week) and I can probably start working on it then...

-Rick
 

drmurdoch

Member
Joined
May 26, 2008
Messages
576
Reaction score
11
Could this article
http://bestof.nerdvittles.com/applications/teleyapper4/

also refer to this

UPDATE: TeleYapper Phonebook
http://pbxinaflash.com/community/threads/update-teleyapper-phonebook.1202/?t=1202

This will make sure others don't miss either of this valuable resource.

2. The Deacon said … Hi Brent,
I actually wrote a front-end / add on for the TeleYapper script a while back. It must have gotten buried in the forum somewhere. Sorry you didn’t see it, but glad you wrote one!
Here is the thread:
http://pbxinaflash.com/community/threads/update-teleyapper-phonebook.1202/?t=1202
-Rick
3. Brent said … Man I am sorry that I didn’t see that, though I do need to expose the functionality to people that I don’t want to login to the maint console.
Thanks for the link.

You should also make a link to:
Teleyapper Web Script

http://www.brentnorris.net/blog/archives/468

I think this might help future users !
 
Last edited by a moderator:

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
I get this error:
Could not connect to MySQL server!
Error #
Error msg: mysql_error
----
I have changed my passwords for MYSQL, and have changed them in the include.php and still get this error.
 

Members online

Forum statistics

Threads
25,838
Messages
167,931
Members
19,264
Latest member
lm2lm2
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top