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

Function get_callid

parser/msg_parser.h:486–502  ·  view source on GitHub ↗

* Get the callid of a message. If returned value is 0, the callid is stored * in the _cid field, otherwise -1 is returned on error */

Source from the content-addressed store, hash-verified

484 * in the _cid field, otherwise -1 is returned on error
485 */
486inline static int get_callid(struct sip_msg* _m, str* _cid)
487{
488 if ((parse_headers(_m, HDR_CALLID_F, 0) == -1)) {
489 LM_ERR("failed to parse call-id header\n");
490 return -1;
491 }
492
493 if (_m->callid == NULL) {
494 LM_ERR("call-id not found\n");
495 return -1;
496 }
497
498 _cid->s = _m->callid->body.s;
499 _cid->len = _m->callid->body.len;
500 trim(_cid);
501 return 0;
502}
503
504
505/*

Callers 15

__tm_sendpublishFunction · 0.85
msrpua_init_uasFunction · 0.85
use_media_proxyFunction · 0.85
EndMediaSessionFunction · 0.85
rtpproxy_streamFunction · 0.85
rtpproxy_stop_streamFunction · 0.85
unforce_rtp_proxy_fFunction · 0.85
force_rtp_proxyFunction · 0.85
force_rtp_proxy_bodyFunction · 0.85
rtpp_build_statsFunction · 0.85
rtpproxy_recordingFunction · 0.85

Calls 1

trimFunction · 0.85

Tested by

no test coverage detected