Module: kamailio Branch: master Commit: 9bba10f1684f078be9cbedbd1da05743bb3bf513 URL: https://github.com/kamailio/kamailio/commit/9bba10f1684f078be9cbedbd1da05743bb3bf513
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2025-10-10T15:57:48+02:00 core: added $iuid variable - return the instance unique id value --- Modified: src/core/pv_core.c --- Diff: https://github.com/kamailio/kamailio/commit/9bba10f1684f078be9cbedbd1da05743bb3bf513.diff Patch: https://github.com/kamailio/kamailio/commit/9bba10f1684f078be9cbedbd1da05743bb3bf513.patch --- diff --git a/src/core/pv_core.c b/src/core/pv_core.c index 214d78891c6..0d585a2d0b3 100644 --- a/src/core/pv_core.c +++ b/src/core/pv_core.c @@ -43,6 +43,15 @@ static int pv_get_retcode(struct sip_msg *msg, pv_param_t *p, pv_value_t *res) return pv_get_sintval(msg, p, res, _last_returned_code); } +extern str _ksr_iuid; + +static int pv_get_iuid(struct sip_msg *msg, pv_param_t *p, pv_value_t *res) +{ + if(_ksr_iuid.s == NULL) { + return pv_get_null(msg, p, res); + } + return pv_get_strval(msg, p, res, &_ksr_iuid); +} static int pv_parse_env_name(pv_spec_p sp, str *in) { @@ -278,6 +287,7 @@ static pv_export_t core_pvs[] = { 0, 0, 0}, {STR_STATIC_INIT("defs"), PVT_OTHER, pv_get_defs, 0, pv_parse_defs_name, 0, 0, 0}, + {STR_STATIC_INIT("iuid"), PVT_OTHER, pv_get_iuid, 0, 0, 0, 0, 0}, {{0, 0}, 0, 0, 0, 0, 0, 0, 0} }; _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
