Skip to content

Commit

Permalink
pv: pv_get_method fixed error "pv_get_method(): no CSEQ header"
Browse files Browse the repository at this point in the history
GH kamailio#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"}}
  • Loading branch information
sergey-safarov authored and miconda committed Jun 4, 2021
1 parent b775bbd commit de8c85c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/pv/pv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
{
Expand Down

0 comments on commit de8c85c

Please sign in to comment.