Module: kamailio
Branch: master
Commit: 4a4689366aee9517ed90cf2df1a4e90018b9948d
URL:
https://github.com/kamailio/kamailio/commit/4a4689366aee9517ed90cf2df1a4e90…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-08-15T14:41:12+02:00
tm: added cseq number field to uac_req structure
---
Modified: src/modules/tm/uac.c
Modified: src/modules/tm/uac.h
---
Diff:
https://github.com/kamailio/kamailio/commit/4a4689366aee9517ed90cf2df1a4e90…
Patch:
https://github.com/kamailio/kamailio/commit/4a4689366aee9517ed90cf2df1a4e90…
---
diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c
index 5384d826dd8..b40a1e74d09 100644
--- a/src/modules/tm/uac.c
+++ b/src/modules/tm/uac.c
@@ -1086,6 +1086,7 @@ int request(uac_req_t *uac_r, str *ruri, str *to, str *from, str
*next_hop)
str callid, fromtag;
dlg_t *dialog;
int res;
+ unsigned int cseqno;
if(check_params(uac_r, to, from) < 0)
goto err;
@@ -1094,9 +1095,10 @@ int request(uac_req_t *uac_r, str *ruri, str *to, str *from, str
*next_hop)
generate_callid(&callid);
else
callid = *uac_r->callid;
+ cseqno = (uac_r->cseqno > 0) ? uac_r->cseqno : DEFAULT_CSEQ;
generate_fromtag(&fromtag, &callid, ruri);
- if(new_dlg_uac(&callid, &fromtag, DEFAULT_CSEQ, from, to, &dialog) < 0)
{
+ if(new_dlg_uac(&callid, &fromtag, cseqno, from, to, &dialog) < 0) {
LM_ERR("Error while creating temporary dialog\n");
goto err;
}
diff --git a/src/modules/tm/uac.h b/src/modules/tm/uac.h
index 6fad3380cd8..05a8614d8f8 100644
--- a/src/modules/tm/uac.h
+++ b/src/modules/tm/uac.h
@@ -51,6 +51,7 @@ typedef struct uac_req
transaction_cb *cb;
void *cbp;
str *callid;
+ unsigned int cseqno;
} uac_req_t;
/* macro for setting the values of uac_req_t struct */