Module: kamailio
Branch: master
Commit: 87d11496a15806481c9abf963c6dc13faa661b50
URL:
https://github.com/kamailio/kamailio/commit/87d11496a15806481c9abf963c6dc13…
Author: Victor Seva <vseva(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-04-12T10:56:24+02:00
dialog: dlg_get_var() support early dialogs
to_tag can be empty
---
Modified: src/modules/dialog/dialog.c
Modified: src/modules/dialog/doc/dialog_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/87d11496a15806481c9abf963c6dc13…
Patch:
https://github.com/kamailio/kamailio/commit/87d11496a15806481c9abf963c6dc13…
---
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 06cd2c75c7..947c4038ed 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 17600081f5..6350e2df52 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"))
</para>
</listitem>
<listitem>
- <para><emphasis>ttag</emphasis> - SIP To tag.
+ <para><emphasis>ttag</emphasis> - SIP To tag. Use "" value
to indicate early dialog.
</para>
</listitem>
<listitem>