I choose the names of the roles based on their functions since it would make the file more readable so R is Phone, S is Application, N is Network.
As the diagram shows the first message is sent from the phone do the network to request the generation of a new session key.
The keys where modeled using a custom usertype called ''SessionKey" and the time to live has modeled using a custom usertype called "Timestamp"
The Network then aswers to the Phone and the Application the keys and the time to live and the hashed value of that using a hash function named ''Mac".
The Phone and the Application verify the Mac and then the phone sends a nonce to the phone and the phone answers back with a new nonce and the original nonce.