Module: kamailio
Branch: master
Commit: 8c1e60cfb67f82cab70c8130d4f035ce7e294f17
URL:
https://github.com/kamailio/kamailio/commit/8c1e60cfb67f82cab70c8130d4f035c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2018-09-27T12:41:40+02:00
Merge pull request #1653 from adubovikov/master
sipcapture: added RPID parser for PPI field
---
Modified: src/modules/sipcapture/sipcapture.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8c1e60cfb67f82cab70c8130d4f035c…
Patch:
https://github.com/kamailio/kamailio/commit/8c1e60cfb67f82cab70c8130d4f035c…
---
diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c
index 6f0108a055..7485d5a418 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);
}