Module: kamailio
Branch: master
Commit: de8c85ceae93779cdf7d6aea2eabb7567d69d7ce
URL:
https://github.com/kamailio/kamailio/commit/de8c85ceae93779cdf7d6aea2eabb75…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-04T16:22:49+02:00
pv: pv_get_method fixed error "pv_get_method(): no CSEQ header"
GH #2761: Error obeserver when sent HTTP reply like
HTTP/1.1 200 OK
Sia: SIP/2.0/TCP 8.8.8.8:39813
Content-Type: application/json
Server: kamailio
Content-Length: 49
{"data":{"status-code":200,"reason-phrase":"OK"}}
---
Modified: src/modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/de8c85ceae93779cdf7d6aea2eabb75…
Patch:
https://github.com/kamailio/kamailio/commit/de8c85ceae93779cdf7d6aea2eabb75…
---
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 5b011ea248..1b39ef3fb8 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -147,6 +147,9 @@ int pv_get_method(struct sip_msg *msg, pv_param_t *param,
(int)msg->first_line.u.request.method_value);
}
+ if (IS_HTTP_REPLY(msg))
+ return pv_get_null(msg, param, res);
+
if(msg->cseq==NULL && ((parse_headers(msg, HDR_CSEQ_F, 0)==-1) ||
(msg->cseq==NULL)))
{