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

Function ospInitTm

modules/osp/tm.c:48–64  ·  view source on GitHub ↗

* Load TM API * return 0 success, -1 failure */

Source from the content-addressed store, hash-verified

46 * return 0 success, -1 failure
47 */
48int ospInitTm(void)
49{
50 if (load_tm_api(&osp_tmb) != 0) {
51 LM_ERR("failed to load TM API\n");
52 LM_ERR("TM is required for reporting call setup usage\n");
53 return -1;
54 }
55
56 /* Register callbacks, listen for all incoming requests */
57 if (osp_tmb.register_tmcb(0, 0, TMCB_REQUEST_IN, ospOnReq, 0, 0) <= 0) {
58 LM_ERR("failed to register TMCB_REQUEST_IN callback\n");
59 LM_ERR("TM callbacks are required for reporting call set up usage\n");
60 return -1;
61 }
62
63 return 0;
64}
65
66/*
67 * Register OSP callback function

Callers 1

ospInitModFunction · 0.85

Calls 1

load_tm_apiFunction · 0.85

Tested by

no test coverage detected