Module: kamailio
Branch: master
Commit: 2f9c0c4d2b6551bb0f8f1915d2585d96c3bca8cb
URL:
https://github.com/kamailio/kamailio/commit/2f9c0c4d2b6551bb0f8f1915d2585d9…
Author: Dennis Yurasov <dennis-y(a)yandex-team.ru>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-03-24T14:08:09+01:00
siptrace: add direction attribute to exported by module pseudo-variable
- Add direction attribute to event route siptrace pseudo-variable.
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2f9c0c4d2b6551bb0f8f1915d2585d9…
Patch:
https://github.com/kamailio/kamailio/commit/2f9c0c4d2b6551bb0f8f1915d2585d9…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 95c9b8ac7a..9540e83d06 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -2601,6 +2601,8 @@ int pv_get_siptrace(sip_msg_t *msg, pv_param_t *param,
return pv_get_strval(msg, param, res, &host);
case 9: /* dst_hostip */
return pv_get_strval(msg, param, res, &host);
+ case 10: /* direction */
+ return pv_get_strzval(msg, param, res, siptrace_event_data->dir);
default:
LM_ERR("unexpected config param\n");
return pv_get_null(msg, param, res);
@@ -2644,6 +2646,8 @@ int pv_parse_siptrace_name(pv_spec_t *sp, str *in)
sp->pvp.pvn.u.isname.name.n = 8;
else if(strncmp(in->s, "dst_hostip", 10)==0)
sp->pvp.pvn.u.isname.name.n = 9;
+ else if(strncmp(in->s, "direction", 10)==0)
+ sp->pvp.pvn.u.isname.name.n = 10;
else goto error;
break;
default: