If UE wants to send ESM information related to a PDN connectivity in ciphered way then the ESM Information request procedure is executed by MME. Now question how a MME make out whether it need to execute ESM Information request procedure or not.
Actually while sending PDN connectivity request message , UE sets "ESM information transfer flag" within the message. After receiving this message, MME first establishes security context and then executes ESM information exchange procedure.
Both UE and MME maintains states while executing this procedure
There are mainly two states as following involve in the ESM Information Procedure :
1- PROCEDURE TRANSACTION INACTIVE
2- PROCEDURE TRANSACTION PENDING