First try on sip state machine