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

Function pv_get_ruri

pvar.c:617–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615}
616
617static int pv_get_ruri(struct sip_msg *msg, pv_param_t *param,
618 pv_value_t *res)
619{
620 if(msg==NULL || res==NULL)
621 return -1;
622
623 if(msg->first_line.type == SIP_REPLY) /* REPLY doesn't have a ruri */
624 return pv_get_null(msg, param, res);
625
626 if(msg->parsed_uri_ok==0 /* R-URI not parsed*/ && parse_sip_msg_uri(msg)<0)
627 {
628 LM_ERR("failed to parse the R-URI\n");
629 return pv_get_null(msg, param, res);
630 }
631
632 if (msg->new_uri.s!=NULL)
633 return pv_get_strval(msg, param, res, &msg->new_uri);
634 return pv_get_strval(msg, param, res, &msg->first_line.u.request.uri);
635}
636
637static int pv_get_ru_q(struct sip_msg *msg, pv_param_t *param,
638 pv_value_t *res)

Callers

nothing calls this directly

Calls 3

pv_get_nullFunction · 0.85
parse_sip_msg_uriFunction · 0.85
pv_get_strvalFunction · 0.85

Tested by

no test coverage detected