digraph moonshine_ua_fsm {
//	rankdir=LR
//	size="10,8"
	ratio=0.8 // !ah! might be off
//	rotate=90
	compound=true
	fontsize=18
	fontname="Helvetica"
	node [ fonstsize=8 fontname="Helvetica" ]
	graph
	[
//		ranksep=1.5 // modify to shrink nodes etc
//		nodesep=1.5
		fontsize=8
		fontname="Helvetica"
		labelfontsize=8
		labelfontname="Helvetica"
	]

	edge
	[
		fontname="Helvetica"	
		fontsize=8
		arrowhead=normal
	]

// Now setup labels and visual stuff.

	INIT
	[
		style=filled
		fillcolor=palegreen
                fixedsize=true
		shape=Mcircle 
	]

	INIT -> TRYING
		[ label="rcv(INV):\ntimerStart(TRYING)(<200ms)\npass(INV)" ]

        subgraph cluster_x {
                style=invis
                p1PROCEEDING
                p2PROCEEDING
        }

        TRYING -> p1PROCEEDING

        TRYING -> p2PROCEEDING

        p1PROCEEDING
        [
                fontsize=8
                shape=plaintext
                label="got(1xx):\nsnd(reponse)"
        ]

        p2PROCEEDING
        [
                fontsize=8
                shape=plaintext
                label="rcv(INV) | timerExpires(TRYING):\nsnd(100)"
        ]

        p1PROCEEDING -> PROCEEDING
        p2PROCEEDING -> PROCEEDING

        PROCEEDING -> p1PROCEEDING
        PROCEEDING -> p2PROCEEDING

        PROCEEDING -> pTxError

        pTxError
        [
                shape=plaintext
                label="transport error:\nnotify TU"
                fontsize=8
        ]

        pTxError -> DELETE

        PROCEEDING -> pCOMPLETED
        [ constraint=false ]

        pCOMPLETED -> COMPLETED

        pCOMPLETED
        [
                shape=plaintext
                fontsize=8
                label="got(300-699):\nsnd(response)"
        ]

        COMPLETED -> pTxError
        [
                constraint=false
        ]

        COMPLETED -> COMPLETED
        [
                label="expireTimer(G):\nsnd(response)\nG = 2G\nstartTimer(G)"
        ]

        COMPLETED -> COMPLETED
        [
                label="rcv(INVITE):\nsnd(response)"
        ]

        PROCEEDING -> pSTALE
        [ constraint=false ]

        pSTALE
        [
                shape=plaintext
                label="got(2XX):\nsetTimer(STALE),snd(response)"
                fontsize=8
        ]

        TRYING -> pCOMPLETED
        
        TRYING -> pSTALE
//        [ constraint = false ]

        pSTALE -> STALE
        [ constraint = false ]

        STALE -> STALE 
        [
                label="rcv(ACK):\nsnd to TU"
        ]


        STALE -> DELETE
        [
                label="timerExpires(STALE)"
        ]

        COMPLETED -> CONFIRMED
        [
                label="rcv(ACK):\nstartTimer(I)"
        ]

        CONFIRMED -> DELETE
        [
                label="expireTimer(I)"
        ]

        DELETE
 	[
		style=filled
		fillcolor=pink
		shape=doublecircle
                label=DEL
                fixedsize=true
	]

        LABEL_NODE
        [
         shape=plaintext
         fontsize=6
         label="Server INVITE FSM\n$Id: srv-inv-fsm.dot,v 1.3 2002/09/22 22:04:13 fluffy Exp $ $Name:  $" 
        ]
        

	// Fixups
}
