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

Function pv_get_ouri

pvar.c:649–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647}
648
649static int pv_get_ouri(struct sip_msg *msg, pv_param_t *param,
650 pv_value_t *res)
651{
652 if(msg==NULL || res==NULL)
653 return -1;
654
655 if(msg->first_line.type == SIP_REPLY) /* REPLY doesn't have a ruri */
656 return pv_get_null(msg, param, res);
657
658 if(msg->parsed_orig_ruri_ok==0
659 /* orig R-URI not parsed*/ && parse_orig_ruri(msg)<0)
660 {
661 LM_ERR("failed to parse the R-URI\n");
662 return pv_get_null(msg, param, res);
663 }
664 return pv_get_strval(msg, param, res, &msg->first_line.u.request.uri);
665}
666
667static int pv_get_xuri_attr(struct sip_msg *msg, struct sip_uri *parsed_uri,
668 pv_param_t *param, pv_value_t *res)

Callers

nothing calls this directly

Calls 3

pv_get_nullFunction · 0.85
parse_orig_ruriFunction · 0.85
pv_get_strvalFunction · 0.85

Tested by

no test coverage detected