Archive

Archive for the ‘IT Blog’ Category

Exif on an iphone there’s an object for that!

September 20th, 2010 admin No comments
Categories: IT Blog Tags: ,

Use PCI-E cards on your notebook

July 9th, 2010 admin No comments

Today I had an interesting dilemma, do I suggest scrapping a perfectly good notebook in favour for a desktop PC which had PCI-e or do I try to see if there’s any way of adapting an ExpressCard slot into a PCI-e enclosure.

Fortunately someone else has obviously thought about this, and the solution already exists;

http://www.span.com/product_info.php?cPath=19_1300_1354&products_id=31697

Its a bit on the pricey side, but it allows you to have a box with a load of PCI-e devices and the ability to mount them to a notebook PC. Clever…

Categories: IT Blog Tags:

Sleep or Hibernate a Mac Book Pro

July 9th, 2010 admin No comments

Hello,

well that time has come when I made the leap from PC to Mac! Obviously I’ve already installed vmware fusion and windows 7, no need to panic. However I miss the hibernate feature of a PC.

Ok, for me I like to know my PC is properly off when I’m moving it and I often do something, hibernate, then grab my notebook and change location. But the mac is different. It sleeps in a semi-low power mode keeping everything in ram, which is fine, but I worry that the hard drive isn’t properly off and my battery is slowly maintaining something which I know I’m not going to need for a couple of hours.

so.. the outcome.

A Mac has many levels of sleep, which can be altered from the terminal by setting

sudo pmset -a hibernatemode 0

and toggling between 0 and 3

for those who would like to control this via the system preferences panel, these guys have written an app for that !

http://www.jinx.de/SmartSleep.html

and there’s also a widget available here http://www.axoniclabs.com/DeepSleep/

asp Lists

May 19th, 2010 admin No comments

asp lists -

List<int s = new List<int>();
s.Add(1);
s.Add(22);
s.Add(33);
customers.DataSource = s;
customers.DataBind();

<asp:Repeater id=”customers” runat=”server”>
<ItemTemplate>
<tr>
<td><%#Container.DataItem.ToString()%></td>
</tr>
</ItemTemplate>
</asp:Repeater>

source found on http://bytes.com/topic/asp-net/answers/567047-databinding-list-int

Categories: IT Blog Tags:

Formatting a RichTextbox in vb (.net)

May 14th, 2010 admin No comments

Notes on how to format richtextbox in vb.net

Dim Position As Int16 = 0
Position += string1.Length
rtb.SelectedText = string1
Dim string1 As String = “This is string1. Font=Arial: FontSize=14: Color=Blue” & vbNewLine
Dim myFont As New Font(“Arial”, 14, FontStyle.Regular, GraphicsUnit.Point)
Dim myColor As Color = Color.Blue
rtb.Select(Position, 0)
rtb.SelectionFont = myFont
rtb.SelectionColor = myColor
rtb.SelectedText = string1
Position += string1.Length
‘ String 2
string1 = “This is string2. Font=microsoft sans serif: FontSize=10: Color=Red” & vbNewLine
myFont = New Font(“microsoft sans serif”, 10, FontStyle.Regular, GraphicsUnit.Point)
myColor = Color.Red
rtb.Select(Position, 0)
rtb.SelectionFont = myFont
rtb.SelectionColor = myColor
rtb.SelectedText = string1
Position += string1.Length

‘ String 3
string1 = “This is string3. Font=courier new: FontSize=30: Color=Green: BOLD” & vbNewLine
myFont = New Font(“courier new”, 30, FontStyle.Bold, GraphicsUnit.Point)
myColor = Color.Green
rtb.Select(Position, 0)
rtb.SelectionFont = myFont
rtb.SelectionColor = myColor
rtb.SelectedText = string1
Postion += string1.Length

This Clip was sourced from http://www.daniweb.com/forums/thread98273.html

Categories: IT Blog Tags:

Sip Phone client for Iphone

May 13th, 2010 admin No comments

At long last … An official sip phone for the iphone which is available to regular iphones (i.e. non jailbroken ones).

http://www.wi-fone.org/

Will be checking this out in the next few days.

Had previously used fring but the lag via their proxy is quite echoey and the interface is trying to do too much for my liking – Keep it simple.

Categories: IT Blog Tags:

Random Linq

April 29th, 2010 admin No comments

First time programming in a while and realised that I needed a random row, In SQL (2005 onwards) thats fairly easy;

select top 4 * from table order by NewID()

however I’m not using SQL I’m using Linq..

the most basic solution is; count the rows, then get a random number in the range of the number of rows and return the row which matches the index.

var q = from r in db.TableBlobs
          select row;

int ncount = q.Count();
int nindex = new Random().Next(ncount);

Blobs blob = q.Skip(nindex).FirstOrDefault();

For a more advanced answer see here

Categories: IT Blog Tags:

Headsets that work with Polycom 320/321 Phones

April 28th, 2010 admin No comments

Here’s a list of headsets I’ve tried on polycom 320/321 phones.

My remit was to find the cheapest headset that work!

  • Plantronics M120 – bit basic, slightly echoey but works – £5 from amazon!
  • Plantronics M175/A – pretty good, sound quality fine – £ 25.
  • Plantronics Supra H Series Headset and a 2.5mm to quick release adaptor (p/n: 43038-01) – warning: there appears to be 4 different versions of this cable with a 2.5mm jack (p/n: 43038-01 is the right one) – adaptor ranges for £8-£15, headset from £55.

If continual use then i’d recommend the Supra Headset plus the adaptor, but if its for just some use then the M175 is pretty good, but it doesn’t have a quick release so becarefull of walking off with your phone dangling from your neck!

Multi threading in VS2010

April 21st, 2010 admin No comments

At last Microsoft have given us a way where we can use those multi-core processors, and the solution is vs2010

In Linq all you have to use is;

.Paralell.invoke(

()=>,.. {the action goes here}

)

The other way is with tasks, check out VS2010

Categories: IT Blog Tags: ,

A quick glimpse at Windows Mobile 7

April 21st, 2010 admin No comments

Last week I attended a couple of the UK Techdays provided by Microsoft. They were targeted at VS 2010 and Windows Mobile 7.

I think that they’ve made some significant changes, mostly internally such as changing their view on mobile and changing from something like 2-3 full time staff on windows mobile to a few hundred. They’ve realised that windows update never worked due to the millions of different versions (caused by allowing the operators to customise the builds) and have now created a model which definately looks more iphone like!

They are releasing a single OS for phone, and are only supporting devices with 5MP cameras and that support either 400px/800px screen depths. Sure that will probably annoy existing WM users however like me your probably used to replacing your phone to get a newer version of the OS! But it means that moving forward a supported device should be supported on later releases.

Ok now the interesting bit – all existing WM apps has been abandoned along with VB too! and the only apps which can now be deployed are silverlight ones which have been built for WM7 (or XNA) – oh the dev tools are free, which is nice but given that all apps are going to need to be re-written we need all the encouragement we can get since its all has to be done again!

From the demo’s on the day it all looks pretty cool so I’m quite looking forward .. however it does look like its a long wait until Xmas 2010.

Oh the only way to get an app on the phone is via the windows mobile market place (not quite a snappy name as the app store). So internal apps and so forth aren’t exactly going to be possible for the moment.

I so have to find a beta somewhere.. my WM6.5 looks crap in comparison !

developer.windowsphone.com

Windows 7 Key Notes from MIX 2010

channel9.msdn.com

Categories: IT Blog Tags:

Silverlight editing in the cloud .. interesting

April 21st, 2010 admin No comments

I found this http://code.msdn.microsoft.com/RCE and its quite interesting.

It apparently lets you edit video content on your server ready to be served up to clients. One to look at later I think

Categories: IT Blog Tags:

Sorting out new from Old in Active Directory

April 21st, 2010 admin No comments

Filtering out the new from the old – ok, in an ideal world you’d remember to delete a PC from active directory when it dies or gets replaced but that doesn’t often happen, so how do you know which PC’s are live and which aren’t?

http://ye110beard.spaces.live.com/Blog/cns!952F95CB5DE3F349!2215.entry?sa=723973866

(go get Quest Active Roles) then enter this into powershell;

$COMPAREDATE=GET-DATE

GET-QADCOMPUTER | WHERE { $_.ModificationDate.CompareTo( $COMPAREDATE.AddDays(-90) ) –eq $TRUE } | EXPORT-CSV C:\IDLECOMPUTERS.CSV

Combining this for any other use could end in disaster, beware! You have been warned.

This info is actually in the OU so I guess you dont need Quest Active Roles so one day I intend to update this with something that isn’t 3rd party related.

Avaya IP Office Asterisk/SIP Integration

April 6th, 2010 admin 2 comments

I found this great post http://www.tek-tips.com/faqs.cfm?fid=7248 which explains how to do it

I figured I’d post this HowTo on how to setup a SIP trunk between a IP Office and a Asterisks Phone system for intra extension dialing because I just spent the last 3 days trying to figure this out, and there seams to be plenty of articles on how to do this via H323, but there are very limited docs/HowTo’s on doing this via SIP.

At the end of the day, this was a lot simpler that I expected, but I learned alot in the process.

————————
Avaya IP Office Side:
————————

1) Create a new SIP Trunk (SIP Licenses are required for this)
2) The only thing you fill in here is the IP address of Asterisks/TrixBox. Please note that this config is done anonymously, so I assume the two machines are either on the same LAN or connected securely via a VPN, I would not recommenced this setup if you are doing this over the internet.

ITSP Domain:
IPSP IP : Asterisks IP
Prim Auth / Pass:
Eveything Else:

Check “in Service” box

3) Setup SIP URI – ADD a channel and set this to – Make sure to set the groups to something unique. I used group 420 for incoming and outgoing.

4) The other tabs can be left default settings

5) Create a short code for calling the Asterisk Box. The extension on my asterisks are 4xx. So my SC looks like this:

Code: 4XX ( Change this with your extension format )
Feature: Dial 3k1
Tel Number: 4N”@x.x.x.x” (Replace with IP of asterisks)
Line Group : 420 (Group Id Set in URI)

6) Create an Incoming Call Route Like this:

Bearer: Any Voice
Line Group : 420

 

Under Destination
Default Value is . (just a period)

7) Under Each User, make sure to set their Sip Name to their extension number under there SIP Tabs.

——————————-
ASTERISK SIDE VIA FreePBX GUI
——————————-

1) Create a SIP Trunk that looks like this:

Trunk Name: IPO
Peer Details:

host=x.x.x.x (IP of IP Office)
type=friend

2) Create an Outbound Route
Route name: IPOffice

Intra Company Route

Dial Patterns : 2XX ( Replace with the format of your IP Office extension )

Trunk Sequence: SIP\IPO

3) Under General Settings
Set “Allow Anonymous Inbound Sip Calls” to yes

That should be it, you should now be able to call back and forth between the 2 systems as if they are one.

Categories: IT Blog Tags: , ,

SIP Through a Juniper SSG5 Router

April 6th, 2010 admin No comments

I have various different sip voip suppliers and some are just fine, and others dont really work, so I spent a bit of time investigating and have found a solution.

Problem;

my sip phone works fine, then un-registers

Name/username              Host            Dyn Nat ACL Port     Status
655                        80.10.10.10     D   N   A   12345    UNREACHABLE

A bit annoying, so I tried adding layer 7 rules to my juniper router, and enabling ALG for SIP and various different combinations, none worked.

Then I logged the connections and noticed that they were being closed at 60 seconds, which co-insided with the logout from the asterisk server.

So, I went to objects, services, predefined, found SIP and clicked on EDIT

Service Name SIP
Service Timeout

Use protocol default

Never

Custom

(minutes)

Set the custom to 60 minutes and from what I can tell all is good.

Categories: IT Blog Tags: ,

Centrally Managing Polycom IP Phones

April 6th, 2010 admin 1 comment

Today I am mostly fiddling with Polycom 320/321/330/331 IP Phones.

On previous occasions I had configured the phone via their web config file but then came across little changes on a per phone basis which started to annoy me, so wanting to be consistent, I decided to go about managing the polycom phones centrally.

I think that the Polycom 320/321 offers good value at £70+vat per handset, they’re pretty full featured and dont take up all of your desk. Ok they dont have tonnes of pretty buttons which can change colour but honestly how many times have you actually used them?

Right then.

My network/scenario.

I have a managed VOIP server in the cloud, which I have a management interface to, it doesn’t have a fancy phone configuration manager so I allocate extensions manually.

I have a windows network.

Changes so far;

Windows Server

  • installed filezilla ftp server, configured a user called polycom gave it a password and a home directory with RWAD access
  • configured dhcp with option 66 (boot server) set to ftp://username:password@ipofserver

Phone configuration files.

I downloaded the latest 3.2 firmware and configuration from polycom and downloaded it into the polycom home directory.

Phone settings

When the phone first boots up – the the boot settings to use option 66. If you dont then it’ll probably skip the dhcp option.

Sources of information

www.sureteq.com – slightly outdated but good

polycom general overview of files

http://sipx-wiki.calivia.com/index.php/HowTo_configure_Polycom_SoundPoint_IP_phones_with_sipX

http://www.trixbox.org/forums/vendor-moderated-forums/polycom/polycom-ip-330-messages-button

http://www.upenn.edu/computing/voice/help/poly320_%20321%20quickguide%20v2.pdf

http://www.polycom.com/global/documents/support/user/products/voice/soundpoint_ip320_330_quick_user_guide.pdf