Avaya Partner R8 Programming
OK. I don’t normally do this…
but I need to configure the VM for one of Rica’s friends’ store.
Right now the problem is: The VM message (which was recorded using the intercom 777, option 3) is a ‘night’ voice mail message. #507 had been set to ALWAYS. I figured if I set it to 3-Night Only, then it would work.
tested. still fails. Symptom:
1) Ensure night answer is off
2) call on one line. and answer it. leave it off hook.
3) call on the other line. after 2nd ring, you’re redirected to Voice Mail (which has the night message recorded).
This might be ok… what if, the call on the other line went to the voicemail box of extension 10. And as I can see, there is no voice mail greeting for extension 10.
New test: I recorded a message for extension 10. repeating the test. night answer off.
I got 3 separte results on 3 attempts:
1) got disconnected. 2) got some static and alien sounding voices. crosstalk? 3) got night voice mail. 4) got night VM message again.
OK. I did. #506. I noticed hunt delay for line 02 was 2 rings. set it to 4 rings. ditto for lines 03 and 04. Tested. Now I get night voice mail after 4 rings.
That’s still not quite correct. What we should do is during the day it should go to the voice mailbox of extension 10. during the night it goes to night voice mail.
Now I try #507. I noticed that line 1 was indeed set to night only. but lines 02, 03 and 04 were set to Always. I changed them to night only. testing.
OK. Now the VM does not answer at all and the phone just keeps on ringing. The problem now is, how do I get that line to go to voicemail.
I changed #310. all extensions were not-assigned. now they are assigned. testing.
The VM never answered.
… need to do more research.
Ok. more things to try and check.
Need to program #111 to a button with lights. I know the one.
Program #110 to the number of rings.
Check #121. make sure it’s set to HOLD
#204 needs all lines to be assigned
Press intercom-891 to hear the message a caller hears
also:
2. Night Service Voicemail
VMS/VMESS Button upper left Button on your button pad Enter 0# Enter password (default is 4321#) Press 3 Press 1 Record your Message When you are done recording Press 1
Why you should build your AMI with an EBS root device
… more to come…
the main reason NOT to is cost since AMI’s with instance root devices are stored in S3 whereas those with EBS root devices are stored in EBS which costs more but is faster.
I guess I better publish this stub and clean it up later. more to come…
Emergent Medleys
By now I figure people have uploaded pretty much every variation of every song to youtube… and yet…
I remember this one day in the early 70s perhaps? (Man – that totally dates me – but WTH). I was on my way being driven (as one is apt to be) from our home in Mandaluyong to school in Ateneo. ‘Twas a hazy day typical of Manila in the day, and after taking the short cut from White Plains to Aurora, as we were about to turn right into Aurora, I was listening to DZRJ. Back in the day, there was but two radio stations: DZBM and DZRJ. The former for the more mellow top 40 songs (in the day, Fifth Dimension, George Benson, Paul Williams, etc), and the latter for the more hard rock songs (The Who, Petrified Anthem, and the like). I remember hearing a medley which I’ve never heard again. I heard in on RJ – the hard rock station. Go figure.
I remember it clear as day, and as it’s not in youtube, I guess it’s my duty to create it. It was a medley of two really old songs: “Worst That Could Happen” by The Associations, and “I’m Gonna Get Married” by The Sunday Band. Diametrically opposed songs. One full of regret for the past. One brimming with excitement for the future.
As far as I can tell, that medley doesn’t exist in the ‘wild’. But… now that I’ve got Adobe CS3 installed, I figure I should try to create it the way I remember it.
Alalahanin… Gunitain….Ang puso natin, sariwain.
Godspeed.
A quick way to paste MySQL output to Excel
I don’t normally swim in Excel waters, so when I actually figure out something new, I thought it best to share and document it.
When I test my code, I copy output quite often into an open VIM window. Since my scripts typically end up writing to a DB (a mysql DB in this case), I typically have a sql prompt open ready to query for the results of my test. The results are something like this:
+---------+-------+-------+------------+------------+---------+ | page_id | m_imp | t_imp | m_elig_vis | t_elig_vis | n_users | +---------+-------+-------+------------+------------+---------+ | 15 | 88172 | 27139 | 71689 | 21044 | 10715 | | 7498 | 3132 | 2704 | 2630 | 2322 | 1006 | | 7727 | 0 | 1 | 0 | 1 | 0 | | 7732 | 0 | 0 | 0 | 0 | 0 | | 9870 | 181 | 170 | 165 | 143 | 54 | | 9871 | 431 | 518 | 323 | 370 | 186 | | 12385 | 0 | 0 | 0 | 0 | 0 | | 12924 | 0 | 0 | 0 | 0 | 0 | | 25857 | 0 | 17423 | 0 | 15718 | 6837 | +---------+-------+-------+------------+------------+---------+
That’s a typical MySQL result set. When I want to send it to excel, the conventional way is to rerun the query converting it to a csv and outputting the results in a /tmp directory (yes, I’m Mac/Linux based. I don’t know where MySQL on windows writes an OUTFILE to). I would then have to copy the file to a local directory on the MySQL server (usually in a colo or off-site), then scp the file to my local machine importing into Excel using Data->Get External Data. This method is cumbersome and not very quick.
It would be much smoother for me to copy the text output as above into my clipboard and ‘paste’ it into Excel. Then I can format it and run a few quick calculations faster than writing a php script or a mysql query. If you do copy the above table, as text, and paste it into excel, the output is a single column where every linefeed is a separate row. Having to hand-edit each cell is un-acceptably tedious, time consuming and error-prone.
What if, we could simply paste the plain text onto a column, then write a quick formula to convert that single column into multiple columns.
One relevant row in the column as the following format:
| 15 | 88172 | 27139 | 71689 | 21044 | 10715 |
What if I could write a formula which pulled out 15 to one cell. and 88172 into another cell. I need to create a formula to get pull out the data between the ‘|’ characters. If the formula knew to pull out the nth’s field, then I could copy such a formula across a worksheet which, in turn, can then be used as a source to populate other worksheets. So that’s simple enough.
I could use the =MID(text,start,count) function. The problem is, where do I start and what should I use as the count. The key is, being able to find the ‘nth’ occurrence of the ‘|’ character. Thanks to tips.com, that info is right here.
The formula I chose is of the form: =FIND(CHAR(1),SUBSTITUTE(A1,”B”,CHAR(1),3)) – which finds the 3rd occurrence of the character ‘B’. The ’3′ in the formula can refer to a cell instead. And “B” can be changed to our delimiter: ‘|’.
The rest is pretty straightforward following from above.
The start of the Nth field is the position of the Nth delimiter + 1.
The length of the Nth field is the position of the (N+1)th delimiter minus the position of the Nth delimiter – 2.
1. Opened up a new Excel spreadsheet. copied my text (including tabular data) and pasted it on cell A2.
2. Then on I numbered B1, C1, D1, … as 1,2,3, etc. – this should correspond to the number of columns I have.
3. This then allowed me to put the following formula on cell B2
=MID($A2,FIND(CHAR(1),SUBSTITUTE($A44,"|",CHAR(1),B$1))+2,FIND(CHAR(1),SUBSTITUTE($A44,"|",CHAR(1),(B$1+1))) - FIND(CHAR(1),SUBSTITUTE($A44,"|",CHAR(1),B$1)) - 2)
I hope this helps. Saved me a ton today.
Obsession
In the end, Richard Back wrote it true:
“Whatever Enchants also Guides and Protects.” (I’m writing this from memory so it may not be verbatim. I’m certain the web has the exact quote from “The Bridge Across Forever”. But also true, is that the way we remember quotes make them more meaningful. Back continues…) “Passionately obsessed by whatever we hold dear: airplanes, sailboats, php code, We are carried over chasms of fear and doubt. And the rules are leveled and dissents are silenced. Without that passion we are boats becalmed on seas of boredom. And those are dangerous.”
And so, be enchanted with code, or gadgets, or teeth (like Michelle), or games, or people, or cars, or planes…
I promised a friend I’d post twice a week from here on onward. Let’s see what becomes of this blog.
Just a quote I ran into today
“I do not love the bright sword for its sharpness, nor the arrow for its swiftness, nor the warrior for his glory. I love only that which they defend.” –J.R.R.Tolkien, The Two Towers
Lichauco Family Tree WIP
Right now, the canonical Lichauco Family tree is a Work in Progress.
I’ve got basic descendant charts going at: http://www.rcarlos.com/lichauco/gentree.php but even that needs a lot of work. Clicking on the root box brings you up the tree. Clicking on the lower boxes makes that person the new root and regenerates the tree. So far the responsiveness has been snappy. So I’ll keep this structure right now without any caching.
TODO:
- Add Multiple marriages to level 1
I’ve taken care of handling multiple marriages in the level 0 (root level). But I need to extend this to at least level 1 (children of the root). You can see how this works by going to http://www.rcarlos.com/lichauco/gentree.php?rootId=178 Macario was quite a guy. - Add handling of dupes
There’s been a fair amount of intermarriages within the clan. Cousins marrying cousins. Uncles marrying their nieces. The display of this leaves a lot to be desired – the obvious effect is that when viewed from one side of the union, the children are seen, but from the other side, the children are not seen. This to-do is supposed to ensure that the children can be seen from both sides. - Honoring tree-hints.
Multiple marriages or unions can be distracting and embarrassing. Some marriages carry more weight than others. The user should be able to configure the rendering of the tree to eliminate distracting unions and data while it is preserved in the DB.
This application makes extensive use of the Sitemap.css developed by astuteo.com. I’ve seen the way Ancestry.com does the “family” type presentation but I rather like mine better. It’s more compact and lends itself more to large extended families.
In subsequent posts, I’ll expound on the data model used for my angkan software.
Configuration files and Open Source
I’m writing some family tree software which I’m GPL/Open Sourceing. It’s the angkan project in Sourceforge.
While developing, I use a directory for running programs and thus I require real DB credentials. I don’t want to commit these credentials to an open source repository but the size of the project does not warrant a deployment script (yet). Thus, if I were to use the same directory as a repository root for svn, I would be compelled to make the DB credentials generic.
Taking a cue from the way WordPress retrives configuration files, I’ve come up with the following. I create the config file with the REAL credentials in a directory ABOVE the repository root, while the one in the repository root contains GENERIC credentials. The REAL config file contains just the defines. The config file in the repository root contains code which runs the REAL config file if it exists.
The directory structure will be something like:
+ public_html
+ REAL_ConfigFile
+ project directrory (svn root)
+ GENERIC_ConfigFile
In GENERIC_config.php, prior to setting the db credentials, it first checks to see if a site specific file REAL_config.php exists in the directory above (which will not be committed into the source tree) and if it exists, it “includes” that file. If not, then some default db credentials will be used which can then be cusotmized by those using the software.
For instance a good config file will be something like the following:
<?php
if (file_exists( dirname(dirname(__FILE)) . '/REAL_config.php' )) {
require( dirname(dirname(__FILE__)).'/REAL_config.php' );
} else {
// put default db credentials were
define( 'HOST', 'localhost' );
define( 'DB_NAME', 'changeme' );
define( 'DB_USER', 'changeme' );
define( 'DB_PASSWORD', 'changeme' );
}
?>
There may be more elegant ways to do this. But I thought I’d share this particular technique.
Just another post
Looks like sachachua.com is pretty interesting. I like her use of pencil graphics (probably drawn from that nice an shiny wacom cintiq that she has.
Hey – thinks are looking up – with a second post. go figure. I might have something nice to say here yet.