Well to understand the difference between inside and outside dialog, I guess you need to understand what a dialog is. A dialog is a relationship between two endpoints which is identified by a combination of the callid, to-tag and from-tag. So for example messages like Re-Invite, BYE are considered as in-dialog messages as they can be identified by those three parameters Whereas an Initial Invite can be considered as an out-of-dialog message.(reason being we are still waiting for a response with the to-tag and a dialog has not been formed yet).