static mi_response_t *mi_b2b_terminate_call(const mi_params_t *params, struct mi_handler *async_hdl) { str key; if (get_mi_string_param(params, "key", &key.s, &key.len) < 0) return init_mi_param_error(); b2bl_terminate_call(&key); return init_mi_result_ok(); }
static struct mi_root* mi_b2b_terminate_call(struct mi_root* cmd, void* param) { struct mi_node* node= NULL; str key; node = cmd->node.kids; if(node == NULL) return 0; /* b2bl_key */ key = node->value; if(key.s == NULL || key.len== 0) { LM_ERR("Wrong b2b_logic key parameter\n"); return init_mi_tree(404, "Empty b2bl key", 14); } b2bl_terminate_call(&key); return init_mi_tree(200, "OK", 2); }