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

Function tm_anycast_cancel

modules/tm/cluster.c:594–613  ·  view source on GitHub ↗

* Handles a CANCEL message received over anycast * Returns: * 0: message was successfully handled * -1: message was not handled */

Source from the content-addressed store, hash-verified

592 * -1: message was not handled
593 */
594int tm_anycast_cancel(struct sip_msg *msg)
595{
596 struct cell *t;
597 if (!tm_repl_auto_cancel || !tm_repl_cluster)
598 return -1;
599
600 if (!tm_existing_invite_trans(msg))
601 return tm_replicate_cancel(msg)? 0: -2;
602 t = get_cancelled_t();
603 if (t!=NULL && t!=T_UNDEFINED)
604 t_unref_cell(t);
605
606 if (t_relay_to(msg, NULL, 0) < 0) {
607 LM_ERR("cannot handle auto-CANCEL here - send to script!\n");
608 return -1;
609 }
610 t_unref(msg);
611
612 return 0;
613}

Callers 1

script_initFunction · 0.85

Calls 6

tm_existing_invite_transFunction · 0.85
tm_replicate_cancelFunction · 0.85
get_cancelled_tFunction · 0.85
t_unref_cellFunction · 0.85
t_relay_toFunction · 0.85
t_unrefFunction · 0.85

Tested by

no test coverage detected