Module: kamailio
Branch: master
Commit: 7ed447b680e718dc472d0e01005b842e5c7f8908
URL:
https://github.com/kamailio/kamailio/commit/7ed447b680e718dc472d0e01005b842…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-07-13T11:47:11+02:00
Merge pull request #233 from lazedo/lazedo/pv_digest
pv : add auth digest pseudo variables
---
Modified: modules/pv/pv.c
Modified: modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7ed447b680e718dc472d0e01005b842…
Patch:
https://github.com/kamailio/kamailio/commit/7ed447b680e718dc472d0e01005b842…
---
diff --git a/modules/pv/pv.c b/modules/pv/pv.c
index 11d899a..1145f86 100644
--- a/modules/pv/pv.c
+++ b/modules/pv/pv.c
@@ -123,6 +123,18 @@ static pv_export_t mod_pvs[] = {
{{"aa", (sizeof("aa")-1)}, /* auth algorithm */
PVT_OTHER, pv_get_authattr, 0,
0, 0, pv_init_iname, 6},
+ {{"adn", (sizeof("adn")-1)}, /* auth nonce */
+ PVT_OTHER, pv_get_authattr, 0,
+ 0, 0, pv_init_iname, 7},
+ {{"adc", (sizeof("adc")-1)}, /* auth cnonce */
+ PVT_OTHER, pv_get_authattr, 0,
+ 0, 0, pv_init_iname, 8},
+ {{"adr", (sizeof("adr")-1)}, /* auth response */
+ PVT_OTHER, pv_get_authattr, 0,
+ 0, 0, pv_init_iname, 9},
+ {{"ado", (sizeof("ado")-1)}, /* auth opaque */
+ PVT_OTHER, pv_get_authattr, 0,
+ 0, 0, pv_init_iname, 10},
{{"Au", (sizeof("Au")-1)}, /* */
PVT_OTHER, pv_get_acc_username, 0,
0, 0, pv_init_iname, 1},
diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c
index 9cbad39..239858c 100644
--- a/modules/pv/pv_core.c
+++ b/modules/pv/pv_core.c
@@ -1254,6 +1254,18 @@ int pv_get_authattr(struct sip_msg *msg, pv_param_t *param,
}
switch(param->pvn.u.isname.name.n)
{
+ case 10:
+ return pv_get_strval(msg, param, res,
+ &((auth_body_t*)(hdr->parsed))->digest.opaque);
+ case 9:
+ return pv_get_strval(msg, param, res,
+ &((auth_body_t*)(hdr->parsed))->digest.response);
+ case 8:
+ return pv_get_strval(msg, param, res,
+ &((auth_body_t*)(hdr->parsed))->digest.cnonce);
+ case 7:
+ return pv_get_strval(msg, param, res,
+ &((auth_body_t*)(hdr->parsed))->digest.nonce);
case 6:
return pv_get_strval(msg, param, res,
&((auth_body_t*)(hdr->parsed))->digest.alg.alg_str);