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

Function mi_tm_cancel

modules/tm/mi.c:591–614  ·  view source on GitHub ↗

Syntax of "t_uac_cancel" : callid cseq */

Source from the content-addressed store, hash-verified

589 cseq
590*/
591mi_response_t *mi_tm_cancel(const mi_params_t *params,
592 struct mi_handler *async_hdl)
593{
594 struct cell *trans;
595 str callid, cseq;
596 branch_bm_t cancel_bitmap = BRANCH_BM_ALL;
597
598 if (get_mi_string_param(params, "callid", &callid.s, &callid.len) < 0)
599 return init_mi_param_error();
600 if (get_mi_string_param(params, "cseq", &cseq.s, &cseq.len) < 0)
601 return init_mi_param_error();
602
603 if( t_lookup_callid( &trans, callid, cseq) < 0 )
604 return init_mi_error( 481, MI_SSTR("No such transaction"));
605
606 /* cancel the call */
607 LM_DBG("cancelling transaction %p\n",trans);
608
609 cancel_uacs( trans, cancel_bitmap/*all branches*/);
610
611 UNREF(trans);
612
613 return init_mi_result_ok();
614}
615
616
617/*

Callers

nothing calls this directly

Calls 5

get_mi_string_paramFunction · 0.85
init_mi_param_errorFunction · 0.85
t_lookup_callidFunction · 0.85
init_mi_errorFunction · 0.85
cancel_uacsFunction · 0.85

Tested by

no test coverage detected