MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / get_method_from_reply

Function get_method_from_reply

modules/mediaproxy/mediaproxy.c:1036–1054  ·  view source on GitHub ↗

will return the method ID for a reply by inspecting the Cseq header

Source from the content-addressed store, hash-verified

1034
1035// will return the method ID for a reply by inspecting the Cseq header
1036static int
1037get_method_from_reply(struct sip_msg *reply)
1038{
1039 struct cseq_body *cseq;
1040
1041 if (reply->first_line.type != SIP_REPLY)
1042 return -1;
1043
1044 if (!reply->cseq && parse_headers(reply, HDR_CSEQ_F, 0) < 0) {
1045 LM_ERR("failed to parse the CSeq header\n");
1046 return -1;
1047 }
1048 if (!reply->cseq) {
1049 LM_ERR("missing CSeq header\n");
1050 return -1;
1051 }
1052 cseq = reply->cseq->parsed;
1053 return cseq->method_id;
1054}
1055
1056static Bool
1057supported_transport(str transport)

Callers 1

use_media_proxyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected