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

Function w_construct_uri

core_cmds.c:1467–1492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1465}
1466
1467static int w_construct_uri(struct sip_msg *msg, str *proto, str *user,
1468 str *domain, str *port, str *extra, pv_spec_t *result_avp)
1469{
1470 str result;
1471 int_str res;
1472 int avp_name;
1473 unsigned short avp_type;
1474
1475 result.s = construct_uri(proto, user, domain, port, extra, &result.len);
1476 if (result.s)
1477 {
1478 if (pv_get_avp_name( msg, &(result_avp->pvp), &avp_name,
1479 &avp_type)!=0){
1480 LM_CRIT("BUG in getting AVP name\n");
1481 return -1;
1482 }
1483
1484 res.s = result;
1485 if (add_avp(AVP_VAL_STR|avp_type, avp_name, res)<0){
1486 LM_ERR("cannot add AVP\n");
1487 return -1;
1488 }
1489 }
1490
1491 return 1;
1492}
1493
1494static int w_get_timestamp(struct sip_msg *msg, pv_spec_t *sec_avp,
1495 pv_spec_t *usec_avp)

Callers

nothing calls this directly

Calls 3

construct_uriFunction · 0.85
pv_get_avp_nameFunction · 0.85
add_avpFunction · 0.85

Tested by

no test coverage detected