digraph G {
rankdir=TB
labelloc=t; label="lchan FSM"
	
	invisible [style="invisible"]
	UNUSED [penwidth=3.0]
	ESTABLISHED [penwidth=3.0]
	
	ts [label="timeslot FSM",shape=box3d]
	rtp [label="lchan_rtp\nFSM",shape=box3d]

	UNUSED -> WAIT_TS_READY [label="lchan_allocate()"]
	WAIT_TS_READY -> WAIT_ACTIV_ACK
	WAIT_ACTIV_ACK -> WAIT_RLL_RTP_ESTABLISH
	WAIT_RLL_RTP_ESTABLISH -> ESTABLISHED

	ESTABLISHED -> WAIT_RLL_RTP_RELEASED [label="LCHAN_EV_\nRELEASE"]
	WAIT_RLL_RTP_RELEASED -> WAIT_BEFORE_RF_RELEASE
	WAIT_RLL_RTP_RELEASED -> WAIT_RF_RELEASE_ACK [label="timeout",style=dashed,constraint=false]

	WAIT_BEFORE_RF_RELEASE -> WAIT_RF_RELEASE_ACK [label="T3111"]
	WAIT_RF_RELEASE_ACK -> UNUSED
	WAIT_RF_RELEASE_ACK -> WAIT_AFTER_ERROR [label="release was\ndue to error"]
	WAIT_AFTER_ERROR -> UNUSED [label="T3111+2s"]

	WAIT_TS_READY -> ts [label="TS_EV_\nLCHAN_\nREQUESTED",style=dotted,penwidth=3]
	UNUSED -> ts [label="TS_EV_\nLCHAN_\nUNUSED",style=dotted,penwidth=3]
	ts -> WAIT_TS_READY [label="LCHAN_EV_\nTS_READY",style=dotted]

	WAIT_TS_READY -> rtp [label="TCH",style=dotted]

	WAIT_TS_READY -> UNUSED [label="error/timeout",style=dashed,constraint=false]
	{WAIT_ACTIV_ACK,WAIT_RF_RELEASE_ACK} -> BORKEN [label="error/timeout",style=dashed]
	BORKEN -> WAIT_AFTER_ERROR [label="late RF Release ACK"]
	WAIT_RLL_RTP_ESTABLISH -> WAIT_RLL_RTP_RELEASED [label=error,style=dashed]

	WAIT_ACTIV_ACK -> rtp [label="LCHAN_RTP_EV_LCHAN_READY",style=dotted]
	rtp -> WAIT_RLL_RTP_ESTABLISH [label="LCHAN_EV_RTP_READY",style=dotted]
	rtp -> ESTABLISHED [label="LCHAN_EV_RTP_RELEASED",style=dotted]

	ESTABLISHED -> WAIT_RR_CHAN_MODE_MODIFY_ACK [label="LCHAN_EV_REQUEST_MODE_MODIFY"]
	WAIT_RR_CHAN_MODE_MODIFY_ACK -> WAIT_RSL_CHAN_MODE_MODIFY_ACK [label="LCHAN_EV_RR_CHAN_MODE_MODIFY_ACK"]
	WAIT_RSL_CHAN_MODE_MODIFY_ACK -> WAIT_RLL_RTP_ESTABLISH [label="LCHAN_EV_RSL_CHAN_MODE_MODIFY_ACK\nwhen adding RTP"]
	WAIT_RSL_CHAN_MODE_MODIFY_ACK -> ESTABLISHED [label="LCHAN_EV_RSL_CHAN_MODE_MODIFY_ACK\nno change to RTP"]
	WAIT_RR_CHAN_MODE_MODIFY_ACK -> BORKEN [label="error/timeout",style=dashed]
	WAIT_RSL_CHAN_MODE_MODIFY_ACK -> BORKEN [label="error/timeout",style=dashed]
}
