irclog2html for #asterisk-doc on 20051108

00:14.18*** join/#asterisk-doc vexorg (n=vexorg@CPE000021ded913-CM001225419164.cpe.net.cable.rogers.com)
00:17.43*** join/#asterisk-doc MikeJ[Laptop] (n=ircatjer@d14-69-8-30.try.wideopenwest.com)
03:30.48*** join/#asterisk-doc jsmith (n=jsmith@smithfam.dsl.xmission.com)
03:30.48*** mode/#asterisk-doc [+o jsmith] by ChanServ
03:31.01jsmithblitz[laptop]: Get it all figured out?
03:31.13blitz[laptop]jsmith: yer back!
03:31.24blitz[laptop]jsmith: mostly I think... but I forgot one thing
03:31.30jsmithOK.
03:32.44blitz[laptop]Each DID can have a different 411 and 911 address for each DID -- so I was working with two foreign keys for the DID, one for the 411, and another for the 911, both attached to the address table, so I can have different address IDs for each.
03:34.04jsmithOK, so let me get this right...
03:34.07jsmithAccount
03:34.18jsmith|--Group
03:34.25jsmith<PROTECTED>
03:34.32jsmith<PROTECTED>
03:34.46jsmith<PROTECTED>
03:34.49jsmith<PROTECTED>
03:34.54jsmith<PROTECTED>
03:34.57jsmithSomething like that?
03:35.32blitz[laptop]yep -- but that can also be in Group and Account as well (just as before where addresses can be assigned to Account, Group or DID, and if NULL, then use the one above it)
03:35.39jsmithOh, I see...
03:35.55jsmithSo Account has 911_account_id and 411_account_id, same for group and DID.
03:36.01jsmithI gotcha.
03:36.33jsmithSo does an account just have those two addresses, or a regular address, 911 address, and 411 address?
03:36.45blitz[laptop]911 and 411
03:36.55blitz[laptop]just those two
03:37.03jsmithOkie dokie...
03:37.15jsmithIt's just a simple extension of what I did before then :-)
03:37.23blitz[laptop]thats what I figured...
03:37.28blitz[laptop]was a foreign key the right way?
03:37.35blitz[laptop]then I don't even have to change the address table
03:37.41jsmithExactly.
03:37.50blitz[laptop]cool... I might have even done it right!
03:38.00jsmithEach of the 911_address_id and 411_address_id fields will be a foreign key to the address table.
03:38.56blitz[laptop]yah.. I think I called them address_da_id and address_em_id
03:39.14blitz[laptop]da -- directory assistance;  em -- emergency
03:40.01blitz[laptop]ok... tell me if I did the DID right -- I have a fk for both the account and group IDs
03:40.28blitz[laptop]I couldn't decide if account would cascade down through group, or if I needed a separate fk for it...
03:40.45blitz[laptop]btw -- what game you watching?
03:40.48jsmithYup... the account_id in the groups table references the accounts table, and the group_id in the DIDs table references the group_id in the groups table.
03:41.05jsmith(Colts vs. Patriots -- American football at its finest)
03:41.33blitz[laptop]jsmith: darn... so I guess I can remove one of those constraints :0
03:41.48jsmithWhat other constraint did you have in there?
03:41.59blitz[laptop]DID reference account_id as well
03:42.11blitz[laptop]figured it was wrong... shoot, should have gone with my gut instinct :)
03:42.21jsmithEach of the accounts, groups, and DIDs table will have two additional constaints -- foreign keys to the address table  (one for 911, one for 411).
03:42.32blitz[laptop]right
03:42.37blitz[laptop]I have that right
03:42.42jsmithCool :-)
03:42.57jsmithOh, did you put the account_id in the DIDs table?
03:43.04blitz[laptop]I had Account -> address, Group -> address & account, DID -> address, group, account
03:43.05blitz[laptop]yah :)
03:43.09jsmith(you don't need it)
03:43.10blitz[laptop]and I figured I didn't need it
03:43.12blitz[laptop]ha!
03:43.23jsmithalter table DIDs drop constraint foo;
03:43.30jsmithalter table DIDs drop column account_id;
03:43.50blitz[laptop]haha... yah... I just did that backwards :)
03:44.04blitz[laptop]re-adds
03:44.33jsmithYeah, I know that means you'll have join Accounts to Groups to DIDs to Addresses to Addresses, but it shouldn't be that hard :-)
03:45.40blitz[laptop]gah! I just screwed up my DB by removing the column first :)
03:45.53blitz[laptop]nevermind
03:45.55blitz[laptop]just had to refresh
03:47.12blitz[laptop]join Accounts to Groups to DIDs to Addresses to Addresses... or is that second to Addresses a dupe?
03:48.28jsmithSELECT a.account_id, a.account_name, g.group_id, g.group_name, d.did_id, d.did_name, COALESCE(d.address_em_id,g.address_em_id,a.address_name_id) as 911_address_id, COALESCE(d.address_da_id,g.address_da_id,a.address_da_id) as 411_address_id FROM
03:49.02jsmithaccounts AS a JOIN account_groups AS g ON a.account_id = g.account_id
03:49.34blitz[laptop]haha... nice :)
03:49.37jsmithJOIN group_dids AS d ON g.group_id = d.group_id
03:50.58jsmithJOIN address AS addr1 ON COALESCE(d.address_em_id,g.address_em_id,a.address_em_id) = a.address_id
03:51.50jsmithJOIN address AS addr2 ON  COALESCE(d.address_da_id,g.address_da_id,a.address_da_id) = addr2.address_id;
03:52.07blitz[laptop]lol
03:52.10jsmiths/name_id/em_id/
03:52.20jsmiths/a.address_id/addr1.address_id/
03:52.31blitz[laptop]thats one heck of a SELECT statement
03:52.37jsmithOh, and you'll wanna match on your existing column names
03:52.50jsmithNo, that's not a large SQL statement.
03:52.59blitz[laptop]I said SELECT statement ;)
03:53.03jsmithMy boss once wrote one over 200 lines long -- it's the most beautiful thing I'd ever seen.
03:53.15jsmith(This was a SELECT statement as well)
03:53.21blitz[laptop]crazy
03:53.38jsmithNo, not crazy.  Powerful :-)
03:53.45blitz[laptop]crazy powerful
03:54.23jsmithExactly... it was basically a breakdown of every employee in the company, and whether they were costing the company money or making the company money, and how much.
03:54.37blitz[laptop]lol
03:54.42blitz[laptop]neat :)
03:54.52jsmithEach employee was assigned a Personell Efficiency Rating, and bonuses/pink slips were handed out accordingly :-)
03:55.17jsmithWe had employees that were costing the company $10/hour, and not bringing in any revenue.
03:55.29jsmithOther employees were making the company several hundred dollars an hour :-)
03:55.36jsmith(all doing the same job)
03:55.41blitz[laptop]crazy
03:55.49jsmithYup.
03:55.52jsmithAnyhoo...
03:56.25blitz[laptop]enjoy the f00tb4ll game
03:56.35blitz[laptop]I should pack up and get ready to head home in the morning
03:56.48jsmithAlrighty -- do that, just as soon as your query is working.
03:57.00jsmithSend me a text message if you need more help :_0
03:57.13blitz[laptop]then head to the hotel tomorrow night, meetup with Steve, and get ready for Meet Asterisk on Wed.
03:57.23blitz[laptop]I always get nervous when I get to speak in public...
04:00.49jsmithGah... just takes a little practice
04:01.04jsmithI get nervous too, but I've spoken enough times that I'm starting to get used to it.
04:01.34blitz[laptop]yah... just everytime I have to teach asterisk I realize just how little I know :)
04:05.03jsmithDon't we all :-)
04:05.12blitz[laptop]exactly :)
04:05.21jsmithBTW, your chan_local idea got me thinking, and I had a eureka moment the other night.
04:05.29jsmithSolved a stupid problem for a client w/ it :-)
04:05.47blitz[laptop]wicked!
04:05.54blitz[laptop]btw: it was Jim's idea
04:08.27blitz[laptop]hrmmm... pgadmin doesn't seem to have a "DO NOTHING"... only RESTRICT, CASCASE, SET NULL and SET DEFAULT
04:09.31blitz[laptop]back to the CLI for me I guess :)
04:11.41jsmithWell, it has to do something :-)
04:12.05jsmithDoing nothing is not an option, as you'd end up with a foreign key that referenced a non-existant address :-)
04:12.59jsmithIn your case you want to ON DELETE CASCADE ON UPDATE CASCADE for the account_id and group_id foreign keys, and ON DELETE SET NULL ON UPDATE CASCADE on the address_id foreign keys
04:53.38*** join/#asterisk-doc blitzrage (n=blitzrag@asterisk/documenteur-extraordinaire/blitzrage)
04:53.38*** mode/#asterisk-doc [+o blitzrage] by ChanServ
06:12.38*** join/#asterisk-doc blitzrage (n=blitzrag@asterisk/documenteur-extraordinaire/blitzrage)
06:12.39*** join/#asterisk-doc MatsK (n=mk@55.80-203-80.nextgentel.com)
06:12.39*** join/#asterisk-doc maik (n=maik@bfs.cs.uni-sb.de)
06:12.39*** join/#asterisk-doc locksy (n=nlocksy@mrtg.sisgroup.com.au)
06:12.39*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@pbxtech.com)
06:12.39*** mode/#asterisk-doc [+o blitzrage] by irc.freenode.net
06:23.00*** join/#asterisk-doc blitzrage (n=blitzrag@asterisk/documenteur-extraordinaire/blitzrage) [NETSPLIT VICTIM]
06:23.00*** join/#asterisk-doc MatsK (n=mk@55.80-203-80.nextgentel.com) [NETSPLIT VICTIM]
06:23.00*** join/#asterisk-doc maik (n=maik@bfs.cs.uni-sb.de) [NETSPLIT VICTIM]
06:23.00*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@pbxtech.com) [NETSPLIT VICTIM]
06:23.00*** join/#asterisk-doc locksy (n=nlocksy@mrtg.sisgroup.com.au) [NETSPLIT VICTIM]
06:23.00*** mode/#asterisk-doc [+o blitzrage] by irc.freenode.net
06:42.46*** join/#asterisk-doc MikeJ__ (n=ircatjer@d14-69-8-30.try.wideopenwest.com)
09:20.53*** join/#asterisk-doc vexorg (n=vexorg@CPE000021ded913-CM001225419164.cpe.net.cable.rogers.com)
10:13.49*** join/#asterisk-doc MatsK (n=mk@55.80-203-80.nextgentel.com)
13:24.18*** join/#asterisk-doc maik (n=maik@bfs.cs.uni-sb.de)
13:24.18*** join/#asterisk-doc locksy (n=nlocksy@mrtg.sisgroup.com.au)
14:09.10*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@64.5.53.45)
14:10.17*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@pbxtech.com)
14:11.22*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@pbxtech.com)
14:11.57*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@pbxtech.com)
14:13.02*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@pbxtech.com)
14:15.39*** join/#asterisk-doc asteriskgeeks (n=SIPdawg@pbxtech.com)
14:16.01asteriskgeeks<PROTECTED>
15:53.23*** join/#asterisk-doc MikeJ[Laptop] (n=ircatjer@mi.origenfinancial.com)
15:54.55*** join/#asterisk-doc jsmith (n=jsmith@64.0.193.247)
15:54.55*** mode/#asterisk-doc [+o jsmith] by ChanServ
16:08.53*** join/#asterisk-doc blitzrage (n=blitzrag@asterisk/documenteur-extraordinaire/blitzrage)
16:08.53*** mode/#asterisk-doc [+o blitzrage] by ChanServ
16:09.18blitzragejsmith!!!
16:13.05blitzragejsmith: so my servers HD died last night in a power outage
16:18.45jsmithOuch.
16:18.48jsmithYou're kidding.
16:20.27blitzragenope
16:20.32blitzragedied last night
16:20.53blitzrageIt comes up... and I did some fsck stuff, but then I was getting like KBDK... something
16:21.14blitzrageand then the filesystem was read only --then I rebooted, and kernel panic again
16:21.40blitzrageI'm hoping I can get another HD in there, install Linux again, and copy some stuff over to the new HD (if I can find one lying around here)
16:22.15blitzrageI get home... and I have to deal with this.... lovley ;)
16:22.58jsmithBoot off a live-CD and see what you can recover (by copying across the network to your laptop)
16:23.24blitzrageyah... I'll see if I can do that...
16:24.10jsmithIs this your development box?
16:26.12blitzrageI wish :)
16:26.29blitzragepbx / router / bugbot / traffic tracker (cacti)
16:27.35jsmithEeeeew.
16:27.40jsmithThat hurts.
16:27.49blitzrageyah
16:27.56blitzrageI had it working just the way I wanted it to
16:27.58blitzrage:)
16:29.26blitzrageok... I better go have a shower, change, and clean my bedroom -- its trashed...
16:29.39blitzrageconference call in an hour and a half too
16:31.07jsmithYou able to connect directly in, you you need to bounce through my server?
16:42.13blitzragenah, I'm back home now
16:42.54blitzrageso I have physical access to the HD
16:43.13blitzragefound an extra HD in the kitchen -- so I'll grab Knoppix and mount the old drive hopefully
17:10.07jsmithYou just had to start bragging, didn't ya :-)
17:30.14blitzrageyou would too :D
17:32.40jsmithShut up -- I'm allowed to brag, 'cuz I'm awesome :-)
18:09.50blitzragelol
18:09.52blitzrageI can't deny that
20:04.13jsmithBack from a tasty lunch...
20:09.10jsmithYou're a Leaf's fan?  Man, that explains a lot...
20:09.32blitzrageBlackhawks?!
20:09.35blitzragenow that explains a lot
20:09.37blitzrage:D
20:09.51blitzrageof course I'm a Leaf's fan -- thats why I live in Toronto :)
20:19.53jsmithYeah, or something like that :-)
20:21.14blitzragehahaha
20:21.25blitzrageI cheer for whoever beats Ottawa in the playoffs
20:21.32blitzrageoh -- and whoever beats Philidelphia too
20:22.06jsmithAt least you didn't say Pittsburg :-)
20:24.05blitzragenah... nothing to worry about there :)
20:25.33jsmith(Yeah, they've been downright awful)
20:26.01jsmithI did take my son to a minor league hockey game earlier this year, and he won a contest and got an autographed hockey stick.
20:31.11blitzragewicked!
20:31.20blitzragebtw, do you have the link to the asteriskdocs stats?
20:32.31blitzragenevermind, found it!
20:36.25blitzragedaaaaamn we get a lot of hits
20:36.30blitzrage18000 unique hits last month
20:37.44jsmithYup.
20:37.58blitzragenutty
20:38.02blitzrage5900 so far this month
20:38.05jsmithWe need some google ads, amazon affililate ads, etc. to buy us lunch :-)
20:38.13blitzrageand its only been 8 days :)
20:38.15blitzrageI agree!
20:38.30blitzragewith a percentage back to Greg for hosting for us
20:39.07jsmithI'm OK with that
20:41.32blitzrageBanner ID  Impressions  Imp. Left  Clicks  % Clicks  Client Name  Functions
20:41.32blitzrage8 23829 Unlimited 181 0.759% O'Reilly Edit | Delete
20:42.01blitzrageanyways... 23000 impressions with 181 clicks isn't too bad...
20:44.54jsmithNo, not at all...
20:46.15blitzrageoff to get f00d!
20:46.29blitzragethen finish cleaning my room, watch the Leafs game, hang a shelf, and head to the hotel
21:05.58*** join/#asterisk-doc blitzrage (n=blitzrag@asterisk/documenteur-extraordinaire/blitzrage)
21:05.58*** mode/#asterisk-doc [+o blitzrage] by ChanServ

Generated by irclog2html.pl by Jeff Waugh - find it at freshmeat.net! Modified by Tim Riker to work with blootbot logs, split per channel, etc.