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

Function t_reply_by_callid

modules/tm/tm.c:1800–1823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1798}
1799
1800static int t_reply_by_callid(struct sip_msg* msg, unsigned int* code, str* text, str* callid, str* cseq_number)
1801{
1802 struct cell *trans;
1803 int n;
1804
1805 if (!callid && msg->callid==NULL && ((parse_headers(msg, HDR_CALLID_F, 0) ==-1) || (msg->callid==NULL)) ) {
1806 /* could not get callid */
1807 return -2;
1808 }
1809
1810 if (!cseq_number && !msg->cseq && ((parse_headers(msg, HDR_CSEQ_F, 0) == -1) || !msg->cseq)) {
1811 /* could not get cseq */
1812 return -3;
1813 }
1814
1815 if(t_lookup_callid( &trans, callid ? *callid : msg->callid->body, cseq_number ? *cseq_number : get_cseq(msg)->number) < 0) {
1816 /* transaction not found */
1817 return -4;
1818 }
1819
1820 n = t_reply_with_body( trans, *code, text, 0, 0, 0);
1821
1822 return n;
1823}
1824
1825
1826static int t_get_branch_idx_by_attr(struct sip_msg* msg,

Callers

nothing calls this directly

Calls 2

t_lookup_callidFunction · 0.85
t_reply_with_bodyFunction · 0.85

Tested by

no test coverage detected