From 2e85af56fda9b2d7795d3ba0cc04e0f882f398ad Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sun, 6 Nov 2016 18:07:22 +0200 Subject: [PATCH 01/10] modules/siputils: whitespace cleanup --- modules/siputils/chargingvector.c | 34 ++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index 6d020001365..8dc5ddb4175 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -30,15 +30,15 @@ #include "chargingvector.h" #define SIZE_CONF_ID 16 -#define P_CHARGING_VECTOR "P-Charging-Vector" -#define LOOPBACK_IP 16777343 +#define P_CHARGING_VECTOR "P-Charging-Vector" +#define LOOPBACK_IP 16777343 -#define PVC_BUF_SIZE 256 +#define PVC_BUF_SIZE 256 static char pcv_buf[PVC_BUF_SIZE]; static str pcv = { pcv_buf, 0 }; static str pcv_host = { NULL, 0 }; static str pcv_id = { NULL, 0 }; -static uint64_t counter = 0 ; +static uint64_t counter = 0; enum PCV_Status { @@ -54,15 +54,15 @@ static void sip_generate_charging_vector(char * pcv) { char s[PATH_MAX] = {0}; struct hostent* host = NULL; - int cdx = 0 ; - int tdx = 0 ; - int idx = 0 ; - int ipx = 0 ; + int cdx = 0; + int tdx = 0; + int idx = 0; + int ipx = 0; int pid; - uint64_t ct = 0 ; + uint64_t ct = 0; struct in_addr* in = NULL; static struct in_addr ip = {0}; - unsigned char newConferenceIdentifier[SIZE_CONF_ID]={0}; + unsigned char newConferenceIdentifier[SIZE_CONF_ID]={0}; memset(pcv,0,SIZE_CONF_ID); pid = getpid(); @@ -79,7 +79,7 @@ static void sip_generate_charging_vector(char * pcv) in = (struct in_addr*)host->h_addr_list[idx]; if (in->s_addr == LOOPBACK_IP ) { - if ( ip.s_addr == 0 ) + if ( ip.s_addr == 0 ) { ip=*in; } @@ -129,11 +129,11 @@ static void sip_generate_charging_vector(char * pcv) idx++; } LM_DBG("CV generate"); - int i =0; + int i = 0; pcv[0] = '\0'; for ( i = 0 ; i < SIZE_CONF_ID ; i ++ ) { - char hex[4] = {0 }; + char hex[4] = {0}; snprintf(hex,4,"%02X",newConferenceIdentifier[i]); strcat(pcv,hex); @@ -160,7 +160,9 @@ static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) /* now point to each PCV component */ LM_DBG("acc: parsing PCV header [%s].\n", pvc_value); - char *s = strstr(pvc_value, "icid-value="); + char *s = NULL; + + s = strstr(pvc_value, "icid-value="); if (s != NULL) { pcv_id.s = s + strlen("icid-value="); @@ -189,7 +191,7 @@ static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) } // Buggy charging vector where only icid-value is sent ... - if ( pcv_host.s == NULL && pcv_id.s == NULL && len > 0) + if ( pcv_host.s == NULL && pcv_id.s == NULL && len > 0) { pcv_id.s = (char *) pvc_value, pcv_id.len = sip_param_end(pcv_id.s, len); @@ -290,7 +292,7 @@ static int sip_add_charging_vector(struct sip_msg *msg) return -1; } - s = (char*)pkg_malloc(pcv.len); + s = (char*)pkg_malloc(pcv.len); if (!s) { LM_ERR("no pkg memory left\n"); return -1; From 6dbc20dd07935346065de67341aae460f9c57177 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sun, 6 Nov 2016 22:21:43 +0200 Subject: [PATCH 02/10] modules/siputils: adjust logging to be more accurate and less verbose --- modules/siputils/chargingvector.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index 8dc5ddb4175..f010506502a 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -158,7 +158,7 @@ static unsigned int sip_param_end(const char * s, unsigned int len) static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) { /* now point to each PCV component */ - LM_DBG("acc: parsing PCV header [%s].\n", pvc_value); + LM_DBG("parsing PCV header [%s]\n", pvc_value); char *s = NULL; @@ -167,7 +167,7 @@ static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) { pcv_id.s = s + strlen("icid-value="); pcv_id.len = sip_param_end(pcv_id.s, len); - LM_INFO("acc: parsed P-Charging-Vector icid-value=%.*s", + LM_DBG("parsed P-Charging-Vector icid-value=%.*s\n", pcv_id.len, pcv_id.s ); } else @@ -181,7 +181,7 @@ static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) { pcv_host.s = s + strlen("icid-generated-at="); pcv_host.len = sip_param_end(pcv_id.s, len); - LM_DBG("acc: parsed P-Charging-Vector icid-generated-at=%.*s", + LM_DBG("parsed P-Charging-Vector icid-generated-at=%.*s\n", pcv_host.len, pcv_host.s ); } else @@ -195,7 +195,7 @@ static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) { pcv_id.s = (char *) pvc_value, pcv_id.len = sip_param_end(pcv_id.s, len); - LM_WARN("acc: parsed BUGGY P-Charging-Vector %.*s", pcv_id.len, pcv_id.s ); + LM_WARN("parsed BUGGY P-Charging-Vector %.*s\n", pcv_id.len, pcv_id.s ); } return (pcv_id.s != NULL); @@ -218,13 +218,13 @@ static int sip_get_charging_vector(struct sip_msg *msg, struct hdr_field ** hf_p { if ( hf->name.s[0] == 'P' ) { - LM_INFO("acc: checking heander=%.*s\n", hf->name.len, hf->name.s ); + LM_DBG("checking header=%.*s\n", hf->name.len, hf->name.s ); } if ( cmp_hdrname_str(&hf->name, &hdrname) == 0) { /* - * append p charging vector valus after the header name "P-Charging-Vector" and + * append p charging vector values after the header name "P-Charging-Vector" and * the ": " (+2) */ char * pcv_body = pcv_buf + strlen(P_CHARGING_VECTOR) + 2; @@ -246,7 +246,7 @@ static int sip_get_charging_vector(struct sip_msg *msg, struct hdr_field ** hf_p } else { - pcv_id.s =0; + pcv_id.s = 0; pcv_id.len = 0; pcv_host.s = 0; pcv_host.len = 0; @@ -255,7 +255,7 @@ static int sip_get_charging_vector(struct sip_msg *msg, struct hdr_field ** hf_p *hf_pcv = hf; } } - LM_INFO("No valid P-Charging-Vector header found.\n"); + LM_DBG("No valid P-Charging-Vector header found.\n"); return 1; } @@ -351,7 +351,7 @@ int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2) sip_get_charging_vector(msg, &hf_pcv); /* - * We need to remove the original PCV if it was present and ether + * We need to remove the original PCV if it was present and either * we were asked to remove it or we were asked to replace it */ if ( pcv_status == PCV_PARSED && (replace_pcv || remove_pcv) ) @@ -416,7 +416,7 @@ int pv_get_charging_vector(struct sip_msg *msg, pv_param_t *param, pv_value_t *r { current_msg_id = msg->id; } - LM_DBG("Parsed charging vector for pseudo-var \n"); + LM_DBG("Parsed charging vector for pseudo-var\n"); } else { @@ -426,7 +426,9 @@ int pv_get_charging_vector(struct sip_msg *msg, pv_param_t *param, pv_value_t *r switch(pcv_status) { case PCV_GENERATED: + LM_DBG("pcv_status==PCV_GENERATED\n"); case PCV_PARSED: + LM_DBG("pcv_status==PCV_PARSED\n"); switch( param->pvn.u.isname.name.n ) { case 2: From 3ee6f19c1994952aa5588ccb6b6986ce4c176e6a Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sun, 6 Nov 2016 22:25:16 +0200 Subject: [PATCH 03/10] modules/siputils: fix variable typo --- modules/siputils/chargingvector.c | 22 +++++++++++----------- modules/siputils/siputils.c | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index f010506502a..08a7e7de4d7 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -33,8 +33,8 @@ #define P_CHARGING_VECTOR "P-Charging-Vector" #define LOOPBACK_IP 16777343 -#define PVC_BUF_SIZE 256 -static char pcv_buf[PVC_BUF_SIZE]; +#define PCV_BUF_SIZE 256 +static char pcv_buf[PCV_BUF_SIZE]; static str pcv = { pcv_buf, 0 }; static str pcv_host = { NULL, 0 }; static str pcv_id = { NULL, 0 }; @@ -128,7 +128,7 @@ static void sip_generate_charging_vector(char * pcv) } idx++; } - LM_DBG("CV generate"); + LM_DBG("PCV generate\n"); int i = 0; pcv[0] = '\0'; for ( i = 0 ; i < SIZE_CONF_ID ; i ++ ) @@ -155,14 +155,14 @@ static unsigned int sip_param_end(const char * s, unsigned int len) return len; } -static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) +static int sip_parse_charging_vector(const char * pcv_value, unsigned int len) { /* now point to each PCV component */ - LM_DBG("parsing PCV header [%s]\n", pvc_value); + LM_DBG("parsing PCV header [%s]\n", pcv_value); char *s = NULL; - s = strstr(pvc_value, "icid-value="); + s = strstr(pcv_value, "icid-value="); if (s != NULL) { pcv_id.s = s + strlen("icid-value="); @@ -176,7 +176,7 @@ static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) pcv_id.len = 0; } - s = strstr(pvc_value, "icid-generated-at="); + s = strstr(pcv_value, "icid-generated-at="); if (s != NULL) { pcv_host.s = s + strlen("icid-generated-at="); @@ -193,7 +193,7 @@ static int sip_parse_charging_vector(const char * pvc_value, unsigned int len) // Buggy charging vector where only icid-value is sent ... if ( pcv_host.s == NULL && pcv_id.s == NULL && len > 0) { - pcv_id.s = (char *) pvc_value, + pcv_id.s = (char *) pcv_value, pcv_id.len = sip_param_end(pcv_id.s, len); LM_WARN("parsed BUGGY P-Charging-Vector %.*s\n", pcv_id.len, pcv_id.s ); } @@ -259,7 +259,7 @@ static int sip_get_charging_vector(struct sip_msg *msg, struct hdr_field ** hf_p return 1; } -// Remove PVC if it is in the inbound request (if it was found by sip_get_charging_vector) +// Remove PCV if it is in the inbound request (if it was found by sip_get_charging_vector) static int sip_remove_charging_vector(struct sip_msg *msg, struct hdr_field *hf) { struct lump* l; @@ -381,7 +381,7 @@ int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2) sip_generate_charging_vector(pcv_value); - pcv.len = snprintf( pcv_body, PVC_BUF_SIZE - 19, "icid-value=%.*s; icid-generated-at=%.*s\r\n", 32, pcv_value, + pcv.len = snprintf( pcv_body, PCV_BUF_SIZE - 19, "icid-value=%.*s; icid-generated-at=%.*s\r\n", 32, pcv_value, msg->rcv.bind_address->address_str.len, msg->rcv.bind_address->address_str.s ); pcv.len += 19; @@ -391,7 +391,7 @@ int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2) /* if generated, reparse it */ sip_parse_charging_vector( pcv_body, pcv.len-19 ); /* if it was generated, we need to send it out as a header */ - LM_INFO("Generated PCV header %.*s.\n", pcv.len, pcv_buf ); + LM_INFO("Generated PCV header %.*s\n", pcv.len, pcv_buf ); i = sip_add_charging_vector(msg); if (i <= 0) { diff --git a/modules/siputils/siputils.c b/modules/siputils/siputils.c index db35a247471..156c8496567 100644 --- a/modules/siputils/siputils.c +++ b/modules/siputils/siputils.c @@ -199,7 +199,7 @@ static param_export_t params[] = { static pv_export_t mod_pvs[] = { - { {"pcv", (sizeof("pvc")-1)}, PVT_OTHER, pv_get_charging_vector, + { {"pcv", (sizeof("pcv")-1)}, PVT_OTHER, pv_get_charging_vector, 0, pv_parse_charging_vector_name, 0, 0, 0}, { {0, 0}, 0, 0, 0, 0, 0, 0, 0 } From 7d1761268615b37f3a0fc49de14b1029c5a27fec Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sun, 6 Nov 2016 22:34:04 +0200 Subject: [PATCH 04/10] modules/siputils: do not log CRLF --- modules/siputils/chargingvector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index 08a7e7de4d7..a8e8270661a 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -391,7 +391,7 @@ int sip_handle_pcv(struct sip_msg *msg, char *flags, char *str2) /* if generated, reparse it */ sip_parse_charging_vector( pcv_body, pcv.len-19 ); /* if it was generated, we need to send it out as a header */ - LM_INFO("Generated PCV header %.*s\n", pcv.len, pcv_buf ); + LM_INFO("Generated PCV header %.*s\n", pcv.len-2, pcv_buf ); i = sip_add_charging_vector(msg); if (i <= 0) { From f2f789eb40c379c9ebe12e0588e521680951e017 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sun, 6 Nov 2016 22:42:09 +0200 Subject: [PATCH 05/10] modules/siputils: do not log every P -header, shortcut loop instead --- modules/siputils/chargingvector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index a8e8270661a..51d113e759c 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -216,9 +216,9 @@ static int sip_get_charging_vector(struct sip_msg *msg, struct hdr_field ** hf_p for (hf=msg->headers; hf; hf=hf->next) { - if ( hf->name.s[0] == 'P' ) + if ( hf->name.s[0] != 'P' ) { - LM_DBG("checking header=%.*s\n", hf->name.len, hf->name.s ); + continue; } if ( cmp_hdrname_str(&hf->name, &hdrname) == 0) From 8d5705380ac7b79f22a61ea117ecb1cfd31b2efc Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sun, 6 Nov 2016 22:45:47 +0200 Subject: [PATCH 06/10] modules/siputils: fix $pcv(genaddr) length issue $pcv(genaddr) was truncated when field "icid-value" was shorter than field "icid-generated-at" --- modules/siputils/chargingvector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index 51d113e759c..7e64a52da4e 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -180,7 +180,7 @@ static int sip_parse_charging_vector(const char * pcv_value, unsigned int len) if (s != NULL) { pcv_host.s = s + strlen("icid-generated-at="); - pcv_host.len = sip_param_end(pcv_id.s, len); + pcv_host.len = sip_param_end(pcv_host.s, len); LM_DBG("parsed P-Charging-Vector icid-generated-at=%.*s\n", pcv_host.len, pcv_host.s ); } From eecc0a1ae7a4f4d243ebbe713dd884493611b45c Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Sun, 6 Nov 2016 23:59:07 +0200 Subject: [PATCH 07/10] modules/siputils: do not let $pcv(value) to contain invalid value --- modules/siputils/chargingvector.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index 7e64a52da4e..48bc125f594 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -172,6 +172,7 @@ static int sip_parse_charging_vector(const char * pcv_value, unsigned int len) } else { + LM_WARN("mandatory icid-value not found\n"); pcv_id.s = NULL; pcv_id.len = 0; } @@ -186,16 +187,15 @@ static int sip_parse_charging_vector(const char * pcv_value, unsigned int len) } else { + LM_DBG("icid-generated-at not found\n"); pcv_host.s = NULL; pcv_host.len = 0; } - // Buggy charging vector where only icid-value is sent ... - if ( pcv_host.s == NULL && pcv_id.s == NULL && len > 0) + // only icid-value is mandatory, log anyway when missing icid-generated-at + if ( pcv_host.s == NULL && pcv_id.s != NULL && len > 0) { - pcv_id.s = (char *) pcv_value, - pcv_id.len = sip_param_end(pcv_id.s, len); - LM_WARN("parsed BUGGY P-Charging-Vector %.*s\n", pcv_id.len, pcv_id.s ); + LM_WARN("icid-generated-at is missing %.*s\n", len, pcv_value); } return (pcv_id.s != NULL); From 0364383549f69241037a96a5e5e20179b2ac6efe Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Mon, 7 Nov 2016 00:04:24 +0200 Subject: [PATCH 08/10] modules/siputils: populate $pcv(all) after succesful parse --- modules/siputils/chargingvector.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index 48bc125f594..ab9f2758d0f 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -237,10 +237,15 @@ static int sip_get_charging_vector(struct sip_msg *msg, struct hdr_field ** hf_p if ( sip_parse_charging_vector( pcv_body, hf->body.len ) == 0) { LM_ERR("P-Charging-Vector header found but failed to parse value [%s].\n", pcv_body); + pcv_status = PCV_NONE; + pcv.s = NULL; + pcv.len = 0; } else { pcv_status = PCV_PARSED; + pcv.s = hf->body.s; + pcv.len = hf->body.len; } return 2; } From c2235f12957c5ffccbc6c1bfaf3fbb673394b1ec Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Mon, 7 Nov 2016 01:38:04 +0200 Subject: [PATCH 09/10] modules/siputils: add P-Charging-Vector related pseudo variables pcv(orig) - orig-ioi field pcv(term) - term-ioi field --- modules/siputils/chargingvector.c | 45 ++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c index ab9f2758d0f..2d61b14a5a5 100644 --- a/modules/siputils/chargingvector.c +++ b/modules/siputils/chargingvector.c @@ -36,8 +36,10 @@ #define PCV_BUF_SIZE 256 static char pcv_buf[PCV_BUF_SIZE]; static str pcv = { pcv_buf, 0 }; -static str pcv_host = { NULL, 0 }; static str pcv_id = { NULL, 0 }; +static str pcv_host = { NULL, 0 }; +static str pcv_orig = { NULL, 0 }; +static str pcv_term = { NULL, 0 }; static uint64_t counter = 0; @@ -192,6 +194,34 @@ static int sip_parse_charging_vector(const char * pcv_value, unsigned int len) pcv_host.len = 0; } + s = strstr(pcv_value, "orig-ioi="); + if (s != NULL) + { + pcv_orig.s = s + strlen("orig-ioi="); + pcv_orig.len = sip_param_end(pcv_orig.s, len); + LM_INFO("parsed P-Charging-Vector orig-ioi=%.*s\n", + pcv_orig.len, pcv_orig.s ); + } + else + { + pcv_orig.s = NULL; + pcv_orig.len = 0; + } + + s = strstr(pcv_value, "term-ioi="); + if (s != NULL) + { + pcv_term.s = s + strlen("term-ioi="); + pcv_term.len = sip_param_end(pcv_term.s, len); + LM_INFO("parsed P-Charging-Vector term-ioi=%.*s\n", + pcv_term.len, pcv_term.s ); + } + else + { + pcv_term.s = NULL; + pcv_term.len = 0; + } + // only icid-value is mandatory, log anyway when missing icid-generated-at if ( pcv_host.s == NULL && pcv_id.s != NULL && len > 0) { @@ -436,6 +466,12 @@ int pv_get_charging_vector(struct sip_msg *msg, pv_param_t *param, pv_value_t *r LM_DBG("pcv_status==PCV_PARSED\n"); switch( param->pvn.u.isname.name.n ) { + case 5: + pcv_pv = pcv_term; + break; + case 4: + pcv_pv = pcv_orig; + break; case 2: pcv_pv = pcv_host; break; @@ -477,6 +513,13 @@ int pv_parse_charging_vector_name(pv_spec_p sp, str *in) sp->pvp.pvn.u.isname.name.n = 1; else goto error; break; + case 4: + if(strncmp(in->s, "orig", 4)==0) + sp->pvp.pvn.u.isname.name.n = 4; + else if(strncmp(in->s, "term", 4)==0) + sp->pvp.pvn.u.isname.name.n = 5; + else goto error; + break; case 5: if(strncmp(in->s, "value", 5)==0) sp->pvp.pvn.u.isname.name.n = 3; From 345bbbe24a769a01122f4c28f82d2d68c802ef09 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Mon, 7 Nov 2016 01:43:45 +0200 Subject: [PATCH 10/10] modules/siputils: document P-Charging-Vector related pseudo variables --- modules/siputils/chargingvector.h | 13 ++++++---- modules/siputils/doc/siputils_admin.xml | 32 ++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/modules/siputils/chargingvector.h b/modules/siputils/chargingvector.h index c171672327b..cb7ef8136fd 100644 --- a/modules/siputils/chargingvector.h +++ b/modules/siputils/chargingvector.h @@ -19,19 +19,22 @@ */ /* - * Support for rfc3455 P-Charging-Vector + * Support for RFC3455 / RFC7315 P-Charging-Vector * - parse charging vector from SIP message * - generate new unique charging vector * - can remove charging vector * - * pseudo variables are exported and enable R ondly access to charging vector fields + * pseudo variables are exported and enable read only access to charging vector fields * $pcv(all) = whole field * $pcv(value) = icid-value field (see RFC3455 section 5.6) * $pcv(genaddr) = icid-generated-at field (see RFC3455 section 5.6) + * $pcv(orig) = orig-ioi field (see RFC3455 section 5.6) + * $pcv(term) = term-ioi field (see RFC3455 section 5.6) * - * to be supported - * $pcv(orig) - * $pcv(term) + * missing: + * $pcv(transit-ioi) RFC7315 5.6 + * $pcv(related-icid) RFC7315 5.6 + * $pcv(related-icid-gen-addr) RFC7315 5.6 */ #ifndef _CHARGINGVECTOR_H_ diff --git a/modules/siputils/doc/siputils_admin.xml b/modules/siputils/doc/siputils_admin.xml index 208ee3a7174..ccca9581f14 100644 --- a/modules/siputils/doc/siputils_admin.xml +++ b/modules/siputils/doc/siputils_admin.xml @@ -1066,7 +1066,7 @@ if(is_first_hop()) { ... } sip_p_charging_vector(flags) - Manage the P-Charging-Vector header (RFC3455). The flags can be: + Manage the P-Charging-Vector header (RFC7315). The flags can be: 'r' - remove; 'g' - generate; 'f' - force (remove + generate). @@ -1083,4 +1083,34 @@ sip_p_charging_vector("g"); +
+ Exported pseudo-variables +
+ <varname>$pcv(all) + + full P-Charging-Vector header + +
+ <varname>$pcv(value) + + icid-value field (see RFC7315 section 5.6) + +
+ <varname>$pcv(genaddr) + + icid-generated-at field (see RFC7315 section 5.6) + +
+ <varname>$pcv(orig) + + orig-ioi field (see RFC7315 section 5.6) + +
+ <varname>$pcv(term) + + term-ioi field (see RFC7315 section 5.6) + +
+
+