Module: kamailio
Branch: master
Commit: deb3f4ab1516d33c3781927149e92c96cf789008
URL:
https://github.com/kamailio/kamailio/commit/deb3f4ab1516d33c3781927149e92c9…
Author: Alexandr Dubovikov <alexandr.dubovikov(a)gmail.com>
Committer: Alexandr Dubovikov <alexandr.dubovikov(a)gmail.com>
Date: 2018-09-27T11:59:42+02:00
module/sipcapture: added RPID parser for PPI field
---
Modified: src/modules/sipcapture/sipcapture.c
---
Diff:
https://github.com/kamailio/kamailio/commit/deb3f4ab1516d33c3781927149e92c9…
Patch:
https://github.com/kamailio/kamailio/commit/deb3f4ab1516d33c3781927149e92c9…
---
diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c
index 6f0108a055..df46d25fb2 100644
--- a/src/modules/sipcapture/sipcapture.c
+++ b/src/modules/sipcapture/sipcapture.c
@@ -67,6 +67,7 @@
#include "../../core/parser/parse_uri.h"
#include "../../core/parser/digest/digest.h"
#include "../../core/parser/parse_ppi_pai.h"
+#include "../../core/parser//parse_rpid.h"
#include "../../core/forward.h"
#include "../../core/pvar.h"
#include "../../core/str.h"
@@ -1921,6 +1922,16 @@ static int sip_capture(sip_msg_t *msg, str *_table,
LM_DBG("PARSE PPI: (%.*s)\n", ppi->uri.len, ppi->uri.s);
sco.pid_user = ppi->parsed_uri.user;
}
+ } else if((parse_rpid_header(msg) == 0) && (msg->rpid) &&
(msg->rpid->parsed)) {
+ to_body_t *rpid = get_rpid(msg);
+ if((rpid->parsed_uri.user.s == NULL)
+ && (parse_uri(rpid->uri.s, rpid->uri.len, &rpid->parsed_uri)
< 0)) {
+ LM_DBG("DEBUG: do_action: bad rpid: method:[%.*s] CID: [%.*s]\n",
+ sco.method.len, sco.method.s, sco.callid.len, sco.callid.s);
+ } else {
+ LM_DBG("PARSE RPID: (%.*s)\n",rpid->uri.len, rpid->uri.s);
+ sco.pid_user = rpid->parsed_uri.user;
+ }
} else {
EMPTY_STR(sco.pid_user);
}