diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 06cd2c75c7c..947c4038edf 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -1790,7 +1790,7 @@ static str *ki_dlg_get_var_helper(sip_msg_t *msg, str *sc, str *sf, str *st, str
LM_ERR("invalid From tag parameter\n");
return val;
}
- if(st==NULL || st->s==NULL || st->len == 0) {
+ if(st==NULL) {
LM_ERR("invalid To tag parameter\n");
return val;
}
@@ -1860,11 +1860,6 @@ static int w_dlg_get_var(struct sip_msg *msg, char *ci, char *ft, char *tt, char
LM_ERR("unable to get To Tag\n");
goto error;
}
- if(st.s==NULL || st.len == 0)
- {
- LM_ERR("invalid To tag parameter\n");
- goto error;
- }
if(fixup_get_svalue(msg, (gparam_p)key, &k)!=0)
{
LM_ERR("unable to get key name\n");
diff --git a/src/modules/dialog/doc/dialog_admin.xml b/src/modules/dialog/doc/dialog_admin.xml
index 17600081f5d..6350e2df528 100644
--- a/src/modules/dialog/doc/dialog_admin.xml
+++ b/src/modules/dialog/doc/dialog_admin.xml
@@ -2213,7 +2213,7 @@ if(dlg_get("abcdef", "123", "456"))
- ttag - SIP To tag.
+ ttag - SIP To tag. Use "" value to indicate early dialog.