Using Sql Server 2008

So I have a Table called States and it has data like this:

```
DateTime                | skID | TZ | DomID | EventName | SKGrpID | State
--------------------------------------------------------------------------
2016-06-08 09:22:54.010 | 1234 | 1  | 222   | 0         | 4321    | 0
2016-06-08 09:22:54.000 | 1234 | 1  | 222   | 3         | 4321    | 3
2016-06-08 09:21:56.000 | 1234 | 1  | 222   | 8         | 4321    | 4
2016-06-08 09:19:00.000 | 1234 | 1  | 222   | 7         | 4321    | 4
2016-06-08 09:18:58.000 | 1234 | 1  | 222   | 4         | 4321    | 4
2016-06-08 09:13:06.000 | 1234 | 1  | 222   | 6         | 4321    | 6
2016-06-08 09:10:42.000 | 1234 | 1  | 222   | 4         | 4321    | 4
2016-06-08 09:10:40.000 | 1234 | 1  | 222   | 1         | 5555    | 1
2016-06-08 09:00:28.003 | 1234 | 1  | 222   | 1         | 4321    | 1

```

Rows can be thought of records for someone answering a phone. If the state is '4' it means they are talking on the phone and if it is anything else then they are not. The oldest records are at the bottom. So the third record at 9:10:42 is the start of a call and the record at 9:13:06 is the end of the call (state changed from 4 to 6.) 

Sometimes the call last over multiple events. so on the record for 9:18:58 a call starts and it continues to until the record at 9:21:56 (states start ->4,4,4,3 <-End)

I would like a query that somehow selects the start record and end record, joins them and gets a duration. The issue is I have no idea how I can select based off the state changing from a 4 to something else. I am also struggling to figure out how to select each of the start of each call (the start records would be a record with a state of 4 and the preceding record being something else (so like States 1, 4, 3, 6 , 4, 5 would be the second and 5th records would be call starts and 3 and 6 would be the ends of the calls. ))

ideal result would be something like 

```
StartTime, EndTime, Duration, skID, TZ, DomID, SKGrpID, StartEvent, StartState, EndEvent, EndState 

```

I am able to accomplish this currently in python by just querying all rows and then making dicts and matching the calls that way but I would like to do as much as possible in the SQL. Is doing this kind of select even possible?