This structure describes the dialog structure. Application MUST NOT try to SET the values here directly, but instead it MUST use the appropriate dialog API. The dialog declaration only needs to be made visible because other PJSIP modules need to see it (e.g. INVITE session, the event framework, etc.).
Application MAY READ the dialog contents directly after it acquires dialog lock.
To acquire dialog lock, use pjsip_dlg_inc_lock(), and to release it, use pjsip_dlg_dec_lock(). DO NOT USE pj_mutex_lock()/pj_mutex_unlock() on the dialog's mutex directly, because this will not protect against dialog being destroyed.
Forward declaration for dialog (sip_dialog.h).