fixed softphone state machine